From ca8948ab8a079b9d8bf98387e617ed0392292fab Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 21 Jun 2023 14:59:14 +0200 Subject: [PATCH 001/112] init --- compiler/lib/deadcode_dgraph.ml | 84 +++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 compiler/lib/deadcode_dgraph.ml diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml new file mode 100644 index 0000000000..fcce9d3ab3 --- /dev/null +++ b/compiler/lib/deadcode_dgraph.ml @@ -0,0 +1,84 @@ +(* Js_of_ocaml compiler + * http://www.ocsigen.org/js_of_ocaml/ + * + * 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 Code + +type def = + | Expr of expr + | Var of Var.t + +type state = + { blocks : block Addr.Map.t + ; var_life : bool Var.Tbl.t + ; defs : def list array + ; pure_funs : Var.Set.t + } + +module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) + +module Domain = struct + type t = bool + + let equal = Bool.equal + + let bot = false +end + +module Solver = G.Solver (Domain) + +let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e && Config.Flag.deadcode () + +let live_instr st i = + match i with + | Let (x, e) -> + (* variable has been marked as live or the expression is impure *) + Var.Tbl.get st.var_life x || not (pure_expr st.pure_funs e) + | Assign (x, _) -> + (* variable has been marked as live *) + Var.Tbl.get st.var_life x + | Set_field _ | Offset_ref _ | Array_set _ -> + (* these are impure so always live *) + true + +let propagate deps (defs : def array) pure_funs st x = + match defs.(Var.idx x) with + | Expr e -> _ + | Var v -> Var.Tbl.get st.var_life x + +let solver vars deps defs pure_funs = + let g = + { G.domain = vars; G.iter_children = (fun f x -> Var.Set.iter f deps.(Var.idx x)) } + in + Solver.f () g (propagate deps defs pure_funs) + +let run (p : program) = + let blocks = p.blocks in + let vars, deps, defs = program_deps p in + let pure_funs = Pure_fun.f p in + let var_life = solver vars deps defs pure_funs in + let st = { blocks; var_life; defs; pure_funs } in + let remove_dead (block : block) = + { params = List.filter (fun x -> Var.Tbl.get st.var_life x) block.params + ; body = (* remove dead instructions *) + _ + ; branch = (* Remove dead code from the last instruction *) + _ + } + in + let blocks = Addr.Map.map remove_dead p.blocks in + { p with blocks } From 31fe9f0fdc77e62cd4bc153ca378c38619252738 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 22 Jun 2023 15:09:07 +0200 Subject: [PATCH 002/112] more progress --- compiler/lib/deadcode_dgraph.ml | 101 ++++++++++++++++++++++++++------ 1 file changed, 82 insertions(+), 19 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index fcce9d3ab3..02ca57bed8 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -21,11 +21,12 @@ open Code type def = | Expr of expr | Var of Var.t + | Unknown type state = { blocks : block Addr.Map.t - ; var_life : bool Var.Tbl.t - ; defs : def list array + ; live : bool Var.Tbl.t + ; defs : def array ; pure_funs : Var.Set.t } @@ -43,37 +44,99 @@ module Solver = G.Solver (Domain) let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e && Config.Flag.deadcode () +(* Returns an array of definitions of each variable *) +let definitions (p : program) = + let defs = Array.make 0 Unknown in + Addr.Map.iter + (fun _ block -> + List.iter + (fun (i, _) -> + match i with + | Let (x, e) -> defs.(Var.idx x) <- Expr e + | Assign (x, y) -> defs.(Var.idx x) <- Var y + | _ -> ()) + block.body) + p.blocks; + defs + +(* Returns the adjacency list for the variable dependency graph. *) +let dependencies (defs : def array) = + let deps = Array.make 0 Var.Set.empty in + let add_dep i x = deps.(i) <- Var.Set.add x deps.(i) in + Array.iteri + (fun i d -> + match d with + | Expr e -> ( + match e with + | Apply { f; args; _ } -> + add_dep i f; + List.iter (add_dep i) args + | Block (_, params, _) -> Array.iter (add_dep i) params + | Field (z, _) -> add_dep i z + | Constant _ -> () + (* Not exactly sure how to handle these two *) + | Closure (_, _) -> () + | Prim (_, _) -> ()) + | Var y -> add_dep i y + | Unknown -> ()) + defs; + deps + +(* Returns a boolean array representing whether each variable appears in an effectful definition. *) +let effectful defs pure_funs = + let effs = Array.make 0 false in + Array.iteri + (fun i d -> + match d with + | Expr e -> if not (pure_expr pure_funs e) then effs.(i) <- true + | Var y -> effs.(i) <- effs.(Var.idx y) + | Unknown -> ()) + defs; + effs + +(* Returns the set of variables given the adjacency list of variable depencies. *) +let variables (deps : Var.Set.t array) = + let vars = Var.ISet.empty () in + Array.iter (fun s -> Var.Set.iter (fun v -> Var.ISet.add vars v) s) deps; + vars + +(* A variable x is live if either + (1) it appears in an effectful expression; or + (2) there exists a live variable y that depends on x. *) +let propagate deps effectful live x = + let idx = Var.idx x in + effectful.(idx) || Var.Set.exists (fun y -> Var.Tbl.get live y) deps.(idx) + +let solver vars deps effectful = + let g = + { G.domain = vars; G.iter_children = (fun f x -> Var.Set.iter f deps.(Var.idx x)) } + in + Solver.f () g (propagate deps effectful) + let live_instr st i = match i with | Let (x, e) -> (* variable has been marked as live or the expression is impure *) - Var.Tbl.get st.var_life x || not (pure_expr st.pure_funs e) + Var.Tbl.get st.live x || not (pure_expr st.pure_funs e) | Assign (x, _) -> (* variable has been marked as live *) - Var.Tbl.get st.var_life x + Var.Tbl.get st.live x | Set_field _ | Offset_ref _ | Array_set _ -> (* these are impure so always live *) true -let propagate deps (defs : def array) pure_funs st x = - match defs.(Var.idx x) with - | Expr e -> _ - | Var v -> Var.Tbl.get st.var_life x - -let solver vars deps defs pure_funs = - let g = - { G.domain = vars; G.iter_children = (fun f x -> Var.Set.iter f deps.(Var.idx x)) } - in - Solver.f () g (propagate deps defs pure_funs) - let run (p : program) = let blocks = p.blocks in - let vars, deps, defs = program_deps p in + let defs = definitions p in + let deps = dependencies defs in let pure_funs = Pure_fun.f p in - let var_life = solver vars deps defs pure_funs in - let st = { blocks; var_life; defs; pure_funs } in + let effs = effectful defs pure_funs in + let vars = variables deps in + let live = solver vars deps effs in + (* Now that we have live variable table, remove dead ones *) + let st = { blocks; live; defs; pure_funs } in let remove_dead (block : block) = - { params = List.filter (fun x -> Var.Tbl.get st.var_life x) block.params + { params = List.filter (fun x -> Var.Tbl.get st.live x) block.params ; body = (* remove dead instructions *) _ ; branch = (* Remove dead code from the last instruction *) From 55e413dde7344fe8205cad986e95a89bf5dc7e2d Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 22 Jun 2023 17:07:25 +0200 Subject: [PATCH 003/112] prep for debugging --- compiler/lib/deadcode_dgraph.ml | 96 +++++++++++++++----------------- compiler/lib/deadcode_dgraph.mli | 19 +++++++ compiler/lib/driver.ml | 2 +- 3 files changed, 64 insertions(+), 53 deletions(-) create mode 100644 compiler/lib/deadcode_dgraph.mli diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 02ca57bed8..23ab0db845 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -21,14 +21,13 @@ open Code type def = | Expr of expr | Var of Var.t - | Unknown -type state = +(* type state = { blocks : block Addr.Map.t ; live : bool Var.Tbl.t - ; defs : def array + ; defs : def list array ; pure_funs : Var.Set.t - } + } *) module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -45,57 +44,59 @@ module Solver = G.Solver (Domain) let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e && Config.Flag.deadcode () (* Returns an array of definitions of each variable *) -let definitions (p : program) = - let defs = Array.make 0 Unknown in +let definitions nv (p : program) = + let defs = Array.make nv [] in + let add_def x d = defs.(Var.idx x) <- d :: defs.(Var.idx x) in Addr.Map.iter (fun _ block -> List.iter (fun (i, _) -> match i with - | Let (x, e) -> defs.(Var.idx x) <- Expr e - | Assign (x, y) -> defs.(Var.idx x) <- Var y + | Let (x, e) -> add_def x (Expr e) + | Assign (x, y) -> add_def x (Var y) | _ -> ()) block.body) p.blocks; defs (* Returns the adjacency list for the variable dependency graph. *) -let dependencies (defs : def array) = - let deps = Array.make 0 Var.Set.empty in +let dependencies nv defs = + let deps = Array.make nv Var.Set.empty in let add_dep i x = deps.(i) <- Var.Set.add x deps.(i) in Array.iteri - (fun i d -> - match d with - | Expr e -> ( - match e with - | Apply { f; args; _ } -> - add_dep i f; - List.iter (add_dep i) args - | Block (_, params, _) -> Array.iter (add_dep i) params - | Field (z, _) -> add_dep i z - | Constant _ -> () - (* Not exactly sure how to handle these two *) - | Closure (_, _) -> () - | Prim (_, _) -> ()) - | Var y -> add_dep i y - | Unknown -> ()) + (fun i ds -> + List.iter + (fun d -> + match d with + | Expr e -> ( + match e with + | Apply { f; args; _ } -> + add_dep i f; + List.iter (add_dep i) args + | Block (_, params, _) -> Array.iter (add_dep i) params + | Field (z, _) -> add_dep i z + | Constant _ -> () + (* Not exactly sure how to handle these two *) + | Closure (_, _) -> () + | Prim (_, _) -> ()) + | Var y -> add_dep i y) + ds) defs; deps (* Returns a boolean array representing whether each variable appears in an effectful definition. *) -let effectful defs pure_funs = - let effs = Array.make 0 false in - Array.iteri - (fun i d -> - match d with - | Expr e -> if not (pure_expr pure_funs e) then effs.(i) <- true - | Var y -> effs.(i) <- effs.(Var.idx y) - | Unknown -> ()) - defs; +let effectful nv defs pure_funs = + let effs = Array.make nv false in + let set_eff i d = + match d with + | Expr e -> if not (pure_expr pure_funs e) then effs.(i) <- true + | Var y -> effs.(i) <- effs.(Var.idx y) + in + Array.iteri (fun i ds -> List.iter (fun d -> set_eff i d) ds) defs; effs (* Returns the set of variables given the adjacency list of variable depencies. *) -let variables (deps : Var.Set.t array) = +let variables deps = let vars = Var.ISet.empty () in Array.iter (fun s -> Var.Set.iter (fun v -> Var.ISet.add vars v) s) deps; vars @@ -113,7 +114,7 @@ let solver vars deps effectful = in Solver.f () g (propagate deps effectful) -let live_instr st i = +(* let live_instr st i = match i with | Let (x, e) -> (* variable has been marked as live or the expression is impure *) @@ -123,25 +124,16 @@ let live_instr st i = Var.Tbl.get st.live x | Set_field _ | Offset_ref _ | Array_set _ -> (* these are impure so always live *) - true + true *) let run (p : program) = + let nv = Var.count () in let blocks = p.blocks in - let defs = definitions p in - let deps = dependencies defs in + let defs = definitions nv p in + let deps = dependencies nv defs in let pure_funs = Pure_fun.f p in - let effs = effectful defs pure_funs in + let effs = effectful nv defs pure_funs in let vars = variables deps in let live = solver vars deps effs in - (* Now that we have live variable table, remove dead ones *) - let st = { blocks; live; defs; pure_funs } in - let remove_dead (block : block) = - { params = List.filter (fun x -> Var.Tbl.get st.live x) block.params - ; body = (* remove dead instructions *) - _ - ; branch = (* Remove dead code from the last instruction *) - _ - } - in - let blocks = Addr.Map.map remove_dead p.blocks in - { p with blocks } + Var.Tbl.iter (fun v b -> Format.eprintf "%a: %b\n" Var.print v b) live; + { p with blocks }, Array.make nv 0 diff --git a/compiler/lib/deadcode_dgraph.mli b/compiler/lib/deadcode_dgraph.mli new file mode 100644 index 0000000000..1a356d6543 --- /dev/null +++ b/compiler/lib/deadcode_dgraph.mli @@ -0,0 +1,19 @@ +(* Js_of_ocaml compiler + * http://www.ocsigen.org/js_of_ocaml/ + * + * 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. + *) + +val run : Code.program -> Code.program * (int array) \ No newline at end of file diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index b1c2b93b57..15524a75bc 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -38,7 +38,7 @@ let tailcall p = let deadcode' p = if debug () then Format.eprintf "Dead-code...@."; - Deadcode.f p + Deadcode_dgraph.run p let deadcode p = let r, _ = deadcode' p in From c63bd523868cee269e7ee7c63c416a44be2a7dc9 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 23 Jun 2023 12:41:27 +0200 Subject: [PATCH 004/112] more updates, debugging info --- compiler/lib/deadcode_dgraph.ml | 70 ++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 23ab0db845..ab4e624af9 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -23,11 +23,11 @@ type def = | Var of Var.t (* type state = - { blocks : block Addr.Map.t - ; live : bool Var.Tbl.t - ; defs : def list array - ; pure_funs : Var.Set.t - } *) + { blocks : block Addr.Map.t + ; live : bool Var.Tbl.t + ; defs : def list array + ; pure_funs : Var.Set.t + } *) module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -76,9 +76,14 @@ let dependencies nv defs = | Block (_, params, _) -> Array.iter (add_dep i) params | Field (z, _) -> add_dep i z | Constant _ -> () - (* Not exactly sure how to handle these two *) - | Closure (_, _) -> () - | Prim (_, _) -> ()) + | Closure (params, _) -> List.iter (add_dep i) params + | Prim (_, args) -> + List.iter + (fun arg -> + match arg with + | Pv v -> add_dep i v + | Pc _ -> ()) + args) | Var y -> add_dep i y) ds) defs; @@ -87,12 +92,15 @@ let dependencies nv defs = (* Returns a boolean array representing whether each variable appears in an effectful definition. *) let effectful nv defs pure_funs = let effs = Array.make nv false in - let set_eff i d = - match d with - | Expr e -> if not (pure_expr pure_funs e) then effs.(i) <- true - | Var y -> effs.(i) <- effs.(Var.idx y) - in - Array.iteri (fun i ds -> List.iter (fun d -> set_eff i d) ds) defs; + Array.iteri (* For each set of definitions *) + (fun i ds -> + List.iter (* For each definition *) + (fun d -> (* See if definition is effectful *) + match d with + | Expr e -> if not (pure_expr pure_funs e) then effs.(i) <- true + | Var y -> effs.(i) <- effs.(Var.idx y)) + ds) + defs; effs (* Returns the set of variables given the adjacency list of variable depencies. *) @@ -106,6 +114,7 @@ let variables deps = (2) there exists a live variable y that depends on x. *) let propagate deps effectful live x = let idx = Var.idx x in + Format.eprintf "%b\n" effectful.(idx); effectful.(idx) || Var.Set.exists (fun y -> Var.Tbl.get live y) deps.(idx) let solver vars deps effectful = @@ -115,25 +124,38 @@ let solver vars deps effectful = Solver.f () g (propagate deps effectful) (* let live_instr st i = - match i with - | Let (x, e) -> - (* variable has been marked as live or the expression is impure *) - Var.Tbl.get st.live x || not (pure_expr st.pure_funs e) - | Assign (x, _) -> - (* variable has been marked as live *) - Var.Tbl.get st.live x - | Set_field _ | Offset_ref _ | Array_set _ -> - (* these are impure so always live *) - true *) + match i with + | Let (x, e) -> + (* variable has been marked as live or the expression is impure *) + Var.Tbl.get st.live x || not (pure_expr st.pure_funs e) + | Assign (x, _) -> + (* variable has been marked as live *) + Var.Tbl.get st.live x + | Set_field _ | Offset_ref _ | Array_set _ -> + (* these are impure so always live *) + true *) let run (p : program) = let nv = Var.count () in let blocks = p.blocks in let defs = definitions nv p in let deps = dependencies nv defs in + (* Print out dependency info *) + Format.eprintf "Dependencies:\n"; + Array.iteri + (fun i ds -> + Format.eprintf "%d: { " i; + Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; + Format.eprintf "}\n") + deps; let pure_funs = Pure_fun.f p in let effs = effectful nv defs pure_funs in + (* Print out effectfulness info *) + Format.eprintf "Effectful:\n"; + Array.iteri (fun i b -> Format.eprintf "%d: %b\n" i b) effs; let vars = variables deps in let live = solver vars deps effs in + (* Print out liveness info *) + Format.eprintf "Liveness:\n"; Var.Tbl.iter (fun v b -> Format.eprintf "%a: %b\n" Var.print v b) live; { p with blocks }, Array.make nv 0 From dbdf3bba062fd5612136e46e7d38d86705431ff6 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 26 Jun 2023 17:14:48 +0200 Subject: [PATCH 005/112] updates --- compiler/lib/deadcode_dgraph.ml | 70 ++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 19 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index ab4e624af9..1341074cbe 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -44,7 +44,7 @@ module Solver = G.Solver (Domain) let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e && Config.Flag.deadcode () (* Returns an array of definitions of each variable *) -let definitions nv (p : program) = +let definitions nv prog = let defs = Array.make nv [] in let add_def x d = defs.(Var.idx x) <- d :: defs.(Var.idx x) in Addr.Map.iter @@ -56,16 +56,16 @@ let definitions nv (p : program) = | Assign (x, y) -> add_def x (Var y) | _ -> ()) block.body) - p.blocks; + prog.blocks; defs (* Returns the adjacency list for the variable dependency graph. *) let dependencies nv defs = let deps = Array.make nv Var.Set.empty in - let add_dep i x = deps.(i) <- Var.Set.add x deps.(i) in - Array.iteri + let add_dep i x = deps.(Var.idx x) <- Var.Set.add (Var.of_idx i) deps.(Var.idx x) in + Array.iteri (* For each set of definitions *) (fun i ds -> - List.iter + List.iter (* For each definition *) (fun d -> match d with | Expr e -> ( @@ -89,18 +89,51 @@ let dependencies nv defs = defs; deps -(* Returns a boolean array representing whether each variable appears in an effectful definition. *) -let effectful nv defs pure_funs = +let expr_contains_var x e = + match e with + | Apply { f; args; _ } -> Var.equal x f || List.exists (Var.equal x) args + | Block (_, params, _) -> Array.exists (Var.equal x) params + | Field (z, _) -> Var.equal x z + | Constant _ -> false + | Closure (params, _) -> List.exists (Var.equal x) params + | Prim (_, args) -> + List.exists + (fun arg -> + match arg with + | Pv v -> Var.equal x v + | Pc _ -> false) + args + +(* Returns a boolean array representing whether each variable appears in an effectful instruction. *) +let effectful nv prog pure_funs = let effs = Array.make nv false in - Array.iteri (* For each set of definitions *) - (fun i ds -> - List.iter (* For each definition *) - (fun d -> (* See if definition is effectful *) - match d with - | Expr e -> if not (pure_expr pure_funs e) then effs.(i) <- true - | Var y -> effs.(i) <- effs.(Var.idx y)) - ds) - defs; + let effectful_instruction i = + match i with + | Let (x, e) -> + if (not (pure_expr pure_funs e)) && expr_contains_var x e + then effs.(Var.idx x) <- true + | Assign (x, _) -> effs.(Var.idx x) <- true (* TODO: correct? *) + | _ -> () + in + let rec effectful_block block = + List.iter (fun (i, _) -> effectful_instruction i) block.body; + match fst block.branch with + | Stop -> () + | Return x | Raise (x, _) -> effs.(Var.idx x) <- true + | Branch cont | Poptrap cont -> + effectful_continuation prog cont; + effectful_continuation prog cont + | Cond (_, cont1, cont2) | Pushtrap (cont1, _, cont2, _) -> + effectful_continuation prog cont1; + effectful_continuation prog cont2 + | Switch (_, a1, a2) -> + Array.iter (fun cont -> effectful_continuation prog cont) a1; + Array.iter (fun cont -> effectful_continuation prog cont) a2 + and effectful_continuation prog ((pc, _) : cont) = + let block = Addr.Map.find pc prog.blocks in + effectful_block block + in + Addr.Map.iter (fun _ block -> effectful_block block) prog.blocks; effs (* Returns the set of variables given the adjacency list of variable depencies. *) @@ -114,14 +147,13 @@ let variables deps = (2) there exists a live variable y that depends on x. *) let propagate deps effectful live x = let idx = Var.idx x in - Format.eprintf "%b\n" effectful.(idx); effectful.(idx) || Var.Set.exists (fun y -> Var.Tbl.get live y) deps.(idx) let solver vars deps effectful = let g = { G.domain = vars; G.iter_children = (fun f x -> Var.Set.iter f deps.(Var.idx x)) } in - Solver.f () g (propagate deps effectful) + Solver.f () (G.invert () g) (propagate deps effectful) (* let live_instr st i = match i with @@ -149,7 +181,7 @@ let run (p : program) = Format.eprintf "}\n") deps; let pure_funs = Pure_fun.f p in - let effs = effectful nv defs pure_funs in + let effs = effectful nv p pure_funs in (* Print out effectfulness info *) Format.eprintf "Effectful:\n"; Array.iteri (fun i b -> Format.eprintf "%d: %b\n" i b) effs; From 4a389e37cfd70df8002765746a22a93323dcdb4d Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 27 Jun 2023 11:51:53 +0200 Subject: [PATCH 006/112] more updates --- compiler/lib/deadcode_dgraph.ml | 43 +++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 1341074cbe..93ad16e1ee 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -89,29 +89,36 @@ let dependencies nv defs = defs; deps -let expr_contains_var x e = - match e with - | Apply { f; args; _ } -> Var.equal x f || List.exists (Var.equal x) args - | Block (_, params, _) -> Array.exists (Var.equal x) params - | Field (z, _) -> Var.equal x z - | Constant _ -> false - | Closure (params, _) -> List.exists (Var.equal x) params +(* Return the set of variables used in a given expression *) +let expr_vars (e : expr) = + let vars = Var.ISet.empty () in + (match e with + | Apply { f; args; _ } -> + Var.ISet.add vars f; + List.iter (Var.ISet.add vars) args + | Block (_, params, _) -> Array.iter (Var.ISet.add vars) params + | Field (z, _) -> Var.ISet.add vars z + | Constant _ -> () + | Closure (params, _) -> List.iter (Var.ISet.add vars) params | Prim (_, args) -> - List.exists - (fun arg -> - match arg with - | Pv v -> Var.equal x v - | Pc _ -> false) - args + List.iter + (fun v -> + match v with + | Pv v -> Var.ISet.add vars v + | Pc _ -> ()) + args); + vars (* Returns a boolean array representing whether each variable appears in an effectful instruction. *) let effectful nv prog pure_funs = let effs = Array.make nv false in let effectful_instruction i = match i with - | Let (x, e) -> - if (not (pure_expr pure_funs e)) && expr_contains_var x e - then effs.(Var.idx x) <- true + | Let (_, e) -> + if not (pure_expr pure_funs e) + then + let vars = expr_vars e in + Var.ISet.iter (fun v -> effs.(Var.idx v) <- true) vars | Assign (x, _) -> effs.(Var.idx x) <- true (* TODO: correct? *) | _ -> () in @@ -136,10 +143,10 @@ let effectful nv prog pure_funs = Addr.Map.iter (fun _ block -> effectful_block block) prog.blocks; effs -(* Returns the set of variables given the adjacency list of variable depencies. *) +(* Returns the set of variables given the adjacency list of variable dependencies. *) let variables deps = let vars = Var.ISet.empty () in - Array.iter (fun s -> Var.Set.iter (fun v -> Var.ISet.add vars v) s) deps; + Array.iteri (fun i _ -> Var.ISet.add vars (Var.of_idx i)) deps; vars (* A variable x is live if either From f8e73efedb5af34c3ad6312954e74cc36d9d09fa Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 3 Jul 2023 16:05:04 +0200 Subject: [PATCH 007/112] initial support for annotating blocks --- compiler/lib/deadcode_dgraph.ml | 161 +++++++++++++++++++++----------- 1 file changed, 104 insertions(+), 57 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 93ad16e1ee..a5713e7ea4 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -17,26 +17,29 @@ *) open Code +open Stdlib type def = | Expr of expr | Var of Var.t -(* type state = - { blocks : block Addr.Map.t - ; live : bool Var.Tbl.t - ; defs : def list array - ; pure_funs : Var.Set.t - } *) +type live = + | Live of IntSet.t + | Dead + +let live_to_string = function + | Live fields -> + "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d" i) fields "" ^ " }" + | Dead -> "dead" module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) module Domain = struct - type t = bool + type t = live - let equal = Bool.equal + let equal = Poly.( = ) - let bot = false + let bot = Dead end module Solver = G.Solver (Domain) @@ -50,7 +53,7 @@ let definitions nv prog = Addr.Map.iter (fun _ block -> List.iter - (fun (i, _) -> + ~f:(fun (i, _) -> match i with | Let (x, e) -> add_def x (Expr e) | Assign (x, y) -> add_def x (Var y) @@ -64,22 +67,23 @@ let dependencies nv defs = let deps = Array.make nv Var.Set.empty in let add_dep i x = deps.(Var.idx x) <- Var.Set.add (Var.of_idx i) deps.(Var.idx x) in Array.iteri (* For each set of definitions *) - (fun i ds -> + ~f:(fun i ds -> List.iter (* For each definition *) - (fun d -> + ~f:(fun d -> match d with + (* Add dependencies from definition *) | Expr e -> ( match e with | Apply { f; args; _ } -> add_dep i f; - List.iter (add_dep i) args - | Block (_, params, _) -> Array.iter (add_dep i) params + List.iter ~f:(add_dep i) args + | Block (_, params, _) -> Array.iter ~f:(add_dep i) params | Field (z, _) -> add_dep i z | Constant _ -> () - | Closure (params, _) -> List.iter (add_dep i) params + | Closure (params, _) -> List.iter ~f:(add_dep i) params | Prim (_, args) -> List.iter - (fun arg -> + ~f:(fun arg -> match arg with | Pv v -> add_dep i v | Pc _ -> ()) @@ -90,77 +94,120 @@ let dependencies nv defs = deps (* Return the set of variables used in a given expression *) -let expr_vars (e : expr) = +let expr_vars e = let vars = Var.ISet.empty () in (match e with | Apply { f; args; _ } -> Var.ISet.add vars f; - List.iter (Var.ISet.add vars) args - | Block (_, params, _) -> Array.iter (Var.ISet.add vars) params + List.iter ~f:(Var.ISet.add vars) args + | Block (_, params, _) -> Array.iter ~f:(Var.ISet.add vars) params | Field (z, _) -> Var.ISet.add vars z | Constant _ -> () - | Closure (params, _) -> List.iter (Var.ISet.add vars) params + | Closure (params, _) -> List.iter ~f:(Var.ISet.add vars) params | Prim (_, args) -> List.iter - (fun v -> + ~f:(fun v -> match v with | Pv v -> Var.ISet.add vars v | Pc _ -> ()) args); vars -(* Returns a boolean array representing whether each variable appears in an effectful instruction. *) -let effectful nv prog pure_funs = - let effs = Array.make nv false in - let effectful_instruction i = +(* Returns a boolean array representing whether each variable either + (1) appears in an effectful instruction; or + (2) is returned or raised by a function. *) +let liveness nv prog pure_funs defs = + let live_vars = Array.make nv Dead in + let add_live v = + let idx = Var.idx v in + let fields = + List.fold_left + ~f:(fun acc def -> + match def with + | Expr (Field (_, i)) -> IntSet.add i acc + | _ -> acc) + ~init:IntSet.empty + defs.(idx) + in + live_vars.(idx) <- Live fields + in + let live_instruction i = match i with | Let (_, e) -> if not (pure_expr pure_funs e) then let vars = expr_vars e in - Var.ISet.iter (fun v -> effs.(Var.idx v) <- true) vars - | Assign (x, _) -> effs.(Var.idx x) <- true (* TODO: correct? *) - | _ -> () + Var.ISet.iter add_live vars + | Assign (_, _) -> () + | Set_field (x, _, y) -> + add_live x; + add_live y + | Array_set (x, y, z) -> + add_live x; + add_live y; + add_live z + | Offset_ref (x, _) -> add_live x in - let rec effectful_block block = - List.iter (fun (i, _) -> effectful_instruction i) block.body; + let rec live_block block = + List.iter ~f:(fun (i, _) -> live_instruction i) block.body; match fst block.branch with + (* Base Cases *) | Stop -> () - | Return x | Raise (x, _) -> effs.(Var.idx x) <- true + | Return x | Raise (x, _) -> add_live x + (* Recursive cases *) | Branch cont | Poptrap cont -> - effectful_continuation prog cont; - effectful_continuation prog cont + live_continuation prog cont; + live_continuation prog cont | Cond (_, cont1, cont2) | Pushtrap (cont1, _, cont2, _) -> - effectful_continuation prog cont1; - effectful_continuation prog cont2 + live_continuation prog cont1; + live_continuation prog cont2 | Switch (_, a1, a2) -> - Array.iter (fun cont -> effectful_continuation prog cont) a1; - Array.iter (fun cont -> effectful_continuation prog cont) a2 - and effectful_continuation prog ((pc, _) : cont) = + Array.iter ~f:(fun cont -> live_continuation prog cont) a1; + Array.iter ~f:(fun cont -> live_continuation prog cont) a2 + and live_continuation prog ((pc, _) : cont) = let block = Addr.Map.find pc prog.blocks in - effectful_block block + live_block block in - Addr.Map.iter (fun _ block -> effectful_block block) prog.blocks; - effs + Addr.Map.iter (fun _ block -> live_block block) prog.blocks; + live_vars (* Returns the set of variables given the adjacency list of variable dependencies. *) let variables deps = let vars = Var.ISet.empty () in - Array.iteri (fun i _ -> Var.ISet.add vars (Var.of_idx i)) deps; + Array.iteri ~f:(fun i _ -> Var.ISet.add vars (Var.of_idx i)) deps; vars (* A variable x is live if either - (1) it appears in an effectful expression; or - (2) there exists a live variable y that depends on x. *) -let propagate deps effectful live x = + (1) it appears in an effectful expression; + (2) it is returned or raised by a function; or + (3) there exists a live variable y that depends on x. + The first two conditions are determined by a traversal of the program and given by `live_vars`. + The third is determined here by propagating liveness to a variable's dependencies. *) + +(* We want to know which fields of x are used + Look at definition of y, if y is a field access, then set that field to be live in the block *) +let propagate deps live_vars live_table x = let idx = Var.idx x in - effectful.(idx) || Var.Set.exists (fun y -> Var.Tbl.get live y) deps.(idx) + let union_deps fields = + Var.Set.fold + (fun y acc -> + match Var.Tbl.get live_table y with + | Live y_fields -> IntSet.union acc y_fields + | Dead -> acc) + deps.(idx) + fields + in + match live_vars.(idx) with + | Live fields -> Live (union_deps fields) + | Dead -> + let fields = union_deps IntSet.empty in + if IntSet.is_empty fields then Dead else Live fields -let solver vars deps effectful = +let solver vars deps live_vars = let g = { G.domain = vars; G.iter_children = (fun f x -> Var.Set.iter f deps.(Var.idx x)) } in - Solver.f () (G.invert () g) (propagate deps effectful) + Solver.f () (G.invert () g) (propagate deps live_vars) (* let live_instr st i = match i with @@ -174,7 +221,7 @@ let solver vars deps effectful = (* these are impure so always live *) true *) -let run (p : program) = +let run p = let nv = Var.count () in let blocks = p.blocks in let defs = definitions nv p in @@ -182,19 +229,19 @@ let run (p : program) = (* Print out dependency info *) Format.eprintf "Dependencies:\n"; Array.iteri - (fun i ds -> + ~f:(fun i ds -> Format.eprintf "%d: { " i; Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; Format.eprintf "}\n") deps; let pure_funs = Pure_fun.f p in - let effs = effectful nv p pure_funs in - (* Print out effectfulness info *) - Format.eprintf "Effectful:\n"; - Array.iteri (fun i b -> Format.eprintf "%d: %b\n" i b) effs; - let vars = variables deps in - let live = solver vars deps effs in + let live_vars = liveness nv p pure_funs defs in (* Print out liveness info *) Format.eprintf "Liveness:\n"; - Var.Tbl.iter (fun v b -> Format.eprintf "%a: %b\n" Var.print v b) live; + Array.iteri ~f:(fun i l -> Format.eprintf "%d: %s\n" i (live_to_string l)) live_vars; + let vars = variables deps in + let live_table = solver vars deps live_vars in + (* After dependency propagation *) + Format.eprintf "Liveness with dependencies:\n"; + Var.Tbl.iter (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) live_table; { p with blocks }, Array.make nv 0 From 7d6e5bf0709fdc2e913d465392afc5b246f8afb6 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 4 Jul 2023 14:12:16 +0200 Subject: [PATCH 008/112] more updates --- compiler/lib/deadcode_dgraph.ml | 86 +++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 32 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index a5713e7ea4..0aff42795b 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -25,11 +25,13 @@ type def = type live = | Live of IntSet.t + | Top | Dead let live_to_string = function | Live fields -> - "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d" i) fields "" ^ " }" + "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" + | Top -> "top" | Dead -> "dead" module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -116,20 +118,17 @@ let expr_vars e = (* Returns a boolean array representing whether each variable either (1) appears in an effectful instruction; or (2) is returned or raised by a function. *) -let liveness nv prog pure_funs defs = +let liveness nv prog pure_funs = let live_vars = Array.make nv Dead in - let add_live v = + let add_top v = let idx = Var.idx v in - let fields = - List.fold_left - ~f:(fun acc def -> - match def with - | Expr (Field (_, i)) -> IntSet.add i acc - | _ -> acc) - ~init:IntSet.empty - defs.(idx) - in - live_vars.(idx) <- Live fields + live_vars.(idx) <- Top + in + let add_live v i = + let idx = Var.idx v in + match live_vars.(idx) with + | Live fields -> live_vars.(idx) <- Live (IntSet.add i fields) + | _ -> live_vars.(idx) <- Live (IntSet.singleton i) in let live_instruction i = match i with @@ -137,23 +136,24 @@ let liveness nv prog pure_funs defs = if not (pure_expr pure_funs e) then let vars = expr_vars e in - Var.ISet.iter add_live vars + Var.ISet.iter add_top vars | Assign (_, _) -> () - | Set_field (x, _, y) -> - add_live x; - add_live y + (* TODO: what to do with these? *) + | Set_field (x, i, y) -> + add_live x i; + add_top y | Array_set (x, y, z) -> - add_live x; - add_live y; - add_live z - | Offset_ref (x, _) -> add_live x + add_top x; + add_top y; + add_top z + | Offset_ref (x, i) -> add_live x i in let rec live_block block = List.iter ~f:(fun (i, _) -> live_instruction i) block.body; match fst block.branch with (* Base Cases *) | Stop -> () - | Return x | Raise (x, _) -> add_live x + | Return x | Raise (x, _) -> add_top x (* Recursive cases *) | Branch cont | Poptrap cont -> live_continuation prog cont; @@ -184,30 +184,50 @@ let variables deps = The first two conditions are determined by a traversal of the program and given by `live_vars`. The third is determined here by propagating liveness to a variable's dependencies. *) -(* We want to know which fields of x are used - Look at definition of y, if y is a field access, then set that field to be live in the block *) -let propagate deps live_vars live_table x = +(* Look at each dependency y of x. + - If x is Live fields, then x becomes Live (union_deps fields) + - If x is Top, then if union_deps is not empty (some y is Live fields) then x is Live (union_deps empty) + - If x is Dead, then if union_deps is empty and all dependencies are dead, x is dead. If a dep + is Top then x is Top. *) +let propagate deps defs live_vars live_table x = let idx = Var.idx x in let union_deps fields = Var.Set.fold (fun y acc -> match Var.Tbl.get live_table y with | Live y_fields -> IntSet.union acc y_fields - | Dead -> acc) + | Top | Dead -> + List.fold_left + ~f:(fun acc def -> + match def with + | Expr (Field (_, i)) -> IntSet.add i acc + | _ -> acc) + ~init:acc + defs.(Var.idx y)) deps.(idx) fields in + let is_top x = + match Var.Tbl.get live_table x with + | Top -> true + | _ -> false + in match live_vars.(idx) with | Live fields -> Live (union_deps fields) + | Top -> + let fields = union_deps IntSet.empty in + if IntSet.is_empty fields then Top else Live fields | Dead -> let fields = union_deps IntSet.empty in - if IntSet.is_empty fields then Dead else Live fields + if IntSet.is_empty fields + then if Var.Set.exists is_top deps.(idx) then Top else Dead + else Live fields -let solver vars deps live_vars = +let solver vars deps defs live_vars = let g = { G.domain = vars; G.iter_children = (fun f x -> Var.Set.iter f deps.(Var.idx x)) } in - Solver.f () (G.invert () g) (propagate deps live_vars) + Solver.f () (G.invert () g) (propagate deps defs live_vars) (* let live_instr st i = match i with @@ -235,13 +255,15 @@ let run p = Format.eprintf "}\n") deps; let pure_funs = Pure_fun.f p in - let live_vars = liveness nv p pure_funs defs in + let live_vars = liveness nv p pure_funs in (* Print out liveness info *) Format.eprintf "Liveness:\n"; Array.iteri ~f:(fun i l -> Format.eprintf "%d: %s\n" i (live_to_string l)) live_vars; let vars = variables deps in - let live_table = solver vars deps live_vars in + let live_table = solver vars deps defs live_vars in (* After dependency propagation *) Format.eprintf "Liveness with dependencies:\n"; - Var.Tbl.iter (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) live_table; + Var.Tbl.iter + (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) + live_table; { p with blocks }, Array.make nv 0 From e42a15b4a5cefb354b34822f98505c51cd8f9d87 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 4 Jul 2023 16:14:31 +0200 Subject: [PATCH 009/112] join propagation --- compiler/lib/deadcode_dgraph.ml | 77 +++++++++++++-------------------- 1 file changed, 30 insertions(+), 47 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 0aff42795b..b56af22f94 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -60,7 +60,16 @@ let definitions nv prog = | Let (x, e) -> add_def x (Expr e) | Assign (x, y) -> add_def x (Var y) | _ -> ()) - block.body) + block.body; + match fst block.branch with + | Return _ -> _ + | Raise (_, _) -> _ + | Stop -> _ + | Branch _ -> _ + | Cond (_, _, _) -> _ + | Switch (_, _, _) -> _ + | Pushtrap (_, _, _, _) -> _ + | Poptrap _ -> _) prog.blocks; defs @@ -184,44 +193,30 @@ let variables deps = The first two conditions are determined by a traversal of the program and given by `live_vars`. The third is determined here by propagating liveness to a variable's dependencies. *) -(* Look at each dependency y of x. - - If x is Live fields, then x becomes Live (union_deps fields) - - If x is Top, then if union_deps is not empty (some y is Live fields) then x is Live (union_deps empty) - - If x is Dead, then if union_deps is empty and all dependencies are dead, x is dead. If a dep - is Top then x is Top. *) +(* Look at all the places that x is used (deps.(Var.idx x)) + If that variable y is... + - Live or Top and it is a field access, add i to fields(x) + - Dead, then do nothing *) let propagate deps defs live_vars live_table x = let idx = Var.idx x in - let union_deps fields = - Var.Set.fold - (fun y acc -> - match Var.Tbl.get live_table y with - | Live y_fields -> IntSet.union acc y_fields - | Top | Dead -> - List.fold_left - ~f:(fun acc def -> - match def with - | Expr (Field (_, i)) -> IntSet.add i acc - | _ -> acc) - ~init:acc - defs.(Var.idx y)) - deps.(idx) - fields + let join l1 l2 = + match l1, l2 with + | _, Top | Top, _ -> Top + | Live f1, Live f2 -> Live (IntSet.union f1 f2) + | Dead, Live f | Live f, Dead -> Live f + | Dead, Dead -> Dead in - let is_top x = - match Var.Tbl.get live_table x with - | Top -> true - | _ -> false + let contribution y = + List.fold_left + ~f:(fun acc def -> + match def with + | Expr (Field (_, i)) -> join acc (Live (IntSet.singleton i)) + | Var z -> join acc (Var.Tbl.get live_table z) + | _ -> join acc Top) + ~init:Dead + defs.(Var.idx y) in - match live_vars.(idx) with - | Live fields -> Live (union_deps fields) - | Top -> - let fields = union_deps IntSet.empty in - if IntSet.is_empty fields then Top else Live fields - | Dead -> - let fields = union_deps IntSet.empty in - if IntSet.is_empty fields - then if Var.Set.exists is_top deps.(idx) then Top else Dead - else Live fields + Var.Set.fold (fun y live -> join (contribution y) live) deps.(idx) live_vars.(idx) let solver vars deps defs live_vars = let g = @@ -229,18 +224,6 @@ let solver vars deps defs live_vars = in Solver.f () (G.invert () g) (propagate deps defs live_vars) -(* let live_instr st i = - match i with - | Let (x, e) -> - (* variable has been marked as live or the expression is impure *) - Var.Tbl.get st.live x || not (pure_expr st.pure_funs e) - | Assign (x, _) -> - (* variable has been marked as live *) - Var.Tbl.get st.live x - | Set_field _ | Offset_ref _ | Array_set _ -> - (* these are impure so always live *) - true *) - let run p = let nv = Var.count () in let blocks = p.blocks in From a37fa061bebde4253ea8e7e21010fcff28270003 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 4 Jul 2023 16:15:05 +0200 Subject: [PATCH 010/112] remove old comments --- compiler/lib/deadcode_dgraph.ml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index b56af22f94..5661548cdf 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -186,17 +186,6 @@ let variables deps = Array.iteri ~f:(fun i _ -> Var.ISet.add vars (Var.of_idx i)) deps; vars -(* A variable x is live if either - (1) it appears in an effectful expression; - (2) it is returned or raised by a function; or - (3) there exists a live variable y that depends on x. - The first two conditions are determined by a traversal of the program and given by `live_vars`. - The third is determined here by propagating liveness to a variable's dependencies. *) - -(* Look at all the places that x is used (deps.(Var.idx x)) - If that variable y is... - - Live or Top and it is a field access, add i to fields(x) - - Dead, then do nothing *) let propagate deps defs live_vars live_table x = let idx = Var.idx x in let join l1 l2 = From 647d6953e9343f8650c666b09c93b61ca53e370d Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 4 Jul 2023 17:16:42 +0200 Subject: [PATCH 011/112] add block param defs --- compiler/lib/deadcode_dgraph.ml | 37 +++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 5661548cdf..3de9f0fa6d 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -52,8 +52,21 @@ let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e && Config.Flag.deadco let definitions nv prog = let defs = Array.make nv [] in let add_def x d = defs.(Var.idx x) <- d :: defs.(Var.idx x) in + let rec add_arg_def params args = + match params, args with + | x :: params, y :: args -> + add_def x (Var y); + add_arg_def params args + | _ -> () + in + let add_cont_defs (pc, args) = + match try Some (Addr.Map.find pc prog.blocks) with Not_found -> None with + | Some block -> add_arg_def block.params args + | None -> () (* Dead continuation *) + in Addr.Map.iter (fun _ block -> + (* Add definitions from block body *) List.iter ~f:(fun (i, _) -> match i with @@ -61,15 +74,20 @@ let definitions nv prog = | Assign (x, y) -> add_def x (Var y) | _ -> ()) block.body; + (* Add definitions for block parameters *) match fst block.branch with - | Return _ -> _ - | Raise (_, _) -> _ - | Stop -> _ - | Branch _ -> _ - | Cond (_, _, _) -> _ - | Switch (_, _, _) -> _ - | Pushtrap (_, _, _, _) -> _ - | Poptrap _ -> _) + | Return _ | Raise _ | Stop -> () + | Branch cont -> add_cont_defs cont + | Cond (_, cont1, cont2) -> + add_cont_defs cont1; + add_cont_defs cont2 + | Switch (_, a1, a2) -> + Array.iter ~f:add_cont_defs a1; + Array.iter ~f:add_cont_defs a2 + | Pushtrap (cont, _, cont_h, _) -> + add_cont_defs cont; + add_cont_defs cont_h + | Poptrap cont -> add_cont_defs cont) prog.blocks; defs @@ -124,9 +142,6 @@ let expr_vars e = args); vars -(* Returns a boolean array representing whether each variable either - (1) appears in an effectful instruction; or - (2) is returned or raised by a function. *) let liveness nv prog pure_funs = let live_vars = Array.make nv Dead in let add_top v = From ccc5dd59334fbc65a64d229ec9fca960394c7f04 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 5 Jul 2023 15:41:53 +0200 Subject: [PATCH 012/112] fix equality, dep contribution --- compiler/lib/deadcode_dgraph.ml | 59 +++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 3de9f0fa6d..ab6aa6d2bc 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -24,8 +24,8 @@ type def = | Var of Var.t type live = - | Live of IntSet.t | Top + | Live of IntSet.t | Dead let live_to_string = function @@ -39,9 +39,20 @@ module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) module Domain = struct type t = live - let equal = Poly.( = ) + let equal l1 l2 = + match l1, l2 with + | Top, Top | Dead, Dead -> true + | Live l1, Live l2 -> IntSet.equal l1 l2 + | _ -> false let bot = Dead + + let join l1 l2 = + match l1, l2 with + | _, Top | Top, _ -> Top + | Live f1, Live f2 -> Live (IntSet.union f1 f2) + | Dead, Live f | Live f, Dead -> Live f + | Dead, Dead -> Dead end module Solver = G.Solver (Domain) @@ -49,15 +60,13 @@ module Solver = G.Solver (Domain) let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e && Config.Flag.deadcode () (* Returns an array of definitions of each variable *) +(* TODO: Change this to return def array instead of def list array *) let definitions nv prog = let defs = Array.make nv [] in let add_def x d = defs.(Var.idx x) <- d :: defs.(Var.idx x) in - let rec add_arg_def params args = - match params, args with - | x :: params, y :: args -> - add_def x (Var y); - add_arg_def params args - | _ -> () + let add_arg_def params args = + try List.iter2 ~f:(fun x y -> add_def x (Var y)) params args + with Invalid_argument _ -> () in let add_cont_defs (pc, args) = match try Some (Addr.Map.find pc prog.blocks) with Not_found -> None with @@ -203,24 +212,20 @@ let variables deps = let propagate deps defs live_vars live_table x = let idx = Var.idx x in - let join l1 l2 = - match l1, l2 with - | _, Top | Top, _ -> Top - | Live f1, Live f2 -> Live (IntSet.union f1 f2) - | Dead, Live f | Live f, Dead -> Live f - | Dead, Dead -> Dead - in let contribution y = List.fold_left ~f:(fun acc def -> match def with - | Expr (Field (_, i)) -> join acc (Live (IntSet.singleton i)) - | Var z -> join acc (Var.Tbl.get live_table z) - | _ -> join acc Top) + | Expr (Field (_, i)) -> Domain.join acc (Live (IntSet.singleton i)) + | Var _ -> Domain.join acc (Var.Tbl.get live_table y) + | _ -> Top) ~init:Dead defs.(Var.idx y) in - Var.Set.fold (fun y live -> join (contribution y) live) deps.(idx) live_vars.(idx) + Var.Set.fold + (fun y live -> Domain.join (contribution y) live) + deps.(idx) + live_vars.(idx) let solver vars deps defs live_vars = let g = @@ -232,12 +237,24 @@ let run p = let nv = Var.count () in let blocks = p.blocks in let defs = definitions nv p in + (* Print out definitions *) + Format.eprintf "Definitions:\n"; + Array.iteri + ~f:(fun i defs -> + Format.eprintf "v%d: { " i; + List.iter + ~f:(function + | Expr e -> Format.eprintf "%a " Print.expr e + | Var y -> Format.eprintf "%a " Var.print y) + defs; + Format.eprintf "}\n") + defs; let deps = dependencies nv defs in (* Print out dependency info *) Format.eprintf "Dependencies:\n"; Array.iteri ~f:(fun i ds -> - Format.eprintf "%d: { " i; + Format.eprintf "v%d: { " i; Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; Format.eprintf "}\n") deps; @@ -245,7 +262,7 @@ let run p = let live_vars = liveness nv p pure_funs in (* Print out liveness info *) Format.eprintf "Liveness:\n"; - Array.iteri ~f:(fun i l -> Format.eprintf "%d: %s\n" i (live_to_string l)) live_vars; + Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars; let vars = variables deps in let live_table = solver vars deps defs live_vars in (* After dependency propagation *) From cacad1d76df24fcc2abb55fe689ae6e218d4bfe3 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 5 Jul 2023 16:37:13 +0200 Subject: [PATCH 013/112] move some logic from defs to deps --- compiler/lib/deadcode_dgraph.ml | 156 ++++++++++++++++---------------- 1 file changed, 76 insertions(+), 80 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index ab6aa6d2bc..0eb8c068b4 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -21,7 +21,7 @@ open Stdlib type def = | Expr of expr - | Var of Var.t + | Param type live = | Top @@ -59,77 +59,76 @@ module Solver = G.Solver (Domain) let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e && Config.Flag.deadcode () -(* Returns an array of definitions of each variable *) -(* TODO: Change this to return def array instead of def list array *) let definitions nv prog = - let defs = Array.make nv [] in - let add_def x d = defs.(Var.idx x) <- d :: defs.(Var.idx x) in - let add_arg_def params args = - try List.iter2 ~f:(fun x y -> add_def x (Var y)) params args - with Invalid_argument _ -> () + let defs = Array.make nv Param in + let set_def x d = defs.(Var.idx x) <- d in + Addr.Map.iter + (fun _ block -> + (* Add defs/deps from block body *) + List.iter + ~f:(fun (i, _) -> + match i with + | Let (x, e) -> set_def x (Expr e) + | Assign (x, _) -> set_def x Param + | _ -> ()) + block.body) + prog.blocks; + defs + +let usages nv prog = + let uses = Array.make nv Var.Set.empty in + let add_use x y = uses.(Var.idx y) <- Var.Set.add x uses.(Var.idx y) in + let add_arg_dep params args = + try List.iter2 ~f:(fun x y -> add_use x y) params args with Invalid_argument _ -> () in - let add_cont_defs (pc, args) = + let add_cont_deps (pc, args) = match try Some (Addr.Map.find pc prog.blocks) with Not_found -> None with - | Some block -> add_arg_def block.params args + | Some block -> add_arg_dep block.params args | None -> () (* Dead continuation *) in + let add_expr_uses x e = + match e with + | Apply { f; args; _ } -> + add_use x f; + List.iter ~f:(add_use x) args + | Block (_, params, _) -> Array.iter ~f:(add_use x) params + | Field (z, _) -> add_use x z + | Constant _ -> () + | Closure (params, _) -> List.iter ~f:(add_use x) params + | Prim (_, args) -> + List.iter + ~f:(fun arg -> + match arg with + | Pv v -> add_use x v + | Pc _ -> ()) + args + in Addr.Map.iter (fun _ block -> - (* Add definitions from block body *) + (* Add deps from block body *) List.iter ~f:(fun (i, _) -> match i with - | Let (x, e) -> add_def x (Expr e) - | Assign (x, y) -> add_def x (Var y) + | Let (x, e) -> add_expr_uses x e + | Assign (x, y) -> add_use x y | _ -> ()) block.body; - (* Add definitions for block parameters *) + (* Add deps from block branch *) match fst block.branch with | Return _ | Raise _ | Stop -> () - | Branch cont -> add_cont_defs cont + | Branch cont -> add_cont_deps cont | Cond (_, cont1, cont2) -> - add_cont_defs cont1; - add_cont_defs cont2 + add_cont_deps cont1; + add_cont_deps cont2 | Switch (_, a1, a2) -> - Array.iter ~f:add_cont_defs a1; - Array.iter ~f:add_cont_defs a2 + Array.iter ~f:add_cont_deps a1; + Array.iter ~f:add_cont_deps a2 | Pushtrap (cont, _, cont_h, _) -> - add_cont_defs cont; - add_cont_defs cont_h - | Poptrap cont -> add_cont_defs cont) + add_cont_deps cont; + add_cont_deps cont_h + | Poptrap cont -> add_cont_deps cont) prog.blocks; - defs - -(* Returns the adjacency list for the variable dependency graph. *) -let dependencies nv defs = - let deps = Array.make nv Var.Set.empty in - let add_dep i x = deps.(Var.idx x) <- Var.Set.add (Var.of_idx i) deps.(Var.idx x) in - Array.iteri (* For each set of definitions *) - ~f:(fun i ds -> - List.iter (* For each definition *) - ~f:(fun d -> - match d with - (* Add dependencies from definition *) - | Expr e -> ( - match e with - | Apply { f; args; _ } -> - add_dep i f; - List.iter ~f:(add_dep i) args - | Block (_, params, _) -> Array.iter ~f:(add_dep i) params - | Field (z, _) -> add_dep i z - | Constant _ -> () - | Closure (params, _) -> List.iter ~f:(add_dep i) params - | Prim (_, args) -> - List.iter - ~f:(fun arg -> - match arg with - | Pv v -> add_dep i v - | Pc _ -> ()) - args) - | Var y -> add_dep i y) - ds) - defs; - deps + uses (* Return the set of variables used in a given expression *) let expr_vars e = @@ -210,28 +209,27 @@ let variables deps = Array.iteri ~f:(fun i _ -> Var.ISet.add vars (Var.of_idx i)) deps; vars -let propagate deps defs live_vars live_table x = +let propagate uses defs live_vars live_table x = let idx = Var.idx x in let contribution y = - List.fold_left - ~f:(fun acc def -> - match def with - | Expr (Field (_, i)) -> Domain.join acc (Live (IntSet.singleton i)) - | Var _ -> Domain.join acc (Var.Tbl.get live_table y) + match Var.Tbl.get live_table y with + | Dead -> Dead + | _ -> ( + match defs.(Var.idx y) with + | Expr (Field (_, i)) -> Live (IntSet.singleton i) + | Param -> Var.Tbl.get live_table y | _ -> Top) - ~init:Dead - defs.(Var.idx y) in Var.Set.fold (fun y live -> Domain.join (contribution y) live) - deps.(idx) + uses.(idx) live_vars.(idx) -let solver vars deps defs live_vars = +let solver vars uses defs live_vars = let g = - { G.domain = vars; G.iter_children = (fun f x -> Var.Set.iter f deps.(Var.idx x)) } + { G.domain = vars; G.iter_children = (fun f x -> Var.Set.iter f uses.(Var.idx x)) } in - Solver.f () (G.invert () g) (propagate deps defs live_vars) + Solver.f () (G.invert () g) (propagate uses defs live_vars) let run p = let nv = Var.count () in @@ -240,31 +238,29 @@ let run p = (* Print out definitions *) Format.eprintf "Definitions:\n"; Array.iteri - ~f:(fun i defs -> - Format.eprintf "v%d: { " i; - List.iter - ~f:(function - | Expr e -> Format.eprintf "%a " Print.expr e - | Var y -> Format.eprintf "%a " Var.print y) - defs; - Format.eprintf "}\n") + ~f:(fun i def -> + Format.eprintf "v%d: " i; + (match def with + | Expr e -> Format.eprintf "%a " Print.expr e + | Param -> Format.eprintf "param"); + Format.eprintf "\n") defs; - let deps = dependencies nv defs in - (* Print out dependency info *) - Format.eprintf "Dependencies:\n"; + (* Print out usage info *) + let uses = usages nv p in + Format.eprintf "Usages:\n"; Array.iteri ~f:(fun i ds -> Format.eprintf "v%d: { " i; Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; Format.eprintf "}\n") - deps; + uses; let pure_funs = Pure_fun.f p in let live_vars = liveness nv p pure_funs in (* Print out liveness info *) Format.eprintf "Liveness:\n"; Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars; - let vars = variables deps in - let live_table = solver vars deps defs live_vars in + let vars = variables uses in + let live_table = solver vars uses defs live_vars in (* After dependency propagation *) Format.eprintf "Liveness with dependencies:\n"; Var.Tbl.iter From 3b7e81138761699b232c959a259490e73b4d69a5 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 6 Jul 2023 12:41:11 +0200 Subject: [PATCH 014/112] clean up small bugs --- compiler/lib/deadcode_dgraph.ml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 0eb8c068b4..68d5e0b2fd 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -64,7 +64,7 @@ let definitions nv prog = let set_def x d = defs.(Var.idx x) <- d in Addr.Map.iter (fun _ block -> - (* Add defs/deps from block body *) + (* Add defs from block body *) List.iter ~f:(fun (i, _) -> match i with @@ -111,7 +111,8 @@ let usages nv prog = match i with | Let (x, e) -> add_expr_uses x e | Assign (x, y) -> add_use x y - | _ -> ()) + (* TODO: These? *) + | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> ()) block.body; (* Add deps from block branch *) match fst block.branch with @@ -164,11 +165,12 @@ let liveness nv prog pure_funs = in let live_instruction i = match i with - | Let (_, e) -> + | Let (x, e) -> if not (pure_expr pure_funs e) - then + then ( let vars = expr_vars e in - Var.ISet.iter add_top vars + Var.ISet.iter add_top vars; + add_top x) | Assign (_, _) -> () (* TODO: what to do with these? *) | Set_field (x, i, y) -> @@ -213,8 +215,9 @@ let propagate uses defs live_vars live_table x = let idx = Var.idx x in let contribution y = match Var.Tbl.get live_table y with - | Dead -> Dead + | Dead -> Dead (* If x is used in y, and y is dead, then x is dead. *) | _ -> ( + (* Otherwise we may be able to refine y's liveness. *) match defs.(Var.idx y) with | Expr (Field (_, i)) -> Live (IntSet.singleton i) | Param -> Var.Tbl.get live_table y From 85ed6aed7026a2b8fa01e2f182ae7470d87bdb2c Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 6 Jul 2023 14:33:01 +0200 Subject: [PATCH 015/112] don't count closure params as used --- compiler/lib/deadcode_dgraph.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 68d5e0b2fd..33f7f0a3b9 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -94,7 +94,7 @@ let usages nv prog = | Block (_, params, _) -> Array.iter ~f:(add_use x) params | Field (z, _) -> add_use x z | Constant _ -> () - | Closure (params, _) -> List.iter ~f:(add_use x) params + | Closure (_, cont) -> add_cont_deps cont | Prim (_, args) -> List.iter ~f:(fun arg -> From eb7c895ed959efec6c10ff903087026b49b97919 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 7 Jul 2023 14:56:35 +0200 Subject: [PATCH 016/112] add initial elimination alg --- compiler/lib/deadcode_dgraph.ml | 134 +++++++++++++++++++++++++------- 1 file changed, 104 insertions(+), 30 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 33f7f0a3b9..35014e3543 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -42,7 +42,7 @@ module Domain = struct let equal l1 l2 = match l1, l2 with | Top, Top | Dead, Dead -> true - | Live l1, Live l2 -> IntSet.equal l1 l2 + | Live f1, Live f2 -> IntSet.equal f1 f2 | _ -> false let bot = Dead @@ -216,7 +216,7 @@ let propagate uses defs live_vars live_table x = let contribution y = match Var.Tbl.get live_table y with | Dead -> Dead (* If x is used in y, and y is dead, then x is dead. *) - | _ -> ( + | Top | Live _ -> ( (* Otherwise we may be able to refine y's liveness. *) match defs.(Var.idx y) with | Expr (Field (_, i)) -> Live (IntSet.singleton i) @@ -234,39 +234,113 @@ let solver vars uses defs live_vars = in Solver.f () (G.invert () g) (propagate uses defs live_vars) -let run p = +let eliminate (prog : program) (live_table : live Var.Tbl.t) : program = + let is_live v = + match Var.Tbl.get live_table v with + | Dead -> false + | _ -> true + in + let eliminate_cont ((pc, params) : cont) = + let params = List.filter ~f:is_live params in + pc, params + in + let update_block block = + let params = List.filter ~f:is_live block.params in + (* Analyze block instructions *) + let body = + List.filter_map + ~f:(fun (instr, loc) -> + match instr with + | Let (x, e) -> ( + match Var.Tbl.get live_table x with + | Top -> Some (instr, loc) + | Live fields -> ( + match e with + (* Eliminate unused fields from block *) + | Block (start, vars, is_array) -> + let used_vars = + Array.to_list vars + |> List.filteri ~f:(fun i _ -> IntSet.mem i fields) + |> Array.of_list + in + let e = Block (start, used_vars, is_array) in + Some (Let (x, e), loc) + (* This should never happen *) + | _ -> Some (instr, loc)) + | Dead -> None) + (* TODO: These? *) + | Assign (_, _) | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) + -> Some (instr, loc)) + block.body + in + (* Analyze branch *) + let branch = + let last, loc = block.branch in + let last = + match last with + | Return _ | Raise (_, _) | Stop -> last + | Branch cont -> Branch (eliminate_cont cont) + | Cond (x, cont1, cont2) -> Cond (x, eliminate_cont cont1, eliminate_cont cont2) + | Switch (x, a1, a2) -> + Switch (x, Array.map ~f:eliminate_cont a1, Array.map ~f:eliminate_cont a2) + | Pushtrap (cont1, x, cont2, pcs) -> + Pushtrap (eliminate_cont cont1, x, eliminate_cont cont2, pcs) + | Poptrap cont -> Poptrap (eliminate_cont cont) + in + last, loc + in + { params; body; branch } + in + let blocks = Addr.Map.map update_block prog.blocks in + { prog with blocks } + +module Debug = struct + let print_defs defs = + Format.eprintf "Definitions:\n"; + Array.iteri + ~f:(fun i def -> + Format.eprintf "v%d: " i; + (match def with + | Expr e -> Format.eprintf "%a " Print.expr e + | Param -> Format.eprintf "param"); + Format.eprintf "\n") + defs + + let print_uses uses = + Format.eprintf "Usages:\n"; + Array.iteri + ~f:(fun i ds -> + Format.eprintf "v%d: { " i; + Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; + Format.eprintf "}\n") + uses + + let print_liveness live_vars = + Format.eprintf "Liveness:\n"; + Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars + + let print_live_tbl live_table = + Format.eprintf "Liveness with dependencies:\n"; + Var.Tbl.iter + (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) + live_table +end + +let f p = let nv = Var.count () in - let blocks = p.blocks in + (* Compute definitions *) let defs = definitions nv p in - (* Print out definitions *) - Format.eprintf "Definitions:\n"; - Array.iteri - ~f:(fun i def -> - Format.eprintf "v%d: " i; - (match def with - | Expr e -> Format.eprintf "%a " Print.expr e - | Param -> Format.eprintf "param"); - Format.eprintf "\n") - defs; - (* Print out usage info *) + Debug.print_defs defs; + (* Compute usages *) let uses = usages nv p in - Format.eprintf "Usages:\n"; - Array.iteri - ~f:(fun i ds -> - Format.eprintf "v%d: { " i; - Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; - Format.eprintf "}\n") - uses; + Debug.print_uses uses; + (* Compute initial liveness *) let pure_funs = Pure_fun.f p in let live_vars = liveness nv p pure_funs in - (* Print out liveness info *) - Format.eprintf "Liveness:\n"; - Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars; + Debug.print_liveness live_vars; + (* Propagate liveness to dependencies *) let vars = variables uses in let live_table = solver vars uses defs live_vars in + Debug.print_live_tbl live_table; (* After dependency propagation *) - Format.eprintf "Liveness with dependencies:\n"; - Var.Tbl.iter - (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) - live_table; - { p with blocks }, Array.make nv 0 + eliminate p live_table From 20ca40da7a8794d130986b1729ccbb67a5b54089 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 7 Jul 2023 17:07:16 +0200 Subject: [PATCH 017/112] rearranging --- compiler/lib/deadcode_dgraph.ml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 35014e3543..1e1490d888 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -28,12 +28,6 @@ type live = | Live of IntSet.t | Dead -let live_to_string = function - | Live fields -> - "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" - | Top -> "top" - | Dead -> "dead" - module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) module Domain = struct @@ -293,8 +287,15 @@ let eliminate (prog : program) (live_table : live Var.Tbl.t) : program = in let blocks = Addr.Map.map update_block prog.blocks in { prog with blocks } + +(* +module Print = struct + let live_to_string = function + | Live fields -> + "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" + | Top -> "top" + | Dead -> "dead" -module Debug = struct let print_defs defs = Format.eprintf "Definitions:\n"; Array.iteri @@ -325,22 +326,22 @@ module Debug = struct (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) live_table end - + *) let f p = let nv = Var.count () in (* Compute definitions *) let defs = definitions nv p in - Debug.print_defs defs; (* Compute usages *) let uses = usages nv p in - Debug.print_uses uses; (* Compute initial liveness *) let pure_funs = Pure_fun.f p in let live_vars = liveness nv p pure_funs in - Debug.print_liveness live_vars; (* Propagate liveness to dependencies *) let vars = variables uses in let live_table = solver vars uses defs live_vars in - Debug.print_live_tbl live_table; + (* Print.print_defs defs; + Print.print_uses uses; + Print.print_liveness live_vars; + Print.print_live_tbl live_table; *) (* After dependency propagation *) eliminate p live_table From 49d5f9a1b117af7af98d96f4b8d93d75f4da8b25 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 10 Jul 2023 10:52:14 +0200 Subject: [PATCH 018/112] update deadcode sig --- compiler/lib/deadcode_dgraph.mli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/deadcode_dgraph.mli b/compiler/lib/deadcode_dgraph.mli index 1a356d6543..951ebf8a52 100644 --- a/compiler/lib/deadcode_dgraph.mli +++ b/compiler/lib/deadcode_dgraph.mli @@ -16,4 +16,4 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -val run : Code.program -> Code.program * (int array) \ No newline at end of file +val f : Code.program -> Code.program \ No newline at end of file From bfd58d5491a0f1274c213ee2718e40e22c1e3564 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 10 Jul 2023 10:52:33 +0200 Subject: [PATCH 019/112] expose expr print --- compiler/lib/code.mli | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/lib/code.mli b/compiler/lib/code.mli index 4f72ee7e68..f0f5c40ccd 100644 --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli @@ -222,6 +222,8 @@ module Print : sig | Instr of (instr * loc) | Last of (last * loc) + val expr : Format.formatter -> expr -> unit + val var_list : Format.formatter -> Var.t list -> unit val instr : Format.formatter -> instr * loc -> unit From b3db3dde956d0c31c73c0f839e16043bb251ce6e Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 10 Jul 2023 14:21:13 +0200 Subject: [PATCH 020/112] fix filter args and closure cont --- compiler/lib/deadcode_dgraph.ml | 105 ++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 46 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 1e1490d888..8efde0ba7d 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -228,15 +228,22 @@ let solver vars uses defs live_vars = in Solver.f () (G.invert () g) (propagate uses defs live_vars) -let eliminate (prog : program) (live_table : live Var.Tbl.t) : program = +let eliminate prog live_table = let is_live v = match Var.Tbl.get live_table v with | Dead -> false | _ -> true in - let eliminate_cont ((pc, params) : cont) = - let params = List.filter ~f:is_live params in - pc, params + let rec filter_args pl al = + match pl, al with + | x :: pl, y :: al -> if is_live x then y :: filter_args pl al else filter_args pl al + | [], _ -> [] + | _ -> assert false + in + let eliminate_cont ((pc, args) : cont) = + let block = Addr.Map.find pc prog.blocks in + let args = filter_args block.params args in + pc, args in let update_block block = let params = List.filter ~f:is_live block.params in @@ -247,24 +254,30 @@ let eliminate (prog : program) (live_table : live Var.Tbl.t) : program = match instr with | Let (x, e) -> ( match Var.Tbl.get live_table x with - | Top -> Some (instr, loc) + | Top -> ( + match e with + | Closure (l, cont) -> + let e = Closure (l, eliminate_cont cont) in + Some (Let (x, e), loc) + | _ -> Some (instr, loc)) | Live fields -> ( match e with (* Eliminate unused fields from block *) | Block (start, vars, is_array) -> - let used_vars = + let _used_vars = Array.to_list vars |> List.filteri ~f:(fun i _ -> IntSet.mem i fields) |> Array.of_list in - let e = Block (start, used_vars, is_array) in + let e = Block (start, vars, is_array) in Some (Let (x, e), loc) (* This should never happen *) | _ -> Some (instr, loc)) | Dead -> None) - (* TODO: These? *) - | Assign (_, _) | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) - -> Some (instr, loc)) + (* TODO: need to filter closure cont for assign too *) + | Assign (x, _) -> if is_live x then Some (instr, loc) else None + | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> + Some (instr, loc)) block.body in (* Analyze branch *) @@ -287,46 +300,46 @@ let eliminate (prog : program) (live_table : live Var.Tbl.t) : program = in let blocks = Addr.Map.map update_block prog.blocks in { prog with blocks } - -(* -module Print = struct - let live_to_string = function - | Live fields -> - "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" - | Top -> "top" - | Dead -> "dead" - let print_defs defs = - Format.eprintf "Definitions:\n"; - Array.iteri - ~f:(fun i def -> - Format.eprintf "v%d: " i; - (match def with - | Expr e -> Format.eprintf "%a " Print.expr e - | Param -> Format.eprintf "param"); - Format.eprintf "\n") - defs +(* + module Print = struct + let live_to_string = function + | Live fields -> + "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" + | Top -> "top" + | Dead -> "dead" - let print_uses uses = - Format.eprintf "Usages:\n"; - Array.iteri - ~f:(fun i ds -> - Format.eprintf "v%d: { " i; - Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; - Format.eprintf "}\n") - uses + let print_defs defs = + Format.eprintf "Definitions:\n"; + Array.iteri + ~f:(fun i def -> + Format.eprintf "v%d: " i; + (match def with + | Expr e -> Format.eprintf "%a " Print.expr e + | Param -> Format.eprintf "param"); + Format.eprintf "\n") + defs - let print_liveness live_vars = - Format.eprintf "Liveness:\n"; - Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars + let print_uses uses = + Format.eprintf "Usages:\n"; + Array.iteri + ~f:(fun i ds -> + Format.eprintf "v%d: { " i; + Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; + Format.eprintf "}\n") + uses - let print_live_tbl live_table = - Format.eprintf "Liveness with dependencies:\n"; - Var.Tbl.iter - (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) - live_table -end - *) + let print_liveness live_vars = + Format.eprintf "Liveness:\n"; + Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars + + let print_live_tbl live_table = + Format.eprintf "Liveness with dependencies:\n"; + Var.Tbl.iter + (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) + live_table + end +*) let f p = let nv = Var.count () in (* Compute definitions *) From 3a97925d11dd1fe27c16857dae90ecec44b5304a Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 10 Jul 2023 16:12:08 +0200 Subject: [PATCH 021/112] fix bug with cond --- compiler/lib/deadcode_dgraph.ml | 92 +++++++++++++++++---------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 8efde0ba7d..5038a6d149 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -186,10 +186,12 @@ let liveness nv prog pure_funs = | Branch cont | Poptrap cont -> live_continuation prog cont; live_continuation prog cont - | Cond (_, cont1, cont2) | Pushtrap (cont1, _, cont2, _) -> + | Cond (x, cont1, cont2) | Pushtrap (cont1, x, cont2, _) -> + add_top x; live_continuation prog cont1; live_continuation prog cont2 - | Switch (_, a1, a2) -> + | Switch (x, a1, a2) -> + add_top x; Array.iter ~f:(fun cont -> live_continuation prog cont) a1; Array.iter ~f:(fun cont -> live_continuation prog cont) a2 and live_continuation prog ((pc, _) : cont) = @@ -264,12 +266,12 @@ let eliminate prog live_table = match e with (* Eliminate unused fields from block *) | Block (start, vars, is_array) -> - let _used_vars = + let used_vars = Array.to_list vars |> List.filteri ~f:(fun i _ -> IntSet.mem i fields) |> Array.of_list in - let e = Block (start, vars, is_array) in + let e = Block (start, used_vars, is_array) in Some (Let (x, e), loc) (* This should never happen *) | _ -> Some (instr, loc)) @@ -301,45 +303,44 @@ let eliminate prog live_table = let blocks = Addr.Map.map update_block prog.blocks in { prog with blocks } -(* - module Print = struct - let live_to_string = function - | Live fields -> - "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" - | Top -> "top" - | Dead -> "dead" +module Print = struct + let live_to_string = function + | Live fields -> + "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" + | Top -> "top" + | Dead -> "dead" - let print_defs defs = - Format.eprintf "Definitions:\n"; - Array.iteri - ~f:(fun i def -> - Format.eprintf "v%d: " i; - (match def with - | Expr e -> Format.eprintf "%a " Print.expr e - | Param -> Format.eprintf "param"); - Format.eprintf "\n") - defs + let _print_defs defs = + Format.eprintf "Definitions:\n"; + Array.iteri + ~f:(fun i def -> + Format.eprintf "v%d: " i; + (match def with + | Expr e -> Format.eprintf "%a " Print.expr e + | Param -> Format.eprintf "param"); + Format.eprintf "\n") + defs - let print_uses uses = - Format.eprintf "Usages:\n"; - Array.iteri - ~f:(fun i ds -> - Format.eprintf "v%d: { " i; - Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; - Format.eprintf "}\n") - uses + let print_uses uses = + Format.eprintf "Usages:\n"; + Array.iteri + ~f:(fun i ds -> + Format.eprintf "v%d: { " i; + Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; + Format.eprintf "}\n") + uses - let print_liveness live_vars = - Format.eprintf "Liveness:\n"; - Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars + let print_liveness live_vars = + Format.eprintf "Liveness:\n"; + Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars + + let print_live_tbl live_table = + Format.eprintf "Liveness with dependencies:\n"; + Var.Tbl.iter + (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) + live_table +end - let print_live_tbl live_table = - Format.eprintf "Liveness with dependencies:\n"; - Var.Tbl.iter - (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) - live_table - end -*) let f p = let nv = Var.count () in (* Compute definitions *) @@ -352,9 +353,12 @@ let f p = (* Propagate liveness to dependencies *) let vars = variables uses in let live_table = solver vars uses defs live_vars in - (* Print.print_defs defs; - Print.print_uses uses; - Print.print_liveness live_vars; - Print.print_live_tbl live_table; *) + (* Print.print_defs defs; *) + Print.print_uses uses; + Print.print_liveness live_vars; + Print.print_live_tbl live_table; (* After dependency propagation *) - eliminate p live_table + let p = eliminate p live_table in + Format.eprintf "After Elimination:\n"; + Code.Print.program (fun _ _ -> "") p; + p From 4e8097a42070d68b7e8321c6d9ad972a3d277f34 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 11 Jul 2023 11:04:31 +0200 Subject: [PATCH 022/112] add sentinal var --- compiler/lib/deadcode_dgraph.ml | 72 ++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 5038a6d149..f7759f2ce1 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -231,6 +231,18 @@ let solver vars uses defs live_vars = Solver.f () (G.invert () g) (propagate uses defs live_vars) let eliminate prog live_table = + let sentinal = Var.fresh () in + let add_sentinal_instr blocks = + Addr.Map.update + 0 + (fun b -> + match b with + | None -> assert false (* Unreachable *) + | Some block -> + let body = (Let (sentinal, Constant (Int 0l)), Before 0) :: block.body in + Some { block with body }) + blocks + in let is_live v = match Var.Tbl.get live_table v with | Dead -> false @@ -247,39 +259,43 @@ let eliminate prog live_table = let args = filter_args block.params args in pc, args in + let eliminate_closure instr = + match instr with + | Let (x, Closure (args, cont)) -> Let (x, Closure (args, eliminate_cont cont)) + | _ -> instr + in + let eliminate_instr instr = + match instr with + | Let (x, e) -> ( + match Var.Tbl.get live_table x with + | Top -> Some instr + | Live fields -> ( + match e with + (* Eliminate unused fields from block *) + | Block (start, vars, is_array) -> + let vars = + Array.mapi + ~f:(fun i v -> if IntSet.mem i fields then v else sentinal) + vars + in + let e = Block (start, vars, is_array) in + Some (Let (x, e)) + (* This should never happen *) + | _ -> None) + | Dead -> None) + | Assign (x, _) -> if is_live x then Some instr else None + | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> Some instr + in let update_block block = + (* Filter dead params *) let params = List.filter ~f:is_live block.params in (* Analyze block instructions *) let body = List.filter_map ~f:(fun (instr, loc) -> - match instr with - | Let (x, e) -> ( - match Var.Tbl.get live_table x with - | Top -> ( - match e with - | Closure (l, cont) -> - let e = Closure (l, eliminate_cont cont) in - Some (Let (x, e), loc) - | _ -> Some (instr, loc)) - | Live fields -> ( - match e with - (* Eliminate unused fields from block *) - | Block (start, vars, is_array) -> - let used_vars = - Array.to_list vars - |> List.filteri ~f:(fun i _ -> IntSet.mem i fields) - |> Array.of_list - in - let e = Block (start, used_vars, is_array) in - Some (Let (x, e), loc) - (* This should never happen *) - | _ -> Some (instr, loc)) - | Dead -> None) - (* TODO: need to filter closure cont for assign too *) - | Assign (x, _) -> if is_live x then Some (instr, loc) else None - | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> - Some (instr, loc)) + Option.map + ~f:(fun instr -> eliminate_closure instr, loc) + (eliminate_instr instr)) block.body in (* Analyze branch *) @@ -300,7 +316,7 @@ let eliminate prog live_table = in { params; body; branch } in - let blocks = Addr.Map.map update_block prog.blocks in + let blocks = prog.blocks |> Addr.Map.map update_block |> add_sentinal_instr in { prog with blocks } module Print = struct From c940f38b1bb8ddc792972b82f5e1f0b9e67399d8 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 11 Jul 2023 11:55:54 +0200 Subject: [PATCH 023/112] add basic compaction block pass --- compiler/lib/deadcode_dgraph.ml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index f7759f2ce1..db33167bda 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -235,14 +235,22 @@ let eliminate prog live_table = let add_sentinal_instr blocks = Addr.Map.update 0 - (fun b -> - match b with - | None -> assert false (* Unreachable *) + (function | Some block -> let body = (Let (sentinal, Constant (Int 0l)), Before 0) :: block.body in - Some { block with body }) + Some { block with body } + | None -> assert false (* Unreachable *)) blocks in + let compact_vars vars = + let i = ref (Array.length vars - 1) in + while !i >= 0 && Var.equal vars.(!i) sentinal do + i := !i - 1 + done; + let compacted = Array.make (!i + 1) sentinal in + Array.blit ~src:vars ~src_pos:0 ~dst:compacted ~dst_pos:0 ~len:(!i + 1); + compacted + in let is_live v = match Var.Tbl.get live_table v with | Dead -> false @@ -277,6 +285,7 @@ let eliminate prog live_table = Array.mapi ~f:(fun i v -> if IntSet.mem i fields then v else sentinal) vars + |> compact_vars in let e = Block (start, vars, is_array) in Some (Let (x, e)) From a61e0b2c929bbaa21e1f254b70dabb9d3c18204f Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 11 Jul 2023 13:30:02 +0200 Subject: [PATCH 024/112] fix pushtrap variable --- compiler/lib/deadcode_dgraph.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index db33167bda..a4ff834c5c 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -186,7 +186,10 @@ let liveness nv prog pure_funs = | Branch cont | Poptrap cont -> live_continuation prog cont; live_continuation prog cont - | Cond (x, cont1, cont2) | Pushtrap (cont1, x, cont2, _) -> + | Pushtrap (cont1, _, cont2, _) -> + live_continuation prog cont1; + live_continuation prog cont2 + | Cond (x, cont1, cont2) -> add_top x; live_continuation prog cont1; live_continuation prog cont2 From 12fdc47e203325d91338b523d187c8e9aea6e660 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 12 Jul 2023 16:40:34 +0200 Subject: [PATCH 025/112] expose print constant --- compiler/lib/code.mli | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/lib/code.mli b/compiler/lib/code.mli index f0f5c40ccd..8b95a1b874 100644 --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli @@ -224,6 +224,8 @@ module Print : sig val expr : Format.formatter -> expr -> unit + val constant : Format.formatter -> constant -> unit + val var_list : Format.formatter -> Var.t list -> unit val instr : Format.formatter -> instr * loc -> unit From 56902fe63a20a889d21bf3cc9925d8cb256109b3 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 12 Jul 2023 16:40:48 +0200 Subject: [PATCH 026/112] initial global support --- compiler/lib/deadcode_dgraph.ml | 94 ++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 32 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index a4ff834c5c..4d7754ce43 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -69,31 +69,49 @@ let definitions nv prog = prog.blocks; defs -let usages nv prog = - let uses = Array.make nv Var.Set.empty in - let add_use x y = uses.(Var.idx y) <- Var.Set.add x uses.(Var.idx y) in +type usage_kind = + | Compute (* variable y is used to compute x *) + | Propagate (* values of y propagate to x *) + +let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array = + let uses = Array.make nv Var.Map.empty in + let add_use kind x y = uses.(Var.idx y) <- Var.Map.add x kind uses.(Var.idx y) in let add_arg_dep params args = - try List.iter2 ~f:(fun x y -> add_use x y) params args with Invalid_argument _ -> () + try List.iter2 ~f:(fun x y -> add_use Propagate x y) params args + with Invalid_argument _ -> () in let add_cont_deps (pc, args) = match try Some (Addr.Map.find pc prog.blocks) with Not_found -> None with | Some block -> add_arg_dep block.params args | None -> () (* Dead continuation *) in - let add_expr_uses x e = + let add_expr_uses x e : unit = match e with | Apply { f; args; _ } -> - add_use x f; - List.iter ~f:(add_use x) args - | Block (_, params, _) -> Array.iter ~f:(add_use x) params - | Field (z, _) -> add_use x z + (match Var.Tbl.get global_info.info_approximation f with + | Top -> () + | Values { known; _ } -> + Var.Set.iter (* For each known value of f *) + (fun k -> + (* 1. Look at return values, and add edge between x and these values. *) + let return_values = Var.Map.find k global_info.info_return_vals in + Var.Set.iter (add_use Propagate x) return_values; + (* 2. If k is a closure, add an edge pairwise between the parameters and arguments *) + match global_info.info_defs.(Var.idx k) with + | Expr (Closure (params, _)) -> + List.iter2 ~f:(add_use Propagate) params args + | _ -> ()) + known); + add_use Compute x f + | Block (_, params, _) -> Array.iter ~f:(add_use Propagate x) params + | Field (z, _) -> add_use Compute x z | Constant _ -> () | Closure (_, cont) -> add_cont_deps cont | Prim (_, args) -> List.iter ~f:(fun arg -> match arg with - | Pv v -> add_use x v + | Pv v -> add_use Compute x v | Pc _ -> ()) args in @@ -104,7 +122,7 @@ let usages nv prog = ~f:(fun (i, _) -> match i with | Let (x, e) -> add_expr_uses x e - | Assign (x, y) -> add_use x y + | Assign (x, y) -> add_use Compute x y (* TODO: These? *) | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> ()) block.body; @@ -145,7 +163,7 @@ let expr_vars e = args); vars -let liveness nv prog pure_funs = +let liveness nv prog pure_funs (global_info : Global_flow.info) = let live_vars = Array.make nv Dead in let add_top v = let idx = Var.idx v in @@ -162,9 +180,16 @@ let liveness nv prog pure_funs = | Let (x, e) -> if not (pure_expr pure_funs e) then ( + (* TODO: if e is an impure application, then look at each argument, if they escape then set to top *) let vars = expr_vars e in Var.ISet.iter add_top vars; - add_top x) + add_top x; + match e with + | Apply { args; _ } -> + List.iter + ~f:(fun x -> if Var.ISet.mem global_info.info_may_escape x then add_top x) + args + | _ -> ()) | Assign (_, _) -> () (* TODO: what to do with these? *) | Set_field (x, i, y) -> @@ -181,7 +206,8 @@ let liveness nv prog pure_funs = match fst block.branch with (* Base Cases *) | Stop -> () - | Return x | Raise (x, _) -> add_top x + | Return x -> if Var.ISet.mem global_info.info_may_escape x then add_top x + | Raise (x, _) -> add_top x (* Recursive cases *) | Branch cont | Poptrap cont -> live_continuation prog cont; @@ -210,26 +236,30 @@ let variables deps = Array.iteri ~f:(fun i _ -> Var.ISet.add vars (Var.of_idx i)) deps; vars -let propagate uses defs live_vars live_table x = +let propagate (uses : usage_kind Var.Map.t array) defs live_vars live_table x = let idx = Var.idx x in - let contribution y = - match Var.Tbl.get live_table y with - | Dead -> Dead (* If x is used in y, and y is dead, then x is dead. *) - | Top | Live _ -> ( - (* Otherwise we may be able to refine y's liveness. *) - match defs.(Var.idx y) with - | Expr (Field (_, i)) -> Live (IntSet.singleton i) - | Param -> Var.Tbl.get live_table y - | _ -> Top) + let contribution y usage_kind = + match usage_kind with + | Compute -> ( + match Var.Tbl.get live_table y with + | Dead -> Dead (* If x is used in y, and y is dead, then x is dead. *) + | Top | Live _ -> ( + (* Otherwise we may be able to refine y's liveness. *) + match defs.(Var.idx y) with + | Expr (Field (_, i)) -> Live (IntSet.singleton i) + | _ -> Top)) + | Propagate -> Var.Tbl.get live_table y in - Var.Set.fold - (fun y live -> Domain.join (contribution y) live) + Var.Map.fold + (fun y usage_kind live -> Domain.join (contribution y usage_kind) live) uses.(idx) live_vars.(idx) -let solver vars uses defs live_vars = +let solver vars (uses : usage_kind Var.Map.t array) defs live_vars = let g = - { G.domain = vars; G.iter_children = (fun f x -> Var.Set.iter f uses.(Var.idx x)) } + { G.domain = vars + ; G.iter_children = (fun f x -> Var.Map.iter (fun y _ -> f y) uses.(Var.idx x)) + } in Solver.f () (G.invert () g) (propagate uses defs live_vars) @@ -354,7 +384,7 @@ module Print = struct Array.iteri ~f:(fun i ds -> Format.eprintf "v%d: { " i; - Var.Set.iter (fun d -> Format.eprintf "%a " Var.print d) ds; + Var.Map.iter (fun d _ -> Format.eprintf "%a " Var.print d) ds; Format.eprintf "}\n") uses @@ -369,15 +399,15 @@ module Print = struct live_table end -let f p = +let f p global_info = let nv = Var.count () in (* Compute definitions *) let defs = definitions nv p in (* Compute usages *) - let uses = usages nv p in + let uses = usages nv p global_info in (* Compute initial liveness *) let pure_funs = Pure_fun.f p in - let live_vars = liveness nv p pure_funs in + let live_vars = liveness nv p pure_funs global_info in (* Propagate liveness to dependencies *) let vars = variables uses in let live_table = solver vars uses defs live_vars in From 49464e0c4d5ee5f84ef638608ef7f32a8b49418b Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 12 Jul 2023 16:41:30 +0200 Subject: [PATCH 027/112] more global support --- compiler/lib/deadcode_dgraph.mli | 2 +- compiler/lib/driver.ml | 5 ++++- compiler/lib/global_flow.ml | 7 ++++++- compiler/lib/global_flow.mli | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.mli b/compiler/lib/deadcode_dgraph.mli index 951ebf8a52..aba550ed69 100644 --- a/compiler/lib/deadcode_dgraph.mli +++ b/compiler/lib/deadcode_dgraph.mli @@ -16,4 +16,4 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -val f : Code.program -> Code.program \ No newline at end of file +val f : Code.program -> Global_flow.info -> Code.program \ No newline at end of file diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 15524a75bc..803e815700 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -38,7 +38,10 @@ let tailcall p = let deadcode' p = if debug () then Format.eprintf "Dead-code...@."; - Deadcode_dgraph.run p + let global_info = Global_flow.f ~fast:false p in + let p = Deadcode_dgraph.f p global_info in + let _, live_vars = Deadcode.f p in + p, live_vars let deadcode p = let r, _ = deadcode' p in diff --git a/compiler/lib/global_flow.ml b/compiler/lib/global_flow.ml index 849b3456c6..6ad8b6cc48 100644 --- a/compiler/lib/global_flow.ml +++ b/compiler/lib/global_flow.ml @@ -540,6 +540,7 @@ type info = { info_defs : def array ; info_approximation : Domain.t Var.Tbl.t ; info_may_escape : Var.ISet.t + ; info_return_vals : Var.Set.t Var.Map.t } let f ~fast p = @@ -625,7 +626,11 @@ let f ~fast p = Array.iteri ~f:(fun i s -> if Poly.(s <> No) then Var.ISet.add info_may_escape (Var.of_idx i)) may_escape; - { info_defs = defs; info_approximation = approximation; info_may_escape } + { info_defs = defs + ; info_approximation = approximation + ; info_may_escape + ; info_return_vals = rets + } let exact_call info f n = match Var.Tbl.get info.info_approximation f with diff --git a/compiler/lib/global_flow.mli b/compiler/lib/global_flow.mli index 576f45f8b6..65d9cbfb59 100644 --- a/compiler/lib/global_flow.mli +++ b/compiler/lib/global_flow.mli @@ -35,6 +35,7 @@ type info = { info_defs : def array ; info_approximation : approx Var.Tbl.t ; info_may_escape : Var.ISet.t + ; info_return_vals : Var.Set.t Var.Map.t } val f : fast:bool -> Code.program -> info From 936c3e467759b5fcdd4b1e06bcc9e7e2a9fdc126 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 12 Jul 2023 16:55:30 +0200 Subject: [PATCH 028/112] update print uses --- compiler/lib/deadcode_dgraph.ml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 4d7754ce43..19d043413b 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -384,7 +384,16 @@ module Print = struct Array.iteri ~f:(fun i ds -> Format.eprintf "v%d: { " i; - Var.Map.iter (fun d _ -> Format.eprintf "%a " Var.print d) ds; + Var.Map.iter + (fun d k -> + Format.eprintf + "(%a, %s) " + Var.print + d + (match k with + | Compute -> "C" + | Propagate -> "P")) + ds; Format.eprintf "}\n") uses From 9c45d785ea54b7a83c1fece9bd2a9c3ee96e51da Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 19 Jul 2023 12:26:03 +0200 Subject: [PATCH 029/112] cleanup, fix block propagation --- compiler/lib/deadcode_dgraph.ml | 71 ++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 19d043413b..e38a4aab62 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -102,8 +102,9 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array List.iter2 ~f:(add_use Propagate) params args | _ -> ()) known); - add_use Compute x f - | Block (_, params, _) -> Array.iter ~f:(add_use Propagate x) params + add_use Compute x f; + List.iter ~f:(add_use Compute x) args + | Block (_, vars, _) -> Array.iter ~f:(add_use Compute x) vars | Field (z, _) -> add_use Compute x z | Constant _ -> () | Closure (_, cont) -> add_cont_deps cont @@ -180,7 +181,6 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = | Let (x, e) -> if not (pure_expr pure_funs e) then ( - (* TODO: if e is an impure application, then look at each argument, if they escape then set to top *) let vars = expr_vars e in Var.ISet.iter add_top vars; add_top x; @@ -236,18 +236,32 @@ let variables deps = Array.iteri ~f:(fun i _ -> Var.ISet.add vars (Var.of_idx i)) deps; vars -let propagate (uses : usage_kind Var.Map.t array) defs live_vars live_table x = +let propagate uses defs live_vars live_table x = let idx = Var.idx x in let contribution y usage_kind = match usage_kind with + (* If x is used to compute y, we consider the liveness of y *) | Compute -> ( match Var.Tbl.get live_table y with - | Dead -> Dead (* If x is used in y, and y is dead, then x is dead. *) - | Top | Live _ -> ( - (* Otherwise we may be able to refine y's liveness. *) + (* If y is dead, then x is dead. *) + | Dead -> Dead + (* If y is a live block, then x is live if it is used in a live field *) + | Live fields -> ( + match defs.(Var.idx y) with + | Expr (Block (_, vars, _)) -> + let found = ref false in + Array.iteri + ~f:(fun i v -> + if Var.equal v x && IntSet.mem i fields then found := true) + vars; + if !found then Top else Dead + | _ -> Top) + (* If y is top, then if y is a field access, x depends only on that field *) + | Top -> ( match defs.(Var.idx y) with | Expr (Field (_, i)) -> Live (IntSet.singleton i) | _ -> Top)) + (* If x is used as an argument for parameter y, then contribution is liveness of y *) | Propagate -> Var.Tbl.get live_table y in Var.Map.fold @@ -255,7 +269,7 @@ let propagate (uses : usage_kind Var.Map.t array) defs live_vars live_table x = uses.(idx) live_vars.(idx) -let solver vars (uses : usage_kind Var.Map.t array) defs live_vars = +let solver vars uses defs live_vars = let g = { G.domain = vars ; G.iter_children = (fun f x -> Var.Map.iter (fun y _ -> f y) uses.(Var.idx x)) @@ -263,17 +277,11 @@ let solver vars (uses : usage_kind Var.Map.t array) defs live_vars = in Solver.f () (G.invert () g) (propagate uses defs live_vars) -let eliminate prog live_table = - let sentinal = Var.fresh () in +let eliminate prog sentinal live_table = let add_sentinal_instr blocks = - Addr.Map.update - 0 - (function - | Some block -> - let body = (Let (sentinal, Constant (Int 0l)), Before 0) :: block.body in - Some { block with body } - | None -> assert false (* Unreachable *)) - blocks + let block = Addr.Map.find 0 blocks in + let body = (Let (sentinal, Constant (Int 0l)), Before 0) :: block.body in + Addr.Map.add 0 { block with body } blocks in let compact_vars vars = let i = ref (Array.length vars - 1) in @@ -302,7 +310,8 @@ let eliminate prog live_table = in let eliminate_closure instr = match instr with - | Let (x, Closure (args, cont)) -> Let (x, Closure (args, eliminate_cont cont)) + | Let (x, Closure (args, cont)) -> + Let (x, Closure (args, eliminate_cont cont)) | _ -> instr in let eliminate_instr instr = @@ -322,8 +331,7 @@ let eliminate prog live_table = in let e = Block (start, vars, is_array) in Some (Let (x, e)) - (* This should never happen *) - | _ -> None) + | _ -> Some instr) | Dead -> None) | Assign (x, _) -> if is_live x then Some instr else None | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> Some instr @@ -368,7 +376,7 @@ module Print = struct | Top -> "top" | Dead -> "dead" - let _print_defs defs = + let print_defs defs = Format.eprintf "Definitions:\n"; Array.iteri ~f:(fun i def -> @@ -406,9 +414,24 @@ module Print = struct Var.Tbl.iter (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) live_table + + let annot live_table _ (xi : Code.Print.xinstr) = + match xi with + | Last _ -> "" + | Instr (i, _) -> ( + match i with + | Let (x, _) -> ( + match Var.Tbl.get live_table x with + | Dead -> "X" + | Top -> "T" + | Live fields -> + "{ " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" + ) + | _ -> "") end let f p global_info = + let sentinal = Var.fresh () in let nv = Var.count () in (* Compute definitions *) let defs = definitions nv p in @@ -422,10 +445,10 @@ let f p global_info = let live_table = solver vars uses defs live_vars in (* Print.print_defs defs; *) Print.print_uses uses; - Print.print_liveness live_vars; + (* Print.print_liveness live_vars; *) Print.print_live_tbl live_table; (* After dependency propagation *) - let p = eliminate p live_table in + let p = eliminate p sentinal live_table in Format.eprintf "After Elimination:\n"; Code.Print.program (fun _ _ -> "") p; p From 461fd7bf12a89faca4eb83c01f58f2a8857f3280 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 19 Jul 2023 13:20:45 +0200 Subject: [PATCH 030/112] add new debug flag --- compiler/lib/deadcode_dgraph.ml | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index e38a4aab62..31aaf904d4 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -19,6 +19,8 @@ open Code open Stdlib +let debug = Debug.find "globaldeadcode" + type def = | Expr of expr | Param @@ -310,8 +312,7 @@ let eliminate prog sentinal live_table = in let eliminate_closure instr = match instr with - | Let (x, Closure (args, cont)) -> - Let (x, Closure (args, eliminate_cont cont)) + | Let (x, Closure (args, cont)) -> Let (x, Closure (args, eliminate_cont cont)) | _ -> instr in let eliminate_instr instr = @@ -414,20 +415,6 @@ module Print = struct Var.Tbl.iter (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) live_table - - let annot live_table _ (xi : Code.Print.xinstr) = - match xi with - | Last _ -> "" - | Instr (i, _) -> ( - match i with - | Let (x, _) -> ( - match Var.Tbl.get live_table x with - | Dead -> "X" - | Top -> "T" - | Live fields -> - "{ " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" - ) - | _ -> "") end let f p global_info = @@ -443,12 +430,12 @@ let f p global_info = (* Propagate liveness to dependencies *) let vars = variables uses in let live_table = solver vars uses defs live_vars in - (* Print.print_defs defs; *) - Print.print_uses uses; - (* Print.print_liveness live_vars; *) - Print.print_live_tbl live_table; (* After dependency propagation *) let p = eliminate p sentinal live_table in - Format.eprintf "After Elimination:\n"; - Code.Print.program (fun _ _ -> "") p; + if debug () + then ( + Print.print_uses uses; + Print.print_live_tbl live_table; + Format.eprintf "After Elimination:\n"; + Code.Print.program (fun _ _ -> "") p); p From 64de2533385cf3b6baf8a1c58f2181bf9828d596 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 20 Jul 2023 10:30:15 +0200 Subject: [PATCH 031/112] switch to zeroing out --- compiler/lib/deadcode_dgraph.ml | 130 ++++++++++++++------------------ 1 file changed, 55 insertions(+), 75 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 31aaf904d4..16a2bda259 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -93,15 +93,19 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array (match Var.Tbl.get global_info.info_approximation f with | Top -> () | Values { known; _ } -> - Var.Set.iter (* For each known value of f *) + Var.Set.iter (* For each known closure value of f *) (fun k -> (* 1. Look at return values, and add edge between x and these values. *) - let return_values = Var.Map.find k global_info.info_return_vals in - Var.Set.iter (add_use Propagate x) return_values; - (* 2. If k is a closure, add an edge pairwise between the parameters and arguments *) + (* 2. Add an edge pairwise between the parameters and arguments *) match global_info.info_defs.(Var.idx k) with | Expr (Closure (params, _)) -> - List.iter2 ~f:(add_use Propagate) params args + (* If the function is under/over-applied then global flow will mark arguments and return value as escaping. + So we only need to consider the case when there is an exact application. *) + if List.length params = List.length args + then ( + let return_values = Var.Map.find k global_info.info_return_vals in + Var.Set.iter (add_use Propagate x) return_values; + List.iter2 ~f:(add_use Propagate) params args) | _ -> ()) known); add_use Compute x f; @@ -203,31 +207,15 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = add_top z | Offset_ref (x, i) -> add_live x i in - let rec live_block block = + let live_block block = List.iter ~f:(fun (i, _) -> live_instruction i) block.body; match fst block.branch with - (* Base Cases *) | Stop -> () | Return x -> if Var.ISet.mem global_info.info_may_escape x then add_top x | Raise (x, _) -> add_top x - (* Recursive cases *) - | Branch cont | Poptrap cont -> - live_continuation prog cont; - live_continuation prog cont - | Pushtrap (cont1, _, cont2, _) -> - live_continuation prog cont1; - live_continuation prog cont2 - | Cond (x, cont1, cont2) -> - add_top x; - live_continuation prog cont1; - live_continuation prog cont2 - | Switch (x, a1, a2) -> - add_top x; - Array.iter ~f:(fun cont -> live_continuation prog cont) a1; - Array.iter ~f:(fun cont -> live_continuation prog cont) a2 - and live_continuation prog ((pc, _) : cont) = - let block = Addr.Map.find pc prog.blocks in - live_block block + | Cond (x, _, _) -> add_top x + | Switch (x, _, _) -> add_top x + | Branch _ | Poptrap _ | Pushtrap _ -> () in Addr.Map.iter (fun _ block -> live_block block) prog.blocks; live_vars @@ -279,7 +267,7 @@ let solver vars uses defs live_vars = in Solver.f () (G.invert () g) (propagate uses defs live_vars) -let eliminate prog sentinal live_table = +let zero prog sentinal live_table = let add_sentinal_instr blocks = let block = Addr.Map.find 0 blocks in let body = (Let (sentinal, Constant (Int 0l)), Before 0) :: block.body in @@ -299,31 +287,29 @@ let eliminate prog sentinal live_table = | Dead -> false | _ -> true in - let rec filter_args pl al = - match pl, al with - | x :: pl, y :: al -> if is_live x then y :: filter_args pl al else filter_args pl al - | [], _ -> [] - | _ -> assert false - in - let eliminate_cont ((pc, args) : cont) = - let block = Addr.Map.find pc prog.blocks in - let args = filter_args block.params args in - pc, args + let zero_var x = if not (is_live x) then sentinal else x in + let zero_cont ((pc, args) : cont) = + match Addr.Map.find_opt pc prog.blocks with + | Some block -> + let args = + List.map2 + ~f:(fun param arg -> if is_live param then arg else sentinal) + block.params + args + in + pc, args + | None -> pc, args in - let eliminate_closure instr = - match instr with - | Let (x, Closure (args, cont)) -> Let (x, Closure (args, eliminate_cont cont)) - | _ -> instr - in - let eliminate_instr instr = + let zero_instr instr = match instr with | Let (x, e) -> ( - match Var.Tbl.get live_table x with - | Top -> Some instr - | Live fields -> ( - match e with - (* Eliminate unused fields from block *) - | Block (start, vars, is_array) -> + match e with + | Closure (args, cont) -> + let cont = zero_cont cont in + Let (x, Closure (args, cont)) + | Block (start, vars, is_array) -> ( + match Var.Tbl.get live_table x with + | Live fields -> let vars = Array.mapi ~f:(fun i v -> if IntSet.mem i fields then v else sentinal) @@ -331,43 +317,37 @@ let eliminate prog sentinal live_table = |> compact_vars in let e = Block (start, vars, is_array) in - Some (Let (x, e)) - | _ -> Some instr) - | Dead -> None) - | Assign (x, _) -> if is_live x then Some instr else None - | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> Some instr + Let (x, e) + | _ -> instr) + | Apply ap -> + let args = List.map ~f:zero_var ap.args in + Let (x, Apply { ap with args }) + | _ -> instr) + | _ -> instr in - let update_block block = - (* Filter dead params *) - let params = List.filter ~f:is_live block.params in + let zero_block block = (* Analyze block instructions *) - let body = - List.filter_map - ~f:(fun (instr, loc) -> - Option.map - ~f:(fun instr -> eliminate_closure instr, loc) - (eliminate_instr instr)) - block.body - in + let body = List.map ~f:(fun (instr, loc) -> zero_instr instr, loc) block.body in (* Analyze branch *) let branch = let last, loc = block.branch in let last = match last with - | Return _ | Raise (_, _) | Stop -> last - | Branch cont -> Branch (eliminate_cont cont) - | Cond (x, cont1, cont2) -> Cond (x, eliminate_cont cont1, eliminate_cont cont2) + | Return x -> Return (zero_var x) + | Raise (_, _) | Stop -> last + | Branch cont -> Branch (zero_cont cont) + | Cond (x, cont1, cont2) -> Cond (x, zero_cont cont1, zero_cont cont2) | Switch (x, a1, a2) -> - Switch (x, Array.map ~f:eliminate_cont a1, Array.map ~f:eliminate_cont a2) + Switch (x, Array.map ~f:zero_cont a1, Array.map ~f:zero_cont a2) | Pushtrap (cont1, x, cont2, pcs) -> - Pushtrap (eliminate_cont cont1, x, eliminate_cont cont2, pcs) - | Poptrap cont -> Poptrap (eliminate_cont cont) + Pushtrap (zero_cont cont1, x, zero_cont cont2, pcs) + | Poptrap cont -> Poptrap (zero_cont cont) in last, loc in - { params; body; branch } + { block with body; branch } in - let blocks = prog.blocks |> Addr.Map.map update_block |> add_sentinal_instr in + let blocks = prog.blocks |> Addr.Map.map zero_block |> add_sentinal_instr in { prog with blocks } module Print = struct @@ -418,7 +398,7 @@ module Print = struct end let f p global_info = - let sentinal = Var.fresh () in + let _sentinal = Var.fresh () in let nv = Var.count () in (* Compute definitions *) let defs = definitions nv p in @@ -430,8 +410,8 @@ let f p global_info = (* Propagate liveness to dependencies *) let vars = variables uses in let live_table = solver vars uses defs live_vars in - (* After dependency propagation *) - let p = eliminate p sentinal live_table in + (* Zero out dead fields *) + (* let p = zero p sentinal live_table in *) if debug () then ( Print.print_uses uses; From ac4358a534415b5951758a0cdf3dcf3baa5d9744 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 20 Jul 2023 13:14:08 +0200 Subject: [PATCH 032/112] call global flow once in driver --- compiler/lib/driver.ml | 55 +++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 803e815700..c1a57d97e4 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -36,21 +36,20 @@ let tailcall p = if debug () then Format.eprintf "Tail-call optimization...@."; Tailcall.f p -let deadcode' p = +let deadcode' _global_info p = if debug () then Format.eprintf "Dead-code...@."; - let global_info = Global_flow.f ~fast:false p in - let p = Deadcode_dgraph.f p global_info in - let _, live_vars = Deadcode.f p in + (* let p = Deadcode_dgraph.f p global_info in *) + let p, live_vars = Deadcode.f p in p, live_vars -let deadcode p = - let r, _ = deadcode' p in +let deadcode global_info p = + let r, _ = deadcode' global_info p in r -let inline p = +let inline global_info p = if Config.Flag.inline () && Config.Flag.deadcode () then ( - let p, live_vars = deadcode' p in + let p, live_vars = deadcode' global_info p in if debug () then Format.eprintf "Inlining...@."; Inline.f p live_vars) else p @@ -127,27 +126,27 @@ let identity x = x (* o1 *) -let o1 : 'a -> 'a = +let o1 global_info = print +> tailcall +> flow_simple (* flow simple to keep information for future tailcall opt *) +> specialize' +> eval - +> inline (* inlining may reveal new tailcall opt *) - +> deadcode + +> inline global_info (* inlining may reveal new tailcall opt *) + +> deadcode global_info +> tailcall +> phi +> flow +> specialize' +> eval - +> inline - +> deadcode + +> inline global_info + +> deadcode global_info +> print +> flow +> specialize' +> eval - +> inline - +> deadcode + +> inline global_info + +> deadcode global_info +> phi +> flow +> specialize @@ -155,23 +154,28 @@ let o1 : 'a -> 'a = (* o2 *) -let o2 : 'a -> 'a = loop 10 "o1" o1 1 +> print +let o2 global_info = loop 10 "o1" (o1 global_info) 1 +> print (* o3 *) -let round1 : 'a -> 'a = +let round1 global_info = print +> tailcall - +> inline (* inlining may reveal new tailcall opt *) - +> deadcode (* deadcode required before flow simple -> provided by constant *) + +> inline global_info (* inlining may reveal new tailcall opt *) + +> deadcode + global_info (* deadcode required before flow simple -> provided by constant *) +> flow_simple (* flow simple to keep information for future tailcall opt *) +> specialize' +> eval +> identity -let round2 = flow +> specialize' +> eval +> deadcode +> o1 +let round2 global_info = + flow +> specialize' +> eval +> deadcode global_info +> o1 global_info -let o3 = loop 10 "tailcall+inline" round1 1 +> loop 10 "flow" round2 1 +> print +let o3 global_info = + loop 10 "tailcall+inline" (round1 global_info) 1 + +> loop 10 "flow" (round2 global_info) 1 + +> print let generate d @@ -576,14 +580,15 @@ let configure formatter = let full ~standalone ~wrap_with_fun ~profile ~linkall ~source_map formatter d p = let exported_runtime = not standalone in let opt = + let global_info = Global_flow.f ~fast:false p in specialize_js_once +> (match profile with - | O1 -> o1 - | O2 -> o2 - | O3 -> o3) + | O1 -> o1 global_info + | O2 -> o2 global_info + | O3 -> o3 global_info) +> exact_calls profile +> effects - +> map_fst (Generate_closure.f +> deadcode') + +> map_fst (Generate_closure.f +> deadcode' global_info) in let emit = generate d ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect:standalone From 176cf0424beebf97c1289365788498d6c385cac0 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 20 Jul 2023 13:15:14 +0200 Subject: [PATCH 033/112] new test file --- compiler/tests-compiler/dune.inc | 15 +++++++++++++++ compiler/tests-compiler/global_deadcode.ml | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 compiler/tests-compiler/global_deadcode.ml diff --git a/compiler/tests-compiler/dune.inc b/compiler/tests-compiler/dune.inc index 16031627fa..08401a258f 100644 --- a/compiler/tests-compiler/dune.inc +++ b/compiler/tests-compiler/dune.inc @@ -374,6 +374,21 @@ (preprocess (pps ppx_expect))) +(library + ;; compiler/tests-compiler/global_deadcode.ml + (name global_deadcode_15) + (enabled_if true) + (modules global_deadcode) + (libraries js_of_ocaml_compiler unix str jsoo_compiler_expect_tests_helper) + (inline_tests + (enabled_if true) + (deps + (file %{project_root}/compiler/bin-js_of_ocaml/js_of_ocaml.exe) + (file %{project_root}/compiler/bin-jsoo_minify/jsoo_minify.exe))) + (flags (:standard -open Jsoo_compiler_expect_tests_helper)) + (preprocess + (pps ppx_expect))) + (library ;; compiler/tests-compiler/inlining.ml (name inlining_15) diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml new file mode 100644 index 0000000000..a367ca0b1b --- /dev/null +++ b/compiler/tests-compiler/global_deadcode.ml @@ -0,0 +1,13 @@ +open Util + +let%expect_test "" = + let program = + compile_and_parse + {| + |} + in + print_fun_decl program (Some ""); + [%expect + {| + + //end |}] \ No newline at end of file From a38d18156fb598e5c6e264fca1ce8c65d27b8632 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 25 Jul 2023 13:30:24 +0200 Subject: [PATCH 034/112] add back dgraph call in driver --- compiler/lib/driver.ml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index c1a57d97e4..2cdebb71a7 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -36,9 +36,9 @@ let tailcall p = if debug () then Format.eprintf "Tail-call optimization...@."; Tailcall.f p -let deadcode' _global_info p = +let deadcode' global_info p = if debug () then Format.eprintf "Dead-code...@."; - (* let p = Deadcode_dgraph.f p global_info in *) + let p = Deadcode_dgraph.f p global_info in let p, live_vars = Deadcode.f p in p, live_vars @@ -98,16 +98,9 @@ let effects p = p |> Deadcode.f +> Effects.f +> map_fst Lambda_lifting.f) else p, (Code.Var.Set.empty : Effects.cps_calls) -let exact_calls profile p = +let exact_calls global_info p = if not (Config.Flag.effects ()) - then - let fast = - match profile with - | O3 -> false - | O1 | O2 -> true - in - let info = Global_flow.f ~fast p in - Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p + then Specialize.f ~function_arity:(fun f -> Global_flow.function_arity global_info f) p else p let print p = @@ -586,7 +579,7 @@ let full ~standalone ~wrap_with_fun ~profile ~linkall ~source_map formatter d p | O1 -> o1 global_info | O2 -> o2 global_info | O3 -> o3 global_info) - +> exact_calls profile + +> exact_calls global_info +> effects +> map_fst (Generate_closure.f +> deadcode' global_info) in From 18678f696379dc0340d751081d863798a9338247 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 25 Jul 2023 14:13:28 +0200 Subject: [PATCH 035/112] revert changes to driver --- compiler/lib/driver.ml | 67 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 2cdebb71a7..b1c2b93b57 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -36,20 +36,18 @@ let tailcall p = if debug () then Format.eprintf "Tail-call optimization...@."; Tailcall.f p -let deadcode' global_info p = +let deadcode' p = if debug () then Format.eprintf "Dead-code...@."; - let p = Deadcode_dgraph.f p global_info in - let p, live_vars = Deadcode.f p in - p, live_vars + Deadcode.f p -let deadcode global_info p = - let r, _ = deadcode' global_info p in +let deadcode p = + let r, _ = deadcode' p in r -let inline global_info p = +let inline p = if Config.Flag.inline () && Config.Flag.deadcode () then ( - let p, live_vars = deadcode' global_info p in + let p, live_vars = deadcode' p in if debug () then Format.eprintf "Inlining...@."; Inline.f p live_vars) else p @@ -98,9 +96,16 @@ let effects p = p |> Deadcode.f +> Effects.f +> map_fst Lambda_lifting.f) else p, (Code.Var.Set.empty : Effects.cps_calls) -let exact_calls global_info p = +let exact_calls profile p = if not (Config.Flag.effects ()) - then Specialize.f ~function_arity:(fun f -> Global_flow.function_arity global_info f) p + then + let fast = + match profile with + | O3 -> false + | O1 | O2 -> true + in + let info = Global_flow.f ~fast p in + Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p else p let print p = @@ -119,27 +124,27 @@ let identity x = x (* o1 *) -let o1 global_info = +let o1 : 'a -> 'a = print +> tailcall +> flow_simple (* flow simple to keep information for future tailcall opt *) +> specialize' +> eval - +> inline global_info (* inlining may reveal new tailcall opt *) - +> deadcode global_info + +> inline (* inlining may reveal new tailcall opt *) + +> deadcode +> tailcall +> phi +> flow +> specialize' +> eval - +> inline global_info - +> deadcode global_info + +> inline + +> deadcode +> print +> flow +> specialize' +> eval - +> inline global_info - +> deadcode global_info + +> inline + +> deadcode +> phi +> flow +> specialize @@ -147,28 +152,23 @@ let o1 global_info = (* o2 *) -let o2 global_info = loop 10 "o1" (o1 global_info) 1 +> print +let o2 : 'a -> 'a = loop 10 "o1" o1 1 +> print (* o3 *) -let round1 global_info = +let round1 : 'a -> 'a = print +> tailcall - +> inline global_info (* inlining may reveal new tailcall opt *) - +> deadcode - global_info (* deadcode required before flow simple -> provided by constant *) + +> inline (* inlining may reveal new tailcall opt *) + +> deadcode (* deadcode required before flow simple -> provided by constant *) +> flow_simple (* flow simple to keep information for future tailcall opt *) +> specialize' +> eval +> identity -let round2 global_info = - flow +> specialize' +> eval +> deadcode global_info +> o1 global_info +let round2 = flow +> specialize' +> eval +> deadcode +> o1 -let o3 global_info = - loop 10 "tailcall+inline" (round1 global_info) 1 - +> loop 10 "flow" (round2 global_info) 1 - +> print +let o3 = loop 10 "tailcall+inline" round1 1 +> loop 10 "flow" round2 1 +> print let generate d @@ -573,15 +573,14 @@ let configure formatter = let full ~standalone ~wrap_with_fun ~profile ~linkall ~source_map formatter d p = let exported_runtime = not standalone in let opt = - let global_info = Global_flow.f ~fast:false p in specialize_js_once +> (match profile with - | O1 -> o1 global_info - | O2 -> o2 global_info - | O3 -> o3 global_info) - +> exact_calls global_info + | O1 -> o1 + | O2 -> o2 + | O3 -> o3) + +> exact_calls profile +> effects - +> map_fst (Generate_closure.f +> deadcode' global_info) + +> map_fst (Generate_closure.f +> deadcode') in let emit = generate d ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect:standalone From 65b7d9d2e10c4e2d7e207d9154d03a0e01e58761 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 26 Jul 2023 15:14:29 +0200 Subject: [PATCH 036/112] tweaks --- compiler/lib/deadcode_dgraph.ml | 26 +++++++++++++++----------- compiler/lib/deadcode_dgraph.mli | 4 +++- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 16a2bda259..fa9eabcea5 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -21,6 +21,8 @@ open Stdlib let debug = Debug.find "globaldeadcode" +let times = Debug.find "times" + type def = | Expr of expr | Param @@ -197,7 +199,6 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = args | _ -> ()) | Assign (_, _) -> () - (* TODO: what to do with these? *) | Set_field (x, i, y) -> add_live x i; add_top y @@ -246,7 +247,7 @@ let propagate uses defs live_vars live_table x = vars; if !found then Top else Dead | _ -> Top) - (* If y is top, then if y is a field access, x depends only on that field *) + (* If y is top and y is a field access, x depends only on that field *) | Top -> ( match defs.(Var.idx y) with | Expr (Field (_, i)) -> Live (IntSet.singleton i) @@ -268,11 +269,6 @@ let solver vars uses defs live_vars = Solver.f () (G.invert () g) (propagate uses defs live_vars) let zero prog sentinal live_table = - let add_sentinal_instr blocks = - let block = Addr.Map.find 0 blocks in - let body = (Let (sentinal, Constant (Int 0l)), Before 0) :: block.body in - Addr.Map.add 0 { block with body } blocks - in let compact_vars vars = let i = ref (Array.length vars - 1) in while !i >= 0 && Var.equal vars.(!i) sentinal do @@ -347,7 +343,7 @@ let zero prog sentinal live_table = in { block with body; branch } in - let blocks = prog.blocks |> Addr.Map.map zero_block |> add_sentinal_instr in + let blocks = prog.blocks |> Addr.Map.map zero_block in { prog with blocks } module Print = struct @@ -397,8 +393,13 @@ module Print = struct live_table end -let f p global_info = - let _sentinal = Var.fresh () in +let add_sentinal p = + let sentinal = Var.fresh () in + let instr, loc = Let (sentinal, Constant (Int 0l)), Before 0 in + Code.prepend p [ instr, loc ], sentinal + +let f p sentinal global_info = + let t = Timer.make () in let nv = Var.count () in (* Compute definitions *) let defs = definitions nv p in @@ -411,11 +412,14 @@ let f p global_info = let vars = variables uses in let live_table = solver vars uses defs live_vars in (* Zero out dead fields *) - (* let p = zero p sentinal live_table in *) + let p = zero p sentinal live_table in if debug () then ( + Code.Print.program (fun _ _ -> "") p; + Print.print_liveness live_vars; Print.print_uses uses; Print.print_live_tbl live_table; Format.eprintf "After Elimination:\n"; Code.Print.program (fun _ _ -> "") p); + if times () then Format.eprintf " deadcode dgraph.: %a@." Timer.print t; p diff --git a/compiler/lib/deadcode_dgraph.mli b/compiler/lib/deadcode_dgraph.mli index aba550ed69..ccb1b6c0b6 100644 --- a/compiler/lib/deadcode_dgraph.mli +++ b/compiler/lib/deadcode_dgraph.mli @@ -16,4 +16,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -val f : Code.program -> Global_flow.info -> Code.program \ No newline at end of file +val add_sentinal : Code.program -> Code.program * Code.Var.t + +val f : Code.program -> Code.Var.t -> Global_flow.info -> Code.program \ No newline at end of file From 2a3462f3e16f598649cdea2d79a9eb0696a61765 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 26 Jul 2023 15:26:27 +0200 Subject: [PATCH 037/112] pull out sentinal --- compiler/lib/driver.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index b1c2b93b57..a9cf59779f 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -104,7 +104,9 @@ let exact_calls profile p = | O3 -> false | O1 | O2 -> true in + let p, sentinal = Deadcode_dgraph.add_sentinal p in let info = Global_flow.f ~fast p in + let p = Deadcode_dgraph.f p sentinal info in Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p else p From efc617c8147ca74fc81dd40c6bc64bf4bcbd20fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Wed, 26 Jul 2023 17:51:48 +0200 Subject: [PATCH 038/112] Fix global flow analysis In fast mode, we don't track function arguments, so we should consider them as escaping. --- CHANGES.md | 1 + compiler/lib/global_flow.ml | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8826a18745..d640ae8ee9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ # Dev (2023-??-??) - ?? * Runtime: fix Dom_html.onIE (#1493) +* Compiler: fix global flow analysis (#1494) # 5.4.0 (2023-07-06) - Lille diff --git a/compiler/lib/global_flow.ml b/compiler/lib/global_flow.ml index 849b3456c6..17e84d54b4 100644 --- a/compiler/lib/global_flow.ml +++ b/compiler/lib/global_flow.ml @@ -215,7 +215,9 @@ let expr_deps blocks st x e = match st.defs.(Var.idx f) with | Expr (Closure (params, _)) when List.length args = List.length params -> Hashtbl.add st.applied_functions (x, f) (); - if not st.fast then List.iter2 ~f:(fun p a -> add_assign_def st p a) params args; + if st.fast + then List.iter ~f:(fun a -> do_escape st Escape a) args + else List.iter2 ~f:(fun p a -> add_assign_def st p a) params args; Var.Set.iter (fun y -> add_dep st x y) (Var.Map.find f st.return_values) | _ -> ()) | Closure (l, cont) -> @@ -470,8 +472,13 @@ let propagate st ~update approx x = if not (Hashtbl.mem st.applied_functions (x, g)) then ( Hashtbl.add st.applied_functions (x, g) (); - if not st.fast + if st.fast then + List.iter + ~f:(fun y -> + Domain.variable_escape ~update ~st ~approx Escape y) + args + else List.iter2 ~f:(fun p a -> add_assign_def st p a; @@ -593,7 +600,7 @@ let f ~fast p = | Values { known; others } -> Format.fprintf f - "{%a/%b} mut:%b vmut:%b esc:%s" + "{%a/%b} mut:%b vmut:%b vesc:%s esc:%s" (Format.pp_print_list ~pp_sep:(fun f () -> Format.fprintf f ", ") (fun f x -> @@ -615,6 +622,10 @@ let f ~fast p = others st.possibly_mutable.(Var.idx x) st.variable_possibly_mutable.(Var.idx x) + (match st.variable_may_escape.(Var.idx x) with + | Escape -> "Y" + | Escape_constant -> "y" + | No -> "n") (match st.may_escape.(Var.idx x) with | Escape -> "Y" | Escape_constant -> "y" From d73622c0f5f4ae0880c60a5e345e0ef1eceecd8d Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 27 Jul 2023 11:00:39 +0200 Subject: [PATCH 039/112] add disable globaldeadcode flag, fix tests --- compiler/lib/config.ml | 2 ++ compiler/lib/config.mli | 2 ++ compiler/lib/driver.ml | 12 ++++++++---- compiler/tests-compiler/gh1349.ml | 1 + compiler/tests-compiler/gh1354.ml | 3 +++ 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/compiler/lib/config.ml b/compiler/lib/config.ml index 95193f49c3..9385a063ba 100644 --- a/compiler/lib/config.ml +++ b/compiler/lib/config.ml @@ -58,6 +58,8 @@ module Flag = struct let deadcode = o ~name:"deadcode" ~default:true + let globaldeadcode = o ~name:"globaldeadcode" ~default:true + let shortvar = o ~name:"shortvar" ~default:true let compact = o ~name:"compact" ~default:true diff --git a/compiler/lib/config.mli b/compiler/lib/config.mli index ac1672bdef..e4c86d37b0 100644 --- a/compiler/lib/config.mli +++ b/compiler/lib/config.mli @@ -25,6 +25,8 @@ module Flag : sig val deadcode : unit -> bool + val globaldeadcode : unit -> bool + val optcall : unit -> bool val shortvar : unit -> bool diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index a9cf59779f..f72320508e 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -104,10 +104,14 @@ let exact_calls profile p = | O3 -> false | O1 | O2 -> true in - let p, sentinal = Deadcode_dgraph.add_sentinal p in - let info = Global_flow.f ~fast p in - let p = Deadcode_dgraph.f p sentinal info in - Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p + if Config.Flag.globaldeadcode () then + let p, sentinal = Deadcode_dgraph.add_sentinal p in + let info = Global_flow.f ~fast p in + let p = Deadcode_dgraph.f p sentinal info in + Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p + else + let info = Global_flow.f ~fast p in + Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p else p let print p = diff --git a/compiler/tests-compiler/gh1349.ml b/compiler/tests-compiler/gh1349.ml index aff3e46862..c385023520 100644 --- a/compiler/tests-compiler/gh1349.ml +++ b/compiler/tests-compiler/gh1349.ml @@ -35,6 +35,7 @@ let%expect_test _ = (List.concat [ [ "--disable"; "inline" ] ; [ "--disable"; "deadcode" ] + ; [ "--disable"; "globaldeadcode" ] ; [ "--disable"; "staticeval" ] ; [ "--enable"; "shortvar" ] ; [ "--debug"; "shortvar" ] diff --git a/compiler/tests-compiler/gh1354.ml b/compiler/tests-compiler/gh1354.ml index 16789258ba..122686d07b 100644 --- a/compiler/tests-compiler/gh1354.ml +++ b/compiler/tests-compiler/gh1354.ml @@ -37,6 +37,7 @@ with Exit -> (List.concat [ [ "--disable"; "inline" ] ; [ "--disable"; "deadcode" ] + ; [ "--disable"; "globaldeadcode" ] ; [ "--disable"; "staticeval" ] ]) prog @@ -100,6 +101,7 @@ with Exit -> (List.concat [ [ "--disable"; "inline" ] ; [ "--disable"; "deadcode" ] + ; [ "--disable"; "globaldeadcode" ] ; [ "--disable"; "staticeval" ] ]) prog @@ -186,6 +188,7 @@ with Exit -> (List.concat [ [ "--disable"; "inline" ] ; [ "--disable"; "deadcode" ] + ; [ "--disable"; "globaldeadcode" ] ; [ "--disable"; "staticeval" ] ]) prog From b901fdedfd1b2020ce5bff4e26bd14d49c707088 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 27 Jul 2023 11:00:57 +0200 Subject: [PATCH 040/112] expose variable_may_escape --- compiler/lib/global_flow.ml | 3 +++ compiler/lib/global_flow.mli | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/compiler/lib/global_flow.ml b/compiler/lib/global_flow.ml index 90727665d6..4895530044 100644 --- a/compiler/lib/global_flow.ml +++ b/compiler/lib/global_flow.ml @@ -547,6 +547,7 @@ type info = { info_defs : def array ; info_approximation : Domain.t Var.Tbl.t ; info_may_escape : Var.ISet.t + ; info_variable_may_escape : escape_status array ; info_return_vals : Var.Set.t Var.Map.t } @@ -633,12 +634,14 @@ let f ~fast p = | No -> "n")) s) vars; + let info_variable_may_escape = variable_may_escape in let info_may_escape = Var.ISet.empty () in Array.iteri ~f:(fun i s -> if Poly.(s <> No) then Var.ISet.add info_may_escape (Var.of_idx i)) may_escape; { info_defs = defs ; info_approximation = approximation + ; info_variable_may_escape ; info_may_escape ; info_return_vals = rets } diff --git a/compiler/lib/global_flow.mli b/compiler/lib/global_flow.mli index 65d9cbfb59..61f5dbfb6a 100644 --- a/compiler/lib/global_flow.mli +++ b/compiler/lib/global_flow.mli @@ -31,10 +31,16 @@ type approx = ; others : bool (* Whether other values are possible *) } +type escape_status = + | Escape + | Escape_constant (* Escapes but we know the value is not modified *) + | No + type info = { info_defs : def array ; info_approximation : approx Var.Tbl.t ; info_may_escape : Var.ISet.t + ; info_variable_may_escape : escape_status array ; info_return_vals : Var.Set.t Var.Map.t } From aa2c32dd817e71fb00ecb7f0eb3a1bd8b9ec437d Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 27 Jul 2023 11:01:17 +0200 Subject: [PATCH 041/112] use variable_may_escape --- compiler/lib/deadcode_dgraph.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index fa9eabcea5..96d76d0b4b 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -184,6 +184,10 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = | Live fields -> live_vars.(idx) <- Live (IntSet.add i fields) | _ -> live_vars.(idx) <- Live (IntSet.singleton i) in + let variable_may_escape x = match global_info.info_variable_may_escape.(Var.idx x) with + | Escape | Escape_constant -> true + | No -> false + in let live_instruction i = match i with | Let (x, e) -> @@ -195,7 +199,7 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = match e with | Apply { args; _ } -> List.iter - ~f:(fun x -> if Var.ISet.mem global_info.info_may_escape x then add_top x) + ~f:(fun x -> if variable_may_escape x then add_top x) args | _ -> ()) | Assign (_, _) -> () @@ -212,7 +216,7 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = List.iter ~f:(fun (i, _) -> live_instruction i) block.body; match fst block.branch with | Stop -> () - | Return x -> if Var.ISet.mem global_info.info_may_escape x then add_top x + | Return x -> if variable_may_escape x then add_top x | Raise (x, _) -> add_top x | Cond (x, _, _) -> add_top x | Switch (x, _, _) -> add_top x From 938c8af3994fc3ddf7b1f81f346ceb0c056f85b8 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 27 Jul 2023 15:41:39 +0200 Subject: [PATCH 042/112] fix infinite loop bug --- compiler/lib/deadcode_dgraph.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 96d76d0b4b..d84c8475ea 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -262,7 +262,7 @@ let propagate uses defs live_vars live_table x = Var.Map.fold (fun y usage_kind live -> Domain.join (contribution y usage_kind) live) uses.(idx) - live_vars.(idx) + (Domain.join live_vars.(idx) (Var.Tbl.get live_table x)) let solver vars uses defs live_vars = let g = From 264cb33dc99b9c4c1ae0d84048ee3864ec85e394 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 28 Jul 2023 11:48:22 +0200 Subject: [PATCH 043/112] change sentinal to undefined --- compiler/lib/deadcode_dgraph.ml | 3 ++- compiler/lib/generate.ml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index d84c8475ea..4f3d1c56b8 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -399,7 +399,8 @@ end let add_sentinal p = let sentinal = Var.fresh () in - let instr, loc = Let (sentinal, Constant (Int 0l)), Before 0 in + let undefined = Prim (Extern "%undefined", []) in + let instr, loc = Let (sentinal, undefined), Before 0 in Code.prepend p [ instr, loc ], sentinal let f p sentinal global_info = diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 367e2041f2..d8d9f7bed4 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -1318,6 +1318,9 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = let prim = Share.get_prim (runtime_fun ctx) name ctx.Ctx.share in prim, const_p, queue | Extern "%closure", _ -> assert false + | Extern "%undefined", [] -> + J.(EVar (ident (Utf8_string.of_string_exn "undefined"))), const_p, queue + | Extern "%undefined", _ -> assert false | Extern "%caml_js_opt_call", f :: o :: l -> let (pf, cf), queue = access_queue' ~ctx queue f in let (po, co), queue = access_queue' ~ctx queue o in From 9c4c80d37c546683678de5a049400a0d1a08daa3 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 28 Jul 2023 14:28:45 +0200 Subject: [PATCH 044/112] begin adding unit tests --- compiler/tests-compiler/global_deadcode.ml | 42 +++++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index a367ca0b1b..95068d53c0 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -1,13 +1,45 @@ open Util -let%expect_test "" = +let%expect_test "Eliminates unused functions from functor" = let program = - compile_and_parse + compile_and_parse_whole_program {| + module Int_set = Set.Make (Int);; + + let set = Int_set.singleton 1 in + let set = Int_set.add 2 set in + print_endline (string_of_int (Int_set.find 1 set + Int_set.find 2 set)) |} in - print_fun_decl program (Some ""); + (* Expect: compiles functor members used in the program *) + print_fun_decl program (Some "find"); [%expect {| - - //end |}] \ No newline at end of file + function find(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) throw caml_maybe_attach_backtrace(Not_found, 1); + var + r = param$0[3], + v = param$0[2], + l = param$0[1], + c = caml_int_compare(x, v); + if(0 === c) return v; + var r$0 = 0 <= c ? r : l, param$0 = r$0; + } + } + //end |}]; + print_fun_decl program (Some "add"); + [%expect {| + function add(x, t){ + if(! t) return [0, 0, x, 0, 1]; + var r = t[3], v = t[2], l = t[1], c = caml_int_compare(x, v); + if(0 === c) return t; + if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} + var ll = add(x, l); + return l === ll ? t : bal(ll, v, r); + } + //end |}]; + (* Expect: does not compile unused functor member *) + print_fun_decl program (Some "union"); + [%expect {| not found |}] \ No newline at end of file From 16606a68164eed4ae8e79df48fd139ece15dd7f6 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 31 Jul 2023 11:53:33 +0200 Subject: [PATCH 045/112] add new test --- compiler/tests-compiler/global_deadcode.ml | 42 ++++++++++++++++++---- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index 95068d53c0..883fc31da5 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -2,13 +2,16 @@ open Util let%expect_test "Eliminates unused functions from functor" = let program = + (* Create two instances of Set functor so compiler can't inline one implementation. *) compile_and_parse_whole_program {| module Int_set = Set.Make (Int);; + module String_set = Set.Make (String);; - let set = Int_set.singleton 1 in - let set = Int_set.add 2 set in - print_endline (string_of_int (Int_set.find 1 set + Int_set.find 2 set)) + let int_set = Int_set.singleton 1 in + let string_set = String_set.empty in + let string_set = String_set.add "hello" string_set in + print_endline (string_of_int (Int_set.find 1 int_set) ^ (String_set.find "hello" string_set)) |} in (* Expect: compiles functor members used in the program *) @@ -23,7 +26,7 @@ let%expect_test "Eliminates unused functions from functor" = r = param$0[3], v = param$0[2], l = param$0[1], - c = caml_int_compare(x, v); + c = caml_call2(Ord[1], x, v); if(0 === c) return v; var r$0 = 0 <= c ? r : l, param$0 = r$0; } @@ -33,7 +36,7 @@ let%expect_test "Eliminates unused functions from functor" = [%expect {| function add(x, t){ if(! t) return [0, 0, x, 0, 1]; - var r = t[3], v = t[2], l = t[1], c = caml_int_compare(x, v); + var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); if(0 === c) return t; if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} var ll = add(x, l); @@ -42,4 +45,31 @@ let%expect_test "Eliminates unused functions from functor" = //end |}]; (* Expect: does not compile unused functor member *) print_fun_decl program (Some "union"); - [%expect {| not found |}] \ No newline at end of file + [%expect {| not found |}]; + print_fun_decl program (Some "inter"); + [%expect {| not found |}] + +let%expect_test "Substitutes unused fields with undefined" = + let program = + compile_and_parse + {| + let f b x = + let t = if b then (1, 2, x) else (3, x, 4) in + let (u, _, v) = t in + (u, v) + in print_int (fst (f true 1) + snd (f false 2)) + |} + in + (* Expect second field in each triple to be replaced by a sentinal variable. *) + print_fun_decl program (Some "f"); + [%expect {| + function f(b, x){ + var t = b ? [0, 1, _c_, x] : [0, 3, _c_, 4], v = t[3], u = t[1]; + return [0, u, v]; + } + //end |}]; + (* And that variable is defined as `undefined` *) + print_var_decl program "_c_"; + [%expect {| + var _c_ = undefined; + //end |}] \ No newline at end of file From a6ee4f9b3c04ac1e7d39479c81e4d0abfc26c2d1 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 31 Jul 2023 12:33:51 +0200 Subject: [PATCH 046/112] small change to stdlib --- compiler/tests-full/stdlib.cma.expected.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 498240028e..e47097c652 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -18068,9 +18068,9 @@ /*<>*/ } function make_padprec_fmt_ebb(pad, prec, fmt){ /*<>*/ if(typeof prec === "number") - var match = prec ? [0, 1, fmt] : [0, 0, fmt]; + var match = prec ? [0, 1] : [0, 0]; else - var p = prec[1], match = [0, [0, p], fmt]; + var p = prec[1], match = [0, [0, p]]; var prec$0 = match[1]; /*<>*/ if(typeof pad === "number") /*<>*/ return [0, 0, prec$0, fmt]; From 4f0c0a09e14d6d6fff327e0189d978369e828f75 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 31 Jul 2023 15:04:36 +0200 Subject: [PATCH 047/112] documentation --- compiler/lib/deadcode_dgraph.ml | 80 +++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 24 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 4f3d1c56b8..8bc101f6ac 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -14,6 +14,16 @@ * 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. + + This module provides a global liveness analysis more powerful than that found in [deadcode.ml]. In particular, + this analysis annotates blocks with the specific fields that are live. It also uses [global_flow.ml] to determine + the liveness of function return values. It first computes an initial liveness of each variable by traversing the program IR. + Then it propagates this information to the dependencies of each variable using a flow analysis solver. Lastly it replaces + dead variables with a sentinal zero variable. + + Although this module does not perform any dead-code elimination itself, it is designed to be used to identify and substitute + dead variables that are then removed by [deadcode.ml]. In particular it can allow the elimination of unused functions defined + in functors, which the original deadcode elimination cannot. *) open Code @@ -23,14 +33,16 @@ let debug = Debug.find "globaldeadcode" let times = Debug.find "times" +(** Definition of a variable [x]. *) type def = - | Expr of expr - | Param + | Expr of expr (** [x] is defined by an expression. *) + | Param (** [x] is a block or closure parameter. *) +(** Liveness of a variable [x], forming a lattice structure. *) type live = - | Top - | Live of IntSet.t - | Dead + | Top (** [x] is live and not a block. *) + | Live of IntSet.t (** [x] is a live block with a (non-empty) set of live fields. *) + | Dead (** [x] is dead. *) module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -45,6 +57,7 @@ module Domain = struct let bot = Dead + (** Join the liveness according to lattice structure. *) let join l1 l2 = match l1, l2 with | _, Top | Top, _ -> Top @@ -73,10 +86,17 @@ let definitions nv prog = prog.blocks; defs +(** Type of variable usage. *) type usage_kind = - | Compute (* variable y is used to compute x *) - | Propagate (* values of y propagate to x *) + | Compute (** variable y is used to compute x *) + | Propagate (** values of y propagate to x *) +(** Compute the adjacency list for the dependency graph of given program. An edge between + variables [x] and [y] is marked [Compute] if [x] is used in the definition of [y]. It is marked + as [Propagate] if [x] is applied as a closure or block argument the parameter [y]. + + We use information from global flow to try to add edges between function calls and their return values + at known call sites. *) let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array = let uses = Array.make nv Var.Map.empty in let add_use kind x y = uses.(Var.idx y) <- Var.Map.add x kind uses.(Var.idx y) in @@ -132,7 +152,6 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array match i with | Let (x, e) -> add_expr_uses x e | Assign (x, y) -> add_use Compute x y - (* TODO: These? *) | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> ()) block.body; (* Add deps from block branch *) @@ -152,7 +171,7 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array prog.blocks; uses -(* Return the set of variables used in a given expression *) +(** Return the set of variables used in a given expression *) let expr_vars e = let vars = Var.ISet.empty () in (match e with @@ -172,6 +191,16 @@ let expr_vars e = args); vars +(** Compute the initial liveness of each variable in the program. + + A variable [x] is marked as [Top] if + + It is used in an impure expression (as defined by [pure_expr]); + + Is used in a conditonal/switch; + + Is raised by an exception; + + Is used in another stateful instruction (like setting a block or array field); + + Or, it is returned or applied to a function and the global flow analysis marked it as escaping. + + A variable [x[i]] is marked as [Live {i}] if it is used in an instruction where field [i] is referenced or set. *) let liveness nv prog pure_funs (global_info : Global_flow.info) = let live_vars = Array.make nv Dead in let add_top v = @@ -184,7 +213,8 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = | Live fields -> live_vars.(idx) <- Live (IntSet.add i fields) | _ -> live_vars.(idx) <- Live (IntSet.singleton i) in - let variable_may_escape x = match global_info.info_variable_may_escape.(Var.idx x) with + let variable_may_escape x = + match global_info.info_variable_may_escape.(Var.idx x) with | Escape | Escape_constant -> true | No -> false in @@ -198,9 +228,7 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = add_top x; match e with | Apply { args; _ } -> - List.iter - ~f:(fun x -> if variable_may_escape x then add_top x) - args + List.iter ~f:(fun x -> if variable_may_escape x then add_top x) args | _ -> ()) | Assign (_, _) -> () | Set_field (x, i, y) -> @@ -231,8 +259,14 @@ let variables deps = Array.iteri ~f:(fun i _ -> Var.ISet.add vars (Var.of_idx i)) deps; vars +(** Propagate liveness of the usages of a variable [x] to [x]. The liveness of [x] is + defined by joining its current liveness and the contribution of each vairable [y] + that uses [x]. *) let propagate uses defs live_vars live_table x = let idx = Var.idx x in + (** Variable [y] uses [x] either in its definition ([Compute]) or as a closure/block parameter + ([Propagate]). In the latter case, the contribution is simply the liveness of [y]. In the former, + the contribution depends on the liveness of [y] and its definition. *) let contribution y usage_kind = match usage_kind with (* If x is used to compute y, we consider the liveness of y *) @@ -272,6 +306,13 @@ let solver vars uses defs live_vars = in Solver.f () (G.invert () g) (propagate uses defs live_vars) +(** Replace each instance of a dead variable with a sentinal value. + Blocks that end in dead variables are compacted to the first live entry. + Dead variables are replaced when + + They appear in a dead field of a block; or + + They are returned; or + + They are applied to a function. + *) let zero prog sentinal live_table = let compact_vars vars = let i = ref (Array.length vars - 1) in @@ -357,17 +398,6 @@ module Print = struct | Top -> "top" | Dead -> "dead" - let print_defs defs = - Format.eprintf "Definitions:\n"; - Array.iteri - ~f:(fun i def -> - Format.eprintf "v%d: " i; - (match def with - | Expr e -> Format.eprintf "%a " Print.expr e - | Param -> Format.eprintf "param"); - Format.eprintf "\n") - defs - let print_uses uses = Format.eprintf "Usages:\n"; Array.iteri @@ -397,12 +427,14 @@ module Print = struct live_table end +(** Add a sentinal variable declaration to the IR. The fresh variable is assigned to `undefined`. *) let add_sentinal p = let sentinal = Var.fresh () in let undefined = Prim (Extern "%undefined", []) in let instr, loc = Let (sentinal, undefined), Before 0 in Code.prepend p [ instr, loc ], sentinal +(** Run the liveness analysis and replace dead variables with the given sentinal. *) let f p sentinal global_info = let t = Timer.make () in let nv = Var.count () in From 50bcd077b0eb44ed4222484ddbdfd9c786e2aa21 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 1 Aug 2023 14:51:34 +0200 Subject: [PATCH 048/112] update comment --- compiler/lib/deadcode_dgraph.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 8bc101f6ac..697a1fb794 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -195,9 +195,9 @@ let expr_vars e = A variable [x] is marked as [Top] if + It is used in an impure expression (as defined by [pure_expr]); - + Is used in a conditonal/switch; - + Is raised by an exception; - + Is used in another stateful instruction (like setting a block or array field); + + It is used in a conditonal/switch; + + It is raised by an exception; + + It is used in another stateful instruction (like setting a block or array field); + Or, it is returned or applied to a function and the global flow analysis marked it as escaping. A variable [x[i]] is marked as [Live {i}] if it is used in an instruction where field [i] is referenced or set. *) From 0c8f8612cf97058585418a6841860d965bee139c Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 4 Aug 2023 11:58:38 +0200 Subject: [PATCH 049/112] changing how args are handled --- compiler/lib/deadcode_dgraph.ml | 46 +++++++-------------------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 697a1fb794..b45497df29 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -35,14 +35,14 @@ let times = Debug.find "times" (** Definition of a variable [x]. *) type def = - | Expr of expr (** [x] is defined by an expression. *) - | Param (** [x] is a block or closure parameter. *) + | Expr of expr (* [x] is defined by an expression. *) + | Param (* [x] is a block or closure parameter. *) (** Liveness of a variable [x], forming a lattice structure. *) type live = - | Top (** [x] is live and not a block. *) - | Live of IntSet.t (** [x] is a live block with a (non-empty) set of live fields. *) - | Dead (** [x] is dead. *) + | Top (* [x] is live and not a block. *) + | Live of IntSet.t (* [x] is a live block with a (non-empty) set of live fields. *) + | Dead (* [x] is dead. *) module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -131,7 +131,7 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array | _ -> ()) known); add_use Compute x f; - List.iter ~f:(add_use Compute x) args + (* List.iter ~f:(add_use Compute x) args *) | Block (_, vars, _) -> Array.iter ~f:(add_use Compute x) vars | Field (z, _) -> add_use Compute x z | Constant _ -> () @@ -171,26 +171,6 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array prog.blocks; uses -(** Return the set of variables used in a given expression *) -let expr_vars e = - let vars = Var.ISet.empty () in - (match e with - | Apply { f; args; _ } -> - Var.ISet.add vars f; - List.iter ~f:(Var.ISet.add vars) args - | Block (_, params, _) -> Array.iter ~f:(Var.ISet.add vars) params - | Field (z, _) -> Var.ISet.add vars z - | Constant _ -> () - | Closure (params, _) -> List.iter ~f:(Var.ISet.add vars) params - | Prim (_, args) -> - List.iter - ~f:(fun v -> - match v with - | Pv v -> Var.ISet.add vars v - | Pc _ -> ()) - args); - vars - (** Compute the initial liveness of each variable in the program. A variable [x] is marked as [Top] if @@ -222,14 +202,7 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = match i with | Let (x, e) -> if not (pure_expr pure_funs e) - then ( - let vars = expr_vars e in - Var.ISet.iter add_top vars; - add_top x; - match e with - | Apply { args; _ } -> - List.iter ~f:(fun x -> if variable_may_escape x then add_top x) args - | _ -> ()) + then add_top x | Assign (_, _) -> () | Set_field (x, i, y) -> add_live x i; @@ -284,6 +257,7 @@ let propagate uses defs live_vars live_table x = if Var.equal v x && IntSet.mem i fields then found := true) vars; if !found then Top else Dead + | Expr (Field (_, i)) -> Live (IntSet.singleton i) | _ -> Top) (* If y is top and y is a field access, x depends only on that field *) | Top -> ( @@ -402,7 +376,7 @@ module Print = struct Format.eprintf "Usages:\n"; Array.iteri ~f:(fun i ds -> - Format.eprintf "v%d: { " i; + Format.eprintf "%a: { " Var.print (Var.of_idx i); Var.Map.iter (fun d k -> Format.eprintf @@ -418,7 +392,7 @@ module Print = struct let print_liveness live_vars = Format.eprintf "Liveness:\n"; - Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars + Array.iteri ~f:(fun i l -> Format.eprintf "%a: %s\n" Var.print (Var.of_idx i) (live_to_string l)) live_vars let print_live_tbl live_table = Format.eprintf "Liveness with dependencies:\n"; From 05080cdd2f61da7764620d4eb443e0ff8977ec4b Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 4 Aug 2023 13:48:41 +0200 Subject: [PATCH 050/112] Revert "changing how args are handled" This reverts commit 0c8f8612cf97058585418a6841860d965bee139c. --- compiler/lib/deadcode_dgraph.ml | 46 ++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index b45497df29..697a1fb794 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -35,14 +35,14 @@ let times = Debug.find "times" (** Definition of a variable [x]. *) type def = - | Expr of expr (* [x] is defined by an expression. *) - | Param (* [x] is a block or closure parameter. *) + | Expr of expr (** [x] is defined by an expression. *) + | Param (** [x] is a block or closure parameter. *) (** Liveness of a variable [x], forming a lattice structure. *) type live = - | Top (* [x] is live and not a block. *) - | Live of IntSet.t (* [x] is a live block with a (non-empty) set of live fields. *) - | Dead (* [x] is dead. *) + | Top (** [x] is live and not a block. *) + | Live of IntSet.t (** [x] is a live block with a (non-empty) set of live fields. *) + | Dead (** [x] is dead. *) module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -131,7 +131,7 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array | _ -> ()) known); add_use Compute x f; - (* List.iter ~f:(add_use Compute x) args *) + List.iter ~f:(add_use Compute x) args | Block (_, vars, _) -> Array.iter ~f:(add_use Compute x) vars | Field (z, _) -> add_use Compute x z | Constant _ -> () @@ -171,6 +171,26 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array prog.blocks; uses +(** Return the set of variables used in a given expression *) +let expr_vars e = + let vars = Var.ISet.empty () in + (match e with + | Apply { f; args; _ } -> + Var.ISet.add vars f; + List.iter ~f:(Var.ISet.add vars) args + | Block (_, params, _) -> Array.iter ~f:(Var.ISet.add vars) params + | Field (z, _) -> Var.ISet.add vars z + | Constant _ -> () + | Closure (params, _) -> List.iter ~f:(Var.ISet.add vars) params + | Prim (_, args) -> + List.iter + ~f:(fun v -> + match v with + | Pv v -> Var.ISet.add vars v + | Pc _ -> ()) + args); + vars + (** Compute the initial liveness of each variable in the program. A variable [x] is marked as [Top] if @@ -202,7 +222,14 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = match i with | Let (x, e) -> if not (pure_expr pure_funs e) - then add_top x + then ( + let vars = expr_vars e in + Var.ISet.iter add_top vars; + add_top x; + match e with + | Apply { args; _ } -> + List.iter ~f:(fun x -> if variable_may_escape x then add_top x) args + | _ -> ()) | Assign (_, _) -> () | Set_field (x, i, y) -> add_live x i; @@ -257,7 +284,6 @@ let propagate uses defs live_vars live_table x = if Var.equal v x && IntSet.mem i fields then found := true) vars; if !found then Top else Dead - | Expr (Field (_, i)) -> Live (IntSet.singleton i) | _ -> Top) (* If y is top and y is a field access, x depends only on that field *) | Top -> ( @@ -376,7 +402,7 @@ module Print = struct Format.eprintf "Usages:\n"; Array.iteri ~f:(fun i ds -> - Format.eprintf "%a: { " Var.print (Var.of_idx i); + Format.eprintf "v%d: { " i; Var.Map.iter (fun d k -> Format.eprintf @@ -392,7 +418,7 @@ module Print = struct let print_liveness live_vars = Format.eprintf "Liveness:\n"; - Array.iteri ~f:(fun i l -> Format.eprintf "%a: %s\n" Var.print (Var.of_idx i) (live_to_string l)) live_vars + Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars let print_live_tbl live_table = Format.eprintf "Liveness with dependencies:\n"; From 40bfbe87d0eaf346774b37e08137a84df9fab7d4 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 4 Aug 2023 14:56:08 +0200 Subject: [PATCH 051/112] improve argument initial liveness/usage --- compiler/lib/deadcode_dgraph.ml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 697a1fb794..5d9dc203a2 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -85,6 +85,11 @@ let definitions nv prog = block.body) prog.blocks; defs + +let variable_may_escape x (global_info : Global_flow.info) = + match global_info.info_variable_may_escape.(Var.idx x) with + | Escape | Escape_constant -> true + | No -> false (** Type of variable usage. *) type usage_kind = @@ -131,7 +136,7 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array | _ -> ()) known); add_use Compute x f; - List.iter ~f:(add_use Compute x) args + List.iter ~f:(fun a -> if variable_may_escape a global_info then add_use Compute x a) args | Block (_, vars, _) -> Array.iter ~f:(add_use Compute x) vars | Field (z, _) -> add_use Compute x z | Constant _ -> () @@ -213,23 +218,18 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = | Live fields -> live_vars.(idx) <- Live (IntSet.add i fields) | _ -> live_vars.(idx) <- Live (IntSet.singleton i) in - let variable_may_escape x = - match global_info.info_variable_may_escape.(Var.idx x) with - | Escape | Escape_constant -> true - | No -> false - in let live_instruction i = match i with - | Let (x, e) -> + | Let (_x, e) -> if not (pure_expr pure_funs e) then ( let vars = expr_vars e in - Var.ISet.iter add_top vars; - add_top x; - match e with - | Apply { args; _ } -> - List.iter ~f:(fun x -> if variable_may_escape x then add_top x) args - | _ -> ()) + Var.ISet.iter add_top vars;) + else (match e with + | Apply { f; args; _} -> + add_top f; + List.iter ~f:(fun x -> if variable_may_escape x global_info then add_top x) args + | _ -> ()) | Assign (_, _) -> () | Set_field (x, i, y) -> add_live x i; @@ -244,7 +244,7 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = List.iter ~f:(fun (i, _) -> live_instruction i) block.body; match fst block.branch with | Stop -> () - | Return x -> if variable_may_escape x then add_top x + | Return x -> if variable_may_escape x global_info then add_top x | Raise (x, _) -> add_top x | Cond (x, _, _) -> add_top x | Switch (x, _, _) -> add_top x From d67e8ea723a2b50b7962e1d584c2b15c7e1dae2f Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 4 Aug 2023 15:04:47 +0200 Subject: [PATCH 052/112] promote var renaming changes --- compiler/tests-compiler/direct_calls.ml | 20 +- compiler/tests-compiler/gh1007.ml | 102 +- compiler/tests-full/stdlib.cma.expected.js | 4633 ++++++++++---------- 3 files changed, 2402 insertions(+), 2353 deletions(-) diff --git a/compiler/tests-compiler/direct_calls.ml b/compiler/tests-compiler/direct_calls.ml index 30fdcc82fd..98b7a4249c 100644 --- a/compiler/tests-compiler/direct_calls.ml +++ b/compiler/tests-compiler/direct_calls.ml @@ -57,26 +57,26 @@ let%expect_test "direct calls without --enable effects" = [%expect {| function test1(param){ - function f(g, x){return caml_call1(g, x);} - var _d_ = 7; - f(function(x){return x + 1 | 0;}, _d_); - var _e_ = 4.; - f(function(x){return x * 2.;}, _e_); + function f(g, x){caml_call1(g, x); return _b_;} + var _e_ = 7; + f(function(x){return x + 1 | 0;}, _e_); + var _f_ = 4.; + f(function(x){return x * 2.;}, _f_); return 0; } //end function test2(param){ - function f(g, x){return caml_call1(g, x);} - var _c_ = 7; - f(function(x){return x + 1 | 0;}, _c_); + function f(g, x){caml_call1(g, x); return _b_;} + var _d_ = 7; + f(function(x){return x + 1 | 0;}, _d_); f(function(x){return caml_call2(Stdlib[28], x, cst_a$0);}, cst_a); return 0; } //end function test3(x){ function F(symbol){function f(x){return x + 1 | 0;} return [0, f];} - var M1 = F([0]), M2 = F([0]), _b_ = M2[1].call(null, 2); - return [0, M1[1].call(null, 1), _b_]; + var M1 = F([0]), M2 = F([0]), _c_ = M2[1].call(null, 2); + return [0, M1[1].call(null, 1), _c_]; } //end function test4(x){ diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 4b96b037f1..03f0f6a170 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -372,30 +372,34 @@ let () = M.run () var even = function(n){ - if(2 < n >>> 0) return 1 - (1 - odd(n - 1 | 0)); - switch(n){ - case 0: - return 1; - case 1: - return 1 - (1 - odd(0)); - default: return 1 - (1 - odd(1)); - } + if(2 >= n >>> 0) + switch(n){ + case 0: + return _a_; + case 1: + odd(0); return _a_; + default: odd(1); return _a_; + } + odd(n - 1 | 0); + return _a_; }, odd = function(n){ - if(2 < n >>> 0) return 1 - (1 - even(n - 1 | 0)); - switch(n){ - case 0: - return 0; - case 1: - return 1 - (1 - even(0)); - default: return 1 - (1 - even(1)); - } + if(2 >= n >>> 0) + switch(n){ + case 0: + return _a_; + case 1: + even(0); return _a_; + default: even(1); return _a_; + } + even(n - 1 | 0); + return _a_; }; even(i); - var _a_ = i + 1 | 0; + var _b_ = i + 1 | 0; if(4 === i) return 0; - var i = _a_; + var i = _b_; } } //end |}] @@ -462,32 +466,36 @@ let () = M.run () closures = function(i){ function even(n){ - if(2 < n >>> 0) return 1 - (1 - odd(n - 1 | 0)); - switch(n){ - case 0: - var - f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; - delayed[1] = [0, f, delayed[1]]; - f(0); - return 1; - case 1: - return 1 - (1 - odd(0)); - default: return 1 - (1 - odd(1)); - } + if(2 >= n >>> 0) + switch(n){ + case 0: + var + f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; + delayed[1] = [0, f, delayed[1]]; + f(0); + return _c_; + case 1: + odd(0); return _c_; + default: odd(1); return _c_; + } + odd(n - 1 | 0); + return _c_; } function odd(n){ - if(2 < n >>> 0) return 1 - (1 - even(n - 1 | 0)); - switch(n){ - case 0: - var - f = function(param){return caml_call2(Stdlib_Printf[2], _a_, i);}; - delayed[1] = [0, f, delayed[1]]; - f(0); - return 0; - case 1: - return 1 - (1 - even(0)); - default: return 1 - (1 - even(1)); - } + if(2 >= n >>> 0) + switch(n){ + case 0: + var + f = function(param){return caml_call2(Stdlib_Printf[2], _a_, i);}; + delayed[1] = [0, f, delayed[1]]; + f(0); + return _c_; + case 1: + even(0); return _c_; + default: even(1); return _c_; + } + even(n - 1 | 0); + return _c_; } var block = [0, even, odd]; return block; @@ -495,12 +503,12 @@ let () = M.run () closures$0 = closures(i), even = closures$0[1]; even(i); - var _e_ = i + 1 | 0; - if(4 !== i){var i = _e_; continue;} + var _f_ = i + 1 | 0; + if(4 !== i){var i = _f_; continue;} var - _c_ = caml_call1(Stdlib_List[9], delayed[1]), - _d_ = function(f){return caml_call1(f, 0);}; - return caml_call2(Stdlib_List[17], _d_, _c_); + _d_ = caml_call1(Stdlib_List[9], delayed[1]), + _e_ = function(f){return caml_call1(f, 0);}; + return caml_call2(Stdlib_List[17], _e_, _d_); } } //end |}] diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index e47097c652..93f4d1f54d 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -1255,6 +1255,7 @@ Stdlib = global_data.Stdlib, Assert_failure = global_data.Assert_failure, Stdlib_Sys = global_data.Stdlib__Sys, + _b_ = undefined, cst_Obj_Ephemeron_blit_key = "Obj.Ephemeron.blit_key", cst_Obj_Ephemeron_check_key = "Obj.Ephemeron.check_key", cst_Obj_Ephemeron_unset_key = "Obj.Ephemeron.unset_key", @@ -1329,9 +1330,9 @@ max_ephe_length = Stdlib_Sys[13] - 2 | 0; function create(l){ /*<>*/ var - _g_ = 0 <= l ? 1 : 0, - _h_ = _g_ ? l <= max_ephe_length ? 1 : 0 : _g_; - if(1 - _h_) + _h_ = 0 <= l ? 1 : 0, + _i_ = _h_ ? l <= max_ephe_length ? 1 : 0 : _h_; + if(1 - _i_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_create); /*<>*/ return /*<>*/ runtime.caml_ephe_create @@ -1342,10 +1343,10 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _d_ = 0 <= o ? 1 : 0, - _e_ = _d_ ? o < length(e) ? 1 : 0 : _d_, - _f_ = 1 - _e_; - return _f_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _f_; + _e_ = 0 <= o ? 1 : 0, + _f_ = _e_ ? o < length(e) ? 1 : 0 : _e_, + _g_ = 1 - _f_; + return _g_ ? ( /*<>*/ caml_call1(Stdlib[1], msg), _b_) : _g_; /*<>*/ } function get_key(e, o){ /*<>*/ raise_if_invalid_offset @@ -1384,13 +1385,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _b_ = 0 !== l ? 1 : 0, - _c_ = - _b_ + _c_ = 0 !== l ? 1 : 0, + _d_ = + _c_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _b_; - /*<>*/ return _c_; + : _c_; + /*<>*/ return _d_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_blit_key); @@ -4551,6 +4552,7 @@ : runtime.caml_call_gen(f, [a0, a1]); } var + _g_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Uchar = global_data.Stdlib__Uchar, @@ -4595,14 +4597,14 @@ function init(n, f){ /*<>*/ var /*<>*/ s = /*<>*/ caml_create_bytes(n), - /*<>*/ _aq_ = n - 1 | 0, - /*<>*/ _ap_ = 0; - if(_aq_ >= 0){ - var i = _ap_; + /*<>*/ _ar_ = n - 1 | 0, + /*<>*/ _aq_ = 0; + if(_ar_ >= 0){ + var i = _aq_; for(;;){ caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); - /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; - if(_aq_ !== i){var i = _ar_; continue;} + /*<>*/ /*<>*/ var _as_ = i + 1 | 0; + if(_ar_ !== i){var i = _as_; continue;} break; } } @@ -4645,13 +4647,13 @@ function symbol(a, b){ /*<>*/ var c = a + b | 0, - _ao_ = b < 0 ? 1 : 0, + _ap_ = b < 0 ? 1 : 0, match = c < 0 ? 1 : 0, switch$0 = 0; if(a < 0){ - if(_ao_ && ! match) switch$0 = 1; + if(_ap_ && ! match) switch$0 = 1; } - else if(! _ao_ && match) switch$0 = 1; + else if(! _ap_ && match) switch$0 = 1; return switch$0 ? /*<>*/ caml_call1(Stdlib[1], cst_Bytes_extend) : c; @@ -4713,15 +4715,15 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _am_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var i = _al_; + _an_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _am_ = 0; + if(_an_ >= 0){ + var i = _am_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ !== i){var i = _an_; continue;} + /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; + if(_an_ !== i){var i = _ao_; continue;} break; } } @@ -4729,15 +4731,15 @@ /*<>*/ } function iteri(f, a){ /*<>*/ var - _aj_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + _ak_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _aj_ = 0; + if(_ak_ >= 0){ + var i = _aj_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ !== i){var i = _ak_; continue;} + /*<>*/ /*<>*/ var _al_ = i + 1 | 0; + if(_ak_ !== i){var i = _al_; continue;} break; } } @@ -4761,13 +4763,13 @@ param = tl; continue; } - var _ah_ = caml_ml_bytes_length(hd) + acc | 0; + var _ai_ = caml_ml_bytes_length(hd) + acc | 0; } else - var _ah_ = acc; + var _ai_ = acc; /*<>*/ var /*<>*/ dst = - /*<>*/ caml_create_bytes(_ah_), + /*<>*/ caml_create_bytes(_ai_), pos = pos$1, param$0 = l; for(;;){ @@ -4810,12 +4812,12 @@ /*<>*/ } function is_space(param){ /*<>*/ var - /*<>*/ _ag_ = param - 9 | 0, + /*<>*/ _ah_ = param - 9 | 0, switch$0 = 0; - if(4 < _ag_ >>> 0){ - if(23 === _ag_) switch$0 = 1; + if(4 < _ah_ >>> 0){ + if(23 === _ah_) switch$0 = 1; } - else if(2 !== _ag_) switch$0 = 1; + else if(2 !== _ah_) switch$0 = 1; return switch$0 ? 1 : 0; /*<>*/ } function trim(s){ @@ -4837,19 +4839,19 @@ function unsafe_escape(s){ /*<>*/ var /*<>*/ n = [0, 0], - _$_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ ___ = 0; - if(_$_ >= 0){ - var i$0 = ___; + _aa_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ _$_ = 0; + if(_aa_ >= 0){ + var i$0 = _$_; for(;;){ var match = caml_bytes_unsafe_get(s, i$0), switch$0 = 0; if(32 <= match){ - var _ad_ = match - 34 | 0, switch$1 = 0; - if(58 < _ad_ >>> 0){ - if(93 > _ad_) switch$1 = 1; + var _ae_ = match - 34 | 0, switch$1 = 0; + if(58 < _ae_ >>> 0){ + if(93 > _ae_) switch$1 = 1; } - else if(56 < _ad_ - 1 >>> 0) switch$0 = 1; else switch$1 = 1; - if(switch$1){var _ae_ = 1; switch$0 = 2;} + else if(56 < _ae_ - 1 >>> 0) switch$0 = 1; else switch$1 = 1; + if(switch$1){var _af_ = 1; switch$0 = 2;} } else if(11 <= match){ @@ -4858,13 +4860,13 @@ else if(8 <= match) switch$0 = 1; switch(switch$0){ case 0: - var _ae_ = 4; break; + var _af_ = 4; break; case 1: - var _ae_ = 2; break; + var _af_ = 2; break; } - n[1] = n[1] + _ae_ | 0; - /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; - if(_$_ !== i$0){var i$0 = _af_; continue;} + n[1] = n[1] + _af_ | 0; + /*<>*/ /*<>*/ var _ag_ = i$0 + 1 | 0; + if(_aa_ !== i$0){var i$0 = _ag_; continue;} break; } } @@ -4873,10 +4875,10 @@ s$0 = /*<>*/ caml_create_bytes(n[1]); n[1] = 0; /*<>*/ var - _ab_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ _aa_ = 0; - if(_ab_ >= 0){ - var i = _aa_; + _ac_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ _ab_ = 0; + if(_ac_ >= 0){ + var i = _ab_; for(;;){ var c = caml_bytes_unsafe_get(s, i), switch$2 = 0; if(35 <= c) @@ -4930,8 +4932,8 @@ caml_bytes_unsafe_set(s$0, n[1], c); break; } n[1]++; - /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; - if(_ab_ !== i){var i = _ac_; continue;} + /*<>*/ /*<>*/ var _ad_ = i + 1 | 0; + if(_ac_ !== i){var i = _ad_; continue;} break; } } @@ -4947,17 +4949,17 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _Y_ = l - 1 | 0, - /*<>*/ _X_ = 0; - if(_Y_ >= 0){ - var i = _X_; + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 0; + if(_Z_ >= 0){ + var i = _Y_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; - if(_Y_ !== i){var i = _Z_; continue;} + /*<>*/ /*<>*/ var ___ = i + 1 | 0; + if(_Z_ !== i){var i = ___; continue;} break; } } @@ -4969,17 +4971,17 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _V_ = l - 1 | 0, - /*<>*/ _U_ = 0; - if(_V_ >= 0){ - var i = _U_; + /*<>*/ _W_ = l - 1 | 0, + /*<>*/ _V_ = 0; + if(_W_ >= 0){ + var i = _V_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _W_ = i + 1 | 0; - if(_V_ !== i){var i = _W_; continue;} + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + if(_W_ !== i){var i = _X_; continue;} break; } } @@ -4988,16 +4990,16 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _S_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _R_ = 0; - if(_S_ >= 0){ - var i = _R_; + _T_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _S_ = 0; + if(_T_ >= 0){ + var i = _S_; for(;;){ r[1] = /*<>*/ caml_call2 (f, r[1], caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _T_ = i + 1 | 0; - if(_S_ !== i){var i = _T_; continue;} + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ !== i){var i = _U_; continue;} break; } } @@ -5006,16 +5008,16 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _P_ = + /*<>*/ _Q_ = /*<>*/ caml_ml_bytes_length(a) - 1 | 0; - if(_P_ >= 0){ - var i = _P_; + if(_Q_ >= 0){ + var i = _Q_; for(;;){ r[1] = /*<>*/ caml_call2 (f, caml_bytes_unsafe_get(a, i), r[1]); - /*<>*/ /*<>*/ var _Q_ = i - 1 | 0; - if(0 !== i){var i = _Q_; continue;} + /*<>*/ /*<>*/ var _R_ = i - 1 | 0; + if(0 !== i){var i = _R_; continue;} break; } } @@ -5071,8 +5073,8 @@ /*<>*/ var len_s = caml_ml_bytes_length(s), len_pre = caml_ml_bytes_length(prefix), - _O_ = len_pre <= len_s ? 1 : 0; - if(! _O_) return _O_; + _P_ = len_pre <= len_s ? 1 : 0; + if(! _P_) return _P_; var i = 0; /*<>*/ for(;;){ if(i === len_pre) /*<>*/ return 1; @@ -5088,8 +5090,8 @@ len_s = caml_ml_bytes_length(s), len_suf = caml_ml_bytes_length(suffix), diff = len_s - len_suf | 0, - _N_ = 0 <= diff ? 1 : 0; - if(! _N_) return _N_; + _O_ = 0 <= diff ? 1 : 0; + if(! _O_) return _O_; var i = 0; /*<>*/ for(;;){ if(i === len_suf) /*<>*/ return 1; @@ -5188,13 +5190,13 @@ if(0 <= i && l >= i) /*<>*/ try{ /*<>*/ index_rec(s, l, i, c); - /*<>*/ /*<>*/ var _L_ = 1; - /*<>*/ return _L_; + /*<>*/ /*<>*/ var _M_ = 1; + /*<>*/ return _M_; } - catch(_M_){ - var _K_ = caml_wrap_exception(_M_); - if(_K_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_K_, 0); + catch(_N_){ + var _L_ = caml_wrap_exception(_N_); + if(_L_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_L_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_contains_from_Bytes); @@ -5206,13 +5208,13 @@ /*<>*/ if(0 <= i && caml_ml_bytes_length(s) > i) /*<>*/ try{ /*<>*/ rindex_rec(s, i, c); - /*<>*/ /*<>*/ var _I_ = 1; - /*<>*/ return _I_; + /*<>*/ /*<>*/ var _J_ = 1; + /*<>*/ return _J_; } - catch(_J_){ - var _H_ = caml_wrap_exception(_J_); - if(_H_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_H_, 0); + catch(_K_){ + var _I_ = caml_wrap_exception(_K_); + if(_I_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_I_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_rcontains_from_Byte); @@ -5223,23 +5225,23 @@ /*<>*/ r = [0, 0], /*<>*/ j = [0, /*<>*/ caml_ml_bytes_length(s)], - /*<>*/ _D_ = + /*<>*/ _E_ = /*<>*/ caml_ml_bytes_length(s) - 1 | 0; - if(_D_ >= 0){ - var i = _D_; + if(_E_ >= 0){ + var i = _E_; for(;;){ if(caml_bytes_unsafe_get(s, i) === sep){ - var _F_ = r[1]; - r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _F_]; + var _G_ = r[1]; + r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _G_]; j[1] = i; } - /*<>*/ /*<>*/ var _G_ = i - 1 | 0; - if(0 !== i){var i = _G_; continue;} + /*<>*/ /*<>*/ var _H_ = i - 1 | 0; + if(0 !== i){var i = _H_; continue;} break; } } - var _E_ = r[1]; - /*<>*/ return [0, sub(s, 0, j[1]), _E_]; + var _F_ = r[1]; + /*<>*/ return [0, sub(s, 0, j[1]), _F_]; /*<>*/ } function to_seq(s){ function aux(i, param){ @@ -5248,14 +5250,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _B_ = i + 1 | 0; + /*<>*/ _C_ = i + 1 | 0; /*<>*/ return [0, x, - function(_C_){ /*<>*/ return aux(_B_, _C_);}]; + function(_D_){ /*<>*/ return aux(_C_, _D_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _z_ = 0; - /*<>*/ return function(_A_){ - /*<>*/ return aux(_z_, _A_);}; + /*<>*/ /*<>*/ var _A_ = 0; + /*<>*/ return function(_B_){ + /*<>*/ return aux(_A_, _B_);}; /*<>*/ } function to_seqi(s){ function aux(i, param){ @@ -5264,20 +5266,20 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _x_ = i + 1 | 0; + /*<>*/ _y_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_y_){ /*<>*/ return aux(_x_, _y_);}]; + function(_z_){ /*<>*/ return aux(_y_, _z_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _v_ = 0; - /*<>*/ return function(_w_){ - /*<>*/ return aux(_v_, _w_);}; + /*<>*/ /*<>*/ var _w_ = 0; + /*<>*/ return function(_x_){ + /*<>*/ return aux(_w_, _x_);}; /*<>*/ } function of_seq(i){ /*<>*/ var /*<>*/ n = [0, 0], /*<>*/ buf = [0, make(256, 0)]; - function _u_(c){ + function _v_(c){ /*<>*/ if(n[1] === caml_ml_bytes_length(buf[1])){ /*<>*/ /*<>*/ var new_len = @@ -5299,7 +5301,7 @@ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Seq[4], _u_, i); + (Stdlib_Seq[4], _v_, i); return sub(buf[1], 0, n[1]); /*<>*/ } function unsafe_get_uint16_le(b, i){ @@ -5316,9 +5318,9 @@ /*<>*/ } function get_int8(b, i){ /*<>*/ var - /*<>*/ _s_ = Stdlib_Sys[10] - 8 | 0, - _t_ = Stdlib_Sys[10] - 8 | 0; - return /*<>*/ caml_bytes_get(b, i) << _t_ >> _s_; + /*<>*/ _t_ = Stdlib_Sys[10] - 8 | 0, + _u_ = Stdlib_Sys[10] - 8 | 0; + return /*<>*/ caml_bytes_get(b, i) << _u_ >> _t_; /*<>*/ } function get_uint16_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5334,21 +5336,21 @@ /*<>*/ } function get_int16_ne(b, i){ /*<>*/ var - /*<>*/ _q_ = Stdlib_Sys[10] - 16 | 0, - _r_ = Stdlib_Sys[10] - 16 | 0; - return /*<>*/ caml_bytes_get16(b, i) << _r_ >> _q_; + /*<>*/ _r_ = Stdlib_Sys[10] - 16 | 0, + _s_ = Stdlib_Sys[10] - 16 | 0; + return /*<>*/ caml_bytes_get16(b, i) << _s_ >> _r_; /*<>*/ } function get_int16_le(b, i){ /*<>*/ var - /*<>*/ _o_ = Stdlib_Sys[10] - 16 | 0, - _p_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_le(b, i) << _p_ >> _o_; + /*<>*/ _p_ = Stdlib_Sys[10] - 16 | 0, + _q_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_le(b, i) << _q_ >> _p_; /*<>*/ } function get_int16_be(b, i){ /*<>*/ var - /*<>*/ _m_ = Stdlib_Sys[10] - 16 | 0, - _n_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_be(b, i) << _n_ >> _m_; + /*<>*/ _n_ = Stdlib_Sys[10] - 16 | 0, + _o_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_be(b, i) << _o_ >> _n_; /*<>*/ } function get_int32_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5376,13 +5378,17 @@ /*<>*/ } function unsafe_set_uint16_le(b, i, x){ /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)) - : /*<>*/ caml_bytes_set16(b, i, x); + ? ( /*<>*/ caml_bytes_set16 + (b, i, caml_bswap16(x)), + _g_) + : ( /*<>*/ caml_bytes_set16(b, i, x), _g_); /*<>*/ } function unsafe_set_uint16_be(b, i, x){ /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set16(b, i, x) - : /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)); + ? ( /*<>*/ caml_bytes_set16(b, i, x), _g_) + : ( /*<>*/ caml_bytes_set16 + (b, i, caml_bswap16(x)), + _g_); /*<>*/ } function set_int16_le(b, i, x){ /*<>*/ return Stdlib_Sys[11] @@ -5424,9 +5430,9 @@ dec_invalid = Stdlib_Uchar[22]; function dec_ret(n, u){ /*<>*/ /*<>*/ var - _l_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); + _m_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Uchar[21], n, _l_); + (Stdlib_Uchar[21], n, _m_); /*<>*/ } function not_in_x80_to_xBF(b){ /*<>*/ return 2 !== (b >>> 6 | 0) ? 1 : 0; @@ -5439,9 +5445,9 @@ /*<>*/ } function not_in_x90_to_xBF(b){ /*<>*/ var - _j_ = b < 144 ? 1 : 0, - _k_ = _j_ || (191 < b ? 1 : 0); - return _k_; + _k_ = b < 144 ? 1 : 0, + _l_ = _k_ || (191 < b ? 1 : 0); + return _l_; /*<>*/ } function not_in_x80_to_x8F(b){ /*<>*/ return 8 !== (b >>> 4 | 0) ? 1 : 0; @@ -5644,9 +5650,9 @@ (dec_invalid, 1); /*<>*/ } function set_utf_8_uchar(b, i, u){ - /*<>*/ function set(_i_, _h_, _g_){ - /*<>*/ caml_bytes_unsafe_set(_i_, _h_, _g_); - return 0; + /*<>*/ function set(_j_, _i_, _h_){ + /*<>*/ caml_bytes_unsafe_set(_j_, _i_, _h_); + return _g_; } /*<>*/ var /*<>*/ max = @@ -6867,6 +6873,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } /*<>*/ var + _b_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Assert_failure = global_data.Assert_failure, @@ -6894,15 +6901,15 @@ /*<>*/ res = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, 0)), - /*<>*/ _as_ = l - 1 | 0, - /*<>*/ _ar_ = 1; - if(_as_ >= 1){ - var i = _ar_; + /*<>*/ _at_ = l - 1 | 0, + /*<>*/ _as_ = 1; + if(_at_ >= 1){ + var i = _as_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _at_ = i + 1 | 0; - if(_as_ !== i){var i = _at_; continue;} + /*<>*/ /*<>*/ var _au_ = i + 1 | 0; + if(_at_ !== i){var i = _au_; continue;} break; } } @@ -6912,14 +6919,14 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_make_vect(sx, [0]), - /*<>*/ _ap_ = sx - 1 | 0, - /*<>*/ _ao_ = 0; - if(_ap_ >= 0){ - var x = _ao_; + /*<>*/ _aq_ = sx - 1 | 0, + /*<>*/ _ap_ = 0; + if(_aq_ >= 0){ + var x = _ap_; for(;;){ res[1 + x] = /*<>*/ caml_make_vect(sy, init); - /*<>*/ /*<>*/ var _aq_ = x + 1 | 0; - if(_ap_ !== x){var x = _aq_; continue;} + /*<>*/ /*<>*/ var _ar_ = x + 1 | 0; + if(_aq_ !== x){var x = _ar_; continue;} break; } } @@ -6971,14 +6978,14 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _am_ = a.length - 1 - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var i = _al_; + _an_ = a.length - 1 - 1 | 0, + /*<>*/ _am_ = 0; + if(_an_ >= 0){ + var i = _am_; for(;;){ /*<>*/ /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ !== i){var i = _an_; continue;} + /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; + if(_an_ !== i){var i = _ao_; continue;} break; } } @@ -6989,15 +6996,15 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_iter2_arrays_must_ha); /*<>*/ var - _aj_ = a.length - 1 - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + _ak_ = a.length - 1 - 1 | 0, + /*<>*/ _aj_ = 0; + if(_ak_ >= 0){ + var i = _aj_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ !== i){var i = _ak_; continue;} + /*<>*/ /*<>*/ var _al_ = i + 1 | 0; + if(_ak_ !== i){var i = _al_; continue;} break; } } @@ -7010,15 +7017,15 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _ag_ = l - 1 | 0, - /*<>*/ _af_ = 1; - if(_ag_ >= 1){ - var i = _af_; + /*<>*/ _ah_ = l - 1 | 0, + /*<>*/ _ag_ = 1; + if(_ah_ >= 1){ + var i = _ag_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_ag_ !== i){var i = _ah_; continue;} + /*<>*/ /*<>*/ var _ai_ = i + 1 | 0; + if(_ah_ !== i){var i = _ai_; continue;} break; } } @@ -7036,15 +7043,15 @@ /*<>*/ r = /*<>*/ caml_make_vect (la, /*<>*/ caml_call2(f, a[1], b[1])), - /*<>*/ _ad_ = la - 1 | 0, - /*<>*/ _ac_ = 1; - if(_ad_ >= 1){ - var i = _ac_; + /*<>*/ _ae_ = la - 1 | 0, + /*<>*/ _ad_ = 1; + if(_ae_ >= 1){ + var i = _ad_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ !== i){var i = _ae_; continue;} + /*<>*/ /*<>*/ var _af_ = i + 1 | 0; + if(_ae_ !== i){var i = _af_; continue;} break; } } @@ -7052,15 +7059,15 @@ /*<>*/ } function iteri(f, a){ /*<>*/ var - _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i = _$_; + _ab_ = a.length - 1 - 1 | 0, + /*<>*/ _aa_ = 0; + if(_ab_ >= 0){ + var i = _aa_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ !== i){var i = _ab_; continue;} + /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; + if(_ab_ !== i){var i = _ac_; continue;} break; } } @@ -7073,15 +7080,15 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call2(f, 0, a[1])), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 1; - if(_Z_ >= 1){ - var i = _Y_; + /*<>*/ ___ = l - 1 | 0, + /*<>*/ _Z_ = 1; + if(___ >= 1){ + var i = _Z_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ !== i){var i = ___; continue;} + /*<>*/ /*<>*/ var _$_ = i + 1 | 0; + if(___ !== i){var i = _$_; continue;} break; } } @@ -7131,14 +7138,14 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _W_ = a.length - 1 - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + _X_ = a.length - 1 - 1 | 0, + /*<>*/ _W_ = 0; + if(_X_ >= 0){ + var i = _W_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ !== i){var i = _X_; continue;} + /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; + if(_X_ !== i){var i = _Y_; continue;} break; } } @@ -7156,10 +7163,10 @@ /*<>*/ output_array = /*<>*/ caml_make_vect(len, elt), /*<>*/ acc$1 = [0, acc$0], - /*<>*/ _T_ = len - 1 | 0, - /*<>*/ _S_ = 1; - if(_T_ >= 1){ - var i = _S_; + /*<>*/ _U_ = len - 1 | 0, + /*<>*/ _T_ = 1; + if(_U_ >= 1){ + var i = _T_; for(;;){ /*<>*/ var /*<>*/ match$0 = @@ -7168,8 +7175,8 @@ acc$2 = match$0[1]; acc$1[1] = acc$2; /*<>*/ output_array[1 + i] = elt$0; - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ !== i){var i = _U_; continue;} + /*<>*/ /*<>*/ var _V_ = i + 1 | 0; + if(_U_ !== i){var i = _V_; continue;} break; } } @@ -7178,13 +7185,13 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _Q_ = a.length - 1 - 1 | 0; - if(_Q_ >= 0){ - var i = _Q_; + /*<>*/ _R_ = a.length - 1 - 1 | 0; + if(_R_ >= 0){ + var i = _R_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _R_ = i - 1 | 0; - if(0 !== i){var i = _R_; continue;} + /*<>*/ /*<>*/ var _S_ = i - 1 | 0; + if(0 !== i){var i = _S_; continue;} break; } } @@ -7305,16 +7312,16 @@ /*<>*/ caml_make_vect(n, a0), /*<>*/ b = /*<>*/ caml_make_vect(n, b0), - /*<>*/ _O_ = n - 1 | 0, - /*<>*/ _N_ = 1; - if(_O_ >= 1){ - var i = _N_; + /*<>*/ _P_ = n - 1 | 0, + /*<>*/ _O_ = 1; + if(_P_ >= 1){ + var i = _O_; for(;;){ var match$0 = x[1 + i], bi = match$0[2], ai = match$0[1]; /*<>*/ a[1 + i] = ai; /*<>*/ b[1 + i] = bi; - /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ !== i){var i = _P_; continue;} + /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; + if(_P_ !== i){var i = _Q_; continue;} break; } } @@ -7331,14 +7338,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), - /*<>*/ _L_ = na - 1 | 0, - /*<>*/ _K_ = 1; - if(_L_ >= 1){ - var i = _K_; + /*<>*/ _M_ = na - 1 | 0, + /*<>*/ _L_ = 1; + if(_M_ >= 1){ + var i = _L_; for(;;){ x[1 + i] = [0, a[1 + i], b[1 + i]]; - /*<>*/ /*<>*/ var _M_ = i + 1 | 0; - if(_L_ !== i){var i = _M_; continue;} + /*<>*/ /*<>*/ var _N_ = i + 1 | 0; + if(_M_ !== i){var i = _N_; continue;} break; } } @@ -7353,42 +7360,42 @@ /*<>*/ x = [0, i31]; if((i31 + 2 | 0) < l){ /*<>*/ var - /*<>*/ _D_ = i31 + 1 | 0, - /*<>*/ _E_ = caml_check_bound(a, _D_)[1 + _D_]; + /*<>*/ _E_ = i31 + 1 | 0, + /*<>*/ _F_ = caml_check_bound(a, _E_)[1 + _E_]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _E_) + (cmp, caml_check_bound(a, i31)[1 + i31], _F_) < 0) x[1] = i31 + 1 | 0; /*<>*/ var - /*<>*/ _F_ = i31 + 2 | 0, - /*<>*/ _G_ = caml_check_bound(a, _F_)[1 + _F_], - _H_ = x[1]; + /*<>*/ _G_ = i31 + 2 | 0, + /*<>*/ _H_ = caml_check_bound(a, _G_)[1 + _G_], + _I_ = x[1]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, _H_)[1 + _H_], _G_) + (cmp, caml_check_bound(a, _I_)[1 + _I_], _H_) < 0) x[1] = i31 + 2 | 0; return x[1]; } if((i31 + 1 | 0) < l){ /*<>*/ var - _I_ = i31 + 1 | 0, - /*<>*/ _J_ = caml_check_bound(a, _I_)[1 + _I_]; + _J_ = i31 + 1 | 0, + /*<>*/ _K_ = caml_check_bound(a, _J_)[1 + _J_]; /*<>*/ if (0 > /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _J_)) + (cmp, caml_check_bound(a, i31)[1 + i31], _K_)) /*<>*/ return i31 + 1 | 0; } if(i31 < l) /*<>*/ return i31; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _x_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_x_ >= 0){ - var i$6 = _x_; + var l = a.length - 1, _y_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_y_ >= 0){ + var i$6 = _y_; for(;;){ /*<>*/ /*<>*/ var e$1 = caml_check_bound(a, i$6)[1 + i$6]; @@ -7403,8 +7410,8 @@ /*<>*/ caml_call2 (cmp, caml_check_bound(a, j)[1 + j], e$1)){ /*<>*/ /*<>*/ var - _u_ = caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; + _v_ = caml_check_bound(a, j)[1 + j]; + /*<>*/ caml_check_bound(a, i)[1 + i] = _v_; var i = j; continue; } @@ -7418,14 +7425,14 @@ var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } - /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; - if(0 !== i$6){var i$6 = _C_; continue;} + /*<>*/ /*<>*/ var _D_ = i$6 - 1 | 0; + if(0 !== i$6){var i$6 = _D_; continue;} break; } } - /*<>*/ /*<>*/ var _y_ = l - 1 | 0; - if(_y_ >= 2){ - var i$4 = _y_; + /*<>*/ /*<>*/ var _z_ = l - 1 | 0; + if(_z_ >= 2){ + var i$4 = _z_; a: for(;;){ /*<>*/ /*<>*/ var @@ -7437,8 +7444,8 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ j$0 = maxson(i$4, i$1), - /*<>*/ _v_ = caml_check_bound(a, j$0)[1 + j$0]; - /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _v_; + /*<>*/ _w_ = caml_check_bound(a, j$0)[1 + j$0]; + /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _w_; var i$1 = j$0; } } @@ -7459,30 +7466,30 @@ /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; else{ /*<>*/ /*<>*/ var - _w_ = caml_check_bound(a, father)[1 + father]; - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _w_; + _x_ = caml_check_bound(a, father)[1 + father]; + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _x_; if(0 < father){var i$3 = father; continue;} /*<>*/ caml_check_bound(a, 0)[1] = e$0; } - /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; - if(2 !== i$4){var i$4 = _B_; continue a;} + /*<>*/ /*<>*/ var _C_ = i$4 - 1 | 0; + if(2 !== i$4){var i$4 = _C_; continue a;} break; } } break; } } - var _z_ = 1 < l ? 1 : 0; - if(_z_){ + var _A_ = 1 < l ? 1 : 0; + if(_A_){ /*<>*/ /*<>*/ var e = caml_check_bound(a, 1)[2]; /*<>*/ a[2] = caml_check_bound(a, 0)[1]; /*<>*/ a[1] = e; - var _A_ = 0; + var _B_ = 0; } else - var _A_ = _z_; - /*<>*/ return _A_; + var _B_ = _A_; + /*<>*/ return _B_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -7525,37 +7532,37 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _m_ = len - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var i = _l_; + _n_ = len - 1 | 0, + /*<>*/ _m_ = 0; + if(_n_ >= 0){ + var i = _m_; a: for(;;){ /*<>*/ var - _n_ = srcofs + i | 0, - /*<>*/ e = caml_check_bound(a, _n_)[1 + _n_], + _o_ = srcofs + i | 0, + /*<>*/ e = caml_check_bound(a, _o_)[1 + _o_], /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; for(;;){ if(dstofs <= j[1]){ - var _o_ = j[1]; + var _p_ = j[1]; /*<>*/ if (0 < /*<>*/ caml_call2 - (cmp, caml_check_bound(dst, _o_)[1 + _o_], e)){ + (cmp, caml_check_bound(dst, _p_)[1 + _p_], e)){ /*<>*/ var - _p_ = j[1], - /*<>*/ _q_ = caml_check_bound(dst, _p_)[1 + _p_], - _r_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _r_)[1 + _r_] = _q_; + _q_ = j[1], + /*<>*/ _r_ = caml_check_bound(dst, _q_)[1 + _q_], + _s_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = _r_; j[1] += -1; continue; } } - var _s_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; - /*<>*/ /*<>*/ var _t_ = i + 1 | 0; - if(_m_ !== i){var i = _t_; continue a;} + var _t_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _t_)[1 + _t_] = e; + /*<>*/ /*<>*/ var _u_ = i + 1 | 0; + if(_n_ !== i){var i = _u_; continue a;} break; } break; @@ -7564,13 +7571,16 @@ return 0; /*<>*/ } function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5) - /*<>*/ return isortto(srcofs, dst, dstofs, len); + /*<>*/ if(len <= 5){ + /*<>*/ isortto(srcofs, dst, dstofs, len); + /*<>*/ return _b_; + } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ return merge - (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ merge + (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ return _b_; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -7589,14 +7599,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _j_ = i + 1 | 0; + /*<>*/ _k_ = i + 1 | 0; /*<>*/ return [0, x, - function(_k_){ /*<>*/ return aux(_j_, _k_);}]; + function(_l_){ /*<>*/ return aux(_k_, _l_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _h_ = 0; - /*<>*/ return function(_i_){ - /*<>*/ return aux(_h_, _i_);}; + /*<>*/ /*<>*/ var _i_ = 0; + /*<>*/ return function(_j_){ + /*<>*/ return aux(_i_, _j_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -7604,22 +7614,22 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _f_ = i + 1 | 0; + /*<>*/ _g_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_g_){ /*<>*/ return aux(_f_, _g_);}]; + function(_h_){ /*<>*/ return aux(_g_, _h_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _d_ = 0; - /*<>*/ return function(_e_){ - /*<>*/ return aux(_d_, _e_);}; + /*<>*/ /*<>*/ var _e_ = 0; + /*<>*/ return function(_f_){ + /*<>*/ return aux(_e_, _f_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _b_ = 0; - function _c_(acc, x){ + /*<>*/ var _c_ = 0; + function _d_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ /*<>*/ var - l = /*<>*/ caml_call3(Stdlib_Seq[5], _c_, _b_, i$2); + l = /*<>*/ caml_call3(Stdlib_Seq[5], _d_, _c_, i$2); if(! l) /*<>*/ return [0]; /*<>*/ var tl = l[2], @@ -7718,6 +7728,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var + _j_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Stdlib_List = global_data.Stdlib__List, @@ -7760,8 +7771,8 @@ pi = 3.141592653589793; function is_integer(x){ /*<>*/ var - _aq_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; - return _aq_ ? is_finite(x) : _aq_; + _ar_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; + return _ar_ ? is_finite(x) : _ar_; /*<>*/ } function succ(x){ /*<>*/ return /*<>*/ caml_nextafter_float @@ -7858,32 +7869,34 @@ (10, 100, 0, x); /*<>*/ } function unsafe_fill(a, ofs, len, v){ - /*<>*/ var _ao_ = (ofs + len | 0) - 1 | 0; - if(_ao_ >= ofs){ + /*<>*/ var _ap_ = (ofs + len | 0) - 1 | 0; + if(_ap_ >= ofs){ var i = ofs; for(;;){ /*<>*/ a[1 + i] = v; - /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; - if(_ao_ !== i){var i = _ap_; continue;} + /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; + if(_ap_ !== i){var i = _aq_; continue;} break; } } return 0; /*<>*/ } function check(a, ofs, len, msg){ - /*<>*/ var _ak_ = ofs < 0 ? 1 : 0; - if(_ak_) - var _al_ = _ak_; + /*<>*/ var _al_ = ofs < 0 ? 1 : 0; + if(_al_) + var _am_ = _al_; else{ - var _am_ = len < 0 ? 1 : 0; - if(_am_) - var _al_ = _am_; + var _an_ = len < 0 ? 1 : 0; + if(_an_) + var _am_ = _an_; else var - _an_ = (ofs + len | 0) < 0 ? 1 : 0, - _al_ = _an_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); + _ao_ = (ofs + len | 0) < 0 ? 1 : 0, + _am_ = _ao_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); } - return _al_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _al_; + return _am_ + ? ( /*<>*/ caml_call1(Stdlib[1], msg), _j_) + : _am_; /*<>*/ } function make(n, v){ /*<>*/ /*<>*/ var @@ -7898,15 +7911,15 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_floatarray_create(l), - /*<>*/ _ai_ = l - 1 | 0, - /*<>*/ _ah_ = 0; - if(_ai_ >= 0){ - var i = _ah_; + /*<>*/ _aj_ = l - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; - if(_ai_ !== i){var i = _aj_; continue;} + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ !== i){var i = _ak_; continue;} break; } } @@ -7991,11 +8004,11 @@ (src, sofs, dst, dofs, len); /*<>*/ } function to_list(a){ - /*<>*/ function _af_(_ag_){ - /*<>*/ return a[1 + _ag_]; + /*<>*/ function _ag_(_ah_){ + /*<>*/ return a[1 + _ah_]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[10], a.length - 1, _af_); + (Stdlib_List[10], a.length - 1, _ag_); /*<>*/ } function of_list(l){ /*<>*/ var @@ -8016,15 +8029,15 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _ad_ = a.length - 1 - 1 | 0, - /*<>*/ _ac_ = 0; - if(_ad_ >= 0){ - var i = _ac_; + _ae_ = a.length - 1 - 1 | 0, + /*<>*/ _ad_ = 0; + if(_ae_ >= 0){ + var i = _ad_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ !== i){var i = _ae_; continue;} + /*<>*/ /*<>*/ var _af_ = i + 1 | 0; + if(_ae_ !== i){var i = _af_; continue;} break; } } @@ -8035,15 +8048,15 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_iter2_arrays_m); /*<>*/ var - _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i = _$_; + _ab_ = a.length - 1 - 1 | 0, + /*<>*/ _aa_ = 0; + if(_ab_ >= 0){ + var i = _aa_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ !== i){var i = _ab_; continue;} + /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; + if(_ab_ !== i){var i = _ac_; continue;} break; } } @@ -8054,15 +8067,15 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 0; - if(_Z_ >= 0){ - var i = _Y_; + /*<>*/ ___ = l - 1 | 0, + /*<>*/ _Z_ = 0; + if(___ >= 0){ + var i = _Z_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ !== i){var i = ___; continue;} + /*<>*/ /*<>*/ var _$_ = i + 1 | 0; + if(___ !== i){var i = _$_; continue;} break; } } @@ -8078,15 +8091,15 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_floatarray_create(la), - /*<>*/ _W_ = la - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + /*<>*/ _X_ = la - 1 | 0, + /*<>*/ _W_ = 0; + if(_X_ >= 0){ + var i = _W_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ !== i){var i = _X_; continue;} + /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; + if(_X_ !== i){var i = _Y_; continue;} break; } } @@ -8094,15 +8107,15 @@ /*<>*/ } function iteri(f, a){ /*<>*/ var - _T_ = a.length - 1 - 1 | 0, - /*<>*/ _S_ = 0; - if(_T_ >= 0){ - var i = _S_; + _U_ = a.length - 1 - 1 | 0, + /*<>*/ _T_ = 0; + if(_U_ >= 0){ + var i = _T_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ !== i){var i = _U_; continue;} + /*<>*/ /*<>*/ var _V_ = i + 1 | 0; + if(_U_ !== i){var i = _V_; continue;} break; } } @@ -8113,15 +8126,15 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _Q_ = l - 1 | 0, - /*<>*/ _P_ = 0; - if(_Q_ >= 0){ - var i = _P_; + /*<>*/ _R_ = l - 1 | 0, + /*<>*/ _Q_ = 0; + if(_R_ >= 0){ + var i = _Q_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _R_ = i + 1 | 0; - if(_Q_ !== i){var i = _R_; continue;} + /*<>*/ /*<>*/ var _S_ = i + 1 | 0; + if(_R_ !== i){var i = _S_; continue;} break; } } @@ -8130,14 +8143,14 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _N_ = a.length - 1 - 1 | 0, - /*<>*/ _M_ = 0; - if(_N_ >= 0){ - var i = _M_; + _O_ = a.length - 1 - 1 | 0, + /*<>*/ _N_ = 0; + if(_O_ >= 0){ + var i = _N_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _O_ = i + 1 | 0; - if(_N_ !== i){var i = _O_; continue;} + /*<>*/ /*<>*/ var _P_ = i + 1 | 0; + if(_O_ !== i){var i = _P_; continue;} break; } } @@ -8146,13 +8159,13 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _K_ = a.length - 1 - 1 | 0; - if(_K_ >= 0){ - var i = _K_; + /*<>*/ _L_ = a.length - 1 - 1 | 0; + if(_L_ >= 0){ + var i = _L_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _L_ = i - 1 | 0; - if(0 !== i){var i = _L_; continue;} + /*<>*/ /*<>*/ var _M_ = i - 1 | 0; + if(0 !== i){var i = _M_; continue;} break; } } @@ -8241,9 +8254,9 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _E_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_E_ >= 0){ - var i$6 = _E_; + var l = a.length - 1, _F_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_F_ >= 0){ + var i$6 = _F_; for(;;){ /*<>*/ /*<>*/ var e$1 = /*<>*/ caml_array_get(a, i$6); @@ -8274,14 +8287,14 @@ /*<>*/ /*<>*/ caml_array_set (a, i$0, e$1); } - /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; - if(0 !== i$6){var i$6 = _J_; continue;} + /*<>*/ /*<>*/ var _K_ = i$6 - 1 | 0; + if(0 !== i$6){var i$6 = _K_; continue;} break; } } - /*<>*/ /*<>*/ var _F_ = l - 1 | 0; - if(_F_ >= 2){ - var i$4 = _F_; + /*<>*/ /*<>*/ var _G_ = l - 1 | 0; + if(_G_ >= 2){ + var i$4 = _G_; a: for(;;){ /*<>*/ /*<>*/ var @@ -8322,25 +8335,25 @@ /*<>*/ /*<>*/ caml_array_set (a, 0, e$0); } - /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; - if(2 !== i$4){var i$4 = _I_; continue a;} + /*<>*/ /*<>*/ var _J_ = i$4 - 1 | 0; + if(2 !== i$4){var i$4 = _J_; continue a;} break; } } break; } } - var _G_ = 1 < l ? 1 : 0; - if(_G_){ + var _H_ = 1 < l ? 1 : 0; + if(_H_){ /*<>*/ /*<>*/ var e = /*<>*/ caml_array_get(a, 1); /*<>*/ /*<>*/ caml_array_set (a, 1, /*<>*/ caml_array_get(a, 0)); - var _H_ = /*<>*/ caml_array_set(a, 0, e); + var _I_ = /*<>*/ caml_array_set(a, 0, e); } else - var _H_ = _G_; - /*<>*/ return _H_; + var _I_ = _H_; + /*<>*/ return _I_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -8388,10 +8401,10 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _C_ = len - 1 | 0, - /*<>*/ _B_ = 0; - if(_C_ >= 0){ - var i = _B_; + _D_ = len - 1 | 0, + /*<>*/ _C_ = 0; + if(_D_ >= 0){ + var i = _C_; a: for(;;){ /*<>*/ var @@ -8415,8 +8428,8 @@ } /*<>*/ /*<>*/ caml_array_set (dst, j[1] + 1 | 0, e); - /*<>*/ /*<>*/ var _D_ = i + 1 | 0; - if(_C_ !== i){var i = _D_; continue a;} + /*<>*/ /*<>*/ var _E_ = i + 1 | 0; + if(_D_ !== i){var i = _E_; continue a;} break; } break; @@ -8425,13 +8438,16 @@ return 0; /*<>*/ } function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5) - /*<>*/ return isortto(srcofs, dst, dstofs, len); + /*<>*/ if(len <= 5){ + /*<>*/ isortto(srcofs, dst, dstofs, len); + /*<>*/ return _j_; + } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ return merge - (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ merge + (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ return _j_; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -8450,14 +8466,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _z_ = i + 1 | 0; + /*<>*/ _A_ = i + 1 | 0; /*<>*/ return [0, x, - function(_A_){ /*<>*/ return aux(_z_, _A_);}]; + function(_B_){ /*<>*/ return aux(_A_, _B_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ return function(_y_){ - /*<>*/ return aux(_x_, _y_);}; + /*<>*/ /*<>*/ var _y_ = 0; + /*<>*/ return function(_z_){ + /*<>*/ return aux(_y_, _z_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -8465,23 +8481,23 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _v_ = i + 1 | 0; + /*<>*/ _w_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_w_){ /*<>*/ return aux(_v_, _w_);}]; + function(_x_){ /*<>*/ return aux(_w_, _x_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _t_ = 0; - /*<>*/ return function(_u_){ - /*<>*/ return aux(_t_, _u_);}; + /*<>*/ /*<>*/ var _u_ = 0; + /*<>*/ return function(_v_){ + /*<>*/ return aux(_u_, _v_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _r_ = 0; - function _s_(acc, x){ + /*<>*/ var _s_ = 0; + function _t_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ var /*<>*/ l = - /*<>*/ caml_call3(Stdlib_Seq[5], _s_, _r_, i$2), + /*<>*/ caml_call3(Stdlib_Seq[5], _t_, _s_, i$2), /*<>*/ len = /*<>*/ caml_call1(Stdlib_List[1], l), /*<>*/ a = @@ -8506,15 +8522,15 @@ /*<>*/ r = /*<>*/ runtime.caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _p_ = l - 1 | 0, - /*<>*/ _o_ = 1; - if(_p_ >= 1){ - var i = _o_; + /*<>*/ _q_ = l - 1 | 0, + /*<>*/ _p_ = 1; + if(_q_ >= 1){ + var i = _p_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(_p_ !== i){var i = _q_; continue;} + /*<>*/ /*<>*/ var _r_ = i + 1 | 0; + if(_q_ !== i){var i = _r_; continue;} break; } } @@ -8525,15 +8541,15 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _m_ = l - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var i = _l_; + /*<>*/ _n_ = l - 1 | 0, + /*<>*/ _m_ = 0; + if(_n_ >= 0){ + var i = _m_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _n_ = i + 1 | 0; - if(_m_ !== i){var i = _n_; continue;} + /*<>*/ /*<>*/ var _o_ = i + 1 | 0; + if(_n_ !== i){var i = _o_; continue;} break; } } @@ -8545,7 +8561,7 @@ _e_ = caml_array_get, _f_ = [0, - function(_k_){ /*<>*/ return _k_.length - 1;}, + function(_l_){ /*<>*/ return _l_.length - 1;}, _e_, _d_, make, @@ -8612,7 +8628,7 @@ min_max_num, hash, [0, - function(_j_){ /*<>*/ return _j_.length - 1;}, + function(_k_){ /*<>*/ return _k_.length - 1;}, _i_, _h_, make, @@ -9437,6 +9453,7 @@ 0, 0, 0], + _a_ = undefined, cst_syntax_error = "syntax error"; function grow_stacks(param){ /*<>*/ var @@ -9463,7 +9480,7 @@ (Stdlib_Array[8], env[4], 0, new_end, 0, oldsize); env[4] = new_end; env[5] = newsize; - return 0; + return _a_; /*<>*/ } function clear_parser(param){ /*<>*/ /*<>*/ caml_call4 @@ -9516,17 +9533,17 @@ case 4: try{ /*<>*/ var - _i_ = env[13], - /*<>*/ _j_ = + _j_ = env[13], + /*<>*/ _k_ = /*<>*/ caml_call1 - (caml_check_bound(tables[1], _i_)[1 + _i_], env), - /*<>*/ _k_ = 4, - value = _j_, - action = _k_; + (caml_check_bound(tables[1], _j_)[1 + _j_], env), + /*<>*/ _l_ = 4, + value = _k_, + action = _l_; } - catch(_m_){ - var _h_ = caml_wrap_exception(_m_); - if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); + catch(_n_){ + var _i_ = caml_wrap_exception(_n_); + if(_i_ !== Parse_error) throw caml_maybe_attach_backtrace(_i_, 0); var value = 0, action = 5; } var cmd = action, arg = value; @@ -9563,9 +9580,9 @@ ? 1 : 0; /*<>*/ /*<>*/ var - _l_ = /*<>*/ runtime.caml_obj_tag(tok); - /*<>*/ return caml_check_bound(tables[3], _l_) - [1 + _l_] + _m_ = /*<>*/ runtime.caml_obj_tag(tok); + /*<>*/ return caml_check_bound(tables[3], _m_) + [1 + _m_] === curr_char ? 1 : 0; @@ -9575,21 +9592,21 @@ } /*<>*/ } function peek_val(env, n){ - /*<>*/ var _g_ = env[11] - n | 0; - /*<>*/ return caml_check_bound(env[2], _g_)[1 + _g_]; + /*<>*/ var _h_ = env[11] - n | 0; + /*<>*/ return caml_check_bound(env[2], _h_)[1 + _h_]; /*<>*/ } function symbol_start_pos(param){ /*<>*/ var i$1 = env[12], i = i$1; /*<>*/ for(;;){ if(0 >= i){ - var _f_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _f_)[1 + _f_]; + var _g_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _g_)[1 + _g_]; } /*<>*/ var - _d_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ st = caml_check_bound(env[3], _d_)[1 + _d_], _e_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ en = caml_check_bound(env[4], _e_)[1 + _e_]; + /*<>*/ st = caml_check_bound(env[3], _e_)[1 + _e_], + _f_ = (env[11] - i | 0) + 1 | 0, + /*<>*/ en = caml_check_bound(env[4], _f_)[1 + _f_]; /*<>*/ if ( /*<>*/ runtime.caml_notequal(st, en)) /*<>*/ return st; @@ -9599,16 +9616,16 @@ } /*<>*/ } function symbol_end_pos(param){ - /*<>*/ var _c_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _c_)[1 + _c_]; + /*<>*/ var _d_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _d_)[1 + _d_]; /*<>*/ } function rhs_start_pos(n){ - /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[3], _b_)[1 + _b_]; + /*<>*/ var _c_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[3], _c_)[1 + _c_]; /*<>*/ } function rhs_end_pos(n){ - /*<>*/ var _a_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[4], _a_)[1 + _a_]; + /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[4], _b_)[1 + _b_]; /*<>*/ } function symbol_start(param){ /*<>*/ return symbol_start_pos(0)[4]; @@ -11973,6 +11990,7 @@ Stdlib = global_data.Stdlib, Stdlib_String = global_data.Stdlib__String, Assert_failure = global_data.Assert_failure, + _b_ = undefined, cst_Buffer_truncate = "Buffer.truncate", _a_ = [0, "buffer.ml", 220, 9], cst_Buffer_add_channel = "Buffer.add_channel", @@ -12064,7 +12082,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_Bytes[11], b[1][1], 0, new_buffer, 0, b[2]); b[1] = [0, new_buffer, new_len[1]]; - return 0; + return _b_; } /*<>*/ } function add_char(b, c){ @@ -12136,14 +12154,14 @@ } /*<>*/ } function add_substring(b, s, offset, len){ - /*<>*/ var _r_ = offset < 0 ? 1 : 0; - if(_r_) - var _s_ = _r_; + /*<>*/ var _s_ = offset < 0 ? 1 : 0; + if(_s_) + var _t_ = _s_; else var - _t_ = len < 0 ? 1 : 0, - _s_ = _t_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); - if(_s_) + _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); /*<>*/ var @@ -12198,9 +12216,9 @@ /*<>*/ } function add_channel(b, ic, to_read$1){ /*<>*/ var - _p_ = to_read$1 < 0 ? 1 : 0, - _q_ = _p_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); - if(_q_) + _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(b[1][2] < (b[2] + to_read$1 | 0)) @@ -12246,8 +12264,8 @@ i$4 = 0; /*<>*/ for(;;){ if(i$4 >= lim$1){ - var _o_ = 92 === previous ? 1 : 0; - return _o_ ? add_char(b, previous) : _o_; + var _p_ = 92 === previous ? 1 : 0; + return _p_ ? add_char(b, previous) : _p_; } /*<>*/ /*<>*/ var previous$0 = /*<>*/ caml_string_get(s, i$4); @@ -12382,14 +12400,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _m_ = i + 1 | 0; + /*<>*/ _n_ = i + 1 | 0; /*<>*/ return [0, x, - function(_n_){ /*<>*/ return aux(_m_, _n_);}]; + function(_o_){ /*<>*/ return aux(_n_, _o_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _k_ = 0; - /*<>*/ return function(_l_){ - /*<>*/ return aux(_k_, _l_);}; + /*<>*/ /*<>*/ var _l_ = 0; + /*<>*/ return function(_m_){ + /*<>*/ return aux(_l_, _m_);}; /*<>*/ } function to_seqi(b){ function aux(i, param){ @@ -12398,21 +12416,21 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _i_ = i + 1 | 0; + /*<>*/ _j_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_j_){ /*<>*/ return aux(_i_, _j_);}]; + function(_k_){ /*<>*/ return aux(_j_, _k_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _g_ = 0; - /*<>*/ return function(_h_){ - /*<>*/ return aux(_g_, _h_);}; + /*<>*/ /*<>*/ var _h_ = 0; + /*<>*/ return function(_i_){ + /*<>*/ return aux(_h_, _i_);}; /*<>*/ } function add_seq(b, seq){ - /*<>*/ function _e_(_f_){ - /*<>*/ return add_char(b, _f_); + /*<>*/ function _f_(_g_){ + /*<>*/ return add_char(b, _g_); } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _e_, seq); + (Stdlib_Seq[4], _f_, seq); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var b = create(32); @@ -12491,8 +12509,8 @@ return 0; /*<>*/ } function add_int16_le(b, x){ - /*<>*/ var _d_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; - return add_int16_ne(b, _d_); + /*<>*/ var _e_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; + return add_int16_ne(b, _e_); /*<>*/ } function add_int16_be(b, x){ /*<>*/ var x$0 = Stdlib_Sys[11] ? x : caml_bswap16(x); @@ -12500,8 +12518,8 @@ /*<>*/ } function add_int32_le(b, x){ /*<>*/ var - _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; - /*<>*/ return add_int32_ne(b, _c_); + _d_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; + /*<>*/ return add_int32_ne(b, _d_); /*<>*/ } function add_int32_be(b, x){ /*<>*/ var @@ -12510,8 +12528,8 @@ /*<>*/ } function add_int64_le(b, x){ /*<>*/ var - _b_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; - /*<>*/ return add_int64_ne(b, _b_); + _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; + /*<>*/ return add_int64_ne(b, _c_); /*<>*/ } function add_int64_be(b, x){ /*<>*/ var @@ -12757,6 +12775,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var + _a_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Mutex = global_data.Stdlib__Mutex, Stdlib_Condition = global_data.Stdlib__Condition, @@ -12775,8 +12794,8 @@ function create_dls(param){ /*<>*/ /*<>*/ var st = /*<>*/ caml_make_vect(8, unique_value); - /*<>*/ return /*<>*/ caml_domain_dls_set - (st); + /*<>*/ /*<>*/ caml_domain_dls_set(st); + /*<>*/ return _a_; /*<>*/ } /*<>*/ create_dls(0); /*<>*/ var @@ -12865,7 +12884,7 @@ /*<>*/ first_spawn_function = [0, function(param){ - /*<>*/ return 0; + /*<>*/ return _a_; /*<>*/ }]; function before_first_spawn(f){ /*<>*/ if @@ -12886,7 +12905,7 @@ at_exit_key = new_key (0, - function(param, _e_){ + function(param, _f_){ /*<>*/ return 0; /*<>*/ }); function at_exit(f){ @@ -12921,8 +12940,8 @@ /*<>*/ }; } /*<>*/ /*<>*/ var - _a_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); - function _b_(param){ + _b_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); + function _c_(param){ /*<>*/ var split = param[2], k = param[1], idx = k[1]; /*<>*/ return [0, idx, @@ -12930,7 +12949,7 @@ /*<>*/ } /*<>*/ var /*<>*/ pk = - /*<>*/ caml_call2(Stdlib_List[19], _b_, _a_), + /*<>*/ caml_call2(Stdlib_List[19], _c_, _b_), /*<>*/ term_mutex = /*<>*/ caml_call1(Stdlib_Mutex[1], 0), /*<>*/ term_condition = @@ -12941,7 +12960,7 @@ /*<>*/ try{ /*<>*/ create_dls(0); var - _c_ = + _d_ = function(param){ /*<>*/ var v = param[2], @@ -12951,7 +12970,7 @@ /*<>*/ return 0; /*<>*/ }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _c_, pk); + (Stdlib_List[17], _d_, pk); /*<>*/ /*<>*/ var res = /*<>*/ caml_call1(f, 0); } @@ -12967,8 +12986,8 @@ catch(ex){ /*<>*/ var ex$0 = caml_wrap_exception(ex), - /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, - result$0 = _d_; + /*<>*/ _e_ = 0 === result[0] ? [1, ex$0] : result, + result$0 = _e_; } /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], term_mutex); @@ -13100,6 +13119,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var + _$_ = undefined, global_data = runtime.caml_get_global_data(), cst$9 = "%{", cst$10 = "%}", @@ -13426,14 +13446,14 @@ /*<>*/ var str_ind = c >>> 3 | 0, mask = 1 << (c & 7), - /*<>*/ _dU_ = + /*<>*/ _dT_ = /*<>*/ runtime.caml_bytes_get (char_set, str_ind) | mask; /*<>*/ return /*<>*/ caml_bytes_set (char_set, str_ind, - /*<>*/ caml_call1(Stdlib[29], _dU_)); + /*<>*/ caml_call1(Stdlib[29], _dT_)); /*<>*/ } function freeze_char_set(char_set){ /*<>*/ return /*<>*/ caml_call1 @@ -13445,19 +13465,19 @@ i = 0; for(;;){ /*<>*/ /*<>*/ var - _dS_ = + _dR_ = /*<>*/ caml_string_get(char_set, i) ^ 255; /*<>*/ /*<>*/ caml_bytes_set (char_set$0, i, - /*<>*/ caml_call1(Stdlib[29], _dS_)); + /*<>*/ caml_call1(Stdlib[29], _dR_)); /*<>*/ /*<>*/ var - _dT_ = i + 1 | 0; + _dS_ = i + 1 | 0; if(31 === i) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], char_set$0); - var i = _dT_; + var i = _dS_; } /*<>*/ } function is_in_char_set(char_set, c){ @@ -13517,11 +13537,11 @@ case 6: var prec_opt = ign[2], pad_opt$5 = ign[1]; if(prec_opt) - var ndec = prec_opt[1], _dR_ = [0, ndec]; + var ndec = prec_opt[1], _dQ_ = [0, ndec]; else - var _dR_ = 0; + var _dQ_ = 0; /*<>*/ return [0, - [8, _a_, pad_of_pad_opt(pad_opt$5), _dR_, fmt]]; + [8, _a_, pad_of_pad_opt(pad_opt$5), _dQ_, fmt]]; case 7: var pad_opt$6 = ign[1]; /*<>*/ return [0, @@ -13554,9 +13574,8 @@ function buffer_check_size(buf, overhead){ /*<>*/ var len = runtime.caml_ml_bytes_length(buf[2]), - min_len = buf[1] + overhead | 0, - _dP_ = len < min_len ? 1 : 0; - if(_dP_){ + min_len = buf[1] + overhead | 0; + if(len < min_len){ /*<>*/ var /*<>*/ new_len = /*<>*/ caml_call2 @@ -13566,18 +13585,15 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_Bytes[11], buf[2], 0, new_str, 0, len); buf[2] = new_str; - var _dQ_ = 0; } - else - var _dQ_ = _dP_; - return _dQ_; + return _$_; /*<>*/ } function buffer_add_char(buf, c){ /*<>*/ buffer_check_size(buf, 1); /*<>*/ /*<>*/ caml_bytes_set (buf[2], buf[1], c); buf[1] = buf[1] + 1 | 0; - return 0; + return _$_; /*<>*/ } function buffer_add_string(buf, s){ /*<>*/ var @@ -13586,7 +13602,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_String[48], s, 0, buf[2], buf[1], str_len); buf[1] = buf[1] + str_len | 0; - return 0; + return _$_; /*<>*/ } function buffer_contents(buf){ /*<>*/ return caml_call3 @@ -13642,68 +13658,74 @@ function bprint_padty(buf, padty){ /*<>*/ switch(padty){ case 0: - /*<>*/ return buffer_add_char(buf, 45); + /*<>*/ buffer_add_char(buf, 45); + /*<>*/ return _$_; case 1: - /*<>*/ return 0; + /*<>*/ return _$_; default: - /*<>*/ return buffer_add_char(buf, 48); + /*<>*/ buffer_add_char(buf, 48); + /*<>*/ return _$_; } /*<>*/ } function bprint_ignored_flag(buf, ign_flag){ /*<>*/ return ign_flag - ? buffer_add_char(buf, 95) + ? (buffer_add_char(buf, 95), _$_) : ign_flag; /*<>*/ } function bprint_pad_opt(buf, pad_opt){ /*<>*/ if(! pad_opt) - /*<>*/ return 0; + /*<>*/ return _$_; var width = pad_opt[1]; - /*<>*/ return buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], width)); + /*<>*/ buffer_add_string + (buf, + /*<>*/ caml_call1(Stdlib_Int[12], width)); + /*<>*/ return _$_; /*<>*/ } function bprint_padding(buf, pad){ /*<>*/ if(typeof pad === "number") - /*<>*/ return 0; + /*<>*/ return _$_; if(0 === pad[0]){ var n = pad[2], padty = pad[1]; /*<>*/ bprint_padty(buf, padty); - /*<>*/ return buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], n)); + /*<>*/ buffer_add_string + (buf, + /*<>*/ caml_call1(Stdlib_Int[12], n)); + /*<>*/ return _$_; } var padty$0 = pad[1]; /*<>*/ bprint_padty(buf, padty$0); - /*<>*/ return buffer_add_char(buf, 42); + /*<>*/ buffer_add_char(buf, 42); + /*<>*/ return _$_; /*<>*/ } function bprint_precision(buf, prec){ /*<>*/ if(typeof prec === "number") - return prec ? buffer_add_string(buf, cst) : 0; + return prec ? (buffer_add_string(buf, cst), _$_) : _$_; var n = prec[1]; /*<>*/ buffer_add_char(buf, 46); - /*<>*/ return buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], n)); + /*<>*/ buffer_add_string + (buf, + /*<>*/ caml_call1(Stdlib_Int[12], n)); + /*<>*/ return _$_; /*<>*/ } function bprint_iconv_flag(buf, iconv){ /*<>*/ switch(iconv){ case 1: case 4: - /*<>*/ return buffer_add_char(buf, 43); + /*<>*/ buffer_add_char(buf, 43); + /*<>*/ return _$_; case 2: case 5: - /*<>*/ return buffer_add_char(buf, 32); + /*<>*/ buffer_add_char(buf, 32); + /*<>*/ return _$_; case 7: case 9: case 11: case 13: case 14: case 15: - /*<>*/ return buffer_add_char(buf, 35); - default: /*<>*/ return 0; + /*<>*/ buffer_add_char(buf, 35); + /*<>*/ return _$_; + default: /*<>*/ return _$_; } /*<>*/ } function bprint_altint_fmt(buf, ign_flag, iconv, pad, prec, c){ @@ -13713,8 +13735,9 @@ /*<>*/ bprint_padding(buf, pad); /*<>*/ bprint_precision(buf, prec); /*<>*/ buffer_add_char(buf, c); - /*<>*/ return buffer_add_char - (buf, char_of_iconv(iconv)); + /*<>*/ buffer_add_char + (buf, char_of_iconv(iconv)); + /*<>*/ return _$_; /*<>*/ } function bprint_fconv_flag(buf, fconv){ /*<>*/ switch(fconv[1]){ @@ -13723,7 +13746,7 @@ /*<>*/ buffer_add_char(buf, 43); break; default: /*<>*/ buffer_add_char(buf, 32); } - return 8 <= fconv[2] ? buffer_add_char(buf, 35) : 0; + return 8 <= fconv[2] ? (buffer_add_char(buf, 35), _$_) : _$_; /*<>*/ } function string_of_formatting_lit(formatting_lit){ /*<>*/ if @@ -13753,40 +13776,40 @@ default: /*<>*/ var c = formatting_lit[1], - /*<>*/ _dO_ = + /*<>*/ _dP_ = /*<>*/ caml_call2 (Stdlib_String[1], 1, c); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _dO_); + (Stdlib[28], cst$7, _dP_); } /*<>*/ } function bprint_char_literal(buf, chr){ /*<>*/ return 37 === chr - ? buffer_add_string(buf, cst$8) - : buffer_add_char(buf, chr); + ? (buffer_add_string(buf, cst$8), _$_) + : (buffer_add_char(buf, chr), _$_); /*<>*/ } function bprint_string_literal(buf, str){ /*<>*/ var - _dM_ = caml_ml_string_length(str) - 1 | 0, - /*<>*/ _dL_ = 0; - if(_dM_ >= 0){ - var i = _dL_; + _dN_ = caml_ml_string_length(str) - 1 | 0, + /*<>*/ _dM_ = 0; + if(_dN_ >= 0){ + var i = _dM_; for(;;){ /*<>*/ bprint_char_literal (buf, /*<>*/ caml_string_get(str, i)); /*<>*/ /*<>*/ var - _dN_ = i + 1 | 0; - if(_dM_ !== i){var i = _dN_; continue;} + _dO_ = i + 1 | 0; + if(_dN_ !== i){var i = _dO_; continue;} break; } } - return 0; + return _$_; /*<>*/ } function bprint_fmtty(buf, fmtty){ /*<>*/ var fmtty$0 = fmtty; /*<>*/ for(;;){ if(typeof fmtty$0 === "number") - /*<>*/ return 0; + /*<>*/ return _$_; switch(fmtty$0[0]){ case 0: var fmtty$1 = fmtty$0[1]; @@ -13886,7 +13909,7 @@ a: /*<>*/ for(;;){ if(typeof fmt$0 === "number") - /*<>*/ return 0; + /*<>*/ return _$_; switch(fmt$0[0]){ case 0: var rest = fmt$0[1]; @@ -14090,11 +14113,11 @@ /*<>*/ caml_call1 (Stdlib[29], i); return 37 === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37)) + ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37), _$_) : 64 === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64)) - : buffer_add_char(buf, c); + ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64), _$_) + : (buffer_add_char(buf, c), _$_); /*<>*/ }; /*<>*/ buffer_add_char(buf, 91); /*<>*/ var @@ -14112,18 +14135,18 @@ /*<>*/ before = /*<>*/ caml_call1 (Stdlib_Char[1], c - 1 | 0), - /*<>*/ _dH_ = + /*<>*/ _dI_ = is_in_char_set(set, c); - /*<>*/ if(_dH_) + /*<>*/ if(_dI_) /*<>*/ var - /*<>*/ _dI_ = - is_in_char_set(set, before), /*<>*/ _dJ_ = - _dI_ ? is_in_char_set(set, after) : _dI_, - _dK_ = 1 - _dJ_; + is_in_char_set(set, before), + /*<>*/ _dK_ = + _dJ_ ? is_in_char_set(set, after) : _dJ_, + _dL_ = 1 - _dK_; else - var _dK_ = _dH_; - /*<>*/ return _dK_; + var _dL_ = _dI_; + /*<>*/ return _dL_; /*<>*/ } return is_alone; }, @@ -14267,12 +14290,12 @@ (buf, ign_flag$0); switch(counter){ case 0: - var _dD_ = 108; break; + var _dE_ = 108; break; case 1: - var _dD_ = 110; break; - default: var _dD_ = 78; + var _dE_ = 110; break; + default: var _dE_ = 78; } - /*<>*/ buffer_add_char(buf, _dD_); + /*<>*/ buffer_add_char(buf, _dE_); var fmt$0 = rest$20, ign_flag$0 = 0; continue; case 22: @@ -14296,19 +14319,19 @@ /*<>*/ var rest$23 = fmt$0[3], arity = fmt$0[1], - /*<>*/ _dF_ = + /*<>*/ _dG_ = int_of_custom_arity(arity), - _dE_ = 1; - if(_dF_ >= 1){ - var i$8 = _dE_; + _dF_ = 1; + if(_dG_ >= 1){ + var i$8 = _dF_; for(;;){ /*<>*/ buffer_add_char(buf, 37); /*<>*/ bprint_ignored_flag (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 63); /*<>*/ /*<>*/ var - _dG_ = i$8 + 1 | 0; - if(_dF_ !== i$8){var i$8 = _dG_; continue;} + _dH_ = i$8 + 1 | 0; + if(_dG_ !== i$8){var i$8 = _dH_; continue;} break; } } @@ -14382,17 +14405,17 @@ ed = match[3], af = match[2], fa = match[1], - _di_ = + _dj_ = function(param){ /*<>*/ af(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _di_, + _dj_, ed, de]; case 1: @@ -14403,17 +14426,17 @@ ed$0 = match$0[3], af$0 = match$0[2], fa$0 = match$0[1], - _dj_ = + _dk_ = function(param){ /*<>*/ af$0(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$0(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dj_, + _dk_, ed$0, de$0]; case 2: @@ -14424,17 +14447,17 @@ ed$1 = match$1[3], af$1 = match$1[2], fa$1 = match$1[1], - _dk_ = + _dl_ = function(param){ /*<>*/ af$1(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$1(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dk_, + _dl_, ed$1, de$1]; case 3: @@ -14445,17 +14468,17 @@ ed$2 = match$2[3], af$2 = match$2[2], fa$2 = match$2[1], - _dl_ = + _dm_ = function(param){ /*<>*/ af$2(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$2(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dl_, + _dm_, ed$2, de$2]; case 4: @@ -14466,17 +14489,17 @@ ed$3 = match$3[3], af$3 = match$3[2], fa$3 = match$3[1], - _dm_ = + _dn_ = function(param){ /*<>*/ af$3(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$3(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dm_, + _dn_, ed$3, de$3]; case 5: @@ -14487,17 +14510,17 @@ ed$4 = match$4[3], af$4 = match$4[2], fa$4 = match$4[1], - _dn_ = + _do_ = function(param){ /*<>*/ af$4(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$4(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dn_, + _do_, ed$4, de$4]; case 6: @@ -14508,17 +14531,17 @@ ed$5 = match$5[3], af$5 = match$5[2], fa$5 = match$5[1], - _do_ = + _dp_ = function(param){ /*<>*/ af$5(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$5(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _do_, + _dp_, ed$5, de$5]; case 7: @@ -14529,17 +14552,17 @@ ed$6 = match$6[3], af$6 = match$6[2], fa$6 = match$6[1], - _dp_ = + _dq_ = function(param){ /*<>*/ af$6(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$6(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dp_, + _dq_, ed$6, de$6]; case 8: @@ -14550,17 +14573,17 @@ ed$7 = match$7[3], af$7 = match$7[2], fa$7 = match$7[1], - _dq_ = + _dr_ = function(param){ /*<>*/ af$7(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$7(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dq_, + _dr_, ed$7, de$7]; case 9: @@ -14579,33 +14602,33 @@ dj = match$9[3], ga = match$9[2], ag = match$9[1], - _dr_ = + _ds_ = function(param){ /*<>*/ jd(0); /*<>*/ de$8(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _ds_ = + _dt_ = function(param){ /*<>*/ ed$8(0); /*<>*/ dj(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dt_ = + _du_ = function(param){ /*<>*/ ga(0); /*<>*/ af$8(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$8(0); /*<>*/ ag(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, + _du_, _dt_, - _ds_, - _dr_]; + _ds_]; case 10: /*<>*/ var rest$9 = param[1], @@ -14615,17 +14638,17 @@ ed$9 = match$10[3], af$9 = match$10[2], fa$9 = match$10[1], - _du_ = + _dv_ = function(param){ /*<>*/ af$9(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$9(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _du_, + _dv_, ed$9, de$9]; case 11: @@ -14637,17 +14660,17 @@ ed$10 = match$11[3], af$10 = match$11[2], fa$10 = match$11[1], - _dv_ = + _dw_ = function(param){ /*<>*/ af$10(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$10(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dv_, + _dw_, ed$10, de$10]; case 12: @@ -14659,17 +14682,17 @@ ed$11 = match$12[3], af$11 = match$12[2], fa$11 = match$12[1], - _dw_ = + _dx_ = function(param){ /*<>*/ af$11(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$11(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dw_, + _dx_, ed$11, de$11]; case 13: @@ -14681,29 +14704,29 @@ ed$12 = match$13[3], af$12 = match$13[2], fa$12 = match$13[1], - /*<>*/ _dx_ = + /*<>*/ _dy_ = function(param){ /*<>*/ de$12(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dy_ = + _dz_ = function(param){ /*<>*/ ed$12(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dz_ = + _dA_ = function(param){ /*<>*/ af$12(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$12(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, + _dA_, _dz_, - _dy_, - _dx_]; + _dy_]; default: /*<>*/ var rest$13 = param[1], @@ -14713,46 +14736,46 @@ ed$13 = match$14[3], af$13 = match$14[2], fa$13 = match$14[1], - /*<>*/ _dA_ = + /*<>*/ _dB_ = function(param){ /*<>*/ de$13(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dB_ = + _dC_ = function(param){ /*<>*/ ed$13(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, - _dC_ = + _dD_ = function(param){ /*<>*/ af$13(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$13(0); - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, + _dD_, _dC_, - _dB_, - _dA_]; + _dB_]; } - /*<>*/ function _df_(param){ - /*<>*/ return 0; + /*<>*/ function _dg_(param){ + /*<>*/ return _$_; /*<>*/ } - function _dg_(param){ - /*<>*/ return 0; - /*<>*/ } function _dh_(param){ - /*<>*/ return 0; + /*<>*/ return _$_; + /*<>*/ } + function _di_(param){ + /*<>*/ return _$_; /*<>*/ } /*<>*/ return [0, function(param){ - /*<>*/ return 0; + /*<>*/ return _$_; /*<>*/ }, + _di_, _dh_, - _dg_, - _df_]; + _dg_]; /*<>*/ } function trans(ty1, ty2){ /*<>*/ var switch$0 = 0; @@ -15006,11 +15029,11 @@ /*<>*/ var rest2$7 = ty2[2], ty2$0 = ty2[1], - /*<>*/ _de_ = + /*<>*/ _df_ = trans(rest1$7, rest2$7); /*<>*/ return [8, trans(ty1$0, ty2$0), - _de_]; + _df_]; case 10: break; case 11: switch$0 = 1; break; @@ -15302,13 +15325,13 @@ /*<>*/ var rest$13 = fmtty$0[2], formatting_gen = fmtty$0[1], - /*<>*/ _db_ = fmtty_of_fmt(rest$13); + /*<>*/ _dc_ = fmtty_of_fmt(rest$13); if(0 === formatting_gen[0]) - var fmt = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt); + var fmt = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt); else - var fmt$0 = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt$0); + var fmt$0 = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt$0); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], _dc_, _db_); + (CamlinternalFormatBasics[1], _dd_, _dc_); case 19: var rest$14 = fmtty$0[1]; /*<>*/ return [13, @@ -15360,9 +15383,9 @@ case 9: /*<>*/ var fmtty$6 = ign[2], - /*<>*/ _dd_ = fmtty_of_fmt(fmtty$5); + /*<>*/ _de_ = fmtty_of_fmt(fmtty$5); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], fmtty$6, _dd_); + (CamlinternalFormatBasics[1], fmtty$6, _de_); case 10: var fmtty$0 = fmtty$5; continue; default: var fmtty$0 = fmtty$5; continue; @@ -15417,11 +15440,11 @@ /*<>*/ } function type_format(fmt, fmtty){ /*<>*/ /*<>*/ var - _da_ = type_format_gen(fmt, fmtty); - if(typeof _da_[2] !== "number") + _db_ = type_format_gen(fmt, fmtty); + if(typeof _db_[2] !== "number") /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); - var fmt$0 = _da_[1]; + var fmt$0 = _db_[1]; /*<>*/ return fmt$0; /*<>*/ } function type_ignored_param_one(ign, fmt, fmtty){ @@ -15706,7 +15729,7 @@ fmt_rest$13 = fmt[3], sub_fmtty$1 = fmt[2], pad_opt$0 = fmt[1], - /*<>*/ _c__ = + /*<>*/ _c$_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty1)]; @@ -15715,7 +15738,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty$1)], - _c__)) + _c$_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -15885,12 +15908,12 @@ /*<>*/ var sub_fmtty$3 = ign[2], pad_opt$2 = ign[1], - /*<>*/ _c$_ = + /*<>*/ _da_ = type_ignored_format_substituti(sub_fmtty$3, rest, fmtty0), - match$43 = _c$_[2], + match$43 = _da_[2], fmtty$21 = match$43[2], fmt$22 = match$43[1], - sub_fmtty$4 = _c$_[1]; + sub_fmtty$4 = _da_[1]; /*<>*/ return [0, [23, [9, pad_opt$2, sub_fmtty$4], fmt$22], fmtty$21]; @@ -16082,7 +16105,7 @@ sub_fmtty_rest$17 = sub_fmtty[3], sub2_fmtty$2 = sub_fmtty[2], sub1_fmtty$0 = sub_fmtty[1], - /*<>*/ _c8_ = + /*<>*/ _c9_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty)]; @@ -16091,11 +16114,11 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty$0)], - _c8_)) + _c9_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ /*<>*/ var - _c9_ = + _c__ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$1)]; @@ -16104,7 +16127,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$2)], - _c9_)) + _c__)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -16196,11 +16219,11 @@ /*<>*/ } function recast(fmt, fmtty){ /*<>*/ /*<>*/ var - _c7_ = symm(fmtty); + _c8_ = symm(fmtty); /*<>*/ return type_format (fmt, /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _c7_)); + (CamlinternalFormatBasics[2], _c8_)); /*<>*/ } function fix_padding(padty, width, str){ /*<>*/ var @@ -16210,10 +16233,10 @@ /*<>*/ caml_call1(Stdlib[18], width); if(width$0 <= len) /*<>*/ return str; /*<>*/ var - _c6_ = 2 === padty$0 ? 48 : 32, + _c7_ = 2 === padty$0 ? 48 : 32, /*<>*/ res = /*<>*/ caml_call2 - (Stdlib_Bytes[1], width$0, _c6_); + (Stdlib_Bytes[1], width$0, _c7_); /*<>*/ switch(padty$0){ case 0: /*<>*/ /*<>*/ caml_call5 @@ -16418,15 +16441,15 @@ /*<>*/ return s; /*<>*/ var /*<>*/ n = [0, 0], - _c1_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c0_ = 0; - if(_c1_ >= 0){ - var i$0 = _c0_; + _c2_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c1_ = 0; + if(_c2_ >= 0){ + var i$0 = _c1_; for(;;){ if(9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) n[1]++; /*<>*/ /*<>*/ var - _c5_ = i$0 + 1 | 0; - if(_c1_ !== i$0){var i$0 = _c5_; continue;} + _c6_ = i$0 + 1 | 0; + if(_c2_ !== i$0){var i$0 = _c6_; continue;} break; } } @@ -16440,15 +16463,15 @@ /*<>*/ /*<>*/ caml_bytes_set (buf, pos[1], c); pos[1]++; - return 0; + return _$_; /*<>*/ } /*<>*/ var /*<>*/ left = [0, ((digits - 1 | 0) % 3 | 0) + 1 | 0], - _c3_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c2_ = 0; - if(_c3_ >= 0){ - var i = _c2_; + _c4_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c3_ = 0; + if(_c4_ >= 0){ + var i = _c3_; for(;;){ var c = caml_string_unsafe_get(s, i); if(9 < c - 48 >>> 0) @@ -16462,8 +16485,8 @@ /*<>*/ put(c); } /*<>*/ /*<>*/ var - _c4_ = i + 1 | 0; - if(_c3_ !== i){var i = _c4_; continue;} + _c5_ = i + 1 | 0; + if(_c4_ !== i){var i = _c5_; continue;} break; } } @@ -16473,139 +16496,139 @@ function convert_int(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cZ_ = cst_d$0; break; + var _c0_ = cst_d$0; break; case 2: - var _cZ_ = cst_d$1; break; + var _c0_ = cst_d$1; break; case 4: - var _cZ_ = cst_i$1; break; + var _c0_ = cst_i$1; break; case 5: - var _cZ_ = cst_i$2; break; + var _c0_ = cst_i$2; break; case 6: - var _cZ_ = cst_x; break; + var _c0_ = cst_x; break; case 7: - var _cZ_ = cst_x$0; break; + var _c0_ = cst_x$0; break; case 8: - var _cZ_ = cst_X; break; + var _c0_ = cst_X; break; case 9: - var _cZ_ = cst_X$0; break; + var _c0_ = cst_X$0; break; case 10: - var _cZ_ = cst_o; break; + var _c0_ = cst_o; break; case 11: - var _cZ_ = cst_o$0; break; + var _c0_ = cst_o$0; break; case 0: case 13: - var _cZ_ = cst_d; break; + var _c0_ = cst_d; break; case 3: case 14: - var _cZ_ = cst_i$0; break; - default: var _cZ_ = cst_u; + var _c0_ = cst_i$0; break; + default: var _c0_ = cst_u; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cZ_, n)); + /*<>*/ caml_format_int(_c0_, n)); /*<>*/ } function convert_int32(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cY_ = cst_ld$0; break; + var _cZ_ = cst_ld$0; break; case 2: - var _cY_ = cst_ld$1; break; + var _cZ_ = cst_ld$1; break; case 4: - var _cY_ = cst_li$1; break; + var _cZ_ = cst_li$1; break; case 5: - var _cY_ = cst_li$2; break; + var _cZ_ = cst_li$2; break; case 6: - var _cY_ = cst_lx; break; + var _cZ_ = cst_lx; break; case 7: - var _cY_ = cst_lx$0; break; + var _cZ_ = cst_lx$0; break; case 8: - var _cY_ = cst_lX; break; + var _cZ_ = cst_lX; break; case 9: - var _cY_ = cst_lX$0; break; + var _cZ_ = cst_lX$0; break; case 10: - var _cY_ = cst_lo; break; + var _cZ_ = cst_lo; break; case 11: - var _cY_ = cst_lo$0; break; + var _cZ_ = cst_lo$0; break; case 0: case 13: - var _cY_ = cst_ld; break; + var _cZ_ = cst_ld; break; case 3: case 14: - var _cY_ = cst_li$0; break; - default: var _cY_ = cst_lu; + var _cZ_ = cst_li$0; break; + default: var _cZ_ = cst_lu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cY_, n)); + /*<>*/ caml_format_int(_cZ_, n)); /*<>*/ } function convert_nativeint(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cX_ = cst_nd$0; break; + var _cY_ = cst_nd$0; break; case 2: - var _cX_ = cst_nd$1; break; + var _cY_ = cst_nd$1; break; case 4: - var _cX_ = cst_ni$1; break; + var _cY_ = cst_ni$1; break; case 5: - var _cX_ = cst_ni$2; break; + var _cY_ = cst_ni$2; break; case 6: - var _cX_ = cst_nx; break; + var _cY_ = cst_nx; break; case 7: - var _cX_ = cst_nx$0; break; + var _cY_ = cst_nx$0; break; case 8: - var _cX_ = cst_nX; break; + var _cY_ = cst_nX; break; case 9: - var _cX_ = cst_nX$0; break; + var _cY_ = cst_nX$0; break; case 10: - var _cX_ = cst_no; break; + var _cY_ = cst_no; break; case 11: - var _cX_ = cst_no$0; break; + var _cY_ = cst_no$0; break; case 0: case 13: - var _cX_ = cst_nd; break; + var _cY_ = cst_nd; break; case 3: case 14: - var _cX_ = cst_ni$0; break; - default: var _cX_ = cst_nu; + var _cY_ = cst_ni$0; break; + default: var _cY_ = cst_nu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cX_, n)); + /*<>*/ caml_format_int(_cY_, n)); /*<>*/ } function convert_int64(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cW_ = cst_Ld$0; break; + var _cX_ = cst_Ld$0; break; case 2: - var _cW_ = cst_Ld$1; break; + var _cX_ = cst_Ld$1; break; case 4: - var _cW_ = cst_Li$1; break; + var _cX_ = cst_Li$1; break; case 5: - var _cW_ = cst_Li$2; break; + var _cX_ = cst_Li$2; break; case 6: - var _cW_ = cst_Lx; break; + var _cX_ = cst_Lx; break; case 7: - var _cW_ = cst_Lx$0; break; + var _cX_ = cst_Lx$0; break; case 8: - var _cW_ = cst_LX; break; + var _cX_ = cst_LX; break; case 9: - var _cW_ = cst_LX$0; break; + var _cX_ = cst_LX$0; break; case 10: - var _cW_ = cst_Lo; break; + var _cX_ = cst_Lo; break; case 11: - var _cW_ = cst_Lo$0; break; + var _cX_ = cst_Lo$0; break; case 0: case 13: - var _cW_ = cst_Ld; break; + var _cX_ = cst_Ld; break; case 3: case 14: - var _cW_ = cst_Li$0; break; - default: var _cW_ = cst_Lu; + var _cX_ = cst_Li$0; break; + default: var _cX_ = cst_Lu; } /*<>*/ return transform_int_alt (iconv, /*<>*/ runtime.caml_int64_format - (_cW_, n)); + (_cX_, n)); /*<>*/ } function convert_float(fconv, prec, x){ function hex(param){ @@ -16637,41 +16660,41 @@ i = 0; /*<>*/ for(;;){ if(i === len) - var _cT_ = 0; + var _cU_ = 0; else{ /*<>*/ var - /*<>*/ _cS_ = + /*<>*/ _cT_ = /*<>*/ caml_string_get(str, i) - 46 | 0, switch$0 = 0; - if(23 < _cS_ >>> 0){ - if(55 === _cS_) switch$0 = 1; + if(23 < _cT_ >>> 0){ + if(55 === _cT_) switch$0 = 1; } - else if(21 < _cS_ - 1 >>> 0) switch$0 = 1; + else if(21 < _cT_ - 1 >>> 0) switch$0 = 1; if(! switch$0){ /*<>*/ var /*<>*/ i$0 = i + 1 | 0, i = i$0; continue; } - var _cT_ = 1; + var _cU_ = 1; } /*<>*/ /*<>*/ var - _cU_ = - _cT_ + _cV_ = + _cU_ ? str : /*<>*/ caml_call2 (Stdlib[28], str, cst$17); - /*<>*/ return caml_special_val(_cU_); + /*<>*/ return caml_special_val(_cV_); } case 6: /*<>*/ return hex(0); case 7: /*<>*/ /*<>*/ var - _cV_ = hex(0); + _cW_ = hex(0); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_String[25], _cV_); + (Stdlib_String[25], _cW_); case 8: /*<>*/ return caml_special_val(hex(0)); default: @@ -17056,12 +17079,12 @@ /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _cR_ = recast(fmt, fmtty); + /*<>*/ _cS_ = recast(fmt, fmtty); /*<>*/ return make_printf (k$0, acc$0, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _cR_, rest$13)); /*<>*/ }; + (CamlinternalFormatBasics[3], _cS_, rest$13)); /*<>*/ }; case 15: var rest$14 = fmt$0[1]; /*<>*/ return function(f, x){ @@ -17088,11 +17111,11 @@ fmt$0 = rest$16; continue; case 18: - var _cP_ = fmt$0[1]; - if(0 === _cP_[0]){ + var _cQ_ = fmt$0[1]; + if(0 === _cQ_[0]){ var rest$17 = fmt$0[2], - fmt$1 = _cP_[1][1], + fmt$1 = _cQ_[1][1], k$3 = function(acc, k, rest){ function k$0(kacc){ @@ -17109,7 +17132,7 @@ } var rest$18 = fmt$0[2], - fmt$2 = _cP_[1][1], + fmt$2 = _cQ_[1][1], k$4 = function(acc, k, rest){ function k$0(kacc){ @@ -17165,14 +17188,14 @@ rest$23 = fmt$0[3], f = fmt$0[2], arity = fmt$0[1], - /*<>*/ _cQ_ = + /*<>*/ _cR_ = /*<>*/ caml_call1(f, 0); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cQ_]); + (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cR_]); var counter$0 = counter + 1 | 0; /*<>*/ return make_custom$0 - (counter$0, k$0, acc$0, rest$23, arity, _cQ_); + (counter$0, k$0, acc$0, rest$23, arity, _cR_); } } /*<>*/ } @@ -17355,7 +17378,7 @@ fmt); /*<>*/ }; case 10: var rest$9 = fmtty[1]; - /*<>*/ return function(param, _cO_){ + /*<>*/ return function(param, _cP_){ /*<>*/ return make_from_fmtty (k, acc, rest$9, fmt); /*<>*/ }; case 11: @@ -17384,13 +17407,13 @@ /*<>*/ } function make_invalid_arg(counter, k, acc, fmt){ /*<>*/ /*<>*/ var - _cN_ = [8, acc, cst_Printf_bad_conversion$0]; + _cO_ = [8, acc, cst_Printf_bad_conversion$0]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cN_, fmt]); + (make_printf$0, [0, k, _cO_, fmt]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cN_, fmt); + (counter$0, k, _cO_, fmt); /*<>*/ } function make_custom$0(counter, k, acc, rest, arity, f){ /*<>*/ if(arity){ @@ -17404,13 +17427,13 @@ /*<>*/ caml_call1(f, x)); /*<>*/ }; } /*<>*/ /*<>*/ var - _cM_ = [4, acc, f]; + _cN_ = [4, acc, f]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cM_, rest]); + (make_printf$0, [0, k, _cN_, rest]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cM_, rest); + (counter$0, k, _cN_, rest); /*<>*/ } function make_printf(k, acc, fmt){ /*<>*/ return caml_trampoline(make_printf$0(0, k, acc, fmt)); @@ -17431,68 +17454,68 @@ /*<>*/ if(typeof pad === "number"){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cl_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cL_){ - /*<>*/ return _cl_;}; + _cm_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cM_){ + /*<>*/ return _cm_;}; } if(prec){ /*<>*/ var - /*<>*/ _ci_ = make_iprintf(k, o, fmt), - /*<>*/ _cj_ = - function(_cK_){ /*<>*/ return _ci_;}; - /*<>*/ return function(_cJ_){ - /*<>*/ return _cj_;}; + /*<>*/ _cj_ = make_iprintf(k, o, fmt), + /*<>*/ _ck_ = + function(_cL_){ /*<>*/ return _cj_;}; + /*<>*/ return function(_cK_){ + /*<>*/ return _ck_;}; } /*<>*/ /*<>*/ var - _ck_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cI_){ - /*<>*/ return _ck_;}; + _cl_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cJ_){ + /*<>*/ return _cl_;}; } if(0 === pad[0]){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cp_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cH_){ - /*<>*/ return _cp_;}; + _cq_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cI_){ + /*<>*/ return _cq_;}; } if(prec){ /*<>*/ var - /*<>*/ _cm_ = make_iprintf(k, o, fmt), - /*<>*/ _cn_ = - function(_cG_){ /*<>*/ return _cm_;}; - /*<>*/ return function(_cF_){ - /*<>*/ return _cn_;}; + /*<>*/ _cn_ = make_iprintf(k, o, fmt), + /*<>*/ _co_ = + function(_cH_){ /*<>*/ return _cn_;}; + /*<>*/ return function(_cG_){ + /*<>*/ return _co_;}; } /*<>*/ /*<>*/ var - _co_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cE_){ - /*<>*/ return _co_;}; + _cp_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cF_){ + /*<>*/ return _cp_;}; } if(typeof prec !== "number"){ /*<>*/ var - /*<>*/ _cv_ = make_iprintf(k, o, fmt), - /*<>*/ _cw_ = - function(_cD_){ /*<>*/ return _cv_;}; - /*<>*/ return function(_cC_){ - /*<>*/ return _cw_;}; + /*<>*/ _cw_ = make_iprintf(k, o, fmt), + /*<>*/ _cx_ = + function(_cE_){ /*<>*/ return _cw_;}; + /*<>*/ return function(_cD_){ + /*<>*/ return _cx_;}; } if(prec){ /*<>*/ var - /*<>*/ _cq_ = make_iprintf(k, o, fmt), - /*<>*/ _cr_ = - function(_cB_){ /*<>*/ return _cq_;}, - /*<>*/ _cs_ = - function(_cA_){ /*<>*/ return _cr_;}; - /*<>*/ return function(_cz_){ - /*<>*/ return _cs_;}; + /*<>*/ _cr_ = make_iprintf(k, o, fmt), + /*<>*/ _cs_ = + function(_cC_){ /*<>*/ return _cr_;}, + /*<>*/ _ct_ = + function(_cB_){ /*<>*/ return _cs_;}; + /*<>*/ return function(_cA_){ + /*<>*/ return _ct_;}; } /*<>*/ /*<>*/ var - _ct_ = make_iprintf(k, o, fmt); - /*<>*/ function _cu_(_cy_){ - /*<>*/ return _ct_; + _cu_ = make_iprintf(k, o, fmt); + /*<>*/ function _cv_(_cz_){ + /*<>*/ return _cu_; } - /*<>*/ return function(_cx_){ - /*<>*/ return _cu_;}; + /*<>*/ return function(_cy_){ + /*<>*/ return _cv_;}; /*<>*/ } function make_iprintf$0(counter, k, o, fmt){ /*<>*/ var k$0 = k, fmt$0 = fmt; @@ -17504,69 +17527,69 @@ case 0: /*<>*/ var rest = fmt$0[1], - /*<>*/ _by_ = + /*<>*/ _bz_ = make_iprintf(k$0, o, rest); - /*<>*/ return function(_ch_){ - /*<>*/ return _by_;}; + /*<>*/ return function(_ci_){ + /*<>*/ return _bz_;}; case 1: /*<>*/ var rest$0 = fmt$0[1], - /*<>*/ _bz_ = + /*<>*/ _bA_ = make_iprintf(k$0, o, rest$0); - /*<>*/ return function(_cg_){ - /*<>*/ return _bz_;}; + /*<>*/ return function(_ch_){ + /*<>*/ return _bA_;}; case 2: - var _bA_ = fmt$0[1]; - if(typeof _bA_ === "number"){ + var _bB_ = fmt$0[1]; + if(typeof _bB_ === "number"){ /*<>*/ var rest$1 = fmt$0[2], - /*<>*/ _bB_ = + /*<>*/ _bC_ = make_iprintf(k$0, o, rest$1); - /*<>*/ return function(_cf_){ - /*<>*/ return _bB_;}; + /*<>*/ return function(_cg_){ + /*<>*/ return _bC_;}; } - if(0 === _bA_[0]){ + if(0 === _bB_[0]){ /*<>*/ var rest$2 = fmt$0[2], - /*<>*/ _bC_ = + /*<>*/ _bD_ = make_iprintf(k$0, o, rest$2); - /*<>*/ return function(_ce_){ - /*<>*/ return _bC_;}; + /*<>*/ return function(_cf_){ + /*<>*/ return _bD_;}; } /*<>*/ var rest$3 = fmt$0[2], - /*<>*/ _bD_ = + /*<>*/ _bE_ = make_iprintf(k$0, o, rest$3), - /*<>*/ _bE_ = - function(_cd_){ /*<>*/ return _bD_;}; - /*<>*/ return function(_cc_){ - /*<>*/ return _bE_;}; + /*<>*/ _bF_ = + function(_ce_){ /*<>*/ return _bE_;}; + /*<>*/ return function(_cd_){ + /*<>*/ return _bF_;}; case 3: - var _bF_ = fmt$0[1]; - if(typeof _bF_ === "number"){ + var _bG_ = fmt$0[1]; + if(typeof _bG_ === "number"){ /*<>*/ var rest$4 = fmt$0[2], - /*<>*/ _bG_ = + /*<>*/ _bH_ = make_iprintf(k$0, o, rest$4); - /*<>*/ return function(_cb_){ - /*<>*/ return _bG_;}; + /*<>*/ return function(_cc_){ + /*<>*/ return _bH_;}; } - if(0 === _bF_[0]){ + if(0 === _bG_[0]){ /*<>*/ var rest$5 = fmt$0[2], - /*<>*/ _bH_ = + /*<>*/ _bI_ = make_iprintf(k$0, o, rest$5); - /*<>*/ return function(_ca_){ - /*<>*/ return _bH_;}; + /*<>*/ return function(_cb_){ + /*<>*/ return _bI_;}; } /*<>*/ var rest$6 = fmt$0[2], - /*<>*/ _bI_ = + /*<>*/ _bJ_ = make_iprintf(k$0, o, rest$6), - /*<>*/ _bJ_ = - function(_b$_){ /*<>*/ return _bI_;}; - /*<>*/ return function(_b__){ - /*<>*/ return _bJ_;}; + /*<>*/ _bK_ = + function(_ca_){ /*<>*/ return _bJ_;}; + /*<>*/ return function(_b$_){ + /*<>*/ return _bK_;}; case 4: var rest$7 = fmt$0[4], prec = fmt$0[3], pad = fmt$0[2]; /*<>*/ return fn_of_padding_precision @@ -17588,31 +17611,31 @@ /*<>*/ return fn_of_padding_precision (k$0, o, rest$11, pad$3, prec$3); case 9: - var _bK_ = fmt$0[1]; - if(typeof _bK_ === "number"){ + var _bL_ = fmt$0[1]; + if(typeof _bL_ === "number"){ /*<>*/ var rest$12 = fmt$0[2], - /*<>*/ _bL_ = + /*<>*/ _bM_ = make_iprintf(k$0, o, rest$12); - /*<>*/ return function(_b9_){ - /*<>*/ return _bL_;}; + /*<>*/ return function(_b__){ + /*<>*/ return _bM_;}; } - if(0 === _bK_[0]){ + if(0 === _bL_[0]){ /*<>*/ var rest$13 = fmt$0[2], - /*<>*/ _bM_ = + /*<>*/ _bN_ = make_iprintf(k$0, o, rest$13); - /*<>*/ return function(_b8_){ - /*<>*/ return _bM_;}; + /*<>*/ return function(_b9_){ + /*<>*/ return _bN_;}; } /*<>*/ var rest$14 = fmt$0[2], - /*<>*/ _bN_ = + /*<>*/ _bO_ = make_iprintf(k$0, o, rest$14), - /*<>*/ _bO_ = - function(_b7_){ /*<>*/ return _bN_;}; - /*<>*/ return function(_b6_){ - /*<>*/ return _bO_;}; + /*<>*/ _bP_ = + function(_b8_){ /*<>*/ return _bO_;}; + /*<>*/ return function(_b7_){ + /*<>*/ return _bP_;}; case 10: var rest$15 = fmt$0[1], fmt$0 = rest$15; continue; case 11: @@ -17622,45 +17645,45 @@ case 13: /*<>*/ var rest$18 = fmt$0[3], - /*<>*/ _bP_ = + /*<>*/ _bQ_ = make_iprintf(k$0, o, rest$18); - /*<>*/ return function(_b5_){ - /*<>*/ return _bP_;}; + /*<>*/ return function(_b6_){ + /*<>*/ return _bQ_;}; case 14: var rest$19 = fmt$0[3], fmtty = fmt$0[2]; /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _b4_ = recast(fmt, fmtty); + /*<>*/ _b5_ = recast(fmt, fmtty); /*<>*/ return make_iprintf (k$0, o, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _b4_, rest$19)); /*<>*/ }; + (CamlinternalFormatBasics[3], _b5_, rest$19)); /*<>*/ }; case 15: /*<>*/ var rest$20 = fmt$0[1], - /*<>*/ _bQ_ = + /*<>*/ _bR_ = make_iprintf(k$0, o, rest$20), - /*<>*/ _bR_ = - function(_b3_){ /*<>*/ return _bQ_;}; - /*<>*/ return function(_b2_){ - /*<>*/ return _bR_;}; + /*<>*/ _bS_ = + function(_b4_){ /*<>*/ return _bR_;}; + /*<>*/ return function(_b3_){ + /*<>*/ return _bS_;}; case 16: /*<>*/ var rest$21 = fmt$0[1], - /*<>*/ _bS_ = + /*<>*/ _bT_ = make_iprintf(k$0, o, rest$21); - /*<>*/ return function(_b1_){ - /*<>*/ return _bS_;}; + /*<>*/ return function(_b2_){ + /*<>*/ return _bT_;}; case 17: var rest$22 = fmt$0[2], fmt$0 = rest$22; continue; case 18: - var _bT_ = fmt$0[1]; - if(0 === _bT_[0]){ + var _bU_ = fmt$0[1]; + if(0 === _bU_[0]){ var rest$23 = fmt$0[2], - fmt$1 = _bT_[1][1], + fmt$1 = _bU_[1][1], k$3 = function(k, rest){ function k$0(koc){ @@ -17676,7 +17699,7 @@ } var rest$24 = fmt$0[2], - fmt$2 = _bT_[1][1], + fmt$2 = _bU_[1][1], k$4 = function(k, rest){ function k$0(koc){ @@ -17695,32 +17718,32 @@ case 20: /*<>*/ var rest$25 = fmt$0[3], - /*<>*/ _bU_ = + /*<>*/ _bV_ = make_iprintf(k$0, o, rest$25); - /*<>*/ return function(_b0_){ - /*<>*/ return _bU_;}; + /*<>*/ return function(_b1_){ + /*<>*/ return _bV_;}; case 21: /*<>*/ var rest$26 = fmt$0[2], - /*<>*/ _bV_ = + /*<>*/ _bW_ = make_iprintf(k$0, o, rest$26); - /*<>*/ return function(_bZ_){ - /*<>*/ return _bV_;}; + /*<>*/ return function(_b0_){ + /*<>*/ return _bW_;}; case 22: /*<>*/ var rest$27 = fmt$0[1], - /*<>*/ _bW_ = + /*<>*/ _bX_ = make_iprintf(k$0, o, rest$27); - /*<>*/ return function(_bY_){ - /*<>*/ return _bW_;}; + /*<>*/ return function(_bZ_){ + /*<>*/ return _bX_;}; case 23: - var rest$28 = fmt$0[2], ign = fmt$0[1], _bX_ = 0; + var rest$28 = fmt$0[2], ign = fmt$0[1], _bY_ = 0; /*<>*/ return make_ignored_param (function(param){ /*<>*/ return caml_call1 (k$0, o); /*<>*/ }, - _bX_, + _bY_, ign, rest$28); default: @@ -17738,10 +17761,10 @@ /*<>*/ if(param){ /*<>*/ var arity = param[1], - /*<>*/ _bw_ = + /*<>*/ _bx_ = fn_of_custom_arity(k, o, fmt, arity); - /*<>*/ return function(_bx_){ - /*<>*/ return _bw_;}; + /*<>*/ return function(_by_){ + /*<>*/ return _bx_;}; } /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -17909,9 +17932,9 @@ var f = acc$0[2], p$3 = acc$0[1]; /*<>*/ strput_acc(b, p$3); /*<>*/ /*<>*/ var - _bv_ = /*<>*/ caml_call1(f, 0); + _bw_ = /*<>*/ caml_call1(f, 0); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, _bv_); + (Stdlib_Buffer[16], b, _bw_); case 7: var acc$3 = acc$0[1], acc$0 = acc$3; continue; case 8: @@ -17942,11 +17965,11 @@ function k(acc){ /*<>*/ strput_acc(buf, acc); /*<>*/ /*<>*/ var - _bu_ = + _bv_ = /*<>*/ caml_call1 (Stdlib_Buffer[2], buf); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _bu_); + (Stdlib[2], _bv_); /*<>*/ } /*<>*/ return make_printf(k, 0, fmt); } @@ -18019,15 +18042,15 @@ else /*<>*/ try{ /*<>*/ var - /*<>*/ _bs_ = + /*<>*/ _bt_ = /*<>*/ runtime.caml_int_of_string ( /*<>*/ caml_call3 (Stdlib_String[15], str, nstart, nend - nstart | 0)), - indent = _bs_; + indent = _bt_; } - catch(_bt_){ - var _br_ = caml_wrap_exception(_bt_); - if(_br_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_br_, 0); + catch(_bu_){ + var _bs_ = caml_wrap_exception(_bu_); + if(_bs_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_bs_, 0); var indent = invalid_box(0); } /*<>*/ /*<>*/ var @@ -18092,8 +18115,9 @@ /*<>*/ } /*<>*/ function unexpected_end_of_format (end_ind){ - /*<>*/ return invalid_format_message - (end_ind, cst_unexpected_end_of_format); + /*<>*/ invalid_format_message + (end_ind, cst_unexpected_end_of_format); + /*<>*/ return _$_; /*<>*/ } function invalid_format_without(str_ind, c, s){ /*<>*/ return /*<>*/ caml_call4 @@ -18235,9 +18259,9 @@ var str_ind$3 = str_ind$0 + 1 | 0; try{ var - _bg_ = str_ind$3 === end_ind ? 1 : 0, - _bh_ = - _bg_ + _bh_ = str_ind$3 === end_ind ? 1 : 0, + _bi_ = + _bh_ || (60 !== @@ -18245,7 +18269,7 @@ (str, str_ind$3) ? 1 : 0); - if(_bh_) + if(_bi_) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -18284,10 +18308,10 @@ str, str_ind$3 - 2 | 0, (str_ind_3 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bi_ = [0, s, width, 0], - /*<>*/ _bj_ = str_ind_3 + 1 | 0, - formatting_lit$0 = _bi_, - next_ind = _bj_; + /*<>*/ _bj_ = [0, s, width, 0], + /*<>*/ _bk_ = str_ind_3 + 1 | 0, + formatting_lit$0 = _bj_, + next_ind = _bk_; else switch$3 = 1; else if(1 < switcher$0 - 1 >>> 0){ @@ -18312,11 +18336,11 @@ str, str_ind$3 - 2 | 0, (str_ind_5 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bk_ = + /*<>*/ _bl_ = [0, s$0, width, offset], - /*<>*/ _bl_ = str_ind_5 + 1 | 0, - formatting_lit$0 = _bk_, - next_ind = _bl_; + /*<>*/ _bm_ = str_ind_5 + 1 | 0, + formatting_lit$0 = _bl_, + next_ind = _bm_; } else switch$3 = 1; @@ -18324,10 +18348,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); } - catch(_bq_){ - var _bf_ = caml_wrap_exception(_bq_); - if(_bf_ !== Stdlib[8] && _bf_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bf_, 0); + catch(_br_){ + var _bg_ = caml_wrap_exception(_br_); + if(_bg_ !== Stdlib[8] && _bg_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bg_, 0); var formatting_lit$0 = formatting_lit, next_ind = str_ind$3; } var @@ -18370,30 +18394,30 @@ str, str_ind$4 - 2 | 0, (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), - _bo_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; + _bp_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; } else - var _bo_ = 0; - var _bn_ = _bo_; + var _bp_ = 0; + var _bo_ = _bp_; } - catch(_bp_){ - var _bm_ = caml_wrap_exception(_bp_); - if(_bm_ !== Stdlib[8] && _bm_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bm_, 0); - var _bn_ = 0; + catch(_bq_){ + var _bn_ = caml_wrap_exception(_bq_); + if(_bn_ !== Stdlib[8] && _bn_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bn_, 0); + var _bo_ = 0; } - if(_bn_) + if(_bo_) var - match$5 = _bn_[1], + match$5 = _bo_[1], formatting_lit$1 = match$5[2], next_ind$0 = match$5[1], fmt_rest$13 = parse(next_ind$0, end_ind)[1], - _be_ = [0, [17, formatting_lit$1, fmt_rest$13]]; + _bf_ = [0, [17, formatting_lit$1, fmt_rest$13]]; else var fmt_rest$14 = parse(str_ind$4, end_ind)[1], - _be_ = [0, [17, _Q_, fmt_rest$14]]; - var match$0 = _be_; + _bf_ = [0, [17, _Q_, fmt_rest$14]]; + var match$0 = _bf_; break; case 31: var @@ -18553,29 +18577,29 @@ /*<>*/ var /*<>*/ ignored$2 = [9, get_pad_opt(95), sub_fmtty], - _aN_ = [0, [23, ignored$2, fmt_rest$7]]; + _aO_ = [0, [23, ignored$2, fmt_rest$7]]; else - var _aN_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; - var fmt_result = _aN_; + var _aO_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; + var fmt_result = _aO_; break; case 44: var fmt_result = parse(str_ind, end_ind); break; case 67: /*<>*/ var fmt_rest$10 = parse(str_ind, end_ind)[1], - /*<>*/ _aP_ = + /*<>*/ _aQ_ = get_ign(0) ? [0, [23, 1, fmt_rest$10]] : [0, [1, fmt_rest$10]], - fmt_result = _aP_; + fmt_result = _aQ_; break; case 78: var fmt_rest$14 = parse(str_ind, end_ind)[1], counter$0 = 2; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$6 = [11, counter$0], - _aV_ = [0, [23, ignored$6, fmt_rest$14]]; + _aW_ = [0, [23, ignored$6, fmt_rest$14]]; else - var _aV_ = [0, [21, counter$0, fmt_rest$14]]; - var fmt_result = _aV_; + var _aW_ = [0, [21, counter$0, fmt_rest$14]]; + var fmt_result = _aW_; break; case 83: /*<>*/ var @@ -18586,15 +18610,15 @@ /*<>*/ var /*<>*/ ignored$7 = [1, get_padprec_opt(95)], - _aW_ = [0, [23, ignored$7, fmt_rest$15]]; + _aX_ = [0, [23, ignored$7, fmt_rest$15]]; else /*<>*/ var /*<>*/ match$5 = make_padding_fmt_ebb(pad$6, fmt_rest$15), fmt_rest$16 = match$5[2], pad$7 = match$5[1], - _aW_ = [0, [3, pad$7, fmt_rest$16]]; - var fmt_result = _aW_; + _aX_ = [0, [3, pad$7, fmt_rest$16]]; + var fmt_result = _aX_; break; case 91: if(str_ind === end_ind) @@ -18604,8 +18628,9 @@ /*<>*/ char_set = create_char_set(0), add_char = function(c){ - /*<>*/ return add_in_char_set - (char_set, c); + /*<>*/ add_in_char_set + (char_set, c); + /*<>*/ return _$_; /*<>*/ }, add_range = function(c$0, c){ @@ -18617,12 +18642,12 @@ /*<>*/ caml_call1 (Stdlib[29], i)); /*<>*/ /*<>*/ var - _bd_ = i + 1 | 0; - if(c !== i){var i = _bd_; continue;} + _be_ = i + 1 | 0; + if(c !== i){var i = _be_; continue;} break; } } - return 0; + return _$_; /*<>*/ }, fail_single_percent = function(str_ind){ @@ -18647,13 +18672,13 @@ } if(93 === c) /*<>*/ return str_ind$0 + 1 | 0; - var _bc_ = str_ind$0 + 1 | 0; + var _bd_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_after_char$0, [0, _bc_, end_ind, c]); + (parse_char_set_after_char$0, [0, _bd_, end_ind, c]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_after_char$0 - (counter$0, _bc_, end_ind, c); + (counter$0, _bd_, end_ind, c); } /*<>*/ }, parse_char_set_after_char$0 = @@ -18701,13 +18726,13 @@ /*<>*/ return fail_single_percent (str_ind$2); /*<>*/ add_range(c$0, c$3); - var _ba_ = str_ind$2 + 2 | 0; + var _bb_ = str_ind$2 + 2 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _ba_, end_ind]); + (parse_char_set_content, [0, _bb_, end_ind]); var counter$2 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$2, _ba_, end_ind); + (counter$2, _bb_, end_ind); } if(93 === c$2){ /*<>*/ add_char(c$0); @@ -18715,23 +18740,23 @@ /*<>*/ return str_ind$2 + 1 | 0; } /*<>*/ add_range(c$0, c$2); - var _bb_ = str_ind$2 + 1 | 0; + var _bc_ = str_ind$2 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _bb_, end_ind]); + (parse_char_set_content, [0, _bc_, end_ind]); var counter$1 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$1, _bb_, end_ind); + (counter$1, _bc_, end_ind); } if(switch$0 && 37 === c$0){ /*<>*/ add_char(c$1); - var _a$_ = str_ind$0 + 1 | 0; + var _ba_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _a$_, end_ind]); + (parse_char_set_content, [0, _ba_, end_ind]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$0, _a$_, end_ind); + (counter$0, _ba_, end_ind); } if(37 === c$0) /*<>*/ fail_single_percent @@ -18777,10 +18802,10 @@ /*<>*/ var /*<>*/ ignored$9 = [10, get_pad_opt(95), char_set$1], - _a1_ = [0, [23, ignored$9, fmt_rest$19]]; + _a2_ = [0, [23, ignored$9, fmt_rest$19]]; else - var _a1_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; - var fmt_result = _a1_; + var _a2_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; + var fmt_result = _a2_; break; case 97: var @@ -18800,28 +18825,28 @@ if(match$7){ if(0 === match$7[1]) /*<>*/ var - /*<>*/ _a2_ = + /*<>*/ _a3_ = get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], - _a3_ = _a2_; + _a4_ = _a3_; else var - _a3_ = + _a4_ = legacy_behavior$0 ? char_format(fmt_rest$21) : invalid_format_message (str_ind, cst_non_zero_widths_are_unsupp); - var _a4_ = _a3_; + var _a5_ = _a4_; } else - var _a4_ = char_format(fmt_rest$21); - var fmt_result = _a4_; + var _a5_ = char_format(fmt_rest$21); + var fmt_result = _a5_; break; case 114: /*<>*/ var fmt_rest$22 = parse(str_ind, end_ind)[1], - /*<>*/ _a5_ = + /*<>*/ _a6_ = get_ign(0) ? [0, [23, 2, fmt_rest$22]] : [0, [19, fmt_rest$22]], - fmt_result = _a5_; + fmt_result = _a6_; break; case 115: /*<>*/ var @@ -18832,15 +18857,15 @@ /*<>*/ var /*<>*/ ignored$10 = [0, get_padprec_opt(95)], - _a6_ = [0, [23, ignored$10, fmt_rest$23]]; + _a7_ = [0, [23, ignored$10, fmt_rest$23]]; else /*<>*/ var /*<>*/ match$8 = make_padding_fmt_ebb(pad$9, fmt_rest$23), fmt_rest$24 = match$8[2], pad$10 = match$8[1], - _a6_ = [0, [2, pad$10, fmt_rest$24]]; - var fmt_result = _a6_; + _a7_ = [0, [2, pad$10, fmt_rest$24]]; + var fmt_result = _a7_; break; case 116: var @@ -18859,10 +18884,10 @@ /*<>*/ var /*<>*/ ignored$11 = [8, get_pad_opt(95), sub_fmtty$0], - _a7_ = [0, [23, ignored$11, fmt_rest$26]]; + _a8_ = [0, [23, ignored$11, fmt_rest$26]]; else - var _a7_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; - var fmt_result = _a7_; + var _a8_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; + var fmt_result = _a8_; break; case 66: case 98: @@ -18874,15 +18899,15 @@ /*<>*/ var /*<>*/ ignored$3 = [7, get_padprec_opt(95)], - _aO_ = [0, [23, ignored$3, fmt_rest$8]]; + _aP_ = [0, [23, ignored$3, fmt_rest$8]]; else /*<>*/ var /*<>*/ match$3 = make_padding_fmt_ebb(pad$3, fmt_rest$8), fmt_rest$9 = match$3[2], pad$4 = match$3[1], - _aO_ = [0, [9, pad$4, fmt_rest$9]]; - var fmt_result = _aO_; + _aP_ = [0, [9, pad$4, fmt_rest$9]]; + var fmt_result = _aP_; break; case 37: case 64: @@ -18901,20 +18926,20 @@ /*<>*/ symb$0 = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _a8_ = symb$0 - 88 | 0, + /*<>*/ _a9_ = symb$0 - 88 | 0, switch$2 = 0; - if(32 >= _a8_ >>> 0) - switch(_a8_){ + if(32 >= _a9_ >>> 0) + switch(_a9_){ case 0: case 12: case 17: case 23: case 29: case 32: - var _aU_ = 1; switch$2 = 1; break; + var _aV_ = 1; switch$2 = 1; break; } - if(! switch$2) var _aU_ = 0; - /*<>*/ if(_aU_) + if(! switch$2) var _aV_ = 0; + /*<>*/ if(_aV_) switch$0 = 1; else switch$1 = 1; @@ -18937,10 +18962,10 @@ /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$5 = [11, counter], - _aT_ = [0, [23, ignored$5, fmt_rest$13]]; + _aU_ = [0, [23, ignored$5, fmt_rest$13]]; else - var _aT_ = [0, [21, counter, fmt_rest$13]]; - var fmt_result = _aT_; + var _aU_ = [0, [21, counter, fmt_rest$13]]; + var fmt_result = _aU_; } break; case 32: @@ -18960,26 +18985,26 @@ case 117: case 120: /*<>*/ var - /*<>*/ _aX_ = get_space(0), - /*<>*/ _aY_ = get_hash(0), + /*<>*/ _aY_ = get_space(0), + /*<>*/ _aZ_ = get_hash(0), /*<>*/ iconv$2 = - compute_int_conv(pct_ind, str_ind, get_plus(0), _aY_, _aX_, symb), + compute_int_conv(pct_ind, str_ind, get_plus(0), _aZ_, _aY_, symb), fmt_rest$17 = parse(str_ind, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$8 = [2, iconv$2, get_pad_opt(95)], - _aZ_ = [0, [23, ignored$8, fmt_rest$17]]; + _a0_ = [0, [23, ignored$8, fmt_rest$17]]; else /*<>*/ var - /*<>*/ _a0_ = get_prec(0), + /*<>*/ _a1_ = get_prec(0), /*<>*/ match$6 = - make_padprec_fmt_ebb(get_int_pad(0), _a0_, fmt_rest$17), + make_padprec_fmt_ebb(get_int_pad(0), _a1_, fmt_rest$17), fmt_rest$18 = match$6[3], prec$4 = match$6[2], pad$8 = match$6[1], - _aZ_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; - var fmt_result = _aZ_; + _a0_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; + var fmt_result = _a0_; break; case 69: case 70: @@ -19009,28 +19034,28 @@ else{ switch(switcher){ case 0: - var _a9_ = 1; break; + var _a__ = 1; break; case 1: - var _a9_ = 0; break; + var _a__ = 0; break; case 2: - var _a9_ = 3; break; - default: var _a9_ = 6; + var _a__ = 3; break; + default: var _a__ = 6; } - var kind = _a9_; + var kind = _a__; } } else if(69 <= symb){ var switch$5 = 0; switch(symb - 69 | 0){ case 0: - var _a__ = 2; break; + var _a$_ = 2; break; case 1: switch$4 = 1; switch$5 = 1; break; case 2: - var _a__ = 4; break; - default: var _a__ = 7; + var _a$_ = 4; break; + default: var _a$_ = 7; } - if(! switch$5) var kind = _a__; + if(! switch$5) var kind = _a$_; } else switch$4 = 1; @@ -19052,24 +19077,24 @@ match = get_prec(0); if(typeof match === "number") var - _aQ_ = match ? incompatible_flag(pct_ind, str_ind, 95, cst$26) : 0; + _aR_ = match ? incompatible_flag(pct_ind, str_ind, 95, cst$26) : 0; else - var ndec = match[1], _aQ_ = [0, ndec]; + var ndec = match[1], _aR_ = [0, ndec]; /*<>*/ var /*<>*/ ignored$4 = - [6, get_pad_opt(95), _aQ_], - _aR_ = [0, [23, ignored$4, fmt_rest$11]]; + [6, get_pad_opt(95), _aR_], + _aS_ = [0, [23, ignored$4, fmt_rest$11]]; } else /*<>*/ var - /*<>*/ _aS_ = get_prec(0), + /*<>*/ _aT_ = get_prec(0), /*<>*/ match$4 = - make_padprec_fmt_ebb(get_pad(0), _aS_, fmt_rest$11), + make_padprec_fmt_ebb(get_pad(0), _aT_, fmt_rest$11), fmt_rest$12 = match$4[3], prec$3 = match$4[2], pad$5 = match$4[1], - _aR_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; - var fmt_result = _aR_; + _aS_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; + var fmt_result = _aS_; break; default: switch$0 = 1; } @@ -19081,89 +19106,89 @@ switch(symb - 108 | 0){ case 0: /*<>*/ var - /*<>*/ _ax_ = + /*<>*/ _ay_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _ay_ = get_space(0), - /*<>*/ _az_ = get_hash(0), + /*<>*/ _az_ = get_space(0), + /*<>*/ _aA_ = get_hash(0), /*<>*/ iconv = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _az_, _ay_, _ax_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aA_, _az_, _ay_), fmt_rest = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored = [3, iconv, get_pad_opt(95)], - _aA_ = [0, [23, ignored, fmt_rest]]; + _aB_ = [0, [23, ignored, fmt_rest]]; else /*<>*/ var - /*<>*/ _aC_ = get_prec(0), + /*<>*/ _aD_ = get_prec(0), /*<>*/ match$0 = - make_padprec_fmt_ebb(get_int_pad(0), _aC_, fmt_rest), + make_padprec_fmt_ebb(get_int_pad(0), _aD_, fmt_rest), fmt_rest$0 = match$0[3], prec$0 = match$0[2], pad$0 = match$0[1], - _aA_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; - var _aB_ = _aA_; + _aB_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; + var _aC_ = _aB_; switch$8 = 1; break; case 1: break; default: /*<>*/ var - /*<>*/ _aD_ = + /*<>*/ _aE_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _aE_ = get_space(0), - /*<>*/ _aF_ = get_hash(0), + /*<>*/ _aF_ = get_space(0), + /*<>*/ _aG_ = get_hash(0), /*<>*/ iconv$0 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aF_, _aE_, _aD_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aG_, _aF_, _aE_), fmt_rest$1 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$0 = [4, iconv$0, get_pad_opt(95)], - _aG_ = [0, [23, ignored$0, fmt_rest$1]]; + _aH_ = [0, [23, ignored$0, fmt_rest$1]]; else /*<>*/ var - /*<>*/ _aH_ = get_prec(0), + /*<>*/ _aI_ = get_prec(0), /*<>*/ match$1 = - make_padprec_fmt_ebb(get_int_pad(0), _aH_, fmt_rest$1), + make_padprec_fmt_ebb(get_int_pad(0), _aI_, fmt_rest$1), fmt_rest$2 = match$1[3], prec$1 = match$1[2], pad$1 = match$1[1], - _aG_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; - var _aB_ = _aG_; + _aH_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; + var _aC_ = _aH_; switch$8 = 1; } - if(switch$8){var fmt_result = _aB_; switch$7 = 1;} + if(switch$8){var fmt_result = _aC_; switch$7 = 1;} } } else if(76 === symb){ /*<>*/ var - /*<>*/ _aI_ = + /*<>*/ _aJ_ = /*<>*/ caml_string_get(str, str_ind), - /*<>*/ _aJ_ = get_space(0), - /*<>*/ _aK_ = get_hash(0), + /*<>*/ _aK_ = get_space(0), + /*<>*/ _aL_ = get_hash(0), /*<>*/ iconv$1 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aK_, _aJ_, _aI_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aL_, _aK_, _aJ_), fmt_rest$3 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$1 = [5, iconv$1, get_pad_opt(95)], - _aL_ = [0, [23, ignored$1, fmt_rest$3]]; + _aM_ = [0, [23, ignored$1, fmt_rest$3]]; else /*<>*/ var - /*<>*/ _aM_ = get_prec(0), + /*<>*/ _aN_ = get_prec(0), /*<>*/ match$2 = - make_padprec_fmt_ebb(get_int_pad(0), _aM_, fmt_rest$3), + make_padprec_fmt_ebb(get_int_pad(0), _aN_, fmt_rest$3), fmt_rest$4 = match$2[3], prec$2 = match$2[2], pad$2 = match$2[1], - _aL_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; - var fmt_result = _aL_; + _aM_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; + var fmt_result = _aM_; switch$7 = 1; } if(! switch$7) @@ -19173,46 +19198,46 @@ (failwith_message(_J_), str, str_ind - 1 | 0, symb); } if(1 - legacy_behavior$0){ - var _ao_ = 1 - plus_used[1], plus$0 = _ao_ ? plus : _ao_; + var _ap_ = 1 - plus_used[1], plus$0 = _ap_ ? plus : _ap_; if(plus$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$27); - var _ap_ = 1 - hash_used[1], hash$0 = _ap_ ? hash : _ap_; + var _aq_ = 1 - hash_used[1], hash$0 = _aq_ ? hash : _aq_; if(hash$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$28); - var _aq_ = 1 - space_used[1], space$0 = _aq_ ? space : _aq_; + var _ar_ = 1 - space_used[1], space$0 = _ar_ ? space : _ar_; if(space$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$29); var - _ar_ = 1 - pad_used[1], - _as_ = - _ar_ + _as_ = 1 - pad_used[1], + _at_ = + _as_ ? /*<>*/ caml_notequal ([0, pad], _K_) - : _ar_; - /*<>*/ if(_as_) + : _as_; + /*<>*/ if(_at_) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst_padding$0); var - _at_ = 1 - prec_used[1], - _au_ = - _at_ + _au_ = 1 - prec_used[1], + _av_ = + _au_ ? /*<>*/ caml_notequal ([0, prec], _L_) - : _at_; - /*<>*/ if(_au_){ - var _av_ = ign ? 95 : symb; + : _au_; + /*<>*/ if(_av_){ + var _aw_ = ign ? 95 : symb; /*<>*/ incompatible_flag - (pct_ind, str_ind, _av_, cst_precision$2); + (pct_ind, str_ind, _aw_, cst_precision$2); } var plus$1 = ign ? plus : ign; if(plus$1) /*<>*/ incompatible_flag (pct_ind, str_ind, 95, cst$30); } - var _aw_ = 1 - ign_used[1], ign$0 = _aw_ ? ign : _aw_; + var _ax_ = 1 - ign_used[1], ign$0 = _ax_ ? ign : _ax_; if(ign$0){ var switch$9 = 0; if(38 <= symb){ @@ -19328,10 +19353,10 @@ case 3: if(legacy_behavior$0){ /*<>*/ var - /*<>*/ _an_ = str_ind$0 + 1 | 0, + /*<>*/ _ao_ = str_ind$0 + 1 | 0, minus$0 = minus || (45 === symb$0 ? 1 : 0); /*<>*/ return parse_literal - (minus$0, _an_); + (minus$0, _ao_); } break; } @@ -19358,17 +19383,17 @@ /*<>*/ hash = [0, 0]; function set_flag(str_ind, flag){ /*<>*/ var - _ak_ = flag[1], - _al_ = _ak_ ? 1 - legacy_behavior$0 : _ak_; - if(_al_){ + _al_ = flag[1], + _am_ = _al_ ? 1 - legacy_behavior$0 : _al_; + if(_am_){ /*<>*/ /*<>*/ var - _am_ = + _an_ = /*<>*/ caml_string_get(str, str_ind); /*<>*/ /*<>*/ caml_call3 - (failwith_message(_C_), str, str_ind, _am_); + (failwith_message(_C_), str, str_ind, _an_); } flag[1] = 1; - return 0; + return _$_; /*<>*/ } var str_ind$0 = str_ind; /*<>*/ for(;;){ @@ -19538,13 +19563,13 @@ [0, sub_fmt, sub_str], /*<>*/ formatting$0 = is_open_tag ? [0, sub_format$0] : [1, sub_format$0], - /*<>*/ _ai_ = + /*<>*/ _aj_ = [0, [18, formatting$0, fmt_rest$0]]; - /*<>*/ return _ai_; + /*<>*/ return _aj_; } - catch(_aj_){ - var _ah_ = caml_wrap_exception(_aj_); - if(_ah_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ah_, 0); + catch(_ak_){ + var _ai_ = caml_wrap_exception(_ak_); + if(_ai_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ai_, 0); /*<>*/ var fmt_rest = parse(str_ind, end_ind)[1], /*<>*/ formatting = @@ -19584,9 +19609,9 @@ var new_acc = (acc$0 * 10 | 0) + (c - 48 | 0) | 0; if(Stdlib_Sys[12] < new_acc){ /*<>*/ /*<>*/ var - _ag_ = Stdlib_Sys[12]; + _ah_ = Stdlib_Sys[12]; /*<>*/ return /*<>*/ caml_call3 - (failwith_message(_S_), str, new_acc, _ag_); + (failwith_message(_S_), str, new_acc, _ah_); } var str_ind$1 = str_ind$0 + 1 | 0, @@ -19839,16 +19864,16 @@ fmt = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _ae_ = [0, type_format(fmt, fmtty), str]; - /*<>*/ return _ae_; + _af_ = [0, type_format(fmt, fmtty), str]; + /*<>*/ return _af_; } - catch(_af_){ - var _ac_ = caml_wrap_exception(_af_); - if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); + catch(_ag_){ + var _ad_ = caml_wrap_exception(_ag_); + if(_ad_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ad_, 0); /*<>*/ /*<>*/ var - _ad_ = string_of_fmtty(fmtty); + _ae_ = string_of_fmtty(fmtty); /*<>*/ return /*<>*/ caml_call2 - (failwith_message(_Z_), str, _ad_); + (failwith_message(_Z_), str, _ae_); } /*<>*/ } function format_of_string_format(str, param){ @@ -19858,15 +19883,15 @@ fmt$0 = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _aa_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; - /*<>*/ return _aa_; + _ab_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; + /*<>*/ return _ab_; } - catch(_ab_){ - var _$_ = caml_wrap_exception(_ab_); - if(_$_ === Type_mismatch) + catch(_ac_){ + var _aa_ = caml_wrap_exception(_ac_); + if(_aa_ === Type_mismatch) /*<>*/ return /*<>*/ caml_call2 (failwith_message(___), str, str$0); - throw caml_maybe_attach_backtrace(_$_, 0); + throw caml_maybe_attach_backtrace(_aa_, 0); } } var @@ -20074,6 +20099,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5]); } /*<>*/ var + _y_ = undefined, global_data = runtime.caml_get_global_data(), cst$6 = "\n", cst$3 = cst$7, @@ -20164,18 +20190,18 @@ /*<>*/ var t = l[2], h = l[1], - /*<>*/ _aD_ = + /*<>*/ _aE_ = /*<>*/ caml_call2(Stdlib[28], prefix, h); - function _aE_(x, y){ + function _aF_(x, y){ /*<>*/ /*<>*/ var - _aG_ = /*<>*/ caml_call2(Stdlib[28], sep, y); + _aH_ = /*<>*/ caml_call2(Stdlib[28], sep, y); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], x, _aG_); + (Stdlib[28], x, _aH_); /*<>*/ } /*<>*/ /*<>*/ var - _aF_ = /*<>*/ caml_call3(Stdlib_List[25], _aE_, _aD_, t); + _aG_ = /*<>*/ caml_call3(Stdlib_List[25], _aF_, _aE_, t); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _aF_, suffix); + (Stdlib[28], _aG_, suffix); /*<>*/ } function help_action(param){ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -20184,11 +20210,11 @@ function add_help(speclist){ /*<>*/ try{ /*<>*/ assoc3(cst_help$2, speclist); - /*<>*/ var /*<>*/ _aA_ = 0, add1 = _aA_; + /*<>*/ var /*<>*/ _aB_ = 0, add1 = _aB_; } - catch(_aC_){ - var _aw_ = caml_wrap_exception(_aC_); - if(_aw_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_aw_, 0); + catch(_aD_){ + var _ax_ = caml_wrap_exception(_aD_); + if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); var add1 = [0, @@ -20197,11 +20223,11 @@ } try{ /*<>*/ assoc3(cst_help$1, speclist); - /*<>*/ var /*<>*/ _az_ = 0, add2 = _az_; + /*<>*/ var /*<>*/ _aA_ = 0, add2 = _aA_; } - catch(_aB_){ - var _ax_ = caml_wrap_exception(_aB_); - if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); + catch(_aC_){ + var _ay_ = caml_wrap_exception(_aC_); + if(_ay_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ay_, 0); var add2 = [0, @@ -20209,33 +20235,34 @@ 0]; } /*<>*/ /*<>*/ var - _ay_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); + _az_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[37], speclist, _ay_); + (Stdlib[37], speclist, _az_); /*<>*/ } function usage_b(buf, speclist, errmsg){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Printf[5], buf, _d_, errmsg); /*<>*/ /*<>*/ var - _as_ = add_help(speclist); - /*<>*/ function _at_(param){ + _at_ = add_help(speclist); + /*<>*/ function _au_(param){ var doc = param[3], spec = param[2], key = param[1], - _au_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; - if(! _au_) return _au_; + _av_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; + if(! _av_) return _av_; if(11 !== spec[0]) /*<>*/ return /*<>*/ caml_call4 (Stdlib_Printf[5], buf, _a_, key, doc); /*<>*/ var l = spec[1], - /*<>*/ _av_ = make_symlist(cst$1, cst$0, cst, l); + /*<>*/ _aw_ = make_symlist(cst$1, cst$0, cst, l); /*<>*/ return /*<>*/ caml_call5 - (Stdlib_Printf[5], buf, _b_, key, _av_, doc); + (Stdlib_Printf[5], buf, _b_, key, _aw_, doc); } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[17], _at_, _as_); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_List[17], _au_, _at_); + /*<>*/ return _y_; /*<>*/ } function usage_string(speclist, errmsg){ /*<>*/ /*<>*/ var @@ -20246,33 +20273,33 @@ /*<>*/ } function usage(speclist, errmsg){ /*<>*/ /*<>*/ var - _ar_ = usage_string(speclist, errmsg); + _as_ = usage_string(speclist, errmsg); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Printf[3], _e_, _ar_); + (Stdlib_Printf[3], _e_, _as_); /*<>*/ } /*<>*/ /*<>*/ var current = [0, 0]; function int_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _ap_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; - /*<>*/ return _ap_; + _aq_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; + /*<>*/ return _aq_; } - catch(_aq_){ - var _ao_ = caml_wrap_exception(_aq_); - if(_ao_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_ao_, 0); + catch(_ar_){ + var _ap_ = caml_wrap_exception(_ar_); + if(_ap_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_ap_, 0); } /*<>*/ } function float_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _am_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; - /*<>*/ return _am_; + _an_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; + /*<>*/ return _an_; } - catch(_an_){ - var _al_ = caml_wrap_exception(_an_); - if(_al_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_al_, 0); + catch(_ao_){ + var _am_ = caml_wrap_exception(_ao_); + if(_am_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_am_, 0); } /*<>*/ } function parse_and_expand_argv_dynamic_ @@ -20327,8 +20354,8 @@ if(current[1] >= argv[1].length - 1) return 0; /*<>*/ try{ /*<>*/ var - _Y_ = current[1], - /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_], + _Z_ = current[1], + /*<>*/ s = caml_check_bound(argv[1], _Z_)[1 + _Z_], switch$0 = 0; /*<>*/ if (1 <= /*<>*/ caml_ml_string_length(s) @@ -20336,13 +20363,13 @@ try{ /*<>*/ var follow$1 = 0, - /*<>*/ _aa_ = assoc3(s, speclist[1]), + /*<>*/ _ab_ = assoc3(s, speclist[1]), follow$0 = follow$1, - action = _aa_; + action = _ab_; } - catch(_aj_){ - var _Z_ = caml_wrap_exception(_aj_); - if(_Z_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Z_, 0); + catch(_ak_){ + var ___ = caml_wrap_exception(_ak_); + if(___ !== Stdlib[8]) throw caml_maybe_attach_backtrace(___, 0); /*<>*/ try{ /*<>*/ var /*<>*/ i = @@ -20355,16 +20382,16 @@ /*<>*/ keyword = /*<>*/ caml_call3(Stdlib_String[15], s, 0, i), /*<>*/ follow = [0, arg], - /*<>*/ _$_ = assoc3(keyword, speclist[1]), + /*<>*/ _aa_ = assoc3(keyword, speclist[1]), follow$0 = follow, - action = _$_; + action = _aa_; } - catch(_ak_){ - var ___ = caml_wrap_exception(_ak_); - if(___ === Stdlib[8]) + catch(_al_){ + var _$_ = caml_wrap_exception(_al_); + if(_$_ === Stdlib[8]) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [0, s]], 1); - throw caml_maybe_attach_backtrace(___, 0); + throw caml_maybe_attach_backtrace(_$_, 0); } } var @@ -20372,7 +20399,7 @@ function(s, follow){ function no_arg(param){ /*<>*/ if(! follow) - /*<>*/ return 0; + /*<>*/ return _y_; var arg = follow[1]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [1, s, arg, cst_no_argument]], 1); @@ -20390,9 +20417,9 @@ if((current[1] + 1 | 0) >= argv[1].length - 1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [2, s]], 1); - var _ai_ = current[1] + 1 | 0; - /*<>*/ return caml_check_bound(argv[1], _ai_) - [1 + _ai_]; + var _aj_ = current[1] + 1 | 0; + /*<>*/ return caml_check_bound(argv[1], _aj_) + [1 + _aj_]; /*<>*/ } return get_arg; }, @@ -20420,14 +20447,14 @@ /*<>*/ arg = get_arg(0); /*<>*/ try{ /*<>*/ var - /*<>*/ _ac_ = + /*<>*/ _ad_ = [0, /*<>*/ caml_call1(Stdlib[32], arg)], - match = _ac_; + match = _ad_; } - catch(_ah_){ - var _ab_ = caml_wrap_exception(_ah_); - if(_ab_[1] !== Stdlib[6]) - throw caml_maybe_attach_backtrace(_ab_, 0); + catch(_ai_){ + var _ac_ = caml_wrap_exception(_ai_); + if(_ac_[1] !== Stdlib[6]) + throw caml_maybe_attach_backtrace(_ac_, 0); var match = 0; } if(! match) @@ -20522,7 +20549,7 @@ /*<>*/ return consume_arg(0); } /*<>*/ /*<>*/ var - _ad_ = make_symlist(cst$5, cst$4, cst$3, symb); + _ae_ = make_symlist(cst$5, cst$4, cst$3, symb); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, @@ -20530,16 +20557,16 @@ s, arg$5, /*<>*/ caml_call2 - (Stdlib[28], cst_one_of, _ad_)]], + (Stdlib[28], cst_one_of, _ae_)]], 1); case 12: var f$5 = param[1]; /*<>*/ no_arg(0); /*<>*/ for(;;){ if(current[1] >= (argv[1].length - 1 - 1 | 0)) return 0; - var _ae_ = current[1] + 1 | 0; + var _af_ = current[1] + 1 | 0; /*<>*/ /*<>*/ caml_call1 - (f$5, caml_check_bound(argv[1], _ae_)[1 + _ae_]); + (f$5, caml_check_bound(argv[1], _af_)[1 + _af_]); /*<>*/ consume_arg(0); } case 13: @@ -20551,8 +20578,8 @@ /*<>*/ return /*<>*/ caml_call1 (f$6, /*<>*/ caml_call1(Stdlib_List[9], acc[1])); - var _ag_ = current[1] + 1 | 0, _af_ = acc[1]; - acc[1] = [0, caml_check_bound(argv[1], _ag_)[1 + _ag_], _af_]; + var _ah_ = current[1] + 1 | 0, _ag_ = acc[1]; + acc[1] = [0, caml_check_bound(argv[1], _ah_)[1 + _ah_], _ag_]; /*<>*/ consume_arg(0); } default: @@ -20629,8 +20656,8 @@ function parse(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _X_ = parse_argv(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _X_; + _Y_ = parse_argv(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _Y_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20652,8 +20679,8 @@ function parse_dynamic(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _W_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _W_; + _X_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _X_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20678,9 +20705,9 @@ /*<>*/ argv = [0, caml_sys_argv(0)], /*<>*/ spec = [0, l], /*<>*/ current$0 = [0, current[1]], - /*<>*/ _V_ = + /*<>*/ _W_ = parse_and_expand_argv_dynamic(current$0, argv, spec, f, msg); - /*<>*/ return _V_; + /*<>*/ return _W_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20717,17 +20744,17 @@ /*<>*/ /*<>*/ var n$0 = /*<>*/ caml_call2(Stdlib_String[35], s, 9); } - catch(_T_){ - var _R_ = caml_wrap_exception(_T_); - if(_R_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_R_, 0); + catch(_U_){ + var _S_ = caml_wrap_exception(_U_); + if(_S_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_S_, 0); /*<>*/ try{ /*<>*/ /*<>*/ var n = /*<>*/ caml_call2(Stdlib_String[35], s, 32); } - catch(_U_){ - var _S_ = caml_wrap_exception(_U_); - if(_S_ === Stdlib[8]) /*<>*/ return len; - throw caml_maybe_attach_backtrace(_S_, 0); + catch(_V_){ + var _T_ = caml_wrap_exception(_V_); + if(_T_ === Stdlib[8]) /*<>*/ return len; + throw caml_maybe_attach_backtrace(_T_, 0); } /*<>*/ return loop(n + 1 | 0); } @@ -20737,12 +20764,12 @@ var doc = param[3], spec = param[2], kwd = param[1]; /*<>*/ if(11 === spec[0]) return caml_call2(Stdlib_Int[11], cur, caml_ml_string_length(kwd)); - var _Q_ = caml_ml_string_length(kwd) + second_word(doc) | 0; - return caml_call2(Stdlib_Int[11], cur, _Q_); + var _R_ = caml_ml_string_length(kwd) + second_word(doc) | 0; + return caml_call2(Stdlib_Int[11], cur, _R_); } function replace_leading_tab(s){ /*<>*/ /*<>*/ var seen = [0, 0]; - function _P_(c){ + function _Q_(c){ /*<>*/ if(9 === c && ! seen[1]){ seen[1] = 1; /*<>*/ return 32; @@ -20750,7 +20777,7 @@ /*<>*/ return c; /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[17], _P_, s); + (Stdlib_String[17], _Q_, s); /*<>*/ } function align(opt, speclist){ /*<>*/ if(opt) @@ -20764,7 +20791,7 @@ (Stdlib_List[25], max_arg_len, 0, completed), /*<>*/ len$0 = /*<>*/ caml_call2(Stdlib_Int[10], len, limit); - /*<>*/ function _J_(ksd){ + /*<>*/ function _K_(ksd){ var kwd = ksd[1], spec = ksd[2]; if(! caml_string_notequal(ksd[3], cst$7)) /*<>*/ return ksd; @@ -20772,20 +20799,20 @@ /*<>*/ var msg$0 = ksd[3], /*<>*/ cutcol$0 = second_word(msg$0), - /*<>*/ _M_ = + /*<>*/ _N_ = /*<>*/ caml_call2 (Stdlib_Int[11], 0, len$0 - cutcol$0 | 0) + 3 | 0, /*<>*/ spaces$0 = - /*<>*/ caml_call2(Stdlib_String[1], _M_, 32), - /*<>*/ _N_ = replace_leading_tab(msg$0), - /*<>*/ _O_ = - /*<>*/ caml_call2(Stdlib[28], spaces$0, _N_); + /*<>*/ caml_call2(Stdlib_String[1], _N_, 32), + /*<>*/ _O_ = replace_leading_tab(msg$0), + /*<>*/ _P_ = + /*<>*/ caml_call2(Stdlib[28], spaces$0, _O_); /*<>*/ return [0, kwd, spec, - /*<>*/ caml_call2(Stdlib[28], cst$6, _O_)]; + /*<>*/ caml_call2(Stdlib[28], cst$6, _P_)]; } /*<>*/ var msg = ksd[3], @@ -20799,24 +20826,24 @@ /*<>*/ var /*<>*/ spaces = /*<>*/ caml_call2(Stdlib_String[1], diff, 32), - /*<>*/ _K_ = replace_leading_tab(msg), + /*<>*/ _L_ = replace_leading_tab(msg), /*<>*/ prefix = - /*<>*/ caml_call3(Stdlib_String[15], _K_, 0, cutcol), + /*<>*/ caml_call3(Stdlib_String[15], _L_, 0, cutcol), /*<>*/ suffix = /*<>*/ caml_call3 (Stdlib_String[15], msg, cutcol, caml_ml_string_length(msg) - cutcol | 0), - /*<>*/ _L_ = + /*<>*/ _M_ = /*<>*/ caml_call2(Stdlib[28], spaces, suffix); /*<>*/ return [0, kwd, spec$0, - /*<>*/ caml_call2(Stdlib[28], prefix, _L_)]; + /*<>*/ caml_call2(Stdlib[28], prefix, _M_)]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[19], _J_, completed); + (Stdlib_List[19], _K_, completed); /*<>*/ } function read_aux(trim, sep, file){ /*<>*/ var @@ -20834,19 +20861,20 @@ (0 < len && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ var - _I_ = + _J_ = /*<>*/ caml_call3 (Stdlib_String[15], word, 0, len - 1 | 0); switch$0 = 1; } - if(! switch$0) var _I_ = word; - var word$0 = _I_; + if(! switch$0) var _J_ = word; + var word$0 = _J_; } else var word$0 = word; words[1] = [0, word$0, words[1]]; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Buffer[8], buf); + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Buffer[8], buf); + /*<>*/ return _y_; /*<>*/ } /*<>*/ try{ for(;;){ @@ -20859,45 +20887,45 @@ (Stdlib_Buffer[12], buf, c); } } - catch(_H_){ - var _F_ = caml_wrap_exception(_H_); - if(_F_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_F_, 0); + catch(_I_){ + var _G_ = caml_wrap_exception(_I_); + if(_G_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_G_, 0); if(0 < /*<>*/ caml_call1(Stdlib_Buffer[7], buf)) /*<>*/ stash(0); /*<>*/ /*<>*/ caml_call1(Stdlib[93], ic); /*<>*/ /*<>*/ var - _G_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); + _H_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Array[10], _G_); + (Stdlib_Array[10], _H_); } /*<>*/ } var _r_ = 10, _s_ = 1; - /*<>*/ function read_arg(_E_){ - /*<>*/ return read_aux(_s_, _r_, _E_); + /*<>*/ function read_arg(_F_){ + /*<>*/ return read_aux(_s_, _r_, _F_); } /*<>*/ var /*<>*/ _t_ = 0, _u_ = 0; - /*<>*/ function read_arg0(_D_){ - /*<>*/ return read_aux(_u_, _t_, _D_); + /*<>*/ function read_arg0(_E_){ + /*<>*/ return read_aux(_u_, _t_, _E_); } function write_aux(sep, file, args){ /*<>*/ /*<>*/ var oc = /*<>*/ caml_call1(Stdlib[61], file); - function _C_(s){ + function _D_(s){ /*<>*/ return caml_call4 (Stdlib_Printf[1], oc, _v_, s, sep); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _C_, args); + (Stdlib_Array[11], _D_, args); /*<>*/ return /*<>*/ caml_call1 (Stdlib[76], oc); /*<>*/ } var _w_ = 10; - /*<>*/ function write_arg(_A_, _B_){ - /*<>*/ return write_aux(_w_, _A_, _B_); + /*<>*/ function write_arg(_B_, _C_){ + /*<>*/ return write_aux(_w_, _B_, _C_); } /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ function write_arg0(_y_, _z_){ - /*<>*/ return write_aux(_x_, _y_, _z_); + /*<>*/ function write_arg0(_z_, _A_){ + /*<>*/ return write_aux(_x_, _z_, _A_); } var Stdlib_Arg = @@ -21564,6 +21592,7 @@ global_data = runtime.caml_get_global_data(), Stdlib_Printexc = global_data.Stdlib__Printexc, Stdlib = global_data.Stdlib, + _b_ = undefined, cst_Fun_Finally_raised = "Fun.Finally_raised: ", cst_Stdlib_Fun_Finally_raised = "Stdlib.Fun.Finally_raised"; function const$0(c, param){ @@ -21594,8 +21623,7 @@ function protect(finally$0, work){ function finally_no_exn(param){ /*<>*/ try{ - /*<>*/ /*<>*/ var - _b_ = /*<>*/ caml_call1(finally$0, 0); + /*<>*/ /*<>*/ caml_call1(finally$0, 0); /*<>*/ return _b_; } catch(e$0){ @@ -22054,6 +22082,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var + _a_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Array = global_data.Stdlib__Array, @@ -22112,45 +22141,49 @@ /*<>*/ c_layout = 0, fortran_layout = 1; function cloop(arr, idx, f, col, max){ - /*<>*/ if(col === idx.length - 1) - /*<>*/ return /*<>*/ caml_ba_set_generic - (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ if(col === idx.length - 1){ + /*<>*/ /*<>*/ caml_ba_set_generic + (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ return _a_; + } /*<>*/ var - /*<>*/ _am_ = + /*<>*/ _an_ = caml_check_bound(max, col)[1 + col] - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var j = _al_; + /*<>*/ _am_ = 0; + if(_an_ >= 0){ + var j = _am_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); /*<>*/ /*<>*/ var - _an_ = j + 1 | 0; - if(_am_ !== j){var j = _an_; continue;} + _ao_ = j + 1 | 0; + if(_an_ !== j){var j = _ao_; continue;} break; } } - return 0; + return _a_; /*<>*/ } function floop(arr, idx, f, col, max){ - /*<>*/ if(0 > col) - /*<>*/ return /*<>*/ caml_ba_set_generic - (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ if(0 > col){ + /*<>*/ /*<>*/ caml_ba_set_generic + (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ return _a_; + } /*<>*/ var - /*<>*/ _aj_ = caml_check_bound(max, col)[1 + col], - /*<>*/ _ai_ = 1; - if(_aj_ >= 1){ - var j = _ai_; + /*<>*/ _ak_ = caml_check_bound(max, col)[1 + col], + /*<>*/ _aj_ = 1; + if(_ak_ >= 1){ + var j = _aj_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ floop(arr, idx, f, col - 1 | 0, max); /*<>*/ /*<>*/ var - _ak_ = j + 1 | 0; - if(_aj_ !== j){var j = _ak_; continue;} + _al_ = j + 1 | 0; + if(_ak_ !== j){var j = _al_; continue;} break; } } - return 0; + return _a_; /*<>*/ } function init(kind, layout, dims, f){ /*<>*/ var @@ -22179,17 +22212,17 @@ /*<>*/ caml_ba_num_dims(a), /*<>*/ d = /*<>*/ caml_make_vect(n, 0), - /*<>*/ _af_ = n - 1 | 0, - /*<>*/ _ae_ = 0; - if(_af_ >= 0){ - var i = _ae_; + /*<>*/ _ag_ = n - 1 | 0, + /*<>*/ _af_ = 0; + if(_ag_ >= 0){ + var i = _af_; for(;;){ /*<>*/ /*<>*/ var - _ag_ = /*<>*/ runtime.caml_ba_dim(a, i); - /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; + _ah_ = /*<>*/ runtime.caml_ba_dim(a, i); + /*<>*/ caml_check_bound(d, i)[1 + i] = _ah_; /*<>*/ /*<>*/ var - _ah_ = i + 1 | 0; - if(_af_ !== i){var i = _ah_; continue;} + _ai_ = i + 1 | 0; + if(_ag_ !== i){var i = _ai_; continue;} break; } } @@ -22197,13 +22230,13 @@ /*<>*/ } function size_in_bytes(arr){ /*<>*/ var - /*<>*/ _ac_ = dims(arr), - /*<>*/ _ad_ = + /*<>*/ _ad_ = dims(arr), + /*<>*/ _ae_ = /*<>*/ caml_call3 - (Stdlib_Array[15], caml_mul, 1, _ac_); + (Stdlib_Array[15], caml_mul, 1, _ad_); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _ad_); + _ae_); /*<>*/ } function create(kind, layout){ /*<>*/ return /*<>*/ caml_ba_create @@ -22214,9 +22247,9 @@ (arr, [0]); /*<>*/ } function set(arr){ - /*<>*/ /*<>*/ var _aa_ = [0]; - /*<>*/ return function(_ab_){ - /*<>*/ return caml_ba_set_generic(arr, _aa_, _ab_);}; + /*<>*/ /*<>*/ var _ab_ = [0]; + /*<>*/ return function(_ac_){ + /*<>*/ return caml_ba_set_generic(arr, _ab_, _ac_);}; /*<>*/ } function size_in_bytes$0(arr){ /*<>*/ return kind_size_in_bytes @@ -22234,10 +22267,10 @@ /*<>*/ } function size_in_bytes$1(arr){ /*<>*/ /*<>*/ var - _$_ = /*<>*/ caml_ba_dim_1(arr); + _aa_ = /*<>*/ caml_ba_dim_1(arr); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _$_); + _aa_); /*<>*/ } function slice(a, n){ /*<>*/ return /*<>*/ runtime.caml_ba_layout @@ -22249,31 +22282,31 @@ /*<>*/ /*<>*/ var arr = create$0(kind, layout, dim); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _Z_ = 1; + /*<>*/ /*<>*/ var ___ = 1; if(dim >= 1){ - var i$0 = _Z_; + var i$0 = ___; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i$0, /*<>*/ caml_call1(f, i$0)); /*<>*/ /*<>*/ var - ___ = i$0 + 1 | 0; - if(dim !== i$0){var i$0 = ___; continue;} + _$_ = i$0 + 1 | 0; + if(dim !== i$0){var i$0 = _$_; continue;} break; } } /*<>*/ return arr; } /*<>*/ var - _X_ = dim - 1 | 0, - /*<>*/ _W_ = 0; - if(_X_ >= 0){ - var i = _W_; + _Y_ = dim - 1 | 0, + /*<>*/ _X_ = 0; + if(_Y_ >= 0){ + var i = _X_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var - _Y_ = i + 1 | 0; - if(_X_ !== i){var i = _Y_; continue;} + _Z_ = i + 1 | 0; + if(_Y_ !== i){var i = _Z_; continue;} break; } } @@ -22283,16 +22316,16 @@ /*<>*/ var /*<>*/ ba = create$0(kind, layout, data.length - 1), /*<>*/ ofs = layout ? 1 : 0, - _U_ = data.length - 1 - 1 | 0, - _T_ = 0; - if(_U_ >= 0){ - var i = _T_; + _V_ = data.length - 1 - 1 | 0, + _U_ = 0; + if(_V_ >= 0){ + var i = _U_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); /*<>*/ /*<>*/ var - _V_ = i + 1 | 0; - if(_U_ !== i){var i = _V_; continue;} + _W_ = i + 1 | 0; + if(_V_ !== i){var i = _W_; continue;} break; } } @@ -22304,16 +22337,16 @@ /*<>*/ } function size_in_bytes$2(arr){ /*<>*/ var - /*<>*/ _R_ = + /*<>*/ _S_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _S_ = + /*<>*/ _T_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _S_), - _R_); + _T_), + _S_); /*<>*/ } function slice_left(a, n){ /*<>*/ return /*<>*/ caml_ba_slice @@ -22327,53 +22360,53 @@ /*<>*/ /*<>*/ var arr = create$1(kind, layout, dim1, dim2); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _N_ = 1; + /*<>*/ /*<>*/ var _O_ = 1; if(dim2 >= 1){ - var j$0 = _N_; + var j$0 = _O_; for(;;){ - /*<>*/ /*<>*/ var _O_ = 1; + /*<>*/ /*<>*/ var _P_ = 1; if(dim1 >= 1){ - var i$0 = _O_; + var i$0 = _P_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); /*<>*/ /*<>*/ var - _Q_ = i$0 + 1 | 0; - if(dim1 !== i$0){var i$0 = _Q_; continue;} + _R_ = i$0 + 1 | 0; + if(dim1 !== i$0){var i$0 = _R_; continue;} break; } } /*<>*/ /*<>*/ var - _P_ = j$0 + 1 | 0; - if(dim2 !== j$0){var j$0 = _P_; continue;} + _Q_ = j$0 + 1 | 0; + if(dim2 !== j$0){var j$0 = _Q_; continue;} break; } } /*<>*/ return arr; } /*<>*/ var - _I_ = dim1 - 1 | 0, - /*<>*/ _H_ = 0; - if(_I_ >= 0){ - var i = _H_; + _J_ = dim1 - 1 | 0, + /*<>*/ _I_ = 0; + if(_J_ >= 0){ + var i = _I_; for(;;){ /*<>*/ var - _K_ = dim2 - 1 | 0, - /*<>*/ _J_ = 0; - if(_K_ >= 0){ - var j = _J_; + _L_ = dim2 - 1 | 0, + /*<>*/ _K_ = 0; + if(_L_ >= 0){ + var j = _K_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i, j, /*<>*/ caml_call2(f, i, j)); /*<>*/ /*<>*/ var - _M_ = j + 1 | 0; - if(_K_ !== j){var j = _M_; continue;} + _N_ = j + 1 | 0; + if(_L_ !== j){var j = _N_; continue;} break; } } /*<>*/ /*<>*/ var - _L_ = i + 1 | 0; - if(_I_ !== i){var i = _L_; continue;} + _M_ = i + 1 | 0; + if(_J_ !== i){var i = _M_; continue;} break; } } @@ -22386,10 +22419,10 @@ 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, /*<>*/ ba = create$1(kind, layout, dim1, dim2), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _C_ = dim1 - 1 | 0, - _B_ = 0; - if(_C_ >= 0){ - var i = _B_; + /*<>*/ _D_ = dim1 - 1 | 0, + _C_ = 0; + if(_D_ >= 0){ + var i = _C_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -22397,22 +22430,22 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array2_of_array_n); /*<>*/ var - /*<>*/ _E_ = dim2 - 1 | 0, - /*<>*/ _D_ = 0; - if(_E_ >= 0){ - var j = _D_; + /*<>*/ _F_ = dim2 - 1 | 0, + /*<>*/ _E_ = 0; + if(_F_ >= 0){ + var j = _E_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (ba, i + ofs | 0, j + ofs | 0, caml_check_bound(row, j)[1 + j]); /*<>*/ /*<>*/ var - _G_ = j + 1 | 0; - if(_E_ !== j){var j = _G_; continue;} + _H_ = j + 1 | 0; + if(_F_ !== j){var j = _H_; continue;} break; } } /*<>*/ /*<>*/ var - _F_ = i + 1 | 0; - if(_C_ !== i){var i = _F_; continue;} + _G_ = i + 1 | 0; + if(_D_ !== i){var i = _G_; continue;} break; } } @@ -22424,20 +22457,20 @@ /*<>*/ } function size_in_bytes$3(arr){ /*<>*/ var - /*<>*/ _y_ = + /*<>*/ _z_ = /*<>*/ runtime.caml_ba_dim_3(arr), - /*<>*/ _z_ = + /*<>*/ _A_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _A_ = + /*<>*/ _B_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul (caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _A_), - _z_), - _y_); + _B_), + _A_), + _z_); /*<>*/ } function slice_left_1(a, n, m){ /*<>*/ return /*<>*/ caml_ba_slice @@ -22459,17 +22492,17 @@ /*<>*/ /*<>*/ var arr = create$2(kind, layout, dim1, dim2, dim3); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _s_ = 1; + /*<>*/ /*<>*/ var _t_ = 1; if(dim3 >= 1){ - var k$0 = _s_; + var k$0 = _t_; for(;;){ - /*<>*/ /*<>*/ var _t_ = 1; + /*<>*/ /*<>*/ var _u_ = 1; if(dim2 >= 1){ - var j$0 = _t_; + var j$0 = _u_; for(;;){ - /*<>*/ /*<>*/ var _v_ = 1; + /*<>*/ /*<>*/ var _w_ = 1; if(dim1 >= 1){ - var i$0 = _v_; + var i$0 = _w_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, @@ -22478,60 +22511,60 @@ k$0, /*<>*/ caml_call3(f, i$0, j$0, k$0)); /*<>*/ /*<>*/ var - _x_ = i$0 + 1 | 0; - if(dim1 !== i$0){var i$0 = _x_; continue;} + _y_ = i$0 + 1 | 0; + if(dim1 !== i$0){var i$0 = _y_; continue;} break; } } /*<>*/ /*<>*/ var - _w_ = j$0 + 1 | 0; - if(dim2 !== j$0){var j$0 = _w_; continue;} + _x_ = j$0 + 1 | 0; + if(dim2 !== j$0){var j$0 = _x_; continue;} break; } } /*<>*/ /*<>*/ var - _u_ = k$0 + 1 | 0; - if(dim3 !== k$0){var k$0 = _u_; continue;} + _v_ = k$0 + 1 | 0; + if(dim3 !== k$0){var k$0 = _v_; continue;} break; } } /*<>*/ return arr; } /*<>*/ var - _k_ = dim1 - 1 | 0, - /*<>*/ _j_ = 0; - if(_k_ >= 0){ - var i = _j_; + _l_ = dim1 - 1 | 0, + /*<>*/ _k_ = 0; + if(_l_ >= 0){ + var i = _k_; for(;;){ /*<>*/ var - _m_ = dim2 - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var j = _l_; + _n_ = dim2 - 1 | 0, + /*<>*/ _m_ = 0; + if(_n_ >= 0){ + var j = _m_; for(;;){ /*<>*/ var - _p_ = dim3 - 1 | 0, - /*<>*/ _o_ = 0; - if(_p_ >= 0){ - var k = _o_; + _q_ = dim3 - 1 | 0, + /*<>*/ _p_ = 0; + if(_q_ >= 0){ + var k = _p_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); /*<>*/ /*<>*/ var - _r_ = k + 1 | 0; - if(_p_ !== k){var k = _r_; continue;} + _s_ = k + 1 | 0; + if(_q_ !== k){var k = _s_; continue;} break; } } /*<>*/ /*<>*/ var - _q_ = j + 1 | 0; - if(_m_ !== j){var j = _q_; continue;} + _r_ = j + 1 | 0; + if(_n_ !== j){var j = _r_; continue;} break; } } /*<>*/ /*<>*/ var - _n_ = i + 1 | 0; - if(_k_ !== i){var i = _n_; continue;} + _o_ = i + 1 | 0; + if(_l_ !== i){var i = _o_; continue;} break; } } @@ -22548,10 +22581,10 @@ : caml_check_bound(caml_check_bound(data, 0)[1], 0)[1].length - 1, /*<>*/ ba = create$2(kind, layout, dim1, dim2, dim3), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _b_ = dim1 - 1 | 0, - _a_ = 0; - if(_b_ >= 0){ - var i = _a_; + /*<>*/ _c_ = dim1 - 1 | 0, + _b_ = 0; + if(_c_ >= 0){ + var i = _b_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -22559,10 +22592,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n); /*<>*/ var - /*<>*/ _d_ = dim2 - 1 | 0, - /*<>*/ _c_ = 0; - if(_d_ >= 0){ - var j = _c_; + /*<>*/ _e_ = dim2 - 1 | 0, + /*<>*/ _d_ = 0; + if(_e_ >= 0){ + var j = _d_; for(;;){ /*<>*/ /*<>*/ var col = caml_check_bound(row, j)[1 + j]; @@ -22570,10 +22603,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n$0); /*<>*/ var - /*<>*/ _g_ = dim3 - 1 | 0, - /*<>*/ _f_ = 0; - if(_g_ >= 0){ - var k = _f_; + /*<>*/ _h_ = dim3 - 1 | 0, + /*<>*/ _g_ = 0; + if(_h_ >= 0){ + var k = _g_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (ba, @@ -22582,20 +22615,20 @@ k + ofs | 0, caml_check_bound(col, k)[1 + k]); /*<>*/ /*<>*/ var - _i_ = k + 1 | 0; - if(_g_ !== k){var k = _i_; continue;} + _j_ = k + 1 | 0; + if(_h_ !== k){var k = _j_; continue;} break; } } /*<>*/ /*<>*/ var - _h_ = j + 1 | 0; - if(_d_ !== j){var j = _h_; continue;} + _i_ = j + 1 | 0; + if(_e_ !== j){var j = _i_; continue;} break; } } /*<>*/ /*<>*/ var - _e_ = i + 1 | 0; - if(_b_ !== i){var i = _e_; continue;} + _f_ = i + 1 | 0; + if(_c_ !== i){var i = _f_; continue;} break; } } @@ -24183,6 +24216,7 @@ Stdlib_Int = global_data.Stdlib__Int, Stdlib_Array = global_data.Stdlib__Array, Stdlib_Obj = global_data.Stdlib__Obj, + _a_ = undefined, cst_Weak_Make_hash_bucket_cann = "Weak.Make: hash bucket cannot grow more", cst_Weak_fill = "Weak.fill", cst_Weak_blit = "Weak.blit", @@ -24193,9 +24227,9 @@ cst_Weak_create = "Weak.create"; function create(l){ /*<>*/ var - _W_ = 0 <= l ? 1 : 0, - _X_ = _W_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _W_; - if(1 - _X_) + _X_ = 0 <= l ? 1 : 0, + _Y_ = _X_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _X_; + if(1 - _Y_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Weak_create); /*<>*/ return /*<>*/ runtime.caml_weak_create @@ -24206,10 +24240,10 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _T_ = 0 <= o ? 1 : 0, - _U_ = _T_ ? o < length(e) ? 1 : 0 : _T_, - _V_ = 1 - _U_; - return _V_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _V_; + _U_ = 0 <= o ? 1 : 0, + _V_ = _U_ ? o < length(e) ? 1 : 0 : _U_, + _W_ = 1 - _V_; + return _W_ ? ( /*<>*/ caml_call1(Stdlib[1], msg), _a_) : _W_; /*<>*/ } function set(e, o, x){ /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); @@ -24242,13 +24276,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _R_ = 0 !== l ? 1 : 0, - _S_ = - _R_ + _S_ = 0 !== l ? 1 : 0, + _T_ = + _S_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _R_; - /*<>*/ return _S_; + : _S_; + /*<>*/ return _T_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Weak_blit); @@ -24256,13 +24290,13 @@ function fill(ar, ofs, len, x){ /*<>*/ if (0 <= ofs && 0 <= len && (length(ar) - len | 0) >= ofs){ - var _P_ = (ofs + len | 0) - 1 | 0; - if(_P_ >= ofs){ + var _Q_ = (ofs + len | 0) - 1 | 0; + if(_Q_ >= ofs){ var i = ofs; for(;;){ /*<>*/ set(ar, i, x); - /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(_P_ !== i){var i = _Q_; continue;} + /*<>*/ /*<>*/ var _R_ = i + 1 | 0; + if(_Q_ !== i){var i = _R_; continue;} break; } } @@ -24291,15 +24325,15 @@ /*<>*/ } function clear(t){ /*<>*/ var - _N_ = t[1].length - 1 - 1 | 0, - /*<>*/ _M_ = 0; - if(_N_ >= 0){ - var i = _M_; + _O_ = t[1].length - 1 - 1 | 0, + /*<>*/ _N_ = 0; + if(_O_ >= 0){ + var i = _N_; for(;;){ /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; - /*<>*/ /*<>*/ var _O_ = i + 1 | 0; - if(_N_ !== i){var i = _O_; continue;} + /*<>*/ /*<>*/ var _P_ = i + 1 | 0; + if(_O_ !== i){var i = _P_; continue;} break; } } @@ -24308,8 +24342,8 @@ return 0; /*<>*/ } function fold(f, t, init){ - /*<>*/ var _K_ = t[1], i = 0; - /*<>*/ function _L_(b, accu$1){ + /*<>*/ var _L_ = t[1], i = 0; + /*<>*/ function _M_(b, accu$1){ var i$0 = i, accu = accu$1; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu; @@ -24329,11 +24363,11 @@ } } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _L_, _K_, init); + (Stdlib_Array[17], _M_, _L_, init); /*<>*/ } function iter(f, t){ - /*<>*/ var _I_ = t[1], i = 0; - /*<>*/ function _J_(b){ + /*<>*/ var _J_ = t[1], i = 0; + /*<>*/ function _K_(b){ var i$0 = i; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return 0; @@ -24349,15 +24383,15 @@ } } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Array[11], _J_, _I_); + (Stdlib_Array[11], _K_, _J_); /*<>*/ } function count_bucket(i, b, accu){ /*<>*/ var i$0 = i, accu$0 = accu; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu$0; /*<>*/ var - /*<>*/ _H_ = check(b, i$0) ? 1 : 0, - accu$1 = accu$0 + _H_ | 0, + /*<>*/ _I_ = check(b, i$0) ? 1 : 0, + accu$1 = accu$0 + _I_ | 0, i$1 = i$0 + 1 | 0, i$0 = i$1, accu$0 = accu$1; @@ -24365,14 +24399,14 @@ /*<>*/ } function count(t){ /*<>*/ var - /*<>*/ _B_ = 0, - _C_ = t[1], - _D_ = 0; - /*<>*/ function _E_(_F_, _G_){ - /*<>*/ return count_bucket(_D_, _F_, _G_); + /*<>*/ _C_ = 0, + _D_ = t[1], + _E_ = 0; + /*<>*/ function _F_(_G_, _H_){ + /*<>*/ return count_bucket(_E_, _G_, _H_); } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _E_, _C_, _B_); + (Stdlib_Array[17], _F_, _D_, _C_); /*<>*/ } function add_aux(t, setter, d, h, index){ /*<>*/ var @@ -24416,17 +24450,17 @@ /*<>*/ caml_check_bound(newhashes, sz)[1 + sz] = h; /*<>*/ caml_check_bound(t[1], index)[1 + index] = newbucket$0; /*<>*/ caml_check_bound(t[2], index)[1 + index] = newhashes; - var _x_ = sz <= t[3] ? 1 : 0, _y_ = _x_ ? t[3] < newsz ? 1 : 0 : _x_; - if(_y_){ + var _y_ = sz <= t[3] ? 1 : 0, _z_ = _y_ ? t[3] < newsz ? 1 : 0 : _y_; + if(_z_){ t[4] = t[4] + 1 | 0; var i$4 = 0; for(;;){ /*<>*/ var - _n_ = t[5], - /*<>*/ bucket = caml_check_bound(t[1], _n_)[1 + _n_], - /*<>*/ _o_ = t[5], + _o_ = t[5], + /*<>*/ bucket = caml_check_bound(t[1], _o_)[1 + _o_], + /*<>*/ _p_ = t[5], /*<>*/ hbucket = - caml_check_bound(t[2], _o_)[1 + _o_], + caml_check_bound(t[2], _p_)[1 + _p_], /*<>*/ len = length(bucket), prev_len = (((len - 3 | 0) * 2 | 0) + 2 | 0) / 3 | 0, /*<>*/ live = count_bucket(0, bucket, 0); @@ -24444,8 +24478,8 @@ /*<>*/ if(check(bucket, j)){ /*<>*/ blit(bucket, j, bucket, i$0, 1); /*<>*/ /*<>*/ var - _p_ = caml_check_bound(hbucket, j)[1 + j]; - /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _p_; + _q_ = caml_check_bound(hbucket, j)[1 + j]; + /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _q_; /*<>*/ var /*<>*/ j$0 = j - 1 | 0, i$2 = i$0 + 1 | 0, @@ -24459,39 +24493,39 @@ continue; } if(0 === prev_len){ - var _q_ = t[5]; - /*<>*/ caml_check_bound(t[1], _q_)[1 + _q_] = emptybucket; var _r_ = t[5]; - /*<>*/ caml_check_bound(t[2], _r_)[1 + _r_] = [0]; + /*<>*/ caml_check_bound(t[1], _r_)[1 + _r_] = emptybucket; + var _s_ = t[5]; + /*<>*/ caml_check_bound(t[2], _s_)[1 + _s_] = [0]; } else{ /*<>*/ /*<>*/ var newbucket = create(prev_len); /*<>*/ blit(bucket, 0, newbucket, 0, prev_len); - var _u_ = t[5]; - /*<>*/ caml_check_bound(t[1], _u_)[1 + _u_] = newbucket; + var _v_ = t[5]; + /*<>*/ caml_check_bound(t[1], _v_)[1 + _v_] = newbucket; /*<>*/ var - /*<>*/ _v_ = + /*<>*/ _w_ = /*<>*/ caml_call3 (Stdlib_Array[5], hbucket, 0, prev_len), - _w_ = t[5]; - /*<>*/ caml_check_bound(t[2], _w_)[1 + _w_] = _v_; + _x_ = t[5]; + /*<>*/ caml_check_bound(t[2], _x_)[1 + _x_] = _w_; } var - _s_ = t[3] < len ? 1 : 0, - _t_ = _s_ ? prev_len <= t[3] ? 1 : 0 : _s_; - if(_t_) t[4] = t[4] - 1 | 0; + _t_ = t[3] < len ? 1 : 0, + _u_ = _t_ ? prev_len <= t[3] ? 1 : 0 : _t_; + if(_u_) t[4] = t[4] - 1 | 0; break; } } t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); - /*<>*/ /*<>*/ var _A_ = i$4 + 1 | 0; - if(2 !== i$4){var i$4 = _A_; continue;} + /*<>*/ /*<>*/ var _B_ = i$4 + 1 | 0; + if(2 !== i$4){var i$4 = _B_; continue;} break; } } - var _z_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; - if(! _z_) return _z_; + var _A_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; + if(! _A_) return _A_; /*<>*/ var oldlen = t[1].length - 1, /*<>*/ newlen = @@ -24500,9 +24534,9 @@ if(oldlen < newlen){ /*<>*/ var /*<>*/ newt = create$0(newlen), - _l_ = t[1], + _m_ = t[1], i = 0, - /*<>*/ _m_ = + /*<>*/ _n_ = function(j, ob){ var oi = i; /*<>*/ for(;;){ @@ -24528,7 +24562,7 @@ } }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[12], _m_, _l_); + (Stdlib_Array[12], _n_, _m_); t[1] = newt[1]; t[2] = newt[2]; t[3] = newt[3]; @@ -24676,24 +24710,24 @@ } /*<>*/ } function remove(t, d){ - /*<>*/ /*<>*/ var _k_ = 0; + /*<>*/ /*<>*/ var _l_ = 0; /*<>*/ return find_shadow (t, d, function(w, i){ /*<>*/ return set(w, i, 0); /*<>*/ }, - _k_); + _l_); /*<>*/ } function mem(t, d){ - /*<>*/ /*<>*/ var _j_ = 0; + /*<>*/ /*<>*/ var _k_ = 0; /*<>*/ return find_shadow (t, d, function(w, i){ /*<>*/ return 1; /*<>*/ }, - _j_); + _k_); /*<>*/ } function find_all(t, d){ /*<>*/ var @@ -24740,17 +24774,17 @@ /*<>*/ caml_call2(Stdlib_Array[13], length, t[1]); /*<>*/ /*<>*/ caml_call2 (Stdlib_Array[30], runtime.caml_int_compare, lens); - var _a_ = 0; - function _b_(_i_, _h_){ /*<>*/ return _i_ + _h_ | 0;} + var _b_ = 0; + function _c_(_j_, _i_){ /*<>*/ return _j_ + _i_ | 0;} /*<>*/ var /*<>*/ totlen = - /*<>*/ caml_call3(Stdlib_Array[15], _b_, _a_, lens), - /*<>*/ _c_ = len - 1 | 0, - _e_ = len / 2 | 0, - /*<>*/ _d_ = caml_check_bound(lens, _c_)[1 + _c_], - /*<>*/ _f_ = caml_check_bound(lens, _e_)[1 + _e_], - /*<>*/ _g_ = caml_check_bound(lens, 0)[1]; - /*<>*/ return [0, len, count(t), totlen, _g_, _f_, _d_]; + /*<>*/ caml_call3(Stdlib_Array[15], _c_, _b_, lens), + /*<>*/ _d_ = len - 1 | 0, + _f_ = len / 2 | 0, + /*<>*/ _e_ = caml_check_bound(lens, _d_)[1 + _d_], + /*<>*/ _g_ = caml_check_bound(lens, _f_)[1 + _f_], + /*<>*/ _h_ = caml_check_bound(lens, 0)[1]; + /*<>*/ return [0, len, count(t), totlen, _h_, _g_, _e_]; /*<>*/ } /*<>*/ return [0, create$0, @@ -24807,6 +24841,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var + _m_ = undefined, global_data = runtime.caml_get_global_data(), cst$14 = ".", cst$11 = cst$15, @@ -24854,25 +24889,27 @@ /*<>*/ } var pp_infinity = 1000000010; function pp_output_string(state, s){ - /*<>*/ return caml_call3 - (state[17], s, 0, caml_ml_string_length(s)); + /*<>*/ caml_call3 + (state[17], s, 0, caml_ml_string_length(s)); + return _m_; /*<>*/ } function pp_output_newline(state){ - /*<>*/ return /*<>*/ caml_call1 - (state[19], 0); + /*<>*/ /*<>*/ caml_call1 + (state[19], 0); + /*<>*/ return _m_; /*<>*/ } function format_pp_text(state, size, text){ /*<>*/ state[9] = state[9] - size | 0; /*<>*/ pp_output_string(state, text); state[11] = 0; - return 0; + return _m_; /*<>*/ } function format_string(state, s){ /*<>*/ /*<>*/ var - _bQ_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); - /*<>*/ return _bQ_ - ? format_pp_text(state, caml_ml_string_length(s), s) - : _bQ_; + _bO_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); + /*<>*/ return _bO_ + ? (format_pp_text(state, caml_ml_string_length(s), s), _m_) + : _bO_; /*<>*/ } function break_new_line(state, param, width){ var after = param[3], offset = param[2], before = param[1]; @@ -24888,10 +24925,12 @@ var n = state[10]; /*<>*/ /*<>*/ caml_call1 (state[21], n); - /*<>*/ return format_string(state, after); + /*<>*/ format_string(state, after); + /*<>*/ return _m_; } function break_line(state, width){ - /*<>*/ return break_new_line(state, _a_, width); + /*<>*/ break_new_line(state, _a_, width); + /*<>*/ return _m_; /*<>*/ } function break_same_line(state, param){ var after = param[3], width = param[2], before = param[1]; @@ -24899,7 +24938,8 @@ state[9] = state[9] - width | 0; /*<>*/ /*<>*/ caml_call1 (state[20], width); - /*<>*/ return format_string(state, after); + /*<>*/ format_string(state, after); + /*<>*/ return _m_; } function format_pp_token(state, size$0, param){ /*<>*/ if(typeof param === "number") @@ -24908,7 +24948,7 @@ /*<>*/ /*<>*/ var match$3 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$3) /*<>*/ return 0; + if(! match$3) /*<>*/ return _m_; /*<>*/ var tabs = match$3[1][1], /*<>*/ add_tab = @@ -24921,49 +24961,54 @@ : [0, x, add_tab(n, l)]; }; tabs[1] = add_tab(state[6] - state[9] | 0, tabs[1]); - return 0; + return _m_; case 1: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[2]); - /*<>*/ return 0; + /*<>*/ return _m_; case 2: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[3]); - /*<>*/ return 0; + /*<>*/ return _m_; case 3: /*<>*/ /*<>*/ var match$4 = /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(! match$4) - /*<>*/ return pp_output_newline(state); - var width$0 = match$4[1][2]; - /*<>*/ return break_line(state, width$0); + if(match$4){ + var width$0 = match$4[1][2]; + /*<>*/ break_line(state, width$0); + /*<>*/ return _m_; + } + /*<>*/ pp_output_newline(state); + /*<>*/ return _m_; case 4: - var _bO_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; - if(! _bO_) return _bO_; + var _bM_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; + if(! _bM_) return _bM_; /*<>*/ /*<>*/ var match$1 = /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); - if(! match$1) /*<>*/ return 0; + if(! match$1) /*<>*/ return _m_; var match$2 = match$1[1], size = match$2[1], length = match$2[3]; state[12] = state[12] - length | 0; state[9] = state[9] + size | 0; - return 0; + return _m_; default: /*<>*/ /*<>*/ var match$5 = /*<>*/ caml_call1(Stdlib_Stack[5], state[5]); - if(! match$5) /*<>*/ return 0; + if(! match$5) /*<>*/ return _m_; /*<>*/ var tag_name = match$5[1], /*<>*/ marker = /*<>*/ caml_call1(state[25], tag_name); - /*<>*/ return pp_output_string(state, marker); + /*<>*/ pp_output_string(state, marker); + /*<>*/ return _m_; } switch(param[0]){ case 0: var s = param[1]; - /*<>*/ return format_pp_text(state, size$0, s); + /*<>*/ format_pp_text(state, size$0, s); + /*<>*/ return _m_; case 1: /*<>*/ var breaks = param[2], @@ -24972,31 +25017,32 @@ before = breaks[1], /*<>*/ match$6 = /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(! match$6) /*<>*/ return 0; + if(! match$6) /*<>*/ return _m_; var match$7 = match$6[1], width$1 = match$7[2], box_type$0 = match$7[1]; /*<>*/ switch(box_type$0){ case 0: - /*<>*/ return break_same_line(state, fits); + /*<>*/ break_same_line(state, fits); + /*<>*/ return _m_; case 1: - /*<>*/ return break_new_line - (state, breaks, width$1); + /*<>*/ break_new_line(state, breaks, width$1); + /*<>*/ return _m_; case 2: - /*<>*/ return break_new_line - (state, breaks, width$1); + /*<>*/ break_new_line(state, breaks, width$1); + /*<>*/ return _m_; case 3: return state[9] < (size$0 + caml_ml_string_length(before) | 0) - ? break_new_line(state, breaks, width$1) - : break_same_line(state, fits); + ? (break_new_line(state, breaks, width$1), _m_) + : (break_same_line(state, fits), _m_); case 4: return state[11] - ? break_same_line(state, fits) + ? (break_same_line(state, fits), _m_) : state [9] < (size$0 + caml_ml_string_length(before) | 0) - ? break_new_line(state, breaks, width$1) + ? (break_new_line(state, breaks, width$1), _m_) : ((state [6] - width$1 @@ -25004,10 +25050,11 @@ + off | 0) < state[10] - ? break_new_line(state, breaks, width$1) - : break_same_line(state, fits); + ? (break_new_line(state, breaks, width$1), _m_) + : (break_same_line(state, fits), _m_); default: - /*<>*/ return break_same_line(state, fits); + /*<>*/ break_same_line(state, fits); + /*<>*/ return _m_; } case 2: /*<>*/ var @@ -25016,7 +25063,7 @@ insertion_point = state[6] - state[9] | 0, /*<>*/ match$8 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$8) /*<>*/ return 0; + if(! match$8) /*<>*/ return _m_; /*<>*/ var tabs$0 = match$8[1][1], /*<>*/ match$9 = tabs$0[1]; @@ -25026,11 +25073,11 @@ if(param$0){ var tail = param$0[2], head = param$0[1]; if(insertion_point > head){var param$0 = tail; continue;} - var _bP_ = head; + var _bN_ = head; } else - var _bP_ = first; - var tab = _bP_; + var _bN_ = first; + var tab = _bN_; break; } } @@ -25038,9 +25085,12 @@ var tab = insertion_point; var offset = tab - insertion_point | 0; /*<>*/ return 0 <= offset - ? break_same_line(state, [0, cst$0, offset + n | 0, cst]) - : break_new_line - (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]); + ? (break_same_line + (state, [0, cst$0, offset + n | 0, cst]), + _m_) + : (break_new_line + (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]), + _m_); case 3: var ty = param[2], @@ -25062,19 +25112,22 @@ 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]); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); + /*<>*/ return _m_; case 4: var tbox = param[1]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Stack[3], tbox, state[3]); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Stack[3], tbox, state[3]); + /*<>*/ return _m_; 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]); + caml_call2(Stdlib_Stack[3], tag_name$0, state[5]); + return _m_; } } function advance_left(state){ @@ -25088,10 +25141,10 @@ length = match$0[3], token = match$0[2], pending_count = state[13] - state[12] | 0, - /*<>*/ _bM_ = 0 <= size ? 1 : 0, - /*<>*/ _bN_ = - _bM_ || (state[9] <= pending_count ? 1 : 0); - if(! _bN_) /*<>*/ return _bN_; + /*<>*/ _bK_ = 0 <= size ? 1 : 0, + /*<>*/ _bL_ = + _bK_ || (state[9] <= pending_count ? 1 : 0); + if(! _bL_) /*<>*/ return _bL_; /*<>*/ /*<>*/ caml_call1 (Stdlib_Queue[5], state[28]); /*<>*/ /*<>*/ var @@ -25113,48 +25166,40 @@ (Stdlib_Stack[8], stack); /*<>*/ /*<>*/ var queue_elem = [0, unknown, _b_, 0]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Stack[3], [0, -1, queue_elem], stack); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Stack[3], [0, -1, queue_elem], stack); + /*<>*/ return _m_; /*<>*/ } function set_size(state, ty){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[7], state[1]); - if(! match) /*<>*/ return 0; + if(! match) /*<>*/ return _m_; /*<>*/ var match$0 = match[1], queue_elem = match$0[2], left_total = match$0[1], /*<>*/ size = queue_elem[1]; - if(left_total < state[12]) return initialize_scan_stack(state[1]); - var _bI_ = queue_elem[2]; - if(typeof _bI_ !== "number") - switch(_bI_[0]){ + if(left_total < state[12]){initialize_scan_stack(state[1]); return _m_;} + var _bJ_ = queue_elem[2]; + if(typeof _bJ_ !== "number") + switch(_bJ_[0]){ case 3: - var - _bK_ = 1 - ty, - _bL_ = - _bK_ - ? (queue_elem - [1] - = state[13] + size | 0, - /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), - 0) - : _bK_; - /*<>*/ return _bL_; + if(1 - ty){ + queue_elem[1] = state[13] + size | 0; + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[5], state[1]); + } + /*<>*/ return _m_; case 1: case 2: - var - _bJ_ = - ty - ? (queue_elem - [1] - = state[13] + size | 0, - /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), - 0) - : ty; - /*<>*/ return _bJ_; + if(ty){ + queue_elem[1] = state[13] + size | 0; + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[5], state[1]); + } + /*<>*/ return _m_; } - /*<>*/ return 0; + /*<>*/ return _m_; /*<>*/ } function scan_push(state, b, token){ /*<>*/ pp_enqueue(state, token); @@ -25172,26 +25217,26 @@ /*<>*/ elem = [0, size, [3, indent, br_ty], 0]; /*<>*/ return scan_push(state, 0, elem); } - var _bH_ = state[14] === state[15] ? 1 : 0; - if(! _bH_) return _bH_; + var _bI_ = state[14] === state[15] ? 1 : 0; + if(! _bI_) return _bI_; var s = state[16]; /*<>*/ return enqueue_string_as (state, caml_ml_string_length(s), s); /*<>*/ } function pp_close_box(state, param){ - /*<>*/ var _bF_ = 1 < state[14] ? 1 : 0; - if(_bF_){ + /*<>*/ var _bG_ = 1 < state[14] ? 1 : 0; + if(_bG_){ 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 _bG_ = 0; + var _bH_ = 0; } else - var _bG_ = _bF_; - return _bG_; + var _bH_ = _bG_; + return _bH_; /*<>*/ } function pp_open_stag(state, tag_name){ /*<>*/ if(state[22]){ @@ -25200,8 +25245,8 @@ /*<>*/ /*<>*/ caml_call1 (state[26], tag_name); } - var _bE_ = state[23]; - if(! _bE_) return _bE_; + var _bF_ = state[23]; + if(! _bF_) return _bF_; /*<>*/ /*<>*/ var token = [5, tag_name]; /*<>*/ return pp_enqueue(state, [0, zero, token, 0]); @@ -25209,8 +25254,8 @@ function pp_close_stag(state, param){ /*<>*/ if(state[23]) /*<>*/ pp_enqueue(state, [0, zero, 5, 0]); - var _bC_ = state[22]; - if(_bC_){ + var _bD_ = state[22]; + if(_bD_){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[5], state[4]); if(match){ @@ -25218,11 +25263,11 @@ /*<>*/ return /*<>*/ caml_call1 (state[27], tag_name); } - var _bD_ = 0; + var _bE_ = 0; } else - var _bD_ = _bC_; - /*<>*/ return _bD_; + var _bE_ = _bD_; + /*<>*/ return _bE_; /*<>*/ } function pp_set_print_tags(state, b){ /*<>*/ state[22] = b; @@ -25276,12 +25321,12 @@ /*<>*/ return pp_open_box_gen(state, 0, 3); /*<>*/ } function pp_flush_queue(state, b){ - /*<>*/ var _bA_ = state[4]; - function _bB_(param){ + /*<>*/ var _bB_ = state[4]; + function _bC_(param){ /*<>*/ return pp_close_stag(state, 0); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[12], _bB_, _bA_); + (Stdlib_Stack[12], _bC_, _bB_); /*<>*/ for(;;){ if(1 < state[14]){ /*<>*/ pp_close_box(state, 0); @@ -25290,12 +25335,13 @@ state[13] = pp_infinity; /*<>*/ advance_left(state); if(b) /*<>*/ pp_output_newline(state); - /*<>*/ return pp_rinit(state); + /*<>*/ pp_rinit(state); + /*<>*/ return _m_; } /*<>*/ } function pp_print_as_size(state, size, s){ - /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; - return _bz_ ? enqueue_string_as(state, size, s) : _bz_; + /*<>*/ var _bA_ = state[14] < state[15] ? 1 : 0; + return _bA_ ? enqueue_string_as(state, size, s) : _bA_; /*<>*/ } function pp_print_as(state, isize, s){ /*<>*/ return pp_print_as_size(state, isize, s); @@ -25354,20 +25400,20 @@ (state[18], 0); /*<>*/ } function pp_force_newline(state, param){ - /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; - return _by_ ? enqueue_advance(state, [0, zero, 3, 0]) : _by_; + /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; + return _bz_ ? enqueue_advance(state, [0, zero, 3, 0]) : _bz_; /*<>*/ } function pp_print_if_newline(state, param){ - /*<>*/ var _bx_ = state[14] < state[15] ? 1 : 0; - return _bx_ ? enqueue_advance(state, [0, zero, 4, 0]) : _bx_; + /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; + return _by_ ? enqueue_advance(state, [0, zero, 4, 0]) : _by_; /*<>*/ } function pp_print_custom_break(state, fits, breaks){ /*<>*/ var after = fits[3], width = fits[2], before = fits[1], - _bw_ = state[14] < state[15] ? 1 : 0; - if(! _bw_) return _bw_; + _bx_ = state[14] < state[15] ? 1 : 0; + if(! _bx_) return _bx_; /*<>*/ var size = - state[13] | 0, /*<>*/ token = [1, fits, breaks], @@ -25390,33 +25436,33 @@ /*<>*/ } function pp_open_tbox(state, param){ /*<>*/ state[14] = state[14] + 1 | 0; - var _bv_ = state[14] < state[15] ? 1 : 0; - if(! _bv_) return _bv_; + var _bw_ = state[14] < state[15] ? 1 : 0; + if(! _bw_) return _bw_; /*<>*/ /*<>*/ var elem = [0, zero, [4, [0, [0, 0]]], 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_close_tbox(state, param){ - /*<>*/ var _bs_ = 1 < state[14] ? 1 : 0; - if(_bs_){ - var _bt_ = state[14] < state[15] ? 1 : 0; - if(_bt_){ + /*<>*/ var _bt_ = 1 < state[14] ? 1 : 0; + if(_bt_){ + var _bu_ = state[14] < state[15] ? 1 : 0; + if(_bu_){ /*<>*/ /*<>*/ var elem = [0, zero, 2, 0]; /*<>*/ enqueue_advance(state, elem); state[14] = state[14] - 1 | 0; - var _bu_ = 0; + var _bv_ = 0; } else - var _bu_ = _bt_; + var _bv_ = _bu_; } else - var _bu_ = _bs_; - return _bu_; + var _bv_ = _bt_; + return _bv_; /*<>*/ } function pp_print_tbreak(state, width, offset){ - /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; - if(! _br_) return _br_; + /*<>*/ var _bs_ = state[14] < state[15] ? 1 : 0; + if(! _bs_) return _bs_; /*<>*/ var size = - state[13] | 0, /*<>*/ elem = [0, size, [2, width, offset], width]; @@ -25426,17 +25472,17 @@ /*<>*/ return pp_print_tbreak(state, 0, 0); /*<>*/ } function pp_set_tab(state, param){ - /*<>*/ var _bq_ = state[14] < state[15] ? 1 : 0; - if(! _bq_) return _bq_; + /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; + if(! _br_) return _br_; /*<>*/ /*<>*/ var elem = [0, zero, 0, 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_set_max_boxes(state, n){ /*<>*/ var - _bo_ = 1 < n ? 1 : 0, - _bp_ = _bo_ ? (state[15] = n, 0) : _bo_; - return _bp_; + _bp_ = 1 < n ? 1 : 0, + _bq_ = _bp_ ? (state[15] = n, 0) : _bp_; + return _bq_; /*<>*/ } function pp_get_max_boxes(state, param){ /*<>*/ return state[15]; @@ -25455,10 +25501,10 @@ /*<>*/ return n < 1000000010 ? n : 1000000009; /*<>*/ } function pp_set_max_indent(state, n$0){ - /*<>*/ var _bn_ = 1 < n$0 ? 1 : 0; + /*<>*/ var _bo_ = 1 < n$0 ? 1 : 0; + if(! _bo_) return _bo_; + var n$1 = state[6] - n$0 | 0, _bn_ = 1 <= n$1 ? 1 : 0; if(! _bn_) return _bn_; - var n$1 = state[6] - n$0 | 0, _bm_ = 1 <= n$1 ? 1 : 0; - if(! _bm_) return _bm_; /*<>*/ /*<>*/ var n = pp_limit(n$1); state[7] = n; state[8] = state[6] - state[7] | 0; @@ -25468,19 +25514,19 @@ /*<>*/ return state[8]; /*<>*/ } function pp_set_margin(state, n){ - /*<>*/ var _bk_ = 1 <= n ? 1 : 0; - if(! _bk_) return _bk_; + /*<>*/ var _bl_ = 1 <= n ? 1 : 0; + if(! _bl_) return _bl_; /*<>*/ /*<>*/ var n$0 = pp_limit(n); state[6] = n$0; if(state[8] <= state[6]) var new_max_indent = state[8]; else /*<>*/ var - /*<>*/ _bl_ = + /*<>*/ _bm_ = /*<>*/ caml_call2 (Stdlib_Int[11], state[6] - state[7] | 0, state[6] / 2 | 0), new_max_indent = - /*<>*/ caml_call2(Stdlib_Int[11], _bl_, 1); + /*<>*/ caml_call2(Stdlib_Int[11], _bm_, 1); /*<>*/ return pp_set_max_indent(state, new_max_indent); /*<>*/ } function validate_geometry(param){ @@ -25511,11 +25557,11 @@ /*<>*/ return pp_set_full_geometry(state, geometry); /*<>*/ var msg = match[1], - /*<>*/ _bj_ = + /*<>*/ _bk_ = /*<>*/ caml_call2 (Stdlib[28], cst_Format_pp_set_geometry, msg); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], _bj_], 1); + ([0, Stdlib[6], _bk_], 1); /*<>*/ } function pp_safe_set_geometry(state, max_indent, margin){ /*<>*/ /*<>*/ var @@ -25568,8 +25614,8 @@ function display_blanks(state, n){ /*<>*/ var n$0 = n; /*<>*/ for(;;){ - var _bi_ = 0 < n$0 ? 1 : 0; - if(! _bi_) return _bi_; + var _bj_ = 0 < n$0 ? 1 : 0; + if(! _bj_) return _bj_; if(80 >= n$0) /*<>*/ return /*<>*/ caml_call3 (state[17], blank_line, 0, n$0); @@ -25589,9 +25635,9 @@ (Stdlib[63], oc); /*<>*/ }; state[19] = - function(_bh_){ /*<>*/ return display_newline(state, _bh_);}; - state[20] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; - state[21] = function(_bf_){ /*<>*/ return display_blanks(state, _bf_);}; + function(_bi_){ /*<>*/ return display_newline(state, _bi_);}; + state[20] = function(_bh_){ /*<>*/ return display_blanks(state, _bh_);}; + state[21] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; return 0; /*<>*/ } function default_pp_mark_open_tag(param){ @@ -25599,23 +25645,23 @@ /*<>*/ return cst$10; /*<>*/ var s = param[2], - /*<>*/ _be_ = + /*<>*/ _bf_ = /*<>*/ caml_call2(Stdlib[28], s, cst$8); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$9, _be_); + (Stdlib[28], cst$9, _bf_); /*<>*/ } function default_pp_mark_close_tag(param){ /*<>*/ if(param[1] !== String_tag) /*<>*/ return cst$13; /*<>*/ var s = param[2], - /*<>*/ _bd_ = + /*<>*/ _be_ = /*<>*/ caml_call2(Stdlib[28], s, cst$11); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$12, _bd_); + (Stdlib[28], cst$12, _be_); /*<>*/ } - function default_pp_print_open_tag(_bc_){ /*<>*/ return 0;} - function default_pp_print_close_tag(_bb_){ /*<>*/ return 0;} + function default_pp_print_open_tag(_bd_){ /*<>*/ return 0;} + function default_pp_print_close_tag(_bc_){ /*<>*/ return 0;} function pp_make_formatter(f, g, h, i, j){ /*<>*/ var /*<>*/ pp_queue = @@ -25629,19 +25675,19 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, 1, sys_tok], scan_stack); /*<>*/ var - _a9_ = Stdlib[19], - /*<>*/ _a__ = + _a__ = Stdlib[19], + /*<>*/ _a$_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _a$_ = + /*<>*/ _ba_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _ba_ = + /*<>*/ _bb_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0); /*<>*/ return [0, scan_stack, /*<>*/ caml_call1(Stdlib_Stack[2], 0), + _bb_, _ba_, _a$_, - _a__, 78, 10, 68, @@ -25651,7 +25697,7 @@ 1, 1, 1, - _a9_, + _a__, cst$14, f, g, @@ -25671,30 +25717,30 @@ (out_funs[1], out_funs[2], out_funs[3], out_funs[4], out_funs[5]); /*<>*/ } function make_formatter(output, flush){ - function _a1_(_a8_){ /*<>*/ return 0;} - function _a2_(_a7_){ /*<>*/ return 0;} + function _a2_(_a9_){ /*<>*/ return 0;} + function _a3_(_a8_){ /*<>*/ return 0;} /*<>*/ /*<>*/ var ppf = pp_make_formatter - (output, flush, function(_a6_){ /*<>*/ return 0;}, _a2_, _a1_); - ppf[19] = function(_a5_){ /*<>*/ return display_newline(ppf, _a5_);}; - ppf[20] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; - ppf[21] = function(_a3_){ /*<>*/ return display_blanks(ppf, _a3_);}; + (output, flush, function(_a7_){ /*<>*/ return 0;}, _a3_, _a2_); + ppf[19] = function(_a6_){ /*<>*/ return display_newline(ppf, _a6_);}; + ppf[20] = function(_a5_){ /*<>*/ return display_blanks(ppf, _a5_);}; + ppf[21] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; /*<>*/ return ppf; /*<>*/ } function formatter_of_out_channel(oc){ - function _a0_(param){ + function _a1_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _a0_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _a1_); /*<>*/ } function formatter_of_buffer(b){ - /*<>*/ function _aY_(_aZ_){ /*<>*/ return 0;} + /*<>*/ function _aZ_(_a0_){ /*<>*/ return 0;} /*<>*/ return make_formatter ( /*<>*/ caml_call1(Stdlib_Buffer[18], b), - _aY_); + _aZ_); /*<>*/ } var pp_buffer_size = 512; function pp_make_buffer(param){ @@ -25725,9 +25771,9 @@ (Stdlib_Domain[10][3], str_formatter_key, str_formatter); /*<>*/ function buffered_out_string(key, str, ofs, len){ /*<>*/ /*<>*/ var - _aX_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); + _aY_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); /*<>*/ return /*<>*/ caml_call4 - (Stdlib_Buffer[18], _aX_, str, ofs, len); + (Stdlib_Buffer[18], _aY_, str, ofs, len); /*<>*/ } function buffered_out_flush(oc, key, param){ /*<>*/ var @@ -25759,31 +25805,31 @@ err_buf_key = /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _i_); function _j_(param){ - function _aG_(_aW_){ /*<>*/ return 0;} - function _aH_(_aV_){ /*<>*/ return 0;} - function _aI_(_aU_){ /*<>*/ return 0;} - var _aJ_ = Stdlib[39]; - /*<>*/ function _aK_(_aT_){ - /*<>*/ return buffered_out_flush(_aJ_, std_buf_key, _aT_); + function _aH_(_aX_){ /*<>*/ return 0;} + function _aI_(_aW_){ /*<>*/ return 0;} + function _aJ_(_aV_){ /*<>*/ return 0;} + var _aK_ = Stdlib[39]; + /*<>*/ function _aL_(_aU_){ + /*<>*/ return buffered_out_flush(_aK_, std_buf_key, _aU_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_aQ_, _aR_, _aS_){ - /*<>*/ return buffered_out_string(std_buf_key, _aQ_, _aR_, _aS_); + (function(_aR_, _aS_, _aT_){ + /*<>*/ return buffered_out_string(std_buf_key, _aR_, _aS_, _aT_); }, - _aK_, + _aL_, + _aJ_, _aI_, - _aH_, - _aG_); - ppf[19] = function(_aP_){ /*<>*/ return display_newline(ppf, _aP_);}; - ppf[20] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; - ppf[21] = function(_aN_){ /*<>*/ return display_blanks(ppf, _aN_);}; - /*<>*/ function _aL_(_aM_){ - /*<>*/ return pp_print_flush(ppf, _aM_); + _aH_); + ppf[19] = function(_aQ_){ /*<>*/ return display_newline(ppf, _aQ_);}; + ppf[20] = function(_aP_){ /*<>*/ return display_blanks(ppf, _aP_);}; + ppf[21] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; + /*<>*/ function _aM_(_aN_){ + /*<>*/ return pp_print_flush(ppf, _aN_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _aL_); + (Stdlib_Domain[6], _aM_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -25792,31 +25838,31 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Domain[10][3], std_formatter_key, std_formatter); function _k_(param){ - function _ap_(_aF_){ /*<>*/ return 0;} - function _aq_(_aE_){ /*<>*/ return 0;} - function _ar_(_aD_){ /*<>*/ return 0;} - var _as_ = Stdlib[40]; - /*<>*/ function _at_(_aC_){ - /*<>*/ return buffered_out_flush(_as_, err_buf_key, _aC_); + function _aq_(_aG_){ /*<>*/ return 0;} + function _ar_(_aF_){ /*<>*/ return 0;} + function _as_(_aE_){ /*<>*/ return 0;} + var _at_ = Stdlib[40]; + /*<>*/ function _au_(_aD_){ + /*<>*/ return buffered_out_flush(_at_, err_buf_key, _aD_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_az_, _aA_, _aB_){ - /*<>*/ return buffered_out_string(err_buf_key, _az_, _aA_, _aB_); + (function(_aA_, _aB_, _aC_){ + /*<>*/ return buffered_out_string(err_buf_key, _aA_, _aB_, _aC_); }, - _at_, + _au_, + _as_, _ar_, - _aq_, - _ap_); - ppf[19] = function(_ay_){ /*<>*/ return display_newline(ppf, _ay_);}; - ppf[20] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; - ppf[21] = function(_aw_){ /*<>*/ return display_blanks(ppf, _aw_);}; - /*<>*/ function _au_(_av_){ - /*<>*/ return pp_print_flush(ppf, _av_); + _aq_); + ppf[19] = function(_az_){ /*<>*/ return display_newline(ppf, _az_);}; + ppf[20] = function(_ay_){ /*<>*/ return display_blanks(ppf, _ay_);}; + ppf[21] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; + /*<>*/ function _av_(_aw_){ + /*<>*/ return pp_print_flush(ppf, _aw_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _au_); + (Stdlib_Domain[6], _av_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -25859,7 +25905,7 @@ (stdbuf, str_formatter); /*<>*/ } function make_synchronized_formatter(output, flush){ - function _an_(param){ + function _ao_(param){ /*<>*/ var /*<>*/ buf = /*<>*/ caml_call1 @@ -25868,12 +25914,12 @@ /*<>*/ caml_call1(Stdlib_Buffer[18], buf); function flush$0(param){ /*<>*/ /*<>*/ var - _ao_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); + _ap_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); /*<>*/ /*<>*/ caml_call3 (output, /*<>*/ caml_call1(Stdlib_Buffer[2], buf), 0, - _ao_); + _ap_); /*<>*/ /*<>*/ caml_call1 (Stdlib_Buffer[8], buf); /*<>*/ return /*<>*/ caml_call1 @@ -25882,15 +25928,15 @@ /*<>*/ return make_formatter(output$0, flush$0); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, _an_); + (Stdlib_Domain[10][1], 0, _ao_); /*<>*/ } function synchronized_formatter_of_out_(oc){ - function _am_(param){ + function _an_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_synchronized_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _am_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _an_); /*<>*/ } function make_symbolic_output_buffer(param){ /*<>*/ return [0, 0]; /*<>*/ } @@ -25919,10 +25965,10 @@ /*<>*/ caml_call3 (Stdlib_String[15], s, i, n)]); } - /*<>*/ function g(_al_){ + /*<>*/ function g(_am_){ /*<>*/ return add_symbolic_output_item(sob, 0); } - /*<>*/ function h(_ak_){ + /*<>*/ function h(_al_){ /*<>*/ return add_symbolic_output_item(sob, 1); } /*<>*/ function i(n){ @@ -26309,8 +26355,8 @@ /*<>*/ } for(;;){ if(right[1] === len){ - var _aj_ = left[1] !== len ? 1 : 0; - return _aj_ ? flush(0) : _aj_; + var _ak_ = left[1] !== len ? 1 : 0; + return _ak_ ? flush(0) : _ak_; } /*<>*/ /*<>*/ var match = /*<>*/ runtime.caml_string_get(s, right[1]); @@ -26332,7 +26378,7 @@ else var none = - function(param, _ai_){ + function(param, _aj_){ /*<>*/ return 0; /*<>*/ }; /*<>*/ if(! param) @@ -26425,65 +26471,65 @@ var acc$1 = match[1]; /*<>*/ output_acc(ppf, p$0); /*<>*/ var - /*<>*/ _$_ = compute_tag(output_acc, acc$1), + /*<>*/ _aa_ = compute_tag(output_acc, acc$1), /*<>*/ match$0 = - /*<>*/ caml_call1(CamlinternalFormat[20], _$_), + /*<>*/ caml_call1(CamlinternalFormat[20], _aa_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _aa_ = acc[1], switch$1 = 0; - if(typeof _aa_ === "number" || ! (0 === _aa_[0])) + var _ab_ = acc[1], switch$1 = 0; + if(typeof _ab_ === "number" || ! (0 === _ab_[0])) switch$1 = 1; else{ - var _ab_ = _aa_[2], switch$2 = 0; - if(typeof _ab_ === "number" || ! (1 === _ab_[0])) + var _ac_ = _ab_[2], switch$2 = 0; + if(typeof _ac_ === "number" || ! (1 === _ac_[0])) switch$2 = 1; else - var s$0 = acc[2], size = _ab_[2], p$2 = _aa_[1]; + var s$0 = acc[2], size = _ac_[2], p$2 = _ab_[1]; if(switch$2) switch$1 = 1; } - if(switch$1){var s = acc[2], p$1 = _aa_; switch$0 = 2;} + if(switch$1){var s = acc[2], p$1 = _ab_; switch$0 = 2;} break; case 3: - var _ac_ = acc[1], switch$3 = 0; - if(typeof _ac_ === "number" || ! (0 === _ac_[0])) + var _ad_ = acc[1], switch$3 = 0; + if(typeof _ad_ === "number" || ! (0 === _ad_[0])) switch$3 = 1; else{ - var _ad_ = _ac_[2], switch$4 = 0; - if(typeof _ad_ === "number" || ! (1 === _ad_[0])) + var _ae_ = _ad_[2], switch$4 = 0; + if(typeof _ae_ === "number" || ! (1 === _ae_[0])) switch$4 = 1; - else{var c$0 = acc[2], size$0 = _ad_[2], p$4 = _ac_[1]; switch$0 = 1;} + else{var c$0 = acc[2], size$0 = _ae_[2], p$4 = _ad_[1]; switch$0 = 1;} if(switch$4) switch$3 = 1; } - if(switch$3){var c = acc[2], p$3 = _ac_; switch$0 = 3;} + if(switch$3){var c = acc[2], p$3 = _ad_; switch$0 = 3;} break; case 4: - var _ae_ = acc[1], switch$5 = 0; - if(typeof _ae_ === "number" || ! (0 === _ae_[0])) + var _af_ = acc[1], switch$5 = 0; + if(typeof _af_ === "number" || ! (0 === _af_[0])) switch$5 = 1; else{ - var _af_ = _ae_[2], switch$6 = 0; - if(typeof _af_ === "number" || ! (1 === _af_[0])) + var _ag_ = _af_[2], switch$6 = 0; + if(typeof _ag_ === "number" || ! (1 === _ag_[0])) switch$6 = 1; else - var s$0 = acc[2], size = _af_[2], p$2 = _ae_[1]; + var s$0 = acc[2], size = _ag_[2], p$2 = _af_[1]; if(switch$6) switch$5 = 1; } - if(switch$5){var s = acc[2], p$1 = _ae_; switch$0 = 2;} + if(switch$5){var s = acc[2], p$1 = _af_; switch$0 = 2;} break; case 5: - var _ag_ = acc[1], switch$7 = 0; - if(typeof _ag_ === "number" || ! (0 === _ag_[0])) + var _ah_ = acc[1], switch$7 = 0; + if(typeof _ah_ === "number" || ! (0 === _ah_[0])) switch$7 = 1; else{ - var _ah_ = _ag_[2], switch$8 = 0; - if(typeof _ah_ === "number" || ! (1 === _ah_[0])) + var _ai_ = _ah_[2], switch$8 = 0; + if(typeof _ai_ === "number" || ! (1 === _ai_[0])) switch$8 = 1; - else{var c$0 = acc[2], size$0 = _ah_[2], p$4 = _ag_[1]; switch$0 = 1;} + else{var c$0 = acc[2], size$0 = _ai_[2], p$4 = _ah_[1]; switch$0 = 1;} if(switch$8) switch$7 = 1; } - if(switch$7){var c = acc[2], p$3 = _ag_; switch$0 = 3;} + if(switch$7){var c = acc[2], p$3 = _ah_; switch$0 = 3;} break; case 6: var f$0 = acc[2], p$5 = acc[1]; @@ -26538,65 +26584,65 @@ var acc$1 = match[1]; /*<>*/ strput_acc(ppf, p$0); /*<>*/ var - /*<>*/ _S_ = compute_tag(strput_acc, acc$1), + /*<>*/ _T_ = compute_tag(strput_acc, acc$1), /*<>*/ match$0 = - /*<>*/ caml_call1(CamlinternalFormat[20], _S_), + /*<>*/ caml_call1(CamlinternalFormat[20], _T_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _T_ = acc[1], switch$1 = 0; - if(typeof _T_ === "number" || ! (0 === _T_[0])) + var _U_ = acc[1], switch$1 = 0; + if(typeof _U_ === "number" || ! (0 === _U_[0])) switch$1 = 1; else{ - var _U_ = _T_[2], switch$2 = 0; - if(typeof _U_ === "number" || ! (1 === _U_[0])) + var _V_ = _U_[2], switch$2 = 0; + if(typeof _V_ === "number" || ! (1 === _V_[0])) switch$2 = 1; else - var s$0 = acc[2], size = _U_[2], p$2 = _T_[1]; + var s$0 = acc[2], size = _V_[2], p$2 = _U_[1]; if(switch$2) switch$1 = 1; } - if(switch$1){var s = acc[2], p$1 = _T_; switch$0 = 2;} + if(switch$1){var s = acc[2], p$1 = _U_; switch$0 = 2;} break; case 3: - var _V_ = acc[1], switch$3 = 0; - if(typeof _V_ === "number" || ! (0 === _V_[0])) + var _W_ = acc[1], switch$3 = 0; + if(typeof _W_ === "number" || ! (0 === _W_[0])) switch$3 = 1; else{ - var _W_ = _V_[2], switch$4 = 0; - if(typeof _W_ === "number" || ! (1 === _W_[0])) + var _X_ = _W_[2], switch$4 = 0; + if(typeof _X_ === "number" || ! (1 === _X_[0])) switch$4 = 1; - else{var c$0 = acc[2], size$0 = _W_[2], p$4 = _V_[1]; switch$0 = 1;} + else{var c$0 = acc[2], size$0 = _X_[2], p$4 = _W_[1]; switch$0 = 1;} if(switch$4) switch$3 = 1; } - if(switch$3){var c = acc[2], p$3 = _V_; switch$0 = 3;} + if(switch$3){var c = acc[2], p$3 = _W_; switch$0 = 3;} break; case 4: - var _X_ = acc[1], switch$5 = 0; - if(typeof _X_ === "number" || ! (0 === _X_[0])) + var _Y_ = acc[1], switch$5 = 0; + if(typeof _Y_ === "number" || ! (0 === _Y_[0])) switch$5 = 1; else{ - var _Y_ = _X_[2], switch$6 = 0; - if(typeof _Y_ === "number" || ! (1 === _Y_[0])) + var _Z_ = _Y_[2], switch$6 = 0; + if(typeof _Z_ === "number" || ! (1 === _Z_[0])) switch$6 = 1; else - var s$0 = acc[2], size = _Y_[2], p$2 = _X_[1]; + var s$0 = acc[2], size = _Z_[2], p$2 = _Y_[1]; if(switch$6) switch$5 = 1; } - if(switch$5){var s = acc[2], p$1 = _X_; switch$0 = 2;} + if(switch$5){var s = acc[2], p$1 = _Y_; switch$0 = 2;} break; case 5: - var _Z_ = acc[1], switch$7 = 0; - if(typeof _Z_ === "number" || ! (0 === _Z_[0])) + var ___ = acc[1], switch$7 = 0; + if(typeof ___ === "number" || ! (0 === ___[0])) switch$7 = 1; else{ - var ___ = _Z_[2], switch$8 = 0; - if(typeof ___ === "number" || ! (1 === ___[0])) + var _$_ = ___[2], switch$8 = 0; + if(typeof _$_ === "number" || ! (1 === _$_[0])) switch$8 = 1; - else{var c$0 = acc[2], size$0 = ___[2], p$4 = _Z_[1]; switch$0 = 1;} + else{var c$0 = acc[2], size$0 = _$_[2], p$4 = ___[1]; switch$0 = 1;} if(switch$8) switch$7 = 1; } - if(switch$7){var c = acc[2], p$3 = _Z_; switch$0 = 3;} + if(switch$7){var c = acc[2], p$3 = ___; switch$0 = 3;} break; case 6: var p$5 = acc[1]; @@ -26645,13 +26691,13 @@ function kfprintf(k, ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _Q_ = 0; - function _R_(acc){ + /*<>*/ _R_ = 0; + function _S_(acc){ /*<>*/ output_acc(ppf, acc); return caml_call1(k, ppf); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _R_, _Q_, fmt); + (CamlinternalFormat[7], _S_, _R_, fmt); } function ikfprintf(k, ppf, param){ var fmt = param[1]; @@ -26661,47 +26707,47 @@ function ifprintf(ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _N_ = 0; - function _O_(_P_){ /*<>*/ return 0;} + /*<>*/ _O_ = 0; + function _P_(_Q_){ /*<>*/ return 0;} /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[8], _O_, _N_, fmt); + (CamlinternalFormat[8], _P_, _O_, fmt); } function fprintf(ppf){ - function _K_(_M_){ /*<>*/ return 0;} - /*<>*/ return function(_L_){ - /*<>*/ return kfprintf(_K_, ppf, _L_);}; + function _L_(_N_){ /*<>*/ return 0;} + /*<>*/ return function(_M_){ + /*<>*/ return kfprintf(_L_, ppf, _M_);}; /*<>*/ } function printf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _I_ = 0; - function _J_(acc){ + /*<>*/ _J_ = 0; + function _K_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], std_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _J_, _I_, fmt); + (CamlinternalFormat[7], _K_, _J_, fmt); } function eprintf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _G_ = 0; - function _H_(acc){ + /*<>*/ _H_ = 0; + function _I_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], err_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _H_, _G_, fmt); + (CamlinternalFormat[7], _I_, _H_, fmt); } function kdprintf(k, param){ /*<>*/ var fmt = param[1], - /*<>*/ _E_ = 0; - function _F_(acc){ + /*<>*/ _F_ = 0; + function _G_(acc){ /*<>*/ return /*<>*/ caml_call1 (k, function(ppf){ @@ -26709,7 +26755,7 @@ /*<>*/ }); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _F_, _E_, fmt); + (CamlinternalFormat[7], _G_, _F_, fmt); } function dprintf(fmt){ /*<>*/ return kdprintf @@ -26767,44 +26813,44 @@ /*<>*/ var /*<>*/ fs = pp_get_formatter_out_functions(std_formatter, 0), - _m_ = fs[5], - _n_ = fs[4], - _o_ = fs[3], - _p_ = Stdlib[39]; - /*<>*/ function _q_(_D_){ - /*<>*/ return buffered_out_flush(_p_, std_buf_key, _D_); + _n_ = fs[5], + _o_ = fs[4], + _p_ = fs[3], + _q_ = Stdlib[39]; + /*<>*/ function _r_(_E_){ + /*<>*/ return buffered_out_flush(_q_, std_buf_key, _E_); } /*<>*/ pp_set_formatter_out_functions (std_formatter, [0, - function(_A_, _B_, _C_){ - /*<>*/ return buffered_out_string(std_buf_key, _A_, _B_, _C_); + function(_B_, _C_, _D_){ + /*<>*/ return buffered_out_string(std_buf_key, _B_, _C_, _D_); }, - _q_, + _r_, + _p_, _o_, - _n_, - _m_]); + _n_]); /*<>*/ var /*<>*/ fs$0 = pp_get_formatter_out_functions(err_formatter, 0), - _r_ = fs$0[5], - _s_ = fs$0[4], - _t_ = fs$0[3], - _u_ = Stdlib[40]; - /*<>*/ function _v_(_z_){ - /*<>*/ return buffered_out_flush(_u_, err_buf_key, _z_); + _s_ = fs$0[5], + _t_ = fs$0[4], + _u_ = fs$0[3], + _v_ = Stdlib[40]; + /*<>*/ function _w_(_A_){ + /*<>*/ return buffered_out_flush(_v_, err_buf_key, _A_); } /*<>*/ return pp_set_formatter_out_functions (err_formatter, [0, - function(_w_, _x_, _y_){ + function(_x_, _y_, _z_){ /*<>*/ return buffered_out_string - (err_buf_key, _w_, _x_, _y_); + (err_buf_key, _x_, _y_, _z_); }, - _v_, + _w_, + _u_, _t_, - _s_, - _r_]); + _s_]); /*<>*/ } /*<>*/ /*<>*/ caml_call1 (Stdlib_Domain[5], _l_); @@ -27005,6 +27051,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var + _u_ = undefined, global_data = runtime.caml_get_global_data(), cst$3 = cst$5, cst$4 = cst$5, @@ -27128,9 +27175,9 @@ if(10 === c) ib[5] = ib[5] + 1 | 0; /*<>*/ return c; } - catch(_bb_){ - var _ba_ = caml_wrap_exception(_bb_); - if(_ba_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_ba_, 0); + catch(_bc_){ + var _bb_ = caml_wrap_exception(_bc_); + if(_bb_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_bb_, 0); ib[2] = null_char; ib[3] = 0; ib[1] = 1; @@ -27223,8 +27270,8 @@ /*<>*/ return create(1, next); /*<>*/ } var _a_ = 0; - /*<>*/ function from_function(_a$_){ - /*<>*/ return create(_a_, _a$_); + /*<>*/ function from_function(_ba_){ + /*<>*/ return create(_a_, _ba_); } /*<>*/ /*<>*/ var len = 1024; function scan_close_at_end(ic){ @@ -27271,12 +27318,12 @@ return from_ic(scan_close_at_end, [1, fname, ic], ic); /*<>*/ } var _b_ = Stdlib[79]; - /*<>*/ function open_in(_a__){ - /*<>*/ return open_in_file(_b_, _a__); + /*<>*/ function open_in(_a$_){ + /*<>*/ return open_in_file(_b_, _a$_); } /*<>*/ /*<>*/ var _c_ = Stdlib[80]; - /*<>*/ function open_in_bin(_a9_){ - /*<>*/ return open_in_file(_c_, _a9_); + /*<>*/ function open_in_bin(_a__){ + /*<>*/ return open_in_file(_c_, _a__); } function from_channel(ic){ /*<>*/ return from_ic(scan_raise_at_end, [0, ic], ic); @@ -27339,15 +27386,15 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _a7_ = 1 - ib[1]; - if(! _a7_) /*<>*/ return _a7_; + /*<>*/ _a8_ = 1 - ib[1]; + if(! _a8_) /*<>*/ return _a8_; /*<>*/ var - /*<>*/ _a8_ = c - 9 | 0, + /*<>*/ _a9_ = c - 9 | 0, switch$0 = 0; - if(4 < _a8_ >>> 0){ - if(23 === _a8_) switch$0 = 1; + if(4 < _a9_ >>> 0){ + if(23 === _a9_) switch$0 = 1; } - else if(1 < _a8_ - 2 >>> 0) switch$0 = 1; + else if(1 < _a9_ - 2 >>> 0) switch$0 = 1; if(! switch$0) /*<>*/ return 0; /*<>*/ invalidate_current_char(ib); } @@ -27392,23 +27439,23 @@ /*<>*/ switch(conv){ case 0: /*<>*/ var - /*<>*/ _a3_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a3_); + /*<>*/ _a4_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a4_); break; case 3: /*<>*/ var - /*<>*/ _a4_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a4_); + /*<>*/ _a5_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a5_); break; case 4: /*<>*/ var - /*<>*/ _a5_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a5_); + /*<>*/ _a6_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a6_); break; case 5: /*<>*/ var - /*<>*/ _a6_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a6_); + /*<>*/ _a7_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a7_); break; default: var tok = token_string(ib); } @@ -27493,28 +27540,28 @@ function is_binary_digit(param){ /*<>*/ return 1 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_binary_int(_a1_, _a2_){ - /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a1_, _a2_); + /*<>*/ function scan_binary_int(_a2_, _a3_){ + /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a2_, _a3_); } function is_octal_digit(param){ /*<>*/ return 7 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_octal_int(_aZ_, _a0_){ - /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _aZ_, _a0_); + /*<>*/ function scan_octal_int(_a0_, _a1_){ + /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _a0_, _a1_); } function is_hexa_digit(param){ /*<>*/ var - /*<>*/ _aY_ = param - 48 | 0, + /*<>*/ _aZ_ = param - 48 | 0, switch$0 = 0; - if(22 < _aY_ >>> 0){ - if(5 >= _aY_ - 49 >>> 0) switch$0 = 1; + if(22 < _aZ_ >>> 0){ + if(5 >= _aZ_ - 49 >>> 0) switch$0 = 1; } - else if(6 < _aY_ - 10 >>> 0) switch$0 = 1; + else if(6 < _aZ_ - 10 >>> 0) switch$0 = 1; return switch$0 ? 1 : 0; /*<>*/ } - /*<>*/ function scan_hexadecimal_int(_aW_, _aX_){ + /*<>*/ function scan_hexadecimal_int(_aX_, _aY_){ /*<>*/ return scan_digit_plus - (cst_hexadecimal, is_hexa_digit, _aW_, _aX_); + (cst_hexadecimal, is_hexa_digit, _aX_, _aY_); } function scan_sign(width, ib){ /*<>*/ var @@ -27631,22 +27678,22 @@ /*<>*/ len = /*<>*/ caml_ml_string_length(str), /*<>*/ width$0 = [0, width], - /*<>*/ _aT_ = len - 1 | 0, - /*<>*/ _aS_ = 0; - if(_aT_ >= 0){ - var i = _aS_; + /*<>*/ _aU_ = len - 1 | 0, + /*<>*/ _aT_ = 0; + if(_aU_ >= 0){ + var i = _aT_; for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _aU_ = + /*<>*/ _aV_ = lowercase( /*<>*/ caml_string_get(str, i)); - if(lowercase(c) !== _aU_) + if(lowercase(c) !== _aV_) /*<>*/ /*<>*/ caml_call1(error, 0); if(0 === width$0[1]) /*<>*/ /*<>*/ caml_call1(error, 0); width$0[1] = store_char(width$0[1], ib, c); - /*<>*/ /*<>*/ var _aV_ = i + 1 | 0; - if(_aT_ !== i){var i = _aV_; continue;} + /*<>*/ /*<>*/ var _aW_ = i + 1 | 0; + if(_aU_ !== i){var i = _aW_; continue;} break; } } @@ -27654,15 +27701,15 @@ /*<>*/ } function scan_hex_float(width, precision, ib){ /*<>*/ var - _aF_ = 0 === width ? 1 : 0, - _aG_ = _aF_ || end_of_input(ib); - /*<>*/ if(_aG_) + _aG_ = 0 === width ? 1 : 0, + _aH_ = _aG_ || end_of_input(ib); + /*<>*/ if(_aH_) /*<>*/ bad_hex_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _aH_ = 0 === width$0 ? 1 : 0, - _aI_ = _aH_ || end_of_input(ib); - /*<>*/ if(_aI_) + _aI_ = 0 === width$0 ? 1 : 0, + _aJ_ = _aI_ || end_of_input(ib); + /*<>*/ if(_aJ_) /*<>*/ bad_hex_float(0); /*<>*/ var /*<>*/ c = peek_char(ib), @@ -27674,9 +27721,9 @@ if(32 > switcher){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _aJ_ = 0 === width$1 ? 1 : 0, - _aK_ = _aJ_ || end_of_input(ib); - /*<>*/ if(_aK_) + _aK_ = 0 === width$1 ? 1 : 0, + _aL_ = _aK_ || end_of_input(ib); + /*<>*/ if(_aL_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$1, ib, bad_hex_float, cst_an); @@ -27688,21 +27735,21 @@ if(48 === c){ /*<>*/ var /*<>*/ width$3 = store_char(width$0, ib, c), - _aN_ = 0 === width$3 ? 1 : 0, - _aO_ = _aN_ || end_of_input(ib); - /*<>*/ if(_aO_) + _aO_ = 0 === width$3 ? 1 : 0, + _aP_ = _aO_ || end_of_input(ib); + /*<>*/ if(_aP_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ var width$4 = check_case_insensitive_string(width$3, ib, bad_hex_float, cst_x); /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ /*<>*/ var - /*<>*/ _aP_ = peek_char(ib) - 46 | 0, + /*<>*/ _aQ_ = peek_char(ib) - 46 | 0, switch$1 = 0; - if(34 < _aP_ >>> 0){ - if(66 === _aP_) switch$1 = 1; + if(34 < _aQ_ >>> 0){ + if(66 === _aQ_) switch$1 = 1; } - else if(32 < _aP_ - 1 >>> 0) switch$1 = 1; + else if(32 < _aQ_ - 1 >>> 0) switch$1 = 1; var width$5 = switch$1 ? width$4 : scan_hexadecimal_int(width$4, ib); /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var @@ -27742,9 +27789,9 @@ /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$1), - _aQ_ = 0 === width$9 ? 1 : 0, - _aR_ = _aQ_ || end_of_input(ib); - /*<>*/ if(_aR_) + _aR_ = 0 === width$9 ? 1 : 0, + _aS_ = _aR_ || end_of_input(ib); + /*<>*/ if(_aS_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -27760,23 +27807,23 @@ if(! switch$0) /*<>*/ return bad_hex_float(0); /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _aL_ = 0 === width$2 ? 1 : 0, - _aM_ = _aL_ || end_of_input(ib); - /*<>*/ if(_aM_) + _aM_ = 0 === width$2 ? 1 : 0, + _aN_ = _aM_ || end_of_input(ib); + /*<>*/ if(_aN_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$2, ib, bad_hex_float, cst_nfinity); /*<>*/ } function scan_caml_float_rest(width, precision, ib){ /*<>*/ var - _aB_ = 0 === width ? 1 : 0, - _aC_ = _aB_ || end_of_input(ib); - /*<>*/ if(_aC_) /*<>*/ bad_float(0); + _aC_ = 0 === width ? 1 : 0, + _aD_ = _aC_ || end_of_input(ib); + /*<>*/ if(_aD_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_decimal_digit_star(width, ib), - _aD_ = 0 === width$0 ? 1 : 0, - _aE_ = _aD_ || end_of_input(ib); - /*<>*/ if(_aE_) /*<>*/ bad_float(0); + _aE_ = 0 === width$0 ? 1 : 0, + _aF_ = _aE_ || end_of_input(ib); + /*<>*/ if(_aF_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c = peek_char(ib), /*<>*/ switcher = c - 69 | 0; @@ -27800,22 +27847,22 @@ /*<>*/ } function scan_caml_float(width, precision, ib){ /*<>*/ var - _an_ = 0 === width ? 1 : 0, - _ao_ = _an_ || end_of_input(ib); - /*<>*/ if(_ao_) /*<>*/ bad_float(0); + _ao_ = 0 === width ? 1 : 0, + _ap_ = _ao_ || end_of_input(ib); + /*<>*/ if(_ap_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _ap_ = 0 === width$0 ? 1 : 0, - _aq_ = _ap_ || end_of_input(ib); - /*<>*/ if(_aq_) /*<>*/ bad_float(0); + _aq_ = 0 === width$0 ? 1 : 0, + _ar_ = _aq_ || end_of_input(ib); + /*<>*/ if(_ar_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); if(49 <= c){ if(58 > c){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _ar_ = 0 === width$1 ? 1 : 0, - _as_ = _ar_ || end_of_input(ib); - /*<>*/ if(_as_) /*<>*/ bad_float(0); + _as_ = 0 === width$1 ? 1 : 0, + _at_ = _as_ || end_of_input(ib); + /*<>*/ if(_at_) /*<>*/ bad_float(0); /*<>*/ return scan_caml_float_rest (width$1, precision, ib); } @@ -27823,9 +27870,9 @@ else if(48 <= c){ /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _at_ = 0 === width$2 ? 1 : 0, - _au_ = _at_ || end_of_input(ib); - /*<>*/ if(_au_) /*<>*/ bad_float(0); + _au_ = 0 === width$2 ? 1 : 0, + _av_ = _au_ || end_of_input(ib); + /*<>*/ if(_av_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c$0 = peek_char(ib); if(88 !== c$0 && 120 !== c$0) @@ -27833,14 +27880,14 @@ (width$2, precision, ib); /*<>*/ var /*<>*/ width$3 = store_char(width$2, ib, c$0), - _av_ = 0 === width$3 ? 1 : 0, - _aw_ = _av_ || end_of_input(ib); - /*<>*/ if(_aw_) /*<>*/ bad_float(0); + _aw_ = 0 === width$3 ? 1 : 0, + _ax_ = _aw_ || end_of_input(ib); + /*<>*/ if(_ax_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$4 = scan_hexadecimal_int(width$3, ib), - _ax_ = 0 === width$4 ? 1 : 0, - _ay_ = _ax_ || end_of_input(ib); - /*<>*/ if(_ay_) /*<>*/ bad_float(0); + _ay_ = 0 === width$4 ? 1 : 0, + _az_ = _ay_ || end_of_input(ib); + /*<>*/ if(_az_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c$1 = peek_char(ib), /*<>*/ switcher = c$1 - 80 | 0, @@ -27885,9 +27932,9 @@ if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$2), - _az_ = 0 === width$9 ? 1 : 0, - _aA_ = _az_ || end_of_input(ib); - /*<>*/ if(_aA_) + _aA_ = 0 === width$9 ? 1 : 0, + _aB_ = _aA_ || end_of_input(ib); + /*<>*/ if(_aB_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -27912,12 +27959,12 @@ continue; } /*<>*/ var - /*<>*/ _am_ = c - 9 | 0, + /*<>*/ _an_ = c - 9 | 0, switch$0 = 0; - if(4 < _am_ >>> 0){ - if(23 === _am_) switch$0 = 1; + if(4 < _an_ >>> 0){ + if(23 === _an_) switch$0 = 1; } - else if(1 < _am_ - 2 >>> 0) switch$0 = 1; + else if(1 < _an_ - 2 >>> 0) switch$0 = 1; if(switch$0) /*<>*/ return width$0; /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), @@ -27939,11 +27986,11 @@ (Stdlib_Printf[4], _f_, message)) : c; /*<>*/ } - /*<>*/ function check_next_char_for_char(_ak_, _al_){ - /*<>*/ return check_next_char(cst_a_Char, _ak_, _al_); + /*<>*/ function check_next_char_for_char(_al_, _am_){ + /*<>*/ return check_next_char(cst_a_Char, _al_, _am_); } - /*<>*/ function check_next_char_for_string(_ai_, _aj_){ - /*<>*/ return check_next_char(cst_a_String, _ai_, _aj_); + /*<>*/ function check_next_char_for_string(_aj_, _ak_){ + /*<>*/ return check_next_char(cst_a_String, _aj_, _ak_); } function scan_backslash_char(width, ib){ /*<>*/ var @@ -27961,30 +28008,30 @@ function(param){ /*<>*/ var /*<>*/ c = next_char(ib), - /*<>*/ _ah_ = c - 48 | 0, + /*<>*/ _ai_ = c - 48 | 0, switch$0 = 0; - if(22 < _ah_ >>> 0){ - if(5 >= _ah_ - 49 >>> 0) switch$0 = 1; + if(22 < _ai_ >>> 0){ + if(5 >= _ai_ - 49 >>> 0) switch$0 = 1; } - else if(6 < _ah_ - 10 >>> 0) switch$0 = 1; + else if(6 < _ai_ - 10 >>> 0) switch$0 = 1; return switch$0 ? c : bad_input_escape(c); /*<>*/ }, /*<>*/ c1 = get_digit(0), /*<>*/ c2 = get_digit(0), - /*<>*/ _ad_ = hexadecimal_value_of_char(c2), - c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ad_ | 0, + /*<>*/ _ae_ = hexadecimal_value_of_char(c2), + c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ae_ | 0, switch$1 = 0; if(0 <= c$0 && 255 >= c$0){ - var _af_ = /*<>*/ caml_call1(Stdlib[29], c$0); + var _ag_ = /*<>*/ caml_call1(Stdlib[29], c$0); switch$1 = 1; } if(! switch$1) var - _af_ = + _ag_ = bad_input ( /*<>*/ caml_call3 (Stdlib_Printf[4], _m_, c1, c2)); - /*<>*/ return store_char(width - 2 | 0, ib, _af_); + /*<>*/ return store_char(width - 2 | 0, ib, _ag_); case 0: case 6: case 18: @@ -28009,16 +28056,16 @@ | 0, switch$2 = 0; if(0 <= c && 255 >= c){ - var _ag_ = /*<>*/ caml_call1(Stdlib[29], c); + var _ah_ = /*<>*/ caml_call1(Stdlib[29], c); switch$2 = 1; } if(! switch$2) var - _ag_ = + _ah_ = bad_input ( /*<>*/ caml_call4 (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); - /*<>*/ return store_char(width - 2 | 0, ib, _ag_); + /*<>*/ return store_char(width - 2 | 0, ib, _ah_); } } else if(34 === c0 || 39 <= c0) switch$0 = 1; @@ -28030,16 +28077,16 @@ else switch(c0 - 110 | 0){ case 0: - var _ae_ = 10; break; + var _af_ = 10; break; case 4: - var _ae_ = 13; break; + var _af_ = 13; break; case 6: - var _ae_ = 9; break; + var _af_ = 9; break; default: switch$3 = 1; } - else if(98 === c0) var _ae_ = 8; else switch$3 = 1; - if(switch$3) var _ae_ = c0; - /*<>*/ return store_char(width, ib, _ae_); + else if(98 === c0) var _af_ = 8; else switch$3 = 1; + if(switch$3) var _af_ = c0; + /*<>*/ return store_char(width, ib, _af_); /*<>*/ } function scan_caml_string(width, ib){ function find_stop$0(counter, width){ @@ -28060,12 +28107,12 @@ check_next_char_for_string(width$1, ib); if(10 === match){ /*<>*/ /*<>*/ var - _ab_ = ignore_char(width$1, ib); + _ac_ = ignore_char(width$1, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ab_]); + (skip_spaces, [0, _ac_]); var counter$0 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$0, _ab_); + /*<>*/ return skip_spaces(counter$0, _ac_); } if(13 !== match){ /*<>*/ var @@ -28082,12 +28129,12 @@ continue; } /*<>*/ /*<>*/ var - _ac_ = ignore_char(width$3, ib); + _ad_ = ignore_char(width$3, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ac_]); + (skip_spaces, [0, _ad_]); var counter$1 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$1, _ac_); + /*<>*/ return skip_spaces(counter$1, _ad_); } /*<>*/ } function skip_spaces(counter, width){ @@ -28121,34 +28168,39 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - _Z_ = 0 < i$0 ? 1 : 0; - if(_Z_){ + ___ = 0 < i$0 ? 1 : 0; + if(___){ /*<>*/ /*<>*/ var - ___ = 1 - ib[1]; - if(___) + _$_ = 1 - ib[1]; + if(_$_) /*<>*/ var - /*<>*/ _$_ = + /*<>*/ _aa_ = /*<>*/ caml_call2 (CamlinternalFormat[1], char_set, c), - /*<>*/ _aa_ = _$_ ? c !== stp ? 1 : 0 : _$_; + /*<>*/ _ab_ = _aa_ ? c !== stp ? 1 : 0 : _aa_; else - var _aa_ = ___; + var _ab_ = _$_; } else - var _aa_ = _Z_; - if(! _aa_) return _aa_; + var _ab_ = ___; + if(! _ab_) return _ab_; /*<>*/ store_char(Stdlib[19], ib, c); var i$1 = i$0 - 1 | 0, i$0 = i$1; } /*<>*/ } - if(! scan_indic) /*<>*/ return scan_chars(width, -1); + if(! scan_indic){ + /*<>*/ scan_chars(width, -1); + /*<>*/ return _u_; + } var c = scan_indic[1]; /*<>*/ scan_chars(width, c); - /*<>*/ /*<>*/ var _Y_ = 1 - ib[1]; - if(! _Y_) /*<>*/ return _Y_; + /*<>*/ /*<>*/ var _Z_ = 1 - ib[1]; + if(! _Z_) /*<>*/ return _Z_; /*<>*/ /*<>*/ var ci = peek_char(ib); - return c === ci ? invalidate_current_char(ib) : character_mismatch(c, ci); + return c === ci + ? (invalidate_current_char(ib), _u_) + : (character_mismatch(c, ci), _u_); /*<>*/ } function scanf_bad_input(ib, x){ /*<>*/ if(x[1] === Scan_failure) @@ -28225,17 +28277,17 @@ /*<>*/ var rest$13 = fmt$0[3], fmtty = fmt$0[2], - /*<>*/ _V_ = + /*<>*/ _W_ = /*<>*/ caml_call1(CamlinternalFormat[21], fmtty), - /*<>*/ _W_ = + /*<>*/ _X_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _V_); + (CamlinternalFormatBasics[2], _W_); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (take_fmtty_format_readers$0, [0, k, _W_, rest$13]); + (take_fmtty_format_readers$0, [0, k, _X_, rest$13]); var counter$0 = counter + 1 | 0; /*<>*/ return take_fmtty_format_readers$0 - (counter$0, k, _W_, rest$13); + (counter$0, k, _X_, rest$13); case 15: var rest$14 = fmt$0[1], fmt$0 = rest$14; continue; case 16: @@ -28243,11 +28295,11 @@ case 17: var rest$16 = fmt$0[2], fmt$0 = rest$16; continue; case 18: - var _X_ = fmt$0[1]; - if(0 === _X_[0]){ + var _Y_ = fmt$0[1]; + if(0 === _Y_[0]){ /*<>*/ var rest$17 = fmt$0[2], - fmt$1 = _X_[1][1], + fmt$1 = _Y_[1][1], /*<>*/ fmt$2 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$1, rest$17), @@ -28256,7 +28308,7 @@ } /*<>*/ var rest$18 = fmt$0[2], - fmt$3 = _X_[1][1], + fmt$3 = _Y_[1][1], /*<>*/ fmt$4 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$3, rest$18), @@ -28357,11 +28409,11 @@ rest = fmtty$0[3], ty2 = fmtty$0[2], ty1 = fmtty$0[1], - /*<>*/ _U_ = + /*<>*/ _V_ = /*<>*/ caml_call1(CamlinternalFormat[21], ty1), /*<>*/ ty = /*<>*/ caml_call2 - (CamlinternalFormat[22], _U_, ty2), + (CamlinternalFormat[22], _V_, ty2), /*<>*/ fmtty$10 = /*<>*/ caml_call2 (CamlinternalFormatBasics[1], ty, rest), @@ -28471,8 +28523,8 @@ /*<>*/ /*<>*/ var c = check_next_char_for_char(width, ib); return 39 === c - ? ignore_char(width, ib) - : character_mismatch(39, c); + ? (ignore_char(width, ib), _u_) + : (character_mismatch(39, c), _u_); /*<>*/ }, /*<>*/ c = checked_peek_char(ib); if(39 === c){ @@ -28513,11 +28565,11 @@ /*<>*/ return pad_prec_scanf (ib, str_rest, readers, pad, 0, scan$0, token_string); case 18: - var _G_ = match[1]; - if(0 === _G_[0]){ + var _H_ = match[1]; + if(0 === _H_[0]){ /*<>*/ var rest$3 = match[2], - fmt$1 = _G_[1][1], + fmt$1 = _H_[1][1], /*<>*/ scan$1 = function(width, param, ib){ /*<>*/ return scan_string(_q_, width, ib); @@ -28534,7 +28586,7 @@ } /*<>*/ var rest$4 = match[2], - fmt$2 = _G_[1][1], + fmt$2 = _H_[1][1], /*<>*/ scan$2 = function(width, param, ib){ /*<>*/ return scan_string(_r_, width, ib); @@ -28711,7 +28763,7 @@ rest$13 = fmt$0[2], pad$8 = fmt$0[1], /*<>*/ scan$8 = - function(param, _T_, ib){ + function(param, _U_, ib){ /*<>*/ var /*<>*/ c = checked_peek_char(ib), /*<>*/ m = @@ -28737,10 +28789,10 @@ /*<>*/ var rest$15 = fmt$0[2], str$0 = fmt$0[1], - /*<>*/ _H_ = - function(_S_){ /*<>*/ return check_char(ib, _S_);}; + /*<>*/ _I_ = + function(_T_){ /*<>*/ return check_char(ib, _T_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _H_, str$0); + (Stdlib_String[29], _I_, str$0); var fmt$0 = rest$15; continue; case 12: @@ -28756,10 +28808,10 @@ s = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _I_ = + /*<>*/ _J_ = /*<>*/ caml_call2 (CamlinternalFormat[14], s, fmtty), - fmt$3 = _I_; + fmt$3 = _J_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -28785,23 +28837,23 @@ /*<>*/ caml_call2 (CamlinternalFormat[13], 0, s$0) [1], - /*<>*/ _K_ = + /*<>*/ _L_ = /*<>*/ caml_call1 (CamlinternalFormat[21], fmtty$0), - /*<>*/ _L_ = + /*<>*/ _M_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _K_), + (CamlinternalFormatBasics[2], _L_), /*<>*/ fmt$8 = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$7, _L_), - /*<>*/ _M_ = + (CamlinternalFormat[12], fmt$7, _M_), + /*<>*/ _N_ = /*<>*/ caml_call1 (CamlinternalFormatBasics[2], fmtty$0), - /*<>*/ _N_ = + /*<>*/ _O_ = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$6, _M_), + (CamlinternalFormat[12], fmt$6, _N_), fmt$5 = fmt$8, - fmt$4 = _N_; + fmt$4 = _O_; } catch(exn){ var exn$0 = caml_wrap_exception(exn); @@ -28809,9 +28861,9 @@ throw caml_maybe_attach_backtrace(exn$0, 0); var msg$0 = exn$0[2], - _J_ = bad_input(msg$0), - fmt$5 = _J_[2], - fmt$4 = _J_[1]; + _K_ = bad_input(msg$0), + fmt$5 = _K_[2], + fmt$4 = _K_[1]; } /*<>*/ return [0, [0, fmt$4, s$0], @@ -28830,19 +28882,19 @@ /*<>*/ var rest$19 = fmt$0[2], formatting_lit = fmt$0[1], - /*<>*/ _O_ = + /*<>*/ _P_ = /*<>*/ caml_call1 (CamlinternalFormat[17], formatting_lit), - /*<>*/ _P_ = - function(_R_){ /*<>*/ return check_char(ib, _R_);}; + /*<>*/ _Q_ = + function(_S_){ /*<>*/ return check_char(ib, _S_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _P_, _O_); + (Stdlib_String[29], _Q_, _P_); var fmt$0 = rest$19; continue; case 18: - var _Q_ = fmt$0[1]; - if(0 === _Q_[0]){ - var rest$20 = fmt$0[2], fmt$9 = _Q_[1][1]; + var _R_ = fmt$0[1]; + if(0 === _R_[0]){ + var rest$20 = fmt$0[2], fmt$9 = _R_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 123); /*<>*/ var @@ -28852,7 +28904,7 @@ fmt$0 = fmt$10; continue; } - var rest$21 = fmt$0[2], fmt$11 = _Q_[1][1]; + var rest$21 = fmt$0[2], fmt$11 = _R_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 91); /*<>*/ var @@ -28960,16 +29012,16 @@ if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); /*<>*/ var msg = exc[2], - /*<>*/ _C_ = - /*<>*/ caml_call1(Stdlib_String[24], str), /*<>*/ _D_ = - /*<>*/ caml_call2(Stdlib[28], _C_, cst$0), - /*<>*/ _E_ = - /*<>*/ caml_call2(Stdlib[28], cst_in_format, _D_), - /*<>*/ _F_ = - /*<>*/ caml_call2(Stdlib[28], msg, _E_); + /*<>*/ caml_call1(Stdlib_String[24], str), + /*<>*/ _E_ = + /*<>*/ caml_call2(Stdlib[28], _D_, cst$0), + /*<>*/ _F_ = + /*<>*/ caml_call2(Stdlib[28], cst_in_format, _E_), + /*<>*/ _G_ = + /*<>*/ caml_call2(Stdlib[28], msg, _F_); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], _F_); + (Stdlib[1], _G_); } /*<>*/ return /*<>*/ caml_call2 (ef, ib, exc); @@ -29000,15 +29052,15 @@ fmt); /*<>*/ } function kscanf_opt(ib, fmt){ - function _A_(x){ + function _B_(x){ /*<>*/ return [0, x]; /*<>*/ } /*<>*/ return kscanf_gen (ib, - function(param, _B_){ + function(param, _C_){ /*<>*/ return 0; /*<>*/ }, - _A_, + _B_, fmt); /*<>*/ } function bscanf(ib, fmt){ @@ -29039,10 +29091,10 @@ str = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _z_ = + /*<>*/ _A_ = /*<>*/ caml_call2 (CamlinternalFormat[15], str, format), - fmt = _z_; + fmt = _A_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -29056,30 +29108,30 @@ /*<>*/ return bscanf_format(from_string(s), format, f); /*<>*/ } function format_from_string(s, fmt){ - /*<>*/ function _w_(x){ + /*<>*/ function _x_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ var - /*<>*/ _x_ = - /*<>*/ caml_call1(Stdlib_String[24], s), /*<>*/ _y_ = - /*<>*/ caml_call2(Stdlib[28], _x_, cst$1); + /*<>*/ caml_call1(Stdlib_String[24], s), + /*<>*/ _z_ = + /*<>*/ caml_call2(Stdlib[28], _y_, cst$1); /*<>*/ return sscanf_format - ( /*<>*/ caml_call2(Stdlib[28], cst$2, _y_), + ( /*<>*/ caml_call2(Stdlib[28], cst$2, _z_), fmt, - _w_); + _x_); /*<>*/ } function unescaped(s){ - /*<>*/ function _u_(x){ + /*<>*/ function _v_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ /*<>*/ var - _v_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); + _w_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); /*<>*/ return /*<>*/ caml_call1 (sscanf - ( /*<>*/ caml_call2(Stdlib[28], cst$4, _v_), + ( /*<>*/ caml_call2(Stdlib[28], cst$4, _w_), _t_), - _u_); + _v_); /*<>*/ } var Stdlib_Scanf = @@ -30440,6 +30492,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var + _d_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_List = global_data.Stdlib__List, Stdlib = global_data.Stdlib, @@ -30458,7 +30511,7 @@ /*<>*/ /*<>*/ var prng = [246, - function(_aM_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; + function(_aN_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; function create(opt, initial_size){ /*<>*/ if(opt) var sth = opt[1], random = sth; @@ -30469,17 +30522,17 @@ /*<>*/ for(;;){ if(initial_size > x && Stdlib_Sys[13] >= (x * 2 | 0)){var x$0 = x * 2 | 0, x = x$0; continue;} /*<>*/ if(random){ - var _aK_ = runtime.caml_obj_tag(prng); - if(250 === _aK_) - var _aL_ = prng[1]; + var _aL_ = runtime.caml_obj_tag(prng); + if(250 === _aL_) + var _aM_ = prng[1]; else{ var switch$0 = 0; - if(246 !== _aK_ && 244 !== _aK_){var _aL_ = prng; switch$0 = 1;} - if(! switch$0) var _aL_ = caml_call1(CamlinternalLazy[2], prng); + if(246 !== _aL_ && 244 !== _aL_){var _aM_ = prng; switch$0 = 1;} + if(! switch$0) var _aM_ = caml_call1(CamlinternalLazy[2], prng); } var seed = - /*<>*/ caml_call1(Stdlib_Random[15][4], _aL_); + /*<>*/ caml_call1(Stdlib_Random[15][4], _aM_); } else var seed = 0; @@ -30494,15 +30547,15 @@ /*<>*/ h[1] = 0; /*<>*/ var len = h[2].length - 1, - /*<>*/ _aI_ = len - 1 | 0, - _aH_ = 0; - if(_aI_ >= 0){ - var i = _aH_; + /*<>*/ _aJ_ = len - 1 | 0, + _aI_ = 0; + if(_aJ_ >= 0){ + var i = _aI_; for(;;){ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var - _aJ_ = i + 1 | 0; - if(_aI_ !== i){var i = _aJ_; continue;} + _aK_ = i + 1 | 0; + if(_aJ_ !== i){var i = _aK_; continue;} break; } } @@ -30520,11 +30573,11 @@ /*<>*/ } function copy(h){ /*<>*/ var - _aE_ = h[4], - _aF_ = h[3], - /*<>*/ _aG_ = + _aF_ = h[4], + _aG_ = h[3], + /*<>*/ _aH_ = /*<>*/ caml_call1(Stdlib_Array[6], h[2]); - /*<>*/ return [0, h[1], _aG_, _aF_, _aE_]; + /*<>*/ return [0, h[1], _aH_, _aG_, _aF_]; /*<>*/ } function key_index(h, hkey){ /*<>*/ return hkey & (h[2].length - 1 - 1 | 0); @@ -30544,15 +30597,15 @@ var param$0 = rest; } /*<>*/ } - var d = h[2], _aC_ = d.length - 1 - 1 | 0, _aB_ = 0; - if(_aC_ >= 0){ - var i = _aB_; + var d = h[2], _aD_ = d.length - 1 - 1 | 0, _aC_ = 0; + if(_aD_ >= 0){ + var i = _aC_; for(;;){ /*<>*/ d[1 + i] = do_bucket(caml_check_bound(d, i)[1 + i]); /*<>*/ /*<>*/ var - _aD_ = i + 1 | 0; - if(_aC_ !== i){var i = _aD_; continue;} + _aE_ = i + 1 | 0; + if(_aD_ !== i){var i = _aE_; continue;} break; } } @@ -30565,9 +30618,9 @@ nsize = osize * 2 | 0; /*<>*/ clean(h); var - _av_ = nsize < Stdlib_Sys[13] ? 1 : 0, - _aw_ = _av_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _av_; - if(_aw_){ + _aw_ = nsize < Stdlib_Sys[13] ? 1 : 0, + _ax_ = _aw_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _aw_; + if(_ax_){ /*<>*/ /*<>*/ var ndata = /*<>*/ caml_make_vect(nsize, 0); h[2] = ndata; @@ -30575,33 +30628,33 @@ insert_bucket = function(param){ /*<>*/ if(! param) - /*<>*/ return 0; + /*<>*/ return _d_; var rest = param[3], data = param[2], hkey = param[1]; /*<>*/ insert_bucket(rest); /*<>*/ /*<>*/ var nidx = key_index(h, hkey); /*<>*/ ndata[1 + nidx] = [0, hkey, data, caml_check_bound(ndata, nidx)[1 + nidx]]; - /*<>*/ return 0; + /*<>*/ return _d_; /*<>*/ }, - /*<>*/ _ay_ = osize - 1 | 0, - /*<>*/ _ax_ = 0; - if(_ay_ >= 0){ - var i = _ax_; + /*<>*/ _az_ = osize - 1 | 0, + /*<>*/ _ay_ = 0; + if(_az_ >= 0){ + var i = _ay_; for(;;){ /*<>*/ insert_bucket (caml_check_bound(odata, i)[1 + i]); /*<>*/ /*<>*/ var - _aA_ = i + 1 | 0; - if(_ay_ !== i){var i = _aA_; continue;} + _aB_ = i + 1 | 0; + if(_az_ !== i){var i = _aB_; continue;} break; } } - var _az_ = 0; + var _aA_ = 0; } else - var _az_ = _aw_; - return _az_; + var _aA_ = _ax_; + return _aA_; /*<>*/ } function add(h, key, info){ /*<>*/ var @@ -30614,8 +30667,8 @@ [0, hkey, container, caml_check_bound(h[2], i)[1 + i]]; /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; h[1] = h[1] + 1 | 0; - var _au_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _au_ ? resize(h) : _au_; + var _av_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _av_ ? resize(h) : _av_; /*<>*/ } function remove(h, key){ /*<>*/ /*<>*/ var @@ -30639,17 +30692,17 @@ /*<>*/ } /*<>*/ var /*<>*/ i = key_index(h, hkey), - /*<>*/ _at_ = + /*<>*/ _au_ = remove_bucket(caml_check_bound(h[2], i)[1 + i]); - /*<>*/ caml_check_bound(h[2], i)[1 + i] = _at_; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = _au_; /*<>*/ return 0; /*<>*/ } function find(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _as_ = key_index(h, hkey), - param = caml_check_bound(h[2], _as_)[1 + _as_]; + /*<>*/ _at_ = key_index(h, hkey), + param = caml_check_bound(h[2], _at_)[1 + _at_]; for(;;){ if(! param) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -30673,8 +30726,8 @@ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _ar_ = key_index(h, hkey), - param = caml_check_bound(h[2], _ar_)[1 + _ar_]; + /*<>*/ _as_ = key_index(h, hkey), + param = caml_check_bound(h[2], _as_)[1 + _as_]; for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -30719,9 +30772,9 @@ } /*<>*/ } /*<>*/ /*<>*/ var - _aq_ = key_index(h, hkey); + _ar_ = key_index(h, hkey); /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _aq_)[1 + _aq_]); + (caml_check_bound(h[2], _ar_)[1 + _ar_]); /*<>*/ } function replace(h, key, info){ /*<>*/ var @@ -30739,27 +30792,27 @@ if(hkey !== hk){var next$0 = param[3], param = next$0; continue;} if( /*<>*/ caml_call2(H[3], c, key)){var param = next; continue;} /*<>*/ /*<>*/ var - _am_ = /*<>*/ caml_call3(H[5], c, key, info); - /*<>*/ return _am_; + _an_ = /*<>*/ caml_call3(H[5], c, key, info); + /*<>*/ return _an_; } } - catch(_ap_){ - var _an_ = caml_wrap_exception(_ap_); - if(_an_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_an_, 0); + catch(_aq_){ + var _ao_ = caml_wrap_exception(_aq_); + if(_ao_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ao_, 0); /*<>*/ /*<>*/ var container = /*<>*/ caml_call2(H[1], key, info); /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, hkey, container, l]; h[1] = h[1] + 1 | 0; - var _ao_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _ao_ ? resize(h) : _ao_; + var _ap_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _ap_ ? resize(h) : _ap_; } /*<>*/ } function mem(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _al_ = key_index(h, hkey), - param = caml_check_bound(h[2], _al_)[1 + _al_]; + /*<>*/ _am_ = key_index(h, hkey), + param = caml_check_bound(h[2], _am_)[1 + _am_]; /*<>*/ for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -30784,21 +30837,21 @@ } } function stats(h){ - /*<>*/ var _af_ = h[2], _ag_ = 0; - function _ah_(m, b){ + /*<>*/ var _ag_ = h[2], _ah_ = 0; + function _ai_(m, b){ /*<>*/ /*<>*/ var - _ak_ = bucket_length(0, b); + _al_ = bucket_length(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _ak_); + (Stdlib_Int[11], m, _al_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ah_, _ag_, _af_), + (Stdlib_Array[15], _ai_, _ah_, _ag_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ai_ = h[2]; - function _aj_(b){ + /*<>*/ _aj_ = h[2]; + function _ak_(b){ /*<>*/ /*<>*/ var l = bucket_length(0, b); /*<>*/ histo[1 + l] = @@ -30806,7 +30859,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _aj_, _ai_); + (Stdlib_Array[11], _ak_, _aj_); /*<>*/ return [0, h[1], h[2].length - 1, mbl, histo]; /*<>*/ } function bucket_length_alive(accu, param){ @@ -30825,22 +30878,22 @@ function stats_alive(h){ /*<>*/ var /*<>*/ size = [0, 0], - /*<>*/ _$_ = h[2], - _aa_ = 0; - function _ab_(m, b){ + /*<>*/ _aa_ = h[2], + _ab_ = 0; + function _ac_(m, b){ /*<>*/ /*<>*/ var - _ae_ = bucket_length_alive(0, b); + _af_ = bucket_length_alive(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _ae_); + (Stdlib_Int[11], m, _af_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ab_, _aa_, _$_), + (Stdlib_Array[15], _ac_, _ab_, _aa_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ac_ = h[2]; - function _ad_(b){ + /*<>*/ _ad_ = h[2]; + function _ae_(b){ /*<>*/ /*<>*/ var l = bucket_length_alive(0, b); size[1] = size[1] + l | 0; @@ -30849,7 +30902,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _ad_, _ac_); + (Stdlib_Array[11], _ae_, _ad_); /*<>*/ return [0, size[1], h[2].length - 1, @@ -30857,20 +30910,20 @@ histo]; /*<>*/ } function add_seq(tbl, i){ - function ___(param){ + function _$_(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return add(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], ___, i); + (Stdlib_Seq[4], _$_, i); /*<>*/ } function replace_seq(tbl, i){ - function _Z_(param){ + function ___(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return replace(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _Z_, i); + (Stdlib_Seq[4], ___, i); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -30907,8 +30960,9 @@ (Stdlib_Obj[24][3], t, 0); /*<>*/ } function set_key(t, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ return _d_; /*<>*/ } function check_key(t){ /*<>*/ return /*<>*/ caml_call2 @@ -30994,10 +31048,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _Y_ = include[1]; + _Z_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_Y_, _a_, sz); + (_Z_, _a_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31030,8 +31084,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add(b, k, d){ - /*<>*/ var _X_ = b[1]; - b[1] = [0, make(k, d), _X_]; + /*<>*/ var _Y_ = b[1]; + b[1] = [0, make(k, d), _Y_]; return 0; /*<>*/ } function test_key(k, e){ @@ -31060,13 +31114,13 @@ } /*<>*/ } function find(b, k){ - /*<>*/ var _U_ = b[1]; - /*<>*/ function _V_(_W_){ - /*<>*/ return test_key(k, _W_); + /*<>*/ var _V_ = b[1]; + /*<>*/ function _W_(_X_){ + /*<>*/ return test_key(k, _X_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _V_, _U_); + /*<>*/ caml_call2(Stdlib_List[39], _W_, _V_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data(e); @@ -31087,16 +31141,18 @@ (Stdlib_Obj[24][3], t, 0); /*<>*/ } function set_key1(t, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ return _d_; /*<>*/ } function get_key2(t){ /*<>*/ return /*<>*/ caml_call2 (Stdlib_Obj[24][3], t, 1); /*<>*/ } function set_key2(t, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 1, k); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 1, k); + /*<>*/ return _d_; /*<>*/ } function get_data$0(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31141,11 +31197,11 @@ /*<>*/ var k2 = param[2], k1 = param[1], - /*<>*/ _T_ = + /*<>*/ _U_ = /*<>*/ caml_call2(H2[2], seed, k2) * 65599 | 0; /*<>*/ return /*<>*/ caml_call2 (H1[2], seed, k1) - + _T_ + + _U_ | 0; } function equal(c, param){ @@ -31174,11 +31230,11 @@ } function check_key(c){ /*<>*/ /*<>*/ var - _S_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); - /*<>*/ return _S_ + _T_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); + /*<>*/ return _T_ ? /*<>*/ caml_call2 (Stdlib_Obj[24][7], c, 1) - : _S_; + : _T_; /*<>*/ } /*<>*/ return MakeSeeded ([0, @@ -31197,13 +31253,13 @@ /*<>*/ } /*<>*/ var equal$0 = H1[1], - /*<>*/ _Q_ = [0, equal, seeded_hash]; + /*<>*/ _R_ = [0, equal, seeded_hash]; function seeded_hash$0(seed, x){ /*<>*/ return /*<>*/ caml_call1 (H1[2], x); /*<>*/ } var - include = MakeSeeded$1([0, equal$0, seeded_hash$0], _Q_), + include = MakeSeeded$1([0, equal$0, seeded_hash$0], _R_), clear = include[2], reset = include[3], copy = include[4], @@ -31220,10 +31276,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _R_ = include[1]; + _S_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_R_, _b_, sz); + (_S_, _b_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31256,8 +31312,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$0(b, k1, k2, d){ - /*<>*/ var _P_ = b[1]; - b[1] = [0, make$1(k1, k2, d), _P_]; + /*<>*/ var _Q_ = b[1]; + b[1] = [0, make$1(k1, k2, d), _Q_]; return 0; /*<>*/ } function test_keys(k1, k2, e){ @@ -31287,13 +31343,13 @@ } /*<>*/ } function find$0(b, k1, k2){ - /*<>*/ var _M_ = b[1]; - /*<>*/ function _N_(_O_){ - /*<>*/ return test_keys(k1, k2, _O_); + /*<>*/ var _N_ = b[1]; + /*<>*/ function _O_(_P_){ + /*<>*/ return test_keys(k1, k2, _P_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _N_, _M_); + /*<>*/ caml_call2(Stdlib_List[39], _O_, _N_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$0(e); @@ -31318,8 +31374,9 @@ (Stdlib_Obj[24][3], t, n); /*<>*/ } function set_key$0(t, n, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, n, k); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, n, k); + /*<>*/ return _d_; /*<>*/ } function get_data$1(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31335,16 +31392,16 @@ /*<>*/ eph = create$1(l); /*<>*/ set_data$1(eph, data); /*<>*/ var - _K_ = l - 1 | 0, - /*<>*/ _J_ = 0; - if(_K_ >= 0){ - var i = _J_; + _L_ = l - 1 | 0, + /*<>*/ _K_ = 0; + if(_L_ >= 0){ + var i = _K_; for(;;){ /*<>*/ set_key$0 (eph, i, caml_check_bound(keys, i)[1 + i]); /*<>*/ /*<>*/ var - _L_ = i + 1 | 0; - if(_K_ !== i){var i = _L_; continue;} + _M_ = i + 1 | 0; + if(_L_ !== i){var i = _M_; continue;} break; } } @@ -31358,10 +31415,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - /*<>*/ _F_ = l - 1 | 0, - /*<>*/ _E_ = 0; - if(_F_ >= 0){ - var i = _E_; + /*<>*/ _G_ = l - 1 | 0, + /*<>*/ _F_ = 0; + if(_G_ >= 0){ + var i = _F_; for(;;){ /*<>*/ /*<>*/ var match = get_key$0(eph, i); @@ -31373,19 +31430,19 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ /*<>*/ var - _H_ = i + 1 | 0; - if(_F_ !== i){var i = _H_; continue;} + _I_ = i + 1 | 0; + if(_G_ !== i){var i = _I_; continue;} break; } } /*<>*/ /*<>*/ var - _G_ = get_data$1(eph); - /*<>*/ return _G_; + _H_ = get_data$1(eph); + /*<>*/ return _H_; } - catch(_I_){ - var _D_ = caml_wrap_exception(_I_); - if(_D_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_D_, 0); + catch(_J_){ + var _E_ = caml_wrap_exception(_J_); + if(_E_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_E_, 0); } /*<>*/ } function MakeSeeded$2(H){ @@ -31394,16 +31451,16 @@ c = create$1(k.length - 1); /*<>*/ set_data$1(c, d); /*<>*/ var - _B_ = k.length - 1 - 1 | 0, - /*<>*/ _A_ = 0; - if(_B_ >= 0){ - var i = _A_; + _C_ = k.length - 1 - 1 | 0, + /*<>*/ _B_ = 0; + if(_C_ >= 0){ + var i = _B_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _C_ = i + 1 | 0; - if(_B_ !== i){var i = _C_; continue;} + _D_ = i + 1 | 0; + if(_C_ !== i){var i = _D_; continue;} break; } } @@ -31412,21 +31469,21 @@ function seeded_hash(seed, k){ /*<>*/ var /*<>*/ h = [0, 0], - _w_ = k.length - 1 - 1 | 0, - /*<>*/ _v_ = 0; - if(_w_ >= 0){ - var i = _v_; + _x_ = k.length - 1 - 1 | 0, + /*<>*/ _w_ = 0; + if(_x_ >= 0){ + var i = _w_; for(;;){ /*<>*/ var - _x_ = h[1], - /*<>*/ _y_ = caml_check_bound(k, i)[1 + i]; + _y_ = h[1], + /*<>*/ _z_ = caml_check_bound(k, i)[1 + i]; h[1] = - ( /*<>*/ caml_call2(H[2], seed, _y_) * 65599 | 0) - + _x_ + ( /*<>*/ caml_call2(H[2], seed, _z_) * 65599 | 0) + + _y_ | 0; /*<>*/ /*<>*/ var - _z_ = i + 1 | 0; - if(_w_ !== i){var i = _z_; continue;} + _A_ = i + 1 | 0; + if(_x_ !== i){var i = _A_; continue;} break; } } @@ -31447,9 +31504,9 @@ if(! match) /*<>*/ return 2; /*<>*/ var ki = match[1], - /*<>*/ _u_ = caml_check_bound(k, i)[1 + i]; + /*<>*/ _v_ = caml_check_bound(k, i)[1 + i]; /*<>*/ if - (! /*<>*/ caml_call2(H[1], _u_, ki)) + (! /*<>*/ caml_call2(H[1], _v_, ki)) /*<>*/ return 1; /*<>*/ var /*<>*/ i$0 = i - 1 | 0, @@ -31460,16 +31517,16 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Obj[24][12], c); /*<>*/ var - _s_ = k.length - 1 - 1 | 0, - /*<>*/ _r_ = 0; - if(_s_ >= 0){ - var i = _r_; + _t_ = k.length - 1 - 1 | 0, + /*<>*/ _s_ = 0; + if(_t_ >= 0){ + var i = _s_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _t_ = i + 1 | 0; - if(_s_ !== i){var i = _t_; continue;} + _u_ = i + 1 | 0; + if(_t_ !== i){var i = _u_; continue;} break; } } @@ -31480,19 +31537,19 @@ /*<>*/ i$1 = length$1(c) - 1 | 0, i = i$1; /*<>*/ for(;;){ - var _p_ = i < 0 ? 1 : 0; - if(_p_) - var _q_ = _p_; + var _q_ = i < 0 ? 1 : 0; + if(_q_) + var _r_ = _q_; else{ /*<>*/ /*<>*/ var - _o_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); - /*<>*/ if(_o_){ + _p_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); + /*<>*/ if(_p_){ var i$0 = i - 1 | 0, i = i$0; continue; } - var _q_ = _o_; + var _r_ = _p_; } - return _q_; + return _r_; } /*<>*/ } /*<>*/ return MakeSeeded @@ -31528,10 +31585,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _n_ = include[1]; + _o_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_n_, _c_, sz); + (_o_, _c_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31564,8 +31621,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$1(b, k, d){ - /*<>*/ var _m_ = b[1]; - b[1] = [0, make$3(k, d), _m_]; + /*<>*/ var _n_ = b[1]; + b[1] = [0, make$3(k, d), _n_]; return 0; /*<>*/ } function test_keys$0(k, e){ @@ -31574,10 +31631,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - _i_ = k.length - 1 - 1 | 0, - /*<>*/ _h_ = 0; - if(_i_ >= 0){ - var i = _h_; + _j_ = k.length - 1 - 1 | 0, + /*<>*/ _i_ = 0; + if(_j_ >= 0){ + var i = _i_; for(;;){ /*<>*/ var /*<>*/ match = get_key$0(e, i), @@ -31586,8 +31643,8 @@ var x = match[1]; if(x === caml_check_bound(k, i)[1 + i]){ /*<>*/ /*<>*/ var - _k_ = i + 1 | 0; - if(_i_ !== i){var i = _k_; continue;} + _l_ = i + 1 | 0; + if(_j_ !== i){var i = _l_; continue;} switch$0 = 1; } } @@ -31597,13 +31654,13 @@ break; } } - /*<>*/ /*<>*/ var _j_ = 1; - /*<>*/ return _j_; + /*<>*/ /*<>*/ var _k_ = 1; + /*<>*/ return _k_; } - catch(_l_){ - var _g_ = caml_wrap_exception(_l_); - if(_g_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_g_, 0); + catch(_m_){ + var _h_ = caml_wrap_exception(_m_); + if(_h_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_h_, 0); } /*<>*/ } function remove$1(b, k){ @@ -31623,13 +31680,13 @@ } /*<>*/ } function find$1(b, k){ - /*<>*/ var _d_ = b[1]; - /*<>*/ function _e_(_f_){ - /*<>*/ return test_keys$0(k, _f_); + /*<>*/ var _e_ = b[1]; + /*<>*/ function _f_(_g_){ + /*<>*/ return test_keys$0(k, _g_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _e_, _d_); + /*<>*/ caml_call2(Stdlib_List[39], _f_, _e_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$1(e); @@ -31694,8 +31751,6 @@ caml_string_get = runtime.caml_string_get, caml_string_notequal = runtime.caml_string_notequal, caml_sys_getenv = runtime.caml_sys_getenv, - 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 @@ -31718,6 +31773,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var + _l_ = undefined, global_data = runtime.caml_get_global_data(), cst$18 = cst$19, cst$17 = cst$19, @@ -31853,39 +31909,39 @@ /*<>*/ } function is_relative(n){ /*<>*/ var - _aK_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _aL_ = - _aK_ + _aI_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _aJ_ = + _aI_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - return _aL_; + return _aJ_; /*<>*/ } function is_implicit(n){ /*<>*/ /*<>*/ var - _aF_ = is_relative(n); - /*<>*/ if(_aF_){ + _aD_ = is_relative(n); + /*<>*/ if(_aD_){ var - _aG_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aH_ = - _aG_ + _aE_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aF_ = + _aE_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_aH_) + /*<>*/ if(_aF_) var - _aI_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aJ_ = - _aI_ + _aG_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aH_ = + _aG_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 3), cst$28); else - var _aJ_ = _aH_; + var _aH_ = _aF_; } else - var _aJ_ = _aF_; - /*<>*/ return _aJ_; + var _aH_ = _aD_; + /*<>*/ return _aH_; /*<>*/ } function check_suffix(name, suff){ /*<>*/ return /*<>*/ caml_call2 @@ -31913,8 +31969,8 @@ /*<>*/ caml_sys_getenv("TMPDIR"), temp_dir_name = _k_; } - catch(_aE_){ - var _a_ = caml_wrap_exception(_aE_); + catch(_aC_){ + var _a_ = caml_wrap_exception(_aC_); if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); var temp_dir_name = cst_tmp; } @@ -31926,10 +31982,10 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 39); /*<>*/ var - _aB_ = l - 1 | 0, - /*<>*/ _aA_ = 0; - if(_aB_ >= 0){ - var i = _aA_; + _az_ = l - 1 | 0, + /*<>*/ _ay_ = 0; + if(_az_ >= 0){ + var i = _ay_; for(;;){ /*<>*/ if (39 === /*<>*/ caml_string_get(s, i)) @@ -31937,13 +31993,13 @@ (Stdlib_Buffer[16], b, quotequote); else{ /*<>*/ /*<>*/ var - _aD_ = /*<>*/ caml_string_get(s, i); + _aB_ = /*<>*/ caml_string_get(s, i); /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, _aD_); + (Stdlib_Buffer[12], b, _aB_); } /*<>*/ /*<>*/ var - _aC_ = i + 1 | 0; - if(_aB_ !== i){var i = _aC_; continue;} + _aA_ = i + 1 | 0; + if(_az_ !== i){var i = _aA_; continue;} break; } } @@ -31957,47 +32013,47 @@ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _ap_ = cst_2_1; + var _an_ = cst_2_1; else /*<>*/ var - /*<>*/ _az_ = quote(f), - _ap_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _az_); - var _aq_ = _ap_; + /*<>*/ _ax_ = quote(f), + _an_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _ax_); + var _ao_ = _an_; } else - var _aq_ = cst$4; + var _ao_ = cst$4; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _ar_ = quote(f$0), - _as_ = /*<>*/ caml_call2(Stdlib[28], cst, _ar_); + /*<>*/ _ap_ = quote(f$0), + _aq_ = /*<>*/ caml_call2(Stdlib[28], cst, _ap_); else - var _as_ = cst$3; + var _aq_ = cst$3; /*<>*/ /*<>*/ var - _at_ = /*<>*/ caml_call2(Stdlib[28], _as_, _aq_); + _ar_ = /*<>*/ caml_call2(Stdlib[28], _aq_, _ao_); if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _au_ = quote(f$1), - _av_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _au_); + /*<>*/ _as_ = quote(f$1), + _at_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _as_); else - var _av_ = cst$2; + var _at_ = cst$2; /*<>*/ var - /*<>*/ _aw_ = - /*<>*/ caml_call2(Stdlib[28], _av_, _at_), - /*<>*/ _ax_ = + /*<>*/ _au_ = + /*<>*/ caml_call2(Stdlib[28], _at_, _ar_), + /*<>*/ _av_ = /*<>*/ caml_call2 (Stdlib_List[19], quote, [0, cmd, args]), - /*<>*/ _ay_ = - /*<>*/ caml_call2(Stdlib_String[6], cst$1, _ax_); + /*<>*/ _aw_ = + /*<>*/ caml_call2(Stdlib_String[6], cst$1, _av_); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _ay_, _aw_); + (Stdlib[28], _aw_, _au_); /*<>*/ } - /*<>*/ function basename(_ao_){ - /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _ao_); + /*<>*/ function basename(_am_){ + /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _am_); } - /*<>*/ function dirname(_an_){ - /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _an_); + /*<>*/ function dirname(_al_){ + /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _al_); } /*<>*/ /*<>*/ var Unix = @@ -32020,96 +32076,96 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _ak_ = 47 === c ? 1 : 0; - if(_ak_) - var _al_ = _ak_; + _ai_ = 47 === c ? 1 : 0; + if(_ai_) + var _aj_ = _ai_; else - var _am_ = 92 === c ? 1 : 0, _al_ = _am_ || (58 === c ? 1 : 0); - return _al_; + var _ak_ = 92 === c ? 1 : 0, _aj_ = _ak_ || (58 === c ? 1 : 0); + return _aj_; /*<>*/ } function is_relative$0(n){ /*<>*/ var - _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _af_ = - _ae_ + _ac_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ad_ = + _ac_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_af_){ + if(_ad_){ var - _ag_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ah_ = - _ag_ + _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _af_ = + _ae_ || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ah_) + if(_af_) var - _ai_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aj_ = - _ai_ + _ag_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _ah_ = + _ag_ || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else - var _aj_ = _ah_; + var _ah_ = _af_; } else - var _aj_ = _af_; - return _aj_; + var _ah_ = _ad_; + return _ah_; /*<>*/ } function is_implicit$0(n){ /*<>*/ /*<>*/ var - _X_ = is_relative$0(n); - /*<>*/ if(_X_){ + _V_ = is_relative$0(n); + /*<>*/ if(_V_){ var - _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _Z_ = - _Y_ + _W_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _X_ = + _W_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_Z_){ + /*<>*/ if(_X_){ var - ___ = caml_ml_string_length(n) < 2 ? 1 : 0, - _$_ = - ___ + _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _Z_ = + _Y_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), ".\\"); - /*<>*/ if(_$_){ + /*<>*/ if(_Z_){ var - _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _ab_ = - _aa_ + ___ = caml_ml_string_length(n) < 3 ? 1 : 0, + _$_ = + ___ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), cst$28); - /*<>*/ if(_ab_) + /*<>*/ if(_$_) var - _ac_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _ad_ = - _ac_ + _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _ab_ = + _aa_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), "..\\"); else - var _ad_ = _ab_; + var _ab_ = _$_; } else - var _ad_ = _$_; + var _ab_ = _Z_; } else - var _ad_ = _Z_; + var _ab_ = _X_; } else - var _ad_ = _X_; - /*<>*/ return _ad_; + var _ab_ = _V_; + /*<>*/ return _ab_; /*<>*/ } function check_suffix$0(name, suff){ /*<>*/ var - _U_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_U_) + _S_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; + if(_S_) /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 @@ -32117,14 +32173,14 @@ name, caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, caml_ml_string_length(suff)), - /*<>*/ _V_ = + /*<>*/ _T_ = /*<>*/ caml_call1(Stdlib_String[26], suff), - _W_ = + _U_ = /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[26], s), _V_); + ( /*<>*/ caml_call1(Stdlib_String[26], s), _T_); else - var _W_ = _U_; - /*<>*/ return _W_; + var _U_ = _S_; + /*<>*/ return _U_; /*<>*/ } function chop_suffix_opt$0(suffix, filename){ /*<>*/ var @@ -32135,11 +32191,11 @@ /*<>*/ r = /*<>*/ caml_call3 (Stdlib_String[15], filename, len_f - len_s | 0, len_s), - /*<>*/ _T_ = + /*<>*/ _R_ = /*<>*/ caml_call1(Stdlib_String[26], suffix); /*<>*/ return /*<>*/ caml_string_equal ( /*<>*/ caml_call1(Stdlib_String[26], r), - _T_) + _R_) ? [0, /*<>*/ caml_call3 (Stdlib_String[15], filename, 0, len_f - len_s | 0)] @@ -32151,8 +32207,8 @@ /*<>*/ caml_sys_getenv("TEMP"), temp_dir_name$0 = _j_; } - catch(_S_){ - var _b_ = caml_wrap_exception(_S_); + catch(_Q_){ + var _b_ = caml_wrap_exception(_Q_); if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); var temp_dir_name$0 = cst$5; } @@ -32163,60 +32219,39 @@ /*<>*/ caml_call1(Stdlib_Buffer[1], l + 20 | 0); /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - function add_bs(n){ - /*<>*/ /*<>*/ var _Q_ = 1; - if(n >= 1){ - var j = _Q_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 92); - /*<>*/ /*<>*/ var - _R_ = j + 1 | 0; - if(n !== j){var j = _R_; continue;} - break; - } - } - return 0; - /*<>*/ } - function loop$0(counter, i){ + function loop(i){ /*<>*/ var i$0 = i; /*<>*/ for(;;){ - if(i$0 === l) - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 34); + if(i$0 === l){ + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 34); + /*<>*/ return _l_; + } /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); if(34 === c){ - var _O_ = 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop_bs, [0, _O_, i$0]); - var counter$1 = counter + 1 | 0; - /*<>*/ return loop_bs(counter$1, _O_, i$0); + /*<>*/ loop_bs(0, i$0); + /*<>*/ return _l_; } - if(92 !== c){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, c); - /*<>*/ var - /*<>*/ i$1 = i$0 + 1 | 0, - i$0 = i$1; - continue; + if(92 === c){ + /*<>*/ loop_bs(0, i$0); + /*<>*/ return _l_; } - var _P_ = 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop_bs, [0, _P_, i$0]); - var counter$0 = counter + 1 | 0; - /*<>*/ return loop_bs(counter$0, _P_, i$0); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, c); + /*<>*/ var + /*<>*/ i$1 = i$0 + 1 | 0, + i$0 = i$1; } /*<>*/ } - function loop_bs(counter, n, i){ + function loop_bs(n, i){ /*<>*/ var n$0 = n, i$0 = i; /*<>*/ for(;;){ if(i$0 === l){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - /*<>*/ return add_bs(n$0); + /*<>*/ add_bs(n$0); + /*<>*/ return _l_; } /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(s, i$0); @@ -32224,13 +32259,8 @@ /*<>*/ add_bs((2 * n$0 | 0) + 1 | 0); /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - /*<>*/ /*<>*/ var - _N_ = i$0 + 1 | 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop$0, [0, _N_]); - var counter$1 = counter + 1 | 0; - /*<>*/ return loop$0(counter$1, _N_); + /*<>*/ loop(i$0 + 1 | 0); + /*<>*/ return _l_; } if(92 === match){ /*<>*/ var @@ -32241,14 +32271,25 @@ continue; } /*<>*/ add_bs(n$0); - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop$0, [0, i$0]); - var counter$0 = counter + 1 | 0; - /*<>*/ return loop$0(counter$0, i$0); + /*<>*/ loop(i$0); + /*<>*/ return _l_; } /*<>*/ } - function loop(i){ /*<>*/ return caml_trampoline(loop$0(0, i));} + function add_bs(n){ + /*<>*/ /*<>*/ var _O_ = 1; + if(n >= 1){ + var j = _O_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 92); + /*<>*/ /*<>*/ var + _P_ = j + 1 | 0; + if(n !== j){var j = _P_; continue;} + break; + } + } + return _l_; + /*<>*/ } /*<>*/ loop(0); /*<>*/ return /*<>*/ caml_call1 (Stdlib_Buffer[2], b); @@ -32262,64 +32303,64 @@ (! /*<>*/ caml_call2(Stdlib_String[14], f, 32)) /*<>*/ return f; /*<>*/ /*<>*/ var - _M_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); + _N_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _M_); + (Stdlib[28], cst$7, _N_); } /*<>*/ /*<>*/ var - _L_ = + _M_ = /*<>*/ caml_call2 (Stdlib[28], cst_Filename_quote_command_bad, f); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _L_); + (Stdlib[2], _M_); /*<>*/ } function quote_command$0(cmd, stdin, stdout, stderr, args){ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _x_ = cst_2_1$0; + var _y_ = cst_2_1$0; else /*<>*/ var - /*<>*/ _J_ = quote_cmd_filename(f), - _x_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _J_); - var _y_ = _x_; + /*<>*/ _K_ = quote_cmd_filename(f), + _y_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _K_); + var _z_ = _y_; } else - var _y_ = cst$16; - var _z_ = [0, _y_, _c_]; + var _z_ = cst$16; + var _A_ = [0, _z_, _c_]; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _A_ = quote_cmd_filename(f$0), - _B_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _A_); + /*<>*/ _B_ = quote_cmd_filename(f$0), + _C_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _B_); else - var _B_ = cst$15; - var _C_ = [0, _B_, _z_]; + var _C_ = cst$15; + var _D_ = [0, _C_, _A_]; if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _D_ = quote_cmd_filename(f$1), - _E_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _D_); + /*<>*/ _E_ = quote_cmd_filename(f$1), + _F_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _E_); else - var _E_ = cst$14; + var _F_ = cst$14; /*<>*/ var - /*<>*/ _G_ = + /*<>*/ _H_ = /*<>*/ caml_call2(Stdlib_List[19], quote$0, args), /*<>*/ s = - /*<>*/ caml_call2(Stdlib_String[6], cst$10, _G_), + /*<>*/ caml_call2(Stdlib_String[6], cst$10, _H_), /*<>*/ b = /*<>*/ caml_call1 (Stdlib_Buffer[1], caml_ml_string_length(s) + 20 | 0), - _F_ = [0, _E_, _C_]; - function _w_(c){ + _G_ = [0, _F_, _D_]; + function _x_(c){ /*<>*/ var switch$0 = 0; if(62 <= c){ - var _K_ = c - 63 | 0; - if(60 < _K_ >>> 0){ - if(62 > _K_) switch$0 = 1; + var _L_ = c - 63 | 0; + if(60 < _L_ >>> 0){ + if(62 > _L_) switch$0 = 1; } - else if(31 === _K_) switch$0 = 1; + else if(31 === _L_) switch$0 = 1; } else if(42 <= c){ @@ -32334,21 +32375,21 @@ : /*<>*/ caml_call2(Stdlib_Buffer[12], b, c); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _w_, s); + (Stdlib_String[29], _x_, s); /*<>*/ var - _H_ = + _I_ = [0, cst$11, - [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _F_]], - /*<>*/ _I_ = - [0, cst$12, [0, quote_cmd_filename(cmd), _H_]]; + [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _G_]], + /*<>*/ _J_ = + [0, cst$12, [0, quote_cmd_filename(cmd), _I_]]; /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[6], cst$13, _I_); + (Stdlib_String[6], cst$13, _J_); /*<>*/ } function drive_and_path(s){ /*<>*/ var - _s_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; - if(_s_){ + _t_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; + if(_t_){ /*<>*/ var /*<>*/ param = /*<>*/ caml_string_get(s, 0), @@ -32358,23 +32399,23 @@ } else if(65 <= param) switch$0 = 1; /*<>*/ var - _t_ = switch$0 ? 1 : 0, - /*<>*/ _u_ = - _t_ + _u_ = switch$0 ? 1 : 0, + /*<>*/ _v_ = + _u_ ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 - : _t_; + : _u_; } else - var _u_ = _s_; - /*<>*/ if(! _u_) + var _v_ = _t_; + /*<>*/ if(! _v_) /*<>*/ return [0, cst$17, s]; /*<>*/ /*<>*/ var - _v_ = + _w_ = /*<>*/ caml_call3 (Stdlib_String[15], s, 2, caml_ml_string_length(s) - 2 | 0); /*<>*/ return [0, /*<>*/ caml_call3(Stdlib_String[15], s, 0, 2), - _v_]; + _w_]; /*<>*/ } function dirname$0(s){ /*<>*/ var @@ -32408,11 +32449,11 @@ quote_command$0, basename$0, dirname$0]; - /*<>*/ function basename$1(_r_){ - /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _r_); + /*<>*/ function basename$1(_s_){ + /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _s_); } - /*<>*/ function dirname$1(_q_){ - /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _q_); + /*<>*/ function dirname$1(_r_){ + /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _r_); } /*<>*/ var /*<>*/ Cygwin = @@ -32455,11 +32496,11 @@ /*<>*/ if (0 !== l && ! is_dir_sep$1(dirname, l - 1 | 0)){ /*<>*/ /*<>*/ var - _p_ = + _q_ = /*<>*/ caml_call2 (Stdlib[28], dir_sep$2, filename); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], dirname, _p_); + (Stdlib[28], dirname, _q_); } /*<>*/ return /*<>*/ caml_call2 (Stdlib[28], dirname, filename); @@ -32562,7 +32603,7 @@ /*<>*/ } /*<>*/ var /*<>*/ _g_ = - [0, function(_o_){ /*<>*/ return _o_;}], + [0, function(_p_){ /*<>*/ return _p_;}], /*<>*/ current_temp_dir_name = /*<>*/ caml_call2(Stdlib_Domain[10][1], _g_, _f_); function set_temp_dir_name(s){ @@ -32603,17 +32644,17 @@ } } /*<>*/ } - function open_temp_file(opt, _m_, _l_, prefix, suffix){ + function open_temp_file(opt, _n_, _m_, prefix, suffix){ /*<>*/ if(opt) var sth = opt[1], mode = sth; else var mode = _i_; - /*<>*/ if(_m_) - var sth$0 = _m_[1], perms = sth$0; + /*<>*/ if(_n_) + var sth$0 = _n_[1], perms = sth$0; else var perms = 384; - /*<>*/ if(_l_) - var sth$1 = _l_[1], temp_dir = sth$1; + /*<>*/ if(_m_) + var sth$1 = _m_[1], temp_dir = sth$1; else var temp_dir = @@ -32625,12 +32666,12 @@ name = temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ /*<>*/ /*<>*/ var - _n_ = + _o_ = [0, name, /*<>*/ caml_call3 (Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; - /*<>*/ return _n_; + /*<>*/ return _o_; } catch(e$0){ var e = caml_wrap_exception(e$0); From 89df59fb4e6d20cb99f49b152095c0b723967d38 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 8 Aug 2023 13:15:32 +0200 Subject: [PATCH 053/112] sentinal name, start recursive liveness --- compiler/lib/deadcode_dgraph.ml | 47 ++++--- compiler/tests-compiler/direct_calls.ml | 20 +-- compiler/tests-compiler/gh1007.ml | 46 +++---- compiler/tests-compiler/gh1494.ml | 2 +- compiler/tests-compiler/global_deadcode.ml | 137 ++++++++++++++------- 5 files changed, 152 insertions(+), 100 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index c0ba1698cb..6f8ade7821 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -41,7 +41,7 @@ type def = (** Liveness of a variable [x], forming a lattice structure. *) type live = | Top (** [x] is live and not a block. *) - | Live of IntSet.t (** [x] is a live block with a (non-empty) set of live fields. *) + | Live of live IntMap.t (** [x] is a live block with a (non-empty) set of live fields. *) | Dead (** [x] is dead. *) module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -49,19 +49,21 @@ module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) module Domain = struct type t = live - let equal l1 l2 = + let rec equal l1 l2 = match l1, l2 with | Top, Top | Dead, Dead -> true - | Live f1, Live f2 -> IntSet.equal f1 f2 + | Live f1, Live f2 -> IntMap.equal equal f1 f2 | _ -> false let bot = Dead (** Join the liveness according to lattice structure. *) - let join l1 l2 = + let rec join l1 l2 = match l1, l2 with | _, Top | Top, _ -> Top - | Live f1, Live f2 -> Live (IntSet.union f1 f2) + | Live f1, Live f2 -> + let fields = IntMap.union (fun _ l1 l2 -> Some (join l1 l2)) f1 f2 in + Live fields | Dead, Live f | Live f, Dead -> Live f | Dead, Dead -> Dead end @@ -211,19 +213,22 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = let idx = Var.idx v in live_vars.(idx) <- Top in - let add_live v i = + let add_live v i l = let idx = Var.idx v in match live_vars.(idx) with - | Live fields -> live_vars.(idx) <- Live (IntSet.add i fields) - | _ -> live_vars.(idx) <- Live (IntSet.singleton i) + | Live fields -> live_vars.(idx) <- Live (IntMap.add i l fields) + | _ -> live_vars.(idx) <- Live (IntMap.singleton i l) in let live_instruction i = match i with - | Let (_x, e) -> + | Let (_, e) -> + (* We add all variables in impure expressions as top to ensure they aren't removed. *) if not (pure_expr pure_funs e) then ( let vars = expr_vars e in Var.ISet.iter add_top vars;) + (* We might be able to do better in pure fn applications. The function itself must be kept but + arguments might be dead if they don't escape. *) else (match e with | Apply { f; args; _} -> add_top f; @@ -231,13 +236,13 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = | _ -> ()) | Assign (_, _) -> () | Set_field (x, i, y) -> - add_live x i; + add_live x i Top; add_top y | Array_set (x, y, z) -> add_top x; add_top y; add_top z - | Offset_ref (x, i) -> add_live x i + | Offset_ref (x, i) -> add_live x i Top in let live_block block = List.iter ~f:(fun (i, _) -> live_instruction i) block.body; @@ -277,17 +282,19 @@ let propagate uses defs live_vars live_table x = | Live fields -> ( match defs.(Var.idx y) with | Expr (Block (_, vars, _)) -> - let found = ref false in - Array.iteri - ~f:(fun i v -> - if Var.equal v x && IntSet.mem i fields then found := true) + let live = ref Dead in + Array.iteri ~f:(fun i v -> + if Var.equal v x + then match IntMap.find_opt i fields with + | Some l -> live := l + | None -> ()) vars; - if !found then Top else Dead + !live | _ -> Top) (* If y is top and y is a field access, x depends only on that field *) | Top -> ( match defs.(Var.idx y) with - | Expr (Field (_, i)) -> Live (IntSet.singleton i) + | Expr (Field (_, i)) -> Live (IntMap.singleton i Top) | _ -> Top)) (* If x is used as an argument for parameter y, then contribution is liveness of y *) | Propagate -> Var.Tbl.get live_table y @@ -352,7 +359,7 @@ let zero prog sentinal live_table = | Live fields -> let vars = Array.mapi - ~f:(fun i v -> if IntSet.mem i fields then v else sentinal) + ~f:(fun i v -> if IntMap.mem i fields then v else sentinal) vars |> compact_vars in @@ -393,7 +400,7 @@ let zero prog sentinal live_table = module Print = struct let live_to_string = function | Live fields -> - "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" + "live { " ^ IntMap.fold (fun i _ s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" | Top -> "top" | Dead -> "dead" @@ -428,7 +435,7 @@ end (** Add a sentinal variable declaration to the IR. The fresh variable is assigned to `undefined`. *) let add_sentinal p = - let sentinal = Var.fresh () in + let sentinal = Var.fresh_n "sentinal" in let undefined = Prim (Extern "%undefined", []) in let instr, loc = Let (sentinal, undefined), Before 0 in Code.prepend p [ instr, loc ], sentinal diff --git a/compiler/tests-compiler/direct_calls.ml b/compiler/tests-compiler/direct_calls.ml index 98b7a4249c..e7c66cb85a 100644 --- a/compiler/tests-compiler/direct_calls.ml +++ b/compiler/tests-compiler/direct_calls.ml @@ -57,26 +57,26 @@ let%expect_test "direct calls without --enable effects" = [%expect {| function test1(param){ - function f(g, x){caml_call1(g, x); return _b_;} - var _e_ = 7; - f(function(x){return x + 1 | 0;}, _e_); - var _f_ = 4.; - f(function(x){return x * 2.;}, _f_); + function f(g, x){caml_call1(g, x); return sentinal;} + var _d_ = 7; + f(function(x){return x + 1 | 0;}, _d_); + var _e_ = 4.; + f(function(x){return x * 2.;}, _e_); return 0; } //end function test2(param){ - function f(g, x){caml_call1(g, x); return _b_;} - var _d_ = 7; - f(function(x){return x + 1 | 0;}, _d_); + function f(g, x){caml_call1(g, x); return sentinal;} + var _c_ = 7; + f(function(x){return x + 1 | 0;}, _c_); f(function(x){return caml_call2(Stdlib[28], x, cst_a$0);}, cst_a); return 0; } //end function test3(x){ function F(symbol){function f(x){return x + 1 | 0;} return [0, f];} - var M1 = F([0]), M2 = F([0]), _c_ = M2[1].call(null, 2); - return [0, M1[1].call(null, 1), _c_]; + var M1 = F([0]), M2 = F([0]), _b_ = M2[1].call(null, 2); + return [0, M1[1].call(null, 1), _b_]; } //end function test4(x){ diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 6aed85957d..6379531de1 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -369,31 +369,31 @@ let () = M.run () if(2 >= n >>> 0) switch(n){ case 0: - return _a_; + return sentinal; case 1: - odd(0); return _a_; - default: odd(1); return _a_; + odd(0); return sentinal; + default: odd(1); return sentinal; } odd(n - 1 | 0); - return _a_; + return sentinal; }, odd = function(n){ if(2 >= n >>> 0) switch(n){ case 0: - return _a_; + return sentinal; case 1: - even(0); return _a_; - default: even(1); return _a_; + even(0); return sentinal; + default: even(1); return sentinal; } even(n - 1 | 0); - return _a_; + return sentinal; }; even(i); - var _b_ = i + 1 | 0; + var _a_ = i + 1 | 0; if(4 === i) return 0; - var i = _b_; + var i = _a_; } } //end |}] @@ -467,13 +467,13 @@ let () = M.run () f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; delayed[1] = [0, f, delayed[1]]; f(0); - return _c_; + return sentinal; case 1: - odd(0); return _c_; - default: odd(1); return _c_; + odd(0); return sentinal; + default: odd(1); return sentinal; } odd(n - 1 | 0); - return _c_; + return sentinal; } function odd(n){ if(2 >= n >>> 0) @@ -483,13 +483,13 @@ let () = M.run () f = function(param){return caml_call2(Stdlib_Printf[2], _a_, i);}; delayed[1] = [0, f, delayed[1]]; f(0); - return _c_; + return sentinal; case 1: - even(0); return _c_; - default: even(1); return _c_; + even(0); return sentinal; + default: even(1); return sentinal; } even(n - 1 | 0); - return _c_; + return sentinal; } var block = [0, even, odd]; return block; @@ -497,14 +497,14 @@ let () = M.run () closures$0 = closures(i), even = closures$0[1]; even(i); - var _f_ = i + 1 | 0; + var _e_ = i + 1 | 0; if(4 === i){ var - _d_ = caml_call1(Stdlib_List[9], delayed[1]), - _e_ = function(f){return caml_call1(f, 0);}; - return caml_call2(Stdlib_List[17], _e_, _d_); + _c_ = caml_call1(Stdlib_List[9], delayed[1]), + _d_ = function(f){return caml_call1(f, 0);}; + return caml_call2(Stdlib_List[17], _d_, _c_); } - var i = _f_; + var i = _e_; } } //end |}] diff --git a/compiler/tests-compiler/gh1494.ml b/compiler/tests-compiler/gh1494.ml index 17cab23faf..fd646b38f2 100644 --- a/compiler/tests-compiler/gh1494.ml +++ b/compiler/tests-compiler/gh1494.ml @@ -39,7 +39,7 @@ let () = [%expect {| function bug(param){ - var g = [0, function(x){return function(_d_){return _d_;};}]; + var g = [0, function(x){return function(_c_){return _c_;};}]; return [0, function(param){return caml_call1(g[1], 1);}, g]; } //end |}] diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index c82dd943ea..eb48cf9a89 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -15,41 +15,97 @@ let%expect_test "Eliminates unused functions from functor" = |} in (* Expect: compiles functor members used in the program *) - print_fun_decl program (Some "find"); - [%expect - {| - function find(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) throw caml_maybe_attach_backtrace(Not_found, 1); - var - r = param$0[3], - v = param$0[2], - l = param$0[1], - c = caml_call2(Ord[1], x, v); - if(0 === c) return v; - var r$0 = 0 <= c ? r : l, param$0 = r$0; - } - } - //end |}]; - print_fun_decl program (Some "add"); + print_fun_decl program (Some "_e_"); [%expect {| - function add(x, t){ - if(! t) return [0, 0, x, 0, 1]; - var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); - if(0 === c) return t; - if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} - var ll = add(x, l); - return l === ll ? t : bal(ll, v, r); + function _e_(Ord){ + function height(param){if(! param) return 0; var h = param[4]; return h;} + function create(l, v, r){ + if(l) var h = l[4], hl = h; else var hl = 0; + if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + var _m_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, _m_]; + } + function bal(l, v, r){ + if(l) var h = l[4], hl = h; else var hl = 0; + if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + if((hr + 2 | 0) < hl){ + if(! l) return invalid_arg(_b_); + var lr = l[3], lv = l[2], ll = l[1], _h_ = height(lr); + if(_h_ <= height(ll)) return create(ll, lv, create(lr, v, r)); + if(! lr) return invalid_arg(_a_); + var lrr = lr[3], lrv = lr[2], lrl = lr[1], _i_ = create(lrr, v, r); + return create(create(ll, lv, lrl), lrv, _i_); + } + if((hl + 2 | 0) >= hr){ + var _l_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, _l_]; + } + if(! r) return invalid_arg(_d_); + var rr = r[3], rv = r[2], rl = r[1], _j_ = height(rl); + if(_j_ <= height(rr)) return create(create(l, v, rl), rv, rr); + if(! rl) return invalid_arg(_c_); + var rlr = rl[3], rlv = rl[2], rll = rl[1], _k_ = create(rlr, rv, rr); + return create(create(l, v, rll), rlv, _k_); + } + function add(x, t){ + if(! t) return [0, 0, x, 0, 1]; + var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); + if(0 === c) return t; + if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} + var ll = add(x, l); + return l === ll ? t : bal(ll, v, r); + } + function singleton(x){return [0, 0, x, 0, 1];} + var empty = 0; + function find(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) throw caml_maybe_attach_backtrace(Not_found, 1); + var + r = param$0[3], + v = param$0[2], + l = param$0[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return v; + var r$0 = 0 <= c ? r : l, param$0 = r$0; + } + } + return [0, + empty, + sentinal, + sentinal, + add, + singleton, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + sentinal, + find]; } - //end |}]; - (* Expect: does not compile unused functor member *) - print_fun_decl program (Some "union"); - [%expect {| not found |}]; - print_fun_decl program (Some "inter"); - [%expect {| not found |}] + //end |}] -let%expect_test "Substitutes unused fields with undefined" = +let%expect_test "Substitutes unused fields with sentinal" = let program = compile_and_parse {| @@ -64,23 +120,12 @@ let%expect_test "Substitutes unused fields with undefined" = print_fun_decl program (Some "f"); [%expect {| function f(b, x){ - var t = b ? [0, 1, _c_, x] : [0, 3, _c_, 4], v = t[3], u = t[1]; + var t = b ? [0, 1, sentinal, x] : [0, 3, sentinal, 4], v = t[3], u = t[1]; return [0, u, v]; } //end |}]; (* And that variable is defined as `undefined` *) - print_var_decl program "_c_"; + print_var_decl program "sentinal"; [%expect {| - var _c_ = undefined; + var sentinal = undefined; //end |}] - -let%expect_test "Sets unused return value to undefined" = - let program = - compile_and_parse - {| - - |} - in print_fun_decl program (Some "f"); - [%expect {| not found |}]; - print_var_decl program "__"; - [%expect {| var __ = not found |}] \ No newline at end of file From 2e62a34a2110b7b2b72505c6eea455711772797c Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 8 Aug 2023 19:30:36 +0200 Subject: [PATCH 054/112] fix printing vars --- compiler/lib/deadcode_dgraph.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 6f8ade7821..440dd6e0c4 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -408,7 +408,7 @@ module Print = struct Format.eprintf "Usages:\n"; Array.iteri ~f:(fun i ds -> - Format.eprintf "v%d: { " i; + Format.eprintf "%a: { " Var.print (Var.of_idx i); Var.Map.iter (fun d k -> Format.eprintf @@ -424,7 +424,7 @@ module Print = struct let print_liveness live_vars = Format.eprintf "Liveness:\n"; - Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars + Array.iteri ~f:(fun i l -> Format.eprintf "%a: %s\n" Var.print (Var.of_idx i) (live_to_string l)) live_vars let print_live_tbl live_table = Format.eprintf "Liveness with dependencies:\n"; From d930a080523c7a4b1101033b185d6722fb905a3b Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 11 Aug 2023 14:55:14 +0200 Subject: [PATCH 055/112] continue recursive blocks --- compiler/lib/deadcode_dgraph.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 440dd6e0c4..d5c29c7068 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -286,10 +286,14 @@ let propagate uses defs live_vars live_table x = Array.iteri ~f:(fun i v -> if Var.equal v x then match IntMap.find_opt i fields with - | Some l -> live := l + | Some l -> live := Domain.join !live l | None -> ()) vars; !live + | Expr (Field (_, i)) ->( + match IntMap.find_opt i fields with + | Some l -> l + | None -> Dead) | _ -> Top) (* If y is top and y is a field access, x depends only on that field *) | Top -> ( @@ -334,7 +338,7 @@ let zero prog sentinal live_table = | Dead -> false | _ -> true in - let zero_var x = if not (is_live x) then sentinal else x in + let zero_var x = if is_live x then x else sentinal in let zero_cont ((pc, args) : cont) = match Addr.Map.find_opt pc prog.blocks with | Some block -> From 2f60c4ec9dbcb822f52ff28a235792fc0bd99705 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Fri, 11 Aug 2023 14:58:24 +0200 Subject: [PATCH 056/112] promote stdlib changes --- compiler/tests-full/stdlib.cma.expected.js | 4557 ++++++++++---------- 1 file changed, 2285 insertions(+), 2272 deletions(-) diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 7e201668fd..8249793bfe 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -1248,11 +1248,11 @@ : runtime.caml_call_gen(f, [a0]); } var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Assert_failure = global_data.Assert_failure, Stdlib_Sys = global_data.Stdlib__Sys, - _b_ = undefined, cst_Obj_Ephemeron_blit_key = "Obj.Ephemeron.blit_key", cst_Obj_Ephemeron_check_key = "Obj.Ephemeron.check_key", cst_Obj_Ephemeron_unset_key = "Obj.Ephemeron.unset_key", @@ -1330,9 +1330,9 @@ max_ephe_length = Stdlib_Sys[13] - 2 | 0; function create(l){ /*<>*/ var - _h_ = 0 <= l ? 1 : 0, - _i_ = _h_ ? l <= max_ephe_length ? 1 : 0 : _h_; - if(1 - _i_) + _g_ = 0 <= l ? 1 : 0, + _h_ = _g_ ? l <= max_ephe_length ? 1 : 0 : _g_; + if(1 - _h_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_create); /*<>*/ return /*<>*/ runtime.caml_ephe_create @@ -1343,10 +1343,12 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _e_ = 0 <= o ? 1 : 0, - _f_ = _e_ ? o < length(e) ? 1 : 0 : _e_, - _g_ = 1 - _f_; - return _g_ ? ( /*<>*/ caml_call1(Stdlib[1], msg), _b_) : _g_; + _d_ = 0 <= o ? 1 : 0, + _e_ = _d_ ? o < length(e) ? 1 : 0 : _d_, + _f_ = 1 - _e_; + return _f_ + ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) + : _f_; /*<>*/ } function get_key(e, o){ /*<>*/ raise_if_invalid_offset @@ -1385,13 +1387,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _c_ = 0 !== l ? 1 : 0, - _d_ = - _c_ + _b_ = 0 !== l ? 1 : 0, + _c_ = + _b_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _c_; - /*<>*/ return _d_; + : _b_; + /*<>*/ return _c_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_blit_key); @@ -4549,7 +4551,7 @@ : runtime.caml_call_gen(f, [a0, a1]); } var - _g_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Uchar = global_data.Stdlib__Uchar, @@ -4594,15 +4596,15 @@ function init(n, f){ /*<>*/ var /*<>*/ s = /*<>*/ caml_create_bytes(n), - /*<>*/ _ar_ = n - 1 | 0, - /*<>*/ _aq_ = 0; - if(_ar_ >= 0){ - var i = _aq_; + /*<>*/ _aq_ = n - 1 | 0, + /*<>*/ _ap_ = 0; + if(_aq_ >= 0){ + var i = _ap_; for(;;){ caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); - /*<>*/ /*<>*/ var _as_ = i + 1 | 0; - if(_ar_ === i) break; - var i = _as_; + /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; + if(_aq_ === i) break; + var i = _ar_; } } /*<>*/ return s; @@ -4644,11 +4646,11 @@ function symbol(a, b){ /*<>*/ var c = a + b | 0, - _ap_ = b < 0 ? 1 : 0, + _ao_ = b < 0 ? 1 : 0, match = c < 0 ? 1 : 0; a: { - if(a < 0){if(_ap_ && ! match) break a;} else if(! _ap_ && match) break a; + if(a < 0){if(_ao_ && ! match) break a;} else if(! _ao_ && match) break a; /*<>*/ return c; } /*<>*/ return /*<>*/ caml_call1 @@ -4711,32 +4713,32 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _an_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _am_ = 0; - if(_an_ >= 0){ - var i = _am_; + _am_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _al_ = 0; + if(_am_ >= 0){ + var i = _al_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; - if(_an_ === i) break; - var i = _ao_; + /*<>*/ /*<>*/ var _an_ = i + 1 | 0; + if(_am_ === i) break; + var i = _an_; } } return 0; /*<>*/ } function iteri(f, a){ /*<>*/ var - _ak_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _aj_ = 0; - if(_ak_ >= 0){ - var i = _aj_; + _aj_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _al_ = i + 1 | 0; - if(_ak_ === i) break; - var i = _al_; + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ === i) break; + var i = _ak_; } } return 0; @@ -4759,13 +4761,13 @@ param = tl; continue; } - var _ai_ = caml_ml_bytes_length(hd) + acc | 0; + var _ah_ = caml_ml_bytes_length(hd) + acc | 0; } else - var _ai_ = acc; + var _ah_ = acc; /*<>*/ var /*<>*/ dst = - /*<>*/ caml_create_bytes(_ai_), + /*<>*/ caml_create_bytes(_ah_), pos = pos$1, param$0 = l; for(;;){ @@ -4803,10 +4805,10 @@ /*<>*/ } function is_space(param){ /*<>*/ /*<>*/ var - _ah_ = param - 9 | 0; + _ag_ = param - 9 | 0; a: { - if(4 < _ah_ >>> 0){if(23 !== _ah_) break a;} else if(2 === _ah_) break a; + if(4 < _ag_ >>> 0){if(23 !== _ag_) break a;} else if(2 === _ag_) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -4830,10 +4832,10 @@ function unsafe_escape(s){ /*<>*/ var /*<>*/ n = [0, 0], - _aa_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i$0 = _$_; + _$_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ ___ = 0; + if(_$_ >= 0){ + var i$0 = ___; for(;;){ var match = caml_bytes_unsafe_get(s, i$0); a: @@ -4843,12 +4845,12 @@ c: { if(32 <= match){ - var _ae_ = match - 34 | 0; - if(58 < _ae_ >>> 0){ - if(93 <= _ae_) break c; + var _ad_ = match - 34 | 0; + if(58 < _ad_ >>> 0){ + if(93 <= _ad_) break c; } - else if(56 < _ae_ - 1 >>> 0) break b; - var _af_ = 1; + else if(56 < _ad_ - 1 >>> 0) break b; + var _ae_ = 1; break a; } if(11 <= match){ @@ -4856,15 +4858,15 @@ } else if(8 <= match) break b; } - var _af_ = 4; + var _ae_ = 4; break a; } - var _af_ = 2; + var _ae_ = 2; } - n[1] = n[1] + _af_ | 0; - /*<>*/ /*<>*/ var _ag_ = i$0 + 1 | 0; - if(_aa_ === i$0) break; - var i$0 = _ag_; + n[1] = n[1] + _ae_ | 0; + /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; + if(_$_ === i$0) break; + var i$0 = _af_; } } if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; @@ -4872,10 +4874,10 @@ s$0 = /*<>*/ caml_create_bytes(n[1]); n[1] = 0; /*<>*/ var - _ac_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ _ab_ = 0; - if(_ac_ >= 0){ - var i = _ab_; + _ab_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ _aa_ = 0; + if(_ab_ >= 0){ + var i = _aa_; for(;;){ var c = caml_bytes_unsafe_get(s, i); a: @@ -4933,9 +4935,9 @@ caml_bytes_unsafe_set(s$0, n[1], c); } n[1]++; - /*<>*/ /*<>*/ var _ad_ = i + 1 | 0; - if(_ac_ === i) break; - var i = _ad_; + /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; + if(_ab_ === i) break; + var i = _ac_; } } /*<>*/ return s$0; @@ -4950,18 +4952,18 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 0; - if(_Z_ >= 0){ - var i = _Y_; + /*<>*/ _Y_ = l - 1 | 0, + /*<>*/ _X_ = 0; + if(_Y_ >= 0){ + var i = _X_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ === i) break; - var i = ___; + /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; + if(_Y_ === i) break; + var i = _Z_; } } /*<>*/ return r; @@ -4972,18 +4974,18 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _W_ = l - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + /*<>*/ _V_ = l - 1 | 0, + /*<>*/ _U_ = 0; + if(_V_ >= 0){ + var i = _U_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ === i) break; - var i = _X_; + /*<>*/ /*<>*/ var _W_ = i + 1 | 0; + if(_V_ === i) break; + var i = _W_; } } /*<>*/ return r; @@ -4991,17 +4993,17 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _T_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _S_ = 0; - if(_T_ >= 0){ - var i = _S_; + _S_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _R_ = 0; + if(_S_ >= 0){ + var i = _R_; for(;;){ r[1] = /*<>*/ caml_call2 (f, r[1], caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ === i) break; - var i = _U_; + /*<>*/ /*<>*/ var _T_ = i + 1 | 0; + if(_S_ === i) break; + var i = _T_; } } return r[1]; @@ -5009,17 +5011,17 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _Q_ = + /*<>*/ _P_ = /*<>*/ caml_ml_bytes_length(a) - 1 | 0; - if(_Q_ >= 0){ - var i = _Q_; + if(_P_ >= 0){ + var i = _P_; for(;;){ r[1] = /*<>*/ caml_call2 (f, caml_bytes_unsafe_get(a, i), r[1]); - /*<>*/ /*<>*/ var _R_ = i - 1 | 0; + /*<>*/ /*<>*/ var _Q_ = i - 1 | 0; if(0 === i) break; - var i = _R_; + var i = _Q_; } } return r[1]; @@ -5074,8 +5076,8 @@ /*<>*/ var len_s = caml_ml_bytes_length(s), len_pre = caml_ml_bytes_length(prefix), - _P_ = len_pre <= len_s ? 1 : 0; - if(! _P_) return _P_; + _O_ = len_pre <= len_s ? 1 : 0; + if(! _O_) return _O_; var i = 0; /*<>*/ for(;;){ if(i === len_pre) /*<>*/ return 1; @@ -5091,8 +5093,8 @@ len_s = caml_ml_bytes_length(s), len_suf = caml_ml_bytes_length(suffix), diff = len_s - len_suf | 0, - _O_ = 0 <= diff ? 1 : 0; - if(! _O_) return _O_; + _N_ = 0 <= diff ? 1 : 0; + if(! _N_) return _N_; var i = 0; /*<>*/ for(;;){ if(i === len_suf) /*<>*/ return 1; @@ -5191,13 +5193,13 @@ if(0 <= i && l >= i) /*<>*/ try{ /*<>*/ index_rec(s, l, i, c); - /*<>*/ /*<>*/ var _M_ = 1; - /*<>*/ return _M_; + /*<>*/ /*<>*/ var _L_ = 1; + /*<>*/ return _L_; } - catch(_N_){ - var _L_ = caml_wrap_exception(_N_); - if(_L_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_L_, 0); + catch(_M_){ + var _K_ = caml_wrap_exception(_M_); + if(_K_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_K_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_contains_from_Bytes); @@ -5209,13 +5211,13 @@ /*<>*/ if(0 <= i && caml_ml_bytes_length(s) > i) /*<>*/ try{ /*<>*/ rindex_rec(s, i, c); - /*<>*/ /*<>*/ var _J_ = 1; - /*<>*/ return _J_; + /*<>*/ /*<>*/ var _I_ = 1; + /*<>*/ return _I_; } - catch(_K_){ - var _I_ = caml_wrap_exception(_K_); - if(_I_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_I_, 0); + catch(_J_){ + var _H_ = caml_wrap_exception(_J_); + if(_H_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_H_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_rcontains_from_Byte); @@ -5226,23 +5228,23 @@ /*<>*/ r = [0, 0], /*<>*/ j = [0, /*<>*/ caml_ml_bytes_length(s)], - /*<>*/ _E_ = + /*<>*/ _D_ = /*<>*/ caml_ml_bytes_length(s) - 1 | 0; - if(_E_ >= 0){ - var i = _E_; + if(_D_ >= 0){ + var i = _D_; for(;;){ if(caml_bytes_unsafe_get(s, i) === sep){ - var _G_ = r[1]; - r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _G_]; + var _F_ = r[1]; + r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _F_]; j[1] = i; } - /*<>*/ /*<>*/ var _H_ = i - 1 | 0; + /*<>*/ /*<>*/ var _G_ = i - 1 | 0; if(0 === i) break; - var i = _H_; + var i = _G_; } } - var _F_ = r[1]; - /*<>*/ return [0, sub(s, 0, j[1]), _F_]; + var _E_ = r[1]; + /*<>*/ return [0, sub(s, 0, j[1]), _E_]; /*<>*/ } function to_seq(s){ function aux(i, param){ @@ -5251,14 +5253,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _C_ = i + 1 | 0; + /*<>*/ _B_ = i + 1 | 0; /*<>*/ return [0, x, - function(_D_){ /*<>*/ return aux(_C_, _D_);}]; + function(_C_){ /*<>*/ return aux(_B_, _C_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _A_ = 0; - /*<>*/ return function(_B_){ - /*<>*/ return aux(_A_, _B_);}; + /*<>*/ /*<>*/ var _z_ = 0; + /*<>*/ return function(_A_){ + /*<>*/ return aux(_z_, _A_);}; /*<>*/ } function to_seqi(s){ function aux(i, param){ @@ -5267,20 +5269,20 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _y_ = i + 1 | 0; + /*<>*/ _x_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_z_){ /*<>*/ return aux(_y_, _z_);}]; + function(_y_){ /*<>*/ return aux(_x_, _y_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _w_ = 0; - /*<>*/ return function(_x_){ - /*<>*/ return aux(_w_, _x_);}; + /*<>*/ /*<>*/ var _v_ = 0; + /*<>*/ return function(_w_){ + /*<>*/ return aux(_v_, _w_);}; /*<>*/ } function of_seq(i){ /*<>*/ var /*<>*/ n = [0, 0], /*<>*/ buf = [0, make(256, 0)]; - function _v_(c){ + function _u_(c){ /*<>*/ if(n[1] === caml_ml_bytes_length(buf[1])){ /*<>*/ /*<>*/ var new_len = @@ -5302,7 +5304,7 @@ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Seq[4], _v_, i); + (Stdlib_Seq[4], _u_, i); return sub(buf[1], 0, n[1]); /*<>*/ } function unsafe_get_uint16_le(b, i){ @@ -5319,9 +5321,9 @@ /*<>*/ } function get_int8(b, i){ /*<>*/ var - /*<>*/ _t_ = Stdlib_Sys[10] - 8 | 0, - _u_ = Stdlib_Sys[10] - 8 | 0; - return /*<>*/ caml_bytes_get(b, i) << _u_ >> _t_; + /*<>*/ _s_ = Stdlib_Sys[10] - 8 | 0, + _t_ = Stdlib_Sys[10] - 8 | 0; + return /*<>*/ caml_bytes_get(b, i) << _t_ >> _s_; /*<>*/ } function get_uint16_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5337,21 +5339,21 @@ /*<>*/ } function get_int16_ne(b, i){ /*<>*/ var - /*<>*/ _r_ = Stdlib_Sys[10] - 16 | 0, - _s_ = Stdlib_Sys[10] - 16 | 0; - return /*<>*/ caml_bytes_get16(b, i) << _s_ >> _r_; + /*<>*/ _q_ = Stdlib_Sys[10] - 16 | 0, + _r_ = Stdlib_Sys[10] - 16 | 0; + return /*<>*/ caml_bytes_get16(b, i) << _r_ >> _q_; /*<>*/ } function get_int16_le(b, i){ /*<>*/ var - /*<>*/ _p_ = Stdlib_Sys[10] - 16 | 0, - _q_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_le(b, i) << _q_ >> _p_; + /*<>*/ _o_ = Stdlib_Sys[10] - 16 | 0, + _p_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_le(b, i) << _p_ >> _o_; /*<>*/ } function get_int16_be(b, i){ /*<>*/ var - /*<>*/ _n_ = Stdlib_Sys[10] - 16 | 0, - _o_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_be(b, i) << _o_ >> _n_; + /*<>*/ _m_ = Stdlib_Sys[10] - 16 | 0, + _n_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_be(b, i) << _n_ >> _m_; /*<>*/ } function get_int32_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5381,15 +5383,15 @@ /*<>*/ return Stdlib_Sys[11] ? ( /*<>*/ caml_bytes_set16 (b, i, caml_bswap16(x)), - _g_) - : ( /*<>*/ caml_bytes_set16(b, i, x), _g_); + sentinal) + : ( /*<>*/ caml_bytes_set16(b, i, x), sentinal); /*<>*/ } function unsafe_set_uint16_be(b, i, x){ /*<>*/ return Stdlib_Sys[11] - ? ( /*<>*/ caml_bytes_set16(b, i, x), _g_) + ? ( /*<>*/ caml_bytes_set16(b, i, x), sentinal) : ( /*<>*/ caml_bytes_set16 (b, i, caml_bswap16(x)), - _g_); + sentinal); /*<>*/ } function set_int16_le(b, i, x){ /*<>*/ return Stdlib_Sys[11] @@ -5431,9 +5433,9 @@ dec_invalid = Stdlib_Uchar[22]; function dec_ret(n, u){ /*<>*/ /*<>*/ var - _m_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); + _l_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Uchar[21], n, _m_); + (Stdlib_Uchar[21], n, _l_); /*<>*/ } function not_in_x80_to_xBF(b){ /*<>*/ return 2 !== (b >>> 6 | 0) ? 1 : 0; @@ -5446,9 +5448,9 @@ /*<>*/ } function not_in_x90_to_xBF(b){ /*<>*/ var - _k_ = b < 144 ? 1 : 0, - _l_ = _k_ || (191 < b ? 1 : 0); - return _l_; + _j_ = b < 144 ? 1 : 0, + _k_ = _j_ || (191 < b ? 1 : 0); + return _k_; /*<>*/ } function not_in_x80_to_x8F(b){ /*<>*/ return 8 !== (b >>> 4 | 0) ? 1 : 0; @@ -5645,9 +5647,9 @@ (dec_invalid, 1); /*<>*/ } function set_utf_8_uchar(b, i, u){ - /*<>*/ function set(_j_, _i_, _h_){ - /*<>*/ caml_bytes_unsafe_set(_j_, _i_, _h_); - return _g_; + /*<>*/ function set(_i_, _h_, _g_){ + /*<>*/ caml_bytes_unsafe_set(_i_, _h_, _g_); + return sentinal; } /*<>*/ var /*<>*/ max = @@ -6861,7 +6863,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } /*<>*/ var - _b_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Assert_failure = global_data.Assert_failure, @@ -6889,16 +6891,16 @@ /*<>*/ res = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, 0)), - /*<>*/ _at_ = l - 1 | 0, - /*<>*/ _as_ = 1; - if(_at_ >= 1){ - var i = _as_; + /*<>*/ _as_ = l - 1 | 0, + /*<>*/ _ar_ = 1; + if(_as_ >= 1){ + var i = _ar_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _au_ = i + 1 | 0; - if(_at_ === i) break; - var i = _au_; + /*<>*/ /*<>*/ var _at_ = i + 1 | 0; + if(_as_ === i) break; + var i = _at_; } } /*<>*/ return res; @@ -6907,15 +6909,15 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_make_vect(sx, [0]), - /*<>*/ _aq_ = sx - 1 | 0, - /*<>*/ _ap_ = 0; - if(_aq_ >= 0){ - var x = _ap_; + /*<>*/ _ap_ = sx - 1 | 0, + /*<>*/ _ao_ = 0; + if(_ap_ >= 0){ + var x = _ao_; for(;;){ res[1 + x] = /*<>*/ caml_make_vect(sy, init); - /*<>*/ /*<>*/ var _ar_ = x + 1 | 0; - if(_aq_ === x) break; - var x = _ar_; + /*<>*/ /*<>*/ var _aq_ = x + 1 | 0; + if(_ap_ === x) break; + var x = _aq_; } } /*<>*/ return res; @@ -6966,15 +6968,15 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _an_ = a.length - 1 - 1 | 0, - /*<>*/ _am_ = 0; - if(_an_ >= 0){ - var i = _am_; + _am_ = a.length - 1 - 1 | 0, + /*<>*/ _al_ = 0; + if(_am_ >= 0){ + var i = _al_; for(;;){ /*<>*/ /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; - if(_an_ === i) break; - var i = _ao_; + /*<>*/ /*<>*/ var _an_ = i + 1 | 0; + if(_am_ === i) break; + var i = _an_; } } return 0; @@ -6984,16 +6986,16 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_iter2_arrays_must_ha); /*<>*/ var - _ak_ = a.length - 1 - 1 | 0, - /*<>*/ _aj_ = 0; - if(_ak_ >= 0){ - var i = _aj_; + _aj_ = a.length - 1 - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _al_ = i + 1 | 0; - if(_ak_ === i) break; - var i = _al_; + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ === i) break; + var i = _ak_; } } return 0; @@ -7005,16 +7007,16 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _ah_ = l - 1 | 0, - /*<>*/ _ag_ = 1; - if(_ah_ >= 1){ - var i = _ag_; + /*<>*/ _ag_ = l - 1 | 0, + /*<>*/ _af_ = 1; + if(_ag_ >= 1){ + var i = _af_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ai_ = i + 1 | 0; - if(_ah_ === i) break; - var i = _ai_; + /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; + if(_ag_ === i) break; + var i = _ah_; } } /*<>*/ return r; @@ -7031,32 +7033,32 @@ /*<>*/ r = /*<>*/ caml_make_vect (la, /*<>*/ caml_call2(f, a[1], b[1])), - /*<>*/ _ae_ = la - 1 | 0, - /*<>*/ _ad_ = 1; - if(_ae_ >= 1){ - var i = _ad_; + /*<>*/ _ad_ = la - 1 | 0, + /*<>*/ _ac_ = 1; + if(_ad_ >= 1){ + var i = _ac_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _af_ = i + 1 | 0; - if(_ae_ === i) break; - var i = _af_; + /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; + if(_ad_ === i) break; + var i = _ae_; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ /*<>*/ var - _ab_ = a.length - 1 - 1 | 0, - /*<>*/ _aa_ = 0; - if(_ab_ >= 0){ - var i = _aa_; + _aa_ = a.length - 1 - 1 | 0, + /*<>*/ _$_ = 0; + if(_aa_ >= 0){ + var i = _$_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; - if(_ab_ === i) break; - var i = _ac_; + /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; + if(_aa_ === i) break; + var i = _ab_; } } return 0; @@ -7068,16 +7070,16 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call2(f, 0, a[1])), - /*<>*/ ___ = l - 1 | 0, - /*<>*/ _Z_ = 1; - if(___ >= 1){ - var i = _Z_; + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 1; + if(_Z_ >= 1){ + var i = _Y_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _$_ = i + 1 | 0; - if(___ === i) break; - var i = _$_; + /*<>*/ /*<>*/ var ___ = i + 1 | 0; + if(_Z_ === i) break; + var i = ___; } } /*<>*/ return r; @@ -7126,15 +7128,15 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _X_ = a.length - 1 - 1 | 0, - /*<>*/ _W_ = 0; - if(_X_ >= 0){ - var i = _W_; + _W_ = a.length - 1 - 1 | 0, + /*<>*/ _V_ = 0; + if(_W_ >= 0){ + var i = _V_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; - if(_X_ === i) break; - var i = _Y_; + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + if(_W_ === i) break; + var i = _X_; } } return r[1]; @@ -7151,10 +7153,10 @@ /*<>*/ output_array = /*<>*/ caml_make_vect(len, elt), /*<>*/ acc$1 = [0, acc$0], - /*<>*/ _U_ = len - 1 | 0, - /*<>*/ _T_ = 1; - if(_U_ >= 1){ - var i = _T_; + /*<>*/ _T_ = len - 1 | 0, + /*<>*/ _S_ = 1; + if(_T_ >= 1){ + var i = _S_; for(;;){ /*<>*/ var /*<>*/ match$0 = @@ -7163,9 +7165,9 @@ acc$2 = match$0[1]; acc$1[1] = acc$2; /*<>*/ output_array[1 + i] = elt$0; - /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ === i) break; - var i = _V_; + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ === i) break; + var i = _U_; } } /*<>*/ return [0, acc$1[1], output_array]; @@ -7173,14 +7175,14 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _R_ = a.length - 1 - 1 | 0; - if(_R_ >= 0){ - var i = _R_; + /*<>*/ _Q_ = a.length - 1 - 1 | 0; + if(_Q_ >= 0){ + var i = _Q_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _S_ = i - 1 | 0; + /*<>*/ /*<>*/ var _R_ = i - 1 | 0; if(0 === i) break; - var i = _S_; + var i = _R_; } } return r[1]; @@ -7300,17 +7302,17 @@ /*<>*/ caml_make_vect(n, a0), /*<>*/ b = /*<>*/ caml_make_vect(n, b0), - /*<>*/ _P_ = n - 1 | 0, - /*<>*/ _O_ = 1; - if(_P_ >= 1){ - var i = _O_; + /*<>*/ _O_ = n - 1 | 0, + /*<>*/ _N_ = 1; + if(_O_ >= 1){ + var i = _N_; for(;;){ var match$0 = x[1 + i], bi = match$0[2], ai = match$0[1]; /*<>*/ a[1 + i] = ai; /*<>*/ b[1 + i] = bi; - /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(_P_ === i) break; - var i = _Q_; + /*<>*/ /*<>*/ var _P_ = i + 1 | 0; + if(_O_ === i) break; + var i = _P_; } } /*<>*/ return [0, a, b]; @@ -7326,15 +7328,15 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), - /*<>*/ _M_ = na - 1 | 0, - /*<>*/ _L_ = 1; - if(_M_ >= 1){ - var i = _L_; + /*<>*/ _L_ = na - 1 | 0, + /*<>*/ _K_ = 1; + if(_L_ >= 1){ + var i = _K_; for(;;){ x[1 + i] = [0, a[1 + i], b[1 + i]]; - /*<>*/ /*<>*/ var _N_ = i + 1 | 0; - if(_M_ === i) break; - var i = _N_; + /*<>*/ /*<>*/ var _M_ = i + 1 | 0; + if(_L_ === i) break; + var i = _M_; } } /*<>*/ return x; @@ -7348,42 +7350,42 @@ /*<>*/ x = [0, i31]; if((i31 + 2 | 0) < l){ /*<>*/ var - /*<>*/ _E_ = i31 + 1 | 0, - /*<>*/ _F_ = caml_check_bound(a, _E_)[1 + _E_]; + /*<>*/ _D_ = i31 + 1 | 0, + /*<>*/ _E_ = caml_check_bound(a, _D_)[1 + _D_]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _F_) + (cmp, caml_check_bound(a, i31)[1 + i31], _E_) < 0) x[1] = i31 + 1 | 0; /*<>*/ var - /*<>*/ _G_ = i31 + 2 | 0, - /*<>*/ _H_ = caml_check_bound(a, _G_)[1 + _G_], - _I_ = x[1]; + /*<>*/ _F_ = i31 + 2 | 0, + /*<>*/ _G_ = caml_check_bound(a, _F_)[1 + _F_], + _H_ = x[1]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, _I_)[1 + _I_], _H_) + (cmp, caml_check_bound(a, _H_)[1 + _H_], _G_) < 0) x[1] = i31 + 2 | 0; return x[1]; } if((i31 + 1 | 0) < l){ /*<>*/ var - _J_ = i31 + 1 | 0, - /*<>*/ _K_ = caml_check_bound(a, _J_)[1 + _J_]; + _I_ = i31 + 1 | 0, + /*<>*/ _J_ = caml_check_bound(a, _I_)[1 + _I_]; /*<>*/ if (0 > /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _K_)) + (cmp, caml_check_bound(a, i31)[1 + i31], _J_)) /*<>*/ return i31 + 1 | 0; } if(i31 < l) /*<>*/ return i31; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _y_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_y_ >= 0){ - var i$6 = _y_; + var l = a.length - 1, _x_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_x_ >= 0){ + var i$6 = _x_; for(;;){ /*<>*/ /*<>*/ var e$1 = caml_check_bound(a, i$6)[1 + i$6]; @@ -7401,8 +7403,8 @@ break; } /*<>*/ /*<>*/ var - _v_ = caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _v_; + _u_ = caml_check_bound(a, j)[1 + j]; + /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; var i = j; } } @@ -7412,14 +7414,14 @@ var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } - /*<>*/ /*<>*/ var _D_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; if(0 === i$6) break; - var i$6 = _D_; + var i$6 = _C_; } } - /*<>*/ /*<>*/ var _z_ = l - 1 | 0; - if(_z_ >= 2){ - var i$4 = _z_; + /*<>*/ /*<>*/ var _y_ = l - 1 | 0; + if(_y_ >= 2){ + var i$4 = _y_; a: for(;;){ /*<>*/ /*<>*/ var @@ -7431,8 +7433,8 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ j$0 = maxson(i$4, i$1), - /*<>*/ _w_ = caml_check_bound(a, j$0)[1 + j$0]; - /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _w_; + /*<>*/ _v_ = caml_check_bound(a, j$0)[1 + j$0]; + /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _v_; var i$1 = j$0; } } @@ -7453,30 +7455,30 @@ /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; else{ /*<>*/ /*<>*/ var - _x_ = caml_check_bound(a, father)[1 + father]; - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _x_; + _w_ = caml_check_bound(a, father)[1 + father]; + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _w_; if(0 < father){var i$3 = father; continue;} /*<>*/ caml_check_bound(a, 0)[1] = e$0; } - /*<>*/ /*<>*/ var _C_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; if(2 === i$4) break a; - var i$4 = _C_; + var i$4 = _B_; break; } } } } - var _A_ = 1 < l ? 1 : 0; - if(_A_){ + var _z_ = 1 < l ? 1 : 0; + if(_z_){ /*<>*/ /*<>*/ var e = caml_check_bound(a, 1)[2]; /*<>*/ a[2] = caml_check_bound(a, 0)[1]; /*<>*/ a[1] = e; - var _B_ = 0; + var _A_ = 0; } else - var _B_ = _A_; - /*<>*/ return _B_; + var _A_ = _z_; + /*<>*/ return _A_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -7520,38 +7522,38 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _n_ = len - 1 | 0, - /*<>*/ _m_ = 0; - if(_n_ >= 0){ - var i = _m_; + _m_ = len - 1 | 0, + /*<>*/ _l_ = 0; + if(_m_ >= 0){ + var i = _l_; a: for(;;){ /*<>*/ var - _o_ = srcofs + i | 0, - /*<>*/ e = caml_check_bound(a, _o_)[1 + _o_], + _n_ = srcofs + i | 0, + /*<>*/ e = caml_check_bound(a, _n_)[1 + _n_], /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; for(;;){ if(dstofs <= j[1]){ - var _p_ = j[1]; + var _o_ = j[1]; /*<>*/ if (0 < /*<>*/ caml_call2 - (cmp, caml_check_bound(dst, _p_)[1 + _p_], e)){ + (cmp, caml_check_bound(dst, _o_)[1 + _o_], e)){ /*<>*/ var - _q_ = j[1], - /*<>*/ _r_ = caml_check_bound(dst, _q_)[1 + _q_], - _s_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = _r_; + _p_ = j[1], + /*<>*/ _q_ = caml_check_bound(dst, _p_)[1 + _p_], + _r_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _r_)[1 + _r_] = _q_; j[1] += -1; continue; } } - var _t_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _t_)[1 + _t_] = e; - /*<>*/ /*<>*/ var _u_ = i + 1 | 0; - if(_n_ === i) break a; - var i = _u_; + var _s_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; + /*<>*/ /*<>*/ var _t_ = i + 1 | 0; + if(_m_ === i) break a; + var i = _t_; break; } } @@ -7561,14 +7563,14 @@ function sortto(srcofs, dst, dstofs, len){ /*<>*/ if(len <= 5){ /*<>*/ isortto(srcofs, dst, dstofs, len); - /*<>*/ return _b_; + /*<>*/ return sentinal; } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); /*<>*/ merge (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ return _b_; + /*<>*/ return sentinal; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -7587,14 +7589,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _k_ = i + 1 | 0; + /*<>*/ _j_ = i + 1 | 0; /*<>*/ return [0, x, - function(_l_){ /*<>*/ return aux(_k_, _l_);}]; + function(_k_){ /*<>*/ return aux(_j_, _k_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _i_ = 0; - /*<>*/ return function(_j_){ - /*<>*/ return aux(_i_, _j_);}; + /*<>*/ /*<>*/ var _h_ = 0; + /*<>*/ return function(_i_){ + /*<>*/ return aux(_h_, _i_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -7602,22 +7604,22 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _g_ = i + 1 | 0; + /*<>*/ _f_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_h_){ /*<>*/ return aux(_g_, _h_);}]; + function(_g_){ /*<>*/ return aux(_f_, _g_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _e_ = 0; - /*<>*/ return function(_f_){ - /*<>*/ return aux(_e_, _f_);}; + /*<>*/ /*<>*/ var _d_ = 0; + /*<>*/ return function(_e_){ + /*<>*/ return aux(_d_, _e_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _c_ = 0; - function _d_(acc, x){ + /*<>*/ var _b_ = 0; + function _c_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ /*<>*/ var - l = /*<>*/ caml_call3(Stdlib_Seq[5], _d_, _c_, i$2); + l = /*<>*/ caml_call3(Stdlib_Seq[5], _c_, _b_, i$2); if(! l) /*<>*/ return [0]; /*<>*/ var tl = l[2], @@ -7716,7 +7718,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - _j_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Stdlib_List = global_data.Stdlib__List, @@ -7759,8 +7761,8 @@ pi = 3.141592653589793; function is_integer(x){ /*<>*/ var - _ar_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; - return _ar_ ? is_finite(x) : _ar_; + _aq_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; + return _aq_ ? is_finite(x) : _aq_; /*<>*/ } function succ(x){ /*<>*/ return /*<>*/ caml_nextafter_float @@ -7857,34 +7859,34 @@ (10, 100, 0, x); /*<>*/ } function unsafe_fill(a, ofs, len, v){ - /*<>*/ var _ap_ = (ofs + len | 0) - 1 | 0; - if(_ap_ >= ofs){ + /*<>*/ var _ao_ = (ofs + len | 0) - 1 | 0; + if(_ao_ >= ofs){ var i = ofs; for(;;){ /*<>*/ a[1 + i] = v; - /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; - if(_ap_ === i) break; - var i = _aq_; + /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; + if(_ao_ === i) break; + var i = _ap_; } } return 0; /*<>*/ } function check(a, ofs, len, msg){ - /*<>*/ var _al_ = ofs < 0 ? 1 : 0; - if(_al_) - var _am_ = _al_; + /*<>*/ var _ak_ = ofs < 0 ? 1 : 0; + if(_ak_) + var _al_ = _ak_; else{ - var _an_ = len < 0 ? 1 : 0; - if(_an_) - var _am_ = _an_; + var _am_ = len < 0 ? 1 : 0; + if(_am_) + var _al_ = _am_; else var - _ao_ = (ofs + len | 0) < 0 ? 1 : 0, - _am_ = _ao_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); + _an_ = (ofs + len | 0) < 0 ? 1 : 0, + _al_ = _an_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); } - return _am_ - ? ( /*<>*/ caml_call1(Stdlib[1], msg), _j_) - : _am_; + return _al_ + ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) + : _al_; /*<>*/ } function make(n, v){ /*<>*/ /*<>*/ var @@ -7899,16 +7901,16 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_floatarray_create(l), - /*<>*/ _aj_ = l - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + /*<>*/ _ai_ = l - 1 | 0, + /*<>*/ _ah_ = 0; + if(_ai_ >= 0){ + var i = _ah_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; + /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; + if(_ai_ === i) break; + var i = _aj_; } } /*<>*/ return res; @@ -7990,11 +7992,11 @@ (src, sofs, dst, dofs, len); /*<>*/ } function to_list(a){ - /*<>*/ function _ag_(_ah_){ - /*<>*/ return a[1 + _ah_]; + /*<>*/ function _af_(_ag_){ + /*<>*/ return a[1 + _ag_]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[10], a.length - 1, _ag_); + (Stdlib_List[10], a.length - 1, _af_); /*<>*/ } function of_list(l){ /*<>*/ var @@ -8015,16 +8017,16 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _ae_ = a.length - 1 - 1 | 0, - /*<>*/ _ad_ = 0; - if(_ae_ >= 0){ - var i = _ad_; + _ad_ = a.length - 1 - 1 | 0, + /*<>*/ _ac_ = 0; + if(_ad_ >= 0){ + var i = _ac_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); - /*<>*/ /*<>*/ var _af_ = i + 1 | 0; - if(_ae_ === i) break; - var i = _af_; + /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; + if(_ad_ === i) break; + var i = _ae_; } } return 0; @@ -8034,16 +8036,16 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_iter2_arrays_m); /*<>*/ var - _ab_ = a.length - 1 - 1 | 0, - /*<>*/ _aa_ = 0; - if(_ab_ >= 0){ - var i = _aa_; + _aa_ = a.length - 1 - 1 | 0, + /*<>*/ _$_ = 0; + if(_aa_ >= 0){ + var i = _$_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; - if(_ab_ === i) break; - var i = _ac_; + /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; + if(_aa_ === i) break; + var i = _ab_; } } return 0; @@ -8053,16 +8055,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ ___ = l - 1 | 0, - /*<>*/ _Z_ = 0; - if(___ >= 0){ - var i = _Z_; + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 0; + if(_Z_ >= 0){ + var i = _Y_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _$_ = i + 1 | 0; - if(___ === i) break; - var i = _$_; + /*<>*/ /*<>*/ var ___ = i + 1 | 0; + if(_Z_ === i) break; + var i = ___; } } /*<>*/ return r; @@ -8077,32 +8079,32 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_floatarray_create(la), - /*<>*/ _X_ = la - 1 | 0, - /*<>*/ _W_ = 0; - if(_X_ >= 0){ - var i = _W_; + /*<>*/ _W_ = la - 1 | 0, + /*<>*/ _V_ = 0; + if(_W_ >= 0){ + var i = _V_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; - if(_X_ === i) break; - var i = _Y_; + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + if(_W_ === i) break; + var i = _X_; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ /*<>*/ var - _U_ = a.length - 1 - 1 | 0, - /*<>*/ _T_ = 0; - if(_U_ >= 0){ - var i = _T_; + _T_ = a.length - 1 - 1 | 0, + /*<>*/ _S_ = 0; + if(_T_ >= 0){ + var i = _S_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ === i) break; - var i = _V_; + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ === i) break; + var i = _U_; } } return 0; @@ -8112,16 +8114,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _R_ = l - 1 | 0, - /*<>*/ _Q_ = 0; - if(_R_ >= 0){ - var i = _Q_; + /*<>*/ _Q_ = l - 1 | 0, + /*<>*/ _P_ = 0; + if(_Q_ >= 0){ + var i = _P_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _S_ = i + 1 | 0; - if(_R_ === i) break; - var i = _S_; + /*<>*/ /*<>*/ var _R_ = i + 1 | 0; + if(_Q_ === i) break; + var i = _R_; } } /*<>*/ return r; @@ -8129,15 +8131,15 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _O_ = a.length - 1 - 1 | 0, - /*<>*/ _N_ = 0; - if(_O_ >= 0){ - var i = _N_; + _N_ = a.length - 1 - 1 | 0, + /*<>*/ _M_ = 0; + if(_N_ >= 0){ + var i = _M_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ === i) break; - var i = _P_; + /*<>*/ /*<>*/ var _O_ = i + 1 | 0; + if(_N_ === i) break; + var i = _O_; } } return r[1]; @@ -8145,14 +8147,14 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _L_ = a.length - 1 - 1 | 0; - if(_L_ >= 0){ - var i = _L_; + /*<>*/ _K_ = a.length - 1 - 1 | 0; + if(_K_ >= 0){ + var i = _K_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _M_ = i - 1 | 0; + /*<>*/ /*<>*/ var _L_ = i - 1 | 0; if(0 === i) break; - var i = _M_; + var i = _L_; } } return r[1]; @@ -8240,9 +8242,9 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _F_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_F_ >= 0){ - var i$6 = _F_; + var l = a.length - 1, _E_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_E_ >= 0){ + var i$6 = _E_; for(;;){ /*<>*/ /*<>*/ var e$1 = /*<>*/ caml_array_get(a, i$6); @@ -8272,14 +8274,14 @@ /*<>*/ /*<>*/ caml_array_set (a, i$0, e$1); } - /*<>*/ /*<>*/ var _K_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; if(0 === i$6) break; - var i$6 = _K_; + var i$6 = _J_; } } - /*<>*/ /*<>*/ var _G_ = l - 1 | 0; - if(_G_ >= 2){ - var i$4 = _G_; + /*<>*/ /*<>*/ var _F_ = l - 1 | 0; + if(_F_ >= 2){ + var i$4 = _F_; a: for(;;){ /*<>*/ /*<>*/ var @@ -8320,25 +8322,25 @@ /*<>*/ /*<>*/ caml_array_set (a, 0, e$0); } - /*<>*/ /*<>*/ var _J_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; if(2 === i$4) break a; - var i$4 = _J_; + var i$4 = _I_; break; } } } } - var _H_ = 1 < l ? 1 : 0; - if(_H_){ + var _G_ = 1 < l ? 1 : 0; + if(_G_){ /*<>*/ /*<>*/ var e = /*<>*/ caml_array_get(a, 1); /*<>*/ /*<>*/ caml_array_set (a, 1, /*<>*/ caml_array_get(a, 0)); - var _I_ = /*<>*/ caml_array_set(a, 0, e); + var _H_ = /*<>*/ caml_array_set(a, 0, e); } else - var _I_ = _H_; - /*<>*/ return _I_; + var _H_ = _G_; + /*<>*/ return _H_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -8388,10 +8390,10 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _D_ = len - 1 | 0, - /*<>*/ _C_ = 0; - if(_D_ >= 0){ - var i = _C_; + _C_ = len - 1 | 0, + /*<>*/ _B_ = 0; + if(_C_ >= 0){ + var i = _B_; a: for(;;){ /*<>*/ var @@ -8415,9 +8417,9 @@ } /*<>*/ /*<>*/ caml_array_set (dst, j[1] + 1 | 0, e); - /*<>*/ /*<>*/ var _E_ = i + 1 | 0; - if(_D_ === i) break a; - var i = _E_; + /*<>*/ /*<>*/ var _D_ = i + 1 | 0; + if(_C_ === i) break a; + var i = _D_; break; } } @@ -8427,14 +8429,14 @@ function sortto(srcofs, dst, dstofs, len){ /*<>*/ if(len <= 5){ /*<>*/ isortto(srcofs, dst, dstofs, len); - /*<>*/ return _j_; + /*<>*/ return sentinal; } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); /*<>*/ merge (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ return _j_; + /*<>*/ return sentinal; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -8453,14 +8455,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _A_ = i + 1 | 0; + /*<>*/ _z_ = i + 1 | 0; /*<>*/ return [0, x, - function(_B_){ /*<>*/ return aux(_A_, _B_);}]; + function(_A_){ /*<>*/ return aux(_z_, _A_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _y_ = 0; - /*<>*/ return function(_z_){ - /*<>*/ return aux(_y_, _z_);}; + /*<>*/ /*<>*/ var _x_ = 0; + /*<>*/ return function(_y_){ + /*<>*/ return aux(_x_, _y_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -8468,23 +8470,23 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _w_ = i + 1 | 0; + /*<>*/ _v_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_x_){ /*<>*/ return aux(_w_, _x_);}]; + function(_w_){ /*<>*/ return aux(_v_, _w_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _u_ = 0; - /*<>*/ return function(_v_){ - /*<>*/ return aux(_u_, _v_);}; + /*<>*/ /*<>*/ var _t_ = 0; + /*<>*/ return function(_u_){ + /*<>*/ return aux(_t_, _u_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _s_ = 0; - function _t_(acc, x){ + /*<>*/ var _r_ = 0; + function _s_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ var /*<>*/ l = - /*<>*/ caml_call3(Stdlib_Seq[5], _t_, _s_, i$2), + /*<>*/ caml_call3(Stdlib_Seq[5], _s_, _r_, i$2), /*<>*/ len = /*<>*/ caml_call1(Stdlib_List[1], l), /*<>*/ a = @@ -8509,16 +8511,16 @@ /*<>*/ r = /*<>*/ runtime.caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _q_ = l - 1 | 0, - /*<>*/ _p_ = 1; - if(_q_ >= 1){ - var i = _p_; + /*<>*/ _p_ = l - 1 | 0, + /*<>*/ _o_ = 1; + if(_p_ >= 1){ + var i = _o_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _r_ = i + 1 | 0; - if(_q_ === i) break; - var i = _r_; + /*<>*/ /*<>*/ var _q_ = i + 1 | 0; + if(_p_ === i) break; + var i = _q_; } } /*<>*/ return r; @@ -8528,16 +8530,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _n_ = l - 1 | 0, - /*<>*/ _m_ = 0; - if(_n_ >= 0){ - var i = _m_; + /*<>*/ _m_ = l - 1 | 0, + /*<>*/ _l_ = 0; + if(_m_ >= 0){ + var i = _l_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _o_ = i + 1 | 0; - if(_n_ === i) break; - var i = _o_; + /*<>*/ /*<>*/ var _n_ = i + 1 | 0; + if(_m_ === i) break; + var i = _n_; } } /*<>*/ return r; @@ -8548,7 +8550,7 @@ _e_ = caml_array_get, _f_ = [0, - function(_l_){ /*<>*/ return _l_.length - 1;}, + function(_k_){ /*<>*/ return _k_.length - 1;}, _e_, _d_, make, @@ -8615,7 +8617,7 @@ min_max_num, hash, [0, - function(_k_){ /*<>*/ return _k_.length - 1;}, + function(_j_){ /*<>*/ return _j_.length - 1;}, _i_, _h_, make, @@ -9414,6 +9416,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } /*<>*/ var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Obj = global_data.Stdlib__Obj, Stdlib_Array = global_data.Stdlib__Array, @@ -9440,7 +9443,6 @@ 0, 0, 0], - _a_ = undefined, cst_syntax_error = "syntax error"; function grow_stacks(param){ /*<>*/ var @@ -9467,7 +9469,7 @@ (Stdlib_Array[8], env[4], 0, new_end, 0, oldsize); env[4] = new_end; env[5] = newsize; - return _a_; + return sentinal; /*<>*/ } function clear_parser(param){ /*<>*/ /*<>*/ caml_call4 @@ -9520,17 +9522,17 @@ case 4: try{ /*<>*/ var - _j_ = env[13], - /*<>*/ _k_ = + _i_ = env[13], + /*<>*/ _j_ = /*<>*/ caml_call1 - (caml_check_bound(tables[1], _j_)[1 + _j_], env), - /*<>*/ _l_ = 4, - value = _k_, - action = _l_; + (caml_check_bound(tables[1], _i_)[1 + _i_], env), + /*<>*/ _k_ = 4, + value = _j_, + action = _k_; } - catch(_n_){ - var _i_ = caml_wrap_exception(_n_); - if(_i_ !== Parse_error) throw caml_maybe_attach_backtrace(_i_, 0); + catch(_m_){ + var _h_ = caml_wrap_exception(_m_); + if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); var value = 0, action = 5; } var cmd = action, arg = value; @@ -9566,9 +9568,9 @@ ? 1 : 0; /*<>*/ /*<>*/ var - _m_ = /*<>*/ runtime.caml_obj_tag(tok); - /*<>*/ return caml_check_bound(tables[3], _m_) - [1 + _m_] + _l_ = /*<>*/ runtime.caml_obj_tag(tok); + /*<>*/ return caml_check_bound(tables[3], _l_) + [1 + _l_] === curr_char ? 1 : 0; @@ -9578,21 +9580,21 @@ } /*<>*/ } function peek_val(env, n){ - /*<>*/ var _h_ = env[11] - n | 0; - /*<>*/ return caml_check_bound(env[2], _h_)[1 + _h_]; + /*<>*/ var _g_ = env[11] - n | 0; + /*<>*/ return caml_check_bound(env[2], _g_)[1 + _g_]; /*<>*/ } function symbol_start_pos(param){ /*<>*/ var i$1 = env[12], i = i$1; /*<>*/ for(;;){ if(0 >= i){ - var _g_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _g_)[1 + _g_]; + var _f_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _f_)[1 + _f_]; } /*<>*/ var + _d_ = (env[11] - i | 0) + 1 | 0, + /*<>*/ st = caml_check_bound(env[3], _d_)[1 + _d_], _e_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ st = caml_check_bound(env[3], _e_)[1 + _e_], - _f_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ en = caml_check_bound(env[4], _f_)[1 + _f_]; + /*<>*/ en = caml_check_bound(env[4], _e_)[1 + _e_]; /*<>*/ if ( /*<>*/ runtime.caml_notequal(st, en)) /*<>*/ return st; @@ -9602,16 +9604,16 @@ } /*<>*/ } function symbol_end_pos(param){ - /*<>*/ var _d_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _d_)[1 + _d_]; + /*<>*/ var _c_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _c_)[1 + _c_]; /*<>*/ } function rhs_start_pos(n){ - /*<>*/ var _c_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[3], _c_)[1 + _c_]; + /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[3], _b_)[1 + _b_]; /*<>*/ } function rhs_end_pos(n){ - /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[4], _b_)[1 + _b_]; + /*<>*/ var _a_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[4], _a_)[1 + _a_]; /*<>*/ } function symbol_start(param){ /*<>*/ return symbol_start_pos(0)[4]; @@ -12006,6 +12008,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib_Sys = global_data.Stdlib__Sys, @@ -12013,7 +12016,6 @@ Stdlib = global_data.Stdlib, Stdlib_String = global_data.Stdlib__String, Assert_failure = global_data.Assert_failure, - _b_ = undefined, cst_Buffer_truncate = "Buffer.truncate", _a_ = [0, "buffer.ml", 220, 9], cst_Buffer_add_channel = "Buffer.add_channel", @@ -12102,7 +12104,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_Bytes[11], b[1][1], 0, new_buffer, 0, b[2]); b[1] = [0, new_buffer, new_len[1]]; - return _b_; + return sentinal; } new_len[1] = 2 * new_len[1] | 0; } @@ -12164,14 +12166,14 @@ } /*<>*/ } function add_substring(b, s, offset, len){ - /*<>*/ var _s_ = offset < 0 ? 1 : 0; - if(_s_) - var _t_ = _s_; + /*<>*/ var _r_ = offset < 0 ? 1 : 0; + if(_r_) + var _s_ = _r_; else var - _u_ = len < 0 ? 1 : 0, - _t_ = _u_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); - if(_t_) + _t_ = len < 0 ? 1 : 0, + _s_ = _t_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); + if(_s_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Buffer_add_substring_add_s); /*<>*/ var @@ -12226,9 +12228,9 @@ /*<>*/ } function add_channel(b, ic, to_read$1){ /*<>*/ var - _q_ = to_read$1 < 0 ? 1 : 0, - _r_ = _q_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); - if(_r_) + _p_ = to_read$1 < 0 ? 1 : 0, + _q_ = _p_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); + if(_q_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Buffer_add_channel); if(b[1][2] < (b[2] + to_read$1 | 0)) @@ -12274,8 +12276,8 @@ i$4 = 0; /*<>*/ for(;;){ if(i$4 >= lim$1){ - var _p_ = 92 === previous ? 1 : 0; - return _p_ ? add_char(b, previous) : _p_; + var _o_ = 92 === previous ? 1 : 0; + return _o_ ? add_char(b, previous) : _o_; } /*<>*/ /*<>*/ var previous$0 = /*<>*/ caml_string_get(s, i$4); @@ -12415,14 +12417,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _n_ = i + 1 | 0; + /*<>*/ _m_ = i + 1 | 0; /*<>*/ return [0, x, - function(_o_){ /*<>*/ return aux(_n_, _o_);}]; + function(_n_){ /*<>*/ return aux(_m_, _n_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _l_ = 0; - /*<>*/ return function(_m_){ - /*<>*/ return aux(_l_, _m_);}; + /*<>*/ /*<>*/ var _k_ = 0; + /*<>*/ return function(_l_){ + /*<>*/ return aux(_k_, _l_);}; /*<>*/ } function to_seqi(b){ function aux(i, param){ @@ -12431,21 +12433,21 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _j_ = i + 1 | 0; + /*<>*/ _i_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_k_){ /*<>*/ return aux(_j_, _k_);}]; + function(_j_){ /*<>*/ return aux(_i_, _j_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _h_ = 0; - /*<>*/ return function(_i_){ - /*<>*/ return aux(_h_, _i_);}; + /*<>*/ /*<>*/ var _g_ = 0; + /*<>*/ return function(_h_){ + /*<>*/ return aux(_g_, _h_);}; /*<>*/ } function add_seq(b, seq){ - /*<>*/ function _f_(_g_){ - /*<>*/ return add_char(b, _g_); + /*<>*/ function _e_(_f_){ + /*<>*/ return add_char(b, _f_); } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _f_, seq); + (Stdlib_Seq[4], _e_, seq); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var b = create(32); @@ -12524,8 +12526,8 @@ return 0; /*<>*/ } function add_int16_le(b, x){ - /*<>*/ var _e_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; - return add_int16_ne(b, _e_); + /*<>*/ var _d_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; + return add_int16_ne(b, _d_); /*<>*/ } function add_int16_be(b, x){ /*<>*/ var x$0 = Stdlib_Sys[11] ? x : caml_bswap16(x); @@ -12533,8 +12535,8 @@ /*<>*/ } function add_int32_le(b, x){ /*<>*/ var - _d_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; - /*<>*/ return add_int32_ne(b, _d_); + _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; + /*<>*/ return add_int32_ne(b, _c_); /*<>*/ } function add_int32_be(b, x){ /*<>*/ var @@ -12543,8 +12545,8 @@ /*<>*/ } function add_int64_le(b, x){ /*<>*/ var - _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; - /*<>*/ return add_int64_ne(b, _c_); + _b_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; + /*<>*/ return add_int64_ne(b, _b_); /*<>*/ } function add_int64_be(b, x){ /*<>*/ var @@ -12785,7 +12787,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - _a_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Mutex = global_data.Stdlib__Mutex, Stdlib_Condition = global_data.Stdlib__Condition, @@ -12805,7 +12807,7 @@ /*<>*/ /*<>*/ var st = /*<>*/ caml_make_vect(8, unique_value); /*<>*/ /*<>*/ caml_domain_dls_set(st); - /*<>*/ return _a_; + /*<>*/ return sentinal; /*<>*/ } /*<>*/ create_dls(0); /*<>*/ var @@ -12894,7 +12896,7 @@ /*<>*/ first_spawn_function = [0, function(param){ - /*<>*/ return _a_; + /*<>*/ return sentinal; /*<>*/ }]; function before_first_spawn(f){ /*<>*/ if @@ -12915,7 +12917,7 @@ at_exit_key = new_key (0, - function(param, _f_){ + function(param, _e_){ /*<>*/ return 0; /*<>*/ }); function at_exit(f){ @@ -12950,8 +12952,8 @@ /*<>*/ }; } /*<>*/ /*<>*/ var - _b_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); - function _c_(param){ + _a_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); + function _b_(param){ /*<>*/ var split = param[2], k = param[1], idx = k[1]; /*<>*/ return [0, idx, @@ -12959,7 +12961,7 @@ /*<>*/ } /*<>*/ var /*<>*/ pk = - /*<>*/ caml_call2(Stdlib_List[19], _c_, _b_), + /*<>*/ caml_call2(Stdlib_List[19], _b_, _a_), /*<>*/ term_mutex = /*<>*/ caml_call1(Stdlib_Mutex[1], 0), /*<>*/ term_condition = @@ -12971,7 +12973,7 @@ /*<>*/ try{ /*<>*/ create_dls(0); var - _d_ = + _c_ = function(param){ /*<>*/ var v = param[2], @@ -12981,7 +12983,7 @@ /*<>*/ return 0; /*<>*/ }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _d_, pk); + (Stdlib_List[17], _c_, pk); /*<>*/ /*<>*/ var res = /*<>*/ caml_call1(f, 0); } @@ -12998,8 +13000,8 @@ catch(ex){ /*<>*/ var ex$0 = caml_wrap_exception(ex), - /*<>*/ _e_ = 0 === result[0] ? [1, ex$0] : result, - result$0 = _e_; + /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, + result$0 = _d_; } /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], term_mutex); @@ -13130,7 +13132,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - _$_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$9 = "%{", cst$10 = "%}", @@ -13457,14 +13459,14 @@ /*<>*/ var str_ind = c >>> 3 | 0, mask = 1 << (c & 7), - /*<>*/ _dT_ = + /*<>*/ _dS_ = /*<>*/ runtime.caml_bytes_get (char_set, str_ind) | mask; /*<>*/ return /*<>*/ caml_bytes_set (char_set, str_ind, - /*<>*/ caml_call1(Stdlib[29], _dT_)); + /*<>*/ caml_call1(Stdlib[29], _dS_)); /*<>*/ } function freeze_char_set(char_set){ /*<>*/ return /*<>*/ caml_call1 @@ -13476,19 +13478,19 @@ i = 0; for(;;){ /*<>*/ /*<>*/ var - _dR_ = + _dQ_ = /*<>*/ caml_string_get(char_set, i) ^ 255; /*<>*/ /*<>*/ caml_bytes_set (char_set$0, i, - /*<>*/ caml_call1(Stdlib[29], _dR_)); + /*<>*/ caml_call1(Stdlib[29], _dQ_)); /*<>*/ /*<>*/ var - _dS_ = i + 1 | 0; + _dR_ = i + 1 | 0; if(31 === i) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], char_set$0); - var i = _dS_; + var i = _dR_; } /*<>*/ } function is_in_char_set(char_set, c){ @@ -13548,11 +13550,11 @@ case 6: var prec_opt = ign[2], pad_opt$5 = ign[1]; if(prec_opt) - var ndec = prec_opt[1], _dQ_ = [0, ndec]; + var ndec = prec_opt[1], _dP_ = [0, ndec]; else - var _dQ_ = 0; + var _dP_ = 0; /*<>*/ return [0, - [8, _a_, pad_of_pad_opt(pad_opt$5), _dQ_, fmt]]; + [8, _a_, pad_of_pad_opt(pad_opt$5), _dP_, fmt]]; case 7: var pad_opt$6 = ign[1]; /*<>*/ return [0, @@ -13597,14 +13599,14 @@ (Stdlib_Bytes[11], buf[2], 0, new_str, 0, len); buf[2] = new_str; } - return _$_; + return sentinal; /*<>*/ } function buffer_add_char(buf, c){ /*<>*/ buffer_check_size(buf, 1); /*<>*/ /*<>*/ caml_bytes_set (buf[2], buf[1], c); buf[1] = buf[1] + 1 | 0; - return _$_; + return sentinal; /*<>*/ } function buffer_add_string(buf, s){ /*<>*/ var @@ -13613,7 +13615,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_String[48], s, 0, buf[2], buf[1], str_len); buf[1] = buf[1] + str_len | 0; - return _$_; + return sentinal; /*<>*/ } function buffer_contents(buf){ /*<>*/ return caml_call3 @@ -13670,64 +13672,64 @@ /*<>*/ switch(padty){ case 0: /*<>*/ buffer_add_char(buf, 45); - /*<>*/ return _$_; + /*<>*/ return sentinal; case 1: - /*<>*/ return _$_; + /*<>*/ return sentinal; default: /*<>*/ buffer_add_char(buf, 48); - /*<>*/ return _$_; + /*<>*/ return sentinal; } /*<>*/ } function bprint_ignored_flag(buf, ign_flag){ /*<>*/ return ign_flag - ? (buffer_add_char(buf, 95), _$_) + ? (buffer_add_char(buf, 95), sentinal) : ign_flag; /*<>*/ } function bprint_pad_opt(buf, pad_opt){ /*<>*/ if(! pad_opt) - /*<>*/ return _$_; + /*<>*/ return sentinal; var width = pad_opt[1]; /*<>*/ buffer_add_string (buf, /*<>*/ caml_call1(Stdlib_Int[12], width)); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function bprint_padding(buf, pad){ /*<>*/ if(typeof pad === "number") - /*<>*/ return _$_; + /*<>*/ return sentinal; if(0 === pad[0]){ var n = pad[2], padty = pad[1]; /*<>*/ bprint_padty(buf, padty); /*<>*/ buffer_add_string (buf, /*<>*/ caml_call1(Stdlib_Int[12], n)); - /*<>*/ return _$_; + /*<>*/ return sentinal; } var padty$0 = pad[1]; /*<>*/ bprint_padty(buf, padty$0); /*<>*/ buffer_add_char(buf, 42); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function bprint_precision(buf, prec){ /*<>*/ if(typeof prec === "number") - return prec ? (buffer_add_string(buf, cst), _$_) : _$_; + return prec ? (buffer_add_string(buf, cst), sentinal) : sentinal; var n = prec[1]; /*<>*/ buffer_add_char(buf, 46); /*<>*/ buffer_add_string (buf, /*<>*/ caml_call1(Stdlib_Int[12], n)); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function bprint_iconv_flag(buf, iconv){ /*<>*/ switch(iconv){ case 1: case 4: /*<>*/ buffer_add_char(buf, 43); - /*<>*/ return _$_; + /*<>*/ return sentinal; case 2: case 5: /*<>*/ buffer_add_char(buf, 32); - /*<>*/ return _$_; + /*<>*/ return sentinal; case 7: case 9: case 11: @@ -13735,8 +13737,8 @@ case 14: case 15: /*<>*/ buffer_add_char(buf, 35); - /*<>*/ return _$_; - default: /*<>*/ return _$_; + /*<>*/ return sentinal; + default: /*<>*/ return sentinal; } /*<>*/ } function bprint_altint_fmt(buf, ign_flag, iconv, pad, prec, c){ @@ -13748,7 +13750,7 @@ /*<>*/ buffer_add_char(buf, c); /*<>*/ buffer_add_char (buf, char_of_iconv(iconv)); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function bprint_fconv_flag(buf, fconv){ /*<>*/ switch(fconv[1]){ @@ -13757,7 +13759,7 @@ /*<>*/ buffer_add_char(buf, 43); break; default: /*<>*/ buffer_add_char(buf, 32); } - return 8 <= fconv[2] ? (buffer_add_char(buf, 35), _$_) : _$_; + return 8 <= fconv[2] ? (buffer_add_char(buf, 35), sentinal) : sentinal; /*<>*/ } function string_of_formatting_lit(formatting_lit){ /*<>*/ if @@ -13787,40 +13789,40 @@ default: /*<>*/ var c = formatting_lit[1], - /*<>*/ _dP_ = + /*<>*/ _dO_ = /*<>*/ caml_call2 (Stdlib_String[1], 1, c); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _dP_); + (Stdlib[28], cst$7, _dO_); } /*<>*/ } function bprint_char_literal(buf, chr){ /*<>*/ return 37 === chr - ? (buffer_add_string(buf, cst$8), _$_) - : (buffer_add_char(buf, chr), _$_); + ? (buffer_add_string(buf, cst$8), sentinal) + : (buffer_add_char(buf, chr), sentinal); /*<>*/ } function bprint_string_literal(buf, str){ /*<>*/ var - _dN_ = caml_ml_string_length(str) - 1 | 0, - /*<>*/ _dM_ = 0; - if(_dN_ >= 0){ - var i = _dM_; + _dM_ = caml_ml_string_length(str) - 1 | 0, + /*<>*/ _dL_ = 0; + if(_dM_ >= 0){ + var i = _dL_; for(;;){ /*<>*/ bprint_char_literal (buf, /*<>*/ caml_string_get(str, i)); /*<>*/ /*<>*/ var - _dO_ = i + 1 | 0; - if(_dN_ === i) break; - var i = _dO_; + _dN_ = i + 1 | 0; + if(_dM_ === i) break; + var i = _dN_; } } - return _$_; + return sentinal; /*<>*/ } function bprint_fmtty(buf, fmtty){ /*<>*/ var fmtty$0 = fmtty; /*<>*/ for(;;){ if(typeof fmtty$0 === "number") - /*<>*/ return _$_; + /*<>*/ return sentinal; switch(fmtty$0[0]){ case 0: var fmtty$1 = fmtty$0[1]; @@ -13918,7 +13920,7 @@ ign_flag$0 = ign_flag; /*<>*/ for(;;){ if(typeof fmt$0 === "number") - /*<>*/ return _$_; + /*<>*/ return sentinal; switch(fmt$0[0]){ case 0: var rest = fmt$0[1]; @@ -14122,11 +14124,17 @@ /*<>*/ caml_call1 (Stdlib[29], i); return 37 === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37), _$_) + ? (buffer_add_char + (buf, 37), + buffer_add_char(buf, 37), + sentinal) : 64 === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64), _$_) - : (buffer_add_char(buf, c), _$_); + ? (buffer_add_char + (buf, 37), + buffer_add_char(buf, 64), + sentinal) + : (buffer_add_char(buf, c), sentinal); /*<>*/ }; /*<>*/ buffer_add_char(buf, 91); /*<>*/ var @@ -14144,18 +14152,18 @@ /*<>*/ before = /*<>*/ caml_call1 (Stdlib_Char[1], c - 1 | 0), - /*<>*/ _dI_ = + /*<>*/ _dH_ = is_in_char_set(set, c); - /*<>*/ if(_dI_) + /*<>*/ if(_dH_) /*<>*/ var - /*<>*/ _dJ_ = + /*<>*/ _dI_ = is_in_char_set(set, before), - /*<>*/ _dK_ = - _dJ_ ? is_in_char_set(set, after) : _dJ_, - _dL_ = 1 - _dK_; + /*<>*/ _dJ_ = + _dI_ ? is_in_char_set(set, after) : _dI_, + _dK_ = 1 - _dJ_; else - var _dL_ = _dI_; - /*<>*/ return _dL_; + var _dK_ = _dH_; + /*<>*/ return _dK_; /*<>*/ } return is_alone; }, @@ -14289,12 +14297,12 @@ (buf, ign_flag$0); switch(counter){ case 0: - var _dE_ = 108; break; + var _dD_ = 108; break; case 1: - var _dE_ = 110; break; - default: var _dE_ = 78; + var _dD_ = 110; break; + default: var _dD_ = 78; } - /*<>*/ buffer_add_char(buf, _dE_); + /*<>*/ buffer_add_char(buf, _dD_); var fmt$0 = rest$20, ign_flag$0 = 0; break; case 22: @@ -14318,20 +14326,20 @@ /*<>*/ var rest$23 = fmt$0[3], arity = fmt$0[1], - /*<>*/ _dG_ = + /*<>*/ _dF_ = int_of_custom_arity(arity), - _dF_ = 1; - if(_dG_ >= 1){ - var i$8 = _dF_; + _dE_ = 1; + if(_dF_ >= 1){ + var i$8 = _dE_; for(;;){ /*<>*/ buffer_add_char(buf, 37); /*<>*/ bprint_ignored_flag (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 63); /*<>*/ /*<>*/ var - _dH_ = i$8 + 1 | 0; - if(_dG_ === i$8) break; - var i$8 = _dH_; + _dG_ = i$8 + 1 | 0; + if(_dF_ === i$8) break; + var i$8 = _dG_; } } var fmt$0 = rest$23, ign_flag$0 = 0; @@ -14403,17 +14411,17 @@ ed = match[3], af = match[2], fa = match[1], - _dj_ = + _di_ = function(param){ /*<>*/ af(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dj_, + _di_, ed, de]; case 1: @@ -14424,17 +14432,17 @@ ed$0 = match$0[3], af$0 = match$0[2], fa$0 = match$0[1], - _dk_ = + _dj_ = function(param){ /*<>*/ af$0(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$0(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dk_, + _dj_, ed$0, de$0]; case 2: @@ -14445,17 +14453,17 @@ ed$1 = match$1[3], af$1 = match$1[2], fa$1 = match$1[1], - _dl_ = + _dk_ = function(param){ /*<>*/ af$1(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$1(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dl_, + _dk_, ed$1, de$1]; case 3: @@ -14466,17 +14474,17 @@ ed$2 = match$2[3], af$2 = match$2[2], fa$2 = match$2[1], - _dm_ = + _dl_ = function(param){ /*<>*/ af$2(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$2(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dm_, + _dl_, ed$2, de$2]; case 4: @@ -14487,17 +14495,17 @@ ed$3 = match$3[3], af$3 = match$3[2], fa$3 = match$3[1], - _dn_ = + _dm_ = function(param){ /*<>*/ af$3(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$3(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dn_, + _dm_, ed$3, de$3]; case 5: @@ -14508,17 +14516,17 @@ ed$4 = match$4[3], af$4 = match$4[2], fa$4 = match$4[1], - _do_ = + _dn_ = function(param){ /*<>*/ af$4(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$4(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _do_, + _dn_, ed$4, de$4]; case 6: @@ -14529,17 +14537,17 @@ ed$5 = match$5[3], af$5 = match$5[2], fa$5 = match$5[1], - _dp_ = + _do_ = function(param){ /*<>*/ af$5(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$5(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dp_, + _do_, ed$5, de$5]; case 7: @@ -14550,17 +14558,17 @@ ed$6 = match$6[3], af$6 = match$6[2], fa$6 = match$6[1], - _dq_ = + _dp_ = function(param){ /*<>*/ af$6(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$6(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dq_, + _dp_, ed$6, de$6]; case 8: @@ -14571,17 +14579,17 @@ ed$7 = match$7[3], af$7 = match$7[2], fa$7 = match$7[1], - _dr_ = + _dq_ = function(param){ /*<>*/ af$7(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$7(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dr_, + _dq_, ed$7, de$7]; case 9: @@ -14600,33 +14608,33 @@ dj = match$9[3], ga = match$9[2], ag = match$9[1], - _ds_ = + _dr_ = function(param){ /*<>*/ jd(0); /*<>*/ de$8(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dt_ = + _ds_ = function(param){ /*<>*/ ed$8(0); /*<>*/ dj(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _du_ = + _dt_ = function(param){ /*<>*/ ga(0); /*<>*/ af$8(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$8(0); /*<>*/ ag(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _du_, _dt_, - _ds_]; + _ds_, + _dr_]; case 10: /*<>*/ var rest$9 = param[1], @@ -14636,17 +14644,17 @@ ed$9 = match$10[3], af$9 = match$10[2], fa$9 = match$10[1], - _dv_ = + _du_ = function(param){ /*<>*/ af$9(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$9(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dv_, + _du_, ed$9, de$9]; case 11: @@ -14658,17 +14666,17 @@ ed$10 = match$11[3], af$10 = match$11[2], fa$10 = match$11[1], - _dw_ = + _dv_ = function(param){ /*<>*/ af$10(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$10(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dw_, + _dv_, ed$10, de$10]; case 12: @@ -14680,17 +14688,17 @@ ed$11 = match$12[3], af$11 = match$12[2], fa$11 = match$12[1], - _dx_ = + _dw_ = function(param){ /*<>*/ af$11(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$11(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dx_, + _dw_, ed$11, de$11]; case 13: @@ -14702,29 +14710,29 @@ ed$12 = match$13[3], af$12 = match$13[2], fa$12 = match$13[1], - /*<>*/ _dy_ = + /*<>*/ _dx_ = function(param){ /*<>*/ de$12(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dz_ = + _dy_ = function(param){ /*<>*/ ed$12(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dA_ = + _dz_ = function(param){ /*<>*/ af$12(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$12(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dA_, _dz_, - _dy_]; + _dy_, + _dx_]; default: /*<>*/ var rest$13 = param[1], @@ -14734,46 +14742,46 @@ ed$13 = match$14[3], af$13 = match$14[2], fa$13 = match$14[1], - /*<>*/ _dB_ = + /*<>*/ _dA_ = function(param){ /*<>*/ de$13(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dC_ = + _dB_ = function(param){ /*<>*/ ed$13(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dD_ = + _dC_ = function(param){ /*<>*/ af$13(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$13(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dD_, _dC_, - _dB_]; + _dB_, + _dA_]; } - /*<>*/ function _dg_(param){ - /*<>*/ return _$_; + /*<>*/ function _df_(param){ + /*<>*/ return sentinal; /*<>*/ } - function _dh_(param){ - /*<>*/ return _$_; + function _dg_(param){ + /*<>*/ return sentinal; /*<>*/ } - function _di_(param){ - /*<>*/ return _$_; + function _dh_(param){ + /*<>*/ return sentinal; /*<>*/ } /*<>*/ return [0, function(param){ - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _di_, _dh_, - _dg_]; + _dg_, + _df_]; /*<>*/ } function trans(ty1, ty2){ /*<>*/ a: @@ -14992,11 +15000,11 @@ /*<>*/ var rest2$7 = ty2[2], ty2$0 = ty2[1], - /*<>*/ _df_ = + /*<>*/ _de_ = trans(rest1$7, rest2$7); /*<>*/ return [8, trans(ty1$0, ty2$0), - _df_]; + _de_]; case 10: break a; case 11: @@ -15286,13 +15294,13 @@ /*<>*/ var rest$13 = fmtty$0[2], formatting_gen = fmtty$0[1], - /*<>*/ _dc_ = fmtty_of_fmt(rest$13); + /*<>*/ _db_ = fmtty_of_fmt(rest$13); if(0 === formatting_gen[0]) - var fmt = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt); + var fmt = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt); else - var fmt$0 = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt$0); + var fmt$0 = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt$0); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], _dd_, _dc_); + (CamlinternalFormatBasics[1], _dc_, _db_); case 19: var rest$14 = fmtty$0[1]; /*<>*/ return [13, @@ -15345,10 +15353,10 @@ case 9: /*<>*/ var fmtty$6 = ign[2], - /*<>*/ _de_ = + /*<>*/ _dd_ = fmtty_of_fmt(fmtty$5); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], fmtty$6, _de_); + (CamlinternalFormatBasics[1], fmtty$6, _dd_); case 10: var fmtty$0 = fmtty$5; break; default: var fmtty$0 = fmtty$5; @@ -15404,11 +15412,11 @@ /*<>*/ } function type_format(fmt, fmtty){ /*<>*/ /*<>*/ var - _db_ = type_format_gen(fmt, fmtty); - if(typeof _db_[2] !== "number") + _da_ = type_format_gen(fmt, fmtty); + if(typeof _da_[2] !== "number") /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); - var fmt$0 = _db_[1]; + var fmt$0 = _da_[1]; /*<>*/ return fmt$0; /*<>*/ } function type_ignored_param_one(ign, fmt, fmtty){ @@ -15693,7 +15701,7 @@ fmt_rest$13 = fmt[3], sub_fmtty$1 = fmt[2], pad_opt$0 = fmt[1], - /*<>*/ _c$_ = + /*<>*/ _c__ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty1)]; @@ -15702,7 +15710,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty$1)], - _c$_)) + _c__)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -15872,12 +15880,12 @@ /*<>*/ var sub_fmtty$3 = ign[2], pad_opt$2 = ign[1], - /*<>*/ _da_ = + /*<>*/ _c$_ = type_ignored_format_substituti(sub_fmtty$3, rest, fmtty0), - match$43 = _da_[2], + match$43 = _c$_[2], fmtty$21 = match$43[2], fmt$22 = match$43[1], - sub_fmtty$4 = _da_[1]; + sub_fmtty$4 = _c$_[1]; /*<>*/ return [0, [23, [9, pad_opt$2, sub_fmtty$4], fmt$22], fmtty$21]; @@ -16069,7 +16077,7 @@ sub_fmtty_rest$17 = sub_fmtty[3], sub2_fmtty$2 = sub_fmtty[2], sub1_fmtty$0 = sub_fmtty[1], - /*<>*/ _c9_ = + /*<>*/ _c8_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty)]; @@ -16078,11 +16086,11 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty$0)], - _c9_)) + _c8_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ /*<>*/ var - _c__ = + _c9_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$1)]; @@ -16091,7 +16099,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$2)], - _c__)) + _c9_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -16183,11 +16191,11 @@ /*<>*/ } function recast(fmt, fmtty){ /*<>*/ /*<>*/ var - _c8_ = symm(fmtty); + _c7_ = symm(fmtty); /*<>*/ return type_format (fmt, /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _c8_)); + (CamlinternalFormatBasics[2], _c7_)); /*<>*/ } function fix_padding(padty, width, str){ /*<>*/ var @@ -16197,10 +16205,10 @@ /*<>*/ caml_call1(Stdlib[18], width); if(width$0 <= len) /*<>*/ return str; /*<>*/ var - _c7_ = 2 === padty$0 ? 48 : 32, + _c6_ = 2 === padty$0 ? 48 : 32, /*<>*/ res = /*<>*/ caml_call2 - (Stdlib_Bytes[1], width$0, _c7_); + (Stdlib_Bytes[1], width$0, _c6_); /*<>*/ switch(padty$0){ case 0: /*<>*/ /*<>*/ caml_call5 @@ -16392,16 +16400,16 @@ /*<>*/ return s; /*<>*/ var /*<>*/ n = [0, 0], - _c2_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c1_ = 0; - if(_c2_ >= 0){ - var i$0 = _c1_; + _c1_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c0_ = 0; + if(_c1_ >= 0){ + var i$0 = _c0_; for(;;){ if(9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) n[1]++; /*<>*/ /*<>*/ var - _c6_ = i$0 + 1 | 0; - if(_c2_ === i$0) break; - var i$0 = _c6_; + _c5_ = i$0 + 1 | 0; + if(_c1_ === i$0) break; + var i$0 = _c5_; } } /*<>*/ var @@ -16414,15 +16422,15 @@ /*<>*/ /*<>*/ caml_bytes_set (buf, pos[1], c); pos[1]++; - return _$_; + return sentinal; /*<>*/ } /*<>*/ var /*<>*/ left = [0, ((digits - 1 | 0) % 3 | 0) + 1 | 0], - _c4_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c3_ = 0; - if(_c4_ >= 0){ - var i = _c3_; + _c3_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c2_ = 0; + if(_c3_ >= 0){ + var i = _c2_; for(;;){ var c = caml_string_unsafe_get(s, i); if(9 < c - 48 >>> 0) @@ -16436,9 +16444,9 @@ /*<>*/ put(c); } /*<>*/ /*<>*/ var - _c5_ = i + 1 | 0; - if(_c4_ === i) break; - var i = _c5_; + _c4_ = i + 1 | 0; + if(_c3_ === i) break; + var i = _c4_; } } /*<>*/ return /*<>*/ caml_call1 @@ -16447,139 +16455,139 @@ function convert_int(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _c0_ = cst_d$0; break; + var _cZ_ = cst_d$0; break; case 2: - var _c0_ = cst_d$1; break; + var _cZ_ = cst_d$1; break; case 4: - var _c0_ = cst_i$1; break; + var _cZ_ = cst_i$1; break; case 5: - var _c0_ = cst_i$2; break; + var _cZ_ = cst_i$2; break; case 6: - var _c0_ = cst_x; break; + var _cZ_ = cst_x; break; case 7: - var _c0_ = cst_x$0; break; + var _cZ_ = cst_x$0; break; case 8: - var _c0_ = cst_X; break; + var _cZ_ = cst_X; break; case 9: - var _c0_ = cst_X$0; break; + var _cZ_ = cst_X$0; break; case 10: - var _c0_ = cst_o; break; + var _cZ_ = cst_o; break; case 11: - var _c0_ = cst_o$0; break; + var _cZ_ = cst_o$0; break; case 0: case 13: - var _c0_ = cst_d; break; + var _cZ_ = cst_d; break; case 3: case 14: - var _c0_ = cst_i$0; break; - default: var _c0_ = cst_u; + var _cZ_ = cst_i$0; break; + default: var _cZ_ = cst_u; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_c0_, n)); + /*<>*/ caml_format_int(_cZ_, n)); /*<>*/ } function convert_int32(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cZ_ = cst_ld$0; break; + var _cY_ = cst_ld$0; break; case 2: - var _cZ_ = cst_ld$1; break; + var _cY_ = cst_ld$1; break; case 4: - var _cZ_ = cst_li$1; break; + var _cY_ = cst_li$1; break; case 5: - var _cZ_ = cst_li$2; break; + var _cY_ = cst_li$2; break; case 6: - var _cZ_ = cst_lx; break; + var _cY_ = cst_lx; break; case 7: - var _cZ_ = cst_lx$0; break; + var _cY_ = cst_lx$0; break; case 8: - var _cZ_ = cst_lX; break; + var _cY_ = cst_lX; break; case 9: - var _cZ_ = cst_lX$0; break; + var _cY_ = cst_lX$0; break; case 10: - var _cZ_ = cst_lo; break; + var _cY_ = cst_lo; break; case 11: - var _cZ_ = cst_lo$0; break; + var _cY_ = cst_lo$0; break; case 0: case 13: - var _cZ_ = cst_ld; break; + var _cY_ = cst_ld; break; case 3: case 14: - var _cZ_ = cst_li$0; break; - default: var _cZ_ = cst_lu; + var _cY_ = cst_li$0; break; + default: var _cY_ = cst_lu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cZ_, n)); + /*<>*/ caml_format_int(_cY_, n)); /*<>*/ } function convert_nativeint(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cY_ = cst_nd$0; break; + var _cX_ = cst_nd$0; break; case 2: - var _cY_ = cst_nd$1; break; + var _cX_ = cst_nd$1; break; case 4: - var _cY_ = cst_ni$1; break; + var _cX_ = cst_ni$1; break; case 5: - var _cY_ = cst_ni$2; break; + var _cX_ = cst_ni$2; break; case 6: - var _cY_ = cst_nx; break; + var _cX_ = cst_nx; break; case 7: - var _cY_ = cst_nx$0; break; + var _cX_ = cst_nx$0; break; case 8: - var _cY_ = cst_nX; break; + var _cX_ = cst_nX; break; case 9: - var _cY_ = cst_nX$0; break; + var _cX_ = cst_nX$0; break; case 10: - var _cY_ = cst_no; break; + var _cX_ = cst_no; break; case 11: - var _cY_ = cst_no$0; break; + var _cX_ = cst_no$0; break; case 0: case 13: - var _cY_ = cst_nd; break; + var _cX_ = cst_nd; break; case 3: case 14: - var _cY_ = cst_ni$0; break; - default: var _cY_ = cst_nu; + var _cX_ = cst_ni$0; break; + default: var _cX_ = cst_nu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cY_, n)); + /*<>*/ caml_format_int(_cX_, n)); /*<>*/ } function convert_int64(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cX_ = cst_Ld$0; break; + var _cW_ = cst_Ld$0; break; case 2: - var _cX_ = cst_Ld$1; break; + var _cW_ = cst_Ld$1; break; case 4: - var _cX_ = cst_Li$1; break; + var _cW_ = cst_Li$1; break; case 5: - var _cX_ = cst_Li$2; break; + var _cW_ = cst_Li$2; break; case 6: - var _cX_ = cst_Lx; break; + var _cW_ = cst_Lx; break; case 7: - var _cX_ = cst_Lx$0; break; + var _cW_ = cst_Lx$0; break; case 8: - var _cX_ = cst_LX; break; + var _cW_ = cst_LX; break; case 9: - var _cX_ = cst_LX$0; break; + var _cW_ = cst_LX$0; break; case 10: - var _cX_ = cst_Lo; break; + var _cW_ = cst_Lo; break; case 11: - var _cX_ = cst_Lo$0; break; + var _cW_ = cst_Lo$0; break; case 0: case 13: - var _cX_ = cst_Ld; break; + var _cW_ = cst_Ld; break; case 3: case 14: - var _cX_ = cst_Li$0; break; - default: var _cX_ = cst_Lu; + var _cW_ = cst_Li$0; break; + default: var _cW_ = cst_Lu; } /*<>*/ return transform_int_alt (iconv, /*<>*/ runtime.caml_int64_format - (_cX_, n)); + (_cW_, n)); /*<>*/ } function convert_float(fconv, prec, x){ function hex(param){ @@ -16611,41 +16619,41 @@ i = 0; /*<>*/ for(;;){ if(i === len) - var _cU_ = 0; + var _cT_ = 0; else{ /*<>*/ /*<>*/ var - _cT_ = + _cS_ = /*<>*/ caml_string_get(str, i) - 46 | 0; a: { - if(23 < _cT_ >>> 0){ - if(55 === _cT_) break a; + if(23 < _cS_ >>> 0){ + if(55 === _cS_) break a; } - else if(21 < _cT_ - 1 >>> 0) break a; + else if(21 < _cS_ - 1 >>> 0) break a; /*<>*/ var /*<>*/ i$0 = i + 1 | 0, i = i$0; continue; } - var _cU_ = 1; + var _cT_ = 1; } /*<>*/ /*<>*/ var - _cV_ = - _cU_ + _cU_ = + _cT_ ? str : /*<>*/ caml_call2 (Stdlib[28], str, cst$17); - /*<>*/ return caml_special_val(_cV_); + /*<>*/ return caml_special_val(_cU_); } case 6: /*<>*/ return hex(0); case 7: /*<>*/ /*<>*/ var - _cW_ = hex(0); + _cV_ = hex(0); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_String[25], _cW_); + (Stdlib_String[25], _cV_); case 8: /*<>*/ return caml_special_val(hex(0)); default: @@ -17030,12 +17038,12 @@ /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _cS_ = recast(fmt, fmtty); + /*<>*/ _cR_ = recast(fmt, fmtty); /*<>*/ return make_printf (k$0, acc$0, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _cS_, rest$13)); /*<>*/ }; + (CamlinternalFormatBasics[3], _cR_, rest$13)); /*<>*/ }; case 15: var rest$14 = fmt$0[1]; /*<>*/ return function(f, x){ @@ -17062,11 +17070,11 @@ fmt$0 = rest$16; break; case 18: - var _cQ_ = fmt$0[1]; - if(0 === _cQ_[0]) + var _cP_ = fmt$0[1]; + if(0 === _cP_[0]) var rest$17 = fmt$0[2], - fmt$1 = _cQ_[1][1], + fmt$1 = _cP_[1][1], k$3 = function(acc, k, rest){ function k$0(kacc){ @@ -17082,7 +17090,7 @@ else var rest$18 = fmt$0[2], - fmt$2 = _cQ_[1][1], + fmt$2 = _cP_[1][1], k$4 = function(acc, k, rest){ function k$0(kacc){ @@ -17138,14 +17146,14 @@ rest$23 = fmt$0[3], f = fmt$0[2], arity = fmt$0[1], - /*<>*/ _cR_ = + /*<>*/ _cQ_ = /*<>*/ caml_call1(f, 0); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cR_]); + (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cQ_]); var counter$0 = counter + 1 | 0; /*<>*/ return make_custom$0 - (counter$0, k$0, acc$0, rest$23, arity, _cR_); + (counter$0, k$0, acc$0, rest$23, arity, _cQ_); } } /*<>*/ } @@ -17328,7 +17336,7 @@ fmt); /*<>*/ }; case 10: var rest$9 = fmtty[1]; - /*<>*/ return function(param, _cP_){ + /*<>*/ return function(param, _cO_){ /*<>*/ return make_from_fmtty (k, acc, rest$9, fmt); /*<>*/ }; case 11: @@ -17357,13 +17365,13 @@ /*<>*/ } function make_invalid_arg(counter, k, acc, fmt){ /*<>*/ /*<>*/ var - _cO_ = [8, acc, cst_Printf_bad_conversion$0]; + _cN_ = [8, acc, cst_Printf_bad_conversion$0]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cO_, fmt]); + (make_printf$0, [0, k, _cN_, fmt]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cO_, fmt); + (counter$0, k, _cN_, fmt); /*<>*/ } function make_custom$0(counter, k, acc, rest, arity, f){ /*<>*/ if(arity){ @@ -17377,13 +17385,13 @@ /*<>*/ caml_call1(f, x)); /*<>*/ }; } /*<>*/ /*<>*/ var - _cN_ = [4, acc, f]; + _cM_ = [4, acc, f]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cN_, rest]); + (make_printf$0, [0, k, _cM_, rest]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cN_, rest); + (counter$0, k, _cM_, rest); /*<>*/ } function make_printf(k, acc, fmt){ /*<>*/ return caml_trampoline(make_printf$0(0, k, acc, fmt)); @@ -17404,68 +17412,68 @@ /*<>*/ if(typeof pad === "number"){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cm_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cM_){ - /*<>*/ return _cm_;}; + _cl_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cL_){ + /*<>*/ return _cl_;}; } if(prec){ /*<>*/ var - /*<>*/ _cj_ = make_iprintf(k, o, fmt), - /*<>*/ _ck_ = - function(_cL_){ /*<>*/ return _cj_;}; - /*<>*/ return function(_cK_){ - /*<>*/ return _ck_;}; + /*<>*/ _ci_ = make_iprintf(k, o, fmt), + /*<>*/ _cj_ = + function(_cK_){ /*<>*/ return _ci_;}; + /*<>*/ return function(_cJ_){ + /*<>*/ return _cj_;}; } /*<>*/ /*<>*/ var - _cl_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cJ_){ - /*<>*/ return _cl_;}; + _ck_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cI_){ + /*<>*/ return _ck_;}; } if(0 === pad[0]){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cq_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cI_){ - /*<>*/ return _cq_;}; + _cp_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cH_){ + /*<>*/ return _cp_;}; } if(prec){ /*<>*/ var - /*<>*/ _cn_ = make_iprintf(k, o, fmt), - /*<>*/ _co_ = - function(_cH_){ /*<>*/ return _cn_;}; - /*<>*/ return function(_cG_){ - /*<>*/ return _co_;}; + /*<>*/ _cm_ = make_iprintf(k, o, fmt), + /*<>*/ _cn_ = + function(_cG_){ /*<>*/ return _cm_;}; + /*<>*/ return function(_cF_){ + /*<>*/ return _cn_;}; } /*<>*/ /*<>*/ var - _cp_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cF_){ - /*<>*/ return _cp_;}; + _co_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cE_){ + /*<>*/ return _co_;}; } if(typeof prec !== "number"){ /*<>*/ var - /*<>*/ _cw_ = make_iprintf(k, o, fmt), - /*<>*/ _cx_ = - function(_cE_){ /*<>*/ return _cw_;}; - /*<>*/ return function(_cD_){ - /*<>*/ return _cx_;}; + /*<>*/ _cv_ = make_iprintf(k, o, fmt), + /*<>*/ _cw_ = + function(_cD_){ /*<>*/ return _cv_;}; + /*<>*/ return function(_cC_){ + /*<>*/ return _cw_;}; } if(prec){ /*<>*/ var - /*<>*/ _cr_ = make_iprintf(k, o, fmt), - /*<>*/ _cs_ = - function(_cC_){ /*<>*/ return _cr_;}, - /*<>*/ _ct_ = - function(_cB_){ /*<>*/ return _cs_;}; - /*<>*/ return function(_cA_){ - /*<>*/ return _ct_;}; + /*<>*/ _cq_ = make_iprintf(k, o, fmt), + /*<>*/ _cr_ = + function(_cB_){ /*<>*/ return _cq_;}, + /*<>*/ _cs_ = + function(_cA_){ /*<>*/ return _cr_;}; + /*<>*/ return function(_cz_){ + /*<>*/ return _cs_;}; } /*<>*/ /*<>*/ var - _cu_ = make_iprintf(k, o, fmt); - /*<>*/ function _cv_(_cz_){ - /*<>*/ return _cu_; + _ct_ = make_iprintf(k, o, fmt); + /*<>*/ function _cu_(_cy_){ + /*<>*/ return _ct_; } - /*<>*/ return function(_cy_){ - /*<>*/ return _cv_;}; + /*<>*/ return function(_cx_){ + /*<>*/ return _cu_;}; /*<>*/ } function make_iprintf$0(counter, k, o, fmt){ /*<>*/ var k$0 = k, fmt$0 = fmt; @@ -17477,69 +17485,69 @@ case 0: /*<>*/ var rest = fmt$0[1], - /*<>*/ _bz_ = + /*<>*/ _by_ = make_iprintf(k$0, o, rest); - /*<>*/ return function(_ci_){ - /*<>*/ return _bz_;}; + /*<>*/ return function(_ch_){ + /*<>*/ return _by_;}; case 1: /*<>*/ var rest$0 = fmt$0[1], - /*<>*/ _bA_ = + /*<>*/ _bz_ = make_iprintf(k$0, o, rest$0); - /*<>*/ return function(_ch_){ - /*<>*/ return _bA_;}; + /*<>*/ return function(_cg_){ + /*<>*/ return _bz_;}; case 2: - var _bB_ = fmt$0[1]; - if(typeof _bB_ === "number"){ + var _bA_ = fmt$0[1]; + if(typeof _bA_ === "number"){ /*<>*/ var rest$1 = fmt$0[2], - /*<>*/ _bC_ = + /*<>*/ _bB_ = make_iprintf(k$0, o, rest$1); - /*<>*/ return function(_cg_){ - /*<>*/ return _bC_;}; + /*<>*/ return function(_cf_){ + /*<>*/ return _bB_;}; } - if(0 === _bB_[0]){ + if(0 === _bA_[0]){ /*<>*/ var rest$2 = fmt$0[2], - /*<>*/ _bD_ = + /*<>*/ _bC_ = make_iprintf(k$0, o, rest$2); - /*<>*/ return function(_cf_){ - /*<>*/ return _bD_;}; + /*<>*/ return function(_ce_){ + /*<>*/ return _bC_;}; } /*<>*/ var rest$3 = fmt$0[2], - /*<>*/ _bE_ = + /*<>*/ _bD_ = make_iprintf(k$0, o, rest$3), - /*<>*/ _bF_ = - function(_ce_){ /*<>*/ return _bE_;}; - /*<>*/ return function(_cd_){ - /*<>*/ return _bF_;}; + /*<>*/ _bE_ = + function(_cd_){ /*<>*/ return _bD_;}; + /*<>*/ return function(_cc_){ + /*<>*/ return _bE_;}; case 3: - var _bG_ = fmt$0[1]; - if(typeof _bG_ === "number"){ + var _bF_ = fmt$0[1]; + if(typeof _bF_ === "number"){ /*<>*/ var rest$4 = fmt$0[2], - /*<>*/ _bH_ = + /*<>*/ _bG_ = make_iprintf(k$0, o, rest$4); - /*<>*/ return function(_cc_){ - /*<>*/ return _bH_;}; + /*<>*/ return function(_cb_){ + /*<>*/ return _bG_;}; } - if(0 === _bG_[0]){ + if(0 === _bF_[0]){ /*<>*/ var rest$5 = fmt$0[2], - /*<>*/ _bI_ = + /*<>*/ _bH_ = make_iprintf(k$0, o, rest$5); - /*<>*/ return function(_cb_){ - /*<>*/ return _bI_;}; + /*<>*/ return function(_ca_){ + /*<>*/ return _bH_;}; } /*<>*/ var rest$6 = fmt$0[2], - /*<>*/ _bJ_ = + /*<>*/ _bI_ = make_iprintf(k$0, o, rest$6), - /*<>*/ _bK_ = - function(_ca_){ /*<>*/ return _bJ_;}; - /*<>*/ return function(_b$_){ - /*<>*/ return _bK_;}; + /*<>*/ _bJ_ = + function(_b$_){ /*<>*/ return _bI_;}; + /*<>*/ return function(_b__){ + /*<>*/ return _bJ_;}; case 4: var rest$7 = fmt$0[4], prec = fmt$0[3], pad = fmt$0[2]; /*<>*/ return fn_of_padding_precision @@ -17561,31 +17569,31 @@ /*<>*/ return fn_of_padding_precision (k$0, o, rest$11, pad$3, prec$3); case 9: - var _bL_ = fmt$0[1]; - if(typeof _bL_ === "number"){ + var _bK_ = fmt$0[1]; + if(typeof _bK_ === "number"){ /*<>*/ var rest$12 = fmt$0[2], - /*<>*/ _bM_ = + /*<>*/ _bL_ = make_iprintf(k$0, o, rest$12); - /*<>*/ return function(_b__){ - /*<>*/ return _bM_;}; + /*<>*/ return function(_b9_){ + /*<>*/ return _bL_;}; } - if(0 === _bL_[0]){ + if(0 === _bK_[0]){ /*<>*/ var rest$13 = fmt$0[2], - /*<>*/ _bN_ = + /*<>*/ _bM_ = make_iprintf(k$0, o, rest$13); - /*<>*/ return function(_b9_){ - /*<>*/ return _bN_;}; + /*<>*/ return function(_b8_){ + /*<>*/ return _bM_;}; } /*<>*/ var rest$14 = fmt$0[2], - /*<>*/ _bO_ = + /*<>*/ _bN_ = make_iprintf(k$0, o, rest$14), - /*<>*/ _bP_ = - function(_b8_){ /*<>*/ return _bO_;}; - /*<>*/ return function(_b7_){ - /*<>*/ return _bP_;}; + /*<>*/ _bO_ = + function(_b7_){ /*<>*/ return _bN_;}; + /*<>*/ return function(_b6_){ + /*<>*/ return _bO_;}; case 10: var rest$15 = fmt$0[1], fmt$0 = rest$15; break; case 11: @@ -17595,45 +17603,45 @@ case 13: /*<>*/ var rest$18 = fmt$0[3], - /*<>*/ _bQ_ = + /*<>*/ _bP_ = make_iprintf(k$0, o, rest$18); - /*<>*/ return function(_b6_){ - /*<>*/ return _bQ_;}; + /*<>*/ return function(_b5_){ + /*<>*/ return _bP_;}; case 14: var rest$19 = fmt$0[3], fmtty = fmt$0[2]; /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _b5_ = recast(fmt, fmtty); + /*<>*/ _b4_ = recast(fmt, fmtty); /*<>*/ return make_iprintf (k$0, o, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _b5_, rest$19)); /*<>*/ }; + (CamlinternalFormatBasics[3], _b4_, rest$19)); /*<>*/ }; case 15: /*<>*/ var rest$20 = fmt$0[1], - /*<>*/ _bR_ = + /*<>*/ _bQ_ = make_iprintf(k$0, o, rest$20), - /*<>*/ _bS_ = - function(_b4_){ /*<>*/ return _bR_;}; - /*<>*/ return function(_b3_){ - /*<>*/ return _bS_;}; + /*<>*/ _bR_ = + function(_b3_){ /*<>*/ return _bQ_;}; + /*<>*/ return function(_b2_){ + /*<>*/ return _bR_;}; case 16: /*<>*/ var rest$21 = fmt$0[1], - /*<>*/ _bT_ = + /*<>*/ _bS_ = make_iprintf(k$0, o, rest$21); - /*<>*/ return function(_b2_){ - /*<>*/ return _bT_;}; + /*<>*/ return function(_b1_){ + /*<>*/ return _bS_;}; case 17: var rest$22 = fmt$0[2], fmt$0 = rest$22; break; case 18: - var _bU_ = fmt$0[1]; - if(0 === _bU_[0]) + var _bT_ = fmt$0[1]; + if(0 === _bT_[0]) var rest$23 = fmt$0[2], - fmt$1 = _bU_[1][1], + fmt$1 = _bT_[1][1], k$3 = function(k, rest){ function k$0(koc){ @@ -17648,7 +17656,7 @@ else var rest$24 = fmt$0[2], - fmt$2 = _bU_[1][1], + fmt$2 = _bT_[1][1], k$4 = function(k, rest){ function k$0(koc){ @@ -17667,32 +17675,32 @@ case 20: /*<>*/ var rest$25 = fmt$0[3], - /*<>*/ _bV_ = + /*<>*/ _bU_ = make_iprintf(k$0, o, rest$25); - /*<>*/ return function(_b1_){ - /*<>*/ return _bV_;}; + /*<>*/ return function(_b0_){ + /*<>*/ return _bU_;}; case 21: /*<>*/ var rest$26 = fmt$0[2], - /*<>*/ _bW_ = + /*<>*/ _bV_ = make_iprintf(k$0, o, rest$26); - /*<>*/ return function(_b0_){ - /*<>*/ return _bW_;}; + /*<>*/ return function(_bZ_){ + /*<>*/ return _bV_;}; case 22: /*<>*/ var rest$27 = fmt$0[1], - /*<>*/ _bX_ = + /*<>*/ _bW_ = make_iprintf(k$0, o, rest$27); - /*<>*/ return function(_bZ_){ - /*<>*/ return _bX_;}; + /*<>*/ return function(_bY_){ + /*<>*/ return _bW_;}; case 23: - var rest$28 = fmt$0[2], ign = fmt$0[1], _bY_ = 0; + var rest$28 = fmt$0[2], ign = fmt$0[1], _bX_ = 0; /*<>*/ return make_ignored_param (function(param){ /*<>*/ return caml_call1 (k$0, o); /*<>*/ }, - _bY_, + _bX_, ign, rest$28); default: @@ -17710,10 +17718,10 @@ /*<>*/ if(param){ /*<>*/ var arity = param[1], - /*<>*/ _bx_ = + /*<>*/ _bw_ = fn_of_custom_arity(k, o, fmt, arity); - /*<>*/ return function(_by_){ - /*<>*/ return _bx_;}; + /*<>*/ return function(_bx_){ + /*<>*/ return _bw_;}; } /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -17884,9 +17892,9 @@ var f = acc$0[2], p$3 = acc$0[1]; /*<>*/ strput_acc(b, p$3); /*<>*/ /*<>*/ var - _bw_ = /*<>*/ caml_call1(f, 0); + _bv_ = /*<>*/ caml_call1(f, 0); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, _bw_); + (Stdlib_Buffer[16], b, _bv_); case 7: var acc$3 = acc$0[1], acc$0 = acc$3; break; case 8: @@ -17917,11 +17925,11 @@ function k(acc){ /*<>*/ strput_acc(buf, acc); /*<>*/ /*<>*/ var - _bv_ = + _bu_ = /*<>*/ caml_call1 (Stdlib_Buffer[2], buf); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _bv_); + (Stdlib[2], _bu_); /*<>*/ } /*<>*/ return make_printf(k, 0, fmt); } @@ -17996,15 +18004,15 @@ else /*<>*/ try{ /*<>*/ var - /*<>*/ _bt_ = + /*<>*/ _bs_ = /*<>*/ runtime.caml_int_of_string ( /*<>*/ caml_call3 (Stdlib_String[15], str, nstart, nend - nstart | 0)), - indent = _bt_; + indent = _bs_; } - catch(_bu_){ - var _bs_ = caml_wrap_exception(_bu_); - if(_bs_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_bs_, 0); + catch(_bt_){ + var _br_ = caml_wrap_exception(_bt_); + if(_br_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_br_, 0); var indent = invalid_box(0); } /*<>*/ /*<>*/ var @@ -18070,7 +18078,7 @@ (end_ind){ /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function invalid_format_without(str_ind, c, s){ /*<>*/ return /*<>*/ caml_call4 @@ -18208,9 +18216,9 @@ b: try{ var - _bh_ = str_ind$3 === end_ind ? 1 : 0, - _bi_ = - _bh_ + _bg_ = str_ind$3 === end_ind ? 1 : 0, + _bh_ = + _bg_ || (60 !== @@ -18218,7 +18226,7 @@ (str, str_ind$3) ? 1 : 0); - if(_bi_) + if(_bh_) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -18257,12 +18265,12 @@ str, str_ind$3 - 2 | 0, (str_ind_3 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bj_ = + /*<>*/ _bi_ = [0, s, width, 0], - /*<>*/ _bk_ = + /*<>*/ _bj_ = str_ind_3 + 1 | 0, - formatting_lit$0 = _bj_, - next_ind = _bk_; + formatting_lit$0 = _bi_, + next_ind = _bj_; break b; } } @@ -18288,21 +18296,21 @@ str, str_ind$3 - 2 | 0, (str_ind_5 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bl_ = + /*<>*/ _bk_ = [0, s$0, width, offset], - /*<>*/ _bm_ = + /*<>*/ _bl_ = str_ind_5 + 1 | 0, - formatting_lit$0 = _bl_, - next_ind = _bm_; + formatting_lit$0 = _bk_, + next_ind = _bl_; break b; } /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); } - catch(_br_){ - var _bg_ = caml_wrap_exception(_br_); - if(_bg_ !== Stdlib[8] && _bg_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bg_, 0); + catch(_bq_){ + var _bf_ = caml_wrap_exception(_bq_); + if(_bf_ !== Stdlib[8] && _bf_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bf_, 0); var formatting_lit$0 = formatting_lit, next_ind = str_ind$3; } var @@ -18326,7 +18334,7 @@ if(58 > match$6) break c; } else if(45 === match$6) break c; - var _bp_ = 0; + var _bo_ = 0; break b; } /*<>*/ var @@ -18350,28 +18358,28 @@ str, str_ind$4 - 2 | 0, (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), - _bp_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; + _bo_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; } - var _bo_ = _bp_; + var _bn_ = _bo_; } - catch(_bq_){ - var _bn_ = caml_wrap_exception(_bq_); - if(_bn_ !== Stdlib[8] && _bn_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bn_, 0); - var _bo_ = 0; + catch(_bp_){ + var _bm_ = caml_wrap_exception(_bp_); + if(_bm_ !== Stdlib[8] && _bm_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bm_, 0); + var _bn_ = 0; } - if(_bo_) + if(_bn_) var - match$5 = _bo_[1], + match$5 = _bn_[1], formatting_lit$1 = match$5[2], next_ind$0 = match$5[1], fmt_rest$13 = parse(next_ind$0, end_ind)[1], - _bf_ = [0, [17, formatting_lit$1, fmt_rest$13]]; + _be_ = [0, [17, formatting_lit$1, fmt_rest$13]]; else var fmt_rest$14 = parse(str_ind$4, end_ind)[1], - _bf_ = [0, [17, _Q_, fmt_rest$14]]; - var match$0 = _bf_; + _be_ = [0, [17, _Q_, fmt_rest$14]]; + var match$0 = _be_; break a; case 31: var @@ -18529,29 +18537,29 @@ /*<>*/ var /*<>*/ ignored$2 = [9, get_pad_opt(95), sub_fmtty], - _aO_ = [0, [23, ignored$2, fmt_rest$7]]; + _aN_ = [0, [23, ignored$2, fmt_rest$7]]; else - var _aO_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; - var fmt_result = _aO_; + var _aN_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; + var fmt_result = _aN_; break a; case 44: var fmt_result = parse(str_ind, end_ind); break a; case 67: /*<>*/ var fmt_rest$10 = parse(str_ind, end_ind)[1], - /*<>*/ _aQ_ = + /*<>*/ _aP_ = get_ign(0) ? [0, [23, 1, fmt_rest$10]] : [0, [1, fmt_rest$10]], - fmt_result = _aQ_; + fmt_result = _aP_; break a; case 78: var fmt_rest$14 = parse(str_ind, end_ind)[1], counter$0 = 2; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$6 = [11, counter$0], - _aW_ = [0, [23, ignored$6, fmt_rest$14]]; + _aV_ = [0, [23, ignored$6, fmt_rest$14]]; else - var _aW_ = [0, [21, counter$0, fmt_rest$14]]; - var fmt_result = _aW_; + var _aV_ = [0, [21, counter$0, fmt_rest$14]]; + var fmt_result = _aV_; break a; case 83: /*<>*/ var @@ -18562,15 +18570,15 @@ /*<>*/ var /*<>*/ ignored$7 = [1, get_padprec_opt(95)], - _aX_ = [0, [23, ignored$7, fmt_rest$15]]; + _aW_ = [0, [23, ignored$7, fmt_rest$15]]; else /*<>*/ var /*<>*/ match$5 = make_padding_fmt_ebb(pad$6, fmt_rest$15), fmt_rest$16 = match$5[2], pad$7 = match$5[1], - _aX_ = [0, [3, pad$7, fmt_rest$16]]; - var fmt_result = _aX_; + _aW_ = [0, [3, pad$7, fmt_rest$16]]; + var fmt_result = _aW_; break a; case 91: if(str_ind === end_ind) @@ -18583,7 +18591,7 @@ function(c){ /*<>*/ add_in_char_set (char_set, c); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, add_range = function(c$0, c){ @@ -18595,12 +18603,12 @@ /*<>*/ caml_call1 (Stdlib[29], i)); /*<>*/ /*<>*/ var - _be_ = i + 1 | 0; + _bd_ = i + 1 | 0; if(c === i) break; - var i = _be_; + var i = _bd_; } } - return _$_; + return sentinal; /*<>*/ }, fail_single_percent = function(str_ind){ @@ -18622,13 +18630,13 @@ if(93 === c) /*<>*/ return str_ind$0 + 1 | 0; - var _bd_ = str_ind$0 + 1 | 0; + var _bc_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_after_char$0, [0, _bd_, end_ind, c]); + (parse_char_set_after_char$0, [0, _bc_, end_ind, c]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_after_char$0 - (counter$0, _bd_, end_ind, c); + (counter$0, _bc_, end_ind, c); } /*<>*/ add_char(45); var str_ind$1 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$1; @@ -18679,13 +18687,13 @@ /*<>*/ return fail_single_percent (str_ind$2); /*<>*/ add_range(c$0, c$3); - var _bb_ = str_ind$2 + 2 | 0; + var _ba_ = str_ind$2 + 2 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _bb_, end_ind]); + (parse_char_set_content, [0, _ba_, end_ind]); var counter$2 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$2, _bb_, end_ind); + (counter$2, _ba_, end_ind); } if(93 === c$2){ /*<>*/ add_char(c$0); @@ -18694,23 +18702,23 @@ | 0; } /*<>*/ add_range(c$0, c$2); - var _bc_ = str_ind$2 + 1 | 0; + var _bb_ = str_ind$2 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _bc_, end_ind]); + (parse_char_set_content, [0, _bb_, end_ind]); var counter$1 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$1, _bc_, end_ind); + (counter$1, _bb_, end_ind); } if(37 === c$0){ /*<>*/ add_char(c$1); - var _ba_ = str_ind$0 + 1 | 0; + var _a$_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _ba_, end_ind]); + (parse_char_set_content, [0, _a$_, end_ind]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$0, _ba_, end_ind); + (counter$0, _a$_, end_ind); } } if(37 === c$0) @@ -18760,10 +18768,10 @@ /*<>*/ var /*<>*/ ignored$9 = [10, get_pad_opt(95), char_set$1], - _a2_ = [0, [23, ignored$9, fmt_rest$19]]; + _a1_ = [0, [23, ignored$9, fmt_rest$19]]; else - var _a2_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; - var fmt_result = _a2_; + var _a1_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; + var fmt_result = _a1_; break a; case 97: var @@ -18783,28 +18791,28 @@ if(match$7){ if(0 === match$7[1]) /*<>*/ var - /*<>*/ _a3_ = + /*<>*/ _a2_ = get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], - _a4_ = _a3_; + _a3_ = _a2_; else var - _a4_ = + _a3_ = legacy_behavior$0 ? char_format(fmt_rest$21) : invalid_format_message (str_ind, cst_non_zero_widths_are_unsupp); - var _a5_ = _a4_; + var _a4_ = _a3_; } else - var _a5_ = char_format(fmt_rest$21); - var fmt_result = _a5_; + var _a4_ = char_format(fmt_rest$21); + var fmt_result = _a4_; break a; case 114: /*<>*/ var fmt_rest$22 = parse(str_ind, end_ind)[1], - /*<>*/ _a6_ = + /*<>*/ _a5_ = get_ign(0) ? [0, [23, 2, fmt_rest$22]] : [0, [19, fmt_rest$22]], - fmt_result = _a6_; + fmt_result = _a5_; break a; case 115: /*<>*/ var @@ -18815,15 +18823,15 @@ /*<>*/ var /*<>*/ ignored$10 = [0, get_padprec_opt(95)], - _a7_ = [0, [23, ignored$10, fmt_rest$23]]; + _a6_ = [0, [23, ignored$10, fmt_rest$23]]; else /*<>*/ var /*<>*/ match$8 = make_padding_fmt_ebb(pad$9, fmt_rest$23), fmt_rest$24 = match$8[2], pad$10 = match$8[1], - _a7_ = [0, [2, pad$10, fmt_rest$24]]; - var fmt_result = _a7_; + _a6_ = [0, [2, pad$10, fmt_rest$24]]; + var fmt_result = _a6_; break a; case 116: var @@ -18842,10 +18850,10 @@ /*<>*/ var /*<>*/ ignored$11 = [8, get_pad_opt(95), sub_fmtty$0], - _a8_ = [0, [23, ignored$11, fmt_rest$26]]; + _a7_ = [0, [23, ignored$11, fmt_rest$26]]; else - var _a8_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; - var fmt_result = _a8_; + var _a7_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; + var fmt_result = _a7_; break a; case 66: case 98: @@ -18857,15 +18865,15 @@ /*<>*/ var /*<>*/ ignored$3 = [7, get_padprec_opt(95)], - _aP_ = [0, [23, ignored$3, fmt_rest$8]]; + _aO_ = [0, [23, ignored$3, fmt_rest$8]]; else /*<>*/ var /*<>*/ match$3 = make_padding_fmt_ebb(pad$3, fmt_rest$8), fmt_rest$9 = match$3[2], pad$4 = match$3[1], - _aP_ = [0, [9, pad$4, fmt_rest$9]]; - var fmt_result = _aP_; + _aO_ = [0, [9, pad$4, fmt_rest$9]]; + var fmt_result = _aO_; break a; case 37: case 64: @@ -18881,22 +18889,22 @@ /*<>*/ symb$0 = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _a9_ = symb$0 - 88 | 0; + /*<>*/ _a8_ = symb$0 - 88 | 0; b: { - if(32 >= _a9_ >>> 0) - switch(_a9_){ + if(32 >= _a8_ >>> 0) + switch(_a8_){ case 0: case 12: case 17: case 23: case 29: case 32: - var _aV_ = 1; break b; + var _aU_ = 1; break b; } - var _aV_ = 0; + var _aU_ = 0; } - /*<>*/ if(_aV_) break; + /*<>*/ if(_aU_) break; } var fmt_rest$13 = parse(str_ind, end_ind)[1]; b: @@ -18917,10 +18925,10 @@ /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$5 = [11, counter], - _aU_ = [0, [23, ignored$5, fmt_rest$13]]; + _aT_ = [0, [23, ignored$5, fmt_rest$13]]; else - var _aU_ = [0, [21, counter, fmt_rest$13]]; - var fmt_result = _aU_; + var _aT_ = [0, [21, counter, fmt_rest$13]]; + var fmt_result = _aT_; break a; case 32: case 35: @@ -18939,26 +18947,26 @@ case 117: case 120: /*<>*/ var - /*<>*/ _aY_ = get_space(0), - /*<>*/ _aZ_ = get_hash(0), + /*<>*/ _aX_ = get_space(0), + /*<>*/ _aY_ = get_hash(0), /*<>*/ iconv$2 = - compute_int_conv(pct_ind, str_ind, get_plus(0), _aZ_, _aY_, symb), + compute_int_conv(pct_ind, str_ind, get_plus(0), _aY_, _aX_, symb), fmt_rest$17 = parse(str_ind, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$8 = [2, iconv$2, get_pad_opt(95)], - _a0_ = [0, [23, ignored$8, fmt_rest$17]]; + _aZ_ = [0, [23, ignored$8, fmt_rest$17]]; else /*<>*/ var - /*<>*/ _a1_ = get_prec(0), + /*<>*/ _a0_ = get_prec(0), /*<>*/ match$6 = - make_padprec_fmt_ebb(get_int_pad(0), _a1_, fmt_rest$17), + make_padprec_fmt_ebb(get_int_pad(0), _a0_, fmt_rest$17), fmt_rest$18 = match$6[3], prec$4 = match$6[2], pad$8 = match$6[1], - _a0_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; - var fmt_result = _a0_; + _aZ_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; + var fmt_result = _aZ_; break a; case 69: case 70: @@ -18988,28 +18996,28 @@ if(3 >= switcher >>> 0){ switch(switcher){ case 0: - var _a__ = 1; break; + var _a9_ = 1; break; case 1: - var _a__ = 0; break; + var _a9_ = 0; break; case 2: - var _a__ = 3; break; - default: var _a__ = 6; + var _a9_ = 3; break; + default: var _a9_ = 6; } - var kind = _a__; + var kind = _a9_; break b; } } else if(69 <= symb){ switch(symb - 69 | 0){ case 0: - var _a$_ = 2; break; + var _a__ = 2; break; case 1: break c; case 2: - var _a$_ = 4; break; - default: var _a$_ = 7; + var _a__ = 4; break; + default: var _a__ = 7; } - var kind = _a$_; + var kind = _a__; break b; } if(hash$1){ @@ -19027,25 +19035,25 @@ match = get_prec(0); if(typeof match === "number") var - _aR_ = + _aQ_ = match ? incompatible_flag(pct_ind, str_ind, 95, cst$26) : 0; else - var ndec = match[1], _aR_ = [0, ndec]; + var ndec = match[1], _aQ_ = [0, ndec]; /*<>*/ var /*<>*/ ignored$4 = - [6, get_pad_opt(95), _aR_], - _aS_ = [0, [23, ignored$4, fmt_rest$11]]; + [6, get_pad_opt(95), _aQ_], + _aR_ = [0, [23, ignored$4, fmt_rest$11]]; } else /*<>*/ var - /*<>*/ _aT_ = get_prec(0), + /*<>*/ _aS_ = get_prec(0), /*<>*/ match$4 = - make_padprec_fmt_ebb(get_pad(0), _aT_, fmt_rest$11), + make_padprec_fmt_ebb(get_pad(0), _aS_, fmt_rest$11), fmt_rest$12 = match$4[3], prec$3 = match$4[2], pad$5 = match$4[1], - _aS_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; - var fmt_result = _aS_; + _aR_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; + var fmt_result = _aR_; break a; } b: @@ -19054,89 +19062,89 @@ switch(symb - 108 | 0){ case 0: /*<>*/ var - /*<>*/ _ay_ = + /*<>*/ _ax_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _az_ = get_space(0), - /*<>*/ _aA_ = get_hash(0), + /*<>*/ _ay_ = get_space(0), + /*<>*/ _az_ = get_hash(0), /*<>*/ iconv = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aA_, _az_, _ay_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _az_, _ay_, _ax_), fmt_rest = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored = [3, iconv, get_pad_opt(95)], - _aB_ = [0, [23, ignored, fmt_rest]]; + _aA_ = [0, [23, ignored, fmt_rest]]; else /*<>*/ var - /*<>*/ _aD_ = get_prec(0), + /*<>*/ _aC_ = get_prec(0), /*<>*/ match$0 = - make_padprec_fmt_ebb(get_int_pad(0), _aD_, fmt_rest), + make_padprec_fmt_ebb(get_int_pad(0), _aC_, fmt_rest), fmt_rest$0 = match$0[3], prec$0 = match$0[2], pad$0 = match$0[1], - _aB_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; - var _aC_ = _aB_; + _aA_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; + var _aB_ = _aA_; break; case 1: break b; default: /*<>*/ var - /*<>*/ _aE_ = + /*<>*/ _aD_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _aF_ = get_space(0), - /*<>*/ _aG_ = get_hash(0), + /*<>*/ _aE_ = get_space(0), + /*<>*/ _aF_ = get_hash(0), /*<>*/ iconv$0 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aG_, _aF_, _aE_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aF_, _aE_, _aD_), fmt_rest$1 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$0 = [4, iconv$0, get_pad_opt(95)], - _aH_ = [0, [23, ignored$0, fmt_rest$1]]; + _aG_ = [0, [23, ignored$0, fmt_rest$1]]; else /*<>*/ var - /*<>*/ _aI_ = get_prec(0), + /*<>*/ _aH_ = get_prec(0), /*<>*/ match$1 = - make_padprec_fmt_ebb(get_int_pad(0), _aI_, fmt_rest$1), + make_padprec_fmt_ebb(get_int_pad(0), _aH_, fmt_rest$1), fmt_rest$2 = match$1[3], prec$1 = match$1[2], pad$1 = match$1[1], - _aH_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; - var _aC_ = _aH_; + _aG_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; + var _aB_ = _aG_; } - var fmt_result = _aC_; + var fmt_result = _aB_; break a; } } else if(76 === symb){ /*<>*/ var - /*<>*/ _aJ_ = + /*<>*/ _aI_ = /*<>*/ caml_string_get(str, str_ind), - /*<>*/ _aK_ = get_space(0), - /*<>*/ _aL_ = get_hash(0), + /*<>*/ _aJ_ = get_space(0), + /*<>*/ _aK_ = get_hash(0), /*<>*/ iconv$1 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aL_, _aK_, _aJ_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aK_, _aJ_, _aI_), fmt_rest$3 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$1 = [5, iconv$1, get_pad_opt(95)], - _aM_ = [0, [23, ignored$1, fmt_rest$3]]; + _aL_ = [0, [23, ignored$1, fmt_rest$3]]; else /*<>*/ var - /*<>*/ _aN_ = get_prec(0), + /*<>*/ _aM_ = get_prec(0), /*<>*/ match$2 = - make_padprec_fmt_ebb(get_int_pad(0), _aN_, fmt_rest$3), + make_padprec_fmt_ebb(get_int_pad(0), _aM_, fmt_rest$3), fmt_rest$4 = match$2[3], prec$2 = match$2[2], pad$2 = match$2[1], - _aM_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; - var fmt_result = _aM_; + _aL_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; + var fmt_result = _aL_; break a; } var @@ -19145,46 +19153,46 @@ (failwith_message(_J_), str, str_ind - 1 | 0, symb); } if(1 - legacy_behavior$0){ - var _ap_ = 1 - plus_used[1], plus$0 = _ap_ ? plus : _ap_; + var _ao_ = 1 - plus_used[1], plus$0 = _ao_ ? plus : _ao_; if(plus$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$27); - var _aq_ = 1 - hash_used[1], hash$0 = _aq_ ? hash : _aq_; + var _ap_ = 1 - hash_used[1], hash$0 = _ap_ ? hash : _ap_; if(hash$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$28); - var _ar_ = 1 - space_used[1], space$0 = _ar_ ? space : _ar_; + var _aq_ = 1 - space_used[1], space$0 = _aq_ ? space : _aq_; if(space$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$29); var - _as_ = 1 - pad_used[1], - _at_ = - _as_ + _ar_ = 1 - pad_used[1], + _as_ = + _ar_ ? /*<>*/ caml_notequal ([0, pad], _K_) - : _as_; - /*<>*/ if(_at_) + : _ar_; + /*<>*/ if(_as_) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst_padding$0); var - _au_ = 1 - prec_used[1], - _av_ = - _au_ + _at_ = 1 - prec_used[1], + _au_ = + _at_ ? /*<>*/ caml_notequal ([0, prec], _L_) - : _au_; - /*<>*/ if(_av_){ - var _aw_ = ign ? 95 : symb; + : _at_; + /*<>*/ if(_au_){ + var _av_ = ign ? 95 : symb; /*<>*/ incompatible_flag - (pct_ind, str_ind, _aw_, cst_precision$2); + (pct_ind, str_ind, _av_, cst_precision$2); } var plus$1 = ign ? plus : ign; if(plus$1) /*<>*/ incompatible_flag (pct_ind, str_ind, 95, cst$30); } - var _ax_ = 1 - ign_used[1], ign$0 = _ax_ ? ign : _ax_; + var _aw_ = 1 - ign_used[1], ign$0 = _aw_ ? ign : _aw_; a: if(ign$0){ b: @@ -19301,10 +19309,10 @@ case 3: if(legacy_behavior$0){ /*<>*/ var - /*<>*/ _ao_ = str_ind$0 + 1 | 0, + /*<>*/ _an_ = str_ind$0 + 1 | 0, minus$0 = minus || (45 === symb$0 ? 1 : 0); /*<>*/ return parse_literal - (minus$0, _ao_); + (minus$0, _an_); } break; } @@ -19331,17 +19339,17 @@ /*<>*/ hash = [0, 0]; function set_flag(str_ind, flag){ /*<>*/ var - _al_ = flag[1], - _am_ = _al_ ? 1 - legacy_behavior$0 : _al_; - if(_am_){ + _ak_ = flag[1], + _al_ = _ak_ ? 1 - legacy_behavior$0 : _ak_; + if(_al_){ /*<>*/ /*<>*/ var - _an_ = + _am_ = /*<>*/ caml_string_get(str, str_ind); /*<>*/ /*<>*/ caml_call3 - (failwith_message(_C_), str, str_ind, _an_); + (failwith_message(_C_), str, str_ind, _am_); } flag[1] = 1; - return _$_; + return sentinal; /*<>*/ } var str_ind$0 = str_ind; /*<>*/ for(;;){ @@ -19511,13 +19519,13 @@ [0, sub_fmt, sub_str], /*<>*/ formatting$0 = is_open_tag ? [0, sub_format$0] : [1, sub_format$0], - /*<>*/ _aj_ = + /*<>*/ _ai_ = [0, [18, formatting$0, fmt_rest$0]]; - /*<>*/ return _aj_; + /*<>*/ return _ai_; } - catch(_ak_){ - var _ai_ = caml_wrap_exception(_ak_); - if(_ai_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ai_, 0); + catch(_aj_){ + var _ah_ = caml_wrap_exception(_aj_); + if(_ah_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ah_, 0); /*<>*/ var fmt_rest = parse(str_ind, end_ind)[1], /*<>*/ formatting = @@ -19557,9 +19565,9 @@ var new_acc = (acc$0 * 10 | 0) + (c - 48 | 0) | 0; if(Stdlib_Sys[12] < new_acc){ /*<>*/ /*<>*/ var - _ah_ = Stdlib_Sys[12]; + _ag_ = Stdlib_Sys[12]; /*<>*/ return /*<>*/ caml_call3 - (failwith_message(_S_), str, new_acc, _ah_); + (failwith_message(_S_), str, new_acc, _ag_); } var str_ind$1 = str_ind$0 + 1 | 0, @@ -19813,16 +19821,16 @@ fmt = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _af_ = [0, type_format(fmt, fmtty), str]; - /*<>*/ return _af_; + _ae_ = [0, type_format(fmt, fmtty), str]; + /*<>*/ return _ae_; } - catch(_ag_){ - var _ad_ = caml_wrap_exception(_ag_); - if(_ad_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ad_, 0); + catch(_af_){ + var _ac_ = caml_wrap_exception(_af_); + if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); /*<>*/ /*<>*/ var - _ae_ = string_of_fmtty(fmtty); + _ad_ = string_of_fmtty(fmtty); /*<>*/ return /*<>*/ caml_call2 - (failwith_message(_Z_), str, _ae_); + (failwith_message(_Z_), str, _ad_); } /*<>*/ } function format_of_string_format(str, param){ @@ -19832,15 +19840,15 @@ fmt$0 = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _ab_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; - /*<>*/ return _ab_; + _aa_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; + /*<>*/ return _aa_; } - catch(_ac_){ - var _aa_ = caml_wrap_exception(_ac_); - if(_aa_ === Type_mismatch) + catch(_ab_){ + var _$_ = caml_wrap_exception(_ab_); + if(_$_ === Type_mismatch) /*<>*/ return /*<>*/ caml_call2 (failwith_message(___), str, str$0); - throw caml_maybe_attach_backtrace(_aa_, 0); + throw caml_maybe_attach_backtrace(_$_, 0); } } var @@ -20048,7 +20056,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5]); } /*<>*/ var - _y_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$6 = "\n", cst$3 = cst$7, @@ -20139,18 +20147,18 @@ /*<>*/ var t = l[2], h = l[1], - /*<>*/ _aE_ = + /*<>*/ _aD_ = /*<>*/ caml_call2(Stdlib[28], prefix, h); - function _aF_(x, y){ + function _aE_(x, y){ /*<>*/ /*<>*/ var - _aH_ = /*<>*/ caml_call2(Stdlib[28], sep, y); + _aG_ = /*<>*/ caml_call2(Stdlib[28], sep, y); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], x, _aH_); + (Stdlib[28], x, _aG_); /*<>*/ } /*<>*/ /*<>*/ var - _aG_ = /*<>*/ caml_call3(Stdlib_List[25], _aF_, _aE_, t); + _aF_ = /*<>*/ caml_call3(Stdlib_List[25], _aE_, _aD_, t); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _aG_, suffix); + (Stdlib[28], _aF_, suffix); /*<>*/ } function help_action(param){ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -20159,11 +20167,11 @@ function add_help(speclist){ /*<>*/ try{ /*<>*/ assoc3(cst_help$2, speclist); - /*<>*/ var /*<>*/ _aB_ = 0, add1 = _aB_; + /*<>*/ var /*<>*/ _aA_ = 0, add1 = _aA_; } - catch(_aD_){ - var _ax_ = caml_wrap_exception(_aD_); - if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); + catch(_aC_){ + var _aw_ = caml_wrap_exception(_aC_); + if(_aw_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_aw_, 0); var add1 = [0, @@ -20172,11 +20180,11 @@ } try{ /*<>*/ assoc3(cst_help$1, speclist); - /*<>*/ var /*<>*/ _aA_ = 0, add2 = _aA_; + /*<>*/ var /*<>*/ _az_ = 0, add2 = _az_; } - catch(_aC_){ - var _ay_ = caml_wrap_exception(_aC_); - if(_ay_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ay_, 0); + catch(_aB_){ + var _ax_ = caml_wrap_exception(_aB_); + if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); var add2 = [0, @@ -20184,34 +20192,34 @@ 0]; } /*<>*/ /*<>*/ var - _az_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); + _ay_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[37], speclist, _az_); + (Stdlib[37], speclist, _ay_); /*<>*/ } function usage_b(buf, speclist, errmsg){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Printf[5], buf, _d_, errmsg); /*<>*/ /*<>*/ var - _at_ = add_help(speclist); - /*<>*/ function _au_(param){ + _as_ = add_help(speclist); + /*<>*/ function _at_(param){ var doc = param[3], spec = param[2], key = param[1], - _av_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; - if(! _av_) return _av_; + _au_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; + if(! _au_) return _au_; if(11 !== spec[0]) /*<>*/ return /*<>*/ caml_call4 (Stdlib_Printf[5], buf, _a_, key, doc); /*<>*/ var l = spec[1], - /*<>*/ _aw_ = make_symlist(cst$1, cst$0, cst, l); + /*<>*/ _av_ = make_symlist(cst$1, cst$0, cst, l); /*<>*/ return /*<>*/ caml_call5 - (Stdlib_Printf[5], buf, _b_, key, _aw_, doc); + (Stdlib_Printf[5], buf, _b_, key, _av_, doc); } /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _au_, _at_); - /*<>*/ return _y_; + (Stdlib_List[17], _at_, _as_); + /*<>*/ return sentinal; /*<>*/ } function usage_string(speclist, errmsg){ /*<>*/ /*<>*/ var @@ -20222,33 +20230,33 @@ /*<>*/ } function usage(speclist, errmsg){ /*<>*/ /*<>*/ var - _as_ = usage_string(speclist, errmsg); + _ar_ = usage_string(speclist, errmsg); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Printf[3], _e_, _as_); + (Stdlib_Printf[3], _e_, _ar_); /*<>*/ } /*<>*/ /*<>*/ var current = [0, 0]; function int_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _aq_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; - /*<>*/ return _aq_; + _ap_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; + /*<>*/ return _ap_; } - catch(_ar_){ - var _ap_ = caml_wrap_exception(_ar_); - if(_ap_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_ap_, 0); + catch(_aq_){ + var _ao_ = caml_wrap_exception(_aq_); + if(_ao_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_ao_, 0); } /*<>*/ } function float_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _an_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; - /*<>*/ return _an_; + _am_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; + /*<>*/ return _am_; } - catch(_ao_){ - var _am_ = caml_wrap_exception(_ao_); - if(_am_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_am_, 0); + catch(_an_){ + var _al_ = caml_wrap_exception(_an_); + if(_al_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_al_, 0); } /*<>*/ } function parse_and_expand_argv_dynamic_ @@ -20303,8 +20311,8 @@ if(current[1] >= argv[1].length - 1) return 0; /*<>*/ try{ /*<>*/ var - _Z_ = current[1], - /*<>*/ s = caml_check_bound(argv[1], _Z_)[1 + _Z_]; + _Y_ = current[1], + /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_]; a: { /*<>*/ if @@ -20313,13 +20321,13 @@ try{ /*<>*/ var follow$1 = 0, - /*<>*/ _ab_ = assoc3(s, speclist[1]), + /*<>*/ _aa_ = assoc3(s, speclist[1]), follow$0 = follow$1, - action = _ab_; + action = _aa_; } - catch(_ak_){ - var ___ = caml_wrap_exception(_ak_); - if(___ !== Stdlib[8]) throw caml_maybe_attach_backtrace(___, 0); + catch(_aj_){ + var _Z_ = caml_wrap_exception(_aj_); + if(_Z_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Z_, 0); /*<>*/ try{ /*<>*/ var /*<>*/ i = @@ -20332,16 +20340,16 @@ /*<>*/ keyword = /*<>*/ caml_call3(Stdlib_String[15], s, 0, i), /*<>*/ follow = [0, arg], - /*<>*/ _aa_ = assoc3(keyword, speclist[1]), + /*<>*/ _$_ = assoc3(keyword, speclist[1]), follow$0 = follow, - action = _aa_; + action = _$_; } - catch(_al_){ - var _$_ = caml_wrap_exception(_al_); - if(_$_ === Stdlib[8]) + catch(_ak_){ + var ___ = caml_wrap_exception(_ak_); + if(___ === Stdlib[8]) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [0, s]], 1); - throw caml_maybe_attach_backtrace(_$_, 0); + throw caml_maybe_attach_backtrace(___, 0); } } var @@ -20349,7 +20357,7 @@ function(s, follow){ function no_arg(param){ /*<>*/ if(! follow) - /*<>*/ return _y_; + /*<>*/ return sentinal; var arg = follow[1]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [1, s, arg, cst_no_argument]], 1); @@ -20367,9 +20375,9 @@ if((current[1] + 1 | 0) >= argv[1].length - 1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [2, s]], 1); - var _aj_ = current[1] + 1 | 0; - /*<>*/ return caml_check_bound(argv[1], _aj_) - [1 + _aj_]; + var _ai_ = current[1] + 1 | 0; + /*<>*/ return caml_check_bound(argv[1], _ai_) + [1 + _ai_]; /*<>*/ } return get_arg; }, @@ -20397,14 +20405,14 @@ /*<>*/ arg = get_arg(0); /*<>*/ try{ /*<>*/ var - /*<>*/ _ad_ = + /*<>*/ _ac_ = [0, /*<>*/ caml_call1(Stdlib[32], arg)], - match = _ad_; + match = _ac_; } - catch(_ai_){ - var _ac_ = caml_wrap_exception(_ai_); - if(_ac_[1] !== Stdlib[6]) - throw caml_maybe_attach_backtrace(_ac_, 0); + catch(_ah_){ + var _ab_ = caml_wrap_exception(_ah_); + if(_ab_[1] !== Stdlib[6]) + throw caml_maybe_attach_backtrace(_ab_, 0); var match = 0; } if(! match) @@ -20499,7 +20507,7 @@ /*<>*/ return consume_arg(0); } /*<>*/ /*<>*/ var - _ae_ = make_symlist(cst$5, cst$4, cst$3, symb); + _ad_ = make_symlist(cst$5, cst$4, cst$3, symb); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, @@ -20507,16 +20515,16 @@ s, arg$5, /*<>*/ caml_call2 - (Stdlib[28], cst_one_of, _ae_)]], + (Stdlib[28], cst_one_of, _ad_)]], 1); case 12: var f$5 = param[1]; /*<>*/ no_arg(0); /*<>*/ for(;;){ if(current[1] >= (argv[1].length - 1 - 1 | 0)) return 0; - var _af_ = current[1] + 1 | 0; + var _ae_ = current[1] + 1 | 0; /*<>*/ /*<>*/ caml_call1 - (f$5, caml_check_bound(argv[1], _af_)[1 + _af_]); + (f$5, caml_check_bound(argv[1], _ae_)[1 + _ae_]); /*<>*/ consume_arg(0); } break; @@ -20530,8 +20538,8 @@ /*<>*/ return /*<>*/ caml_call1 (f$6, /*<>*/ caml_call1(Stdlib_List[9], acc[1])); - var _ah_ = current[1] + 1 | 0, _ag_ = acc[1]; - acc[1] = [0, caml_check_bound(argv[1], _ah_)[1 + _ah_], _ag_]; + var _ag_ = current[1] + 1 | 0, _af_ = acc[1]; + acc[1] = [0, caml_check_bound(argv[1], _ag_)[1 + _ag_], _af_]; /*<>*/ consume_arg(0); } break; @@ -20609,8 +20617,8 @@ function parse(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _Y_ = parse_argv(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _Y_; + _X_ = parse_argv(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _X_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20632,8 +20640,8 @@ function parse_dynamic(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _X_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _X_; + _W_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _W_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20658,9 +20666,9 @@ /*<>*/ argv = [0, caml_sys_argv(0)], /*<>*/ spec = [0, l], /*<>*/ current$0 = [0, current[1]], - /*<>*/ _W_ = + /*<>*/ _V_ = parse_and_expand_argv_dynamic(current$0, argv, spec, f, msg); - /*<>*/ return _W_; + /*<>*/ return _V_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20697,17 +20705,17 @@ /*<>*/ /*<>*/ var n$0 = /*<>*/ caml_call2(Stdlib_String[35], s, 9); } - catch(_U_){ - var _S_ = caml_wrap_exception(_U_); - if(_S_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_S_, 0); + catch(_T_){ + var _R_ = caml_wrap_exception(_T_); + if(_R_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_R_, 0); /*<>*/ try{ /*<>*/ /*<>*/ var n = /*<>*/ caml_call2(Stdlib_String[35], s, 32); } - catch(_V_){ - var _T_ = caml_wrap_exception(_V_); - if(_T_ === Stdlib[8]) /*<>*/ return len; - throw caml_maybe_attach_backtrace(_T_, 0); + catch(_U_){ + var _S_ = caml_wrap_exception(_U_); + if(_S_ === Stdlib[8]) /*<>*/ return len; + throw caml_maybe_attach_backtrace(_S_, 0); } /*<>*/ return loop(n + 1 | 0); } @@ -20717,12 +20725,12 @@ var doc = param[3], spec = param[2], kwd = param[1]; /*<>*/ if(11 === spec[0]) return caml_call2(Stdlib_Int[11], cur, caml_ml_string_length(kwd)); - var _R_ = caml_ml_string_length(kwd) + second_word(doc) | 0; - return caml_call2(Stdlib_Int[11], cur, _R_); + var _Q_ = caml_ml_string_length(kwd) + second_word(doc) | 0; + return caml_call2(Stdlib_Int[11], cur, _Q_); } function replace_leading_tab(s){ /*<>*/ /*<>*/ var seen = [0, 0]; - function _Q_(c){ + function _P_(c){ /*<>*/ if(9 === c && ! seen[1]){ seen[1] = 1; /*<>*/ return 32; @@ -20730,7 +20738,7 @@ /*<>*/ return c; /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[17], _Q_, s); + (Stdlib_String[17], _P_, s); /*<>*/ } function align(opt, speclist){ /*<>*/ if(opt) @@ -20744,7 +20752,7 @@ (Stdlib_List[25], max_arg_len, 0, completed), /*<>*/ len$0 = /*<>*/ caml_call2(Stdlib_Int[10], len, limit); - /*<>*/ function _K_(ksd){ + /*<>*/ function _J_(ksd){ var kwd = ksd[1], spec = ksd[2]; if(! caml_string_notequal(ksd[3], cst$7)) /*<>*/ return ksd; @@ -20752,20 +20760,20 @@ /*<>*/ var msg$0 = ksd[3], /*<>*/ cutcol$0 = second_word(msg$0), - /*<>*/ _N_ = + /*<>*/ _M_ = /*<>*/ caml_call2 (Stdlib_Int[11], 0, len$0 - cutcol$0 | 0) + 3 | 0, /*<>*/ spaces$0 = - /*<>*/ caml_call2(Stdlib_String[1], _N_, 32), - /*<>*/ _O_ = replace_leading_tab(msg$0), - /*<>*/ _P_ = - /*<>*/ caml_call2(Stdlib[28], spaces$0, _O_); + /*<>*/ caml_call2(Stdlib_String[1], _M_, 32), + /*<>*/ _N_ = replace_leading_tab(msg$0), + /*<>*/ _O_ = + /*<>*/ caml_call2(Stdlib[28], spaces$0, _N_); /*<>*/ return [0, kwd, spec, - /*<>*/ caml_call2(Stdlib[28], cst$6, _P_)]; + /*<>*/ caml_call2(Stdlib[28], cst$6, _O_)]; } /*<>*/ var msg = ksd[3], @@ -20779,24 +20787,24 @@ /*<>*/ var /*<>*/ spaces = /*<>*/ caml_call2(Stdlib_String[1], diff, 32), - /*<>*/ _L_ = replace_leading_tab(msg), + /*<>*/ _K_ = replace_leading_tab(msg), /*<>*/ prefix = - /*<>*/ caml_call3(Stdlib_String[15], _L_, 0, cutcol), + /*<>*/ caml_call3(Stdlib_String[15], _K_, 0, cutcol), /*<>*/ suffix = /*<>*/ caml_call3 (Stdlib_String[15], msg, cutcol, caml_ml_string_length(msg) - cutcol | 0), - /*<>*/ _M_ = + /*<>*/ _L_ = /*<>*/ caml_call2(Stdlib[28], spaces, suffix); /*<>*/ return [0, kwd, spec$0, - /*<>*/ caml_call2(Stdlib[28], prefix, _M_)]; + /*<>*/ caml_call2(Stdlib[28], prefix, _L_)]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[19], _K_, completed); + (Stdlib_List[19], _J_, completed); /*<>*/ } function read_aux(trim, sep, file){ /*<>*/ var @@ -20816,21 +20824,21 @@ (0 < len && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ var - _J_ = + _I_ = /*<>*/ caml_call3 (Stdlib_String[15], word, 0, len - 1 | 0); break a; } - var _J_ = word; + var _I_ = word; } - var word$0 = _J_; + var word$0 = _I_; } else var word$0 = word; words[1] = [0, word$0, words[1]]; /*<>*/ /*<>*/ caml_call1 (Stdlib_Buffer[8], buf); - /*<>*/ return _y_; + /*<>*/ return sentinal; /*<>*/ } /*<>*/ try{ for(;;){ @@ -20843,45 +20851,45 @@ (Stdlib_Buffer[12], buf, c); } } - catch(_I_){ - var _G_ = caml_wrap_exception(_I_); - if(_G_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_G_, 0); + catch(_H_){ + var _F_ = caml_wrap_exception(_H_); + if(_F_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_F_, 0); if(0 < /*<>*/ caml_call1(Stdlib_Buffer[7], buf)) /*<>*/ stash(0); /*<>*/ /*<>*/ caml_call1(Stdlib[93], ic); /*<>*/ /*<>*/ var - _H_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); + _G_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Array[10], _H_); + (Stdlib_Array[10], _G_); } /*<>*/ } var _r_ = 10, _s_ = 1; - /*<>*/ function read_arg(_F_){ - /*<>*/ return read_aux(_s_, _r_, _F_); + /*<>*/ function read_arg(_E_){ + /*<>*/ return read_aux(_s_, _r_, _E_); } /*<>*/ var /*<>*/ _t_ = 0, _u_ = 0; - /*<>*/ function read_arg0(_E_){ - /*<>*/ return read_aux(_u_, _t_, _E_); + /*<>*/ function read_arg0(_D_){ + /*<>*/ return read_aux(_u_, _t_, _D_); } function write_aux(sep, file, args){ /*<>*/ /*<>*/ var oc = /*<>*/ caml_call1(Stdlib[61], file); - function _D_(s){ + function _C_(s){ /*<>*/ return caml_call4 (Stdlib_Printf[1], oc, _v_, s, sep); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _D_, args); + (Stdlib_Array[11], _C_, args); /*<>*/ return /*<>*/ caml_call1 (Stdlib[76], oc); /*<>*/ } var _w_ = 10; - /*<>*/ function write_arg(_B_, _C_){ - /*<>*/ return write_aux(_w_, _B_, _C_); + /*<>*/ function write_arg(_A_, _B_){ + /*<>*/ return write_aux(_w_, _A_, _B_); } /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ function write_arg0(_z_, _A_){ - /*<>*/ return write_aux(_x_, _z_, _A_); + /*<>*/ function write_arg0(_y_, _z_){ + /*<>*/ return write_aux(_x_, _y_, _z_); } var Stdlib_Arg = @@ -21544,10 +21552,10 @@ : runtime.caml_call_gen(f, [a0, a1]); } var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Printexc = global_data.Stdlib__Printexc, Stdlib = global_data.Stdlib, - _b_ = undefined, cst_Fun_Finally_raised = "Fun.Finally_raised: ", cst_Stdlib_Fun_Finally_raised = "Stdlib.Fun.Finally_raised"; function const$0(c, param){ @@ -21567,11 +21575,11 @@ /*<>*/ return 0; /*<>*/ var exn = param[2], - /*<>*/ _c_ = + /*<>*/ _b_ = /*<>*/ caml_call1(Stdlib_Printexc[1], exn); /*<>*/ return [0, /*<>*/ caml_call2 - (Stdlib[28], cst_Fun_Finally_raised, _c_)]; + (Stdlib[28], cst_Fun_Finally_raised, _b_)]; /*<>*/ } /*<>*/ /*<>*/ caml_call1 (Stdlib_Printexc[9], _a_); @@ -21579,7 +21587,7 @@ function finally_no_exn(param){ /*<>*/ try{ /*<>*/ /*<>*/ caml_call1(finally$0, 0); - /*<>*/ return _b_; + /*<>*/ return sentinal; } catch(e$0){ /*<>*/ var @@ -22037,7 +22045,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - _a_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Array = global_data.Stdlib__Array, @@ -22099,46 +22107,46 @@ /*<>*/ if(col === idx.length - 1){ /*<>*/ /*<>*/ caml_ba_set_generic (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ return _a_; + /*<>*/ return sentinal; } /*<>*/ var - /*<>*/ _an_ = + /*<>*/ _am_ = caml_check_bound(max, col)[1 + col] - 1 | 0, - /*<>*/ _am_ = 0; - if(_an_ >= 0){ - var j = _am_; + /*<>*/ _al_ = 0; + if(_am_ >= 0){ + var j = _al_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); /*<>*/ /*<>*/ var - _ao_ = j + 1 | 0; - if(_an_ === j) break; - var j = _ao_; + _an_ = j + 1 | 0; + if(_am_ === j) break; + var j = _an_; } } - return _a_; + return sentinal; /*<>*/ } function floop(arr, idx, f, col, max){ /*<>*/ if(0 > col){ /*<>*/ /*<>*/ caml_ba_set_generic (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ return _a_; + /*<>*/ return sentinal; } /*<>*/ var - /*<>*/ _ak_ = caml_check_bound(max, col)[1 + col], - /*<>*/ _aj_ = 1; - if(_ak_ >= 1){ - var j = _aj_; + /*<>*/ _aj_ = caml_check_bound(max, col)[1 + col], + /*<>*/ _ai_ = 1; + if(_aj_ >= 1){ + var j = _ai_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ floop(arr, idx, f, col - 1 | 0, max); /*<>*/ /*<>*/ var - _al_ = j + 1 | 0; - if(_ak_ === j) break; - var j = _al_; + _ak_ = j + 1 | 0; + if(_aj_ === j) break; + var j = _ak_; } } - return _a_; + return sentinal; /*<>*/ } function init(kind, layout, dims, f){ /*<>*/ var @@ -22167,31 +22175,31 @@ /*<>*/ caml_ba_num_dims(a), /*<>*/ d = /*<>*/ caml_make_vect(n, 0), - /*<>*/ _ag_ = n - 1 | 0, - /*<>*/ _af_ = 0; - if(_ag_ >= 0){ - var i = _af_; + /*<>*/ _af_ = n - 1 | 0, + /*<>*/ _ae_ = 0; + if(_af_ >= 0){ + var i = _ae_; for(;;){ /*<>*/ /*<>*/ var - _ah_ = /*<>*/ runtime.caml_ba_dim(a, i); - /*<>*/ caml_check_bound(d, i)[1 + i] = _ah_; + _ag_ = /*<>*/ runtime.caml_ba_dim(a, i); + /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; /*<>*/ /*<>*/ var - _ai_ = i + 1 | 0; - if(_ag_ === i) break; - var i = _ai_; + _ah_ = i + 1 | 0; + if(_af_ === i) break; + var i = _ah_; } } /*<>*/ return d; /*<>*/ } function size_in_bytes(arr){ /*<>*/ var - /*<>*/ _ad_ = dims(arr), - /*<>*/ _ae_ = + /*<>*/ _ac_ = dims(arr), + /*<>*/ _ad_ = /*<>*/ caml_call3 - (Stdlib_Array[15], caml_mul, 1, _ad_); + (Stdlib_Array[15], caml_mul, 1, _ac_); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _ae_); + _ad_); /*<>*/ } function create(kind, layout){ /*<>*/ return /*<>*/ caml_ba_create @@ -22202,9 +22210,9 @@ (arr, [0]); /*<>*/ } function set(arr){ - /*<>*/ /*<>*/ var _ab_ = [0]; - /*<>*/ return function(_ac_){ - /*<>*/ return caml_ba_set_generic(arr, _ab_, _ac_);}; + /*<>*/ /*<>*/ var _aa_ = [0]; + /*<>*/ return function(_ab_){ + /*<>*/ return caml_ba_set_generic(arr, _aa_, _ab_);}; /*<>*/ } function size_in_bytes$0(arr){ /*<>*/ return kind_size_in_bytes @@ -22222,10 +22230,10 @@ /*<>*/ } function size_in_bytes$1(arr){ /*<>*/ /*<>*/ var - _aa_ = /*<>*/ caml_ba_dim_1(arr); + _$_ = /*<>*/ caml_ba_dim_1(arr); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _aa_); + _$_); /*<>*/ } function slice(a, n){ /*<>*/ return /*<>*/ runtime.caml_ba_layout @@ -22237,32 +22245,32 @@ /*<>*/ /*<>*/ var arr = create$0(kind, layout, dim); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var ___ = 1; + /*<>*/ /*<>*/ var _Z_ = 1; if(dim >= 1){ - var i$0 = ___; + var i$0 = _Z_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i$0, /*<>*/ caml_call1(f, i$0)); /*<>*/ /*<>*/ var - _$_ = i$0 + 1 | 0; + ___ = i$0 + 1 | 0; if(dim === i$0) break; - var i$0 = _$_; + var i$0 = ___; } } /*<>*/ return arr; } /*<>*/ var - _Y_ = dim - 1 | 0, - /*<>*/ _X_ = 0; - if(_Y_ >= 0){ - var i = _X_; + _X_ = dim - 1 | 0, + /*<>*/ _W_ = 0; + if(_X_ >= 0){ + var i = _W_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var - _Z_ = i + 1 | 0; - if(_Y_ === i) break; - var i = _Z_; + _Y_ = i + 1 | 0; + if(_X_ === i) break; + var i = _Y_; } } /*<>*/ return arr; @@ -22271,17 +22279,17 @@ /*<>*/ var /*<>*/ ba = create$0(kind, layout, data.length - 1), /*<>*/ ofs = layout ? 1 : 0, - _V_ = data.length - 1 - 1 | 0, - _U_ = 0; - if(_V_ >= 0){ - var i = _U_; + _U_ = data.length - 1 - 1 | 0, + _T_ = 0; + if(_U_ >= 0){ + var i = _T_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); /*<>*/ /*<>*/ var - _W_ = i + 1 | 0; - if(_V_ === i) break; - var i = _W_; + _V_ = i + 1 | 0; + if(_U_ === i) break; + var i = _V_; } } /*<>*/ return ba; @@ -22292,16 +22300,16 @@ /*<>*/ } function size_in_bytes$2(arr){ /*<>*/ var - /*<>*/ _S_ = + /*<>*/ _R_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _T_ = + /*<>*/ _S_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _T_), - _S_); + _S_), + _R_); /*<>*/ } function slice_left(a, n){ /*<>*/ return /*<>*/ caml_ba_slice @@ -22315,54 +22323,54 @@ /*<>*/ /*<>*/ var arr = create$1(kind, layout, dim1, dim2); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _O_ = 1; + /*<>*/ /*<>*/ var _N_ = 1; if(dim2 >= 1){ - var j$0 = _O_; + var j$0 = _N_; for(;;){ - /*<>*/ /*<>*/ var _P_ = 1; + /*<>*/ /*<>*/ var _O_ = 1; if(dim1 >= 1){ - var i$0 = _P_; + var i$0 = _O_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); /*<>*/ /*<>*/ var - _R_ = i$0 + 1 | 0; + _Q_ = i$0 + 1 | 0; if(dim1 === i$0) break; - var i$0 = _R_; + var i$0 = _Q_; } } /*<>*/ /*<>*/ var - _Q_ = j$0 + 1 | 0; + _P_ = j$0 + 1 | 0; if(dim2 === j$0) break; - var j$0 = _Q_; + var j$0 = _P_; } } /*<>*/ return arr; } /*<>*/ var - _J_ = dim1 - 1 | 0, - /*<>*/ _I_ = 0; - if(_J_ >= 0){ - var i = _I_; + _I_ = dim1 - 1 | 0, + /*<>*/ _H_ = 0; + if(_I_ >= 0){ + var i = _H_; for(;;){ /*<>*/ var - _L_ = dim2 - 1 | 0, - /*<>*/ _K_ = 0; - if(_L_ >= 0){ - var j = _K_; + _K_ = dim2 - 1 | 0, + /*<>*/ _J_ = 0; + if(_K_ >= 0){ + var j = _J_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i, j, /*<>*/ caml_call2(f, i, j)); /*<>*/ /*<>*/ var - _N_ = j + 1 | 0; - if(_L_ === j) break; - var j = _N_; + _M_ = j + 1 | 0; + if(_K_ === j) break; + var j = _M_; } } /*<>*/ /*<>*/ var - _M_ = i + 1 | 0; - if(_J_ === i) break; - var i = _M_; + _L_ = i + 1 | 0; + if(_I_ === i) break; + var i = _L_; } } /*<>*/ return arr; @@ -22374,10 +22382,10 @@ 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, /*<>*/ ba = create$1(kind, layout, dim1, dim2), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _D_ = dim1 - 1 | 0, - _C_ = 0; - if(_D_ >= 0){ - var i = _C_; + /*<>*/ _C_ = dim1 - 1 | 0, + _B_ = 0; + if(_C_ >= 0){ + var i = _B_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -22385,23 +22393,23 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array2_of_array_n); /*<>*/ var - /*<>*/ _F_ = dim2 - 1 | 0, - /*<>*/ _E_ = 0; - if(_F_ >= 0){ - var j = _E_; + /*<>*/ _E_ = dim2 - 1 | 0, + /*<>*/ _D_ = 0; + if(_E_ >= 0){ + var j = _D_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (ba, i + ofs | 0, j + ofs | 0, caml_check_bound(row, j)[1 + j]); /*<>*/ /*<>*/ var - _H_ = j + 1 | 0; - if(_F_ === j) break; - var j = _H_; + _G_ = j + 1 | 0; + if(_E_ === j) break; + var j = _G_; } } /*<>*/ /*<>*/ var - _G_ = i + 1 | 0; - if(_D_ === i) break; - var i = _G_; + _F_ = i + 1 | 0; + if(_C_ === i) break; + var i = _F_; } } /*<>*/ return ba; @@ -22412,20 +22420,20 @@ /*<>*/ } function size_in_bytes$3(arr){ /*<>*/ var - /*<>*/ _z_ = + /*<>*/ _y_ = /*<>*/ runtime.caml_ba_dim_3(arr), - /*<>*/ _A_ = + /*<>*/ _z_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _B_ = + /*<>*/ _A_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul (caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _B_), - _A_), - _z_); + _A_), + _z_), + _y_); /*<>*/ } function slice_left_1(a, n, m){ /*<>*/ return /*<>*/ caml_ba_slice @@ -22447,17 +22455,17 @@ /*<>*/ /*<>*/ var arr = create$2(kind, layout, dim1, dim2, dim3); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _t_ = 1; + /*<>*/ /*<>*/ var _s_ = 1; if(dim3 >= 1){ - var k$0 = _t_; + var k$0 = _s_; for(;;){ - /*<>*/ /*<>*/ var _u_ = 1; + /*<>*/ /*<>*/ var _t_ = 1; if(dim2 >= 1){ - var j$0 = _u_; + var j$0 = _t_; for(;;){ - /*<>*/ /*<>*/ var _w_ = 1; + /*<>*/ /*<>*/ var _v_ = 1; if(dim1 >= 1){ - var i$0 = _w_; + var i$0 = _v_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, @@ -22466,61 +22474,61 @@ k$0, /*<>*/ caml_call3(f, i$0, j$0, k$0)); /*<>*/ /*<>*/ var - _y_ = i$0 + 1 | 0; + _x_ = i$0 + 1 | 0; if(dim1 === i$0) break; - var i$0 = _y_; + var i$0 = _x_; } } /*<>*/ /*<>*/ var - _x_ = j$0 + 1 | 0; + _w_ = j$0 + 1 | 0; if(dim2 === j$0) break; - var j$0 = _x_; + var j$0 = _w_; } } /*<>*/ /*<>*/ var - _v_ = k$0 + 1 | 0; + _u_ = k$0 + 1 | 0; if(dim3 === k$0) break; - var k$0 = _v_; + var k$0 = _u_; } } /*<>*/ return arr; } /*<>*/ var - _l_ = dim1 - 1 | 0, - /*<>*/ _k_ = 0; - if(_l_ >= 0){ - var i = _k_; + _k_ = dim1 - 1 | 0, + /*<>*/ _j_ = 0; + if(_k_ >= 0){ + var i = _j_; for(;;){ /*<>*/ var - _n_ = dim2 - 1 | 0, - /*<>*/ _m_ = 0; - if(_n_ >= 0){ - var j = _m_; + _m_ = dim2 - 1 | 0, + /*<>*/ _l_ = 0; + if(_m_ >= 0){ + var j = _l_; for(;;){ /*<>*/ var - _q_ = dim3 - 1 | 0, - /*<>*/ _p_ = 0; - if(_q_ >= 0){ - var k = _p_; + _p_ = dim3 - 1 | 0, + /*<>*/ _o_ = 0; + if(_p_ >= 0){ + var k = _o_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); /*<>*/ /*<>*/ var - _s_ = k + 1 | 0; - if(_q_ === k) break; - var k = _s_; + _r_ = k + 1 | 0; + if(_p_ === k) break; + var k = _r_; } } /*<>*/ /*<>*/ var - _r_ = j + 1 | 0; - if(_n_ === j) break; - var j = _r_; + _q_ = j + 1 | 0; + if(_m_ === j) break; + var j = _q_; } } /*<>*/ /*<>*/ var - _o_ = i + 1 | 0; - if(_l_ === i) break; - var i = _o_; + _n_ = i + 1 | 0; + if(_k_ === i) break; + var i = _n_; } } /*<>*/ return arr; @@ -22536,10 +22544,10 @@ : caml_check_bound(caml_check_bound(data, 0)[1], 0)[1].length - 1, /*<>*/ ba = create$2(kind, layout, dim1, dim2, dim3), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _c_ = dim1 - 1 | 0, - _b_ = 0; - if(_c_ >= 0){ - var i = _b_; + /*<>*/ _b_ = dim1 - 1 | 0, + _a_ = 0; + if(_b_ >= 0){ + var i = _a_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -22547,10 +22555,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n); /*<>*/ var - /*<>*/ _e_ = dim2 - 1 | 0, - /*<>*/ _d_ = 0; - if(_e_ >= 0){ - var j = _d_; + /*<>*/ _d_ = dim2 - 1 | 0, + /*<>*/ _c_ = 0; + if(_d_ >= 0){ + var j = _c_; for(;;){ /*<>*/ /*<>*/ var col = caml_check_bound(row, j)[1 + j]; @@ -22558,10 +22566,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n$0); /*<>*/ var - /*<>*/ _h_ = dim3 - 1 | 0, - /*<>*/ _g_ = 0; - if(_h_ >= 0){ - var k = _g_; + /*<>*/ _g_ = dim3 - 1 | 0, + /*<>*/ _f_ = 0; + if(_g_ >= 0){ + var k = _f_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (ba, @@ -22570,21 +22578,21 @@ k + ofs | 0, caml_check_bound(col, k)[1 + k]); /*<>*/ /*<>*/ var - _j_ = k + 1 | 0; - if(_h_ === k) break; - var k = _j_; + _i_ = k + 1 | 0; + if(_g_ === k) break; + var k = _i_; } } /*<>*/ /*<>*/ var - _i_ = j + 1 | 0; - if(_e_ === j) break; - var j = _i_; + _h_ = j + 1 | 0; + if(_d_ === j) break; + var j = _h_; } } /*<>*/ /*<>*/ var - _f_ = i + 1 | 0; - if(_c_ === i) break; - var i = _f_; + _e_ = i + 1 | 0; + if(_b_ === i) break; + var i = _e_; } } /*<>*/ return ba; @@ -24163,13 +24171,13 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Sys = global_data.Stdlib__Sys, Stdlib_Int = global_data.Stdlib__Int, Stdlib_Array = global_data.Stdlib__Array, Stdlib_Obj = global_data.Stdlib__Obj, - _a_ = undefined, cst_Weak_Make_hash_bucket_cann = "Weak.Make: hash bucket cannot grow more", cst_Weak_fill = "Weak.fill", cst_Weak_blit = "Weak.blit", @@ -24180,9 +24188,9 @@ cst_Weak_create = "Weak.create"; function create(l){ /*<>*/ var - _X_ = 0 <= l ? 1 : 0, - _Y_ = _X_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _X_; - if(1 - _Y_) + _W_ = 0 <= l ? 1 : 0, + _X_ = _W_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _W_; + if(1 - _X_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Weak_create); /*<>*/ return /*<>*/ runtime.caml_weak_create @@ -24193,10 +24201,12 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _U_ = 0 <= o ? 1 : 0, - _V_ = _U_ ? o < length(e) ? 1 : 0 : _U_, - _W_ = 1 - _V_; - return _W_ ? ( /*<>*/ caml_call1(Stdlib[1], msg), _a_) : _W_; + _T_ = 0 <= o ? 1 : 0, + _U_ = _T_ ? o < length(e) ? 1 : 0 : _T_, + _V_ = 1 - _U_; + return _V_ + ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) + : _V_; /*<>*/ } function set(e, o, x){ /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); @@ -24229,13 +24239,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _S_ = 0 !== l ? 1 : 0, - _T_ = - _S_ + _R_ = 0 !== l ? 1 : 0, + _S_ = + _R_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _S_; - /*<>*/ return _T_; + : _R_; + /*<>*/ return _S_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Weak_blit); @@ -24243,14 +24253,14 @@ function fill(ar, ofs, len, x){ /*<>*/ if (0 <= ofs && 0 <= len && (length(ar) - len | 0) >= ofs){ - var _Q_ = (ofs + len | 0) - 1 | 0; - if(_Q_ >= ofs){ + var _P_ = (ofs + len | 0) - 1 | 0; + if(_P_ >= ofs){ var i = ofs; for(;;){ /*<>*/ set(ar, i, x); - /*<>*/ /*<>*/ var _R_ = i + 1 | 0; - if(_Q_ === i) break; - var i = _R_; + /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; + if(_P_ === i) break; + var i = _Q_; } } return 0; @@ -24278,16 +24288,16 @@ /*<>*/ } function clear(t){ /*<>*/ var - _O_ = t[1].length - 1 - 1 | 0, - /*<>*/ _N_ = 0; - if(_O_ >= 0){ - var i = _N_; + _N_ = t[1].length - 1 - 1 | 0, + /*<>*/ _M_ = 0; + if(_N_ >= 0){ + var i = _M_; for(;;){ /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; - /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ === i) break; - var i = _P_; + /*<>*/ /*<>*/ var _O_ = i + 1 | 0; + if(_N_ === i) break; + var i = _O_; } } t[3] = limit; @@ -24295,8 +24305,8 @@ return 0; /*<>*/ } function fold(f, t, init){ - /*<>*/ var _L_ = t[1], i = 0; - /*<>*/ function _M_(b, accu$1){ + /*<>*/ var _K_ = t[1], i = 0; + /*<>*/ function _L_(b, accu$1){ var i$0 = i, accu = accu$1; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu; @@ -24315,11 +24325,11 @@ } } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _M_, _L_, init); + (Stdlib_Array[17], _L_, _K_, init); /*<>*/ } function iter(f, t){ - /*<>*/ var _J_ = t[1], i = 0; - /*<>*/ function _K_(b){ + /*<>*/ var _I_ = t[1], i = 0; + /*<>*/ function _J_(b){ var i$0 = i; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return 0; @@ -24335,15 +24345,15 @@ } } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Array[11], _K_, _J_); + (Stdlib_Array[11], _J_, _I_); /*<>*/ } function count_bucket(i, b, accu){ /*<>*/ var i$0 = i, accu$0 = accu; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu$0; /*<>*/ var - /*<>*/ _I_ = check(b, i$0) ? 1 : 0, - accu$1 = accu$0 + _I_ | 0, + /*<>*/ _H_ = check(b, i$0) ? 1 : 0, + accu$1 = accu$0 + _H_ | 0, i$1 = i$0 + 1 | 0, i$0 = i$1, accu$0 = accu$1; @@ -24351,14 +24361,14 @@ /*<>*/ } function count(t){ /*<>*/ var - /*<>*/ _C_ = 0, - _D_ = t[1], - _E_ = 0; - /*<>*/ function _F_(_G_, _H_){ - /*<>*/ return count_bucket(_E_, _G_, _H_); + /*<>*/ _B_ = 0, + _C_ = t[1], + _D_ = 0; + /*<>*/ function _E_(_F_, _G_){ + /*<>*/ return count_bucket(_D_, _F_, _G_); } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _F_, _D_, _C_); + (Stdlib_Array[17], _E_, _C_, _B_); /*<>*/ } function add_aux(t, setter, d, h, index){ /*<>*/ var @@ -24391,18 +24401,18 @@ /*<>*/ caml_check_bound(newhashes, sz)[1 + sz] = h; /*<>*/ caml_check_bound(t[1], index)[1 + index] = newbucket$0; /*<>*/ caml_check_bound(t[2], index)[1 + index] = newhashes; - var _y_ = sz <= t[3] ? 1 : 0, _z_ = _y_ ? t[3] < newsz ? 1 : 0 : _y_; - if(_z_){ + var _x_ = sz <= t[3] ? 1 : 0, _y_ = _x_ ? t[3] < newsz ? 1 : 0 : _x_; + if(_y_){ t[4] = t[4] + 1 | 0; var i$4 = 0; for(;;){ /*<>*/ var - _o_ = t[5], + _n_ = t[5], /*<>*/ bucket = - caml_check_bound(t[1], _o_)[1 + _o_], - /*<>*/ _p_ = t[5], + caml_check_bound(t[1], _n_)[1 + _n_], + /*<>*/ _o_ = t[5], /*<>*/ hbucket = - caml_check_bound(t[2], _p_)[1 + _p_], + caml_check_bound(t[2], _o_)[1 + _o_], /*<>*/ len = length(bucket), prev_len = (((len - 3 | 0) * 2 | 0) + 2 | 0) / 3 | 0, /*<>*/ live = count_bucket(0, bucket, 0); @@ -24414,28 +24424,28 @@ /*<>*/ for(;;){ if(prev_len > j){ if(0 === prev_len){ + var _q_ = t[5]; + /*<>*/ caml_check_bound(t[1], _q_)[1 + _q_] = emptybucket; var _r_ = t[5]; - /*<>*/ caml_check_bound(t[1], _r_)[1 + _r_] = emptybucket; - var _s_ = t[5]; - /*<>*/ caml_check_bound(t[2], _s_)[1 + _s_] = [0]; + /*<>*/ caml_check_bound(t[2], _r_)[1 + _r_] = [0]; } else{ /*<>*/ /*<>*/ var newbucket = create(prev_len); /*<>*/ blit(bucket, 0, newbucket, 0, prev_len); - var _v_ = t[5]; - /*<>*/ caml_check_bound(t[1], _v_)[1 + _v_] = newbucket; + var _u_ = t[5]; + /*<>*/ caml_check_bound(t[1], _u_)[1 + _u_] = newbucket; /*<>*/ var - /*<>*/ _w_ = + /*<>*/ _v_ = /*<>*/ caml_call3 (Stdlib_Array[5], hbucket, 0, prev_len), - _x_ = t[5]; - /*<>*/ caml_check_bound(t[2], _x_)[1 + _x_] = _w_; + _w_ = t[5]; + /*<>*/ caml_check_bound(t[2], _w_)[1 + _w_] = _v_; } var - _t_ = t[3] < len ? 1 : 0, - _u_ = _t_ ? prev_len <= t[3] ? 1 : 0 : _t_; - if(_u_) t[4] = t[4] - 1 | 0; + _s_ = t[3] < len ? 1 : 0, + _t_ = _s_ ? prev_len <= t[3] ? 1 : 0 : _s_; + if(_t_) t[4] = t[4] - 1 | 0; break; } /*<>*/ if(check(bucket, i$0)) @@ -24443,8 +24453,8 @@ else if(check(bucket, j)){ /*<>*/ blit(bucket, j, bucket, i$0, 1); /*<>*/ /*<>*/ var - _q_ = caml_check_bound(hbucket, j)[1 + j]; - /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _q_; + _p_ = caml_check_bound(hbucket, j)[1 + j]; + /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _p_; /*<>*/ var /*<>*/ j$0 = j - 1 | 0, i$2 = i$0 + 1 | 0, @@ -24459,13 +24469,13 @@ } t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); /*<>*/ /*<>*/ var - _B_ = i$4 + 1 | 0; + _A_ = i$4 + 1 | 0; if(2 === i$4) break; - var i$4 = _B_; + var i$4 = _A_; } } - var _A_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; - if(! _A_) return _A_; + var _z_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; + if(! _z_) return _z_; /*<>*/ var oldlen = t[1].length - 1, /*<>*/ newlen = @@ -24476,9 +24486,9 @@ if(oldlen < newlen){ /*<>*/ var /*<>*/ newt = create$0(newlen), - _m_ = t[1], + _l_ = t[1], i = 0, - /*<>*/ _n_ = + /*<>*/ _m_ = function(j, ob){ var oi = i; /*<>*/ for(;;){ @@ -24504,7 +24514,7 @@ } }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[12], _n_, _m_); + (Stdlib_Array[12], _m_, _l_); t[1] = newt[1]; t[2] = newt[2]; t[3] = newt[3]; @@ -24665,24 +24675,24 @@ } /*<>*/ } function remove(t, d){ - /*<>*/ /*<>*/ var _l_ = 0; + /*<>*/ /*<>*/ var _k_ = 0; /*<>*/ return find_shadow (t, d, function(w, i){ /*<>*/ return set(w, i, 0); /*<>*/ }, - _l_); + _k_); /*<>*/ } function mem(t, d){ - /*<>*/ /*<>*/ var _k_ = 0; + /*<>*/ /*<>*/ var _j_ = 0; /*<>*/ return find_shadow (t, d, function(w, i){ /*<>*/ return 1; /*<>*/ }, - _k_); + _j_); /*<>*/ } function find_all(t, d){ /*<>*/ var @@ -24732,17 +24742,17 @@ /*<>*/ caml_call2(Stdlib_Array[13], length, t[1]); /*<>*/ /*<>*/ caml_call2 (Stdlib_Array[30], runtime.caml_int_compare, lens); - var _b_ = 0; - function _c_(_j_, _i_){ /*<>*/ return _j_ + _i_ | 0;} + var _a_ = 0; + function _b_(_i_, _h_){ /*<>*/ return _i_ + _h_ | 0;} /*<>*/ var /*<>*/ totlen = - /*<>*/ caml_call3(Stdlib_Array[15], _c_, _b_, lens), - /*<>*/ _d_ = len - 1 | 0, - _f_ = len / 2 | 0, - /*<>*/ _e_ = caml_check_bound(lens, _d_)[1 + _d_], - /*<>*/ _g_ = caml_check_bound(lens, _f_)[1 + _f_], - /*<>*/ _h_ = caml_check_bound(lens, 0)[1]; - /*<>*/ return [0, len, count(t), totlen, _h_, _g_, _e_]; + /*<>*/ caml_call3(Stdlib_Array[15], _b_, _a_, lens), + /*<>*/ _c_ = len - 1 | 0, + _e_ = len / 2 | 0, + /*<>*/ _d_ = caml_check_bound(lens, _c_)[1 + _c_], + /*<>*/ _f_ = caml_check_bound(lens, _e_)[1 + _e_], + /*<>*/ _g_ = caml_check_bound(lens, 0)[1]; + /*<>*/ return [0, len, count(t), totlen, _g_, _f_, _d_]; /*<>*/ } /*<>*/ return [0, create$0, @@ -24799,7 +24809,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - _m_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$14 = ".", cst$11 = cst$15, @@ -24849,25 +24859,25 @@ function pp_output_string(state, s){ /*<>*/ caml_call3 (state[17], s, 0, caml_ml_string_length(s)); - return _m_; + return sentinal; /*<>*/ } function pp_output_newline(state){ /*<>*/ /*<>*/ caml_call1 (state[19], 0); - /*<>*/ return _m_; + /*<>*/ return sentinal; /*<>*/ } function format_pp_text(state, size, text){ /*<>*/ state[9] = state[9] - size | 0; /*<>*/ pp_output_string(state, text); state[11] = 0; - return _m_; + return sentinal; /*<>*/ } function format_string(state, s){ /*<>*/ /*<>*/ var - _bO_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); - /*<>*/ return _bO_ - ? (format_pp_text(state, caml_ml_string_length(s), s), _m_) - : _bO_; + _bN_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); + /*<>*/ return _bN_ + ? (format_pp_text(state, caml_ml_string_length(s), s), sentinal) + : _bN_; /*<>*/ } function break_new_line(state, param, width){ var after = param[3], offset = param[2], before = param[1]; @@ -24884,11 +24894,11 @@ /*<>*/ /*<>*/ caml_call1 (state[21], n); /*<>*/ format_string(state, after); - /*<>*/ return _m_; + /*<>*/ return sentinal; } function break_line(state, width){ /*<>*/ break_new_line(state, _a_, width); - /*<>*/ return _m_; + /*<>*/ return sentinal; /*<>*/ } function break_same_line(state, param){ var after = param[3], width = param[2], before = param[1]; @@ -24897,7 +24907,7 @@ /*<>*/ /*<>*/ caml_call1 (state[20], width); /*<>*/ format_string(state, after); - /*<>*/ return _m_; + /*<>*/ return sentinal; } function format_pp_token(state, size$0, param){ /*<>*/ if(typeof param === "number") @@ -24906,7 +24916,7 @@ /*<>*/ /*<>*/ var match$3 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$3) /*<>*/ return _m_; + if(! match$3) /*<>*/ return sentinal; /*<>*/ var tabs = match$3[1][1], /*<>*/ add_tab = @@ -24919,15 +24929,15 @@ : [0, x, add_tab(n, l)]; }; tabs[1] = add_tab(state[6] - state[9] | 0, tabs[1]); - return _m_; + return sentinal; case 1: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[2]); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 2: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[3]); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 3: /*<>*/ /*<>*/ var match$4 = @@ -24935,38 +24945,38 @@ if(match$4){ var width$0 = match$4[1][2]; /*<>*/ break_line(state, width$0); - /*<>*/ return _m_; + /*<>*/ return sentinal; } /*<>*/ pp_output_newline(state); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 4: - var _bM_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; - if(! _bM_) return _bM_; + var _bL_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; + if(! _bL_) return _bL_; /*<>*/ /*<>*/ var match$1 = /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); - if(! match$1) /*<>*/ return _m_; + if(! match$1) /*<>*/ return sentinal; var match$2 = match$1[1], size = match$2[1], length = match$2[3]; state[12] = state[12] - length | 0; state[9] = state[9] + size | 0; - return _m_; + return sentinal; default: /*<>*/ /*<>*/ var match$5 = /*<>*/ caml_call1(Stdlib_Stack[5], state[5]); - if(! match$5) /*<>*/ return _m_; + if(! match$5) /*<>*/ return sentinal; /*<>*/ var tag_name = match$5[1], /*<>*/ marker = /*<>*/ caml_call1(state[25], tag_name); /*<>*/ pp_output_string(state, marker); - /*<>*/ return _m_; + /*<>*/ return sentinal; } switch(param[0]){ case 0: var s = param[1]; /*<>*/ format_pp_text(state, size$0, s); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 1: /*<>*/ var breaks = param[2], @@ -24975,7 +24985,7 @@ before = breaks[1], /*<>*/ match$6 = /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(! match$6) /*<>*/ return _m_; + if(! match$6) /*<>*/ return sentinal; var match$7 = match$6[1], width$1 = match$7[2], @@ -24983,24 +24993,24 @@ /*<>*/ switch(box_type$0){ case 0: /*<>*/ break_same_line(state, fits); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 1: /*<>*/ break_new_line(state, breaks, width$1); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 2: /*<>*/ break_new_line(state, breaks, width$1); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 3: return state[9] < (size$0 + caml_ml_string_length(before) | 0) - ? (break_new_line(state, breaks, width$1), _m_) - : (break_same_line(state, fits), _m_); + ? (break_new_line(state, breaks, width$1), sentinal) + : (break_same_line(state, fits), sentinal); case 4: return state[11] - ? (break_same_line(state, fits), _m_) + ? (break_same_line(state, fits), sentinal) : state [9] < (size$0 + caml_ml_string_length(before) | 0) - ? (break_new_line(state, breaks, width$1), _m_) + ? (break_new_line(state, breaks, width$1), sentinal) : ((state [6] - width$1 @@ -25008,11 +25018,11 @@ + off | 0) < state[10] - ? (break_new_line(state, breaks, width$1), _m_) - : (break_same_line(state, fits), _m_); + ? (break_new_line(state, breaks, width$1), sentinal) + : (break_same_line(state, fits), sentinal); default: /*<>*/ break_same_line(state, fits); - /*<>*/ return _m_; + /*<>*/ return sentinal; } case 2: /*<>*/ var @@ -25021,7 +25031,7 @@ insertion_point = state[6] - state[9] | 0, /*<>*/ match$8 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$8) /*<>*/ return _m_; + if(! match$8) /*<>*/ return sentinal; /*<>*/ var tabs$0 = match$8[1][1], /*<>*/ match$9 = tabs$0[1]; @@ -25031,11 +25041,11 @@ if(param$0){ var tail = param$0[2], head = param$0[1]; if(insertion_point > head){var param$0 = tail; continue;} - var _bN_ = head; + var _bM_ = head; } else - var _bN_ = first; - var tab = _bN_; + var _bM_ = first; + var tab = _bM_; break; } } @@ -25045,10 +25055,10 @@ /*<>*/ return 0 <= offset ? (break_same_line (state, [0, cst$0, offset + n | 0, cst]), - _m_) + sentinal) : (break_new_line (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]), - _m_); + sentinal); case 3: var ty = param[2], @@ -25072,12 +25082,12 @@ 1 === ty ? 1 : state[9] < size$0 ? ty : 5; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 4: var tbox = param[1]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], tbox, state[3]); - /*<>*/ return _m_; + /*<>*/ return sentinal; default: /*<>*/ var tag_name$0 = param[1], @@ -25085,7 +25095,7 @@ /*<>*/ caml_call1(state[24], tag_name$0); /*<>*/ pp_output_string(state, marker$0); caml_call2(Stdlib_Stack[3], tag_name$0, state[5]); - return _m_; + return sentinal; } } function advance_left(state){ @@ -25099,10 +25109,10 @@ length = match$0[3], token = match$0[2], pending_count = state[13] - state[12] | 0, - /*<>*/ _bK_ = 0 <= size ? 1 : 0, - /*<>*/ _bL_ = - _bK_ || (state[9] <= pending_count ? 1 : 0); - if(! _bL_) /*<>*/ return _bL_; + /*<>*/ _bJ_ = 0 <= size ? 1 : 0, + /*<>*/ _bK_ = + _bJ_ || (state[9] <= pending_count ? 1 : 0); + if(! _bK_) /*<>*/ return _bK_; /*<>*/ /*<>*/ caml_call1 (Stdlib_Queue[5], state[28]); /*<>*/ /*<>*/ var @@ -25126,28 +25136,31 @@ queue_elem = [0, unknown, _b_, 0]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, -1, queue_elem], stack); - /*<>*/ return _m_; + /*<>*/ return sentinal; /*<>*/ } function set_size(state, ty){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[7], state[1]); - if(! match) /*<>*/ return _m_; + if(! match) /*<>*/ return sentinal; /*<>*/ var match$0 = match[1], queue_elem = match$0[2], left_total = match$0[1], /*<>*/ size = queue_elem[1]; - if(left_total < state[12]){initialize_scan_stack(state[1]); return _m_;} - var _bJ_ = queue_elem[2]; - if(typeof _bJ_ !== "number") - switch(_bJ_[0]){ + if(left_total < state[12]){ + initialize_scan_stack(state[1]); + return sentinal; + } + var _bI_ = queue_elem[2]; + if(typeof _bI_ !== "number") + switch(_bI_[0]){ case 3: if(1 - ty){ queue_elem[1] = state[13] + size | 0; /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[1]); } - /*<>*/ return _m_; + /*<>*/ return sentinal; case 1: case 2: if(ty){ @@ -25155,9 +25168,9 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[1]); } - /*<>*/ return _m_; + /*<>*/ return sentinal; } - /*<>*/ return _m_; + /*<>*/ return sentinal; /*<>*/ } function scan_push(state, b, token){ /*<>*/ pp_enqueue(state, token); @@ -25175,26 +25188,26 @@ /*<>*/ elem = [0, size, [3, indent, br_ty], 0]; /*<>*/ return scan_push(state, 0, elem); } - var _bI_ = state[14] === state[15] ? 1 : 0; - if(! _bI_) return _bI_; + var _bH_ = state[14] === state[15] ? 1 : 0; + if(! _bH_) return _bH_; var s = state[16]; /*<>*/ return enqueue_string_as (state, caml_ml_string_length(s), s); /*<>*/ } function pp_close_box(state, param){ - /*<>*/ var _bG_ = 1 < state[14] ? 1 : 0; - if(_bG_){ + /*<>*/ var _bF_ = 1 < state[14] ? 1 : 0; + if(_bF_){ 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 _bH_ = 0; + var _bG_ = 0; } else - var _bH_ = _bG_; - return _bH_; + var _bG_ = _bF_; + return _bG_; /*<>*/ } function pp_open_stag(state, tag_name){ /*<>*/ if(state[22]){ @@ -25203,8 +25216,8 @@ /*<>*/ /*<>*/ caml_call1 (state[26], tag_name); } - var _bF_ = state[23]; - if(! _bF_) return _bF_; + var _bE_ = state[23]; + if(! _bE_) return _bE_; /*<>*/ /*<>*/ var token = [5, tag_name]; /*<>*/ return pp_enqueue(state, [0, zero, token, 0]); @@ -25212,8 +25225,8 @@ function pp_close_stag(state, param){ /*<>*/ if(state[23]) /*<>*/ pp_enqueue(state, [0, zero, 5, 0]); - var _bD_ = state[22]; - if(_bD_){ + var _bC_ = state[22]; + if(_bC_){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[5], state[4]); if(match){ @@ -25221,11 +25234,11 @@ /*<>*/ return /*<>*/ caml_call1 (state[27], tag_name); } - var _bE_ = 0; + var _bD_ = 0; } else - var _bE_ = _bD_; - /*<>*/ return _bE_; + var _bD_ = _bC_; + /*<>*/ return _bD_; /*<>*/ } function pp_set_print_tags(state, b){ /*<>*/ state[22] = b; @@ -25279,26 +25292,26 @@ /*<>*/ return pp_open_box_gen(state, 0, 3); /*<>*/ } function pp_flush_queue(state, b){ - /*<>*/ var _bB_ = state[4]; - function _bC_(param){ + /*<>*/ var _bA_ = state[4]; + function _bB_(param){ /*<>*/ return pp_close_stag(state, 0); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[12], _bC_, _bB_); + (Stdlib_Stack[12], _bB_, _bA_); /*<>*/ for(;;){ if(1 >= state[14]){ state[13] = pp_infinity; /*<>*/ advance_left(state); if(b) /*<>*/ pp_output_newline(state); /*<>*/ pp_rinit(state); - /*<>*/ return _m_; + /*<>*/ return sentinal; } /*<>*/ pp_close_box(state, 0); } /*<>*/ } function pp_print_as_size(state, size, s){ - /*<>*/ var _bA_ = state[14] < state[15] ? 1 : 0; - return _bA_ ? enqueue_string_as(state, size, s) : _bA_; + /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; + return _bz_ ? enqueue_string_as(state, size, s) : _bz_; /*<>*/ } function pp_print_as(state, isize, s){ /*<>*/ return pp_print_as_size(state, isize, s); @@ -25357,20 +25370,20 @@ (state[18], 0); /*<>*/ } function pp_force_newline(state, param){ - /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; - return _bz_ ? enqueue_advance(state, [0, zero, 3, 0]) : _bz_; + /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; + return _by_ ? enqueue_advance(state, [0, zero, 3, 0]) : _by_; /*<>*/ } function pp_print_if_newline(state, param){ - /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; - return _by_ ? enqueue_advance(state, [0, zero, 4, 0]) : _by_; + /*<>*/ var _bx_ = state[14] < state[15] ? 1 : 0; + return _bx_ ? enqueue_advance(state, [0, zero, 4, 0]) : _bx_; /*<>*/ } function pp_print_custom_break(state, fits, breaks){ /*<>*/ var after = fits[3], width = fits[2], before = fits[1], - _bx_ = state[14] < state[15] ? 1 : 0; - if(! _bx_) return _bx_; + _bw_ = state[14] < state[15] ? 1 : 0; + if(! _bw_) return _bw_; /*<>*/ var size = - state[13] | 0, /*<>*/ token = [1, fits, breaks], @@ -25393,33 +25406,33 @@ /*<>*/ } function pp_open_tbox(state, param){ /*<>*/ state[14] = state[14] + 1 | 0; - var _bw_ = state[14] < state[15] ? 1 : 0; - if(! _bw_) return _bw_; + var _bv_ = state[14] < state[15] ? 1 : 0; + if(! _bv_) return _bv_; /*<>*/ /*<>*/ var elem = [0, zero, [4, [0, [0, 0]]], 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_close_tbox(state, param){ - /*<>*/ var _bt_ = 1 < state[14] ? 1 : 0; - if(_bt_){ - var _bu_ = state[14] < state[15] ? 1 : 0; - if(_bu_){ + /*<>*/ var _bs_ = 1 < state[14] ? 1 : 0; + if(_bs_){ + var _bt_ = state[14] < state[15] ? 1 : 0; + if(_bt_){ /*<>*/ /*<>*/ var elem = [0, zero, 2, 0]; /*<>*/ enqueue_advance(state, elem); state[14] = state[14] - 1 | 0; - var _bv_ = 0; + var _bu_ = 0; } else - var _bv_ = _bu_; + var _bu_ = _bt_; } else - var _bv_ = _bt_; - return _bv_; + var _bu_ = _bs_; + return _bu_; /*<>*/ } function pp_print_tbreak(state, width, offset){ - /*<>*/ var _bs_ = state[14] < state[15] ? 1 : 0; - if(! _bs_) return _bs_; + /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; + if(! _br_) return _br_; /*<>*/ var size = - state[13] | 0, /*<>*/ elem = [0, size, [2, width, offset], width]; @@ -25429,17 +25442,17 @@ /*<>*/ return pp_print_tbreak(state, 0, 0); /*<>*/ } function pp_set_tab(state, param){ - /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; - if(! _br_) return _br_; + /*<>*/ var _bq_ = state[14] < state[15] ? 1 : 0; + if(! _bq_) return _bq_; /*<>*/ /*<>*/ var elem = [0, zero, 0, 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_set_max_boxes(state, n){ /*<>*/ var - _bp_ = 1 < n ? 1 : 0, - _bq_ = _bp_ ? (state[15] = n, 0) : _bp_; - return _bq_; + _bo_ = 1 < n ? 1 : 0, + _bp_ = _bo_ ? (state[15] = n, 0) : _bo_; + return _bp_; /*<>*/ } function pp_get_max_boxes(state, param){ /*<>*/ return state[15]; @@ -25458,10 +25471,10 @@ /*<>*/ return n < 1000000010 ? n : 1000000009; /*<>*/ } function pp_set_max_indent(state, n$0){ - /*<>*/ var _bo_ = 1 < n$0 ? 1 : 0; - if(! _bo_) return _bo_; - var n$1 = state[6] - n$0 | 0, _bn_ = 1 <= n$1 ? 1 : 0; + /*<>*/ var _bn_ = 1 < n$0 ? 1 : 0; if(! _bn_) return _bn_; + var n$1 = state[6] - n$0 | 0, _bm_ = 1 <= n$1 ? 1 : 0; + if(! _bm_) return _bm_; /*<>*/ /*<>*/ var n = pp_limit(n$1); state[7] = n; state[8] = state[6] - state[7] | 0; @@ -25471,19 +25484,19 @@ /*<>*/ return state[8]; /*<>*/ } function pp_set_margin(state, n){ - /*<>*/ var _bl_ = 1 <= n ? 1 : 0; - if(! _bl_) return _bl_; + /*<>*/ var _bk_ = 1 <= n ? 1 : 0; + if(! _bk_) return _bk_; /*<>*/ /*<>*/ var n$0 = pp_limit(n); state[6] = n$0; if(state[8] <= state[6]) var new_max_indent = state[8]; else /*<>*/ var - /*<>*/ _bm_ = + /*<>*/ _bl_ = /*<>*/ caml_call2 (Stdlib_Int[11], state[6] - state[7] | 0, state[6] / 2 | 0), new_max_indent = - /*<>*/ caml_call2(Stdlib_Int[11], _bm_, 1); + /*<>*/ caml_call2(Stdlib_Int[11], _bl_, 1); /*<>*/ return pp_set_max_indent(state, new_max_indent); /*<>*/ } function validate_geometry(param){ @@ -25514,11 +25527,11 @@ /*<>*/ return pp_set_full_geometry(state, geometry); /*<>*/ var msg = match[1], - /*<>*/ _bk_ = + /*<>*/ _bj_ = /*<>*/ caml_call2 (Stdlib[28], cst_Format_pp_set_geometry, msg); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], _bk_], 1); + ([0, Stdlib[6], _bj_], 1); /*<>*/ } function pp_safe_set_geometry(state, max_indent, margin){ /*<>*/ /*<>*/ var @@ -25571,8 +25584,8 @@ function display_blanks(state, n){ /*<>*/ var n$0 = n; /*<>*/ for(;;){ - var _bj_ = 0 < n$0 ? 1 : 0; - if(! _bj_) return _bj_; + var _bi_ = 0 < n$0 ? 1 : 0; + if(! _bi_) return _bi_; if(80 >= n$0) /*<>*/ return /*<>*/ caml_call3 (state[17], blank_line, 0, n$0); @@ -25592,9 +25605,9 @@ (Stdlib[63], oc); /*<>*/ }; state[19] = - function(_bi_){ /*<>*/ return display_newline(state, _bi_);}; - state[20] = function(_bh_){ /*<>*/ return display_blanks(state, _bh_);}; - state[21] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; + function(_bh_){ /*<>*/ return display_newline(state, _bh_);}; + state[20] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; + state[21] = function(_bf_){ /*<>*/ return display_blanks(state, _bf_);}; return 0; /*<>*/ } function default_pp_mark_open_tag(param){ @@ -25602,23 +25615,23 @@ /*<>*/ return cst$10; /*<>*/ var s = param[2], - /*<>*/ _bf_ = + /*<>*/ _be_ = /*<>*/ caml_call2(Stdlib[28], s, cst$8); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$9, _bf_); + (Stdlib[28], cst$9, _be_); /*<>*/ } function default_pp_mark_close_tag(param){ /*<>*/ if(param[1] !== String_tag) /*<>*/ return cst$13; /*<>*/ var s = param[2], - /*<>*/ _be_ = + /*<>*/ _bd_ = /*<>*/ caml_call2(Stdlib[28], s, cst$11); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$12, _be_); + (Stdlib[28], cst$12, _bd_); /*<>*/ } - function default_pp_print_open_tag(_bd_){ /*<>*/ return 0;} - function default_pp_print_close_tag(_bc_){ /*<>*/ return 0;} + function default_pp_print_open_tag(_bc_){ /*<>*/ return 0;} + function default_pp_print_close_tag(_bb_){ /*<>*/ return 0;} function pp_make_formatter(f, g, h, i, j){ /*<>*/ var /*<>*/ pp_queue = @@ -25632,19 +25645,19 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, 1, sys_tok], scan_stack); /*<>*/ var - _a__ = Stdlib[19], - /*<>*/ _a$_ = + _a9_ = Stdlib[19], + /*<>*/ _a__ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _ba_ = + /*<>*/ _a$_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _bb_ = + /*<>*/ _ba_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0); /*<>*/ return [0, scan_stack, /*<>*/ caml_call1(Stdlib_Stack[2], 0), - _bb_, _ba_, _a$_, + _a__, 78, 10, 68, @@ -25654,7 +25667,7 @@ 1, 1, 1, - _a__, + _a9_, cst$14, f, g, @@ -25674,30 +25687,30 @@ (out_funs[1], out_funs[2], out_funs[3], out_funs[4], out_funs[5]); /*<>*/ } function make_formatter(output, flush){ - function _a2_(_a9_){ /*<>*/ return 0;} - function _a3_(_a8_){ /*<>*/ return 0;} + function _a1_(_a8_){ /*<>*/ return 0;} + function _a2_(_a7_){ /*<>*/ return 0;} /*<>*/ /*<>*/ var ppf = pp_make_formatter - (output, flush, function(_a7_){ /*<>*/ return 0;}, _a3_, _a2_); - ppf[19] = function(_a6_){ /*<>*/ return display_newline(ppf, _a6_);}; - ppf[20] = function(_a5_){ /*<>*/ return display_blanks(ppf, _a5_);}; - ppf[21] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; + (output, flush, function(_a6_){ /*<>*/ return 0;}, _a2_, _a1_); + ppf[19] = function(_a5_){ /*<>*/ return display_newline(ppf, _a5_);}; + ppf[20] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; + ppf[21] = function(_a3_){ /*<>*/ return display_blanks(ppf, _a3_);}; /*<>*/ return ppf; /*<>*/ } function formatter_of_out_channel(oc){ - function _a1_(param){ + function _a0_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _a1_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _a0_); /*<>*/ } function formatter_of_buffer(b){ - /*<>*/ function _aZ_(_a0_){ /*<>*/ return 0;} + /*<>*/ function _aY_(_aZ_){ /*<>*/ return 0;} /*<>*/ return make_formatter ( /*<>*/ caml_call1(Stdlib_Buffer[18], b), - _aZ_); + _aY_); /*<>*/ } var pp_buffer_size = 512; function pp_make_buffer(param){ @@ -25728,9 +25741,9 @@ (Stdlib_Domain[10][3], str_formatter_key, str_formatter); /*<>*/ function buffered_out_string(key, str, ofs, len){ /*<>*/ /*<>*/ var - _aY_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); + _aX_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); /*<>*/ return /*<>*/ caml_call4 - (Stdlib_Buffer[18], _aY_, str, ofs, len); + (Stdlib_Buffer[18], _aX_, str, ofs, len); /*<>*/ } function buffered_out_flush(oc, key, param){ /*<>*/ var @@ -25762,31 +25775,31 @@ err_buf_key = /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _i_); function _j_(param){ - function _aH_(_aX_){ /*<>*/ return 0;} - function _aI_(_aW_){ /*<>*/ return 0;} - function _aJ_(_aV_){ /*<>*/ return 0;} - var _aK_ = Stdlib[39]; - /*<>*/ function _aL_(_aU_){ - /*<>*/ return buffered_out_flush(_aK_, std_buf_key, _aU_); + function _aG_(_aW_){ /*<>*/ return 0;} + function _aH_(_aV_){ /*<>*/ return 0;} + function _aI_(_aU_){ /*<>*/ return 0;} + var _aJ_ = Stdlib[39]; + /*<>*/ function _aK_(_aT_){ + /*<>*/ return buffered_out_flush(_aJ_, std_buf_key, _aT_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_aR_, _aS_, _aT_){ - /*<>*/ return buffered_out_string(std_buf_key, _aR_, _aS_, _aT_); + (function(_aQ_, _aR_, _aS_){ + /*<>*/ return buffered_out_string(std_buf_key, _aQ_, _aR_, _aS_); }, - _aL_, - _aJ_, + _aK_, _aI_, - _aH_); - ppf[19] = function(_aQ_){ /*<>*/ return display_newline(ppf, _aQ_);}; - ppf[20] = function(_aP_){ /*<>*/ return display_blanks(ppf, _aP_);}; - ppf[21] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; - /*<>*/ function _aM_(_aN_){ - /*<>*/ return pp_print_flush(ppf, _aN_); + _aH_, + _aG_); + ppf[19] = function(_aP_){ /*<>*/ return display_newline(ppf, _aP_);}; + ppf[20] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; + ppf[21] = function(_aN_){ /*<>*/ return display_blanks(ppf, _aN_);}; + /*<>*/ function _aL_(_aM_){ + /*<>*/ return pp_print_flush(ppf, _aM_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _aM_); + (Stdlib_Domain[6], _aL_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -25795,31 +25808,31 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Domain[10][3], std_formatter_key, std_formatter); function _k_(param){ - function _aq_(_aG_){ /*<>*/ return 0;} - function _ar_(_aF_){ /*<>*/ return 0;} - function _as_(_aE_){ /*<>*/ return 0;} - var _at_ = Stdlib[40]; - /*<>*/ function _au_(_aD_){ - /*<>*/ return buffered_out_flush(_at_, err_buf_key, _aD_); + function _ap_(_aF_){ /*<>*/ return 0;} + function _aq_(_aE_){ /*<>*/ return 0;} + function _ar_(_aD_){ /*<>*/ return 0;} + var _as_ = Stdlib[40]; + /*<>*/ function _at_(_aC_){ + /*<>*/ return buffered_out_flush(_as_, err_buf_key, _aC_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_aA_, _aB_, _aC_){ - /*<>*/ return buffered_out_string(err_buf_key, _aA_, _aB_, _aC_); + (function(_az_, _aA_, _aB_){ + /*<>*/ return buffered_out_string(err_buf_key, _az_, _aA_, _aB_); }, - _au_, - _as_, + _at_, _ar_, - _aq_); - ppf[19] = function(_az_){ /*<>*/ return display_newline(ppf, _az_);}; - ppf[20] = function(_ay_){ /*<>*/ return display_blanks(ppf, _ay_);}; - ppf[21] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; - /*<>*/ function _av_(_aw_){ - /*<>*/ return pp_print_flush(ppf, _aw_); + _aq_, + _ap_); + ppf[19] = function(_ay_){ /*<>*/ return display_newline(ppf, _ay_);}; + ppf[20] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; + ppf[21] = function(_aw_){ /*<>*/ return display_blanks(ppf, _aw_);}; + /*<>*/ function _au_(_av_){ + /*<>*/ return pp_print_flush(ppf, _av_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _av_); + (Stdlib_Domain[6], _au_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -25862,7 +25875,7 @@ (stdbuf, str_formatter); /*<>*/ } function make_synchronized_formatter(output, flush){ - function _ao_(param){ + function _an_(param){ /*<>*/ var /*<>*/ buf = /*<>*/ caml_call1 @@ -25871,12 +25884,12 @@ /*<>*/ caml_call1(Stdlib_Buffer[18], buf); function flush$0(param){ /*<>*/ /*<>*/ var - _ap_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); + _ao_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); /*<>*/ /*<>*/ caml_call3 (output, /*<>*/ caml_call1(Stdlib_Buffer[2], buf), 0, - _ap_); + _ao_); /*<>*/ /*<>*/ caml_call1 (Stdlib_Buffer[8], buf); /*<>*/ return /*<>*/ caml_call1 @@ -25885,15 +25898,15 @@ /*<>*/ return make_formatter(output$0, flush$0); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, _ao_); + (Stdlib_Domain[10][1], 0, _an_); /*<>*/ } function synchronized_formatter_of_out_(oc){ - function _an_(param){ + function _am_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_synchronized_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _an_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _am_); /*<>*/ } function make_symbolic_output_buffer(param){ /*<>*/ return [0, 0]; /*<>*/ } @@ -25922,10 +25935,10 @@ /*<>*/ caml_call3 (Stdlib_String[15], s, i, n)]); } - /*<>*/ function g(_am_){ + /*<>*/ function g(_al_){ /*<>*/ return add_symbolic_output_item(sob, 0); } - /*<>*/ function h(_al_){ + /*<>*/ function h(_ak_){ /*<>*/ return add_symbolic_output_item(sob, 1); } /*<>*/ function i(n){ @@ -26312,8 +26325,8 @@ /*<>*/ } for(;;){ if(right[1] === len){ - var _ak_ = left[1] !== len ? 1 : 0; - return _ak_ ? flush(0) : _ak_; + var _aj_ = left[1] !== len ? 1 : 0; + return _aj_ ? flush(0) : _aj_; } /*<>*/ /*<>*/ var match = /*<>*/ runtime.caml_string_get(s, right[1]); @@ -26335,7 +26348,7 @@ else var none = - function(param, _aj_){ + function(param, _ai_){ /*<>*/ return 0; /*<>*/ }; /*<>*/ if(! param) @@ -26434,56 +26447,56 @@ var acc$1 = match[1]; /*<>*/ output_acc(ppf, p$0); /*<>*/ var - /*<>*/ _aa_ = compute_tag(output_acc, acc$1), + /*<>*/ _$_ = compute_tag(output_acc, acc$1), /*<>*/ match$0 = /*<>*/ caml_call1 - (CamlinternalFormat[20], _aa_), + (CamlinternalFormat[20], _$_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _ab_ = acc[1]; - if(typeof _ab_ !== "number" && 0 === _ab_[0]){ - var _ac_ = _ab_[2]; - if(typeof _ac_ !== "number" && 1 === _ac_[0]){ - var s$0 = acc[2], size = _ac_[2], p$2 = _ab_[1]; + var _aa_ = acc[1]; + if(typeof _aa_ !== "number" && 0 === _aa_[0]){ + var _ab_ = _aa_[2]; + if(typeof _ab_ !== "number" && 1 === _ab_[0]){ + var s$0 = acc[2], size = _ab_[2], p$2 = _aa_[1]; break b; } } - var s = acc[2], p$1 = _ab_; + var s = acc[2], p$1 = _aa_; break a; case 3: - var _ad_ = acc[1]; - if(typeof _ad_ !== "number" && 0 === _ad_[0]){ - var _ae_ = _ad_[2]; - if(typeof _ae_ !== "number" && 1 === _ae_[0]){ - var c$0 = acc[2], size$0 = _ae_[2], p$4 = _ad_[1]; + var _ac_ = acc[1]; + if(typeof _ac_ !== "number" && 0 === _ac_[0]){ + var _ad_ = _ac_[2]; + if(typeof _ad_ !== "number" && 1 === _ad_[0]){ + var c$0 = acc[2], size$0 = _ad_[2], p$4 = _ac_[1]; break; } } - var c = acc[2], p$3 = _ad_; + var c = acc[2], p$3 = _ac_; break c; case 4: - var _af_ = acc[1]; - if(typeof _af_ !== "number" && 0 === _af_[0]){ - var _ag_ = _af_[2]; - if(typeof _ag_ !== "number" && 1 === _ag_[0]){ - var s$0 = acc[2], size = _ag_[2], p$2 = _af_[1]; + var _ae_ = acc[1]; + if(typeof _ae_ !== "number" && 0 === _ae_[0]){ + var _af_ = _ae_[2]; + if(typeof _af_ !== "number" && 1 === _af_[0]){ + var s$0 = acc[2], size = _af_[2], p$2 = _ae_[1]; break b; } } - var s = acc[2], p$1 = _af_; + var s = acc[2], p$1 = _ae_; break a; case 5: - var _ah_ = acc[1]; - if(typeof _ah_ !== "number" && 0 === _ah_[0]){ - var _ai_ = _ah_[2]; - if(typeof _ai_ !== "number" && 1 === _ai_[0]){ - var c$0 = acc[2], size$0 = _ai_[2], p$4 = _ah_[1]; + var _ag_ = acc[1]; + if(typeof _ag_ !== "number" && 0 === _ag_[0]){ + var _ah_ = _ag_[2]; + if(typeof _ah_ !== "number" && 1 === _ah_[0]){ + var c$0 = acc[2], size$0 = _ah_[2], p$4 = _ag_[1]; break; } } - var c = acc[2], p$3 = _ah_; + var c = acc[2], p$3 = _ag_; break c; case 6: var f$0 = acc[2], p$5 = acc[1]; @@ -26541,56 +26554,56 @@ var acc$1 = match[1]; /*<>*/ strput_acc(ppf, p$0); /*<>*/ var - /*<>*/ _T_ = compute_tag(strput_acc, acc$1), + /*<>*/ _S_ = compute_tag(strput_acc, acc$1), /*<>*/ match$0 = /*<>*/ caml_call1 - (CamlinternalFormat[20], _T_), + (CamlinternalFormat[20], _S_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _U_ = acc[1]; - if(typeof _U_ !== "number" && 0 === _U_[0]){ - var _V_ = _U_[2]; - if(typeof _V_ !== "number" && 1 === _V_[0]){ - var s$0 = acc[2], size = _V_[2], p$2 = _U_[1]; + var _T_ = acc[1]; + if(typeof _T_ !== "number" && 0 === _T_[0]){ + var _U_ = _T_[2]; + if(typeof _U_ !== "number" && 1 === _U_[0]){ + var s$0 = acc[2], size = _U_[2], p$2 = _T_[1]; break b; } } - var s = acc[2], p$1 = _U_; + var s = acc[2], p$1 = _T_; break a; case 3: - var _W_ = acc[1]; - if(typeof _W_ !== "number" && 0 === _W_[0]){ - var _X_ = _W_[2]; - if(typeof _X_ !== "number" && 1 === _X_[0]){ - var c$0 = acc[2], size$0 = _X_[2], p$4 = _W_[1]; + var _V_ = acc[1]; + if(typeof _V_ !== "number" && 0 === _V_[0]){ + var _W_ = _V_[2]; + if(typeof _W_ !== "number" && 1 === _W_[0]){ + var c$0 = acc[2], size$0 = _W_[2], p$4 = _V_[1]; break; } } - var c = acc[2], p$3 = _W_; + var c = acc[2], p$3 = _V_; break c; case 4: - var _Y_ = acc[1]; - if(typeof _Y_ !== "number" && 0 === _Y_[0]){ - var _Z_ = _Y_[2]; - if(typeof _Z_ !== "number" && 1 === _Z_[0]){ - var s$0 = acc[2], size = _Z_[2], p$2 = _Y_[1]; + var _X_ = acc[1]; + if(typeof _X_ !== "number" && 0 === _X_[0]){ + var _Y_ = _X_[2]; + if(typeof _Y_ !== "number" && 1 === _Y_[0]){ + var s$0 = acc[2], size = _Y_[2], p$2 = _X_[1]; break b; } } - var s = acc[2], p$1 = _Y_; + var s = acc[2], p$1 = _X_; break a; case 5: - var ___ = acc[1]; - if(typeof ___ !== "number" && 0 === ___[0]){ - var _$_ = ___[2]; - if(typeof _$_ !== "number" && 1 === _$_[0]){ - var c$0 = acc[2], size$0 = _$_[2], p$4 = ___[1]; + var _Z_ = acc[1]; + if(typeof _Z_ !== "number" && 0 === _Z_[0]){ + var ___ = _Z_[2]; + if(typeof ___ !== "number" && 1 === ___[0]){ + var c$0 = acc[2], size$0 = ___[2], p$4 = _Z_[1]; break; } } - var c = acc[2], p$3 = ___; + var c = acc[2], p$3 = _Z_; break c; case 6: var p$5 = acc[1]; @@ -26636,13 +26649,13 @@ function kfprintf(k, ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _R_ = 0; - function _S_(acc){ + /*<>*/ _Q_ = 0; + function _R_(acc){ /*<>*/ output_acc(ppf, acc); return caml_call1(k, ppf); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _S_, _R_, fmt); + (CamlinternalFormat[7], _R_, _Q_, fmt); } function ikfprintf(k, ppf, param){ var fmt = param[1]; @@ -26652,47 +26665,47 @@ function ifprintf(ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _O_ = 0; - function _P_(_Q_){ /*<>*/ return 0;} + /*<>*/ _N_ = 0; + function _O_(_P_){ /*<>*/ return 0;} /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[8], _P_, _O_, fmt); + (CamlinternalFormat[8], _O_, _N_, fmt); } function fprintf(ppf){ - function _L_(_N_){ /*<>*/ return 0;} - /*<>*/ return function(_M_){ - /*<>*/ return kfprintf(_L_, ppf, _M_);}; + function _K_(_M_){ /*<>*/ return 0;} + /*<>*/ return function(_L_){ + /*<>*/ return kfprintf(_K_, ppf, _L_);}; /*<>*/ } function printf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _J_ = 0; - function _K_(acc){ + /*<>*/ _I_ = 0; + function _J_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], std_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _K_, _J_, fmt); + (CamlinternalFormat[7], _J_, _I_, fmt); } function eprintf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _H_ = 0; - function _I_(acc){ + /*<>*/ _G_ = 0; + function _H_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], err_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _I_, _H_, fmt); + (CamlinternalFormat[7], _H_, _G_, fmt); } function kdprintf(k, param){ /*<>*/ var fmt = param[1], - /*<>*/ _F_ = 0; - function _G_(acc){ + /*<>*/ _E_ = 0; + function _F_(acc){ /*<>*/ return /*<>*/ caml_call1 (k, function(ppf){ @@ -26700,7 +26713,7 @@ /*<>*/ }); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _G_, _F_, fmt); + (CamlinternalFormat[7], _F_, _E_, fmt); } function dprintf(fmt){ /*<>*/ return kdprintf @@ -26758,44 +26771,44 @@ /*<>*/ var /*<>*/ fs = pp_get_formatter_out_functions(std_formatter, 0), - _n_ = fs[5], - _o_ = fs[4], - _p_ = fs[3], - _q_ = Stdlib[39]; - /*<>*/ function _r_(_E_){ - /*<>*/ return buffered_out_flush(_q_, std_buf_key, _E_); + _m_ = fs[5], + _n_ = fs[4], + _o_ = fs[3], + _p_ = Stdlib[39]; + /*<>*/ function _q_(_D_){ + /*<>*/ return buffered_out_flush(_p_, std_buf_key, _D_); } /*<>*/ pp_set_formatter_out_functions (std_formatter, [0, - function(_B_, _C_, _D_){ - /*<>*/ return buffered_out_string(std_buf_key, _B_, _C_, _D_); + function(_A_, _B_, _C_){ + /*<>*/ return buffered_out_string(std_buf_key, _A_, _B_, _C_); }, - _r_, - _p_, + _q_, _o_, - _n_]); + _n_, + _m_]); /*<>*/ var /*<>*/ fs$0 = pp_get_formatter_out_functions(err_formatter, 0), - _s_ = fs$0[5], - _t_ = fs$0[4], - _u_ = fs$0[3], - _v_ = Stdlib[40]; - /*<>*/ function _w_(_A_){ - /*<>*/ return buffered_out_flush(_v_, err_buf_key, _A_); + _r_ = fs$0[5], + _s_ = fs$0[4], + _t_ = fs$0[3], + _u_ = Stdlib[40]; + /*<>*/ function _v_(_z_){ + /*<>*/ return buffered_out_flush(_u_, err_buf_key, _z_); } /*<>*/ return pp_set_formatter_out_functions (err_formatter, [0, - function(_x_, _y_, _z_){ + function(_w_, _x_, _y_){ /*<>*/ return buffered_out_string - (err_buf_key, _x_, _y_, _z_); + (err_buf_key, _w_, _x_, _y_); }, - _w_, - _u_, + _v_, _t_, - _s_]); + _s_, + _r_]); /*<>*/ } /*<>*/ /*<>*/ caml_call1 (Stdlib_Domain[5], _l_); @@ -26996,7 +27009,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - _u_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$3 = cst$5, cst$4 = cst$5, @@ -27120,9 +27133,9 @@ if(10 === c) ib[5] = ib[5] + 1 | 0; /*<>*/ return c; } - catch(_bc_){ - var _bb_ = caml_wrap_exception(_bc_); - if(_bb_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_bb_, 0); + catch(_bb_){ + var _ba_ = caml_wrap_exception(_bb_); + if(_ba_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_ba_, 0); ib[2] = null_char; ib[3] = 0; ib[1] = 1; @@ -27215,8 +27228,8 @@ /*<>*/ return create(1, next); /*<>*/ } var _a_ = 0; - /*<>*/ function from_function(_ba_){ - /*<>*/ return create(_a_, _ba_); + /*<>*/ function from_function(_a$_){ + /*<>*/ return create(_a_, _a$_); } /*<>*/ /*<>*/ var len = 1024; function scan_close_at_end(ic){ @@ -27263,12 +27276,12 @@ return from_ic(scan_close_at_end, [1, fname, ic], ic); /*<>*/ } var _b_ = Stdlib[79]; - /*<>*/ function open_in(_a$_){ - /*<>*/ return open_in_file(_b_, _a$_); + /*<>*/ function open_in(_a__){ + /*<>*/ return open_in_file(_b_, _a__); } /*<>*/ /*<>*/ var _c_ = Stdlib[80]; - /*<>*/ function open_in_bin(_a__){ - /*<>*/ return open_in_file(_c_, _a__); + /*<>*/ function open_in_bin(_a9_){ + /*<>*/ return open_in_file(_c_, _a9_); } function from_channel(ic){ /*<>*/ return from_ic(scan_raise_at_end, [0, ic], ic); @@ -27331,15 +27344,15 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _a8_ = 1 - ib[1]; - if(! _a8_) /*<>*/ return _a8_; - /*<>*/ /*<>*/ var _a9_ = c - 9 | 0; + /*<>*/ _a7_ = 1 - ib[1]; + if(! _a7_) /*<>*/ return _a7_; + /*<>*/ /*<>*/ var _a8_ = c - 9 | 0; a: { - if(4 < _a9_ >>> 0){ - if(23 === _a9_) break a; + if(4 < _a8_ >>> 0){ + if(23 === _a8_) break a; } - else if(1 < _a9_ - 2 >>> 0) break a; + else if(1 < _a8_ - 2 >>> 0) break a; /*<>*/ return 0; } /*<>*/ invalidate_current_char(ib); @@ -27385,23 +27398,23 @@ /*<>*/ switch(conv){ case 0: /*<>*/ var - /*<>*/ _a4_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a4_); + /*<>*/ _a3_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a3_); break; case 3: /*<>*/ var - /*<>*/ _a5_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a5_); + /*<>*/ _a4_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a4_); break; case 4: /*<>*/ var - /*<>*/ _a6_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a6_); + /*<>*/ _a5_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a5_); break; case 5: /*<>*/ var - /*<>*/ _a7_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a7_); + /*<>*/ _a6_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a6_); break; default: var tok = token_string(ib); } @@ -27486,31 +27499,31 @@ function is_binary_digit(param){ /*<>*/ return 1 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_binary_int(_a2_, _a3_){ - /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a2_, _a3_); + /*<>*/ function scan_binary_int(_a1_, _a2_){ + /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a1_, _a2_); } function is_octal_digit(param){ /*<>*/ return 7 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_octal_int(_a0_, _a1_){ - /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _a0_, _a1_); + /*<>*/ function scan_octal_int(_aZ_, _a0_){ + /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _aZ_, _a0_); } function is_hexa_digit(param){ /*<>*/ /*<>*/ var - _aZ_ = param - 48 | 0; + _aY_ = param - 48 | 0; a: { - if(22 < _aZ_ >>> 0){ - if(5 < _aZ_ - 49 >>> 0) break a; + if(22 < _aY_ >>> 0){ + if(5 < _aY_ - 49 >>> 0) break a; } - else if(6 >= _aZ_ - 10 >>> 0) break a; + else if(6 >= _aY_ - 10 >>> 0) break a; /*<>*/ return 1; } /*<>*/ return 0; /*<>*/ } - /*<>*/ function scan_hexadecimal_int(_aX_, _aY_){ + /*<>*/ function scan_hexadecimal_int(_aW_, _aX_){ /*<>*/ return scan_digit_plus - (cst_hexadecimal, is_hexa_digit, _aX_, _aY_); + (cst_hexadecimal, is_hexa_digit, _aW_, _aX_); } function scan_sign(width, ib){ /*<>*/ var @@ -27630,38 +27643,38 @@ /*<>*/ len = /*<>*/ caml_ml_string_length(str), /*<>*/ width$0 = [0, width], - /*<>*/ _aU_ = len - 1 | 0, - /*<>*/ _aT_ = 0; - if(_aU_ >= 0){ - var i = _aT_; + /*<>*/ _aT_ = len - 1 | 0, + /*<>*/ _aS_ = 0; + if(_aT_ >= 0){ + var i = _aS_; for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _aV_ = + /*<>*/ _aU_ = lowercase( /*<>*/ caml_string_get(str, i)); - if(lowercase(c) !== _aV_) + if(lowercase(c) !== _aU_) /*<>*/ /*<>*/ caml_call1(error, 0); if(0 === width$0[1]) /*<>*/ /*<>*/ caml_call1(error, 0); width$0[1] = store_char(width$0[1], ib, c); - /*<>*/ /*<>*/ var _aW_ = i + 1 | 0; - if(_aU_ === i) break; - var i = _aW_; + /*<>*/ /*<>*/ var _aV_ = i + 1 | 0; + if(_aT_ === i) break; + var i = _aV_; } } return width$0[1]; /*<>*/ } function scan_hex_float(width, precision, ib){ /*<>*/ var - _aG_ = 0 === width ? 1 : 0, - _aH_ = _aG_ || end_of_input(ib); - /*<>*/ if(_aH_) + _aF_ = 0 === width ? 1 : 0, + _aG_ = _aF_ || end_of_input(ib); + /*<>*/ if(_aG_) /*<>*/ bad_hex_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _aI_ = 0 === width$0 ? 1 : 0, - _aJ_ = _aI_ || end_of_input(ib); - /*<>*/ if(_aJ_) + _aH_ = 0 === width$0 ? 1 : 0, + _aI_ = _aH_ || end_of_input(ib); + /*<>*/ if(_aI_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); a: @@ -27673,9 +27686,9 @@ if(32 <= switcher) break a; /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _aK_ = 0 === width$1 ? 1 : 0, - _aL_ = _aK_ || end_of_input(ib); - /*<>*/ if(_aL_) + _aJ_ = 0 === width$1 ? 1 : 0, + _aK_ = _aJ_ || end_of_input(ib); + /*<>*/ if(_aK_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$1, ib, bad_hex_float, cst_an); @@ -27686,24 +27699,24 @@ if(48 === c){ /*<>*/ var /*<>*/ width$3 = store_char(width$0, ib, c), - _aO_ = 0 === width$3 ? 1 : 0, - _aP_ = _aO_ || end_of_input(ib); - /*<>*/ if(_aP_) + _aN_ = 0 === width$3 ? 1 : 0, + _aO_ = _aN_ || end_of_input(ib); + /*<>*/ if(_aO_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ var width$4 = check_case_insensitive_string(width$3, ib, bad_hex_float, cst_x); /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var - _aQ_ = peek_char(ib) - 46 | 0; + _aP_ = peek_char(ib) - 46 | 0; b: { c: { - if(34 < _aQ_ >>> 0){ - if(66 === _aQ_) break c; + if(34 < _aP_ >>> 0){ + if(66 === _aP_) break c; } - else if(32 < _aQ_ - 1 >>> 0) break c; + else if(32 < _aP_ - 1 >>> 0) break c; var width$5 = scan_hexadecimal_int(width$4, ib); break b; } @@ -27751,9 +27764,9 @@ /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$1), - _aR_ = 0 === width$9 ? 1 : 0, - _aS_ = _aR_ || end_of_input(ib); - /*<>*/ if(_aS_) + _aQ_ = 0 === width$9 ? 1 : 0, + _aR_ = _aQ_ || end_of_input(ib); + /*<>*/ if(_aR_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -27768,9 +27781,9 @@ } /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _aM_ = 0 === width$2 ? 1 : 0, - _aN_ = _aM_ || end_of_input(ib); - /*<>*/ if(_aN_) + _aL_ = 0 === width$2 ? 1 : 0, + _aM_ = _aL_ || end_of_input(ib); + /*<>*/ if(_aM_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$2, ib, bad_hex_float, cst_nfinity); @@ -27779,14 +27792,14 @@ /*<>*/ } function scan_caml_float_rest(width, precision, ib){ /*<>*/ var - _aC_ = 0 === width ? 1 : 0, - _aD_ = _aC_ || end_of_input(ib); - /*<>*/ if(_aD_) /*<>*/ bad_float(0); + _aB_ = 0 === width ? 1 : 0, + _aC_ = _aB_ || end_of_input(ib); + /*<>*/ if(_aC_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_decimal_digit_star(width, ib), - _aE_ = 0 === width$0 ? 1 : 0, - _aF_ = _aE_ || end_of_input(ib); - /*<>*/ if(_aF_) /*<>*/ bad_float(0); + _aD_ = 0 === width$0 ? 1 : 0, + _aE_ = _aD_ || end_of_input(ib); + /*<>*/ if(_aE_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c = peek_char(ib), /*<>*/ switcher = c - 69 | 0; @@ -27810,22 +27823,22 @@ /*<>*/ } function scan_caml_float(width, precision, ib){ /*<>*/ var - _ao_ = 0 === width ? 1 : 0, - _ap_ = _ao_ || end_of_input(ib); - /*<>*/ if(_ap_) /*<>*/ bad_float(0); + _an_ = 0 === width ? 1 : 0, + _ao_ = _an_ || end_of_input(ib); + /*<>*/ if(_ao_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _aq_ = 0 === width$0 ? 1 : 0, - _ar_ = _aq_ || end_of_input(ib); - /*<>*/ if(_ar_) /*<>*/ bad_float(0); + _ap_ = 0 === width$0 ? 1 : 0, + _aq_ = _ap_ || end_of_input(ib); + /*<>*/ if(_aq_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); if(49 <= c){ if(58 > c){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _as_ = 0 === width$1 ? 1 : 0, - _at_ = _as_ || end_of_input(ib); - /*<>*/ if(_at_) /*<>*/ bad_float(0); + _ar_ = 0 === width$1 ? 1 : 0, + _as_ = _ar_ || end_of_input(ib); + /*<>*/ if(_as_) /*<>*/ bad_float(0); /*<>*/ return scan_caml_float_rest (width$1, precision, ib); } @@ -27833,9 +27846,9 @@ else if(48 <= c){ /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _au_ = 0 === width$2 ? 1 : 0, - _av_ = _au_ || end_of_input(ib); - /*<>*/ if(_av_) /*<>*/ bad_float(0); + _at_ = 0 === width$2 ? 1 : 0, + _au_ = _at_ || end_of_input(ib); + /*<>*/ if(_au_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c$0 = peek_char(ib); if(88 !== c$0 && 120 !== c$0) @@ -27843,14 +27856,14 @@ (width$2, precision, ib); /*<>*/ var /*<>*/ width$3 = store_char(width$2, ib, c$0), - _aw_ = 0 === width$3 ? 1 : 0, - _ax_ = _aw_ || end_of_input(ib); - /*<>*/ if(_ax_) /*<>*/ bad_float(0); + _av_ = 0 === width$3 ? 1 : 0, + _aw_ = _av_ || end_of_input(ib); + /*<>*/ if(_aw_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$4 = scan_hexadecimal_int(width$3, ib), - _ay_ = 0 === width$4 ? 1 : 0, - _az_ = _ay_ || end_of_input(ib); - /*<>*/ if(_az_) /*<>*/ bad_float(0); + _ax_ = 0 === width$4 ? 1 : 0, + _ay_ = _ax_ || end_of_input(ib); + /*<>*/ if(_ay_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c$1 = peek_char(ib), /*<>*/ switcher = c$1 - 80 | 0; @@ -27903,9 +27916,9 @@ if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$2), - _aA_ = 0 === width$9 ? 1 : 0, - _aB_ = _aA_ || end_of_input(ib); - /*<>*/ if(_aB_) + _az_ = 0 === width$9 ? 1 : 0, + _aA_ = _az_ || end_of_input(ib); + /*<>*/ if(_aA_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -27922,13 +27935,13 @@ /*<>*/ if(ib[1]) /*<>*/ return width$0; if(! stp){ - /*<>*/ /*<>*/ var _an_ = c - 9 | 0; + /*<>*/ /*<>*/ var _am_ = c - 9 | 0; a: { - if(4 < _an_ >>> 0){ - if(23 === _an_) break a; + if(4 < _am_ >>> 0){ + if(23 === _am_) break a; } - else if(1 < _an_ - 2 >>> 0) break a; + else if(1 < _am_ - 2 >>> 0) break a; /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), width$0 = width$2; @@ -27958,11 +27971,11 @@ (Stdlib_Printf[4], _f_, message)) : c; /*<>*/ } - /*<>*/ function check_next_char_for_char(_al_, _am_){ - /*<>*/ return check_next_char(cst_a_Char, _al_, _am_); + /*<>*/ function check_next_char_for_char(_ak_, _al_){ + /*<>*/ return check_next_char(cst_a_Char, _ak_, _al_); } - /*<>*/ function check_next_char_for_string(_aj_, _ak_){ - /*<>*/ return check_next_char(cst_a_String, _aj_, _ak_); + /*<>*/ function check_next_char_for_string(_ai_, _aj_){ + /*<>*/ return check_next_char(cst_a_String, _ai_, _aj_); } function scan_backslash_char(width, ib){ /*<>*/ /*<>*/ var @@ -27988,16 +28001,16 @@ b: { if(0 <= c && 255 >= c){ - var _ah_ = /*<>*/ caml_call1(Stdlib[29], c); + var _ag_ = /*<>*/ caml_call1(Stdlib[29], c); break b; } var - _ah_ = + _ag_ = bad_input ( /*<>*/ caml_call4 (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); } - /*<>*/ return store_char(width - 2 | 0, ib, _ah_); + /*<>*/ return store_char(width - 2 | 0, ib, _ag_); } /*<>*/ /*<>*/ var switcher = c0 - 92 | 0; @@ -28009,34 +28022,34 @@ function(param){ /*<>*/ var /*<>*/ c = next_char(ib), - /*<>*/ _ai_ = c - 48 | 0; + /*<>*/ _ah_ = c - 48 | 0; a: { - if(22 < _ai_ >>> 0){ - if(5 < _ai_ - 49 >>> 0) break a; + if(22 < _ah_ >>> 0){ + if(5 < _ah_ - 49 >>> 0) break a; } - else if(6 >= _ai_ - 10 >>> 0) break a; + else if(6 >= _ah_ - 10 >>> 0) break a; /*<>*/ return c; } /*<>*/ return bad_input_escape(c); /*<>*/ }, /*<>*/ c1 = get_digit(0), /*<>*/ c2 = get_digit(0), - /*<>*/ _ae_ = hexadecimal_value_of_char(c2), - c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ae_ | 0; + /*<>*/ _ad_ = hexadecimal_value_of_char(c2), + c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ad_ | 0; b: { if(0 <= c$0 && 255 >= c$0){ - var _ag_ = /*<>*/ caml_call1(Stdlib[29], c$0); + var _af_ = /*<>*/ caml_call1(Stdlib[29], c$0); break b; } var - _ag_ = + _af_ = bad_input ( /*<>*/ caml_call3 (Stdlib_Printf[4], _m_, c1, c2)); } - /*<>*/ return store_char(width - 2 | 0, ib, _ag_); + /*<>*/ return store_char(width - 2 | 0, ib, _af_); case 0: case 6: case 18: @@ -28052,17 +28065,17 @@ if(117 > c0) switch(c0 - 110 | 0){ case 0: - var _af_ = 10; break b; + var _ae_ = 10; break b; case 4: - var _af_ = 13; break b; + var _ae_ = 13; break b; case 6: - var _af_ = 9; break b; + var _ae_ = 9; break b; } } - else if(98 === c0){var _af_ = 8; break b;} - var _af_ = c0; + else if(98 === c0){var _ae_ = 8; break b;} + var _ae_ = c0; } - /*<>*/ return store_char(width, ib, _af_); + /*<>*/ return store_char(width, ib, _ae_); } /*<>*/ return bad_input_escape(c0); /*<>*/ } @@ -28080,24 +28093,24 @@ check_next_char_for_string(width$1, ib); if(10 === match){ /*<>*/ /*<>*/ var - _ac_ = ignore_char(width$1, ib); + _ab_ = ignore_char(width$1, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ac_]); + (skip_spaces, [0, _ab_]); var counter$0 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$0, _ac_); + /*<>*/ return skip_spaces(counter$0, _ab_); } if(13 === match){ /*<>*/ /*<>*/ var width$3 = ignore_char(width$1, ib); if(10 === check_next_char_for_string(width$3, ib)){ /*<>*/ /*<>*/ var - _ad_ = ignore_char(width$3, ib); + _ac_ = ignore_char(width$3, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ad_]); + (skip_spaces, [0, _ac_]); var counter$1 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$1, _ad_); + /*<>*/ return skip_spaces(counter$1, _ac_); } /*<>*/ var /*<>*/ width$5 = store_char(width$3, ib, 13), @@ -28144,39 +28157,39 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - ___ = 0 < i$0 ? 1 : 0; - if(___){ + _Z_ = 0 < i$0 ? 1 : 0; + if(_Z_){ /*<>*/ /*<>*/ var - _$_ = 1 - ib[1]; - if(_$_) + ___ = 1 - ib[1]; + if(___) /*<>*/ var - /*<>*/ _aa_ = + /*<>*/ _$_ = /*<>*/ caml_call2 (CamlinternalFormat[1], char_set, c), - /*<>*/ _ab_ = _aa_ ? c !== stp ? 1 : 0 : _aa_; + /*<>*/ _aa_ = _$_ ? c !== stp ? 1 : 0 : _$_; else - var _ab_ = _$_; + var _aa_ = ___; } else - var _ab_ = ___; - if(! _ab_) return _ab_; + var _aa_ = _Z_; + if(! _aa_) return _aa_; /*<>*/ store_char(Stdlib[19], ib, c); var i$1 = i$0 - 1 | 0, i$0 = i$1; } /*<>*/ } if(! scan_indic){ /*<>*/ scan_chars(width, -1); - /*<>*/ return _u_; + /*<>*/ return sentinal; } var c = scan_indic[1]; /*<>*/ scan_chars(width, c); - /*<>*/ /*<>*/ var _Z_ = 1 - ib[1]; - if(! _Z_) /*<>*/ return _Z_; + /*<>*/ /*<>*/ var _Y_ = 1 - ib[1]; + if(! _Y_) /*<>*/ return _Y_; /*<>*/ /*<>*/ var ci = peek_char(ib); return c === ci - ? (invalidate_current_char(ib), _u_) - : (character_mismatch(c, ci), _u_); + ? (invalidate_current_char(ib), sentinal) + : (character_mismatch(c, ci), sentinal); /*<>*/ } function scanf_bad_input(ib, x){ /*<>*/ if(x[1] === Scan_failure) @@ -28253,17 +28266,17 @@ /*<>*/ var rest$13 = fmt$0[3], fmtty = fmt$0[2], - /*<>*/ _W_ = + /*<>*/ _V_ = /*<>*/ caml_call1(CamlinternalFormat[21], fmtty), - /*<>*/ _X_ = + /*<>*/ _W_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _W_); + (CamlinternalFormatBasics[2], _V_); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (take_fmtty_format_readers$0, [0, k, _X_, rest$13]); + (take_fmtty_format_readers$0, [0, k, _W_, rest$13]); var counter$0 = counter + 1 | 0; /*<>*/ return take_fmtty_format_readers$0 - (counter$0, k, _X_, rest$13); + (counter$0, k, _W_, rest$13); case 15: var rest$14 = fmt$0[1], fmt$0 = rest$14; break; case 16: @@ -28271,11 +28284,11 @@ case 17: var rest$16 = fmt$0[2], fmt$0 = rest$16; break; case 18: - var _Y_ = fmt$0[1]; - if(0 === _Y_[0]) + var _X_ = fmt$0[1]; + if(0 === _X_[0]) /*<>*/ var rest$17 = fmt$0[2], - fmt$1 = _Y_[1][1], + fmt$1 = _X_[1][1], /*<>*/ fmt$2 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$1, rest$17), @@ -28283,7 +28296,7 @@ else /*<>*/ var rest$18 = fmt$0[2], - fmt$3 = _Y_[1][1], + fmt$3 = _X_[1][1], /*<>*/ fmt$4 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$3, rest$18), @@ -28393,11 +28406,11 @@ rest = fmtty$0[3], ty2 = fmtty$0[2], ty1 = fmtty$0[1], - /*<>*/ _V_ = + /*<>*/ _U_ = /*<>*/ caml_call1(CamlinternalFormat[21], ty1), /*<>*/ ty = /*<>*/ caml_call2 - (CamlinternalFormat[22], _V_, ty2), + (CamlinternalFormat[22], _U_, ty2), /*<>*/ fmtty$10 = /*<>*/ caml_call2 (CamlinternalFormatBasics[1], ty, rest), @@ -28502,8 +28515,8 @@ /*<>*/ /*<>*/ var c = check_next_char_for_char(width, ib); return 39 === c - ? (ignore_char(width, ib), _u_) - : (character_mismatch(39, c), _u_); + ? (ignore_char(width, ib), sentinal) + : (character_mismatch(39, c), sentinal); /*<>*/ }, /*<>*/ c = checked_peek_char(ib); if(39 === c){ @@ -28544,11 +28557,11 @@ /*<>*/ return pad_prec_scanf (ib, str_rest, readers, pad, 0, scan$0, token_string); case 18: - var _H_ = match[1]; - if(0 === _H_[0]){ + var _G_ = match[1]; + if(0 === _G_[0]){ /*<>*/ var rest$3 = match[2], - fmt$1 = _H_[1][1], + fmt$1 = _G_[1][1], /*<>*/ scan$1 = function(width, param, ib){ /*<>*/ return scan_string(_q_, width, ib); @@ -28565,7 +28578,7 @@ } /*<>*/ var rest$4 = match[2], - fmt$2 = _H_[1][1], + fmt$2 = _G_[1][1], /*<>*/ scan$2 = function(width, param, ib){ /*<>*/ return scan_string(_r_, width, ib); @@ -28742,7 +28755,7 @@ rest$13 = fmt$0[2], pad$8 = fmt$0[1], /*<>*/ scan$8 = - function(param, _U_, ib){ + function(param, _T_, ib){ /*<>*/ var /*<>*/ c = checked_peek_char(ib), /*<>*/ m = @@ -28768,10 +28781,10 @@ /*<>*/ var rest$15 = fmt$0[2], str$0 = fmt$0[1], - /*<>*/ _I_ = - function(_T_){ /*<>*/ return check_char(ib, _T_);}; + /*<>*/ _H_ = + function(_S_){ /*<>*/ return check_char(ib, _S_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _I_, str$0); + (Stdlib_String[29], _H_, str$0); var fmt$0 = rest$15; break; case 12: @@ -28787,10 +28800,10 @@ s = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _J_ = + /*<>*/ _I_ = /*<>*/ caml_call2 (CamlinternalFormat[14], s, fmtty), - fmt$3 = _J_; + fmt$3 = _I_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -28816,23 +28829,23 @@ /*<>*/ caml_call2 (CamlinternalFormat[13], 0, s$0) [1], - /*<>*/ _L_ = + /*<>*/ _K_ = /*<>*/ caml_call1 (CamlinternalFormat[21], fmtty$0), - /*<>*/ _M_ = + /*<>*/ _L_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _L_), + (CamlinternalFormatBasics[2], _K_), /*<>*/ fmt$8 = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$7, _M_), - /*<>*/ _N_ = + (CamlinternalFormat[12], fmt$7, _L_), + /*<>*/ _M_ = /*<>*/ caml_call1 (CamlinternalFormatBasics[2], fmtty$0), - /*<>*/ _O_ = + /*<>*/ _N_ = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$6, _N_), + (CamlinternalFormat[12], fmt$6, _M_), fmt$5 = fmt$8, - fmt$4 = _O_; + fmt$4 = _N_; } catch(exn){ var exn$0 = caml_wrap_exception(exn); @@ -28840,9 +28853,9 @@ throw caml_maybe_attach_backtrace(exn$0, 0); var msg$0 = exn$0[2], - _K_ = bad_input(msg$0), - fmt$5 = _K_[2], - fmt$4 = _K_[1]; + _J_ = bad_input(msg$0), + fmt$5 = _J_[2], + fmt$4 = _J_[1]; } /*<>*/ return [0, [0, fmt$4, s$0], @@ -28861,19 +28874,19 @@ /*<>*/ var rest$19 = fmt$0[2], formatting_lit = fmt$0[1], - /*<>*/ _P_ = + /*<>*/ _O_ = /*<>*/ caml_call1 (CamlinternalFormat[17], formatting_lit), - /*<>*/ _Q_ = - function(_S_){ /*<>*/ return check_char(ib, _S_);}; + /*<>*/ _P_ = + function(_R_){ /*<>*/ return check_char(ib, _R_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _Q_, _P_); + (Stdlib_String[29], _P_, _O_); var fmt$0 = rest$19; break; case 18: - var _R_ = fmt$0[1]; - if(0 === _R_[0]){ - var rest$20 = fmt$0[2], fmt$9 = _R_[1][1]; + var _Q_ = fmt$0[1]; + if(0 === _Q_[0]){ + var rest$20 = fmt$0[2], fmt$9 = _Q_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 123); /*<>*/ var @@ -28883,7 +28896,7 @@ fmt$0 = fmt$10; } else{ - var rest$21 = fmt$0[2], fmt$11 = _R_[1][1]; + var rest$21 = fmt$0[2], fmt$11 = _Q_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 91); /*<>*/ var @@ -28992,16 +29005,16 @@ if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); /*<>*/ var msg = exc[2], - /*<>*/ _D_ = + /*<>*/ _C_ = /*<>*/ caml_call1(Stdlib_String[24], str), - /*<>*/ _E_ = - /*<>*/ caml_call2(Stdlib[28], _D_, cst$0), - /*<>*/ _F_ = - /*<>*/ caml_call2(Stdlib[28], cst_in_format, _E_), - /*<>*/ _G_ = - /*<>*/ caml_call2(Stdlib[28], msg, _F_); + /*<>*/ _D_ = + /*<>*/ caml_call2(Stdlib[28], _C_, cst$0), + /*<>*/ _E_ = + /*<>*/ caml_call2(Stdlib[28], cst_in_format, _D_), + /*<>*/ _F_ = + /*<>*/ caml_call2(Stdlib[28], msg, _E_); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], _G_); + (Stdlib[1], _F_); } /*<>*/ return /*<>*/ caml_call2 (ef, ib, exc); @@ -29032,15 +29045,15 @@ fmt); /*<>*/ } function kscanf_opt(ib, fmt){ - function _B_(x){ + function _A_(x){ /*<>*/ return [0, x]; /*<>*/ } /*<>*/ return kscanf_gen (ib, - function(param, _C_){ + function(param, _B_){ /*<>*/ return 0; /*<>*/ }, - _B_, + _A_, fmt); /*<>*/ } function bscanf(ib, fmt){ @@ -29071,10 +29084,10 @@ str = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _A_ = + /*<>*/ _z_ = /*<>*/ caml_call2 (CamlinternalFormat[15], str, format), - fmt = _A_; + fmt = _z_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -29088,30 +29101,30 @@ /*<>*/ return bscanf_format(from_string(s), format, f); /*<>*/ } function format_from_string(s, fmt){ - /*<>*/ function _x_(x){ + /*<>*/ function _w_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ var - /*<>*/ _y_ = + /*<>*/ _x_ = /*<>*/ caml_call1(Stdlib_String[24], s), - /*<>*/ _z_ = - /*<>*/ caml_call2(Stdlib[28], _y_, cst$1); + /*<>*/ _y_ = + /*<>*/ caml_call2(Stdlib[28], _x_, cst$1); /*<>*/ return sscanf_format - ( /*<>*/ caml_call2(Stdlib[28], cst$2, _z_), + ( /*<>*/ caml_call2(Stdlib[28], cst$2, _y_), fmt, - _x_); + _w_); /*<>*/ } function unescaped(s){ - /*<>*/ function _v_(x){ + /*<>*/ function _u_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ /*<>*/ var - _w_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); + _v_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); /*<>*/ return /*<>*/ caml_call1 (sscanf - ( /*<>*/ caml_call2(Stdlib[28], cst$4, _w_), + ( /*<>*/ caml_call2(Stdlib[28], cst$4, _v_), _t_), - _v_); + _u_); /*<>*/ } var Stdlib_Scanf = @@ -30476,7 +30489,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - _d_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_List = global_data.Stdlib__List, Stdlib = global_data.Stdlib, @@ -30495,7 +30508,7 @@ /*<>*/ /*<>*/ var prng = [246, - function(_aN_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; + function(_aM_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; function create(opt, initial_size){ /*<>*/ if(opt) var sth = opt[1], random = sth; @@ -30506,17 +30519,17 @@ /*<>*/ for(;;){ if(initial_size > x && Stdlib_Sys[13] >= (x * 2 | 0)){var x$0 = x * 2 | 0, x = x$0; continue;} /*<>*/ if(random){ - var _aL_ = runtime.caml_obj_tag(prng); + var _aK_ = runtime.caml_obj_tag(prng); a: - if(250 === _aL_) - var _aM_ = prng[1]; + if(250 === _aK_) + var _aL_ = prng[1]; else{ - if(246 !== _aL_ && 244 !== _aL_){var _aM_ = prng; break a;} - var _aM_ = caml_call1(CamlinternalLazy[2], prng); + if(246 !== _aK_ && 244 !== _aK_){var _aL_ = prng; break a;} + var _aL_ = caml_call1(CamlinternalLazy[2], prng); } var seed = - /*<>*/ caml_call1(Stdlib_Random[15][4], _aM_); + /*<>*/ caml_call1(Stdlib_Random[15][4], _aL_); } else var seed = 0; @@ -30531,16 +30544,16 @@ /*<>*/ h[1] = 0; /*<>*/ var len = h[2].length - 1, - /*<>*/ _aJ_ = len - 1 | 0, - _aI_ = 0; - if(_aJ_ >= 0){ - var i = _aI_; + /*<>*/ _aI_ = len - 1 | 0, + _aH_ = 0; + if(_aI_ >= 0){ + var i = _aH_; for(;;){ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var - _aK_ = i + 1 | 0; - if(_aJ_ === i) break; - var i = _aK_; + _aJ_ = i + 1 | 0; + if(_aI_ === i) break; + var i = _aJ_; } } return 0; @@ -30557,11 +30570,11 @@ /*<>*/ } function copy(h){ /*<>*/ var - _aF_ = h[4], - _aG_ = h[3], - /*<>*/ _aH_ = + _aE_ = h[4], + _aF_ = h[3], + /*<>*/ _aG_ = /*<>*/ caml_call1(Stdlib_Array[6], h[2]); - /*<>*/ return [0, h[1], _aH_, _aG_, _aF_]; + /*<>*/ return [0, h[1], _aG_, _aF_, _aE_]; /*<>*/ } function key_index(h, hkey){ /*<>*/ return hkey & (h[2].length - 1 - 1 | 0); @@ -30581,16 +30594,16 @@ var param$0 = rest; } /*<>*/ } - var d = h[2], _aD_ = d.length - 1 - 1 | 0, _aC_ = 0; - if(_aD_ >= 0){ - var i = _aC_; + var d = h[2], _aC_ = d.length - 1 - 1 | 0, _aB_ = 0; + if(_aC_ >= 0){ + var i = _aB_; for(;;){ /*<>*/ d[1 + i] = do_bucket(caml_check_bound(d, i)[1 + i]); /*<>*/ /*<>*/ var - _aE_ = i + 1 | 0; - if(_aD_ === i) break; - var i = _aE_; + _aD_ = i + 1 | 0; + if(_aC_ === i) break; + var i = _aD_; } } return 0; @@ -30602,9 +30615,9 @@ nsize = osize * 2 | 0; /*<>*/ clean(h); var - _aw_ = nsize < Stdlib_Sys[13] ? 1 : 0, - _ax_ = _aw_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _aw_; - if(_ax_){ + _av_ = nsize < Stdlib_Sys[13] ? 1 : 0, + _aw_ = _av_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _av_; + if(_aw_){ /*<>*/ /*<>*/ var ndata = /*<>*/ caml_make_vect(nsize, 0); h[2] = ndata; @@ -30612,33 +30625,33 @@ insert_bucket = function(param){ /*<>*/ if(! param) - /*<>*/ return _d_; + /*<>*/ return sentinal; var rest = param[3], data = param[2], hkey = param[1]; /*<>*/ insert_bucket(rest); /*<>*/ /*<>*/ var nidx = key_index(h, hkey); /*<>*/ ndata[1 + nidx] = [0, hkey, data, caml_check_bound(ndata, nidx)[1 + nidx]]; - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ }, - /*<>*/ _az_ = osize - 1 | 0, - /*<>*/ _ay_ = 0; - if(_az_ >= 0){ - var i = _ay_; + /*<>*/ _ay_ = osize - 1 | 0, + /*<>*/ _ax_ = 0; + if(_ay_ >= 0){ + var i = _ax_; for(;;){ /*<>*/ insert_bucket (caml_check_bound(odata, i)[1 + i]); /*<>*/ /*<>*/ var - _aB_ = i + 1 | 0; - if(_az_ === i) break; - var i = _aB_; + _aA_ = i + 1 | 0; + if(_ay_ === i) break; + var i = _aA_; } } - var _aA_ = 0; + var _az_ = 0; } else - var _aA_ = _ax_; - return _aA_; + var _az_ = _aw_; + return _az_; /*<>*/ } function add(h, key, info){ /*<>*/ var @@ -30651,8 +30664,8 @@ [0, hkey, container, caml_check_bound(h[2], i)[1 + i]]; /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; h[1] = h[1] + 1 | 0; - var _av_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _av_ ? resize(h) : _av_; + var _au_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _au_ ? resize(h) : _au_; /*<>*/ } function remove(h, key){ /*<>*/ /*<>*/ var @@ -30680,17 +30693,17 @@ /*<>*/ } /*<>*/ var /*<>*/ i = key_index(h, hkey), - /*<>*/ _au_ = + /*<>*/ _at_ = remove_bucket(caml_check_bound(h[2], i)[1 + i]); - /*<>*/ caml_check_bound(h[2], i)[1 + i] = _au_; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = _at_; /*<>*/ return 0; /*<>*/ } function find(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _at_ = key_index(h, hkey), - param = caml_check_bound(h[2], _at_)[1 + _at_]; + /*<>*/ _as_ = key_index(h, hkey), + param = caml_check_bound(h[2], _as_)[1 + _as_]; for(;;){ if(! param) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -30716,8 +30729,8 @@ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _as_ = key_index(h, hkey), - param = caml_check_bound(h[2], _as_)[1 + _as_]; + /*<>*/ _ar_ = key_index(h, hkey), + param = caml_check_bound(h[2], _ar_)[1 + _ar_]; for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -30765,9 +30778,9 @@ } /*<>*/ } /*<>*/ /*<>*/ var - _ar_ = key_index(h, hkey); + _aq_ = key_index(h, hkey); /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _ar_)[1 + _ar_]); + (caml_check_bound(h[2], _aq_)[1 + _aq_]); /*<>*/ } function replace(h, key, info){ /*<>*/ var @@ -30785,8 +30798,8 @@ if(hkey === hk){ if(! /*<>*/ caml_call2(H[3], c, key)){ /*<>*/ /*<>*/ var - _an_ = /*<>*/ caml_call3(H[5], c, key, info); - /*<>*/ return _an_; + _am_ = /*<>*/ caml_call3(H[5], c, key, info); + /*<>*/ return _am_; } var param = next; } @@ -30794,23 +30807,23 @@ var next$0 = param[3], param = next$0; } } - catch(_aq_){ - var _ao_ = caml_wrap_exception(_aq_); - if(_ao_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ao_, 0); + catch(_ap_){ + var _an_ = caml_wrap_exception(_ap_); + if(_an_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_an_, 0); /*<>*/ /*<>*/ var container = /*<>*/ caml_call2(H[1], key, info); /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, hkey, container, l]; h[1] = h[1] + 1 | 0; - var _ap_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _ap_ ? resize(h) : _ap_; + var _ao_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _ao_ ? resize(h) : _ao_; } /*<>*/ } function mem(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _am_ = key_index(h, hkey), - param = caml_check_bound(h[2], _am_)[1 + _am_]; + /*<>*/ _al_ = key_index(h, hkey), + param = caml_check_bound(h[2], _al_)[1 + _al_]; /*<>*/ for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -30838,21 +30851,21 @@ } } function stats(h){ - /*<>*/ var _ag_ = h[2], _ah_ = 0; - function _ai_(m, b){ + /*<>*/ var _af_ = h[2], _ag_ = 0; + function _ah_(m, b){ /*<>*/ /*<>*/ var - _al_ = bucket_length(0, b); + _ak_ = bucket_length(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _al_); + (Stdlib_Int[11], m, _ak_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ai_, _ah_, _ag_), + (Stdlib_Array[15], _ah_, _ag_, _af_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _aj_ = h[2]; - function _ak_(b){ + /*<>*/ _ai_ = h[2]; + function _aj_(b){ /*<>*/ /*<>*/ var l = bucket_length(0, b); /*<>*/ histo[1 + l] = @@ -30860,7 +30873,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _ak_, _aj_); + (Stdlib_Array[11], _aj_, _ai_); /*<>*/ return [0, h[1], h[2].length - 1, mbl, histo]; /*<>*/ } function bucket_length_alive(accu, param){ @@ -30878,22 +30891,22 @@ function stats_alive(h){ /*<>*/ var /*<>*/ size = [0, 0], - /*<>*/ _aa_ = h[2], - _ab_ = 0; - function _ac_(m, b){ + /*<>*/ _$_ = h[2], + _aa_ = 0; + function _ab_(m, b){ /*<>*/ /*<>*/ var - _af_ = bucket_length_alive(0, b); + _ae_ = bucket_length_alive(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _af_); + (Stdlib_Int[11], m, _ae_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ac_, _ab_, _aa_), + (Stdlib_Array[15], _ab_, _aa_, _$_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ad_ = h[2]; - function _ae_(b){ + /*<>*/ _ac_ = h[2]; + function _ad_(b){ /*<>*/ /*<>*/ var l = bucket_length_alive(0, b); size[1] = size[1] + l | 0; @@ -30902,7 +30915,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _ae_, _ad_); + (Stdlib_Array[11], _ad_, _ac_); /*<>*/ return [0, size[1], h[2].length - 1, @@ -30910,20 +30923,20 @@ histo]; /*<>*/ } function add_seq(tbl, i){ - function _$_(param){ + function ___(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return add(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _$_, i); + (Stdlib_Seq[4], ___, i); /*<>*/ } function replace_seq(tbl, i){ - function ___(param){ + function _Z_(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return replace(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], ___, i); + (Stdlib_Seq[4], _Z_, i); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -30962,7 +30975,7 @@ function set_key(t, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ } function check_key(t){ /*<>*/ return /*<>*/ caml_call2 @@ -31048,10 +31061,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _Z_ = include[1]; + _Y_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_Z_, _a_, sz); + (_Y_, _a_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31084,8 +31097,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add(b, k, d){ - /*<>*/ var _Y_ = b[1]; - b[1] = [0, make(k, d), _Y_]; + /*<>*/ var _X_ = b[1]; + b[1] = [0, make(k, d), _X_]; return 0; /*<>*/ } function test_key(k, e){ @@ -31114,13 +31127,13 @@ } /*<>*/ } function find(b, k){ - /*<>*/ var _V_ = b[1]; - /*<>*/ function _W_(_X_){ - /*<>*/ return test_key(k, _X_); + /*<>*/ var _U_ = b[1]; + /*<>*/ function _V_(_W_){ + /*<>*/ return test_key(k, _W_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _W_, _V_); + /*<>*/ caml_call2(Stdlib_List[39], _V_, _U_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data(e); @@ -31143,7 +31156,7 @@ function set_key1(t, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ } function get_key2(t){ /*<>*/ return /*<>*/ caml_call2 @@ -31152,7 +31165,7 @@ function set_key2(t, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, 1, k); - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ } function get_data$0(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31197,11 +31210,11 @@ /*<>*/ var k2 = param[2], k1 = param[1], - /*<>*/ _U_ = + /*<>*/ _T_ = /*<>*/ caml_call2(H2[2], seed, k2) * 65599 | 0; /*<>*/ return /*<>*/ caml_call2 (H1[2], seed, k1) - + _U_ + + _T_ | 0; } function equal(c, param){ @@ -31230,11 +31243,11 @@ } function check_key(c){ /*<>*/ /*<>*/ var - _T_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); - /*<>*/ return _T_ + _S_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); + /*<>*/ return _S_ ? /*<>*/ caml_call2 (Stdlib_Obj[24][7], c, 1) - : _T_; + : _S_; /*<>*/ } /*<>*/ return MakeSeeded ([0, @@ -31253,13 +31266,13 @@ /*<>*/ } /*<>*/ var equal$0 = H1[1], - /*<>*/ _R_ = [0, equal, seeded_hash]; + /*<>*/ _Q_ = [0, equal, seeded_hash]; function seeded_hash$0(seed, x){ /*<>*/ return /*<>*/ caml_call1 (H1[2], x); /*<>*/ } var - include = MakeSeeded$1([0, equal$0, seeded_hash$0], _R_), + include = MakeSeeded$1([0, equal$0, seeded_hash$0], _Q_), clear = include[2], reset = include[3], copy = include[4], @@ -31276,10 +31289,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _S_ = include[1]; + _R_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_S_, _b_, sz); + (_R_, _b_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31312,8 +31325,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$0(b, k1, k2, d){ - /*<>*/ var _Q_ = b[1]; - b[1] = [0, make$1(k1, k2, d), _Q_]; + /*<>*/ var _P_ = b[1]; + b[1] = [0, make$1(k1, k2, d), _P_]; return 0; /*<>*/ } function test_keys(k1, k2, e){ @@ -31343,13 +31356,13 @@ } /*<>*/ } function find$0(b, k1, k2){ - /*<>*/ var _N_ = b[1]; - /*<>*/ function _O_(_P_){ - /*<>*/ return test_keys(k1, k2, _P_); + /*<>*/ var _M_ = b[1]; + /*<>*/ function _N_(_O_){ + /*<>*/ return test_keys(k1, k2, _O_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _O_, _N_); + /*<>*/ caml_call2(Stdlib_List[39], _N_, _M_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$0(e); @@ -31376,7 +31389,7 @@ function set_key$0(t, n, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, n, k); - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ } function get_data$1(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31392,17 +31405,17 @@ /*<>*/ eph = create$1(l); /*<>*/ set_data$1(eph, data); /*<>*/ var - _L_ = l - 1 | 0, - /*<>*/ _K_ = 0; - if(_L_ >= 0){ - var i = _K_; + _K_ = l - 1 | 0, + /*<>*/ _J_ = 0; + if(_K_ >= 0){ + var i = _J_; for(;;){ /*<>*/ set_key$0 (eph, i, caml_check_bound(keys, i)[1 + i]); /*<>*/ /*<>*/ var - _M_ = i + 1 | 0; - if(_L_ === i) break; - var i = _M_; + _L_ = i + 1 | 0; + if(_K_ === i) break; + var i = _L_; } } /*<>*/ return eph; @@ -31415,10 +31428,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - /*<>*/ _G_ = l - 1 | 0, - /*<>*/ _F_ = 0; - if(_G_ >= 0){ - var i = _F_; + /*<>*/ _F_ = l - 1 | 0, + /*<>*/ _E_ = 0; + if(_F_ >= 0){ + var i = _E_; for(;;){ /*<>*/ /*<>*/ var match = get_key$0(eph, i); @@ -31430,19 +31443,19 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ /*<>*/ var - _I_ = i + 1 | 0; - if(_G_ === i) break; - var i = _I_; + _H_ = i + 1 | 0; + if(_F_ === i) break; + var i = _H_; } } /*<>*/ /*<>*/ var - _H_ = get_data$1(eph); - /*<>*/ return _H_; + _G_ = get_data$1(eph); + /*<>*/ return _G_; } - catch(_J_){ - var _E_ = caml_wrap_exception(_J_); - if(_E_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_E_, 0); + catch(_I_){ + var _D_ = caml_wrap_exception(_I_); + if(_D_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_D_, 0); } /*<>*/ } function MakeSeeded$2(H){ @@ -31451,17 +31464,17 @@ c = create$1(k.length - 1); /*<>*/ set_data$1(c, d); /*<>*/ var - _C_ = k.length - 1 - 1 | 0, - /*<>*/ _B_ = 0; - if(_C_ >= 0){ - var i = _B_; + _B_ = k.length - 1 - 1 | 0, + /*<>*/ _A_ = 0; + if(_B_ >= 0){ + var i = _A_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _D_ = i + 1 | 0; - if(_C_ === i) break; - var i = _D_; + _C_ = i + 1 | 0; + if(_B_ === i) break; + var i = _C_; } } /*<>*/ return c; @@ -31469,22 +31482,22 @@ function seeded_hash(seed, k){ /*<>*/ var /*<>*/ h = [0, 0], - _x_ = k.length - 1 - 1 | 0, - /*<>*/ _w_ = 0; - if(_x_ >= 0){ - var i = _w_; + _w_ = k.length - 1 - 1 | 0, + /*<>*/ _v_ = 0; + if(_w_ >= 0){ + var i = _v_; for(;;){ /*<>*/ var - _y_ = h[1], - /*<>*/ _z_ = caml_check_bound(k, i)[1 + i]; + _x_ = h[1], + /*<>*/ _y_ = caml_check_bound(k, i)[1 + i]; h[1] = - ( /*<>*/ caml_call2(H[2], seed, _z_) * 65599 | 0) - + _y_ + ( /*<>*/ caml_call2(H[2], seed, _y_) * 65599 | 0) + + _x_ | 0; /*<>*/ /*<>*/ var - _A_ = i + 1 | 0; - if(_x_ === i) break; - var i = _A_; + _z_ = i + 1 | 0; + if(_w_ === i) break; + var i = _z_; } } return h[1]; @@ -31504,9 +31517,9 @@ if(! match) /*<>*/ return 2; /*<>*/ var ki = match[1], - /*<>*/ _v_ = caml_check_bound(k, i)[1 + i]; + /*<>*/ _u_ = caml_check_bound(k, i)[1 + i]; /*<>*/ if - (! /*<>*/ caml_call2(H[1], _v_, ki)) + (! /*<>*/ caml_call2(H[1], _u_, ki)) /*<>*/ return 1; /*<>*/ var /*<>*/ i$0 = i - 1 | 0, @@ -31517,17 +31530,17 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Obj[24][12], c); /*<>*/ var - _t_ = k.length - 1 - 1 | 0, - /*<>*/ _s_ = 0; - if(_t_ >= 0){ - var i = _s_; + _s_ = k.length - 1 - 1 | 0, + /*<>*/ _r_ = 0; + if(_s_ >= 0){ + var i = _r_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _u_ = i + 1 | 0; - if(_t_ === i) break; - var i = _u_; + _t_ = i + 1 | 0; + if(_s_ === i) break; + var i = _t_; } } /*<>*/ return set_data$1(c, d); @@ -31537,19 +31550,19 @@ /*<>*/ i$1 = length$1(c) - 1 | 0, i = i$1; /*<>*/ for(;;){ - var _q_ = i < 0 ? 1 : 0; - if(_q_) - var _r_ = _q_; + var _p_ = i < 0 ? 1 : 0; + if(_p_) + var _q_ = _p_; else{ /*<>*/ /*<>*/ var - _p_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); - /*<>*/ if(_p_){ + _o_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); + /*<>*/ if(_o_){ var i$0 = i - 1 | 0, i = i$0; continue; } - var _r_ = _p_; + var _q_ = _o_; } - return _r_; + return _q_; } /*<>*/ } /*<>*/ return MakeSeeded @@ -31585,10 +31598,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _o_ = include[1]; + _n_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_o_, _c_, sz); + (_n_, _c_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31621,8 +31634,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$1(b, k, d){ - /*<>*/ var _n_ = b[1]; - b[1] = [0, make$3(k, d), _n_]; + /*<>*/ var _m_ = b[1]; + b[1] = [0, make$3(k, d), _m_]; return 0; /*<>*/ } function test_keys$0(k, e){ @@ -31631,10 +31644,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - _j_ = k.length - 1 - 1 | 0, - /*<>*/ _i_ = 0; - if(_j_ >= 0){ - var i = _i_; + _i_ = k.length - 1 - 1 | 0, + /*<>*/ _h_ = 0; + if(_i_ >= 0){ + var i = _h_; for(;;){ /*<>*/ /*<>*/ var match = get_key$0(e, i); @@ -31642,9 +31655,9 @@ var x = match[1]; if(x === caml_check_bound(k, i)[1 + i]){ /*<>*/ /*<>*/ var - _l_ = i + 1 | 0; - if(_j_ === i) break; - var i = _l_; + _k_ = i + 1 | 0; + if(_i_ === i) break; + var i = _k_; continue; } } @@ -31652,13 +31665,13 @@ (Stdlib[3], 1); } } - /*<>*/ /*<>*/ var _k_ = 1; - /*<>*/ return _k_; + /*<>*/ /*<>*/ var _j_ = 1; + /*<>*/ return _j_; } - catch(_m_){ - var _h_ = caml_wrap_exception(_m_); - if(_h_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_h_, 0); + catch(_l_){ + var _g_ = caml_wrap_exception(_l_); + if(_g_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_g_, 0); } /*<>*/ } function remove$1(b, k){ @@ -31678,13 +31691,13 @@ } /*<>*/ } function find$1(b, k){ - /*<>*/ var _e_ = b[1]; - /*<>*/ function _f_(_g_){ - /*<>*/ return test_keys$0(k, _g_); + /*<>*/ var _d_ = b[1]; + /*<>*/ function _e_(_f_){ + /*<>*/ return test_keys$0(k, _f_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _f_, _e_); + /*<>*/ caml_call2(Stdlib_List[39], _e_, _d_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$1(e); @@ -31771,7 +31784,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - _l_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$18 = cst$19, cst$17 = cst$19, @@ -31907,39 +31920,39 @@ /*<>*/ } function is_relative(n){ /*<>*/ var - _aI_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _aJ_ = - _aI_ + _aH_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _aI_ = + _aH_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - return _aJ_; + return _aI_; /*<>*/ } function is_implicit(n){ /*<>*/ /*<>*/ var - _aD_ = is_relative(n); - /*<>*/ if(_aD_){ + _aC_ = is_relative(n); + /*<>*/ if(_aC_){ var - _aE_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aF_ = - _aE_ + _aD_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aE_ = + _aD_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_aF_) + /*<>*/ if(_aE_) var - _aG_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aH_ = - _aG_ + _aF_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aG_ = + _aF_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 3), cst$28); else - var _aH_ = _aF_; + var _aG_ = _aE_; } else - var _aH_ = _aD_; - /*<>*/ return _aH_; + var _aG_ = _aC_; + /*<>*/ return _aG_; /*<>*/ } function check_suffix(name, suff){ /*<>*/ return /*<>*/ caml_call2 @@ -31967,8 +31980,8 @@ /*<>*/ caml_sys_getenv("TMPDIR"), temp_dir_name = _k_; } - catch(_aC_){ - var _a_ = caml_wrap_exception(_aC_); + catch(_aB_){ + var _a_ = caml_wrap_exception(_aB_); if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); var temp_dir_name = cst_tmp; } @@ -31980,10 +31993,10 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 39); /*<>*/ var - _az_ = l - 1 | 0, - /*<>*/ _ay_ = 0; - if(_az_ >= 0){ - var i = _ay_; + _ay_ = l - 1 | 0, + /*<>*/ _ax_ = 0; + if(_ay_ >= 0){ + var i = _ax_; for(;;){ /*<>*/ if (39 === /*<>*/ caml_string_get(s, i)) @@ -31991,14 +32004,14 @@ (Stdlib_Buffer[16], b, quotequote); else{ /*<>*/ /*<>*/ var - _aB_ = /*<>*/ caml_string_get(s, i); + _aA_ = /*<>*/ caml_string_get(s, i); /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, _aB_); + (Stdlib_Buffer[12], b, _aA_); } /*<>*/ /*<>*/ var - _aA_ = i + 1 | 0; - if(_az_ === i) break; - var i = _aA_; + _az_ = i + 1 | 0; + if(_ay_ === i) break; + var i = _az_; } } /*<>*/ /*<>*/ caml_call2 @@ -32011,47 +32024,47 @@ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _an_ = cst_2_1; + var _am_ = cst_2_1; else /*<>*/ var - /*<>*/ _ax_ = quote(f), - _an_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _ax_); - var _ao_ = _an_; + /*<>*/ _aw_ = quote(f), + _am_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _aw_); + var _an_ = _am_; } else - var _ao_ = cst$4; + var _an_ = cst$4; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _ap_ = quote(f$0), - _aq_ = /*<>*/ caml_call2(Stdlib[28], cst, _ap_); + /*<>*/ _ao_ = quote(f$0), + _ap_ = /*<>*/ caml_call2(Stdlib[28], cst, _ao_); else - var _aq_ = cst$3; + var _ap_ = cst$3; /*<>*/ /*<>*/ var - _ar_ = /*<>*/ caml_call2(Stdlib[28], _aq_, _ao_); + _aq_ = /*<>*/ caml_call2(Stdlib[28], _ap_, _an_); if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _as_ = quote(f$1), - _at_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _as_); + /*<>*/ _ar_ = quote(f$1), + _as_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _ar_); else - var _at_ = cst$2; + var _as_ = cst$2; /*<>*/ var - /*<>*/ _au_ = - /*<>*/ caml_call2(Stdlib[28], _at_, _ar_), - /*<>*/ _av_ = + /*<>*/ _at_ = + /*<>*/ caml_call2(Stdlib[28], _as_, _aq_), + /*<>*/ _au_ = /*<>*/ caml_call2 (Stdlib_List[19], quote, [0, cmd, args]), - /*<>*/ _aw_ = - /*<>*/ caml_call2(Stdlib_String[6], cst$1, _av_); + /*<>*/ _av_ = + /*<>*/ caml_call2(Stdlib_String[6], cst$1, _au_); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _aw_, _au_); + (Stdlib[28], _av_, _at_); /*<>*/ } - /*<>*/ function basename(_am_){ - /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _am_); + /*<>*/ function basename(_al_){ + /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _al_); } - /*<>*/ function dirname(_al_){ - /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _al_); + /*<>*/ function dirname(_ak_){ + /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _ak_); } /*<>*/ /*<>*/ var Unix = @@ -32074,96 +32087,96 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _ai_ = 47 === c ? 1 : 0; - if(_ai_) - var _aj_ = _ai_; + _ah_ = 47 === c ? 1 : 0; + if(_ah_) + var _ai_ = _ah_; else - var _ak_ = 92 === c ? 1 : 0, _aj_ = _ak_ || (58 === c ? 1 : 0); - return _aj_; + var _aj_ = 92 === c ? 1 : 0, _ai_ = _aj_ || (58 === c ? 1 : 0); + return _ai_; /*<>*/ } function is_relative$0(n){ /*<>*/ var - _ac_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ad_ = - _ac_ + _ab_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ac_ = + _ab_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ad_){ + if(_ac_){ var - _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _af_ = - _ae_ + _ad_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ae_ = + _ad_ || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_af_) + if(_ae_) var - _ag_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _ah_ = - _ag_ + _af_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _ag_ = + _af_ || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else - var _ah_ = _af_; + var _ag_ = _ae_; } else - var _ah_ = _ad_; - return _ah_; + var _ag_ = _ac_; + return _ag_; /*<>*/ } function is_implicit$0(n){ /*<>*/ /*<>*/ var - _V_ = is_relative$0(n); - /*<>*/ if(_V_){ + _U_ = is_relative$0(n); + /*<>*/ if(_U_){ var - _W_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _X_ = - _W_ + _V_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _W_ = + _V_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_X_){ + /*<>*/ if(_W_){ var - _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _Z_ = - _Y_ + _X_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _Y_ = + _X_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), ".\\"); - /*<>*/ if(_Z_){ + /*<>*/ if(_Y_){ var - ___ = caml_ml_string_length(n) < 3 ? 1 : 0, - _$_ = - ___ + _Z_ = caml_ml_string_length(n) < 3 ? 1 : 0, + ___ = + _Z_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), cst$28); - /*<>*/ if(_$_) + /*<>*/ if(___) var - _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _ab_ = - _aa_ + _$_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aa_ = + _$_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), "..\\"); else - var _ab_ = _$_; + var _aa_ = ___; } else - var _ab_ = _Z_; + var _aa_ = _Y_; } else - var _ab_ = _X_; + var _aa_ = _W_; } else - var _ab_ = _V_; - /*<>*/ return _ab_; + var _aa_ = _U_; + /*<>*/ return _aa_; /*<>*/ } function check_suffix$0(name, suff){ /*<>*/ var - _S_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_S_) + _R_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; + if(_R_) /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 @@ -32171,14 +32184,14 @@ name, caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, caml_ml_string_length(suff)), - /*<>*/ _T_ = + /*<>*/ _S_ = /*<>*/ caml_call1(Stdlib_String[26], suff), - _U_ = + _T_ = /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[26], s), _T_); + ( /*<>*/ caml_call1(Stdlib_String[26], s), _S_); else - var _U_ = _S_; - /*<>*/ return _U_; + var _T_ = _R_; + /*<>*/ return _T_; /*<>*/ } function chop_suffix_opt$0(suffix, filename){ /*<>*/ var @@ -32189,11 +32202,11 @@ /*<>*/ r = /*<>*/ caml_call3 (Stdlib_String[15], filename, len_f - len_s | 0, len_s), - /*<>*/ _R_ = + /*<>*/ _Q_ = /*<>*/ caml_call1(Stdlib_String[26], suffix); /*<>*/ return /*<>*/ caml_string_equal ( /*<>*/ caml_call1(Stdlib_String[26], r), - _R_) + _Q_) ? [0, /*<>*/ caml_call3 (Stdlib_String[15], filename, 0, len_f - len_s | 0)] @@ -32205,8 +32218,8 @@ /*<>*/ caml_sys_getenv("TEMP"), temp_dir_name$0 = _j_; } - catch(_Q_){ - var _b_ = caml_wrap_exception(_Q_); + catch(_P_){ + var _b_ = caml_wrap_exception(_P_); if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); var temp_dir_name$0 = cst$5; } @@ -32223,17 +32236,17 @@ if(i$0 === l){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - /*<>*/ return _l_; + /*<>*/ return sentinal; } /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); if(34 === c){ /*<>*/ loop_bs(0, i$0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } if(92 === c){ /*<>*/ loop_bs(0, i$0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, c); @@ -32249,7 +32262,7 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ add_bs(n$0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(s, i$0); @@ -32258,12 +32271,12 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ loop(i$0 + 1 | 0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } if(92 !== match){ /*<>*/ add_bs(n$0); /*<>*/ loop(i$0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } /*<>*/ var /*<>*/ i$1 = i$0 + 1 | 0, @@ -32273,19 +32286,19 @@ } /*<>*/ } function add_bs(n){ - /*<>*/ /*<>*/ var _O_ = 1; + /*<>*/ /*<>*/ var _N_ = 1; if(n >= 1){ - var j = _O_; + var j = _N_; for(;;){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 92); /*<>*/ /*<>*/ var - _P_ = j + 1 | 0; + _O_ = j + 1 | 0; if(n === j) break; - var j = _P_; + var j = _O_; } } - return _l_; + return sentinal; /*<>*/ } /*<>*/ loop(0); /*<>*/ return /*<>*/ caml_call1 @@ -32300,62 +32313,62 @@ (! /*<>*/ caml_call2(Stdlib_String[14], f, 32)) /*<>*/ return f; /*<>*/ /*<>*/ var - _N_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); + _M_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _N_); + (Stdlib[28], cst$7, _M_); } /*<>*/ /*<>*/ var - _M_ = + _L_ = /*<>*/ caml_call2 (Stdlib[28], cst_Filename_quote_command_bad, f); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _M_); + (Stdlib[2], _L_); /*<>*/ } function quote_command$0(cmd, stdin, stdout, stderr, args){ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _y_ = cst_2_1$0; + var _x_ = cst_2_1$0; else /*<>*/ var - /*<>*/ _K_ = quote_cmd_filename(f), - _y_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _K_); - var _z_ = _y_; + /*<>*/ _J_ = quote_cmd_filename(f), + _x_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _J_); + var _y_ = _x_; } else - var _z_ = cst$16; - var _A_ = [0, _z_, _c_]; + var _y_ = cst$16; + var _z_ = [0, _y_, _c_]; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _B_ = quote_cmd_filename(f$0), - _C_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _B_); + /*<>*/ _A_ = quote_cmd_filename(f$0), + _B_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _A_); else - var _C_ = cst$15; - var _D_ = [0, _C_, _A_]; + var _B_ = cst$15; + var _C_ = [0, _B_, _z_]; if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _E_ = quote_cmd_filename(f$1), - _F_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _E_); + /*<>*/ _D_ = quote_cmd_filename(f$1), + _E_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _D_); else - var _F_ = cst$14; + var _E_ = cst$14; /*<>*/ var - /*<>*/ _H_ = + /*<>*/ _G_ = /*<>*/ caml_call2(Stdlib_List[19], quote$0, args), /*<>*/ s = - /*<>*/ caml_call2(Stdlib_String[6], cst$10, _H_), + /*<>*/ caml_call2(Stdlib_String[6], cst$10, _G_), /*<>*/ b = /*<>*/ caml_call1 (Stdlib_Buffer[1], caml_ml_string_length(s) + 20 | 0), - _G_ = [0, _F_, _D_]; - function _x_(c){ + _F_ = [0, _E_, _C_]; + function _w_(c){ /*<>*/ a: { if(62 <= c){ - var _L_ = c - 63 | 0; - if(60 < _L_ >>> 0){if(62 <= _L_) break a;} else if(31 !== _L_) break a; + var _K_ = c - 63 | 0; + if(60 < _K_ >>> 0){if(62 <= _K_) break a;} else if(31 !== _K_) break a; } else if(42 <= c){ @@ -32375,21 +32388,21 @@ (Stdlib_Buffer[12], b, c); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _x_, s); + (Stdlib_String[29], _w_, s); /*<>*/ var - _I_ = + _H_ = [0, cst$11, - [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _G_]], - /*<>*/ _J_ = - [0, cst$12, [0, quote_cmd_filename(cmd), _I_]]; + [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _F_]], + /*<>*/ _I_ = + [0, cst$12, [0, quote_cmd_filename(cmd), _H_]]; /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[6], cst$13, _J_); + (Stdlib_String[6], cst$13, _I_); /*<>*/ } function drive_and_path(s){ /*<>*/ var - _t_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; - if(_t_){ + _s_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; + if(_s_){ /*<>*/ /*<>*/ var param = /*<>*/ caml_string_get(s, 0); a: @@ -32400,28 +32413,28 @@ if(25 < param - 97 >>> 0) break b; } else if(65 > param) break b; - var _u_ = 1; + var _t_ = 1; break a; } - var _u_ = 0; + var _t_ = 0; } /*<>*/ /*<>*/ var - _v_ = - _u_ + _u_ = + _t_ ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 - : _u_; + : _t_; } else - var _v_ = _t_; - /*<>*/ if(! _v_) + var _u_ = _s_; + /*<>*/ if(! _u_) /*<>*/ return [0, cst$17, s]; /*<>*/ /*<>*/ var - _w_ = + _v_ = /*<>*/ caml_call3 (Stdlib_String[15], s, 2, caml_ml_string_length(s) - 2 | 0); /*<>*/ return [0, /*<>*/ caml_call3(Stdlib_String[15], s, 0, 2), - _w_]; + _v_]; /*<>*/ } function dirname$0(s){ /*<>*/ var @@ -32455,11 +32468,11 @@ quote_command$0, basename$0, dirname$0]; - /*<>*/ function basename$1(_s_){ - /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _s_); + /*<>*/ function basename$1(_r_){ + /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _r_); } - /*<>*/ function dirname$1(_r_){ - /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _r_); + /*<>*/ function dirname$1(_q_){ + /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _q_); } /*<>*/ var /*<>*/ Cygwin = @@ -32502,11 +32515,11 @@ /*<>*/ if (0 !== l && ! is_dir_sep$1(dirname, l - 1 | 0)){ /*<>*/ /*<>*/ var - _q_ = + _p_ = /*<>*/ caml_call2 (Stdlib[28], dir_sep$2, filename); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], dirname, _q_); + (Stdlib[28], dirname, _p_); } /*<>*/ return /*<>*/ caml_call2 (Stdlib[28], dirname, filename); @@ -32609,7 +32622,7 @@ /*<>*/ } /*<>*/ var /*<>*/ _g_ = - [0, function(_p_){ /*<>*/ return _p_;}], + [0, function(_o_){ /*<>*/ return _o_;}], /*<>*/ current_temp_dir_name = /*<>*/ caml_call2(Stdlib_Domain[10][1], _g_, _f_); function set_temp_dir_name(s){ @@ -32649,17 +32662,17 @@ } } /*<>*/ } - function open_temp_file(opt, _n_, _m_, prefix, suffix){ + function open_temp_file(opt, _m_, _l_, prefix, suffix){ /*<>*/ if(opt) var sth = opt[1], mode = sth; else var mode = _i_; - /*<>*/ if(_n_) - var sth$0 = _n_[1], perms = sth$0; + /*<>*/ if(_m_) + var sth$0 = _m_[1], perms = sth$0; else var perms = 384; - /*<>*/ if(_m_) - var sth$1 = _m_[1], temp_dir = sth$1; + /*<>*/ if(_l_) + var sth$1 = _l_[1], temp_dir = sth$1; else var temp_dir = @@ -32671,12 +32684,12 @@ name = temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ /*<>*/ /*<>*/ var - _o_ = + _n_ = [0, name, /*<>*/ caml_call3 (Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; - /*<>*/ return _o_; + /*<>*/ return _n_; } catch(e$0){ var e = caml_wrap_exception(e$0); From d61469b05b0989ef8171501cfb34ada6bf58269f Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 22 Aug 2023 20:19:07 -0400 Subject: [PATCH 057/112] change code printing when pretty --- compiler/lib/code.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/lib/code.ml b/compiler/lib/code.ml index 36c7e75d93..8b5fc7803f 100644 --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml @@ -152,9 +152,10 @@ end = struct let to_string ?origin i = Var_printer.to_string printer ?origin i - let print f x = Format.fprintf f "v%d" x - - (* Format.fprintf f "%s" (to_string x) *) + let print f x = + if Config.Flag.pretty () + then Format.fprintf f "%s" (to_string x) + else Format.fprintf f "v%d" x let name i nm = Var_printer.name printer i nm From d55396c285ed3b1e72a3c0c6e918d54e1b5b824b Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 24 Aug 2023 20:25:28 -0500 Subject: [PATCH 058/112] Revert "change code printing when pretty" This reverts commit d61469b05b0989ef8171501cfb34ada6bf58269f. --- compiler/lib/code.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/lib/code.ml b/compiler/lib/code.ml index 8b5fc7803f..36c7e75d93 100644 --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml @@ -152,10 +152,9 @@ end = struct let to_string ?origin i = Var_printer.to_string printer ?origin i - let print f x = - if Config.Flag.pretty () - then Format.fprintf f "%s" (to_string x) - else Format.fprintf f "v%d" x + let print f x = Format.fprintf f "v%d" x + + (* Format.fprintf f "%s" (to_string x) *) let name i nm = Var_printer.name printer i nm From e35e594368fe692878c0c84231fb091630d5ba9d Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 24 Aug 2023 20:25:33 -0500 Subject: [PATCH 059/112] Revert "promote stdlib changes" This reverts commit 2f60c4ec9dbcb822f52ff28a235792fc0bd99705. --- compiler/tests-full/stdlib.cma.expected.js | 4557 ++++++++++---------- 1 file changed, 2272 insertions(+), 2285 deletions(-) diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 8249793bfe..7e201668fd 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -1248,11 +1248,11 @@ : runtime.caml_call_gen(f, [a0]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Assert_failure = global_data.Assert_failure, Stdlib_Sys = global_data.Stdlib__Sys, + _b_ = undefined, cst_Obj_Ephemeron_blit_key = "Obj.Ephemeron.blit_key", cst_Obj_Ephemeron_check_key = "Obj.Ephemeron.check_key", cst_Obj_Ephemeron_unset_key = "Obj.Ephemeron.unset_key", @@ -1330,9 +1330,9 @@ max_ephe_length = Stdlib_Sys[13] - 2 | 0; function create(l){ /*<>*/ var - _g_ = 0 <= l ? 1 : 0, - _h_ = _g_ ? l <= max_ephe_length ? 1 : 0 : _g_; - if(1 - _h_) + _h_ = 0 <= l ? 1 : 0, + _i_ = _h_ ? l <= max_ephe_length ? 1 : 0 : _h_; + if(1 - _i_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_create); /*<>*/ return /*<>*/ runtime.caml_ephe_create @@ -1343,12 +1343,10 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _d_ = 0 <= o ? 1 : 0, - _e_ = _d_ ? o < length(e) ? 1 : 0 : _d_, - _f_ = 1 - _e_; - return _f_ - ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) - : _f_; + _e_ = 0 <= o ? 1 : 0, + _f_ = _e_ ? o < length(e) ? 1 : 0 : _e_, + _g_ = 1 - _f_; + return _g_ ? ( /*<>*/ caml_call1(Stdlib[1], msg), _b_) : _g_; /*<>*/ } function get_key(e, o){ /*<>*/ raise_if_invalid_offset @@ -1387,13 +1385,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _b_ = 0 !== l ? 1 : 0, - _c_ = - _b_ + _c_ = 0 !== l ? 1 : 0, + _d_ = + _c_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _b_; - /*<>*/ return _c_; + : _c_; + /*<>*/ return _d_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_blit_key); @@ -4551,7 +4549,7 @@ : runtime.caml_call_gen(f, [a0, a1]); } var - sentinal = undefined, + _g_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Uchar = global_data.Stdlib__Uchar, @@ -4596,15 +4594,15 @@ function init(n, f){ /*<>*/ var /*<>*/ s = /*<>*/ caml_create_bytes(n), - /*<>*/ _aq_ = n - 1 | 0, - /*<>*/ _ap_ = 0; - if(_aq_ >= 0){ - var i = _ap_; + /*<>*/ _ar_ = n - 1 | 0, + /*<>*/ _aq_ = 0; + if(_ar_ >= 0){ + var i = _aq_; for(;;){ caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); - /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; - if(_aq_ === i) break; - var i = _ar_; + /*<>*/ /*<>*/ var _as_ = i + 1 | 0; + if(_ar_ === i) break; + var i = _as_; } } /*<>*/ return s; @@ -4646,11 +4644,11 @@ function symbol(a, b){ /*<>*/ var c = a + b | 0, - _ao_ = b < 0 ? 1 : 0, + _ap_ = b < 0 ? 1 : 0, match = c < 0 ? 1 : 0; a: { - if(a < 0){if(_ao_ && ! match) break a;} else if(! _ao_ && match) break a; + if(a < 0){if(_ap_ && ! match) break a;} else if(! _ap_ && match) break a; /*<>*/ return c; } /*<>*/ return /*<>*/ caml_call1 @@ -4713,32 +4711,32 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _am_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var i = _al_; + _an_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _am_ = 0; + if(_an_ >= 0){ + var i = _am_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ === i) break; - var i = _an_; + /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; + if(_an_ === i) break; + var i = _ao_; } } return 0; /*<>*/ } function iteri(f, a){ /*<>*/ var - _aj_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + _ak_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _aj_ = 0; + if(_ak_ >= 0){ + var i = _aj_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; + /*<>*/ /*<>*/ var _al_ = i + 1 | 0; + if(_ak_ === i) break; + var i = _al_; } } return 0; @@ -4761,13 +4759,13 @@ param = tl; continue; } - var _ah_ = caml_ml_bytes_length(hd) + acc | 0; + var _ai_ = caml_ml_bytes_length(hd) + acc | 0; } else - var _ah_ = acc; + var _ai_ = acc; /*<>*/ var /*<>*/ dst = - /*<>*/ caml_create_bytes(_ah_), + /*<>*/ caml_create_bytes(_ai_), pos = pos$1, param$0 = l; for(;;){ @@ -4805,10 +4803,10 @@ /*<>*/ } function is_space(param){ /*<>*/ /*<>*/ var - _ag_ = param - 9 | 0; + _ah_ = param - 9 | 0; a: { - if(4 < _ag_ >>> 0){if(23 !== _ag_) break a;} else if(2 === _ag_) break a; + if(4 < _ah_ >>> 0){if(23 !== _ah_) break a;} else if(2 === _ah_) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -4832,10 +4830,10 @@ function unsafe_escape(s){ /*<>*/ var /*<>*/ n = [0, 0], - _$_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ ___ = 0; - if(_$_ >= 0){ - var i$0 = ___; + _aa_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ _$_ = 0; + if(_aa_ >= 0){ + var i$0 = _$_; for(;;){ var match = caml_bytes_unsafe_get(s, i$0); a: @@ -4845,12 +4843,12 @@ c: { if(32 <= match){ - var _ad_ = match - 34 | 0; - if(58 < _ad_ >>> 0){ - if(93 <= _ad_) break c; + var _ae_ = match - 34 | 0; + if(58 < _ae_ >>> 0){ + if(93 <= _ae_) break c; } - else if(56 < _ad_ - 1 >>> 0) break b; - var _ae_ = 1; + else if(56 < _ae_ - 1 >>> 0) break b; + var _af_ = 1; break a; } if(11 <= match){ @@ -4858,15 +4856,15 @@ } else if(8 <= match) break b; } - var _ae_ = 4; + var _af_ = 4; break a; } - var _ae_ = 2; + var _af_ = 2; } - n[1] = n[1] + _ae_ | 0; - /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; - if(_$_ === i$0) break; - var i$0 = _af_; + n[1] = n[1] + _af_ | 0; + /*<>*/ /*<>*/ var _ag_ = i$0 + 1 | 0; + if(_aa_ === i$0) break; + var i$0 = _ag_; } } if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; @@ -4874,10 +4872,10 @@ s$0 = /*<>*/ caml_create_bytes(n[1]); n[1] = 0; /*<>*/ var - _ab_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ _aa_ = 0; - if(_ab_ >= 0){ - var i = _aa_; + _ac_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ _ab_ = 0; + if(_ac_ >= 0){ + var i = _ab_; for(;;){ var c = caml_bytes_unsafe_get(s, i); a: @@ -4935,9 +4933,9 @@ caml_bytes_unsafe_set(s$0, n[1], c); } n[1]++; - /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; - if(_ab_ === i) break; - var i = _ac_; + /*<>*/ /*<>*/ var _ad_ = i + 1 | 0; + if(_ac_ === i) break; + var i = _ad_; } } /*<>*/ return s$0; @@ -4952,18 +4950,18 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _Y_ = l - 1 | 0, - /*<>*/ _X_ = 0; - if(_Y_ >= 0){ - var i = _X_; + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 0; + if(_Z_ >= 0){ + var i = _Y_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; - if(_Y_ === i) break; - var i = _Z_; + /*<>*/ /*<>*/ var ___ = i + 1 | 0; + if(_Z_ === i) break; + var i = ___; } } /*<>*/ return r; @@ -4974,18 +4972,18 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _V_ = l - 1 | 0, - /*<>*/ _U_ = 0; - if(_V_ >= 0){ - var i = _U_; + /*<>*/ _W_ = l - 1 | 0, + /*<>*/ _V_ = 0; + if(_W_ >= 0){ + var i = _V_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _W_ = i + 1 | 0; - if(_V_ === i) break; - var i = _W_; + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + if(_W_ === i) break; + var i = _X_; } } /*<>*/ return r; @@ -4993,17 +4991,17 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _S_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _R_ = 0; - if(_S_ >= 0){ - var i = _R_; + _T_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _S_ = 0; + if(_T_ >= 0){ + var i = _S_; for(;;){ r[1] = /*<>*/ caml_call2 (f, r[1], caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _T_ = i + 1 | 0; - if(_S_ === i) break; - var i = _T_; + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ === i) break; + var i = _U_; } } return r[1]; @@ -5011,17 +5009,17 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _P_ = + /*<>*/ _Q_ = /*<>*/ caml_ml_bytes_length(a) - 1 | 0; - if(_P_ >= 0){ - var i = _P_; + if(_Q_ >= 0){ + var i = _Q_; for(;;){ r[1] = /*<>*/ caml_call2 (f, caml_bytes_unsafe_get(a, i), r[1]); - /*<>*/ /*<>*/ var _Q_ = i - 1 | 0; + /*<>*/ /*<>*/ var _R_ = i - 1 | 0; if(0 === i) break; - var i = _Q_; + var i = _R_; } } return r[1]; @@ -5076,8 +5074,8 @@ /*<>*/ var len_s = caml_ml_bytes_length(s), len_pre = caml_ml_bytes_length(prefix), - _O_ = len_pre <= len_s ? 1 : 0; - if(! _O_) return _O_; + _P_ = len_pre <= len_s ? 1 : 0; + if(! _P_) return _P_; var i = 0; /*<>*/ for(;;){ if(i === len_pre) /*<>*/ return 1; @@ -5093,8 +5091,8 @@ len_s = caml_ml_bytes_length(s), len_suf = caml_ml_bytes_length(suffix), diff = len_s - len_suf | 0, - _N_ = 0 <= diff ? 1 : 0; - if(! _N_) return _N_; + _O_ = 0 <= diff ? 1 : 0; + if(! _O_) return _O_; var i = 0; /*<>*/ for(;;){ if(i === len_suf) /*<>*/ return 1; @@ -5193,13 +5191,13 @@ if(0 <= i && l >= i) /*<>*/ try{ /*<>*/ index_rec(s, l, i, c); - /*<>*/ /*<>*/ var _L_ = 1; - /*<>*/ return _L_; + /*<>*/ /*<>*/ var _M_ = 1; + /*<>*/ return _M_; } - catch(_M_){ - var _K_ = caml_wrap_exception(_M_); - if(_K_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_K_, 0); + catch(_N_){ + var _L_ = caml_wrap_exception(_N_); + if(_L_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_L_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_contains_from_Bytes); @@ -5211,13 +5209,13 @@ /*<>*/ if(0 <= i && caml_ml_bytes_length(s) > i) /*<>*/ try{ /*<>*/ rindex_rec(s, i, c); - /*<>*/ /*<>*/ var _I_ = 1; - /*<>*/ return _I_; + /*<>*/ /*<>*/ var _J_ = 1; + /*<>*/ return _J_; } - catch(_J_){ - var _H_ = caml_wrap_exception(_J_); - if(_H_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_H_, 0); + catch(_K_){ + var _I_ = caml_wrap_exception(_K_); + if(_I_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_I_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_rcontains_from_Byte); @@ -5228,23 +5226,23 @@ /*<>*/ r = [0, 0], /*<>*/ j = [0, /*<>*/ caml_ml_bytes_length(s)], - /*<>*/ _D_ = + /*<>*/ _E_ = /*<>*/ caml_ml_bytes_length(s) - 1 | 0; - if(_D_ >= 0){ - var i = _D_; + if(_E_ >= 0){ + var i = _E_; for(;;){ if(caml_bytes_unsafe_get(s, i) === sep){ - var _F_ = r[1]; - r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _F_]; + var _G_ = r[1]; + r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _G_]; j[1] = i; } - /*<>*/ /*<>*/ var _G_ = i - 1 | 0; + /*<>*/ /*<>*/ var _H_ = i - 1 | 0; if(0 === i) break; - var i = _G_; + var i = _H_; } } - var _E_ = r[1]; - /*<>*/ return [0, sub(s, 0, j[1]), _E_]; + var _F_ = r[1]; + /*<>*/ return [0, sub(s, 0, j[1]), _F_]; /*<>*/ } function to_seq(s){ function aux(i, param){ @@ -5253,14 +5251,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _B_ = i + 1 | 0; + /*<>*/ _C_ = i + 1 | 0; /*<>*/ return [0, x, - function(_C_){ /*<>*/ return aux(_B_, _C_);}]; + function(_D_){ /*<>*/ return aux(_C_, _D_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _z_ = 0; - /*<>*/ return function(_A_){ - /*<>*/ return aux(_z_, _A_);}; + /*<>*/ /*<>*/ var _A_ = 0; + /*<>*/ return function(_B_){ + /*<>*/ return aux(_A_, _B_);}; /*<>*/ } function to_seqi(s){ function aux(i, param){ @@ -5269,20 +5267,20 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _x_ = i + 1 | 0; + /*<>*/ _y_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_y_){ /*<>*/ return aux(_x_, _y_);}]; + function(_z_){ /*<>*/ return aux(_y_, _z_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _v_ = 0; - /*<>*/ return function(_w_){ - /*<>*/ return aux(_v_, _w_);}; + /*<>*/ /*<>*/ var _w_ = 0; + /*<>*/ return function(_x_){ + /*<>*/ return aux(_w_, _x_);}; /*<>*/ } function of_seq(i){ /*<>*/ var /*<>*/ n = [0, 0], /*<>*/ buf = [0, make(256, 0)]; - function _u_(c){ + function _v_(c){ /*<>*/ if(n[1] === caml_ml_bytes_length(buf[1])){ /*<>*/ /*<>*/ var new_len = @@ -5304,7 +5302,7 @@ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Seq[4], _u_, i); + (Stdlib_Seq[4], _v_, i); return sub(buf[1], 0, n[1]); /*<>*/ } function unsafe_get_uint16_le(b, i){ @@ -5321,9 +5319,9 @@ /*<>*/ } function get_int8(b, i){ /*<>*/ var - /*<>*/ _s_ = Stdlib_Sys[10] - 8 | 0, - _t_ = Stdlib_Sys[10] - 8 | 0; - return /*<>*/ caml_bytes_get(b, i) << _t_ >> _s_; + /*<>*/ _t_ = Stdlib_Sys[10] - 8 | 0, + _u_ = Stdlib_Sys[10] - 8 | 0; + return /*<>*/ caml_bytes_get(b, i) << _u_ >> _t_; /*<>*/ } function get_uint16_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5339,21 +5337,21 @@ /*<>*/ } function get_int16_ne(b, i){ /*<>*/ var - /*<>*/ _q_ = Stdlib_Sys[10] - 16 | 0, - _r_ = Stdlib_Sys[10] - 16 | 0; - return /*<>*/ caml_bytes_get16(b, i) << _r_ >> _q_; + /*<>*/ _r_ = Stdlib_Sys[10] - 16 | 0, + _s_ = Stdlib_Sys[10] - 16 | 0; + return /*<>*/ caml_bytes_get16(b, i) << _s_ >> _r_; /*<>*/ } function get_int16_le(b, i){ /*<>*/ var - /*<>*/ _o_ = Stdlib_Sys[10] - 16 | 0, - _p_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_le(b, i) << _p_ >> _o_; + /*<>*/ _p_ = Stdlib_Sys[10] - 16 | 0, + _q_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_le(b, i) << _q_ >> _p_; /*<>*/ } function get_int16_be(b, i){ /*<>*/ var - /*<>*/ _m_ = Stdlib_Sys[10] - 16 | 0, - _n_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_be(b, i) << _n_ >> _m_; + /*<>*/ _n_ = Stdlib_Sys[10] - 16 | 0, + _o_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_be(b, i) << _o_ >> _n_; /*<>*/ } function get_int32_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5383,15 +5381,15 @@ /*<>*/ return Stdlib_Sys[11] ? ( /*<>*/ caml_bytes_set16 (b, i, caml_bswap16(x)), - sentinal) - : ( /*<>*/ caml_bytes_set16(b, i, x), sentinal); + _g_) + : ( /*<>*/ caml_bytes_set16(b, i, x), _g_); /*<>*/ } function unsafe_set_uint16_be(b, i, x){ /*<>*/ return Stdlib_Sys[11] - ? ( /*<>*/ caml_bytes_set16(b, i, x), sentinal) + ? ( /*<>*/ caml_bytes_set16(b, i, x), _g_) : ( /*<>*/ caml_bytes_set16 (b, i, caml_bswap16(x)), - sentinal); + _g_); /*<>*/ } function set_int16_le(b, i, x){ /*<>*/ return Stdlib_Sys[11] @@ -5433,9 +5431,9 @@ dec_invalid = Stdlib_Uchar[22]; function dec_ret(n, u){ /*<>*/ /*<>*/ var - _l_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); + _m_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Uchar[21], n, _l_); + (Stdlib_Uchar[21], n, _m_); /*<>*/ } function not_in_x80_to_xBF(b){ /*<>*/ return 2 !== (b >>> 6 | 0) ? 1 : 0; @@ -5448,9 +5446,9 @@ /*<>*/ } function not_in_x90_to_xBF(b){ /*<>*/ var - _j_ = b < 144 ? 1 : 0, - _k_ = _j_ || (191 < b ? 1 : 0); - return _k_; + _k_ = b < 144 ? 1 : 0, + _l_ = _k_ || (191 < b ? 1 : 0); + return _l_; /*<>*/ } function not_in_x80_to_x8F(b){ /*<>*/ return 8 !== (b >>> 4 | 0) ? 1 : 0; @@ -5647,9 +5645,9 @@ (dec_invalid, 1); /*<>*/ } function set_utf_8_uchar(b, i, u){ - /*<>*/ function set(_i_, _h_, _g_){ - /*<>*/ caml_bytes_unsafe_set(_i_, _h_, _g_); - return sentinal; + /*<>*/ function set(_j_, _i_, _h_){ + /*<>*/ caml_bytes_unsafe_set(_j_, _i_, _h_); + return _g_; } /*<>*/ var /*<>*/ max = @@ -6863,7 +6861,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } /*<>*/ var - sentinal = undefined, + _b_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Assert_failure = global_data.Assert_failure, @@ -6891,16 +6889,16 @@ /*<>*/ res = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, 0)), - /*<>*/ _as_ = l - 1 | 0, - /*<>*/ _ar_ = 1; - if(_as_ >= 1){ - var i = _ar_; + /*<>*/ _at_ = l - 1 | 0, + /*<>*/ _as_ = 1; + if(_at_ >= 1){ + var i = _as_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _at_ = i + 1 | 0; - if(_as_ === i) break; - var i = _at_; + /*<>*/ /*<>*/ var _au_ = i + 1 | 0; + if(_at_ === i) break; + var i = _au_; } } /*<>*/ return res; @@ -6909,15 +6907,15 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_make_vect(sx, [0]), - /*<>*/ _ap_ = sx - 1 | 0, - /*<>*/ _ao_ = 0; - if(_ap_ >= 0){ - var x = _ao_; + /*<>*/ _aq_ = sx - 1 | 0, + /*<>*/ _ap_ = 0; + if(_aq_ >= 0){ + var x = _ap_; for(;;){ res[1 + x] = /*<>*/ caml_make_vect(sy, init); - /*<>*/ /*<>*/ var _aq_ = x + 1 | 0; - if(_ap_ === x) break; - var x = _aq_; + /*<>*/ /*<>*/ var _ar_ = x + 1 | 0; + if(_aq_ === x) break; + var x = _ar_; } } /*<>*/ return res; @@ -6968,15 +6966,15 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _am_ = a.length - 1 - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var i = _al_; + _an_ = a.length - 1 - 1 | 0, + /*<>*/ _am_ = 0; + if(_an_ >= 0){ + var i = _am_; for(;;){ /*<>*/ /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ === i) break; - var i = _an_; + /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; + if(_an_ === i) break; + var i = _ao_; } } return 0; @@ -6986,16 +6984,16 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_iter2_arrays_must_ha); /*<>*/ var - _aj_ = a.length - 1 - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + _ak_ = a.length - 1 - 1 | 0, + /*<>*/ _aj_ = 0; + if(_ak_ >= 0){ + var i = _aj_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; + /*<>*/ /*<>*/ var _al_ = i + 1 | 0; + if(_ak_ === i) break; + var i = _al_; } } return 0; @@ -7007,16 +7005,16 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _ag_ = l - 1 | 0, - /*<>*/ _af_ = 1; - if(_ag_ >= 1){ - var i = _af_; + /*<>*/ _ah_ = l - 1 | 0, + /*<>*/ _ag_ = 1; + if(_ah_ >= 1){ + var i = _ag_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_ag_ === i) break; - var i = _ah_; + /*<>*/ /*<>*/ var _ai_ = i + 1 | 0; + if(_ah_ === i) break; + var i = _ai_; } } /*<>*/ return r; @@ -7033,32 +7031,32 @@ /*<>*/ r = /*<>*/ caml_make_vect (la, /*<>*/ caml_call2(f, a[1], b[1])), - /*<>*/ _ad_ = la - 1 | 0, - /*<>*/ _ac_ = 1; - if(_ad_ >= 1){ - var i = _ac_; + /*<>*/ _ae_ = la - 1 | 0, + /*<>*/ _ad_ = 1; + if(_ae_ >= 1){ + var i = _ad_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ === i) break; - var i = _ae_; + /*<>*/ /*<>*/ var _af_ = i + 1 | 0; + if(_ae_ === i) break; + var i = _af_; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ /*<>*/ var - _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i = _$_; + _ab_ = a.length - 1 - 1 | 0, + /*<>*/ _aa_ = 0; + if(_ab_ >= 0){ + var i = _aa_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ === i) break; - var i = _ab_; + /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; + if(_ab_ === i) break; + var i = _ac_; } } return 0; @@ -7070,16 +7068,16 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call2(f, 0, a[1])), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 1; - if(_Z_ >= 1){ - var i = _Y_; + /*<>*/ ___ = l - 1 | 0, + /*<>*/ _Z_ = 1; + if(___ >= 1){ + var i = _Z_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ === i) break; - var i = ___; + /*<>*/ /*<>*/ var _$_ = i + 1 | 0; + if(___ === i) break; + var i = _$_; } } /*<>*/ return r; @@ -7128,15 +7126,15 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _W_ = a.length - 1 - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + _X_ = a.length - 1 - 1 | 0, + /*<>*/ _W_ = 0; + if(_X_ >= 0){ + var i = _W_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ === i) break; - var i = _X_; + /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; + if(_X_ === i) break; + var i = _Y_; } } return r[1]; @@ -7153,10 +7151,10 @@ /*<>*/ output_array = /*<>*/ caml_make_vect(len, elt), /*<>*/ acc$1 = [0, acc$0], - /*<>*/ _T_ = len - 1 | 0, - /*<>*/ _S_ = 1; - if(_T_ >= 1){ - var i = _S_; + /*<>*/ _U_ = len - 1 | 0, + /*<>*/ _T_ = 1; + if(_U_ >= 1){ + var i = _T_; for(;;){ /*<>*/ var /*<>*/ match$0 = @@ -7165,9 +7163,9 @@ acc$2 = match$0[1]; acc$1[1] = acc$2; /*<>*/ output_array[1 + i] = elt$0; - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ === i) break; - var i = _U_; + /*<>*/ /*<>*/ var _V_ = i + 1 | 0; + if(_U_ === i) break; + var i = _V_; } } /*<>*/ return [0, acc$1[1], output_array]; @@ -7175,14 +7173,14 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _Q_ = a.length - 1 - 1 | 0; - if(_Q_ >= 0){ - var i = _Q_; + /*<>*/ _R_ = a.length - 1 - 1 | 0; + if(_R_ >= 0){ + var i = _R_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _R_ = i - 1 | 0; + /*<>*/ /*<>*/ var _S_ = i - 1 | 0; if(0 === i) break; - var i = _R_; + var i = _S_; } } return r[1]; @@ -7302,17 +7300,17 @@ /*<>*/ caml_make_vect(n, a0), /*<>*/ b = /*<>*/ caml_make_vect(n, b0), - /*<>*/ _O_ = n - 1 | 0, - /*<>*/ _N_ = 1; - if(_O_ >= 1){ - var i = _N_; + /*<>*/ _P_ = n - 1 | 0, + /*<>*/ _O_ = 1; + if(_P_ >= 1){ + var i = _O_; for(;;){ var match$0 = x[1 + i], bi = match$0[2], ai = match$0[1]; /*<>*/ a[1 + i] = ai; /*<>*/ b[1 + i] = bi; - /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ === i) break; - var i = _P_; + /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; + if(_P_ === i) break; + var i = _Q_; } } /*<>*/ return [0, a, b]; @@ -7328,15 +7326,15 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), - /*<>*/ _L_ = na - 1 | 0, - /*<>*/ _K_ = 1; - if(_L_ >= 1){ - var i = _K_; + /*<>*/ _M_ = na - 1 | 0, + /*<>*/ _L_ = 1; + if(_M_ >= 1){ + var i = _L_; for(;;){ x[1 + i] = [0, a[1 + i], b[1 + i]]; - /*<>*/ /*<>*/ var _M_ = i + 1 | 0; - if(_L_ === i) break; - var i = _M_; + /*<>*/ /*<>*/ var _N_ = i + 1 | 0; + if(_M_ === i) break; + var i = _N_; } } /*<>*/ return x; @@ -7350,42 +7348,42 @@ /*<>*/ x = [0, i31]; if((i31 + 2 | 0) < l){ /*<>*/ var - /*<>*/ _D_ = i31 + 1 | 0, - /*<>*/ _E_ = caml_check_bound(a, _D_)[1 + _D_]; + /*<>*/ _E_ = i31 + 1 | 0, + /*<>*/ _F_ = caml_check_bound(a, _E_)[1 + _E_]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _E_) + (cmp, caml_check_bound(a, i31)[1 + i31], _F_) < 0) x[1] = i31 + 1 | 0; /*<>*/ var - /*<>*/ _F_ = i31 + 2 | 0, - /*<>*/ _G_ = caml_check_bound(a, _F_)[1 + _F_], - _H_ = x[1]; + /*<>*/ _G_ = i31 + 2 | 0, + /*<>*/ _H_ = caml_check_bound(a, _G_)[1 + _G_], + _I_ = x[1]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, _H_)[1 + _H_], _G_) + (cmp, caml_check_bound(a, _I_)[1 + _I_], _H_) < 0) x[1] = i31 + 2 | 0; return x[1]; } if((i31 + 1 | 0) < l){ /*<>*/ var - _I_ = i31 + 1 | 0, - /*<>*/ _J_ = caml_check_bound(a, _I_)[1 + _I_]; + _J_ = i31 + 1 | 0, + /*<>*/ _K_ = caml_check_bound(a, _J_)[1 + _J_]; /*<>*/ if (0 > /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _J_)) + (cmp, caml_check_bound(a, i31)[1 + i31], _K_)) /*<>*/ return i31 + 1 | 0; } if(i31 < l) /*<>*/ return i31; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _x_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_x_ >= 0){ - var i$6 = _x_; + var l = a.length - 1, _y_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_y_ >= 0){ + var i$6 = _y_; for(;;){ /*<>*/ /*<>*/ var e$1 = caml_check_bound(a, i$6)[1 + i$6]; @@ -7403,8 +7401,8 @@ break; } /*<>*/ /*<>*/ var - _u_ = caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; + _v_ = caml_check_bound(a, j)[1 + j]; + /*<>*/ caml_check_bound(a, i)[1 + i] = _v_; var i = j; } } @@ -7414,14 +7412,14 @@ var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } - /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _D_ = i$6 - 1 | 0; if(0 === i$6) break; - var i$6 = _C_; + var i$6 = _D_; } } - /*<>*/ /*<>*/ var _y_ = l - 1 | 0; - if(_y_ >= 2){ - var i$4 = _y_; + /*<>*/ /*<>*/ var _z_ = l - 1 | 0; + if(_z_ >= 2){ + var i$4 = _z_; a: for(;;){ /*<>*/ /*<>*/ var @@ -7433,8 +7431,8 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ j$0 = maxson(i$4, i$1), - /*<>*/ _v_ = caml_check_bound(a, j$0)[1 + j$0]; - /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _v_; + /*<>*/ _w_ = caml_check_bound(a, j$0)[1 + j$0]; + /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _w_; var i$1 = j$0; } } @@ -7455,30 +7453,30 @@ /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; else{ /*<>*/ /*<>*/ var - _w_ = caml_check_bound(a, father)[1 + father]; - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _w_; + _x_ = caml_check_bound(a, father)[1 + father]; + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _x_; if(0 < father){var i$3 = father; continue;} /*<>*/ caml_check_bound(a, 0)[1] = e$0; } - /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _C_ = i$4 - 1 | 0; if(2 === i$4) break a; - var i$4 = _B_; + var i$4 = _C_; break; } } } } - var _z_ = 1 < l ? 1 : 0; - if(_z_){ + var _A_ = 1 < l ? 1 : 0; + if(_A_){ /*<>*/ /*<>*/ var e = caml_check_bound(a, 1)[2]; /*<>*/ a[2] = caml_check_bound(a, 0)[1]; /*<>*/ a[1] = e; - var _A_ = 0; + var _B_ = 0; } else - var _A_ = _z_; - /*<>*/ return _A_; + var _B_ = _A_; + /*<>*/ return _B_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -7522,38 +7520,38 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _m_ = len - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var i = _l_; + _n_ = len - 1 | 0, + /*<>*/ _m_ = 0; + if(_n_ >= 0){ + var i = _m_; a: for(;;){ /*<>*/ var - _n_ = srcofs + i | 0, - /*<>*/ e = caml_check_bound(a, _n_)[1 + _n_], + _o_ = srcofs + i | 0, + /*<>*/ e = caml_check_bound(a, _o_)[1 + _o_], /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; for(;;){ if(dstofs <= j[1]){ - var _o_ = j[1]; + var _p_ = j[1]; /*<>*/ if (0 < /*<>*/ caml_call2 - (cmp, caml_check_bound(dst, _o_)[1 + _o_], e)){ + (cmp, caml_check_bound(dst, _p_)[1 + _p_], e)){ /*<>*/ var - _p_ = j[1], - /*<>*/ _q_ = caml_check_bound(dst, _p_)[1 + _p_], - _r_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _r_)[1 + _r_] = _q_; + _q_ = j[1], + /*<>*/ _r_ = caml_check_bound(dst, _q_)[1 + _q_], + _s_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = _r_; j[1] += -1; continue; } } - var _s_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; - /*<>*/ /*<>*/ var _t_ = i + 1 | 0; - if(_m_ === i) break a; - var i = _t_; + var _t_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _t_)[1 + _t_] = e; + /*<>*/ /*<>*/ var _u_ = i + 1 | 0; + if(_n_ === i) break a; + var i = _u_; break; } } @@ -7563,14 +7561,14 @@ function sortto(srcofs, dst, dstofs, len){ /*<>*/ if(len <= 5){ /*<>*/ isortto(srcofs, dst, dstofs, len); - /*<>*/ return sentinal; + /*<>*/ return _b_; } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); /*<>*/ merge (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ return sentinal; + /*<>*/ return _b_; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -7589,14 +7587,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _j_ = i + 1 | 0; + /*<>*/ _k_ = i + 1 | 0; /*<>*/ return [0, x, - function(_k_){ /*<>*/ return aux(_j_, _k_);}]; + function(_l_){ /*<>*/ return aux(_k_, _l_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _h_ = 0; - /*<>*/ return function(_i_){ - /*<>*/ return aux(_h_, _i_);}; + /*<>*/ /*<>*/ var _i_ = 0; + /*<>*/ return function(_j_){ + /*<>*/ return aux(_i_, _j_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -7604,22 +7602,22 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _f_ = i + 1 | 0; + /*<>*/ _g_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_g_){ /*<>*/ return aux(_f_, _g_);}]; + function(_h_){ /*<>*/ return aux(_g_, _h_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _d_ = 0; - /*<>*/ return function(_e_){ - /*<>*/ return aux(_d_, _e_);}; + /*<>*/ /*<>*/ var _e_ = 0; + /*<>*/ return function(_f_){ + /*<>*/ return aux(_e_, _f_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _b_ = 0; - function _c_(acc, x){ + /*<>*/ var _c_ = 0; + function _d_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ /*<>*/ var - l = /*<>*/ caml_call3(Stdlib_Seq[5], _c_, _b_, i$2); + l = /*<>*/ caml_call3(Stdlib_Seq[5], _d_, _c_, i$2); if(! l) /*<>*/ return [0]; /*<>*/ var tl = l[2], @@ -7718,7 +7716,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - sentinal = undefined, + _j_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Stdlib_List = global_data.Stdlib__List, @@ -7761,8 +7759,8 @@ pi = 3.141592653589793; function is_integer(x){ /*<>*/ var - _aq_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; - return _aq_ ? is_finite(x) : _aq_; + _ar_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; + return _ar_ ? is_finite(x) : _ar_; /*<>*/ } function succ(x){ /*<>*/ return /*<>*/ caml_nextafter_float @@ -7859,34 +7857,34 @@ (10, 100, 0, x); /*<>*/ } function unsafe_fill(a, ofs, len, v){ - /*<>*/ var _ao_ = (ofs + len | 0) - 1 | 0; - if(_ao_ >= ofs){ + /*<>*/ var _ap_ = (ofs + len | 0) - 1 | 0; + if(_ap_ >= ofs){ var i = ofs; for(;;){ /*<>*/ a[1 + i] = v; - /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; - if(_ao_ === i) break; - var i = _ap_; + /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; + if(_ap_ === i) break; + var i = _aq_; } } return 0; /*<>*/ } function check(a, ofs, len, msg){ - /*<>*/ var _ak_ = ofs < 0 ? 1 : 0; - if(_ak_) - var _al_ = _ak_; + /*<>*/ var _al_ = ofs < 0 ? 1 : 0; + if(_al_) + var _am_ = _al_; else{ - var _am_ = len < 0 ? 1 : 0; - if(_am_) - var _al_ = _am_; + var _an_ = len < 0 ? 1 : 0; + if(_an_) + var _am_ = _an_; else var - _an_ = (ofs + len | 0) < 0 ? 1 : 0, - _al_ = _an_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); + _ao_ = (ofs + len | 0) < 0 ? 1 : 0, + _am_ = _ao_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); } - return _al_ - ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) - : _al_; + return _am_ + ? ( /*<>*/ caml_call1(Stdlib[1], msg), _j_) + : _am_; /*<>*/ } function make(n, v){ /*<>*/ /*<>*/ var @@ -7901,16 +7899,16 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_floatarray_create(l), - /*<>*/ _ai_ = l - 1 | 0, - /*<>*/ _ah_ = 0; - if(_ai_ >= 0){ - var i = _ah_; + /*<>*/ _aj_ = l - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; - if(_ai_ === i) break; - var i = _aj_; + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ === i) break; + var i = _ak_; } } /*<>*/ return res; @@ -7992,11 +7990,11 @@ (src, sofs, dst, dofs, len); /*<>*/ } function to_list(a){ - /*<>*/ function _af_(_ag_){ - /*<>*/ return a[1 + _ag_]; + /*<>*/ function _ag_(_ah_){ + /*<>*/ return a[1 + _ah_]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[10], a.length - 1, _af_); + (Stdlib_List[10], a.length - 1, _ag_); /*<>*/ } function of_list(l){ /*<>*/ var @@ -8017,16 +8015,16 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _ad_ = a.length - 1 - 1 | 0, - /*<>*/ _ac_ = 0; - if(_ad_ >= 0){ - var i = _ac_; + _ae_ = a.length - 1 - 1 | 0, + /*<>*/ _ad_ = 0; + if(_ae_ >= 0){ + var i = _ad_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ === i) break; - var i = _ae_; + /*<>*/ /*<>*/ var _af_ = i + 1 | 0; + if(_ae_ === i) break; + var i = _af_; } } return 0; @@ -8036,16 +8034,16 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_iter2_arrays_m); /*<>*/ var - _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i = _$_; + _ab_ = a.length - 1 - 1 | 0, + /*<>*/ _aa_ = 0; + if(_ab_ >= 0){ + var i = _aa_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ === i) break; - var i = _ab_; + /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; + if(_ab_ === i) break; + var i = _ac_; } } return 0; @@ -8055,16 +8053,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 0; - if(_Z_ >= 0){ - var i = _Y_; + /*<>*/ ___ = l - 1 | 0, + /*<>*/ _Z_ = 0; + if(___ >= 0){ + var i = _Z_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ === i) break; - var i = ___; + /*<>*/ /*<>*/ var _$_ = i + 1 | 0; + if(___ === i) break; + var i = _$_; } } /*<>*/ return r; @@ -8079,32 +8077,32 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_floatarray_create(la), - /*<>*/ _W_ = la - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + /*<>*/ _X_ = la - 1 | 0, + /*<>*/ _W_ = 0; + if(_X_ >= 0){ + var i = _W_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ === i) break; - var i = _X_; + /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; + if(_X_ === i) break; + var i = _Y_; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ /*<>*/ var - _T_ = a.length - 1 - 1 | 0, - /*<>*/ _S_ = 0; - if(_T_ >= 0){ - var i = _S_; + _U_ = a.length - 1 - 1 | 0, + /*<>*/ _T_ = 0; + if(_U_ >= 0){ + var i = _T_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ === i) break; - var i = _U_; + /*<>*/ /*<>*/ var _V_ = i + 1 | 0; + if(_U_ === i) break; + var i = _V_; } } return 0; @@ -8114,16 +8112,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _Q_ = l - 1 | 0, - /*<>*/ _P_ = 0; - if(_Q_ >= 0){ - var i = _P_; + /*<>*/ _R_ = l - 1 | 0, + /*<>*/ _Q_ = 0; + if(_R_ >= 0){ + var i = _Q_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _R_ = i + 1 | 0; - if(_Q_ === i) break; - var i = _R_; + /*<>*/ /*<>*/ var _S_ = i + 1 | 0; + if(_R_ === i) break; + var i = _S_; } } /*<>*/ return r; @@ -8131,15 +8129,15 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _N_ = a.length - 1 - 1 | 0, - /*<>*/ _M_ = 0; - if(_N_ >= 0){ - var i = _M_; + _O_ = a.length - 1 - 1 | 0, + /*<>*/ _N_ = 0; + if(_O_ >= 0){ + var i = _N_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _O_ = i + 1 | 0; - if(_N_ === i) break; - var i = _O_; + /*<>*/ /*<>*/ var _P_ = i + 1 | 0; + if(_O_ === i) break; + var i = _P_; } } return r[1]; @@ -8147,14 +8145,14 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _K_ = a.length - 1 - 1 | 0; - if(_K_ >= 0){ - var i = _K_; + /*<>*/ _L_ = a.length - 1 - 1 | 0; + if(_L_ >= 0){ + var i = _L_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _L_ = i - 1 | 0; + /*<>*/ /*<>*/ var _M_ = i - 1 | 0; if(0 === i) break; - var i = _L_; + var i = _M_; } } return r[1]; @@ -8242,9 +8240,9 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _E_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_E_ >= 0){ - var i$6 = _E_; + var l = a.length - 1, _F_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_F_ >= 0){ + var i$6 = _F_; for(;;){ /*<>*/ /*<>*/ var e$1 = /*<>*/ caml_array_get(a, i$6); @@ -8274,14 +8272,14 @@ /*<>*/ /*<>*/ caml_array_set (a, i$0, e$1); } - /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _K_ = i$6 - 1 | 0; if(0 === i$6) break; - var i$6 = _J_; + var i$6 = _K_; } } - /*<>*/ /*<>*/ var _F_ = l - 1 | 0; - if(_F_ >= 2){ - var i$4 = _F_; + /*<>*/ /*<>*/ var _G_ = l - 1 | 0; + if(_G_ >= 2){ + var i$4 = _G_; a: for(;;){ /*<>*/ /*<>*/ var @@ -8322,25 +8320,25 @@ /*<>*/ /*<>*/ caml_array_set (a, 0, e$0); } - /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _J_ = i$4 - 1 | 0; if(2 === i$4) break a; - var i$4 = _I_; + var i$4 = _J_; break; } } } } - var _G_ = 1 < l ? 1 : 0; - if(_G_){ + var _H_ = 1 < l ? 1 : 0; + if(_H_){ /*<>*/ /*<>*/ var e = /*<>*/ caml_array_get(a, 1); /*<>*/ /*<>*/ caml_array_set (a, 1, /*<>*/ caml_array_get(a, 0)); - var _H_ = /*<>*/ caml_array_set(a, 0, e); + var _I_ = /*<>*/ caml_array_set(a, 0, e); } else - var _H_ = _G_; - /*<>*/ return _H_; + var _I_ = _H_; + /*<>*/ return _I_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -8390,10 +8388,10 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _C_ = len - 1 | 0, - /*<>*/ _B_ = 0; - if(_C_ >= 0){ - var i = _B_; + _D_ = len - 1 | 0, + /*<>*/ _C_ = 0; + if(_D_ >= 0){ + var i = _C_; a: for(;;){ /*<>*/ var @@ -8417,9 +8415,9 @@ } /*<>*/ /*<>*/ caml_array_set (dst, j[1] + 1 | 0, e); - /*<>*/ /*<>*/ var _D_ = i + 1 | 0; - if(_C_ === i) break a; - var i = _D_; + /*<>*/ /*<>*/ var _E_ = i + 1 | 0; + if(_D_ === i) break a; + var i = _E_; break; } } @@ -8429,14 +8427,14 @@ function sortto(srcofs, dst, dstofs, len){ /*<>*/ if(len <= 5){ /*<>*/ isortto(srcofs, dst, dstofs, len); - /*<>*/ return sentinal; + /*<>*/ return _j_; } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); /*<>*/ merge (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ return sentinal; + /*<>*/ return _j_; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -8455,14 +8453,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _z_ = i + 1 | 0; + /*<>*/ _A_ = i + 1 | 0; /*<>*/ return [0, x, - function(_A_){ /*<>*/ return aux(_z_, _A_);}]; + function(_B_){ /*<>*/ return aux(_A_, _B_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ return function(_y_){ - /*<>*/ return aux(_x_, _y_);}; + /*<>*/ /*<>*/ var _y_ = 0; + /*<>*/ return function(_z_){ + /*<>*/ return aux(_y_, _z_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -8470,23 +8468,23 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _v_ = i + 1 | 0; + /*<>*/ _w_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_w_){ /*<>*/ return aux(_v_, _w_);}]; + function(_x_){ /*<>*/ return aux(_w_, _x_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _t_ = 0; - /*<>*/ return function(_u_){ - /*<>*/ return aux(_t_, _u_);}; + /*<>*/ /*<>*/ var _u_ = 0; + /*<>*/ return function(_v_){ + /*<>*/ return aux(_u_, _v_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _r_ = 0; - function _s_(acc, x){ + /*<>*/ var _s_ = 0; + function _t_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ var /*<>*/ l = - /*<>*/ caml_call3(Stdlib_Seq[5], _s_, _r_, i$2), + /*<>*/ caml_call3(Stdlib_Seq[5], _t_, _s_, i$2), /*<>*/ len = /*<>*/ caml_call1(Stdlib_List[1], l), /*<>*/ a = @@ -8511,16 +8509,16 @@ /*<>*/ r = /*<>*/ runtime.caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _p_ = l - 1 | 0, - /*<>*/ _o_ = 1; - if(_p_ >= 1){ - var i = _o_; + /*<>*/ _q_ = l - 1 | 0, + /*<>*/ _p_ = 1; + if(_q_ >= 1){ + var i = _p_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(_p_ === i) break; - var i = _q_; + /*<>*/ /*<>*/ var _r_ = i + 1 | 0; + if(_q_ === i) break; + var i = _r_; } } /*<>*/ return r; @@ -8530,16 +8528,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _m_ = l - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var i = _l_; + /*<>*/ _n_ = l - 1 | 0, + /*<>*/ _m_ = 0; + if(_n_ >= 0){ + var i = _m_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _n_ = i + 1 | 0; - if(_m_ === i) break; - var i = _n_; + /*<>*/ /*<>*/ var _o_ = i + 1 | 0; + if(_n_ === i) break; + var i = _o_; } } /*<>*/ return r; @@ -8550,7 +8548,7 @@ _e_ = caml_array_get, _f_ = [0, - function(_k_){ /*<>*/ return _k_.length - 1;}, + function(_l_){ /*<>*/ return _l_.length - 1;}, _e_, _d_, make, @@ -8617,7 +8615,7 @@ min_max_num, hash, [0, - function(_j_){ /*<>*/ return _j_.length - 1;}, + function(_k_){ /*<>*/ return _k_.length - 1;}, _i_, _h_, make, @@ -9416,7 +9414,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } /*<>*/ var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Obj = global_data.Stdlib__Obj, Stdlib_Array = global_data.Stdlib__Array, @@ -9443,6 +9440,7 @@ 0, 0, 0], + _a_ = undefined, cst_syntax_error = "syntax error"; function grow_stacks(param){ /*<>*/ var @@ -9469,7 +9467,7 @@ (Stdlib_Array[8], env[4], 0, new_end, 0, oldsize); env[4] = new_end; env[5] = newsize; - return sentinal; + return _a_; /*<>*/ } function clear_parser(param){ /*<>*/ /*<>*/ caml_call4 @@ -9522,17 +9520,17 @@ case 4: try{ /*<>*/ var - _i_ = env[13], - /*<>*/ _j_ = + _j_ = env[13], + /*<>*/ _k_ = /*<>*/ caml_call1 - (caml_check_bound(tables[1], _i_)[1 + _i_], env), - /*<>*/ _k_ = 4, - value = _j_, - action = _k_; + (caml_check_bound(tables[1], _j_)[1 + _j_], env), + /*<>*/ _l_ = 4, + value = _k_, + action = _l_; } - catch(_m_){ - var _h_ = caml_wrap_exception(_m_); - if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); + catch(_n_){ + var _i_ = caml_wrap_exception(_n_); + if(_i_ !== Parse_error) throw caml_maybe_attach_backtrace(_i_, 0); var value = 0, action = 5; } var cmd = action, arg = value; @@ -9568,9 +9566,9 @@ ? 1 : 0; /*<>*/ /*<>*/ var - _l_ = /*<>*/ runtime.caml_obj_tag(tok); - /*<>*/ return caml_check_bound(tables[3], _l_) - [1 + _l_] + _m_ = /*<>*/ runtime.caml_obj_tag(tok); + /*<>*/ return caml_check_bound(tables[3], _m_) + [1 + _m_] === curr_char ? 1 : 0; @@ -9580,21 +9578,21 @@ } /*<>*/ } function peek_val(env, n){ - /*<>*/ var _g_ = env[11] - n | 0; - /*<>*/ return caml_check_bound(env[2], _g_)[1 + _g_]; + /*<>*/ var _h_ = env[11] - n | 0; + /*<>*/ return caml_check_bound(env[2], _h_)[1 + _h_]; /*<>*/ } function symbol_start_pos(param){ /*<>*/ var i$1 = env[12], i = i$1; /*<>*/ for(;;){ if(0 >= i){ - var _f_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _f_)[1 + _f_]; + var _g_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _g_)[1 + _g_]; } /*<>*/ var - _d_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ st = caml_check_bound(env[3], _d_)[1 + _d_], _e_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ en = caml_check_bound(env[4], _e_)[1 + _e_]; + /*<>*/ st = caml_check_bound(env[3], _e_)[1 + _e_], + _f_ = (env[11] - i | 0) + 1 | 0, + /*<>*/ en = caml_check_bound(env[4], _f_)[1 + _f_]; /*<>*/ if ( /*<>*/ runtime.caml_notequal(st, en)) /*<>*/ return st; @@ -9604,16 +9602,16 @@ } /*<>*/ } function symbol_end_pos(param){ - /*<>*/ var _c_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _c_)[1 + _c_]; + /*<>*/ var _d_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _d_)[1 + _d_]; /*<>*/ } function rhs_start_pos(n){ - /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[3], _b_)[1 + _b_]; + /*<>*/ var _c_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[3], _c_)[1 + _c_]; /*<>*/ } function rhs_end_pos(n){ - /*<>*/ var _a_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[4], _a_)[1 + _a_]; + /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[4], _b_)[1 + _b_]; /*<>*/ } function symbol_start(param){ /*<>*/ return symbol_start_pos(0)[4]; @@ -12008,7 +12006,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib_Sys = global_data.Stdlib__Sys, @@ -12016,6 +12013,7 @@ Stdlib = global_data.Stdlib, Stdlib_String = global_data.Stdlib__String, Assert_failure = global_data.Assert_failure, + _b_ = undefined, cst_Buffer_truncate = "Buffer.truncate", _a_ = [0, "buffer.ml", 220, 9], cst_Buffer_add_channel = "Buffer.add_channel", @@ -12104,7 +12102,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_Bytes[11], b[1][1], 0, new_buffer, 0, b[2]); b[1] = [0, new_buffer, new_len[1]]; - return sentinal; + return _b_; } new_len[1] = 2 * new_len[1] | 0; } @@ -12166,14 +12164,14 @@ } /*<>*/ } function add_substring(b, s, offset, len){ - /*<>*/ var _r_ = offset < 0 ? 1 : 0; - if(_r_) - var _s_ = _r_; + /*<>*/ var _s_ = offset < 0 ? 1 : 0; + if(_s_) + var _t_ = _s_; else var - _t_ = len < 0 ? 1 : 0, - _s_ = _t_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); - if(_s_) + _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); /*<>*/ var @@ -12228,9 +12226,9 @@ /*<>*/ } function add_channel(b, ic, to_read$1){ /*<>*/ var - _p_ = to_read$1 < 0 ? 1 : 0, - _q_ = _p_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); - if(_q_) + _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(b[1][2] < (b[2] + to_read$1 | 0)) @@ -12276,8 +12274,8 @@ i$4 = 0; /*<>*/ for(;;){ if(i$4 >= lim$1){ - var _o_ = 92 === previous ? 1 : 0; - return _o_ ? add_char(b, previous) : _o_; + var _p_ = 92 === previous ? 1 : 0; + return _p_ ? add_char(b, previous) : _p_; } /*<>*/ /*<>*/ var previous$0 = /*<>*/ caml_string_get(s, i$4); @@ -12417,14 +12415,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _m_ = i + 1 | 0; + /*<>*/ _n_ = i + 1 | 0; /*<>*/ return [0, x, - function(_n_){ /*<>*/ return aux(_m_, _n_);}]; + function(_o_){ /*<>*/ return aux(_n_, _o_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _k_ = 0; - /*<>*/ return function(_l_){ - /*<>*/ return aux(_k_, _l_);}; + /*<>*/ /*<>*/ var _l_ = 0; + /*<>*/ return function(_m_){ + /*<>*/ return aux(_l_, _m_);}; /*<>*/ } function to_seqi(b){ function aux(i, param){ @@ -12433,21 +12431,21 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _i_ = i + 1 | 0; + /*<>*/ _j_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_j_){ /*<>*/ return aux(_i_, _j_);}]; + function(_k_){ /*<>*/ return aux(_j_, _k_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _g_ = 0; - /*<>*/ return function(_h_){ - /*<>*/ return aux(_g_, _h_);}; + /*<>*/ /*<>*/ var _h_ = 0; + /*<>*/ return function(_i_){ + /*<>*/ return aux(_h_, _i_);}; /*<>*/ } function add_seq(b, seq){ - /*<>*/ function _e_(_f_){ - /*<>*/ return add_char(b, _f_); + /*<>*/ function _f_(_g_){ + /*<>*/ return add_char(b, _g_); } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _e_, seq); + (Stdlib_Seq[4], _f_, seq); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var b = create(32); @@ -12526,8 +12524,8 @@ return 0; /*<>*/ } function add_int16_le(b, x){ - /*<>*/ var _d_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; - return add_int16_ne(b, _d_); + /*<>*/ var _e_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; + return add_int16_ne(b, _e_); /*<>*/ } function add_int16_be(b, x){ /*<>*/ var x$0 = Stdlib_Sys[11] ? x : caml_bswap16(x); @@ -12535,8 +12533,8 @@ /*<>*/ } function add_int32_le(b, x){ /*<>*/ var - _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; - /*<>*/ return add_int32_ne(b, _c_); + _d_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; + /*<>*/ return add_int32_ne(b, _d_); /*<>*/ } function add_int32_be(b, x){ /*<>*/ var @@ -12545,8 +12543,8 @@ /*<>*/ } function add_int64_le(b, x){ /*<>*/ var - _b_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; - /*<>*/ return add_int64_ne(b, _b_); + _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; + /*<>*/ return add_int64_ne(b, _c_); /*<>*/ } function add_int64_be(b, x){ /*<>*/ var @@ -12787,7 +12785,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - sentinal = undefined, + _a_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Mutex = global_data.Stdlib__Mutex, Stdlib_Condition = global_data.Stdlib__Condition, @@ -12807,7 +12805,7 @@ /*<>*/ /*<>*/ var st = /*<>*/ caml_make_vect(8, unique_value); /*<>*/ /*<>*/ caml_domain_dls_set(st); - /*<>*/ return sentinal; + /*<>*/ return _a_; /*<>*/ } /*<>*/ create_dls(0); /*<>*/ var @@ -12896,7 +12894,7 @@ /*<>*/ first_spawn_function = [0, function(param){ - /*<>*/ return sentinal; + /*<>*/ return _a_; /*<>*/ }]; function before_first_spawn(f){ /*<>*/ if @@ -12917,7 +12915,7 @@ at_exit_key = new_key (0, - function(param, _e_){ + function(param, _f_){ /*<>*/ return 0; /*<>*/ }); function at_exit(f){ @@ -12952,8 +12950,8 @@ /*<>*/ }; } /*<>*/ /*<>*/ var - _a_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); - function _b_(param){ + _b_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); + function _c_(param){ /*<>*/ var split = param[2], k = param[1], idx = k[1]; /*<>*/ return [0, idx, @@ -12961,7 +12959,7 @@ /*<>*/ } /*<>*/ var /*<>*/ pk = - /*<>*/ caml_call2(Stdlib_List[19], _b_, _a_), + /*<>*/ caml_call2(Stdlib_List[19], _c_, _b_), /*<>*/ term_mutex = /*<>*/ caml_call1(Stdlib_Mutex[1], 0), /*<>*/ term_condition = @@ -12973,7 +12971,7 @@ /*<>*/ try{ /*<>*/ create_dls(0); var - _c_ = + _d_ = function(param){ /*<>*/ var v = param[2], @@ -12983,7 +12981,7 @@ /*<>*/ return 0; /*<>*/ }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _c_, pk); + (Stdlib_List[17], _d_, pk); /*<>*/ /*<>*/ var res = /*<>*/ caml_call1(f, 0); } @@ -13000,8 +12998,8 @@ catch(ex){ /*<>*/ var ex$0 = caml_wrap_exception(ex), - /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, - result$0 = _d_; + /*<>*/ _e_ = 0 === result[0] ? [1, ex$0] : result, + result$0 = _e_; } /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], term_mutex); @@ -13132,7 +13130,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - sentinal = undefined, + _$_ = undefined, global_data = runtime.caml_get_global_data(), cst$9 = "%{", cst$10 = "%}", @@ -13459,14 +13457,14 @@ /*<>*/ var str_ind = c >>> 3 | 0, mask = 1 << (c & 7), - /*<>*/ _dS_ = + /*<>*/ _dT_ = /*<>*/ runtime.caml_bytes_get (char_set, str_ind) | mask; /*<>*/ return /*<>*/ caml_bytes_set (char_set, str_ind, - /*<>*/ caml_call1(Stdlib[29], _dS_)); + /*<>*/ caml_call1(Stdlib[29], _dT_)); /*<>*/ } function freeze_char_set(char_set){ /*<>*/ return /*<>*/ caml_call1 @@ -13478,19 +13476,19 @@ i = 0; for(;;){ /*<>*/ /*<>*/ var - _dQ_ = + _dR_ = /*<>*/ caml_string_get(char_set, i) ^ 255; /*<>*/ /*<>*/ caml_bytes_set (char_set$0, i, - /*<>*/ caml_call1(Stdlib[29], _dQ_)); + /*<>*/ caml_call1(Stdlib[29], _dR_)); /*<>*/ /*<>*/ var - _dR_ = i + 1 | 0; + _dS_ = i + 1 | 0; if(31 === i) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], char_set$0); - var i = _dR_; + var i = _dS_; } /*<>*/ } function is_in_char_set(char_set, c){ @@ -13550,11 +13548,11 @@ case 6: var prec_opt = ign[2], pad_opt$5 = ign[1]; if(prec_opt) - var ndec = prec_opt[1], _dP_ = [0, ndec]; + var ndec = prec_opt[1], _dQ_ = [0, ndec]; else - var _dP_ = 0; + var _dQ_ = 0; /*<>*/ return [0, - [8, _a_, pad_of_pad_opt(pad_opt$5), _dP_, fmt]]; + [8, _a_, pad_of_pad_opt(pad_opt$5), _dQ_, fmt]]; case 7: var pad_opt$6 = ign[1]; /*<>*/ return [0, @@ -13599,14 +13597,14 @@ (Stdlib_Bytes[11], buf[2], 0, new_str, 0, len); buf[2] = new_str; } - return sentinal; + return _$_; /*<>*/ } function buffer_add_char(buf, c){ /*<>*/ buffer_check_size(buf, 1); /*<>*/ /*<>*/ caml_bytes_set (buf[2], buf[1], c); buf[1] = buf[1] + 1 | 0; - return sentinal; + return _$_; /*<>*/ } function buffer_add_string(buf, s){ /*<>*/ var @@ -13615,7 +13613,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_String[48], s, 0, buf[2], buf[1], str_len); buf[1] = buf[1] + str_len | 0; - return sentinal; + return _$_; /*<>*/ } function buffer_contents(buf){ /*<>*/ return caml_call3 @@ -13672,64 +13670,64 @@ /*<>*/ switch(padty){ case 0: /*<>*/ buffer_add_char(buf, 45); - /*<>*/ return sentinal; + /*<>*/ return _$_; case 1: - /*<>*/ return sentinal; + /*<>*/ return _$_; default: /*<>*/ buffer_add_char(buf, 48); - /*<>*/ return sentinal; + /*<>*/ return _$_; } /*<>*/ } function bprint_ignored_flag(buf, ign_flag){ /*<>*/ return ign_flag - ? (buffer_add_char(buf, 95), sentinal) + ? (buffer_add_char(buf, 95), _$_) : ign_flag; /*<>*/ } function bprint_pad_opt(buf, pad_opt){ /*<>*/ if(! pad_opt) - /*<>*/ return sentinal; + /*<>*/ return _$_; var width = pad_opt[1]; /*<>*/ buffer_add_string (buf, /*<>*/ caml_call1(Stdlib_Int[12], width)); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ } function bprint_padding(buf, pad){ /*<>*/ if(typeof pad === "number") - /*<>*/ return sentinal; + /*<>*/ return _$_; if(0 === pad[0]){ var n = pad[2], padty = pad[1]; /*<>*/ bprint_padty(buf, padty); /*<>*/ buffer_add_string (buf, /*<>*/ caml_call1(Stdlib_Int[12], n)); - /*<>*/ return sentinal; + /*<>*/ return _$_; } var padty$0 = pad[1]; /*<>*/ bprint_padty(buf, padty$0); /*<>*/ buffer_add_char(buf, 42); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ } function bprint_precision(buf, prec){ /*<>*/ if(typeof prec === "number") - return prec ? (buffer_add_string(buf, cst), sentinal) : sentinal; + return prec ? (buffer_add_string(buf, cst), _$_) : _$_; var n = prec[1]; /*<>*/ buffer_add_char(buf, 46); /*<>*/ buffer_add_string (buf, /*<>*/ caml_call1(Stdlib_Int[12], n)); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ } function bprint_iconv_flag(buf, iconv){ /*<>*/ switch(iconv){ case 1: case 4: /*<>*/ buffer_add_char(buf, 43); - /*<>*/ return sentinal; + /*<>*/ return _$_; case 2: case 5: /*<>*/ buffer_add_char(buf, 32); - /*<>*/ return sentinal; + /*<>*/ return _$_; case 7: case 9: case 11: @@ -13737,8 +13735,8 @@ case 14: case 15: /*<>*/ buffer_add_char(buf, 35); - /*<>*/ return sentinal; - default: /*<>*/ return sentinal; + /*<>*/ return _$_; + default: /*<>*/ return _$_; } /*<>*/ } function bprint_altint_fmt(buf, ign_flag, iconv, pad, prec, c){ @@ -13750,7 +13748,7 @@ /*<>*/ buffer_add_char(buf, c); /*<>*/ buffer_add_char (buf, char_of_iconv(iconv)); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ } function bprint_fconv_flag(buf, fconv){ /*<>*/ switch(fconv[1]){ @@ -13759,7 +13757,7 @@ /*<>*/ buffer_add_char(buf, 43); break; default: /*<>*/ buffer_add_char(buf, 32); } - return 8 <= fconv[2] ? (buffer_add_char(buf, 35), sentinal) : sentinal; + return 8 <= fconv[2] ? (buffer_add_char(buf, 35), _$_) : _$_; /*<>*/ } function string_of_formatting_lit(formatting_lit){ /*<>*/ if @@ -13789,40 +13787,40 @@ default: /*<>*/ var c = formatting_lit[1], - /*<>*/ _dO_ = + /*<>*/ _dP_ = /*<>*/ caml_call2 (Stdlib_String[1], 1, c); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _dO_); + (Stdlib[28], cst$7, _dP_); } /*<>*/ } function bprint_char_literal(buf, chr){ /*<>*/ return 37 === chr - ? (buffer_add_string(buf, cst$8), sentinal) - : (buffer_add_char(buf, chr), sentinal); + ? (buffer_add_string(buf, cst$8), _$_) + : (buffer_add_char(buf, chr), _$_); /*<>*/ } function bprint_string_literal(buf, str){ /*<>*/ var - _dM_ = caml_ml_string_length(str) - 1 | 0, - /*<>*/ _dL_ = 0; - if(_dM_ >= 0){ - var i = _dL_; + _dN_ = caml_ml_string_length(str) - 1 | 0, + /*<>*/ _dM_ = 0; + if(_dN_ >= 0){ + var i = _dM_; for(;;){ /*<>*/ bprint_char_literal (buf, /*<>*/ caml_string_get(str, i)); /*<>*/ /*<>*/ var - _dN_ = i + 1 | 0; - if(_dM_ === i) break; - var i = _dN_; + _dO_ = i + 1 | 0; + if(_dN_ === i) break; + var i = _dO_; } } - return sentinal; + return _$_; /*<>*/ } function bprint_fmtty(buf, fmtty){ /*<>*/ var fmtty$0 = fmtty; /*<>*/ for(;;){ if(typeof fmtty$0 === "number") - /*<>*/ return sentinal; + /*<>*/ return _$_; switch(fmtty$0[0]){ case 0: var fmtty$1 = fmtty$0[1]; @@ -13920,7 +13918,7 @@ ign_flag$0 = ign_flag; /*<>*/ for(;;){ if(typeof fmt$0 === "number") - /*<>*/ return sentinal; + /*<>*/ return _$_; switch(fmt$0[0]){ case 0: var rest = fmt$0[1]; @@ -14124,17 +14122,11 @@ /*<>*/ caml_call1 (Stdlib[29], i); return 37 === c - ? (buffer_add_char - (buf, 37), - buffer_add_char(buf, 37), - sentinal) + ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37), _$_) : 64 === c - ? (buffer_add_char - (buf, 37), - buffer_add_char(buf, 64), - sentinal) - : (buffer_add_char(buf, c), sentinal); + ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64), _$_) + : (buffer_add_char(buf, c), _$_); /*<>*/ }; /*<>*/ buffer_add_char(buf, 91); /*<>*/ var @@ -14152,18 +14144,18 @@ /*<>*/ before = /*<>*/ caml_call1 (Stdlib_Char[1], c - 1 | 0), - /*<>*/ _dH_ = + /*<>*/ _dI_ = is_in_char_set(set, c); - /*<>*/ if(_dH_) + /*<>*/ if(_dI_) /*<>*/ var - /*<>*/ _dI_ = - is_in_char_set(set, before), /*<>*/ _dJ_ = - _dI_ ? is_in_char_set(set, after) : _dI_, - _dK_ = 1 - _dJ_; + is_in_char_set(set, before), + /*<>*/ _dK_ = + _dJ_ ? is_in_char_set(set, after) : _dJ_, + _dL_ = 1 - _dK_; else - var _dK_ = _dH_; - /*<>*/ return _dK_; + var _dL_ = _dI_; + /*<>*/ return _dL_; /*<>*/ } return is_alone; }, @@ -14297,12 +14289,12 @@ (buf, ign_flag$0); switch(counter){ case 0: - var _dD_ = 108; break; + var _dE_ = 108; break; case 1: - var _dD_ = 110; break; - default: var _dD_ = 78; + var _dE_ = 110; break; + default: var _dE_ = 78; } - /*<>*/ buffer_add_char(buf, _dD_); + /*<>*/ buffer_add_char(buf, _dE_); var fmt$0 = rest$20, ign_flag$0 = 0; break; case 22: @@ -14326,20 +14318,20 @@ /*<>*/ var rest$23 = fmt$0[3], arity = fmt$0[1], - /*<>*/ _dF_ = + /*<>*/ _dG_ = int_of_custom_arity(arity), - _dE_ = 1; - if(_dF_ >= 1){ - var i$8 = _dE_; + _dF_ = 1; + if(_dG_ >= 1){ + var i$8 = _dF_; for(;;){ /*<>*/ buffer_add_char(buf, 37); /*<>*/ bprint_ignored_flag (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 63); /*<>*/ /*<>*/ var - _dG_ = i$8 + 1 | 0; - if(_dF_ === i$8) break; - var i$8 = _dG_; + _dH_ = i$8 + 1 | 0; + if(_dG_ === i$8) break; + var i$8 = _dH_; } } var fmt$0 = rest$23, ign_flag$0 = 0; @@ -14411,17 +14403,17 @@ ed = match[3], af = match[2], fa = match[1], - _di_ = + _dj_ = function(param){ /*<>*/ af(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _di_, + _dj_, ed, de]; case 1: @@ -14432,17 +14424,17 @@ ed$0 = match$0[3], af$0 = match$0[2], fa$0 = match$0[1], - _dj_ = + _dk_ = function(param){ /*<>*/ af$0(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$0(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dj_, + _dk_, ed$0, de$0]; case 2: @@ -14453,17 +14445,17 @@ ed$1 = match$1[3], af$1 = match$1[2], fa$1 = match$1[1], - _dk_ = + _dl_ = function(param){ /*<>*/ af$1(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$1(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dk_, + _dl_, ed$1, de$1]; case 3: @@ -14474,17 +14466,17 @@ ed$2 = match$2[3], af$2 = match$2[2], fa$2 = match$2[1], - _dl_ = + _dm_ = function(param){ /*<>*/ af$2(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$2(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dl_, + _dm_, ed$2, de$2]; case 4: @@ -14495,17 +14487,17 @@ ed$3 = match$3[3], af$3 = match$3[2], fa$3 = match$3[1], - _dm_ = + _dn_ = function(param){ /*<>*/ af$3(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$3(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dm_, + _dn_, ed$3, de$3]; case 5: @@ -14516,17 +14508,17 @@ ed$4 = match$4[3], af$4 = match$4[2], fa$4 = match$4[1], - _dn_ = + _do_ = function(param){ /*<>*/ af$4(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$4(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dn_, + _do_, ed$4, de$4]; case 6: @@ -14537,17 +14529,17 @@ ed$5 = match$5[3], af$5 = match$5[2], fa$5 = match$5[1], - _do_ = + _dp_ = function(param){ /*<>*/ af$5(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$5(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _do_, + _dp_, ed$5, de$5]; case 7: @@ -14558,17 +14550,17 @@ ed$6 = match$6[3], af$6 = match$6[2], fa$6 = match$6[1], - _dp_ = + _dq_ = function(param){ /*<>*/ af$6(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$6(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dp_, + _dq_, ed$6, de$6]; case 8: @@ -14579,17 +14571,17 @@ ed$7 = match$7[3], af$7 = match$7[2], fa$7 = match$7[1], - _dq_ = + _dr_ = function(param){ /*<>*/ af$7(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$7(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dq_, + _dr_, ed$7, de$7]; case 9: @@ -14608,33 +14600,33 @@ dj = match$9[3], ga = match$9[2], ag = match$9[1], - _dr_ = + _ds_ = function(param){ /*<>*/ jd(0); /*<>*/ de$8(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _ds_ = + _dt_ = function(param){ /*<>*/ ed$8(0); /*<>*/ dj(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dt_ = + _du_ = function(param){ /*<>*/ ga(0); /*<>*/ af$8(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$8(0); /*<>*/ ag(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, + _du_, _dt_, - _ds_, - _dr_]; + _ds_]; case 10: /*<>*/ var rest$9 = param[1], @@ -14644,17 +14636,17 @@ ed$9 = match$10[3], af$9 = match$10[2], fa$9 = match$10[1], - _du_ = + _dv_ = function(param){ /*<>*/ af$9(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$9(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _du_, + _dv_, ed$9, de$9]; case 11: @@ -14666,17 +14658,17 @@ ed$10 = match$11[3], af$10 = match$11[2], fa$10 = match$11[1], - _dv_ = + _dw_ = function(param){ /*<>*/ af$10(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$10(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dv_, + _dw_, ed$10, de$10]; case 12: @@ -14688,17 +14680,17 @@ ed$11 = match$12[3], af$11 = match$12[2], fa$11 = match$12[1], - _dw_ = + _dx_ = function(param){ /*<>*/ af$11(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$11(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dw_, + _dx_, ed$11, de$11]; case 13: @@ -14710,29 +14702,29 @@ ed$12 = match$13[3], af$12 = match$13[2], fa$12 = match$13[1], - /*<>*/ _dx_ = + /*<>*/ _dy_ = function(param){ /*<>*/ de$12(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dy_ = + _dz_ = function(param){ /*<>*/ ed$12(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dz_ = + _dA_ = function(param){ /*<>*/ af$12(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$12(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, + _dA_, _dz_, - _dy_, - _dx_]; + _dy_]; default: /*<>*/ var rest$13 = param[1], @@ -14742,46 +14734,46 @@ ed$13 = match$14[3], af$13 = match$14[2], fa$13 = match$14[1], - /*<>*/ _dA_ = + /*<>*/ _dB_ = function(param){ /*<>*/ de$13(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dB_ = + _dC_ = function(param){ /*<>*/ ed$13(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, - _dC_ = + _dD_ = function(param){ /*<>*/ af$13(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$13(0); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, + _dD_, _dC_, - _dB_, - _dA_]; + _dB_]; } - /*<>*/ function _df_(param){ - /*<>*/ return sentinal; + /*<>*/ function _dg_(param){ + /*<>*/ return _$_; /*<>*/ } - function _dg_(param){ - /*<>*/ return sentinal; - /*<>*/ } function _dh_(param){ - /*<>*/ return sentinal; + /*<>*/ return _$_; + /*<>*/ } + function _di_(param){ + /*<>*/ return _$_; /*<>*/ } /*<>*/ return [0, function(param){ - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, + _di_, _dh_, - _dg_, - _df_]; + _dg_]; /*<>*/ } function trans(ty1, ty2){ /*<>*/ a: @@ -15000,11 +14992,11 @@ /*<>*/ var rest2$7 = ty2[2], ty2$0 = ty2[1], - /*<>*/ _de_ = + /*<>*/ _df_ = trans(rest1$7, rest2$7); /*<>*/ return [8, trans(ty1$0, ty2$0), - _de_]; + _df_]; case 10: break a; case 11: @@ -15294,13 +15286,13 @@ /*<>*/ var rest$13 = fmtty$0[2], formatting_gen = fmtty$0[1], - /*<>*/ _db_ = fmtty_of_fmt(rest$13); + /*<>*/ _dc_ = fmtty_of_fmt(rest$13); if(0 === formatting_gen[0]) - var fmt = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt); + var fmt = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt); else - var fmt$0 = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt$0); + var fmt$0 = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt$0); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], _dc_, _db_); + (CamlinternalFormatBasics[1], _dd_, _dc_); case 19: var rest$14 = fmtty$0[1]; /*<>*/ return [13, @@ -15353,10 +15345,10 @@ case 9: /*<>*/ var fmtty$6 = ign[2], - /*<>*/ _dd_ = + /*<>*/ _de_ = fmtty_of_fmt(fmtty$5); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], fmtty$6, _dd_); + (CamlinternalFormatBasics[1], fmtty$6, _de_); case 10: var fmtty$0 = fmtty$5; break; default: var fmtty$0 = fmtty$5; @@ -15412,11 +15404,11 @@ /*<>*/ } function type_format(fmt, fmtty){ /*<>*/ /*<>*/ var - _da_ = type_format_gen(fmt, fmtty); - if(typeof _da_[2] !== "number") + _db_ = type_format_gen(fmt, fmtty); + if(typeof _db_[2] !== "number") /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); - var fmt$0 = _da_[1]; + var fmt$0 = _db_[1]; /*<>*/ return fmt$0; /*<>*/ } function type_ignored_param_one(ign, fmt, fmtty){ @@ -15701,7 +15693,7 @@ fmt_rest$13 = fmt[3], sub_fmtty$1 = fmt[2], pad_opt$0 = fmt[1], - /*<>*/ _c__ = + /*<>*/ _c$_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty1)]; @@ -15710,7 +15702,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty$1)], - _c__)) + _c$_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -15880,12 +15872,12 @@ /*<>*/ var sub_fmtty$3 = ign[2], pad_opt$2 = ign[1], - /*<>*/ _c$_ = + /*<>*/ _da_ = type_ignored_format_substituti(sub_fmtty$3, rest, fmtty0), - match$43 = _c$_[2], + match$43 = _da_[2], fmtty$21 = match$43[2], fmt$22 = match$43[1], - sub_fmtty$4 = _c$_[1]; + sub_fmtty$4 = _da_[1]; /*<>*/ return [0, [23, [9, pad_opt$2, sub_fmtty$4], fmt$22], fmtty$21]; @@ -16077,7 +16069,7 @@ sub_fmtty_rest$17 = sub_fmtty[3], sub2_fmtty$2 = sub_fmtty[2], sub1_fmtty$0 = sub_fmtty[1], - /*<>*/ _c8_ = + /*<>*/ _c9_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty)]; @@ -16086,11 +16078,11 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty$0)], - _c8_)) + _c9_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ /*<>*/ var - _c9_ = + _c__ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$1)]; @@ -16099,7 +16091,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$2)], - _c9_)) + _c__)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -16191,11 +16183,11 @@ /*<>*/ } function recast(fmt, fmtty){ /*<>*/ /*<>*/ var - _c7_ = symm(fmtty); + _c8_ = symm(fmtty); /*<>*/ return type_format (fmt, /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _c7_)); + (CamlinternalFormatBasics[2], _c8_)); /*<>*/ } function fix_padding(padty, width, str){ /*<>*/ var @@ -16205,10 +16197,10 @@ /*<>*/ caml_call1(Stdlib[18], width); if(width$0 <= len) /*<>*/ return str; /*<>*/ var - _c6_ = 2 === padty$0 ? 48 : 32, + _c7_ = 2 === padty$0 ? 48 : 32, /*<>*/ res = /*<>*/ caml_call2 - (Stdlib_Bytes[1], width$0, _c6_); + (Stdlib_Bytes[1], width$0, _c7_); /*<>*/ switch(padty$0){ case 0: /*<>*/ /*<>*/ caml_call5 @@ -16400,16 +16392,16 @@ /*<>*/ return s; /*<>*/ var /*<>*/ n = [0, 0], - _c1_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c0_ = 0; - if(_c1_ >= 0){ - var i$0 = _c0_; + _c2_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c1_ = 0; + if(_c2_ >= 0){ + var i$0 = _c1_; for(;;){ if(9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) n[1]++; /*<>*/ /*<>*/ var - _c5_ = i$0 + 1 | 0; - if(_c1_ === i$0) break; - var i$0 = _c5_; + _c6_ = i$0 + 1 | 0; + if(_c2_ === i$0) break; + var i$0 = _c6_; } } /*<>*/ var @@ -16422,15 +16414,15 @@ /*<>*/ /*<>*/ caml_bytes_set (buf, pos[1], c); pos[1]++; - return sentinal; + return _$_; /*<>*/ } /*<>*/ var /*<>*/ left = [0, ((digits - 1 | 0) % 3 | 0) + 1 | 0], - _c3_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c2_ = 0; - if(_c3_ >= 0){ - var i = _c2_; + _c4_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c3_ = 0; + if(_c4_ >= 0){ + var i = _c3_; for(;;){ var c = caml_string_unsafe_get(s, i); if(9 < c - 48 >>> 0) @@ -16444,9 +16436,9 @@ /*<>*/ put(c); } /*<>*/ /*<>*/ var - _c4_ = i + 1 | 0; - if(_c3_ === i) break; - var i = _c4_; + _c5_ = i + 1 | 0; + if(_c4_ === i) break; + var i = _c5_; } } /*<>*/ return /*<>*/ caml_call1 @@ -16455,139 +16447,139 @@ function convert_int(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cZ_ = cst_d$0; break; + var _c0_ = cst_d$0; break; case 2: - var _cZ_ = cst_d$1; break; + var _c0_ = cst_d$1; break; case 4: - var _cZ_ = cst_i$1; break; + var _c0_ = cst_i$1; break; case 5: - var _cZ_ = cst_i$2; break; + var _c0_ = cst_i$2; break; case 6: - var _cZ_ = cst_x; break; + var _c0_ = cst_x; break; case 7: - var _cZ_ = cst_x$0; break; + var _c0_ = cst_x$0; break; case 8: - var _cZ_ = cst_X; break; + var _c0_ = cst_X; break; case 9: - var _cZ_ = cst_X$0; break; + var _c0_ = cst_X$0; break; case 10: - var _cZ_ = cst_o; break; + var _c0_ = cst_o; break; case 11: - var _cZ_ = cst_o$0; break; + var _c0_ = cst_o$0; break; case 0: case 13: - var _cZ_ = cst_d; break; + var _c0_ = cst_d; break; case 3: case 14: - var _cZ_ = cst_i$0; break; - default: var _cZ_ = cst_u; + var _c0_ = cst_i$0; break; + default: var _c0_ = cst_u; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cZ_, n)); + /*<>*/ caml_format_int(_c0_, n)); /*<>*/ } function convert_int32(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cY_ = cst_ld$0; break; + var _cZ_ = cst_ld$0; break; case 2: - var _cY_ = cst_ld$1; break; + var _cZ_ = cst_ld$1; break; case 4: - var _cY_ = cst_li$1; break; + var _cZ_ = cst_li$1; break; case 5: - var _cY_ = cst_li$2; break; + var _cZ_ = cst_li$2; break; case 6: - var _cY_ = cst_lx; break; + var _cZ_ = cst_lx; break; case 7: - var _cY_ = cst_lx$0; break; + var _cZ_ = cst_lx$0; break; case 8: - var _cY_ = cst_lX; break; + var _cZ_ = cst_lX; break; case 9: - var _cY_ = cst_lX$0; break; + var _cZ_ = cst_lX$0; break; case 10: - var _cY_ = cst_lo; break; + var _cZ_ = cst_lo; break; case 11: - var _cY_ = cst_lo$0; break; + var _cZ_ = cst_lo$0; break; case 0: case 13: - var _cY_ = cst_ld; break; + var _cZ_ = cst_ld; break; case 3: case 14: - var _cY_ = cst_li$0; break; - default: var _cY_ = cst_lu; + var _cZ_ = cst_li$0; break; + default: var _cZ_ = cst_lu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cY_, n)); + /*<>*/ caml_format_int(_cZ_, n)); /*<>*/ } function convert_nativeint(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cX_ = cst_nd$0; break; + var _cY_ = cst_nd$0; break; case 2: - var _cX_ = cst_nd$1; break; + var _cY_ = cst_nd$1; break; case 4: - var _cX_ = cst_ni$1; break; + var _cY_ = cst_ni$1; break; case 5: - var _cX_ = cst_ni$2; break; + var _cY_ = cst_ni$2; break; case 6: - var _cX_ = cst_nx; break; + var _cY_ = cst_nx; break; case 7: - var _cX_ = cst_nx$0; break; + var _cY_ = cst_nx$0; break; case 8: - var _cX_ = cst_nX; break; + var _cY_ = cst_nX; break; case 9: - var _cX_ = cst_nX$0; break; + var _cY_ = cst_nX$0; break; case 10: - var _cX_ = cst_no; break; + var _cY_ = cst_no; break; case 11: - var _cX_ = cst_no$0; break; + var _cY_ = cst_no$0; break; case 0: case 13: - var _cX_ = cst_nd; break; + var _cY_ = cst_nd; break; case 3: case 14: - var _cX_ = cst_ni$0; break; - default: var _cX_ = cst_nu; + var _cY_ = cst_ni$0; break; + default: var _cY_ = cst_nu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cX_, n)); + /*<>*/ caml_format_int(_cY_, n)); /*<>*/ } function convert_int64(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cW_ = cst_Ld$0; break; + var _cX_ = cst_Ld$0; break; case 2: - var _cW_ = cst_Ld$1; break; + var _cX_ = cst_Ld$1; break; case 4: - var _cW_ = cst_Li$1; break; + var _cX_ = cst_Li$1; break; case 5: - var _cW_ = cst_Li$2; break; + var _cX_ = cst_Li$2; break; case 6: - var _cW_ = cst_Lx; break; + var _cX_ = cst_Lx; break; case 7: - var _cW_ = cst_Lx$0; break; + var _cX_ = cst_Lx$0; break; case 8: - var _cW_ = cst_LX; break; + var _cX_ = cst_LX; break; case 9: - var _cW_ = cst_LX$0; break; + var _cX_ = cst_LX$0; break; case 10: - var _cW_ = cst_Lo; break; + var _cX_ = cst_Lo; break; case 11: - var _cW_ = cst_Lo$0; break; + var _cX_ = cst_Lo$0; break; case 0: case 13: - var _cW_ = cst_Ld; break; + var _cX_ = cst_Ld; break; case 3: case 14: - var _cW_ = cst_Li$0; break; - default: var _cW_ = cst_Lu; + var _cX_ = cst_Li$0; break; + default: var _cX_ = cst_Lu; } /*<>*/ return transform_int_alt (iconv, /*<>*/ runtime.caml_int64_format - (_cW_, n)); + (_cX_, n)); /*<>*/ } function convert_float(fconv, prec, x){ function hex(param){ @@ -16619,41 +16611,41 @@ i = 0; /*<>*/ for(;;){ if(i === len) - var _cT_ = 0; + var _cU_ = 0; else{ /*<>*/ /*<>*/ var - _cS_ = + _cT_ = /*<>*/ caml_string_get(str, i) - 46 | 0; a: { - if(23 < _cS_ >>> 0){ - if(55 === _cS_) break a; + if(23 < _cT_ >>> 0){ + if(55 === _cT_) break a; } - else if(21 < _cS_ - 1 >>> 0) break a; + else if(21 < _cT_ - 1 >>> 0) break a; /*<>*/ var /*<>*/ i$0 = i + 1 | 0, i = i$0; continue; } - var _cT_ = 1; + var _cU_ = 1; } /*<>*/ /*<>*/ var - _cU_ = - _cT_ + _cV_ = + _cU_ ? str : /*<>*/ caml_call2 (Stdlib[28], str, cst$17); - /*<>*/ return caml_special_val(_cU_); + /*<>*/ return caml_special_val(_cV_); } case 6: /*<>*/ return hex(0); case 7: /*<>*/ /*<>*/ var - _cV_ = hex(0); + _cW_ = hex(0); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_String[25], _cV_); + (Stdlib_String[25], _cW_); case 8: /*<>*/ return caml_special_val(hex(0)); default: @@ -17038,12 +17030,12 @@ /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _cR_ = recast(fmt, fmtty); + /*<>*/ _cS_ = recast(fmt, fmtty); /*<>*/ return make_printf (k$0, acc$0, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _cR_, rest$13)); /*<>*/ }; + (CamlinternalFormatBasics[3], _cS_, rest$13)); /*<>*/ }; case 15: var rest$14 = fmt$0[1]; /*<>*/ return function(f, x){ @@ -17070,11 +17062,11 @@ fmt$0 = rest$16; break; case 18: - var _cP_ = fmt$0[1]; - if(0 === _cP_[0]) + var _cQ_ = fmt$0[1]; + if(0 === _cQ_[0]) var rest$17 = fmt$0[2], - fmt$1 = _cP_[1][1], + fmt$1 = _cQ_[1][1], k$3 = function(acc, k, rest){ function k$0(kacc){ @@ -17090,7 +17082,7 @@ else var rest$18 = fmt$0[2], - fmt$2 = _cP_[1][1], + fmt$2 = _cQ_[1][1], k$4 = function(acc, k, rest){ function k$0(kacc){ @@ -17146,14 +17138,14 @@ rest$23 = fmt$0[3], f = fmt$0[2], arity = fmt$0[1], - /*<>*/ _cQ_ = + /*<>*/ _cR_ = /*<>*/ caml_call1(f, 0); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cQ_]); + (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cR_]); var counter$0 = counter + 1 | 0; /*<>*/ return make_custom$0 - (counter$0, k$0, acc$0, rest$23, arity, _cQ_); + (counter$0, k$0, acc$0, rest$23, arity, _cR_); } } /*<>*/ } @@ -17336,7 +17328,7 @@ fmt); /*<>*/ }; case 10: var rest$9 = fmtty[1]; - /*<>*/ return function(param, _cO_){ + /*<>*/ return function(param, _cP_){ /*<>*/ return make_from_fmtty (k, acc, rest$9, fmt); /*<>*/ }; case 11: @@ -17365,13 +17357,13 @@ /*<>*/ } function make_invalid_arg(counter, k, acc, fmt){ /*<>*/ /*<>*/ var - _cN_ = [8, acc, cst_Printf_bad_conversion$0]; + _cO_ = [8, acc, cst_Printf_bad_conversion$0]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cN_, fmt]); + (make_printf$0, [0, k, _cO_, fmt]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cN_, fmt); + (counter$0, k, _cO_, fmt); /*<>*/ } function make_custom$0(counter, k, acc, rest, arity, f){ /*<>*/ if(arity){ @@ -17385,13 +17377,13 @@ /*<>*/ caml_call1(f, x)); /*<>*/ }; } /*<>*/ /*<>*/ var - _cM_ = [4, acc, f]; + _cN_ = [4, acc, f]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cM_, rest]); + (make_printf$0, [0, k, _cN_, rest]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cM_, rest); + (counter$0, k, _cN_, rest); /*<>*/ } function make_printf(k, acc, fmt){ /*<>*/ return caml_trampoline(make_printf$0(0, k, acc, fmt)); @@ -17412,68 +17404,68 @@ /*<>*/ if(typeof pad === "number"){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cl_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cL_){ - /*<>*/ return _cl_;}; + _cm_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cM_){ + /*<>*/ return _cm_;}; } if(prec){ /*<>*/ var - /*<>*/ _ci_ = make_iprintf(k, o, fmt), - /*<>*/ _cj_ = - function(_cK_){ /*<>*/ return _ci_;}; - /*<>*/ return function(_cJ_){ - /*<>*/ return _cj_;}; + /*<>*/ _cj_ = make_iprintf(k, o, fmt), + /*<>*/ _ck_ = + function(_cL_){ /*<>*/ return _cj_;}; + /*<>*/ return function(_cK_){ + /*<>*/ return _ck_;}; } /*<>*/ /*<>*/ var - _ck_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cI_){ - /*<>*/ return _ck_;}; + _cl_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cJ_){ + /*<>*/ return _cl_;}; } if(0 === pad[0]){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cp_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cH_){ - /*<>*/ return _cp_;}; + _cq_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cI_){ + /*<>*/ return _cq_;}; } if(prec){ /*<>*/ var - /*<>*/ _cm_ = make_iprintf(k, o, fmt), - /*<>*/ _cn_ = - function(_cG_){ /*<>*/ return _cm_;}; - /*<>*/ return function(_cF_){ - /*<>*/ return _cn_;}; + /*<>*/ _cn_ = make_iprintf(k, o, fmt), + /*<>*/ _co_ = + function(_cH_){ /*<>*/ return _cn_;}; + /*<>*/ return function(_cG_){ + /*<>*/ return _co_;}; } /*<>*/ /*<>*/ var - _co_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cE_){ - /*<>*/ return _co_;}; + _cp_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cF_){ + /*<>*/ return _cp_;}; } if(typeof prec !== "number"){ /*<>*/ var - /*<>*/ _cv_ = make_iprintf(k, o, fmt), - /*<>*/ _cw_ = - function(_cD_){ /*<>*/ return _cv_;}; - /*<>*/ return function(_cC_){ - /*<>*/ return _cw_;}; + /*<>*/ _cw_ = make_iprintf(k, o, fmt), + /*<>*/ _cx_ = + function(_cE_){ /*<>*/ return _cw_;}; + /*<>*/ return function(_cD_){ + /*<>*/ return _cx_;}; } if(prec){ /*<>*/ var - /*<>*/ _cq_ = make_iprintf(k, o, fmt), - /*<>*/ _cr_ = - function(_cB_){ /*<>*/ return _cq_;}, - /*<>*/ _cs_ = - function(_cA_){ /*<>*/ return _cr_;}; - /*<>*/ return function(_cz_){ - /*<>*/ return _cs_;}; + /*<>*/ _cr_ = make_iprintf(k, o, fmt), + /*<>*/ _cs_ = + function(_cC_){ /*<>*/ return _cr_;}, + /*<>*/ _ct_ = + function(_cB_){ /*<>*/ return _cs_;}; + /*<>*/ return function(_cA_){ + /*<>*/ return _ct_;}; } /*<>*/ /*<>*/ var - _ct_ = make_iprintf(k, o, fmt); - /*<>*/ function _cu_(_cy_){ - /*<>*/ return _ct_; + _cu_ = make_iprintf(k, o, fmt); + /*<>*/ function _cv_(_cz_){ + /*<>*/ return _cu_; } - /*<>*/ return function(_cx_){ - /*<>*/ return _cu_;}; + /*<>*/ return function(_cy_){ + /*<>*/ return _cv_;}; /*<>*/ } function make_iprintf$0(counter, k, o, fmt){ /*<>*/ var k$0 = k, fmt$0 = fmt; @@ -17485,69 +17477,69 @@ case 0: /*<>*/ var rest = fmt$0[1], - /*<>*/ _by_ = + /*<>*/ _bz_ = make_iprintf(k$0, o, rest); - /*<>*/ return function(_ch_){ - /*<>*/ return _by_;}; + /*<>*/ return function(_ci_){ + /*<>*/ return _bz_;}; case 1: /*<>*/ var rest$0 = fmt$0[1], - /*<>*/ _bz_ = + /*<>*/ _bA_ = make_iprintf(k$0, o, rest$0); - /*<>*/ return function(_cg_){ - /*<>*/ return _bz_;}; + /*<>*/ return function(_ch_){ + /*<>*/ return _bA_;}; case 2: - var _bA_ = fmt$0[1]; - if(typeof _bA_ === "number"){ + var _bB_ = fmt$0[1]; + if(typeof _bB_ === "number"){ /*<>*/ var rest$1 = fmt$0[2], - /*<>*/ _bB_ = + /*<>*/ _bC_ = make_iprintf(k$0, o, rest$1); - /*<>*/ return function(_cf_){ - /*<>*/ return _bB_;}; + /*<>*/ return function(_cg_){ + /*<>*/ return _bC_;}; } - if(0 === _bA_[0]){ + if(0 === _bB_[0]){ /*<>*/ var rest$2 = fmt$0[2], - /*<>*/ _bC_ = + /*<>*/ _bD_ = make_iprintf(k$0, o, rest$2); - /*<>*/ return function(_ce_){ - /*<>*/ return _bC_;}; + /*<>*/ return function(_cf_){ + /*<>*/ return _bD_;}; } /*<>*/ var rest$3 = fmt$0[2], - /*<>*/ _bD_ = + /*<>*/ _bE_ = make_iprintf(k$0, o, rest$3), - /*<>*/ _bE_ = - function(_cd_){ /*<>*/ return _bD_;}; - /*<>*/ return function(_cc_){ - /*<>*/ return _bE_;}; + /*<>*/ _bF_ = + function(_ce_){ /*<>*/ return _bE_;}; + /*<>*/ return function(_cd_){ + /*<>*/ return _bF_;}; case 3: - var _bF_ = fmt$0[1]; - if(typeof _bF_ === "number"){ + var _bG_ = fmt$0[1]; + if(typeof _bG_ === "number"){ /*<>*/ var rest$4 = fmt$0[2], - /*<>*/ _bG_ = + /*<>*/ _bH_ = make_iprintf(k$0, o, rest$4); - /*<>*/ return function(_cb_){ - /*<>*/ return _bG_;}; + /*<>*/ return function(_cc_){ + /*<>*/ return _bH_;}; } - if(0 === _bF_[0]){ + if(0 === _bG_[0]){ /*<>*/ var rest$5 = fmt$0[2], - /*<>*/ _bH_ = + /*<>*/ _bI_ = make_iprintf(k$0, o, rest$5); - /*<>*/ return function(_ca_){ - /*<>*/ return _bH_;}; + /*<>*/ return function(_cb_){ + /*<>*/ return _bI_;}; } /*<>*/ var rest$6 = fmt$0[2], - /*<>*/ _bI_ = + /*<>*/ _bJ_ = make_iprintf(k$0, o, rest$6), - /*<>*/ _bJ_ = - function(_b$_){ /*<>*/ return _bI_;}; - /*<>*/ return function(_b__){ - /*<>*/ return _bJ_;}; + /*<>*/ _bK_ = + function(_ca_){ /*<>*/ return _bJ_;}; + /*<>*/ return function(_b$_){ + /*<>*/ return _bK_;}; case 4: var rest$7 = fmt$0[4], prec = fmt$0[3], pad = fmt$0[2]; /*<>*/ return fn_of_padding_precision @@ -17569,31 +17561,31 @@ /*<>*/ return fn_of_padding_precision (k$0, o, rest$11, pad$3, prec$3); case 9: - var _bK_ = fmt$0[1]; - if(typeof _bK_ === "number"){ + var _bL_ = fmt$0[1]; + if(typeof _bL_ === "number"){ /*<>*/ var rest$12 = fmt$0[2], - /*<>*/ _bL_ = + /*<>*/ _bM_ = make_iprintf(k$0, o, rest$12); - /*<>*/ return function(_b9_){ - /*<>*/ return _bL_;}; + /*<>*/ return function(_b__){ + /*<>*/ return _bM_;}; } - if(0 === _bK_[0]){ + if(0 === _bL_[0]){ /*<>*/ var rest$13 = fmt$0[2], - /*<>*/ _bM_ = + /*<>*/ _bN_ = make_iprintf(k$0, o, rest$13); - /*<>*/ return function(_b8_){ - /*<>*/ return _bM_;}; + /*<>*/ return function(_b9_){ + /*<>*/ return _bN_;}; } /*<>*/ var rest$14 = fmt$0[2], - /*<>*/ _bN_ = + /*<>*/ _bO_ = make_iprintf(k$0, o, rest$14), - /*<>*/ _bO_ = - function(_b7_){ /*<>*/ return _bN_;}; - /*<>*/ return function(_b6_){ - /*<>*/ return _bO_;}; + /*<>*/ _bP_ = + function(_b8_){ /*<>*/ return _bO_;}; + /*<>*/ return function(_b7_){ + /*<>*/ return _bP_;}; case 10: var rest$15 = fmt$0[1], fmt$0 = rest$15; break; case 11: @@ -17603,45 +17595,45 @@ case 13: /*<>*/ var rest$18 = fmt$0[3], - /*<>*/ _bP_ = + /*<>*/ _bQ_ = make_iprintf(k$0, o, rest$18); - /*<>*/ return function(_b5_){ - /*<>*/ return _bP_;}; + /*<>*/ return function(_b6_){ + /*<>*/ return _bQ_;}; case 14: var rest$19 = fmt$0[3], fmtty = fmt$0[2]; /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _b4_ = recast(fmt, fmtty); + /*<>*/ _b5_ = recast(fmt, fmtty); /*<>*/ return make_iprintf (k$0, o, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _b4_, rest$19)); /*<>*/ }; + (CamlinternalFormatBasics[3], _b5_, rest$19)); /*<>*/ }; case 15: /*<>*/ var rest$20 = fmt$0[1], - /*<>*/ _bQ_ = + /*<>*/ _bR_ = make_iprintf(k$0, o, rest$20), - /*<>*/ _bR_ = - function(_b3_){ /*<>*/ return _bQ_;}; - /*<>*/ return function(_b2_){ - /*<>*/ return _bR_;}; + /*<>*/ _bS_ = + function(_b4_){ /*<>*/ return _bR_;}; + /*<>*/ return function(_b3_){ + /*<>*/ return _bS_;}; case 16: /*<>*/ var rest$21 = fmt$0[1], - /*<>*/ _bS_ = + /*<>*/ _bT_ = make_iprintf(k$0, o, rest$21); - /*<>*/ return function(_b1_){ - /*<>*/ return _bS_;}; + /*<>*/ return function(_b2_){ + /*<>*/ return _bT_;}; case 17: var rest$22 = fmt$0[2], fmt$0 = rest$22; break; case 18: - var _bT_ = fmt$0[1]; - if(0 === _bT_[0]) + var _bU_ = fmt$0[1]; + if(0 === _bU_[0]) var rest$23 = fmt$0[2], - fmt$1 = _bT_[1][1], + fmt$1 = _bU_[1][1], k$3 = function(k, rest){ function k$0(koc){ @@ -17656,7 +17648,7 @@ else var rest$24 = fmt$0[2], - fmt$2 = _bT_[1][1], + fmt$2 = _bU_[1][1], k$4 = function(k, rest){ function k$0(koc){ @@ -17675,32 +17667,32 @@ case 20: /*<>*/ var rest$25 = fmt$0[3], - /*<>*/ _bU_ = + /*<>*/ _bV_ = make_iprintf(k$0, o, rest$25); - /*<>*/ return function(_b0_){ - /*<>*/ return _bU_;}; + /*<>*/ return function(_b1_){ + /*<>*/ return _bV_;}; case 21: /*<>*/ var rest$26 = fmt$0[2], - /*<>*/ _bV_ = + /*<>*/ _bW_ = make_iprintf(k$0, o, rest$26); - /*<>*/ return function(_bZ_){ - /*<>*/ return _bV_;}; + /*<>*/ return function(_b0_){ + /*<>*/ return _bW_;}; case 22: /*<>*/ var rest$27 = fmt$0[1], - /*<>*/ _bW_ = + /*<>*/ _bX_ = make_iprintf(k$0, o, rest$27); - /*<>*/ return function(_bY_){ - /*<>*/ return _bW_;}; + /*<>*/ return function(_bZ_){ + /*<>*/ return _bX_;}; case 23: - var rest$28 = fmt$0[2], ign = fmt$0[1], _bX_ = 0; + var rest$28 = fmt$0[2], ign = fmt$0[1], _bY_ = 0; /*<>*/ return make_ignored_param (function(param){ /*<>*/ return caml_call1 (k$0, o); /*<>*/ }, - _bX_, + _bY_, ign, rest$28); default: @@ -17718,10 +17710,10 @@ /*<>*/ if(param){ /*<>*/ var arity = param[1], - /*<>*/ _bw_ = + /*<>*/ _bx_ = fn_of_custom_arity(k, o, fmt, arity); - /*<>*/ return function(_bx_){ - /*<>*/ return _bw_;}; + /*<>*/ return function(_by_){ + /*<>*/ return _bx_;}; } /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -17892,9 +17884,9 @@ var f = acc$0[2], p$3 = acc$0[1]; /*<>*/ strput_acc(b, p$3); /*<>*/ /*<>*/ var - _bv_ = /*<>*/ caml_call1(f, 0); + _bw_ = /*<>*/ caml_call1(f, 0); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, _bv_); + (Stdlib_Buffer[16], b, _bw_); case 7: var acc$3 = acc$0[1], acc$0 = acc$3; break; case 8: @@ -17925,11 +17917,11 @@ function k(acc){ /*<>*/ strput_acc(buf, acc); /*<>*/ /*<>*/ var - _bu_ = + _bv_ = /*<>*/ caml_call1 (Stdlib_Buffer[2], buf); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _bu_); + (Stdlib[2], _bv_); /*<>*/ } /*<>*/ return make_printf(k, 0, fmt); } @@ -18004,15 +17996,15 @@ else /*<>*/ try{ /*<>*/ var - /*<>*/ _bs_ = + /*<>*/ _bt_ = /*<>*/ runtime.caml_int_of_string ( /*<>*/ caml_call3 (Stdlib_String[15], str, nstart, nend - nstart | 0)), - indent = _bs_; + indent = _bt_; } - catch(_bt_){ - var _br_ = caml_wrap_exception(_bt_); - if(_br_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_br_, 0); + catch(_bu_){ + var _bs_ = caml_wrap_exception(_bu_); + if(_bs_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_bs_, 0); var indent = invalid_box(0); } /*<>*/ /*<>*/ var @@ -18078,7 +18070,7 @@ (end_ind){ /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ } function invalid_format_without(str_ind, c, s){ /*<>*/ return /*<>*/ caml_call4 @@ -18216,9 +18208,9 @@ b: try{ var - _bg_ = str_ind$3 === end_ind ? 1 : 0, - _bh_ = - _bg_ + _bh_ = str_ind$3 === end_ind ? 1 : 0, + _bi_ = + _bh_ || (60 !== @@ -18226,7 +18218,7 @@ (str, str_ind$3) ? 1 : 0); - if(_bh_) + if(_bi_) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -18265,12 +18257,12 @@ str, str_ind$3 - 2 | 0, (str_ind_3 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bi_ = - [0, s, width, 0], /*<>*/ _bj_ = + [0, s, width, 0], + /*<>*/ _bk_ = str_ind_3 + 1 | 0, - formatting_lit$0 = _bi_, - next_ind = _bj_; + formatting_lit$0 = _bj_, + next_ind = _bk_; break b; } } @@ -18296,21 +18288,21 @@ str, str_ind$3 - 2 | 0, (str_ind_5 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bk_ = - [0, s$0, width, offset], /*<>*/ _bl_ = + [0, s$0, width, offset], + /*<>*/ _bm_ = str_ind_5 + 1 | 0, - formatting_lit$0 = _bk_, - next_ind = _bl_; + formatting_lit$0 = _bl_, + next_ind = _bm_; break b; } /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); } - catch(_bq_){ - var _bf_ = caml_wrap_exception(_bq_); - if(_bf_ !== Stdlib[8] && _bf_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bf_, 0); + catch(_br_){ + var _bg_ = caml_wrap_exception(_br_); + if(_bg_ !== Stdlib[8] && _bg_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bg_, 0); var formatting_lit$0 = formatting_lit, next_ind = str_ind$3; } var @@ -18334,7 +18326,7 @@ if(58 > match$6) break c; } else if(45 === match$6) break c; - var _bo_ = 0; + var _bp_ = 0; break b; } /*<>*/ var @@ -18358,28 +18350,28 @@ str, str_ind$4 - 2 | 0, (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), - _bo_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; + _bp_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; } - var _bn_ = _bo_; + var _bo_ = _bp_; } - catch(_bp_){ - var _bm_ = caml_wrap_exception(_bp_); - if(_bm_ !== Stdlib[8] && _bm_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bm_, 0); - var _bn_ = 0; + catch(_bq_){ + var _bn_ = caml_wrap_exception(_bq_); + if(_bn_ !== Stdlib[8] && _bn_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bn_, 0); + var _bo_ = 0; } - if(_bn_) + if(_bo_) var - match$5 = _bn_[1], + match$5 = _bo_[1], formatting_lit$1 = match$5[2], next_ind$0 = match$5[1], fmt_rest$13 = parse(next_ind$0, end_ind)[1], - _be_ = [0, [17, formatting_lit$1, fmt_rest$13]]; + _bf_ = [0, [17, formatting_lit$1, fmt_rest$13]]; else var fmt_rest$14 = parse(str_ind$4, end_ind)[1], - _be_ = [0, [17, _Q_, fmt_rest$14]]; - var match$0 = _be_; + _bf_ = [0, [17, _Q_, fmt_rest$14]]; + var match$0 = _bf_; break a; case 31: var @@ -18537,29 +18529,29 @@ /*<>*/ var /*<>*/ ignored$2 = [9, get_pad_opt(95), sub_fmtty], - _aN_ = [0, [23, ignored$2, fmt_rest$7]]; + _aO_ = [0, [23, ignored$2, fmt_rest$7]]; else - var _aN_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; - var fmt_result = _aN_; + var _aO_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; + var fmt_result = _aO_; break a; case 44: var fmt_result = parse(str_ind, end_ind); break a; case 67: /*<>*/ var fmt_rest$10 = parse(str_ind, end_ind)[1], - /*<>*/ _aP_ = + /*<>*/ _aQ_ = get_ign(0) ? [0, [23, 1, fmt_rest$10]] : [0, [1, fmt_rest$10]], - fmt_result = _aP_; + fmt_result = _aQ_; break a; case 78: var fmt_rest$14 = parse(str_ind, end_ind)[1], counter$0 = 2; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$6 = [11, counter$0], - _aV_ = [0, [23, ignored$6, fmt_rest$14]]; + _aW_ = [0, [23, ignored$6, fmt_rest$14]]; else - var _aV_ = [0, [21, counter$0, fmt_rest$14]]; - var fmt_result = _aV_; + var _aW_ = [0, [21, counter$0, fmt_rest$14]]; + var fmt_result = _aW_; break a; case 83: /*<>*/ var @@ -18570,15 +18562,15 @@ /*<>*/ var /*<>*/ ignored$7 = [1, get_padprec_opt(95)], - _aW_ = [0, [23, ignored$7, fmt_rest$15]]; + _aX_ = [0, [23, ignored$7, fmt_rest$15]]; else /*<>*/ var /*<>*/ match$5 = make_padding_fmt_ebb(pad$6, fmt_rest$15), fmt_rest$16 = match$5[2], pad$7 = match$5[1], - _aW_ = [0, [3, pad$7, fmt_rest$16]]; - var fmt_result = _aW_; + _aX_ = [0, [3, pad$7, fmt_rest$16]]; + var fmt_result = _aX_; break a; case 91: if(str_ind === end_ind) @@ -18591,7 +18583,7 @@ function(c){ /*<>*/ add_in_char_set (char_set, c); - /*<>*/ return sentinal; + /*<>*/ return _$_; /*<>*/ }, add_range = function(c$0, c){ @@ -18603,12 +18595,12 @@ /*<>*/ caml_call1 (Stdlib[29], i)); /*<>*/ /*<>*/ var - _bd_ = i + 1 | 0; + _be_ = i + 1 | 0; if(c === i) break; - var i = _bd_; + var i = _be_; } } - return sentinal; + return _$_; /*<>*/ }, fail_single_percent = function(str_ind){ @@ -18630,13 +18622,13 @@ if(93 === c) /*<>*/ return str_ind$0 + 1 | 0; - var _bc_ = str_ind$0 + 1 | 0; + var _bd_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_after_char$0, [0, _bc_, end_ind, c]); + (parse_char_set_after_char$0, [0, _bd_, end_ind, c]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_after_char$0 - (counter$0, _bc_, end_ind, c); + (counter$0, _bd_, end_ind, c); } /*<>*/ add_char(45); var str_ind$1 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$1; @@ -18687,13 +18679,13 @@ /*<>*/ return fail_single_percent (str_ind$2); /*<>*/ add_range(c$0, c$3); - var _ba_ = str_ind$2 + 2 | 0; + var _bb_ = str_ind$2 + 2 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _ba_, end_ind]); + (parse_char_set_content, [0, _bb_, end_ind]); var counter$2 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$2, _ba_, end_ind); + (counter$2, _bb_, end_ind); } if(93 === c$2){ /*<>*/ add_char(c$0); @@ -18702,23 +18694,23 @@ | 0; } /*<>*/ add_range(c$0, c$2); - var _bb_ = str_ind$2 + 1 | 0; + var _bc_ = str_ind$2 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _bb_, end_ind]); + (parse_char_set_content, [0, _bc_, end_ind]); var counter$1 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$1, _bb_, end_ind); + (counter$1, _bc_, end_ind); } if(37 === c$0){ /*<>*/ add_char(c$1); - var _a$_ = str_ind$0 + 1 | 0; + var _ba_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _a$_, end_ind]); + (parse_char_set_content, [0, _ba_, end_ind]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$0, _a$_, end_ind); + (counter$0, _ba_, end_ind); } } if(37 === c$0) @@ -18768,10 +18760,10 @@ /*<>*/ var /*<>*/ ignored$9 = [10, get_pad_opt(95), char_set$1], - _a1_ = [0, [23, ignored$9, fmt_rest$19]]; + _a2_ = [0, [23, ignored$9, fmt_rest$19]]; else - var _a1_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; - var fmt_result = _a1_; + var _a2_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; + var fmt_result = _a2_; break a; case 97: var @@ -18791,28 +18783,28 @@ if(match$7){ if(0 === match$7[1]) /*<>*/ var - /*<>*/ _a2_ = + /*<>*/ _a3_ = get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], - _a3_ = _a2_; + _a4_ = _a3_; else var - _a3_ = + _a4_ = legacy_behavior$0 ? char_format(fmt_rest$21) : invalid_format_message (str_ind, cst_non_zero_widths_are_unsupp); - var _a4_ = _a3_; + var _a5_ = _a4_; } else - var _a4_ = char_format(fmt_rest$21); - var fmt_result = _a4_; + var _a5_ = char_format(fmt_rest$21); + var fmt_result = _a5_; break a; case 114: /*<>*/ var fmt_rest$22 = parse(str_ind, end_ind)[1], - /*<>*/ _a5_ = + /*<>*/ _a6_ = get_ign(0) ? [0, [23, 2, fmt_rest$22]] : [0, [19, fmt_rest$22]], - fmt_result = _a5_; + fmt_result = _a6_; break a; case 115: /*<>*/ var @@ -18823,15 +18815,15 @@ /*<>*/ var /*<>*/ ignored$10 = [0, get_padprec_opt(95)], - _a6_ = [0, [23, ignored$10, fmt_rest$23]]; + _a7_ = [0, [23, ignored$10, fmt_rest$23]]; else /*<>*/ var /*<>*/ match$8 = make_padding_fmt_ebb(pad$9, fmt_rest$23), fmt_rest$24 = match$8[2], pad$10 = match$8[1], - _a6_ = [0, [2, pad$10, fmt_rest$24]]; - var fmt_result = _a6_; + _a7_ = [0, [2, pad$10, fmt_rest$24]]; + var fmt_result = _a7_; break a; case 116: var @@ -18850,10 +18842,10 @@ /*<>*/ var /*<>*/ ignored$11 = [8, get_pad_opt(95), sub_fmtty$0], - _a7_ = [0, [23, ignored$11, fmt_rest$26]]; + _a8_ = [0, [23, ignored$11, fmt_rest$26]]; else - var _a7_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; - var fmt_result = _a7_; + var _a8_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; + var fmt_result = _a8_; break a; case 66: case 98: @@ -18865,15 +18857,15 @@ /*<>*/ var /*<>*/ ignored$3 = [7, get_padprec_opt(95)], - _aO_ = [0, [23, ignored$3, fmt_rest$8]]; + _aP_ = [0, [23, ignored$3, fmt_rest$8]]; else /*<>*/ var /*<>*/ match$3 = make_padding_fmt_ebb(pad$3, fmt_rest$8), fmt_rest$9 = match$3[2], pad$4 = match$3[1], - _aO_ = [0, [9, pad$4, fmt_rest$9]]; - var fmt_result = _aO_; + _aP_ = [0, [9, pad$4, fmt_rest$9]]; + var fmt_result = _aP_; break a; case 37: case 64: @@ -18889,22 +18881,22 @@ /*<>*/ symb$0 = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _a8_ = symb$0 - 88 | 0; + /*<>*/ _a9_ = symb$0 - 88 | 0; b: { - if(32 >= _a8_ >>> 0) - switch(_a8_){ + if(32 >= _a9_ >>> 0) + switch(_a9_){ case 0: case 12: case 17: case 23: case 29: case 32: - var _aU_ = 1; break b; + var _aV_ = 1; break b; } - var _aU_ = 0; + var _aV_ = 0; } - /*<>*/ if(_aU_) break; + /*<>*/ if(_aV_) break; } var fmt_rest$13 = parse(str_ind, end_ind)[1]; b: @@ -18925,10 +18917,10 @@ /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$5 = [11, counter], - _aT_ = [0, [23, ignored$5, fmt_rest$13]]; + _aU_ = [0, [23, ignored$5, fmt_rest$13]]; else - var _aT_ = [0, [21, counter, fmt_rest$13]]; - var fmt_result = _aT_; + var _aU_ = [0, [21, counter, fmt_rest$13]]; + var fmt_result = _aU_; break a; case 32: case 35: @@ -18947,26 +18939,26 @@ case 117: case 120: /*<>*/ var - /*<>*/ _aX_ = get_space(0), - /*<>*/ _aY_ = get_hash(0), + /*<>*/ _aY_ = get_space(0), + /*<>*/ _aZ_ = get_hash(0), /*<>*/ iconv$2 = - compute_int_conv(pct_ind, str_ind, get_plus(0), _aY_, _aX_, symb), + compute_int_conv(pct_ind, str_ind, get_plus(0), _aZ_, _aY_, symb), fmt_rest$17 = parse(str_ind, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$8 = [2, iconv$2, get_pad_opt(95)], - _aZ_ = [0, [23, ignored$8, fmt_rest$17]]; + _a0_ = [0, [23, ignored$8, fmt_rest$17]]; else /*<>*/ var - /*<>*/ _a0_ = get_prec(0), + /*<>*/ _a1_ = get_prec(0), /*<>*/ match$6 = - make_padprec_fmt_ebb(get_int_pad(0), _a0_, fmt_rest$17), + make_padprec_fmt_ebb(get_int_pad(0), _a1_, fmt_rest$17), fmt_rest$18 = match$6[3], prec$4 = match$6[2], pad$8 = match$6[1], - _aZ_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; - var fmt_result = _aZ_; + _a0_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; + var fmt_result = _a0_; break a; case 69: case 70: @@ -18996,28 +18988,28 @@ if(3 >= switcher >>> 0){ switch(switcher){ case 0: - var _a9_ = 1; break; + var _a__ = 1; break; case 1: - var _a9_ = 0; break; + var _a__ = 0; break; case 2: - var _a9_ = 3; break; - default: var _a9_ = 6; + var _a__ = 3; break; + default: var _a__ = 6; } - var kind = _a9_; + var kind = _a__; break b; } } else if(69 <= symb){ switch(symb - 69 | 0){ case 0: - var _a__ = 2; break; + var _a$_ = 2; break; case 1: break c; case 2: - var _a__ = 4; break; - default: var _a__ = 7; + var _a$_ = 4; break; + default: var _a$_ = 7; } - var kind = _a__; + var kind = _a$_; break b; } if(hash$1){ @@ -19035,25 +19027,25 @@ match = get_prec(0); if(typeof match === "number") var - _aQ_ = + _aR_ = match ? incompatible_flag(pct_ind, str_ind, 95, cst$26) : 0; else - var ndec = match[1], _aQ_ = [0, ndec]; + var ndec = match[1], _aR_ = [0, ndec]; /*<>*/ var /*<>*/ ignored$4 = - [6, get_pad_opt(95), _aQ_], - _aR_ = [0, [23, ignored$4, fmt_rest$11]]; + [6, get_pad_opt(95), _aR_], + _aS_ = [0, [23, ignored$4, fmt_rest$11]]; } else /*<>*/ var - /*<>*/ _aS_ = get_prec(0), + /*<>*/ _aT_ = get_prec(0), /*<>*/ match$4 = - make_padprec_fmt_ebb(get_pad(0), _aS_, fmt_rest$11), + make_padprec_fmt_ebb(get_pad(0), _aT_, fmt_rest$11), fmt_rest$12 = match$4[3], prec$3 = match$4[2], pad$5 = match$4[1], - _aR_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; - var fmt_result = _aR_; + _aS_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; + var fmt_result = _aS_; break a; } b: @@ -19062,89 +19054,89 @@ switch(symb - 108 | 0){ case 0: /*<>*/ var - /*<>*/ _ax_ = + /*<>*/ _ay_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _ay_ = get_space(0), - /*<>*/ _az_ = get_hash(0), + /*<>*/ _az_ = get_space(0), + /*<>*/ _aA_ = get_hash(0), /*<>*/ iconv = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _az_, _ay_, _ax_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aA_, _az_, _ay_), fmt_rest = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored = [3, iconv, get_pad_opt(95)], - _aA_ = [0, [23, ignored, fmt_rest]]; + _aB_ = [0, [23, ignored, fmt_rest]]; else /*<>*/ var - /*<>*/ _aC_ = get_prec(0), + /*<>*/ _aD_ = get_prec(0), /*<>*/ match$0 = - make_padprec_fmt_ebb(get_int_pad(0), _aC_, fmt_rest), + make_padprec_fmt_ebb(get_int_pad(0), _aD_, fmt_rest), fmt_rest$0 = match$0[3], prec$0 = match$0[2], pad$0 = match$0[1], - _aA_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; - var _aB_ = _aA_; + _aB_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; + var _aC_ = _aB_; break; case 1: break b; default: /*<>*/ var - /*<>*/ _aD_ = + /*<>*/ _aE_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _aE_ = get_space(0), - /*<>*/ _aF_ = get_hash(0), + /*<>*/ _aF_ = get_space(0), + /*<>*/ _aG_ = get_hash(0), /*<>*/ iconv$0 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aF_, _aE_, _aD_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aG_, _aF_, _aE_), fmt_rest$1 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$0 = [4, iconv$0, get_pad_opt(95)], - _aG_ = [0, [23, ignored$0, fmt_rest$1]]; + _aH_ = [0, [23, ignored$0, fmt_rest$1]]; else /*<>*/ var - /*<>*/ _aH_ = get_prec(0), + /*<>*/ _aI_ = get_prec(0), /*<>*/ match$1 = - make_padprec_fmt_ebb(get_int_pad(0), _aH_, fmt_rest$1), + make_padprec_fmt_ebb(get_int_pad(0), _aI_, fmt_rest$1), fmt_rest$2 = match$1[3], prec$1 = match$1[2], pad$1 = match$1[1], - _aG_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; - var _aB_ = _aG_; + _aH_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; + var _aC_ = _aH_; } - var fmt_result = _aB_; + var fmt_result = _aC_; break a; } } else if(76 === symb){ /*<>*/ var - /*<>*/ _aI_ = + /*<>*/ _aJ_ = /*<>*/ caml_string_get(str, str_ind), - /*<>*/ _aJ_ = get_space(0), - /*<>*/ _aK_ = get_hash(0), + /*<>*/ _aK_ = get_space(0), + /*<>*/ _aL_ = get_hash(0), /*<>*/ iconv$1 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aK_, _aJ_, _aI_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aL_, _aK_, _aJ_), fmt_rest$3 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$1 = [5, iconv$1, get_pad_opt(95)], - _aL_ = [0, [23, ignored$1, fmt_rest$3]]; + _aM_ = [0, [23, ignored$1, fmt_rest$3]]; else /*<>*/ var - /*<>*/ _aM_ = get_prec(0), + /*<>*/ _aN_ = get_prec(0), /*<>*/ match$2 = - make_padprec_fmt_ebb(get_int_pad(0), _aM_, fmt_rest$3), + make_padprec_fmt_ebb(get_int_pad(0), _aN_, fmt_rest$3), fmt_rest$4 = match$2[3], prec$2 = match$2[2], pad$2 = match$2[1], - _aL_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; - var fmt_result = _aL_; + _aM_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; + var fmt_result = _aM_; break a; } var @@ -19153,46 +19145,46 @@ (failwith_message(_J_), str, str_ind - 1 | 0, symb); } if(1 - legacy_behavior$0){ - var _ao_ = 1 - plus_used[1], plus$0 = _ao_ ? plus : _ao_; + var _ap_ = 1 - plus_used[1], plus$0 = _ap_ ? plus : _ap_; if(plus$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$27); - var _ap_ = 1 - hash_used[1], hash$0 = _ap_ ? hash : _ap_; + var _aq_ = 1 - hash_used[1], hash$0 = _aq_ ? hash : _aq_; if(hash$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$28); - var _aq_ = 1 - space_used[1], space$0 = _aq_ ? space : _aq_; + var _ar_ = 1 - space_used[1], space$0 = _ar_ ? space : _ar_; if(space$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$29); var - _ar_ = 1 - pad_used[1], - _as_ = - _ar_ + _as_ = 1 - pad_used[1], + _at_ = + _as_ ? /*<>*/ caml_notequal ([0, pad], _K_) - : _ar_; - /*<>*/ if(_as_) + : _as_; + /*<>*/ if(_at_) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst_padding$0); var - _at_ = 1 - prec_used[1], - _au_ = - _at_ + _au_ = 1 - prec_used[1], + _av_ = + _au_ ? /*<>*/ caml_notequal ([0, prec], _L_) - : _at_; - /*<>*/ if(_au_){ - var _av_ = ign ? 95 : symb; + : _au_; + /*<>*/ if(_av_){ + var _aw_ = ign ? 95 : symb; /*<>*/ incompatible_flag - (pct_ind, str_ind, _av_, cst_precision$2); + (pct_ind, str_ind, _aw_, cst_precision$2); } var plus$1 = ign ? plus : ign; if(plus$1) /*<>*/ incompatible_flag (pct_ind, str_ind, 95, cst$30); } - var _aw_ = 1 - ign_used[1], ign$0 = _aw_ ? ign : _aw_; + var _ax_ = 1 - ign_used[1], ign$0 = _ax_ ? ign : _ax_; a: if(ign$0){ b: @@ -19309,10 +19301,10 @@ case 3: if(legacy_behavior$0){ /*<>*/ var - /*<>*/ _an_ = str_ind$0 + 1 | 0, + /*<>*/ _ao_ = str_ind$0 + 1 | 0, minus$0 = minus || (45 === symb$0 ? 1 : 0); /*<>*/ return parse_literal - (minus$0, _an_); + (minus$0, _ao_); } break; } @@ -19339,17 +19331,17 @@ /*<>*/ hash = [0, 0]; function set_flag(str_ind, flag){ /*<>*/ var - _ak_ = flag[1], - _al_ = _ak_ ? 1 - legacy_behavior$0 : _ak_; - if(_al_){ + _al_ = flag[1], + _am_ = _al_ ? 1 - legacy_behavior$0 : _al_; + if(_am_){ /*<>*/ /*<>*/ var - _am_ = + _an_ = /*<>*/ caml_string_get(str, str_ind); /*<>*/ /*<>*/ caml_call3 - (failwith_message(_C_), str, str_ind, _am_); + (failwith_message(_C_), str, str_ind, _an_); } flag[1] = 1; - return sentinal; + return _$_; /*<>*/ } var str_ind$0 = str_ind; /*<>*/ for(;;){ @@ -19519,13 +19511,13 @@ [0, sub_fmt, sub_str], /*<>*/ formatting$0 = is_open_tag ? [0, sub_format$0] : [1, sub_format$0], - /*<>*/ _ai_ = + /*<>*/ _aj_ = [0, [18, formatting$0, fmt_rest$0]]; - /*<>*/ return _ai_; + /*<>*/ return _aj_; } - catch(_aj_){ - var _ah_ = caml_wrap_exception(_aj_); - if(_ah_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ah_, 0); + catch(_ak_){ + var _ai_ = caml_wrap_exception(_ak_); + if(_ai_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ai_, 0); /*<>*/ var fmt_rest = parse(str_ind, end_ind)[1], /*<>*/ formatting = @@ -19565,9 +19557,9 @@ var new_acc = (acc$0 * 10 | 0) + (c - 48 | 0) | 0; if(Stdlib_Sys[12] < new_acc){ /*<>*/ /*<>*/ var - _ag_ = Stdlib_Sys[12]; + _ah_ = Stdlib_Sys[12]; /*<>*/ return /*<>*/ caml_call3 - (failwith_message(_S_), str, new_acc, _ag_); + (failwith_message(_S_), str, new_acc, _ah_); } var str_ind$1 = str_ind$0 + 1 | 0, @@ -19821,16 +19813,16 @@ fmt = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _ae_ = [0, type_format(fmt, fmtty), str]; - /*<>*/ return _ae_; + _af_ = [0, type_format(fmt, fmtty), str]; + /*<>*/ return _af_; } - catch(_af_){ - var _ac_ = caml_wrap_exception(_af_); - if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); + catch(_ag_){ + var _ad_ = caml_wrap_exception(_ag_); + if(_ad_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ad_, 0); /*<>*/ /*<>*/ var - _ad_ = string_of_fmtty(fmtty); + _ae_ = string_of_fmtty(fmtty); /*<>*/ return /*<>*/ caml_call2 - (failwith_message(_Z_), str, _ad_); + (failwith_message(_Z_), str, _ae_); } /*<>*/ } function format_of_string_format(str, param){ @@ -19840,15 +19832,15 @@ fmt$0 = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _aa_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; - /*<>*/ return _aa_; + _ab_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; + /*<>*/ return _ab_; } - catch(_ab_){ - var _$_ = caml_wrap_exception(_ab_); - if(_$_ === Type_mismatch) + catch(_ac_){ + var _aa_ = caml_wrap_exception(_ac_); + if(_aa_ === Type_mismatch) /*<>*/ return /*<>*/ caml_call2 (failwith_message(___), str, str$0); - throw caml_maybe_attach_backtrace(_$_, 0); + throw caml_maybe_attach_backtrace(_aa_, 0); } } var @@ -20056,7 +20048,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5]); } /*<>*/ var - sentinal = undefined, + _y_ = undefined, global_data = runtime.caml_get_global_data(), cst$6 = "\n", cst$3 = cst$7, @@ -20147,18 +20139,18 @@ /*<>*/ var t = l[2], h = l[1], - /*<>*/ _aD_ = + /*<>*/ _aE_ = /*<>*/ caml_call2(Stdlib[28], prefix, h); - function _aE_(x, y){ + function _aF_(x, y){ /*<>*/ /*<>*/ var - _aG_ = /*<>*/ caml_call2(Stdlib[28], sep, y); + _aH_ = /*<>*/ caml_call2(Stdlib[28], sep, y); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], x, _aG_); + (Stdlib[28], x, _aH_); /*<>*/ } /*<>*/ /*<>*/ var - _aF_ = /*<>*/ caml_call3(Stdlib_List[25], _aE_, _aD_, t); + _aG_ = /*<>*/ caml_call3(Stdlib_List[25], _aF_, _aE_, t); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _aF_, suffix); + (Stdlib[28], _aG_, suffix); /*<>*/ } function help_action(param){ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -20167,11 +20159,11 @@ function add_help(speclist){ /*<>*/ try{ /*<>*/ assoc3(cst_help$2, speclist); - /*<>*/ var /*<>*/ _aA_ = 0, add1 = _aA_; + /*<>*/ var /*<>*/ _aB_ = 0, add1 = _aB_; } - catch(_aC_){ - var _aw_ = caml_wrap_exception(_aC_); - if(_aw_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_aw_, 0); + catch(_aD_){ + var _ax_ = caml_wrap_exception(_aD_); + if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); var add1 = [0, @@ -20180,11 +20172,11 @@ } try{ /*<>*/ assoc3(cst_help$1, speclist); - /*<>*/ var /*<>*/ _az_ = 0, add2 = _az_; + /*<>*/ var /*<>*/ _aA_ = 0, add2 = _aA_; } - catch(_aB_){ - var _ax_ = caml_wrap_exception(_aB_); - if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); + catch(_aC_){ + var _ay_ = caml_wrap_exception(_aC_); + if(_ay_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ay_, 0); var add2 = [0, @@ -20192,34 +20184,34 @@ 0]; } /*<>*/ /*<>*/ var - _ay_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); + _az_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[37], speclist, _ay_); + (Stdlib[37], speclist, _az_); /*<>*/ } function usage_b(buf, speclist, errmsg){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Printf[5], buf, _d_, errmsg); /*<>*/ /*<>*/ var - _as_ = add_help(speclist); - /*<>*/ function _at_(param){ + _at_ = add_help(speclist); + /*<>*/ function _au_(param){ var doc = param[3], spec = param[2], key = param[1], - _au_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; - if(! _au_) return _au_; + _av_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; + if(! _av_) return _av_; if(11 !== spec[0]) /*<>*/ return /*<>*/ caml_call4 (Stdlib_Printf[5], buf, _a_, key, doc); /*<>*/ var l = spec[1], - /*<>*/ _av_ = make_symlist(cst$1, cst$0, cst, l); + /*<>*/ _aw_ = make_symlist(cst$1, cst$0, cst, l); /*<>*/ return /*<>*/ caml_call5 - (Stdlib_Printf[5], buf, _b_, key, _av_, doc); + (Stdlib_Printf[5], buf, _b_, key, _aw_, doc); } /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _at_, _as_); - /*<>*/ return sentinal; + (Stdlib_List[17], _au_, _at_); + /*<>*/ return _y_; /*<>*/ } function usage_string(speclist, errmsg){ /*<>*/ /*<>*/ var @@ -20230,33 +20222,33 @@ /*<>*/ } function usage(speclist, errmsg){ /*<>*/ /*<>*/ var - _ar_ = usage_string(speclist, errmsg); + _as_ = usage_string(speclist, errmsg); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Printf[3], _e_, _ar_); + (Stdlib_Printf[3], _e_, _as_); /*<>*/ } /*<>*/ /*<>*/ var current = [0, 0]; function int_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _ap_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; - /*<>*/ return _ap_; + _aq_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; + /*<>*/ return _aq_; } - catch(_aq_){ - var _ao_ = caml_wrap_exception(_aq_); - if(_ao_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_ao_, 0); + catch(_ar_){ + var _ap_ = caml_wrap_exception(_ar_); + if(_ap_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_ap_, 0); } /*<>*/ } function float_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _am_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; - /*<>*/ return _am_; + _an_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; + /*<>*/ return _an_; } - catch(_an_){ - var _al_ = caml_wrap_exception(_an_); - if(_al_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_al_, 0); + catch(_ao_){ + var _am_ = caml_wrap_exception(_ao_); + if(_am_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_am_, 0); } /*<>*/ } function parse_and_expand_argv_dynamic_ @@ -20311,8 +20303,8 @@ if(current[1] >= argv[1].length - 1) return 0; /*<>*/ try{ /*<>*/ var - _Y_ = current[1], - /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_]; + _Z_ = current[1], + /*<>*/ s = caml_check_bound(argv[1], _Z_)[1 + _Z_]; a: { /*<>*/ if @@ -20321,13 +20313,13 @@ try{ /*<>*/ var follow$1 = 0, - /*<>*/ _aa_ = assoc3(s, speclist[1]), + /*<>*/ _ab_ = assoc3(s, speclist[1]), follow$0 = follow$1, - action = _aa_; + action = _ab_; } - catch(_aj_){ - var _Z_ = caml_wrap_exception(_aj_); - if(_Z_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Z_, 0); + catch(_ak_){ + var ___ = caml_wrap_exception(_ak_); + if(___ !== Stdlib[8]) throw caml_maybe_attach_backtrace(___, 0); /*<>*/ try{ /*<>*/ var /*<>*/ i = @@ -20340,16 +20332,16 @@ /*<>*/ keyword = /*<>*/ caml_call3(Stdlib_String[15], s, 0, i), /*<>*/ follow = [0, arg], - /*<>*/ _$_ = assoc3(keyword, speclist[1]), + /*<>*/ _aa_ = assoc3(keyword, speclist[1]), follow$0 = follow, - action = _$_; + action = _aa_; } - catch(_ak_){ - var ___ = caml_wrap_exception(_ak_); - if(___ === Stdlib[8]) + catch(_al_){ + var _$_ = caml_wrap_exception(_al_); + if(_$_ === Stdlib[8]) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [0, s]], 1); - throw caml_maybe_attach_backtrace(___, 0); + throw caml_maybe_attach_backtrace(_$_, 0); } } var @@ -20357,7 +20349,7 @@ function(s, follow){ function no_arg(param){ /*<>*/ if(! follow) - /*<>*/ return sentinal; + /*<>*/ return _y_; var arg = follow[1]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [1, s, arg, cst_no_argument]], 1); @@ -20375,9 +20367,9 @@ if((current[1] + 1 | 0) >= argv[1].length - 1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [2, s]], 1); - var _ai_ = current[1] + 1 | 0; - /*<>*/ return caml_check_bound(argv[1], _ai_) - [1 + _ai_]; + var _aj_ = current[1] + 1 | 0; + /*<>*/ return caml_check_bound(argv[1], _aj_) + [1 + _aj_]; /*<>*/ } return get_arg; }, @@ -20405,14 +20397,14 @@ /*<>*/ arg = get_arg(0); /*<>*/ try{ /*<>*/ var - /*<>*/ _ac_ = + /*<>*/ _ad_ = [0, /*<>*/ caml_call1(Stdlib[32], arg)], - match = _ac_; + match = _ad_; } - catch(_ah_){ - var _ab_ = caml_wrap_exception(_ah_); - if(_ab_[1] !== Stdlib[6]) - throw caml_maybe_attach_backtrace(_ab_, 0); + catch(_ai_){ + var _ac_ = caml_wrap_exception(_ai_); + if(_ac_[1] !== Stdlib[6]) + throw caml_maybe_attach_backtrace(_ac_, 0); var match = 0; } if(! match) @@ -20507,7 +20499,7 @@ /*<>*/ return consume_arg(0); } /*<>*/ /*<>*/ var - _ad_ = make_symlist(cst$5, cst$4, cst$3, symb); + _ae_ = make_symlist(cst$5, cst$4, cst$3, symb); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, @@ -20515,16 +20507,16 @@ s, arg$5, /*<>*/ caml_call2 - (Stdlib[28], cst_one_of, _ad_)]], + (Stdlib[28], cst_one_of, _ae_)]], 1); case 12: var f$5 = param[1]; /*<>*/ no_arg(0); /*<>*/ for(;;){ if(current[1] >= (argv[1].length - 1 - 1 | 0)) return 0; - var _ae_ = current[1] + 1 | 0; + var _af_ = current[1] + 1 | 0; /*<>*/ /*<>*/ caml_call1 - (f$5, caml_check_bound(argv[1], _ae_)[1 + _ae_]); + (f$5, caml_check_bound(argv[1], _af_)[1 + _af_]); /*<>*/ consume_arg(0); } break; @@ -20538,8 +20530,8 @@ /*<>*/ return /*<>*/ caml_call1 (f$6, /*<>*/ caml_call1(Stdlib_List[9], acc[1])); - var _ag_ = current[1] + 1 | 0, _af_ = acc[1]; - acc[1] = [0, caml_check_bound(argv[1], _ag_)[1 + _ag_], _af_]; + var _ah_ = current[1] + 1 | 0, _ag_ = acc[1]; + acc[1] = [0, caml_check_bound(argv[1], _ah_)[1 + _ah_], _ag_]; /*<>*/ consume_arg(0); } break; @@ -20617,8 +20609,8 @@ function parse(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _X_ = parse_argv(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _X_; + _Y_ = parse_argv(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _Y_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20640,8 +20632,8 @@ function parse_dynamic(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _W_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _W_; + _X_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _X_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20666,9 +20658,9 @@ /*<>*/ argv = [0, caml_sys_argv(0)], /*<>*/ spec = [0, l], /*<>*/ current$0 = [0, current[1]], - /*<>*/ _V_ = + /*<>*/ _W_ = parse_and_expand_argv_dynamic(current$0, argv, spec, f, msg); - /*<>*/ return _V_; + /*<>*/ return _W_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20705,17 +20697,17 @@ /*<>*/ /*<>*/ var n$0 = /*<>*/ caml_call2(Stdlib_String[35], s, 9); } - catch(_T_){ - var _R_ = caml_wrap_exception(_T_); - if(_R_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_R_, 0); + catch(_U_){ + var _S_ = caml_wrap_exception(_U_); + if(_S_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_S_, 0); /*<>*/ try{ /*<>*/ /*<>*/ var n = /*<>*/ caml_call2(Stdlib_String[35], s, 32); } - catch(_U_){ - var _S_ = caml_wrap_exception(_U_); - if(_S_ === Stdlib[8]) /*<>*/ return len; - throw caml_maybe_attach_backtrace(_S_, 0); + catch(_V_){ + var _T_ = caml_wrap_exception(_V_); + if(_T_ === Stdlib[8]) /*<>*/ return len; + throw caml_maybe_attach_backtrace(_T_, 0); } /*<>*/ return loop(n + 1 | 0); } @@ -20725,12 +20717,12 @@ var doc = param[3], spec = param[2], kwd = param[1]; /*<>*/ if(11 === spec[0]) return caml_call2(Stdlib_Int[11], cur, caml_ml_string_length(kwd)); - var _Q_ = caml_ml_string_length(kwd) + second_word(doc) | 0; - return caml_call2(Stdlib_Int[11], cur, _Q_); + var _R_ = caml_ml_string_length(kwd) + second_word(doc) | 0; + return caml_call2(Stdlib_Int[11], cur, _R_); } function replace_leading_tab(s){ /*<>*/ /*<>*/ var seen = [0, 0]; - function _P_(c){ + function _Q_(c){ /*<>*/ if(9 === c && ! seen[1]){ seen[1] = 1; /*<>*/ return 32; @@ -20738,7 +20730,7 @@ /*<>*/ return c; /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[17], _P_, s); + (Stdlib_String[17], _Q_, s); /*<>*/ } function align(opt, speclist){ /*<>*/ if(opt) @@ -20752,7 +20744,7 @@ (Stdlib_List[25], max_arg_len, 0, completed), /*<>*/ len$0 = /*<>*/ caml_call2(Stdlib_Int[10], len, limit); - /*<>*/ function _J_(ksd){ + /*<>*/ function _K_(ksd){ var kwd = ksd[1], spec = ksd[2]; if(! caml_string_notequal(ksd[3], cst$7)) /*<>*/ return ksd; @@ -20760,20 +20752,20 @@ /*<>*/ var msg$0 = ksd[3], /*<>*/ cutcol$0 = second_word(msg$0), - /*<>*/ _M_ = + /*<>*/ _N_ = /*<>*/ caml_call2 (Stdlib_Int[11], 0, len$0 - cutcol$0 | 0) + 3 | 0, /*<>*/ spaces$0 = - /*<>*/ caml_call2(Stdlib_String[1], _M_, 32), - /*<>*/ _N_ = replace_leading_tab(msg$0), - /*<>*/ _O_ = - /*<>*/ caml_call2(Stdlib[28], spaces$0, _N_); + /*<>*/ caml_call2(Stdlib_String[1], _N_, 32), + /*<>*/ _O_ = replace_leading_tab(msg$0), + /*<>*/ _P_ = + /*<>*/ caml_call2(Stdlib[28], spaces$0, _O_); /*<>*/ return [0, kwd, spec, - /*<>*/ caml_call2(Stdlib[28], cst$6, _O_)]; + /*<>*/ caml_call2(Stdlib[28], cst$6, _P_)]; } /*<>*/ var msg = ksd[3], @@ -20787,24 +20779,24 @@ /*<>*/ var /*<>*/ spaces = /*<>*/ caml_call2(Stdlib_String[1], diff, 32), - /*<>*/ _K_ = replace_leading_tab(msg), + /*<>*/ _L_ = replace_leading_tab(msg), /*<>*/ prefix = - /*<>*/ caml_call3(Stdlib_String[15], _K_, 0, cutcol), + /*<>*/ caml_call3(Stdlib_String[15], _L_, 0, cutcol), /*<>*/ suffix = /*<>*/ caml_call3 (Stdlib_String[15], msg, cutcol, caml_ml_string_length(msg) - cutcol | 0), - /*<>*/ _L_ = + /*<>*/ _M_ = /*<>*/ caml_call2(Stdlib[28], spaces, suffix); /*<>*/ return [0, kwd, spec$0, - /*<>*/ caml_call2(Stdlib[28], prefix, _L_)]; + /*<>*/ caml_call2(Stdlib[28], prefix, _M_)]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[19], _J_, completed); + (Stdlib_List[19], _K_, completed); /*<>*/ } function read_aux(trim, sep, file){ /*<>*/ var @@ -20824,21 +20816,21 @@ (0 < len && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ var - _I_ = + _J_ = /*<>*/ caml_call3 (Stdlib_String[15], word, 0, len - 1 | 0); break a; } - var _I_ = word; + var _J_ = word; } - var word$0 = _I_; + var word$0 = _J_; } else var word$0 = word; words[1] = [0, word$0, words[1]]; /*<>*/ /*<>*/ caml_call1 (Stdlib_Buffer[8], buf); - /*<>*/ return sentinal; + /*<>*/ return _y_; /*<>*/ } /*<>*/ try{ for(;;){ @@ -20851,45 +20843,45 @@ (Stdlib_Buffer[12], buf, c); } } - catch(_H_){ - var _F_ = caml_wrap_exception(_H_); - if(_F_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_F_, 0); + catch(_I_){ + var _G_ = caml_wrap_exception(_I_); + if(_G_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_G_, 0); if(0 < /*<>*/ caml_call1(Stdlib_Buffer[7], buf)) /*<>*/ stash(0); /*<>*/ /*<>*/ caml_call1(Stdlib[93], ic); /*<>*/ /*<>*/ var - _G_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); + _H_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Array[10], _G_); + (Stdlib_Array[10], _H_); } /*<>*/ } var _r_ = 10, _s_ = 1; - /*<>*/ function read_arg(_E_){ - /*<>*/ return read_aux(_s_, _r_, _E_); + /*<>*/ function read_arg(_F_){ + /*<>*/ return read_aux(_s_, _r_, _F_); } /*<>*/ var /*<>*/ _t_ = 0, _u_ = 0; - /*<>*/ function read_arg0(_D_){ - /*<>*/ return read_aux(_u_, _t_, _D_); + /*<>*/ function read_arg0(_E_){ + /*<>*/ return read_aux(_u_, _t_, _E_); } function write_aux(sep, file, args){ /*<>*/ /*<>*/ var oc = /*<>*/ caml_call1(Stdlib[61], file); - function _C_(s){ + function _D_(s){ /*<>*/ return caml_call4 (Stdlib_Printf[1], oc, _v_, s, sep); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _C_, args); + (Stdlib_Array[11], _D_, args); /*<>*/ return /*<>*/ caml_call1 (Stdlib[76], oc); /*<>*/ } var _w_ = 10; - /*<>*/ function write_arg(_A_, _B_){ - /*<>*/ return write_aux(_w_, _A_, _B_); + /*<>*/ function write_arg(_B_, _C_){ + /*<>*/ return write_aux(_w_, _B_, _C_); } /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ function write_arg0(_y_, _z_){ - /*<>*/ return write_aux(_x_, _y_, _z_); + /*<>*/ function write_arg0(_z_, _A_){ + /*<>*/ return write_aux(_x_, _z_, _A_); } var Stdlib_Arg = @@ -21552,10 +21544,10 @@ : runtime.caml_call_gen(f, [a0, a1]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Printexc = global_data.Stdlib__Printexc, Stdlib = global_data.Stdlib, + _b_ = undefined, cst_Fun_Finally_raised = "Fun.Finally_raised: ", cst_Stdlib_Fun_Finally_raised = "Stdlib.Fun.Finally_raised"; function const$0(c, param){ @@ -21575,11 +21567,11 @@ /*<>*/ return 0; /*<>*/ var exn = param[2], - /*<>*/ _b_ = + /*<>*/ _c_ = /*<>*/ caml_call1(Stdlib_Printexc[1], exn); /*<>*/ return [0, /*<>*/ caml_call2 - (Stdlib[28], cst_Fun_Finally_raised, _b_)]; + (Stdlib[28], cst_Fun_Finally_raised, _c_)]; /*<>*/ } /*<>*/ /*<>*/ caml_call1 (Stdlib_Printexc[9], _a_); @@ -21587,7 +21579,7 @@ function finally_no_exn(param){ /*<>*/ try{ /*<>*/ /*<>*/ caml_call1(finally$0, 0); - /*<>*/ return sentinal; + /*<>*/ return _b_; } catch(e$0){ /*<>*/ var @@ -22045,7 +22037,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - sentinal = undefined, + _a_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Array = global_data.Stdlib__Array, @@ -22107,46 +22099,46 @@ /*<>*/ if(col === idx.length - 1){ /*<>*/ /*<>*/ caml_ba_set_generic (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ return sentinal; + /*<>*/ return _a_; } /*<>*/ var - /*<>*/ _am_ = + /*<>*/ _an_ = caml_check_bound(max, col)[1 + col] - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var j = _al_; + /*<>*/ _am_ = 0; + if(_an_ >= 0){ + var j = _am_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); /*<>*/ /*<>*/ var - _an_ = j + 1 | 0; - if(_am_ === j) break; - var j = _an_; + _ao_ = j + 1 | 0; + if(_an_ === j) break; + var j = _ao_; } } - return sentinal; + return _a_; /*<>*/ } function floop(arr, idx, f, col, max){ /*<>*/ if(0 > col){ /*<>*/ /*<>*/ caml_ba_set_generic (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ return sentinal; + /*<>*/ return _a_; } /*<>*/ var - /*<>*/ _aj_ = caml_check_bound(max, col)[1 + col], - /*<>*/ _ai_ = 1; - if(_aj_ >= 1){ - var j = _ai_; + /*<>*/ _ak_ = caml_check_bound(max, col)[1 + col], + /*<>*/ _aj_ = 1; + if(_ak_ >= 1){ + var j = _aj_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ floop(arr, idx, f, col - 1 | 0, max); /*<>*/ /*<>*/ var - _ak_ = j + 1 | 0; - if(_aj_ === j) break; - var j = _ak_; + _al_ = j + 1 | 0; + if(_ak_ === j) break; + var j = _al_; } } - return sentinal; + return _a_; /*<>*/ } function init(kind, layout, dims, f){ /*<>*/ var @@ -22175,31 +22167,31 @@ /*<>*/ caml_ba_num_dims(a), /*<>*/ d = /*<>*/ caml_make_vect(n, 0), - /*<>*/ _af_ = n - 1 | 0, - /*<>*/ _ae_ = 0; - if(_af_ >= 0){ - var i = _ae_; + /*<>*/ _ag_ = n - 1 | 0, + /*<>*/ _af_ = 0; + if(_ag_ >= 0){ + var i = _af_; for(;;){ /*<>*/ /*<>*/ var - _ag_ = /*<>*/ runtime.caml_ba_dim(a, i); - /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; + _ah_ = /*<>*/ runtime.caml_ba_dim(a, i); + /*<>*/ caml_check_bound(d, i)[1 + i] = _ah_; /*<>*/ /*<>*/ var - _ah_ = i + 1 | 0; - if(_af_ === i) break; - var i = _ah_; + _ai_ = i + 1 | 0; + if(_ag_ === i) break; + var i = _ai_; } } /*<>*/ return d; /*<>*/ } function size_in_bytes(arr){ /*<>*/ var - /*<>*/ _ac_ = dims(arr), - /*<>*/ _ad_ = + /*<>*/ _ad_ = dims(arr), + /*<>*/ _ae_ = /*<>*/ caml_call3 - (Stdlib_Array[15], caml_mul, 1, _ac_); + (Stdlib_Array[15], caml_mul, 1, _ad_); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _ad_); + _ae_); /*<>*/ } function create(kind, layout){ /*<>*/ return /*<>*/ caml_ba_create @@ -22210,9 +22202,9 @@ (arr, [0]); /*<>*/ } function set(arr){ - /*<>*/ /*<>*/ var _aa_ = [0]; - /*<>*/ return function(_ab_){ - /*<>*/ return caml_ba_set_generic(arr, _aa_, _ab_);}; + /*<>*/ /*<>*/ var _ab_ = [0]; + /*<>*/ return function(_ac_){ + /*<>*/ return caml_ba_set_generic(arr, _ab_, _ac_);}; /*<>*/ } function size_in_bytes$0(arr){ /*<>*/ return kind_size_in_bytes @@ -22230,10 +22222,10 @@ /*<>*/ } function size_in_bytes$1(arr){ /*<>*/ /*<>*/ var - _$_ = /*<>*/ caml_ba_dim_1(arr); + _aa_ = /*<>*/ caml_ba_dim_1(arr); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _$_); + _aa_); /*<>*/ } function slice(a, n){ /*<>*/ return /*<>*/ runtime.caml_ba_layout @@ -22245,32 +22237,32 @@ /*<>*/ /*<>*/ var arr = create$0(kind, layout, dim); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _Z_ = 1; + /*<>*/ /*<>*/ var ___ = 1; if(dim >= 1){ - var i$0 = _Z_; + var i$0 = ___; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i$0, /*<>*/ caml_call1(f, i$0)); /*<>*/ /*<>*/ var - ___ = i$0 + 1 | 0; + _$_ = i$0 + 1 | 0; if(dim === i$0) break; - var i$0 = ___; + var i$0 = _$_; } } /*<>*/ return arr; } /*<>*/ var - _X_ = dim - 1 | 0, - /*<>*/ _W_ = 0; - if(_X_ >= 0){ - var i = _W_; + _Y_ = dim - 1 | 0, + /*<>*/ _X_ = 0; + if(_Y_ >= 0){ + var i = _X_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var - _Y_ = i + 1 | 0; - if(_X_ === i) break; - var i = _Y_; + _Z_ = i + 1 | 0; + if(_Y_ === i) break; + var i = _Z_; } } /*<>*/ return arr; @@ -22279,17 +22271,17 @@ /*<>*/ var /*<>*/ ba = create$0(kind, layout, data.length - 1), /*<>*/ ofs = layout ? 1 : 0, - _U_ = data.length - 1 - 1 | 0, - _T_ = 0; - if(_U_ >= 0){ - var i = _T_; + _V_ = data.length - 1 - 1 | 0, + _U_ = 0; + if(_V_ >= 0){ + var i = _U_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); /*<>*/ /*<>*/ var - _V_ = i + 1 | 0; - if(_U_ === i) break; - var i = _V_; + _W_ = i + 1 | 0; + if(_V_ === i) break; + var i = _W_; } } /*<>*/ return ba; @@ -22300,16 +22292,16 @@ /*<>*/ } function size_in_bytes$2(arr){ /*<>*/ var - /*<>*/ _R_ = + /*<>*/ _S_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _S_ = + /*<>*/ _T_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _S_), - _R_); + _T_), + _S_); /*<>*/ } function slice_left(a, n){ /*<>*/ return /*<>*/ caml_ba_slice @@ -22323,54 +22315,54 @@ /*<>*/ /*<>*/ var arr = create$1(kind, layout, dim1, dim2); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _N_ = 1; + /*<>*/ /*<>*/ var _O_ = 1; if(dim2 >= 1){ - var j$0 = _N_; + var j$0 = _O_; for(;;){ - /*<>*/ /*<>*/ var _O_ = 1; + /*<>*/ /*<>*/ var _P_ = 1; if(dim1 >= 1){ - var i$0 = _O_; + var i$0 = _P_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); /*<>*/ /*<>*/ var - _Q_ = i$0 + 1 | 0; + _R_ = i$0 + 1 | 0; if(dim1 === i$0) break; - var i$0 = _Q_; + var i$0 = _R_; } } /*<>*/ /*<>*/ var - _P_ = j$0 + 1 | 0; + _Q_ = j$0 + 1 | 0; if(dim2 === j$0) break; - var j$0 = _P_; + var j$0 = _Q_; } } /*<>*/ return arr; } /*<>*/ var - _I_ = dim1 - 1 | 0, - /*<>*/ _H_ = 0; - if(_I_ >= 0){ - var i = _H_; + _J_ = dim1 - 1 | 0, + /*<>*/ _I_ = 0; + if(_J_ >= 0){ + var i = _I_; for(;;){ /*<>*/ var - _K_ = dim2 - 1 | 0, - /*<>*/ _J_ = 0; - if(_K_ >= 0){ - var j = _J_; + _L_ = dim2 - 1 | 0, + /*<>*/ _K_ = 0; + if(_L_ >= 0){ + var j = _K_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i, j, /*<>*/ caml_call2(f, i, j)); /*<>*/ /*<>*/ var - _M_ = j + 1 | 0; - if(_K_ === j) break; - var j = _M_; + _N_ = j + 1 | 0; + if(_L_ === j) break; + var j = _N_; } } /*<>*/ /*<>*/ var - _L_ = i + 1 | 0; - if(_I_ === i) break; - var i = _L_; + _M_ = i + 1 | 0; + if(_J_ === i) break; + var i = _M_; } } /*<>*/ return arr; @@ -22382,10 +22374,10 @@ 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, /*<>*/ ba = create$1(kind, layout, dim1, dim2), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _C_ = dim1 - 1 | 0, - _B_ = 0; - if(_C_ >= 0){ - var i = _B_; + /*<>*/ _D_ = dim1 - 1 | 0, + _C_ = 0; + if(_D_ >= 0){ + var i = _C_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -22393,23 +22385,23 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array2_of_array_n); /*<>*/ var - /*<>*/ _E_ = dim2 - 1 | 0, - /*<>*/ _D_ = 0; - if(_E_ >= 0){ - var j = _D_; + /*<>*/ _F_ = dim2 - 1 | 0, + /*<>*/ _E_ = 0; + if(_F_ >= 0){ + var j = _E_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (ba, i + ofs | 0, j + ofs | 0, caml_check_bound(row, j)[1 + j]); /*<>*/ /*<>*/ var - _G_ = j + 1 | 0; - if(_E_ === j) break; - var j = _G_; + _H_ = j + 1 | 0; + if(_F_ === j) break; + var j = _H_; } } /*<>*/ /*<>*/ var - _F_ = i + 1 | 0; - if(_C_ === i) break; - var i = _F_; + _G_ = i + 1 | 0; + if(_D_ === i) break; + var i = _G_; } } /*<>*/ return ba; @@ -22420,20 +22412,20 @@ /*<>*/ } function size_in_bytes$3(arr){ /*<>*/ var - /*<>*/ _y_ = + /*<>*/ _z_ = /*<>*/ runtime.caml_ba_dim_3(arr), - /*<>*/ _z_ = + /*<>*/ _A_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _A_ = + /*<>*/ _B_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul (caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _A_), - _z_), - _y_); + _B_), + _A_), + _z_); /*<>*/ } function slice_left_1(a, n, m){ /*<>*/ return /*<>*/ caml_ba_slice @@ -22455,17 +22447,17 @@ /*<>*/ /*<>*/ var arr = create$2(kind, layout, dim1, dim2, dim3); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _s_ = 1; + /*<>*/ /*<>*/ var _t_ = 1; if(dim3 >= 1){ - var k$0 = _s_; + var k$0 = _t_; for(;;){ - /*<>*/ /*<>*/ var _t_ = 1; + /*<>*/ /*<>*/ var _u_ = 1; if(dim2 >= 1){ - var j$0 = _t_; + var j$0 = _u_; for(;;){ - /*<>*/ /*<>*/ var _v_ = 1; + /*<>*/ /*<>*/ var _w_ = 1; if(dim1 >= 1){ - var i$0 = _v_; + var i$0 = _w_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, @@ -22474,61 +22466,61 @@ k$0, /*<>*/ caml_call3(f, i$0, j$0, k$0)); /*<>*/ /*<>*/ var - _x_ = i$0 + 1 | 0; + _y_ = i$0 + 1 | 0; if(dim1 === i$0) break; - var i$0 = _x_; + var i$0 = _y_; } } /*<>*/ /*<>*/ var - _w_ = j$0 + 1 | 0; + _x_ = j$0 + 1 | 0; if(dim2 === j$0) break; - var j$0 = _w_; + var j$0 = _x_; } } /*<>*/ /*<>*/ var - _u_ = k$0 + 1 | 0; + _v_ = k$0 + 1 | 0; if(dim3 === k$0) break; - var k$0 = _u_; + var k$0 = _v_; } } /*<>*/ return arr; } /*<>*/ var - _k_ = dim1 - 1 | 0, - /*<>*/ _j_ = 0; - if(_k_ >= 0){ - var i = _j_; + _l_ = dim1 - 1 | 0, + /*<>*/ _k_ = 0; + if(_l_ >= 0){ + var i = _k_; for(;;){ /*<>*/ var - _m_ = dim2 - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var j = _l_; + _n_ = dim2 - 1 | 0, + /*<>*/ _m_ = 0; + if(_n_ >= 0){ + var j = _m_; for(;;){ /*<>*/ var - _p_ = dim3 - 1 | 0, - /*<>*/ _o_ = 0; - if(_p_ >= 0){ - var k = _o_; + _q_ = dim3 - 1 | 0, + /*<>*/ _p_ = 0; + if(_q_ >= 0){ + var k = _p_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); /*<>*/ /*<>*/ var - _r_ = k + 1 | 0; - if(_p_ === k) break; - var k = _r_; + _s_ = k + 1 | 0; + if(_q_ === k) break; + var k = _s_; } } /*<>*/ /*<>*/ var - _q_ = j + 1 | 0; - if(_m_ === j) break; - var j = _q_; + _r_ = j + 1 | 0; + if(_n_ === j) break; + var j = _r_; } } /*<>*/ /*<>*/ var - _n_ = i + 1 | 0; - if(_k_ === i) break; - var i = _n_; + _o_ = i + 1 | 0; + if(_l_ === i) break; + var i = _o_; } } /*<>*/ return arr; @@ -22544,10 +22536,10 @@ : caml_check_bound(caml_check_bound(data, 0)[1], 0)[1].length - 1, /*<>*/ ba = create$2(kind, layout, dim1, dim2, dim3), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _b_ = dim1 - 1 | 0, - _a_ = 0; - if(_b_ >= 0){ - var i = _a_; + /*<>*/ _c_ = dim1 - 1 | 0, + _b_ = 0; + if(_c_ >= 0){ + var i = _b_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -22555,10 +22547,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n); /*<>*/ var - /*<>*/ _d_ = dim2 - 1 | 0, - /*<>*/ _c_ = 0; - if(_d_ >= 0){ - var j = _c_; + /*<>*/ _e_ = dim2 - 1 | 0, + /*<>*/ _d_ = 0; + if(_e_ >= 0){ + var j = _d_; for(;;){ /*<>*/ /*<>*/ var col = caml_check_bound(row, j)[1 + j]; @@ -22566,10 +22558,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n$0); /*<>*/ var - /*<>*/ _g_ = dim3 - 1 | 0, - /*<>*/ _f_ = 0; - if(_g_ >= 0){ - var k = _f_; + /*<>*/ _h_ = dim3 - 1 | 0, + /*<>*/ _g_ = 0; + if(_h_ >= 0){ + var k = _g_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (ba, @@ -22578,21 +22570,21 @@ k + ofs | 0, caml_check_bound(col, k)[1 + k]); /*<>*/ /*<>*/ var - _i_ = k + 1 | 0; - if(_g_ === k) break; - var k = _i_; + _j_ = k + 1 | 0; + if(_h_ === k) break; + var k = _j_; } } /*<>*/ /*<>*/ var - _h_ = j + 1 | 0; - if(_d_ === j) break; - var j = _h_; + _i_ = j + 1 | 0; + if(_e_ === j) break; + var j = _i_; } } /*<>*/ /*<>*/ var - _e_ = i + 1 | 0; - if(_b_ === i) break; - var i = _e_; + _f_ = i + 1 | 0; + if(_c_ === i) break; + var i = _f_; } } /*<>*/ return ba; @@ -24171,13 +24163,13 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Sys = global_data.Stdlib__Sys, Stdlib_Int = global_data.Stdlib__Int, Stdlib_Array = global_data.Stdlib__Array, Stdlib_Obj = global_data.Stdlib__Obj, + _a_ = undefined, cst_Weak_Make_hash_bucket_cann = "Weak.Make: hash bucket cannot grow more", cst_Weak_fill = "Weak.fill", cst_Weak_blit = "Weak.blit", @@ -24188,9 +24180,9 @@ cst_Weak_create = "Weak.create"; function create(l){ /*<>*/ var - _W_ = 0 <= l ? 1 : 0, - _X_ = _W_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _W_; - if(1 - _X_) + _X_ = 0 <= l ? 1 : 0, + _Y_ = _X_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _X_; + if(1 - _Y_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Weak_create); /*<>*/ return /*<>*/ runtime.caml_weak_create @@ -24201,12 +24193,10 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _T_ = 0 <= o ? 1 : 0, - _U_ = _T_ ? o < length(e) ? 1 : 0 : _T_, - _V_ = 1 - _U_; - return _V_ - ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) - : _V_; + _U_ = 0 <= o ? 1 : 0, + _V_ = _U_ ? o < length(e) ? 1 : 0 : _U_, + _W_ = 1 - _V_; + return _W_ ? ( /*<>*/ caml_call1(Stdlib[1], msg), _a_) : _W_; /*<>*/ } function set(e, o, x){ /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); @@ -24239,13 +24229,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _R_ = 0 !== l ? 1 : 0, - _S_ = - _R_ + _S_ = 0 !== l ? 1 : 0, + _T_ = + _S_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _R_; - /*<>*/ return _S_; + : _S_; + /*<>*/ return _T_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Weak_blit); @@ -24253,14 +24243,14 @@ function fill(ar, ofs, len, x){ /*<>*/ if (0 <= ofs && 0 <= len && (length(ar) - len | 0) >= ofs){ - var _P_ = (ofs + len | 0) - 1 | 0; - if(_P_ >= ofs){ + var _Q_ = (ofs + len | 0) - 1 | 0; + if(_Q_ >= ofs){ var i = ofs; for(;;){ /*<>*/ set(ar, i, x); - /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(_P_ === i) break; - var i = _Q_; + /*<>*/ /*<>*/ var _R_ = i + 1 | 0; + if(_Q_ === i) break; + var i = _R_; } } return 0; @@ -24288,16 +24278,16 @@ /*<>*/ } function clear(t){ /*<>*/ var - _N_ = t[1].length - 1 - 1 | 0, - /*<>*/ _M_ = 0; - if(_N_ >= 0){ - var i = _M_; + _O_ = t[1].length - 1 - 1 | 0, + /*<>*/ _N_ = 0; + if(_O_ >= 0){ + var i = _N_; for(;;){ /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; - /*<>*/ /*<>*/ var _O_ = i + 1 | 0; - if(_N_ === i) break; - var i = _O_; + /*<>*/ /*<>*/ var _P_ = i + 1 | 0; + if(_O_ === i) break; + var i = _P_; } } t[3] = limit; @@ -24305,8 +24295,8 @@ return 0; /*<>*/ } function fold(f, t, init){ - /*<>*/ var _K_ = t[1], i = 0; - /*<>*/ function _L_(b, accu$1){ + /*<>*/ var _L_ = t[1], i = 0; + /*<>*/ function _M_(b, accu$1){ var i$0 = i, accu = accu$1; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu; @@ -24325,11 +24315,11 @@ } } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _L_, _K_, init); + (Stdlib_Array[17], _M_, _L_, init); /*<>*/ } function iter(f, t){ - /*<>*/ var _I_ = t[1], i = 0; - /*<>*/ function _J_(b){ + /*<>*/ var _J_ = t[1], i = 0; + /*<>*/ function _K_(b){ var i$0 = i; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return 0; @@ -24345,15 +24335,15 @@ } } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Array[11], _J_, _I_); + (Stdlib_Array[11], _K_, _J_); /*<>*/ } function count_bucket(i, b, accu){ /*<>*/ var i$0 = i, accu$0 = accu; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu$0; /*<>*/ var - /*<>*/ _H_ = check(b, i$0) ? 1 : 0, - accu$1 = accu$0 + _H_ | 0, + /*<>*/ _I_ = check(b, i$0) ? 1 : 0, + accu$1 = accu$0 + _I_ | 0, i$1 = i$0 + 1 | 0, i$0 = i$1, accu$0 = accu$1; @@ -24361,14 +24351,14 @@ /*<>*/ } function count(t){ /*<>*/ var - /*<>*/ _B_ = 0, - _C_ = t[1], - _D_ = 0; - /*<>*/ function _E_(_F_, _G_){ - /*<>*/ return count_bucket(_D_, _F_, _G_); + /*<>*/ _C_ = 0, + _D_ = t[1], + _E_ = 0; + /*<>*/ function _F_(_G_, _H_){ + /*<>*/ return count_bucket(_E_, _G_, _H_); } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _E_, _C_, _B_); + (Stdlib_Array[17], _F_, _D_, _C_); /*<>*/ } function add_aux(t, setter, d, h, index){ /*<>*/ var @@ -24401,18 +24391,18 @@ /*<>*/ caml_check_bound(newhashes, sz)[1 + sz] = h; /*<>*/ caml_check_bound(t[1], index)[1 + index] = newbucket$0; /*<>*/ caml_check_bound(t[2], index)[1 + index] = newhashes; - var _x_ = sz <= t[3] ? 1 : 0, _y_ = _x_ ? t[3] < newsz ? 1 : 0 : _x_; - if(_y_){ + var _y_ = sz <= t[3] ? 1 : 0, _z_ = _y_ ? t[3] < newsz ? 1 : 0 : _y_; + if(_z_){ t[4] = t[4] + 1 | 0; var i$4 = 0; for(;;){ /*<>*/ var - _n_ = t[5], + _o_ = t[5], /*<>*/ bucket = - caml_check_bound(t[1], _n_)[1 + _n_], - /*<>*/ _o_ = t[5], + caml_check_bound(t[1], _o_)[1 + _o_], + /*<>*/ _p_ = t[5], /*<>*/ hbucket = - caml_check_bound(t[2], _o_)[1 + _o_], + caml_check_bound(t[2], _p_)[1 + _p_], /*<>*/ len = length(bucket), prev_len = (((len - 3 | 0) * 2 | 0) + 2 | 0) / 3 | 0, /*<>*/ live = count_bucket(0, bucket, 0); @@ -24424,28 +24414,28 @@ /*<>*/ for(;;){ if(prev_len > j){ if(0 === prev_len){ - var _q_ = t[5]; - /*<>*/ caml_check_bound(t[1], _q_)[1 + _q_] = emptybucket; var _r_ = t[5]; - /*<>*/ caml_check_bound(t[2], _r_)[1 + _r_] = [0]; + /*<>*/ caml_check_bound(t[1], _r_)[1 + _r_] = emptybucket; + var _s_ = t[5]; + /*<>*/ caml_check_bound(t[2], _s_)[1 + _s_] = [0]; } else{ /*<>*/ /*<>*/ var newbucket = create(prev_len); /*<>*/ blit(bucket, 0, newbucket, 0, prev_len); - var _u_ = t[5]; - /*<>*/ caml_check_bound(t[1], _u_)[1 + _u_] = newbucket; + var _v_ = t[5]; + /*<>*/ caml_check_bound(t[1], _v_)[1 + _v_] = newbucket; /*<>*/ var - /*<>*/ _v_ = + /*<>*/ _w_ = /*<>*/ caml_call3 (Stdlib_Array[5], hbucket, 0, prev_len), - _w_ = t[5]; - /*<>*/ caml_check_bound(t[2], _w_)[1 + _w_] = _v_; + _x_ = t[5]; + /*<>*/ caml_check_bound(t[2], _x_)[1 + _x_] = _w_; } var - _s_ = t[3] < len ? 1 : 0, - _t_ = _s_ ? prev_len <= t[3] ? 1 : 0 : _s_; - if(_t_) t[4] = t[4] - 1 | 0; + _t_ = t[3] < len ? 1 : 0, + _u_ = _t_ ? prev_len <= t[3] ? 1 : 0 : _t_; + if(_u_) t[4] = t[4] - 1 | 0; break; } /*<>*/ if(check(bucket, i$0)) @@ -24453,8 +24443,8 @@ else if(check(bucket, j)){ /*<>*/ blit(bucket, j, bucket, i$0, 1); /*<>*/ /*<>*/ var - _p_ = caml_check_bound(hbucket, j)[1 + j]; - /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _p_; + _q_ = caml_check_bound(hbucket, j)[1 + j]; + /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _q_; /*<>*/ var /*<>*/ j$0 = j - 1 | 0, i$2 = i$0 + 1 | 0, @@ -24469,13 +24459,13 @@ } t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); /*<>*/ /*<>*/ var - _A_ = i$4 + 1 | 0; + _B_ = i$4 + 1 | 0; if(2 === i$4) break; - var i$4 = _A_; + var i$4 = _B_; } } - var _z_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; - if(! _z_) return _z_; + var _A_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; + if(! _A_) return _A_; /*<>*/ var oldlen = t[1].length - 1, /*<>*/ newlen = @@ -24486,9 +24476,9 @@ if(oldlen < newlen){ /*<>*/ var /*<>*/ newt = create$0(newlen), - _l_ = t[1], + _m_ = t[1], i = 0, - /*<>*/ _m_ = + /*<>*/ _n_ = function(j, ob){ var oi = i; /*<>*/ for(;;){ @@ -24514,7 +24504,7 @@ } }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[12], _m_, _l_); + (Stdlib_Array[12], _n_, _m_); t[1] = newt[1]; t[2] = newt[2]; t[3] = newt[3]; @@ -24675,24 +24665,24 @@ } /*<>*/ } function remove(t, d){ - /*<>*/ /*<>*/ var _k_ = 0; + /*<>*/ /*<>*/ var _l_ = 0; /*<>*/ return find_shadow (t, d, function(w, i){ /*<>*/ return set(w, i, 0); /*<>*/ }, - _k_); + _l_); /*<>*/ } function mem(t, d){ - /*<>*/ /*<>*/ var _j_ = 0; + /*<>*/ /*<>*/ var _k_ = 0; /*<>*/ return find_shadow (t, d, function(w, i){ /*<>*/ return 1; /*<>*/ }, - _j_); + _k_); /*<>*/ } function find_all(t, d){ /*<>*/ var @@ -24742,17 +24732,17 @@ /*<>*/ caml_call2(Stdlib_Array[13], length, t[1]); /*<>*/ /*<>*/ caml_call2 (Stdlib_Array[30], runtime.caml_int_compare, lens); - var _a_ = 0; - function _b_(_i_, _h_){ /*<>*/ return _i_ + _h_ | 0;} + var _b_ = 0; + function _c_(_j_, _i_){ /*<>*/ return _j_ + _i_ | 0;} /*<>*/ var /*<>*/ totlen = - /*<>*/ caml_call3(Stdlib_Array[15], _b_, _a_, lens), - /*<>*/ _c_ = len - 1 | 0, - _e_ = len / 2 | 0, - /*<>*/ _d_ = caml_check_bound(lens, _c_)[1 + _c_], - /*<>*/ _f_ = caml_check_bound(lens, _e_)[1 + _e_], - /*<>*/ _g_ = caml_check_bound(lens, 0)[1]; - /*<>*/ return [0, len, count(t), totlen, _g_, _f_, _d_]; + /*<>*/ caml_call3(Stdlib_Array[15], _c_, _b_, lens), + /*<>*/ _d_ = len - 1 | 0, + _f_ = len / 2 | 0, + /*<>*/ _e_ = caml_check_bound(lens, _d_)[1 + _d_], + /*<>*/ _g_ = caml_check_bound(lens, _f_)[1 + _f_], + /*<>*/ _h_ = caml_check_bound(lens, 0)[1]; + /*<>*/ return [0, len, count(t), totlen, _h_, _g_, _e_]; /*<>*/ } /*<>*/ return [0, create$0, @@ -24809,7 +24799,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - sentinal = undefined, + _m_ = undefined, global_data = runtime.caml_get_global_data(), cst$14 = ".", cst$11 = cst$15, @@ -24859,25 +24849,25 @@ function pp_output_string(state, s){ /*<>*/ caml_call3 (state[17], s, 0, caml_ml_string_length(s)); - return sentinal; + return _m_; /*<>*/ } function pp_output_newline(state){ /*<>*/ /*<>*/ caml_call1 (state[19], 0); - /*<>*/ return sentinal; + /*<>*/ return _m_; /*<>*/ } function format_pp_text(state, size, text){ /*<>*/ state[9] = state[9] - size | 0; /*<>*/ pp_output_string(state, text); state[11] = 0; - return sentinal; + return _m_; /*<>*/ } function format_string(state, s){ /*<>*/ /*<>*/ var - _bN_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); - /*<>*/ return _bN_ - ? (format_pp_text(state, caml_ml_string_length(s), s), sentinal) - : _bN_; + _bO_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); + /*<>*/ return _bO_ + ? (format_pp_text(state, caml_ml_string_length(s), s), _m_) + : _bO_; /*<>*/ } function break_new_line(state, param, width){ var after = param[3], offset = param[2], before = param[1]; @@ -24894,11 +24884,11 @@ /*<>*/ /*<>*/ caml_call1 (state[21], n); /*<>*/ format_string(state, after); - /*<>*/ return sentinal; + /*<>*/ return _m_; } function break_line(state, width){ /*<>*/ break_new_line(state, _a_, width); - /*<>*/ return sentinal; + /*<>*/ return _m_; /*<>*/ } function break_same_line(state, param){ var after = param[3], width = param[2], before = param[1]; @@ -24907,7 +24897,7 @@ /*<>*/ /*<>*/ caml_call1 (state[20], width); /*<>*/ format_string(state, after); - /*<>*/ return sentinal; + /*<>*/ return _m_; } function format_pp_token(state, size$0, param){ /*<>*/ if(typeof param === "number") @@ -24916,7 +24906,7 @@ /*<>*/ /*<>*/ var match$3 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$3) /*<>*/ return sentinal; + if(! match$3) /*<>*/ return _m_; /*<>*/ var tabs = match$3[1][1], /*<>*/ add_tab = @@ -24929,15 +24919,15 @@ : [0, x, add_tab(n, l)]; }; tabs[1] = add_tab(state[6] - state[9] | 0, tabs[1]); - return sentinal; + return _m_; case 1: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[2]); - /*<>*/ return sentinal; + /*<>*/ return _m_; case 2: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[3]); - /*<>*/ return sentinal; + /*<>*/ return _m_; case 3: /*<>*/ /*<>*/ var match$4 = @@ -24945,38 +24935,38 @@ if(match$4){ var width$0 = match$4[1][2]; /*<>*/ break_line(state, width$0); - /*<>*/ return sentinal; + /*<>*/ return _m_; } /*<>*/ pp_output_newline(state); - /*<>*/ return sentinal; + /*<>*/ return _m_; case 4: - var _bL_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; - if(! _bL_) return _bL_; + var _bM_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; + if(! _bM_) return _bM_; /*<>*/ /*<>*/ var match$1 = /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); - if(! match$1) /*<>*/ return sentinal; + if(! match$1) /*<>*/ return _m_; var match$2 = match$1[1], size = match$2[1], length = match$2[3]; state[12] = state[12] - length | 0; state[9] = state[9] + size | 0; - return sentinal; + return _m_; default: /*<>*/ /*<>*/ var match$5 = /*<>*/ caml_call1(Stdlib_Stack[5], state[5]); - if(! match$5) /*<>*/ return sentinal; + if(! match$5) /*<>*/ return _m_; /*<>*/ var tag_name = match$5[1], /*<>*/ marker = /*<>*/ caml_call1(state[25], tag_name); /*<>*/ pp_output_string(state, marker); - /*<>*/ return sentinal; + /*<>*/ return _m_; } switch(param[0]){ case 0: var s = param[1]; /*<>*/ format_pp_text(state, size$0, s); - /*<>*/ return sentinal; + /*<>*/ return _m_; case 1: /*<>*/ var breaks = param[2], @@ -24985,7 +24975,7 @@ before = breaks[1], /*<>*/ match$6 = /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(! match$6) /*<>*/ return sentinal; + if(! match$6) /*<>*/ return _m_; var match$7 = match$6[1], width$1 = match$7[2], @@ -24993,24 +24983,24 @@ /*<>*/ switch(box_type$0){ case 0: /*<>*/ break_same_line(state, fits); - /*<>*/ return sentinal; + /*<>*/ return _m_; case 1: /*<>*/ break_new_line(state, breaks, width$1); - /*<>*/ return sentinal; + /*<>*/ return _m_; case 2: /*<>*/ break_new_line(state, breaks, width$1); - /*<>*/ return sentinal; + /*<>*/ return _m_; case 3: return state[9] < (size$0 + caml_ml_string_length(before) | 0) - ? (break_new_line(state, breaks, width$1), sentinal) - : (break_same_line(state, fits), sentinal); + ? (break_new_line(state, breaks, width$1), _m_) + : (break_same_line(state, fits), _m_); case 4: return state[11] - ? (break_same_line(state, fits), sentinal) + ? (break_same_line(state, fits), _m_) : state [9] < (size$0 + caml_ml_string_length(before) | 0) - ? (break_new_line(state, breaks, width$1), sentinal) + ? (break_new_line(state, breaks, width$1), _m_) : ((state [6] - width$1 @@ -25018,11 +25008,11 @@ + off | 0) < state[10] - ? (break_new_line(state, breaks, width$1), sentinal) - : (break_same_line(state, fits), sentinal); + ? (break_new_line(state, breaks, width$1), _m_) + : (break_same_line(state, fits), _m_); default: /*<>*/ break_same_line(state, fits); - /*<>*/ return sentinal; + /*<>*/ return _m_; } case 2: /*<>*/ var @@ -25031,7 +25021,7 @@ insertion_point = state[6] - state[9] | 0, /*<>*/ match$8 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$8) /*<>*/ return sentinal; + if(! match$8) /*<>*/ return _m_; /*<>*/ var tabs$0 = match$8[1][1], /*<>*/ match$9 = tabs$0[1]; @@ -25041,11 +25031,11 @@ if(param$0){ var tail = param$0[2], head = param$0[1]; if(insertion_point > head){var param$0 = tail; continue;} - var _bM_ = head; + var _bN_ = head; } else - var _bM_ = first; - var tab = _bM_; + var _bN_ = first; + var tab = _bN_; break; } } @@ -25055,10 +25045,10 @@ /*<>*/ return 0 <= offset ? (break_same_line (state, [0, cst$0, offset + n | 0, cst]), - sentinal) + _m_) : (break_new_line (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]), - sentinal); + _m_); case 3: var ty = param[2], @@ -25082,12 +25072,12 @@ 1 === ty ? 1 : state[9] < size$0 ? ty : 5; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); - /*<>*/ return sentinal; + /*<>*/ return _m_; case 4: var tbox = param[1]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], tbox, state[3]); - /*<>*/ return sentinal; + /*<>*/ return _m_; default: /*<>*/ var tag_name$0 = param[1], @@ -25095,7 +25085,7 @@ /*<>*/ caml_call1(state[24], tag_name$0); /*<>*/ pp_output_string(state, marker$0); caml_call2(Stdlib_Stack[3], tag_name$0, state[5]); - return sentinal; + return _m_; } } function advance_left(state){ @@ -25109,10 +25099,10 @@ length = match$0[3], token = match$0[2], pending_count = state[13] - state[12] | 0, - /*<>*/ _bJ_ = 0 <= size ? 1 : 0, - /*<>*/ _bK_ = - _bJ_ || (state[9] <= pending_count ? 1 : 0); - if(! _bK_) /*<>*/ return _bK_; + /*<>*/ _bK_ = 0 <= size ? 1 : 0, + /*<>*/ _bL_ = + _bK_ || (state[9] <= pending_count ? 1 : 0); + if(! _bL_) /*<>*/ return _bL_; /*<>*/ /*<>*/ caml_call1 (Stdlib_Queue[5], state[28]); /*<>*/ /*<>*/ var @@ -25136,31 +25126,28 @@ queue_elem = [0, unknown, _b_, 0]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, -1, queue_elem], stack); - /*<>*/ return sentinal; + /*<>*/ return _m_; /*<>*/ } function set_size(state, ty){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[7], state[1]); - if(! match) /*<>*/ return sentinal; + if(! match) /*<>*/ return _m_; /*<>*/ var match$0 = match[1], queue_elem = match$0[2], left_total = match$0[1], /*<>*/ size = queue_elem[1]; - if(left_total < state[12]){ - initialize_scan_stack(state[1]); - return sentinal; - } - var _bI_ = queue_elem[2]; - if(typeof _bI_ !== "number") - switch(_bI_[0]){ + if(left_total < state[12]){initialize_scan_stack(state[1]); return _m_;} + var _bJ_ = queue_elem[2]; + if(typeof _bJ_ !== "number") + switch(_bJ_[0]){ case 3: if(1 - ty){ queue_elem[1] = state[13] + size | 0; /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[1]); } - /*<>*/ return sentinal; + /*<>*/ return _m_; case 1: case 2: if(ty){ @@ -25168,9 +25155,9 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[1]); } - /*<>*/ return sentinal; + /*<>*/ return _m_; } - /*<>*/ return sentinal; + /*<>*/ return _m_; /*<>*/ } function scan_push(state, b, token){ /*<>*/ pp_enqueue(state, token); @@ -25188,26 +25175,26 @@ /*<>*/ elem = [0, size, [3, indent, br_ty], 0]; /*<>*/ return scan_push(state, 0, elem); } - var _bH_ = state[14] === state[15] ? 1 : 0; - if(! _bH_) return _bH_; + var _bI_ = state[14] === state[15] ? 1 : 0; + if(! _bI_) return _bI_; var s = state[16]; /*<>*/ return enqueue_string_as (state, caml_ml_string_length(s), s); /*<>*/ } function pp_close_box(state, param){ - /*<>*/ var _bF_ = 1 < state[14] ? 1 : 0; - if(_bF_){ + /*<>*/ var _bG_ = 1 < state[14] ? 1 : 0; + if(_bG_){ 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 _bG_ = 0; + var _bH_ = 0; } else - var _bG_ = _bF_; - return _bG_; + var _bH_ = _bG_; + return _bH_; /*<>*/ } function pp_open_stag(state, tag_name){ /*<>*/ if(state[22]){ @@ -25216,8 +25203,8 @@ /*<>*/ /*<>*/ caml_call1 (state[26], tag_name); } - var _bE_ = state[23]; - if(! _bE_) return _bE_; + var _bF_ = state[23]; + if(! _bF_) return _bF_; /*<>*/ /*<>*/ var token = [5, tag_name]; /*<>*/ return pp_enqueue(state, [0, zero, token, 0]); @@ -25225,8 +25212,8 @@ function pp_close_stag(state, param){ /*<>*/ if(state[23]) /*<>*/ pp_enqueue(state, [0, zero, 5, 0]); - var _bC_ = state[22]; - if(_bC_){ + var _bD_ = state[22]; + if(_bD_){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[5], state[4]); if(match){ @@ -25234,11 +25221,11 @@ /*<>*/ return /*<>*/ caml_call1 (state[27], tag_name); } - var _bD_ = 0; + var _bE_ = 0; } else - var _bD_ = _bC_; - /*<>*/ return _bD_; + var _bE_ = _bD_; + /*<>*/ return _bE_; /*<>*/ } function pp_set_print_tags(state, b){ /*<>*/ state[22] = b; @@ -25292,26 +25279,26 @@ /*<>*/ return pp_open_box_gen(state, 0, 3); /*<>*/ } function pp_flush_queue(state, b){ - /*<>*/ var _bA_ = state[4]; - function _bB_(param){ + /*<>*/ var _bB_ = state[4]; + function _bC_(param){ /*<>*/ return pp_close_stag(state, 0); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[12], _bB_, _bA_); + (Stdlib_Stack[12], _bC_, _bB_); /*<>*/ for(;;){ if(1 >= state[14]){ state[13] = pp_infinity; /*<>*/ advance_left(state); if(b) /*<>*/ pp_output_newline(state); /*<>*/ pp_rinit(state); - /*<>*/ return sentinal; + /*<>*/ return _m_; } /*<>*/ pp_close_box(state, 0); } /*<>*/ } function pp_print_as_size(state, size, s){ - /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; - return _bz_ ? enqueue_string_as(state, size, s) : _bz_; + /*<>*/ var _bA_ = state[14] < state[15] ? 1 : 0; + return _bA_ ? enqueue_string_as(state, size, s) : _bA_; /*<>*/ } function pp_print_as(state, isize, s){ /*<>*/ return pp_print_as_size(state, isize, s); @@ -25370,20 +25357,20 @@ (state[18], 0); /*<>*/ } function pp_force_newline(state, param){ - /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; - return _by_ ? enqueue_advance(state, [0, zero, 3, 0]) : _by_; + /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; + return _bz_ ? enqueue_advance(state, [0, zero, 3, 0]) : _bz_; /*<>*/ } function pp_print_if_newline(state, param){ - /*<>*/ var _bx_ = state[14] < state[15] ? 1 : 0; - return _bx_ ? enqueue_advance(state, [0, zero, 4, 0]) : _bx_; + /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; + return _by_ ? enqueue_advance(state, [0, zero, 4, 0]) : _by_; /*<>*/ } function pp_print_custom_break(state, fits, breaks){ /*<>*/ var after = fits[3], width = fits[2], before = fits[1], - _bw_ = state[14] < state[15] ? 1 : 0; - if(! _bw_) return _bw_; + _bx_ = state[14] < state[15] ? 1 : 0; + if(! _bx_) return _bx_; /*<>*/ var size = - state[13] | 0, /*<>*/ token = [1, fits, breaks], @@ -25406,33 +25393,33 @@ /*<>*/ } function pp_open_tbox(state, param){ /*<>*/ state[14] = state[14] + 1 | 0; - var _bv_ = state[14] < state[15] ? 1 : 0; - if(! _bv_) return _bv_; + var _bw_ = state[14] < state[15] ? 1 : 0; + if(! _bw_) return _bw_; /*<>*/ /*<>*/ var elem = [0, zero, [4, [0, [0, 0]]], 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_close_tbox(state, param){ - /*<>*/ var _bs_ = 1 < state[14] ? 1 : 0; - if(_bs_){ - var _bt_ = state[14] < state[15] ? 1 : 0; - if(_bt_){ + /*<>*/ var _bt_ = 1 < state[14] ? 1 : 0; + if(_bt_){ + var _bu_ = state[14] < state[15] ? 1 : 0; + if(_bu_){ /*<>*/ /*<>*/ var elem = [0, zero, 2, 0]; /*<>*/ enqueue_advance(state, elem); state[14] = state[14] - 1 | 0; - var _bu_ = 0; + var _bv_ = 0; } else - var _bu_ = _bt_; + var _bv_ = _bu_; } else - var _bu_ = _bs_; - return _bu_; + var _bv_ = _bt_; + return _bv_; /*<>*/ } function pp_print_tbreak(state, width, offset){ - /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; - if(! _br_) return _br_; + /*<>*/ var _bs_ = state[14] < state[15] ? 1 : 0; + if(! _bs_) return _bs_; /*<>*/ var size = - state[13] | 0, /*<>*/ elem = [0, size, [2, width, offset], width]; @@ -25442,17 +25429,17 @@ /*<>*/ return pp_print_tbreak(state, 0, 0); /*<>*/ } function pp_set_tab(state, param){ - /*<>*/ var _bq_ = state[14] < state[15] ? 1 : 0; - if(! _bq_) return _bq_; + /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; + if(! _br_) return _br_; /*<>*/ /*<>*/ var elem = [0, zero, 0, 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_set_max_boxes(state, n){ /*<>*/ var - _bo_ = 1 < n ? 1 : 0, - _bp_ = _bo_ ? (state[15] = n, 0) : _bo_; - return _bp_; + _bp_ = 1 < n ? 1 : 0, + _bq_ = _bp_ ? (state[15] = n, 0) : _bp_; + return _bq_; /*<>*/ } function pp_get_max_boxes(state, param){ /*<>*/ return state[15]; @@ -25471,10 +25458,10 @@ /*<>*/ return n < 1000000010 ? n : 1000000009; /*<>*/ } function pp_set_max_indent(state, n$0){ - /*<>*/ var _bn_ = 1 < n$0 ? 1 : 0; + /*<>*/ var _bo_ = 1 < n$0 ? 1 : 0; + if(! _bo_) return _bo_; + var n$1 = state[6] - n$0 | 0, _bn_ = 1 <= n$1 ? 1 : 0; if(! _bn_) return _bn_; - var n$1 = state[6] - n$0 | 0, _bm_ = 1 <= n$1 ? 1 : 0; - if(! _bm_) return _bm_; /*<>*/ /*<>*/ var n = pp_limit(n$1); state[7] = n; state[8] = state[6] - state[7] | 0; @@ -25484,19 +25471,19 @@ /*<>*/ return state[8]; /*<>*/ } function pp_set_margin(state, n){ - /*<>*/ var _bk_ = 1 <= n ? 1 : 0; - if(! _bk_) return _bk_; + /*<>*/ var _bl_ = 1 <= n ? 1 : 0; + if(! _bl_) return _bl_; /*<>*/ /*<>*/ var n$0 = pp_limit(n); state[6] = n$0; if(state[8] <= state[6]) var new_max_indent = state[8]; else /*<>*/ var - /*<>*/ _bl_ = + /*<>*/ _bm_ = /*<>*/ caml_call2 (Stdlib_Int[11], state[6] - state[7] | 0, state[6] / 2 | 0), new_max_indent = - /*<>*/ caml_call2(Stdlib_Int[11], _bl_, 1); + /*<>*/ caml_call2(Stdlib_Int[11], _bm_, 1); /*<>*/ return pp_set_max_indent(state, new_max_indent); /*<>*/ } function validate_geometry(param){ @@ -25527,11 +25514,11 @@ /*<>*/ return pp_set_full_geometry(state, geometry); /*<>*/ var msg = match[1], - /*<>*/ _bj_ = + /*<>*/ _bk_ = /*<>*/ caml_call2 (Stdlib[28], cst_Format_pp_set_geometry, msg); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], _bj_], 1); + ([0, Stdlib[6], _bk_], 1); /*<>*/ } function pp_safe_set_geometry(state, max_indent, margin){ /*<>*/ /*<>*/ var @@ -25584,8 +25571,8 @@ function display_blanks(state, n){ /*<>*/ var n$0 = n; /*<>*/ for(;;){ - var _bi_ = 0 < n$0 ? 1 : 0; - if(! _bi_) return _bi_; + var _bj_ = 0 < n$0 ? 1 : 0; + if(! _bj_) return _bj_; if(80 >= n$0) /*<>*/ return /*<>*/ caml_call3 (state[17], blank_line, 0, n$0); @@ -25605,9 +25592,9 @@ (Stdlib[63], oc); /*<>*/ }; state[19] = - function(_bh_){ /*<>*/ return display_newline(state, _bh_);}; - state[20] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; - state[21] = function(_bf_){ /*<>*/ return display_blanks(state, _bf_);}; + function(_bi_){ /*<>*/ return display_newline(state, _bi_);}; + state[20] = function(_bh_){ /*<>*/ return display_blanks(state, _bh_);}; + state[21] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; return 0; /*<>*/ } function default_pp_mark_open_tag(param){ @@ -25615,23 +25602,23 @@ /*<>*/ return cst$10; /*<>*/ var s = param[2], - /*<>*/ _be_ = + /*<>*/ _bf_ = /*<>*/ caml_call2(Stdlib[28], s, cst$8); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$9, _be_); + (Stdlib[28], cst$9, _bf_); /*<>*/ } function default_pp_mark_close_tag(param){ /*<>*/ if(param[1] !== String_tag) /*<>*/ return cst$13; /*<>*/ var s = param[2], - /*<>*/ _bd_ = + /*<>*/ _be_ = /*<>*/ caml_call2(Stdlib[28], s, cst$11); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$12, _bd_); + (Stdlib[28], cst$12, _be_); /*<>*/ } - function default_pp_print_open_tag(_bc_){ /*<>*/ return 0;} - function default_pp_print_close_tag(_bb_){ /*<>*/ return 0;} + function default_pp_print_open_tag(_bd_){ /*<>*/ return 0;} + function default_pp_print_close_tag(_bc_){ /*<>*/ return 0;} function pp_make_formatter(f, g, h, i, j){ /*<>*/ var /*<>*/ pp_queue = @@ -25645,19 +25632,19 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, 1, sys_tok], scan_stack); /*<>*/ var - _a9_ = Stdlib[19], - /*<>*/ _a__ = + _a__ = Stdlib[19], + /*<>*/ _a$_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _a$_ = + /*<>*/ _ba_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _ba_ = + /*<>*/ _bb_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0); /*<>*/ return [0, scan_stack, /*<>*/ caml_call1(Stdlib_Stack[2], 0), + _bb_, _ba_, _a$_, - _a__, 78, 10, 68, @@ -25667,7 +25654,7 @@ 1, 1, 1, - _a9_, + _a__, cst$14, f, g, @@ -25687,30 +25674,30 @@ (out_funs[1], out_funs[2], out_funs[3], out_funs[4], out_funs[5]); /*<>*/ } function make_formatter(output, flush){ - function _a1_(_a8_){ /*<>*/ return 0;} - function _a2_(_a7_){ /*<>*/ return 0;} + function _a2_(_a9_){ /*<>*/ return 0;} + function _a3_(_a8_){ /*<>*/ return 0;} /*<>*/ /*<>*/ var ppf = pp_make_formatter - (output, flush, function(_a6_){ /*<>*/ return 0;}, _a2_, _a1_); - ppf[19] = function(_a5_){ /*<>*/ return display_newline(ppf, _a5_);}; - ppf[20] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; - ppf[21] = function(_a3_){ /*<>*/ return display_blanks(ppf, _a3_);}; + (output, flush, function(_a7_){ /*<>*/ return 0;}, _a3_, _a2_); + ppf[19] = function(_a6_){ /*<>*/ return display_newline(ppf, _a6_);}; + ppf[20] = function(_a5_){ /*<>*/ return display_blanks(ppf, _a5_);}; + ppf[21] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; /*<>*/ return ppf; /*<>*/ } function formatter_of_out_channel(oc){ - function _a0_(param){ + function _a1_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _a0_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _a1_); /*<>*/ } function formatter_of_buffer(b){ - /*<>*/ function _aY_(_aZ_){ /*<>*/ return 0;} + /*<>*/ function _aZ_(_a0_){ /*<>*/ return 0;} /*<>*/ return make_formatter ( /*<>*/ caml_call1(Stdlib_Buffer[18], b), - _aY_); + _aZ_); /*<>*/ } var pp_buffer_size = 512; function pp_make_buffer(param){ @@ -25741,9 +25728,9 @@ (Stdlib_Domain[10][3], str_formatter_key, str_formatter); /*<>*/ function buffered_out_string(key, str, ofs, len){ /*<>*/ /*<>*/ var - _aX_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); + _aY_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); /*<>*/ return /*<>*/ caml_call4 - (Stdlib_Buffer[18], _aX_, str, ofs, len); + (Stdlib_Buffer[18], _aY_, str, ofs, len); /*<>*/ } function buffered_out_flush(oc, key, param){ /*<>*/ var @@ -25775,31 +25762,31 @@ err_buf_key = /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _i_); function _j_(param){ - function _aG_(_aW_){ /*<>*/ return 0;} - function _aH_(_aV_){ /*<>*/ return 0;} - function _aI_(_aU_){ /*<>*/ return 0;} - var _aJ_ = Stdlib[39]; - /*<>*/ function _aK_(_aT_){ - /*<>*/ return buffered_out_flush(_aJ_, std_buf_key, _aT_); + function _aH_(_aX_){ /*<>*/ return 0;} + function _aI_(_aW_){ /*<>*/ return 0;} + function _aJ_(_aV_){ /*<>*/ return 0;} + var _aK_ = Stdlib[39]; + /*<>*/ function _aL_(_aU_){ + /*<>*/ return buffered_out_flush(_aK_, std_buf_key, _aU_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_aQ_, _aR_, _aS_){ - /*<>*/ return buffered_out_string(std_buf_key, _aQ_, _aR_, _aS_); + (function(_aR_, _aS_, _aT_){ + /*<>*/ return buffered_out_string(std_buf_key, _aR_, _aS_, _aT_); }, - _aK_, + _aL_, + _aJ_, _aI_, - _aH_, - _aG_); - ppf[19] = function(_aP_){ /*<>*/ return display_newline(ppf, _aP_);}; - ppf[20] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; - ppf[21] = function(_aN_){ /*<>*/ return display_blanks(ppf, _aN_);}; - /*<>*/ function _aL_(_aM_){ - /*<>*/ return pp_print_flush(ppf, _aM_); + _aH_); + ppf[19] = function(_aQ_){ /*<>*/ return display_newline(ppf, _aQ_);}; + ppf[20] = function(_aP_){ /*<>*/ return display_blanks(ppf, _aP_);}; + ppf[21] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; + /*<>*/ function _aM_(_aN_){ + /*<>*/ return pp_print_flush(ppf, _aN_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _aL_); + (Stdlib_Domain[6], _aM_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -25808,31 +25795,31 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Domain[10][3], std_formatter_key, std_formatter); function _k_(param){ - function _ap_(_aF_){ /*<>*/ return 0;} - function _aq_(_aE_){ /*<>*/ return 0;} - function _ar_(_aD_){ /*<>*/ return 0;} - var _as_ = Stdlib[40]; - /*<>*/ function _at_(_aC_){ - /*<>*/ return buffered_out_flush(_as_, err_buf_key, _aC_); + function _aq_(_aG_){ /*<>*/ return 0;} + function _ar_(_aF_){ /*<>*/ return 0;} + function _as_(_aE_){ /*<>*/ return 0;} + var _at_ = Stdlib[40]; + /*<>*/ function _au_(_aD_){ + /*<>*/ return buffered_out_flush(_at_, err_buf_key, _aD_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_az_, _aA_, _aB_){ - /*<>*/ return buffered_out_string(err_buf_key, _az_, _aA_, _aB_); + (function(_aA_, _aB_, _aC_){ + /*<>*/ return buffered_out_string(err_buf_key, _aA_, _aB_, _aC_); }, - _at_, + _au_, + _as_, _ar_, - _aq_, - _ap_); - ppf[19] = function(_ay_){ /*<>*/ return display_newline(ppf, _ay_);}; - ppf[20] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; - ppf[21] = function(_aw_){ /*<>*/ return display_blanks(ppf, _aw_);}; - /*<>*/ function _au_(_av_){ - /*<>*/ return pp_print_flush(ppf, _av_); + _aq_); + ppf[19] = function(_az_){ /*<>*/ return display_newline(ppf, _az_);}; + ppf[20] = function(_ay_){ /*<>*/ return display_blanks(ppf, _ay_);}; + ppf[21] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; + /*<>*/ function _av_(_aw_){ + /*<>*/ return pp_print_flush(ppf, _aw_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _au_); + (Stdlib_Domain[6], _av_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -25875,7 +25862,7 @@ (stdbuf, str_formatter); /*<>*/ } function make_synchronized_formatter(output, flush){ - function _an_(param){ + function _ao_(param){ /*<>*/ var /*<>*/ buf = /*<>*/ caml_call1 @@ -25884,12 +25871,12 @@ /*<>*/ caml_call1(Stdlib_Buffer[18], buf); function flush$0(param){ /*<>*/ /*<>*/ var - _ao_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); + _ap_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); /*<>*/ /*<>*/ caml_call3 (output, /*<>*/ caml_call1(Stdlib_Buffer[2], buf), 0, - _ao_); + _ap_); /*<>*/ /*<>*/ caml_call1 (Stdlib_Buffer[8], buf); /*<>*/ return /*<>*/ caml_call1 @@ -25898,15 +25885,15 @@ /*<>*/ return make_formatter(output$0, flush$0); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, _an_); + (Stdlib_Domain[10][1], 0, _ao_); /*<>*/ } function synchronized_formatter_of_out_(oc){ - function _am_(param){ + function _an_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_synchronized_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _am_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _an_); /*<>*/ } function make_symbolic_output_buffer(param){ /*<>*/ return [0, 0]; /*<>*/ } @@ -25935,10 +25922,10 @@ /*<>*/ caml_call3 (Stdlib_String[15], s, i, n)]); } - /*<>*/ function g(_al_){ + /*<>*/ function g(_am_){ /*<>*/ return add_symbolic_output_item(sob, 0); } - /*<>*/ function h(_ak_){ + /*<>*/ function h(_al_){ /*<>*/ return add_symbolic_output_item(sob, 1); } /*<>*/ function i(n){ @@ -26325,8 +26312,8 @@ /*<>*/ } for(;;){ if(right[1] === len){ - var _aj_ = left[1] !== len ? 1 : 0; - return _aj_ ? flush(0) : _aj_; + var _ak_ = left[1] !== len ? 1 : 0; + return _ak_ ? flush(0) : _ak_; } /*<>*/ /*<>*/ var match = /*<>*/ runtime.caml_string_get(s, right[1]); @@ -26348,7 +26335,7 @@ else var none = - function(param, _ai_){ + function(param, _aj_){ /*<>*/ return 0; /*<>*/ }; /*<>*/ if(! param) @@ -26447,56 +26434,56 @@ var acc$1 = match[1]; /*<>*/ output_acc(ppf, p$0); /*<>*/ var - /*<>*/ _$_ = compute_tag(output_acc, acc$1), + /*<>*/ _aa_ = compute_tag(output_acc, acc$1), /*<>*/ match$0 = /*<>*/ caml_call1 - (CamlinternalFormat[20], _$_), + (CamlinternalFormat[20], _aa_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _aa_ = acc[1]; - if(typeof _aa_ !== "number" && 0 === _aa_[0]){ - var _ab_ = _aa_[2]; - if(typeof _ab_ !== "number" && 1 === _ab_[0]){ - var s$0 = acc[2], size = _ab_[2], p$2 = _aa_[1]; + var _ab_ = acc[1]; + if(typeof _ab_ !== "number" && 0 === _ab_[0]){ + var _ac_ = _ab_[2]; + if(typeof _ac_ !== "number" && 1 === _ac_[0]){ + var s$0 = acc[2], size = _ac_[2], p$2 = _ab_[1]; break b; } } - var s = acc[2], p$1 = _aa_; + var s = acc[2], p$1 = _ab_; break a; case 3: - var _ac_ = acc[1]; - if(typeof _ac_ !== "number" && 0 === _ac_[0]){ - var _ad_ = _ac_[2]; - if(typeof _ad_ !== "number" && 1 === _ad_[0]){ - var c$0 = acc[2], size$0 = _ad_[2], p$4 = _ac_[1]; + var _ad_ = acc[1]; + if(typeof _ad_ !== "number" && 0 === _ad_[0]){ + var _ae_ = _ad_[2]; + if(typeof _ae_ !== "number" && 1 === _ae_[0]){ + var c$0 = acc[2], size$0 = _ae_[2], p$4 = _ad_[1]; break; } } - var c = acc[2], p$3 = _ac_; + var c = acc[2], p$3 = _ad_; break c; case 4: - var _ae_ = acc[1]; - if(typeof _ae_ !== "number" && 0 === _ae_[0]){ - var _af_ = _ae_[2]; - if(typeof _af_ !== "number" && 1 === _af_[0]){ - var s$0 = acc[2], size = _af_[2], p$2 = _ae_[1]; + var _af_ = acc[1]; + if(typeof _af_ !== "number" && 0 === _af_[0]){ + var _ag_ = _af_[2]; + if(typeof _ag_ !== "number" && 1 === _ag_[0]){ + var s$0 = acc[2], size = _ag_[2], p$2 = _af_[1]; break b; } } - var s = acc[2], p$1 = _ae_; + var s = acc[2], p$1 = _af_; break a; case 5: - var _ag_ = acc[1]; - if(typeof _ag_ !== "number" && 0 === _ag_[0]){ - var _ah_ = _ag_[2]; - if(typeof _ah_ !== "number" && 1 === _ah_[0]){ - var c$0 = acc[2], size$0 = _ah_[2], p$4 = _ag_[1]; + var _ah_ = acc[1]; + if(typeof _ah_ !== "number" && 0 === _ah_[0]){ + var _ai_ = _ah_[2]; + if(typeof _ai_ !== "number" && 1 === _ai_[0]){ + var c$0 = acc[2], size$0 = _ai_[2], p$4 = _ah_[1]; break; } } - var c = acc[2], p$3 = _ag_; + var c = acc[2], p$3 = _ah_; break c; case 6: var f$0 = acc[2], p$5 = acc[1]; @@ -26554,56 +26541,56 @@ var acc$1 = match[1]; /*<>*/ strput_acc(ppf, p$0); /*<>*/ var - /*<>*/ _S_ = compute_tag(strput_acc, acc$1), + /*<>*/ _T_ = compute_tag(strput_acc, acc$1), /*<>*/ match$0 = /*<>*/ caml_call1 - (CamlinternalFormat[20], _S_), + (CamlinternalFormat[20], _T_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _T_ = acc[1]; - if(typeof _T_ !== "number" && 0 === _T_[0]){ - var _U_ = _T_[2]; - if(typeof _U_ !== "number" && 1 === _U_[0]){ - var s$0 = acc[2], size = _U_[2], p$2 = _T_[1]; + var _U_ = acc[1]; + if(typeof _U_ !== "number" && 0 === _U_[0]){ + var _V_ = _U_[2]; + if(typeof _V_ !== "number" && 1 === _V_[0]){ + var s$0 = acc[2], size = _V_[2], p$2 = _U_[1]; break b; } } - var s = acc[2], p$1 = _T_; + var s = acc[2], p$1 = _U_; break a; case 3: - var _V_ = acc[1]; - if(typeof _V_ !== "number" && 0 === _V_[0]){ - var _W_ = _V_[2]; - if(typeof _W_ !== "number" && 1 === _W_[0]){ - var c$0 = acc[2], size$0 = _W_[2], p$4 = _V_[1]; + var _W_ = acc[1]; + if(typeof _W_ !== "number" && 0 === _W_[0]){ + var _X_ = _W_[2]; + if(typeof _X_ !== "number" && 1 === _X_[0]){ + var c$0 = acc[2], size$0 = _X_[2], p$4 = _W_[1]; break; } } - var c = acc[2], p$3 = _V_; + var c = acc[2], p$3 = _W_; break c; case 4: - var _X_ = acc[1]; - if(typeof _X_ !== "number" && 0 === _X_[0]){ - var _Y_ = _X_[2]; - if(typeof _Y_ !== "number" && 1 === _Y_[0]){ - var s$0 = acc[2], size = _Y_[2], p$2 = _X_[1]; + var _Y_ = acc[1]; + if(typeof _Y_ !== "number" && 0 === _Y_[0]){ + var _Z_ = _Y_[2]; + if(typeof _Z_ !== "number" && 1 === _Z_[0]){ + var s$0 = acc[2], size = _Z_[2], p$2 = _Y_[1]; break b; } } - var s = acc[2], p$1 = _X_; + var s = acc[2], p$1 = _Y_; break a; case 5: - var _Z_ = acc[1]; - if(typeof _Z_ !== "number" && 0 === _Z_[0]){ - var ___ = _Z_[2]; - if(typeof ___ !== "number" && 1 === ___[0]){ - var c$0 = acc[2], size$0 = ___[2], p$4 = _Z_[1]; + var ___ = acc[1]; + if(typeof ___ !== "number" && 0 === ___[0]){ + var _$_ = ___[2]; + if(typeof _$_ !== "number" && 1 === _$_[0]){ + var c$0 = acc[2], size$0 = _$_[2], p$4 = ___[1]; break; } } - var c = acc[2], p$3 = _Z_; + var c = acc[2], p$3 = ___; break c; case 6: var p$5 = acc[1]; @@ -26649,13 +26636,13 @@ function kfprintf(k, ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _Q_ = 0; - function _R_(acc){ + /*<>*/ _R_ = 0; + function _S_(acc){ /*<>*/ output_acc(ppf, acc); return caml_call1(k, ppf); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _R_, _Q_, fmt); + (CamlinternalFormat[7], _S_, _R_, fmt); } function ikfprintf(k, ppf, param){ var fmt = param[1]; @@ -26665,47 +26652,47 @@ function ifprintf(ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _N_ = 0; - function _O_(_P_){ /*<>*/ return 0;} + /*<>*/ _O_ = 0; + function _P_(_Q_){ /*<>*/ return 0;} /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[8], _O_, _N_, fmt); + (CamlinternalFormat[8], _P_, _O_, fmt); } function fprintf(ppf){ - function _K_(_M_){ /*<>*/ return 0;} - /*<>*/ return function(_L_){ - /*<>*/ return kfprintf(_K_, ppf, _L_);}; + function _L_(_N_){ /*<>*/ return 0;} + /*<>*/ return function(_M_){ + /*<>*/ return kfprintf(_L_, ppf, _M_);}; /*<>*/ } function printf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _I_ = 0; - function _J_(acc){ + /*<>*/ _J_ = 0; + function _K_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], std_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _J_, _I_, fmt); + (CamlinternalFormat[7], _K_, _J_, fmt); } function eprintf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _G_ = 0; - function _H_(acc){ + /*<>*/ _H_ = 0; + function _I_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], err_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _H_, _G_, fmt); + (CamlinternalFormat[7], _I_, _H_, fmt); } function kdprintf(k, param){ /*<>*/ var fmt = param[1], - /*<>*/ _E_ = 0; - function _F_(acc){ + /*<>*/ _F_ = 0; + function _G_(acc){ /*<>*/ return /*<>*/ caml_call1 (k, function(ppf){ @@ -26713,7 +26700,7 @@ /*<>*/ }); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _F_, _E_, fmt); + (CamlinternalFormat[7], _G_, _F_, fmt); } function dprintf(fmt){ /*<>*/ return kdprintf @@ -26771,44 +26758,44 @@ /*<>*/ var /*<>*/ fs = pp_get_formatter_out_functions(std_formatter, 0), - _m_ = fs[5], - _n_ = fs[4], - _o_ = fs[3], - _p_ = Stdlib[39]; - /*<>*/ function _q_(_D_){ - /*<>*/ return buffered_out_flush(_p_, std_buf_key, _D_); + _n_ = fs[5], + _o_ = fs[4], + _p_ = fs[3], + _q_ = Stdlib[39]; + /*<>*/ function _r_(_E_){ + /*<>*/ return buffered_out_flush(_q_, std_buf_key, _E_); } /*<>*/ pp_set_formatter_out_functions (std_formatter, [0, - function(_A_, _B_, _C_){ - /*<>*/ return buffered_out_string(std_buf_key, _A_, _B_, _C_); + function(_B_, _C_, _D_){ + /*<>*/ return buffered_out_string(std_buf_key, _B_, _C_, _D_); }, - _q_, + _r_, + _p_, _o_, - _n_, - _m_]); + _n_]); /*<>*/ var /*<>*/ fs$0 = pp_get_formatter_out_functions(err_formatter, 0), - _r_ = fs$0[5], - _s_ = fs$0[4], - _t_ = fs$0[3], - _u_ = Stdlib[40]; - /*<>*/ function _v_(_z_){ - /*<>*/ return buffered_out_flush(_u_, err_buf_key, _z_); + _s_ = fs$0[5], + _t_ = fs$0[4], + _u_ = fs$0[3], + _v_ = Stdlib[40]; + /*<>*/ function _w_(_A_){ + /*<>*/ return buffered_out_flush(_v_, err_buf_key, _A_); } /*<>*/ return pp_set_formatter_out_functions (err_formatter, [0, - function(_w_, _x_, _y_){ + function(_x_, _y_, _z_){ /*<>*/ return buffered_out_string - (err_buf_key, _w_, _x_, _y_); + (err_buf_key, _x_, _y_, _z_); }, - _v_, + _w_, + _u_, _t_, - _s_, - _r_]); + _s_]); /*<>*/ } /*<>*/ /*<>*/ caml_call1 (Stdlib_Domain[5], _l_); @@ -27009,7 +26996,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - sentinal = undefined, + _u_ = undefined, global_data = runtime.caml_get_global_data(), cst$3 = cst$5, cst$4 = cst$5, @@ -27133,9 +27120,9 @@ if(10 === c) ib[5] = ib[5] + 1 | 0; /*<>*/ return c; } - catch(_bb_){ - var _ba_ = caml_wrap_exception(_bb_); - if(_ba_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_ba_, 0); + catch(_bc_){ + var _bb_ = caml_wrap_exception(_bc_); + if(_bb_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_bb_, 0); ib[2] = null_char; ib[3] = 0; ib[1] = 1; @@ -27228,8 +27215,8 @@ /*<>*/ return create(1, next); /*<>*/ } var _a_ = 0; - /*<>*/ function from_function(_a$_){ - /*<>*/ return create(_a_, _a$_); + /*<>*/ function from_function(_ba_){ + /*<>*/ return create(_a_, _ba_); } /*<>*/ /*<>*/ var len = 1024; function scan_close_at_end(ic){ @@ -27276,12 +27263,12 @@ return from_ic(scan_close_at_end, [1, fname, ic], ic); /*<>*/ } var _b_ = Stdlib[79]; - /*<>*/ function open_in(_a__){ - /*<>*/ return open_in_file(_b_, _a__); + /*<>*/ function open_in(_a$_){ + /*<>*/ return open_in_file(_b_, _a$_); } /*<>*/ /*<>*/ var _c_ = Stdlib[80]; - /*<>*/ function open_in_bin(_a9_){ - /*<>*/ return open_in_file(_c_, _a9_); + /*<>*/ function open_in_bin(_a__){ + /*<>*/ return open_in_file(_c_, _a__); } function from_channel(ic){ /*<>*/ return from_ic(scan_raise_at_end, [0, ic], ic); @@ -27344,15 +27331,15 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _a7_ = 1 - ib[1]; - if(! _a7_) /*<>*/ return _a7_; - /*<>*/ /*<>*/ var _a8_ = c - 9 | 0; + /*<>*/ _a8_ = 1 - ib[1]; + if(! _a8_) /*<>*/ return _a8_; + /*<>*/ /*<>*/ var _a9_ = c - 9 | 0; a: { - if(4 < _a8_ >>> 0){ - if(23 === _a8_) break a; + if(4 < _a9_ >>> 0){ + if(23 === _a9_) break a; } - else if(1 < _a8_ - 2 >>> 0) break a; + else if(1 < _a9_ - 2 >>> 0) break a; /*<>*/ return 0; } /*<>*/ invalidate_current_char(ib); @@ -27398,23 +27385,23 @@ /*<>*/ switch(conv){ case 0: /*<>*/ var - /*<>*/ _a3_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a3_); + /*<>*/ _a4_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a4_); break; case 3: /*<>*/ var - /*<>*/ _a4_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a4_); + /*<>*/ _a5_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a5_); break; case 4: /*<>*/ var - /*<>*/ _a5_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a5_); + /*<>*/ _a6_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a6_); break; case 5: /*<>*/ var - /*<>*/ _a6_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a6_); + /*<>*/ _a7_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a7_); break; default: var tok = token_string(ib); } @@ -27499,31 +27486,31 @@ function is_binary_digit(param){ /*<>*/ return 1 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_binary_int(_a1_, _a2_){ - /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a1_, _a2_); + /*<>*/ function scan_binary_int(_a2_, _a3_){ + /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a2_, _a3_); } function is_octal_digit(param){ /*<>*/ return 7 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_octal_int(_aZ_, _a0_){ - /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _aZ_, _a0_); + /*<>*/ function scan_octal_int(_a0_, _a1_){ + /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _a0_, _a1_); } function is_hexa_digit(param){ /*<>*/ /*<>*/ var - _aY_ = param - 48 | 0; + _aZ_ = param - 48 | 0; a: { - if(22 < _aY_ >>> 0){ - if(5 < _aY_ - 49 >>> 0) break a; + if(22 < _aZ_ >>> 0){ + if(5 < _aZ_ - 49 >>> 0) break a; } - else if(6 >= _aY_ - 10 >>> 0) break a; + else if(6 >= _aZ_ - 10 >>> 0) break a; /*<>*/ return 1; } /*<>*/ return 0; /*<>*/ } - /*<>*/ function scan_hexadecimal_int(_aW_, _aX_){ + /*<>*/ function scan_hexadecimal_int(_aX_, _aY_){ /*<>*/ return scan_digit_plus - (cst_hexadecimal, is_hexa_digit, _aW_, _aX_); + (cst_hexadecimal, is_hexa_digit, _aX_, _aY_); } function scan_sign(width, ib){ /*<>*/ var @@ -27643,38 +27630,38 @@ /*<>*/ len = /*<>*/ caml_ml_string_length(str), /*<>*/ width$0 = [0, width], - /*<>*/ _aT_ = len - 1 | 0, - /*<>*/ _aS_ = 0; - if(_aT_ >= 0){ - var i = _aS_; + /*<>*/ _aU_ = len - 1 | 0, + /*<>*/ _aT_ = 0; + if(_aU_ >= 0){ + var i = _aT_; for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _aU_ = + /*<>*/ _aV_ = lowercase( /*<>*/ caml_string_get(str, i)); - if(lowercase(c) !== _aU_) + if(lowercase(c) !== _aV_) /*<>*/ /*<>*/ caml_call1(error, 0); if(0 === width$0[1]) /*<>*/ /*<>*/ caml_call1(error, 0); width$0[1] = store_char(width$0[1], ib, c); - /*<>*/ /*<>*/ var _aV_ = i + 1 | 0; - if(_aT_ === i) break; - var i = _aV_; + /*<>*/ /*<>*/ var _aW_ = i + 1 | 0; + if(_aU_ === i) break; + var i = _aW_; } } return width$0[1]; /*<>*/ } function scan_hex_float(width, precision, ib){ /*<>*/ var - _aF_ = 0 === width ? 1 : 0, - _aG_ = _aF_ || end_of_input(ib); - /*<>*/ if(_aG_) + _aG_ = 0 === width ? 1 : 0, + _aH_ = _aG_ || end_of_input(ib); + /*<>*/ if(_aH_) /*<>*/ bad_hex_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _aH_ = 0 === width$0 ? 1 : 0, - _aI_ = _aH_ || end_of_input(ib); - /*<>*/ if(_aI_) + _aI_ = 0 === width$0 ? 1 : 0, + _aJ_ = _aI_ || end_of_input(ib); + /*<>*/ if(_aJ_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); a: @@ -27686,9 +27673,9 @@ if(32 <= switcher) break a; /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _aJ_ = 0 === width$1 ? 1 : 0, - _aK_ = _aJ_ || end_of_input(ib); - /*<>*/ if(_aK_) + _aK_ = 0 === width$1 ? 1 : 0, + _aL_ = _aK_ || end_of_input(ib); + /*<>*/ if(_aL_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$1, ib, bad_hex_float, cst_an); @@ -27699,24 +27686,24 @@ if(48 === c){ /*<>*/ var /*<>*/ width$3 = store_char(width$0, ib, c), - _aN_ = 0 === width$3 ? 1 : 0, - _aO_ = _aN_ || end_of_input(ib); - /*<>*/ if(_aO_) + _aO_ = 0 === width$3 ? 1 : 0, + _aP_ = _aO_ || end_of_input(ib); + /*<>*/ if(_aP_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ var width$4 = check_case_insensitive_string(width$3, ib, bad_hex_float, cst_x); /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var - _aP_ = peek_char(ib) - 46 | 0; + _aQ_ = peek_char(ib) - 46 | 0; b: { c: { - if(34 < _aP_ >>> 0){ - if(66 === _aP_) break c; + if(34 < _aQ_ >>> 0){ + if(66 === _aQ_) break c; } - else if(32 < _aP_ - 1 >>> 0) break c; + else if(32 < _aQ_ - 1 >>> 0) break c; var width$5 = scan_hexadecimal_int(width$4, ib); break b; } @@ -27764,9 +27751,9 @@ /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$1), - _aQ_ = 0 === width$9 ? 1 : 0, - _aR_ = _aQ_ || end_of_input(ib); - /*<>*/ if(_aR_) + _aR_ = 0 === width$9 ? 1 : 0, + _aS_ = _aR_ || end_of_input(ib); + /*<>*/ if(_aS_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -27781,9 +27768,9 @@ } /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _aL_ = 0 === width$2 ? 1 : 0, - _aM_ = _aL_ || end_of_input(ib); - /*<>*/ if(_aM_) + _aM_ = 0 === width$2 ? 1 : 0, + _aN_ = _aM_ || end_of_input(ib); + /*<>*/ if(_aN_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$2, ib, bad_hex_float, cst_nfinity); @@ -27792,14 +27779,14 @@ /*<>*/ } function scan_caml_float_rest(width, precision, ib){ /*<>*/ var - _aB_ = 0 === width ? 1 : 0, - _aC_ = _aB_ || end_of_input(ib); - /*<>*/ if(_aC_) /*<>*/ bad_float(0); + _aC_ = 0 === width ? 1 : 0, + _aD_ = _aC_ || end_of_input(ib); + /*<>*/ if(_aD_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_decimal_digit_star(width, ib), - _aD_ = 0 === width$0 ? 1 : 0, - _aE_ = _aD_ || end_of_input(ib); - /*<>*/ if(_aE_) /*<>*/ bad_float(0); + _aE_ = 0 === width$0 ? 1 : 0, + _aF_ = _aE_ || end_of_input(ib); + /*<>*/ if(_aF_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c = peek_char(ib), /*<>*/ switcher = c - 69 | 0; @@ -27823,22 +27810,22 @@ /*<>*/ } function scan_caml_float(width, precision, ib){ /*<>*/ var - _an_ = 0 === width ? 1 : 0, - _ao_ = _an_ || end_of_input(ib); - /*<>*/ if(_ao_) /*<>*/ bad_float(0); + _ao_ = 0 === width ? 1 : 0, + _ap_ = _ao_ || end_of_input(ib); + /*<>*/ if(_ap_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _ap_ = 0 === width$0 ? 1 : 0, - _aq_ = _ap_ || end_of_input(ib); - /*<>*/ if(_aq_) /*<>*/ bad_float(0); + _aq_ = 0 === width$0 ? 1 : 0, + _ar_ = _aq_ || end_of_input(ib); + /*<>*/ if(_ar_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); if(49 <= c){ if(58 > c){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _ar_ = 0 === width$1 ? 1 : 0, - _as_ = _ar_ || end_of_input(ib); - /*<>*/ if(_as_) /*<>*/ bad_float(0); + _as_ = 0 === width$1 ? 1 : 0, + _at_ = _as_ || end_of_input(ib); + /*<>*/ if(_at_) /*<>*/ bad_float(0); /*<>*/ return scan_caml_float_rest (width$1, precision, ib); } @@ -27846,9 +27833,9 @@ else if(48 <= c){ /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _at_ = 0 === width$2 ? 1 : 0, - _au_ = _at_ || end_of_input(ib); - /*<>*/ if(_au_) /*<>*/ bad_float(0); + _au_ = 0 === width$2 ? 1 : 0, + _av_ = _au_ || end_of_input(ib); + /*<>*/ if(_av_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c$0 = peek_char(ib); if(88 !== c$0 && 120 !== c$0) @@ -27856,14 +27843,14 @@ (width$2, precision, ib); /*<>*/ var /*<>*/ width$3 = store_char(width$2, ib, c$0), - _av_ = 0 === width$3 ? 1 : 0, - _aw_ = _av_ || end_of_input(ib); - /*<>*/ if(_aw_) /*<>*/ bad_float(0); + _aw_ = 0 === width$3 ? 1 : 0, + _ax_ = _aw_ || end_of_input(ib); + /*<>*/ if(_ax_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$4 = scan_hexadecimal_int(width$3, ib), - _ax_ = 0 === width$4 ? 1 : 0, - _ay_ = _ax_ || end_of_input(ib); - /*<>*/ if(_ay_) /*<>*/ bad_float(0); + _ay_ = 0 === width$4 ? 1 : 0, + _az_ = _ay_ || end_of_input(ib); + /*<>*/ if(_az_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c$1 = peek_char(ib), /*<>*/ switcher = c$1 - 80 | 0; @@ -27916,9 +27903,9 @@ if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$2), - _az_ = 0 === width$9 ? 1 : 0, - _aA_ = _az_ || end_of_input(ib); - /*<>*/ if(_aA_) + _aA_ = 0 === width$9 ? 1 : 0, + _aB_ = _aA_ || end_of_input(ib); + /*<>*/ if(_aB_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -27935,13 +27922,13 @@ /*<>*/ if(ib[1]) /*<>*/ return width$0; if(! stp){ - /*<>*/ /*<>*/ var _am_ = c - 9 | 0; + /*<>*/ /*<>*/ var _an_ = c - 9 | 0; a: { - if(4 < _am_ >>> 0){ - if(23 === _am_) break a; + if(4 < _an_ >>> 0){ + if(23 === _an_) break a; } - else if(1 < _am_ - 2 >>> 0) break a; + else if(1 < _an_ - 2 >>> 0) break a; /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), width$0 = width$2; @@ -27971,11 +27958,11 @@ (Stdlib_Printf[4], _f_, message)) : c; /*<>*/ } - /*<>*/ function check_next_char_for_char(_ak_, _al_){ - /*<>*/ return check_next_char(cst_a_Char, _ak_, _al_); + /*<>*/ function check_next_char_for_char(_al_, _am_){ + /*<>*/ return check_next_char(cst_a_Char, _al_, _am_); } - /*<>*/ function check_next_char_for_string(_ai_, _aj_){ - /*<>*/ return check_next_char(cst_a_String, _ai_, _aj_); + /*<>*/ function check_next_char_for_string(_aj_, _ak_){ + /*<>*/ return check_next_char(cst_a_String, _aj_, _ak_); } function scan_backslash_char(width, ib){ /*<>*/ /*<>*/ var @@ -28001,16 +27988,16 @@ b: { if(0 <= c && 255 >= c){ - var _ag_ = /*<>*/ caml_call1(Stdlib[29], c); + var _ah_ = /*<>*/ caml_call1(Stdlib[29], c); break b; } var - _ag_ = + _ah_ = bad_input ( /*<>*/ caml_call4 (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); } - /*<>*/ return store_char(width - 2 | 0, ib, _ag_); + /*<>*/ return store_char(width - 2 | 0, ib, _ah_); } /*<>*/ /*<>*/ var switcher = c0 - 92 | 0; @@ -28022,34 +28009,34 @@ function(param){ /*<>*/ var /*<>*/ c = next_char(ib), - /*<>*/ _ah_ = c - 48 | 0; + /*<>*/ _ai_ = c - 48 | 0; a: { - if(22 < _ah_ >>> 0){ - if(5 < _ah_ - 49 >>> 0) break a; + if(22 < _ai_ >>> 0){ + if(5 < _ai_ - 49 >>> 0) break a; } - else if(6 >= _ah_ - 10 >>> 0) break a; + else if(6 >= _ai_ - 10 >>> 0) break a; /*<>*/ return c; } /*<>*/ return bad_input_escape(c); /*<>*/ }, /*<>*/ c1 = get_digit(0), /*<>*/ c2 = get_digit(0), - /*<>*/ _ad_ = hexadecimal_value_of_char(c2), - c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ad_ | 0; + /*<>*/ _ae_ = hexadecimal_value_of_char(c2), + c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ae_ | 0; b: { if(0 <= c$0 && 255 >= c$0){ - var _af_ = /*<>*/ caml_call1(Stdlib[29], c$0); + var _ag_ = /*<>*/ caml_call1(Stdlib[29], c$0); break b; } var - _af_ = + _ag_ = bad_input ( /*<>*/ caml_call3 (Stdlib_Printf[4], _m_, c1, c2)); } - /*<>*/ return store_char(width - 2 | 0, ib, _af_); + /*<>*/ return store_char(width - 2 | 0, ib, _ag_); case 0: case 6: case 18: @@ -28065,17 +28052,17 @@ if(117 > c0) switch(c0 - 110 | 0){ case 0: - var _ae_ = 10; break b; + var _af_ = 10; break b; case 4: - var _ae_ = 13; break b; + var _af_ = 13; break b; case 6: - var _ae_ = 9; break b; + var _af_ = 9; break b; } } - else if(98 === c0){var _ae_ = 8; break b;} - var _ae_ = c0; + else if(98 === c0){var _af_ = 8; break b;} + var _af_ = c0; } - /*<>*/ return store_char(width, ib, _ae_); + /*<>*/ return store_char(width, ib, _af_); } /*<>*/ return bad_input_escape(c0); /*<>*/ } @@ -28093,24 +28080,24 @@ check_next_char_for_string(width$1, ib); if(10 === match){ /*<>*/ /*<>*/ var - _ab_ = ignore_char(width$1, ib); + _ac_ = ignore_char(width$1, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ab_]); + (skip_spaces, [0, _ac_]); var counter$0 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$0, _ab_); + /*<>*/ return skip_spaces(counter$0, _ac_); } if(13 === match){ /*<>*/ /*<>*/ var width$3 = ignore_char(width$1, ib); if(10 === check_next_char_for_string(width$3, ib)){ /*<>*/ /*<>*/ var - _ac_ = ignore_char(width$3, ib); + _ad_ = ignore_char(width$3, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ac_]); + (skip_spaces, [0, _ad_]); var counter$1 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$1, _ac_); + /*<>*/ return skip_spaces(counter$1, _ad_); } /*<>*/ var /*<>*/ width$5 = store_char(width$3, ib, 13), @@ -28157,39 +28144,39 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - _Z_ = 0 < i$0 ? 1 : 0; - if(_Z_){ + ___ = 0 < i$0 ? 1 : 0; + if(___){ /*<>*/ /*<>*/ var - ___ = 1 - ib[1]; - if(___) + _$_ = 1 - ib[1]; + if(_$_) /*<>*/ var - /*<>*/ _$_ = + /*<>*/ _aa_ = /*<>*/ caml_call2 (CamlinternalFormat[1], char_set, c), - /*<>*/ _aa_ = _$_ ? c !== stp ? 1 : 0 : _$_; + /*<>*/ _ab_ = _aa_ ? c !== stp ? 1 : 0 : _aa_; else - var _aa_ = ___; + var _ab_ = _$_; } else - var _aa_ = _Z_; - if(! _aa_) return _aa_; + var _ab_ = ___; + if(! _ab_) return _ab_; /*<>*/ store_char(Stdlib[19], ib, c); var i$1 = i$0 - 1 | 0, i$0 = i$1; } /*<>*/ } if(! scan_indic){ /*<>*/ scan_chars(width, -1); - /*<>*/ return sentinal; + /*<>*/ return _u_; } var c = scan_indic[1]; /*<>*/ scan_chars(width, c); - /*<>*/ /*<>*/ var _Y_ = 1 - ib[1]; - if(! _Y_) /*<>*/ return _Y_; + /*<>*/ /*<>*/ var _Z_ = 1 - ib[1]; + if(! _Z_) /*<>*/ return _Z_; /*<>*/ /*<>*/ var ci = peek_char(ib); return c === ci - ? (invalidate_current_char(ib), sentinal) - : (character_mismatch(c, ci), sentinal); + ? (invalidate_current_char(ib), _u_) + : (character_mismatch(c, ci), _u_); /*<>*/ } function scanf_bad_input(ib, x){ /*<>*/ if(x[1] === Scan_failure) @@ -28266,17 +28253,17 @@ /*<>*/ var rest$13 = fmt$0[3], fmtty = fmt$0[2], - /*<>*/ _V_ = + /*<>*/ _W_ = /*<>*/ caml_call1(CamlinternalFormat[21], fmtty), - /*<>*/ _W_ = + /*<>*/ _X_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _V_); + (CamlinternalFormatBasics[2], _W_); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (take_fmtty_format_readers$0, [0, k, _W_, rest$13]); + (take_fmtty_format_readers$0, [0, k, _X_, rest$13]); var counter$0 = counter + 1 | 0; /*<>*/ return take_fmtty_format_readers$0 - (counter$0, k, _W_, rest$13); + (counter$0, k, _X_, rest$13); case 15: var rest$14 = fmt$0[1], fmt$0 = rest$14; break; case 16: @@ -28284,11 +28271,11 @@ case 17: var rest$16 = fmt$0[2], fmt$0 = rest$16; break; case 18: - var _X_ = fmt$0[1]; - if(0 === _X_[0]) + var _Y_ = fmt$0[1]; + if(0 === _Y_[0]) /*<>*/ var rest$17 = fmt$0[2], - fmt$1 = _X_[1][1], + fmt$1 = _Y_[1][1], /*<>*/ fmt$2 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$1, rest$17), @@ -28296,7 +28283,7 @@ else /*<>*/ var rest$18 = fmt$0[2], - fmt$3 = _X_[1][1], + fmt$3 = _Y_[1][1], /*<>*/ fmt$4 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$3, rest$18), @@ -28406,11 +28393,11 @@ rest = fmtty$0[3], ty2 = fmtty$0[2], ty1 = fmtty$0[1], - /*<>*/ _U_ = + /*<>*/ _V_ = /*<>*/ caml_call1(CamlinternalFormat[21], ty1), /*<>*/ ty = /*<>*/ caml_call2 - (CamlinternalFormat[22], _U_, ty2), + (CamlinternalFormat[22], _V_, ty2), /*<>*/ fmtty$10 = /*<>*/ caml_call2 (CamlinternalFormatBasics[1], ty, rest), @@ -28515,8 +28502,8 @@ /*<>*/ /*<>*/ var c = check_next_char_for_char(width, ib); return 39 === c - ? (ignore_char(width, ib), sentinal) - : (character_mismatch(39, c), sentinal); + ? (ignore_char(width, ib), _u_) + : (character_mismatch(39, c), _u_); /*<>*/ }, /*<>*/ c = checked_peek_char(ib); if(39 === c){ @@ -28557,11 +28544,11 @@ /*<>*/ return pad_prec_scanf (ib, str_rest, readers, pad, 0, scan$0, token_string); case 18: - var _G_ = match[1]; - if(0 === _G_[0]){ + var _H_ = match[1]; + if(0 === _H_[0]){ /*<>*/ var rest$3 = match[2], - fmt$1 = _G_[1][1], + fmt$1 = _H_[1][1], /*<>*/ scan$1 = function(width, param, ib){ /*<>*/ return scan_string(_q_, width, ib); @@ -28578,7 +28565,7 @@ } /*<>*/ var rest$4 = match[2], - fmt$2 = _G_[1][1], + fmt$2 = _H_[1][1], /*<>*/ scan$2 = function(width, param, ib){ /*<>*/ return scan_string(_r_, width, ib); @@ -28755,7 +28742,7 @@ rest$13 = fmt$0[2], pad$8 = fmt$0[1], /*<>*/ scan$8 = - function(param, _T_, ib){ + function(param, _U_, ib){ /*<>*/ var /*<>*/ c = checked_peek_char(ib), /*<>*/ m = @@ -28781,10 +28768,10 @@ /*<>*/ var rest$15 = fmt$0[2], str$0 = fmt$0[1], - /*<>*/ _H_ = - function(_S_){ /*<>*/ return check_char(ib, _S_);}; + /*<>*/ _I_ = + function(_T_){ /*<>*/ return check_char(ib, _T_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _H_, str$0); + (Stdlib_String[29], _I_, str$0); var fmt$0 = rest$15; break; case 12: @@ -28800,10 +28787,10 @@ s = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _I_ = + /*<>*/ _J_ = /*<>*/ caml_call2 (CamlinternalFormat[14], s, fmtty), - fmt$3 = _I_; + fmt$3 = _J_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -28829,23 +28816,23 @@ /*<>*/ caml_call2 (CamlinternalFormat[13], 0, s$0) [1], - /*<>*/ _K_ = + /*<>*/ _L_ = /*<>*/ caml_call1 (CamlinternalFormat[21], fmtty$0), - /*<>*/ _L_ = + /*<>*/ _M_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _K_), + (CamlinternalFormatBasics[2], _L_), /*<>*/ fmt$8 = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$7, _L_), - /*<>*/ _M_ = + (CamlinternalFormat[12], fmt$7, _M_), + /*<>*/ _N_ = /*<>*/ caml_call1 (CamlinternalFormatBasics[2], fmtty$0), - /*<>*/ _N_ = + /*<>*/ _O_ = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$6, _M_), + (CamlinternalFormat[12], fmt$6, _N_), fmt$5 = fmt$8, - fmt$4 = _N_; + fmt$4 = _O_; } catch(exn){ var exn$0 = caml_wrap_exception(exn); @@ -28853,9 +28840,9 @@ throw caml_maybe_attach_backtrace(exn$0, 0); var msg$0 = exn$0[2], - _J_ = bad_input(msg$0), - fmt$5 = _J_[2], - fmt$4 = _J_[1]; + _K_ = bad_input(msg$0), + fmt$5 = _K_[2], + fmt$4 = _K_[1]; } /*<>*/ return [0, [0, fmt$4, s$0], @@ -28874,19 +28861,19 @@ /*<>*/ var rest$19 = fmt$0[2], formatting_lit = fmt$0[1], - /*<>*/ _O_ = + /*<>*/ _P_ = /*<>*/ caml_call1 (CamlinternalFormat[17], formatting_lit), - /*<>*/ _P_ = - function(_R_){ /*<>*/ return check_char(ib, _R_);}; + /*<>*/ _Q_ = + function(_S_){ /*<>*/ return check_char(ib, _S_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _P_, _O_); + (Stdlib_String[29], _Q_, _P_); var fmt$0 = rest$19; break; case 18: - var _Q_ = fmt$0[1]; - if(0 === _Q_[0]){ - var rest$20 = fmt$0[2], fmt$9 = _Q_[1][1]; + var _R_ = fmt$0[1]; + if(0 === _R_[0]){ + var rest$20 = fmt$0[2], fmt$9 = _R_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 123); /*<>*/ var @@ -28896,7 +28883,7 @@ fmt$0 = fmt$10; } else{ - var rest$21 = fmt$0[2], fmt$11 = _Q_[1][1]; + var rest$21 = fmt$0[2], fmt$11 = _R_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 91); /*<>*/ var @@ -29005,16 +28992,16 @@ if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); /*<>*/ var msg = exc[2], - /*<>*/ _C_ = - /*<>*/ caml_call1(Stdlib_String[24], str), /*<>*/ _D_ = - /*<>*/ caml_call2(Stdlib[28], _C_, cst$0), - /*<>*/ _E_ = - /*<>*/ caml_call2(Stdlib[28], cst_in_format, _D_), - /*<>*/ _F_ = - /*<>*/ caml_call2(Stdlib[28], msg, _E_); + /*<>*/ caml_call1(Stdlib_String[24], str), + /*<>*/ _E_ = + /*<>*/ caml_call2(Stdlib[28], _D_, cst$0), + /*<>*/ _F_ = + /*<>*/ caml_call2(Stdlib[28], cst_in_format, _E_), + /*<>*/ _G_ = + /*<>*/ caml_call2(Stdlib[28], msg, _F_); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], _F_); + (Stdlib[1], _G_); } /*<>*/ return /*<>*/ caml_call2 (ef, ib, exc); @@ -29045,15 +29032,15 @@ fmt); /*<>*/ } function kscanf_opt(ib, fmt){ - function _A_(x){ + function _B_(x){ /*<>*/ return [0, x]; /*<>*/ } /*<>*/ return kscanf_gen (ib, - function(param, _B_){ + function(param, _C_){ /*<>*/ return 0; /*<>*/ }, - _A_, + _B_, fmt); /*<>*/ } function bscanf(ib, fmt){ @@ -29084,10 +29071,10 @@ str = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _z_ = + /*<>*/ _A_ = /*<>*/ caml_call2 (CamlinternalFormat[15], str, format), - fmt = _z_; + fmt = _A_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -29101,30 +29088,30 @@ /*<>*/ return bscanf_format(from_string(s), format, f); /*<>*/ } function format_from_string(s, fmt){ - /*<>*/ function _w_(x){ + /*<>*/ function _x_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ var - /*<>*/ _x_ = - /*<>*/ caml_call1(Stdlib_String[24], s), /*<>*/ _y_ = - /*<>*/ caml_call2(Stdlib[28], _x_, cst$1); + /*<>*/ caml_call1(Stdlib_String[24], s), + /*<>*/ _z_ = + /*<>*/ caml_call2(Stdlib[28], _y_, cst$1); /*<>*/ return sscanf_format - ( /*<>*/ caml_call2(Stdlib[28], cst$2, _y_), + ( /*<>*/ caml_call2(Stdlib[28], cst$2, _z_), fmt, - _w_); + _x_); /*<>*/ } function unescaped(s){ - /*<>*/ function _u_(x){ + /*<>*/ function _v_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ /*<>*/ var - _v_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); + _w_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); /*<>*/ return /*<>*/ caml_call1 (sscanf - ( /*<>*/ caml_call2(Stdlib[28], cst$4, _v_), + ( /*<>*/ caml_call2(Stdlib[28], cst$4, _w_), _t_), - _u_); + _v_); /*<>*/ } var Stdlib_Scanf = @@ -30489,7 +30476,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - sentinal = undefined, + _d_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_List = global_data.Stdlib__List, Stdlib = global_data.Stdlib, @@ -30508,7 +30495,7 @@ /*<>*/ /*<>*/ var prng = [246, - function(_aM_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; + function(_aN_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; function create(opt, initial_size){ /*<>*/ if(opt) var sth = opt[1], random = sth; @@ -30519,17 +30506,17 @@ /*<>*/ for(;;){ if(initial_size > x && Stdlib_Sys[13] >= (x * 2 | 0)){var x$0 = x * 2 | 0, x = x$0; continue;} /*<>*/ if(random){ - var _aK_ = runtime.caml_obj_tag(prng); + var _aL_ = runtime.caml_obj_tag(prng); a: - if(250 === _aK_) - var _aL_ = prng[1]; + if(250 === _aL_) + var _aM_ = prng[1]; else{ - if(246 !== _aK_ && 244 !== _aK_){var _aL_ = prng; break a;} - var _aL_ = caml_call1(CamlinternalLazy[2], prng); + if(246 !== _aL_ && 244 !== _aL_){var _aM_ = prng; break a;} + var _aM_ = caml_call1(CamlinternalLazy[2], prng); } var seed = - /*<>*/ caml_call1(Stdlib_Random[15][4], _aL_); + /*<>*/ caml_call1(Stdlib_Random[15][4], _aM_); } else var seed = 0; @@ -30544,16 +30531,16 @@ /*<>*/ h[1] = 0; /*<>*/ var len = h[2].length - 1, - /*<>*/ _aI_ = len - 1 | 0, - _aH_ = 0; - if(_aI_ >= 0){ - var i = _aH_; + /*<>*/ _aJ_ = len - 1 | 0, + _aI_ = 0; + if(_aJ_ >= 0){ + var i = _aI_; for(;;){ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var - _aJ_ = i + 1 | 0; - if(_aI_ === i) break; - var i = _aJ_; + _aK_ = i + 1 | 0; + if(_aJ_ === i) break; + var i = _aK_; } } return 0; @@ -30570,11 +30557,11 @@ /*<>*/ } function copy(h){ /*<>*/ var - _aE_ = h[4], - _aF_ = h[3], - /*<>*/ _aG_ = + _aF_ = h[4], + _aG_ = h[3], + /*<>*/ _aH_ = /*<>*/ caml_call1(Stdlib_Array[6], h[2]); - /*<>*/ return [0, h[1], _aG_, _aF_, _aE_]; + /*<>*/ return [0, h[1], _aH_, _aG_, _aF_]; /*<>*/ } function key_index(h, hkey){ /*<>*/ return hkey & (h[2].length - 1 - 1 | 0); @@ -30594,16 +30581,16 @@ var param$0 = rest; } /*<>*/ } - var d = h[2], _aC_ = d.length - 1 - 1 | 0, _aB_ = 0; - if(_aC_ >= 0){ - var i = _aB_; + var d = h[2], _aD_ = d.length - 1 - 1 | 0, _aC_ = 0; + if(_aD_ >= 0){ + var i = _aC_; for(;;){ /*<>*/ d[1 + i] = do_bucket(caml_check_bound(d, i)[1 + i]); /*<>*/ /*<>*/ var - _aD_ = i + 1 | 0; - if(_aC_ === i) break; - var i = _aD_; + _aE_ = i + 1 | 0; + if(_aD_ === i) break; + var i = _aE_; } } return 0; @@ -30615,9 +30602,9 @@ nsize = osize * 2 | 0; /*<>*/ clean(h); var - _av_ = nsize < Stdlib_Sys[13] ? 1 : 0, - _aw_ = _av_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _av_; - if(_aw_){ + _aw_ = nsize < Stdlib_Sys[13] ? 1 : 0, + _ax_ = _aw_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _aw_; + if(_ax_){ /*<>*/ /*<>*/ var ndata = /*<>*/ caml_make_vect(nsize, 0); h[2] = ndata; @@ -30625,33 +30612,33 @@ insert_bucket = function(param){ /*<>*/ if(! param) - /*<>*/ return sentinal; + /*<>*/ return _d_; var rest = param[3], data = param[2], hkey = param[1]; /*<>*/ insert_bucket(rest); /*<>*/ /*<>*/ var nidx = key_index(h, hkey); /*<>*/ ndata[1 + nidx] = [0, hkey, data, caml_check_bound(ndata, nidx)[1 + nidx]]; - /*<>*/ return sentinal; + /*<>*/ return _d_; /*<>*/ }, - /*<>*/ _ay_ = osize - 1 | 0, - /*<>*/ _ax_ = 0; - if(_ay_ >= 0){ - var i = _ax_; + /*<>*/ _az_ = osize - 1 | 0, + /*<>*/ _ay_ = 0; + if(_az_ >= 0){ + var i = _ay_; for(;;){ /*<>*/ insert_bucket (caml_check_bound(odata, i)[1 + i]); /*<>*/ /*<>*/ var - _aA_ = i + 1 | 0; - if(_ay_ === i) break; - var i = _aA_; + _aB_ = i + 1 | 0; + if(_az_ === i) break; + var i = _aB_; } } - var _az_ = 0; + var _aA_ = 0; } else - var _az_ = _aw_; - return _az_; + var _aA_ = _ax_; + return _aA_; /*<>*/ } function add(h, key, info){ /*<>*/ var @@ -30664,8 +30651,8 @@ [0, hkey, container, caml_check_bound(h[2], i)[1 + i]]; /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; h[1] = h[1] + 1 | 0; - var _au_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _au_ ? resize(h) : _au_; + var _av_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _av_ ? resize(h) : _av_; /*<>*/ } function remove(h, key){ /*<>*/ /*<>*/ var @@ -30693,17 +30680,17 @@ /*<>*/ } /*<>*/ var /*<>*/ i = key_index(h, hkey), - /*<>*/ _at_ = + /*<>*/ _au_ = remove_bucket(caml_check_bound(h[2], i)[1 + i]); - /*<>*/ caml_check_bound(h[2], i)[1 + i] = _at_; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = _au_; /*<>*/ return 0; /*<>*/ } function find(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _as_ = key_index(h, hkey), - param = caml_check_bound(h[2], _as_)[1 + _as_]; + /*<>*/ _at_ = key_index(h, hkey), + param = caml_check_bound(h[2], _at_)[1 + _at_]; for(;;){ if(! param) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -30729,8 +30716,8 @@ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _ar_ = key_index(h, hkey), - param = caml_check_bound(h[2], _ar_)[1 + _ar_]; + /*<>*/ _as_ = key_index(h, hkey), + param = caml_check_bound(h[2], _as_)[1 + _as_]; for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -30778,9 +30765,9 @@ } /*<>*/ } /*<>*/ /*<>*/ var - _aq_ = key_index(h, hkey); + _ar_ = key_index(h, hkey); /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _aq_)[1 + _aq_]); + (caml_check_bound(h[2], _ar_)[1 + _ar_]); /*<>*/ } function replace(h, key, info){ /*<>*/ var @@ -30798,8 +30785,8 @@ if(hkey === hk){ if(! /*<>*/ caml_call2(H[3], c, key)){ /*<>*/ /*<>*/ var - _am_ = /*<>*/ caml_call3(H[5], c, key, info); - /*<>*/ return _am_; + _an_ = /*<>*/ caml_call3(H[5], c, key, info); + /*<>*/ return _an_; } var param = next; } @@ -30807,23 +30794,23 @@ var next$0 = param[3], param = next$0; } } - catch(_ap_){ - var _an_ = caml_wrap_exception(_ap_); - if(_an_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_an_, 0); + catch(_aq_){ + var _ao_ = caml_wrap_exception(_aq_); + if(_ao_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ao_, 0); /*<>*/ /*<>*/ var container = /*<>*/ caml_call2(H[1], key, info); /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, hkey, container, l]; h[1] = h[1] + 1 | 0; - var _ao_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _ao_ ? resize(h) : _ao_; + var _ap_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _ap_ ? resize(h) : _ap_; } /*<>*/ } function mem(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _al_ = key_index(h, hkey), - param = caml_check_bound(h[2], _al_)[1 + _al_]; + /*<>*/ _am_ = key_index(h, hkey), + param = caml_check_bound(h[2], _am_)[1 + _am_]; /*<>*/ for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -30851,21 +30838,21 @@ } } function stats(h){ - /*<>*/ var _af_ = h[2], _ag_ = 0; - function _ah_(m, b){ + /*<>*/ var _ag_ = h[2], _ah_ = 0; + function _ai_(m, b){ /*<>*/ /*<>*/ var - _ak_ = bucket_length(0, b); + _al_ = bucket_length(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _ak_); + (Stdlib_Int[11], m, _al_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ah_, _ag_, _af_), + (Stdlib_Array[15], _ai_, _ah_, _ag_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ai_ = h[2]; - function _aj_(b){ + /*<>*/ _aj_ = h[2]; + function _ak_(b){ /*<>*/ /*<>*/ var l = bucket_length(0, b); /*<>*/ histo[1 + l] = @@ -30873,7 +30860,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _aj_, _ai_); + (Stdlib_Array[11], _ak_, _aj_); /*<>*/ return [0, h[1], h[2].length - 1, mbl, histo]; /*<>*/ } function bucket_length_alive(accu, param){ @@ -30891,22 +30878,22 @@ function stats_alive(h){ /*<>*/ var /*<>*/ size = [0, 0], - /*<>*/ _$_ = h[2], - _aa_ = 0; - function _ab_(m, b){ + /*<>*/ _aa_ = h[2], + _ab_ = 0; + function _ac_(m, b){ /*<>*/ /*<>*/ var - _ae_ = bucket_length_alive(0, b); + _af_ = bucket_length_alive(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _ae_); + (Stdlib_Int[11], m, _af_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ab_, _aa_, _$_), + (Stdlib_Array[15], _ac_, _ab_, _aa_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ac_ = h[2]; - function _ad_(b){ + /*<>*/ _ad_ = h[2]; + function _ae_(b){ /*<>*/ /*<>*/ var l = bucket_length_alive(0, b); size[1] = size[1] + l | 0; @@ -30915,7 +30902,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _ad_, _ac_); + (Stdlib_Array[11], _ae_, _ad_); /*<>*/ return [0, size[1], h[2].length - 1, @@ -30923,20 +30910,20 @@ histo]; /*<>*/ } function add_seq(tbl, i){ - function ___(param){ + function _$_(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return add(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], ___, i); + (Stdlib_Seq[4], _$_, i); /*<>*/ } function replace_seq(tbl, i){ - function _Z_(param){ + function ___(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return replace(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _Z_, i); + (Stdlib_Seq[4], ___, i); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -30975,7 +30962,7 @@ function set_key(t, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ return sentinal; + /*<>*/ return _d_; /*<>*/ } function check_key(t){ /*<>*/ return /*<>*/ caml_call2 @@ -31061,10 +31048,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _Y_ = include[1]; + _Z_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_Y_, _a_, sz); + (_Z_, _a_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31097,8 +31084,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add(b, k, d){ - /*<>*/ var _X_ = b[1]; - b[1] = [0, make(k, d), _X_]; + /*<>*/ var _Y_ = b[1]; + b[1] = [0, make(k, d), _Y_]; return 0; /*<>*/ } function test_key(k, e){ @@ -31127,13 +31114,13 @@ } /*<>*/ } function find(b, k){ - /*<>*/ var _U_ = b[1]; - /*<>*/ function _V_(_W_){ - /*<>*/ return test_key(k, _W_); + /*<>*/ var _V_ = b[1]; + /*<>*/ function _W_(_X_){ + /*<>*/ return test_key(k, _X_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _V_, _U_); + /*<>*/ caml_call2(Stdlib_List[39], _W_, _V_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data(e); @@ -31156,7 +31143,7 @@ function set_key1(t, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ return sentinal; + /*<>*/ return _d_; /*<>*/ } function get_key2(t){ /*<>*/ return /*<>*/ caml_call2 @@ -31165,7 +31152,7 @@ function set_key2(t, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, 1, k); - /*<>*/ return sentinal; + /*<>*/ return _d_; /*<>*/ } function get_data$0(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31210,11 +31197,11 @@ /*<>*/ var k2 = param[2], k1 = param[1], - /*<>*/ _T_ = + /*<>*/ _U_ = /*<>*/ caml_call2(H2[2], seed, k2) * 65599 | 0; /*<>*/ return /*<>*/ caml_call2 (H1[2], seed, k1) - + _T_ + + _U_ | 0; } function equal(c, param){ @@ -31243,11 +31230,11 @@ } function check_key(c){ /*<>*/ /*<>*/ var - _S_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); - /*<>*/ return _S_ + _T_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); + /*<>*/ return _T_ ? /*<>*/ caml_call2 (Stdlib_Obj[24][7], c, 1) - : _S_; + : _T_; /*<>*/ } /*<>*/ return MakeSeeded ([0, @@ -31266,13 +31253,13 @@ /*<>*/ } /*<>*/ var equal$0 = H1[1], - /*<>*/ _Q_ = [0, equal, seeded_hash]; + /*<>*/ _R_ = [0, equal, seeded_hash]; function seeded_hash$0(seed, x){ /*<>*/ return /*<>*/ caml_call1 (H1[2], x); /*<>*/ } var - include = MakeSeeded$1([0, equal$0, seeded_hash$0], _Q_), + include = MakeSeeded$1([0, equal$0, seeded_hash$0], _R_), clear = include[2], reset = include[3], copy = include[4], @@ -31289,10 +31276,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _R_ = include[1]; + _S_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_R_, _b_, sz); + (_S_, _b_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31325,8 +31312,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$0(b, k1, k2, d){ - /*<>*/ var _P_ = b[1]; - b[1] = [0, make$1(k1, k2, d), _P_]; + /*<>*/ var _Q_ = b[1]; + b[1] = [0, make$1(k1, k2, d), _Q_]; return 0; /*<>*/ } function test_keys(k1, k2, e){ @@ -31356,13 +31343,13 @@ } /*<>*/ } function find$0(b, k1, k2){ - /*<>*/ var _M_ = b[1]; - /*<>*/ function _N_(_O_){ - /*<>*/ return test_keys(k1, k2, _O_); + /*<>*/ var _N_ = b[1]; + /*<>*/ function _O_(_P_){ + /*<>*/ return test_keys(k1, k2, _P_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _N_, _M_); + /*<>*/ caml_call2(Stdlib_List[39], _O_, _N_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$0(e); @@ -31389,7 +31376,7 @@ function set_key$0(t, n, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, n, k); - /*<>*/ return sentinal; + /*<>*/ return _d_; /*<>*/ } function get_data$1(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31405,17 +31392,17 @@ /*<>*/ eph = create$1(l); /*<>*/ set_data$1(eph, data); /*<>*/ var - _K_ = l - 1 | 0, - /*<>*/ _J_ = 0; - if(_K_ >= 0){ - var i = _J_; + _L_ = l - 1 | 0, + /*<>*/ _K_ = 0; + if(_L_ >= 0){ + var i = _K_; for(;;){ /*<>*/ set_key$0 (eph, i, caml_check_bound(keys, i)[1 + i]); /*<>*/ /*<>*/ var - _L_ = i + 1 | 0; - if(_K_ === i) break; - var i = _L_; + _M_ = i + 1 | 0; + if(_L_ === i) break; + var i = _M_; } } /*<>*/ return eph; @@ -31428,10 +31415,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - /*<>*/ _F_ = l - 1 | 0, - /*<>*/ _E_ = 0; - if(_F_ >= 0){ - var i = _E_; + /*<>*/ _G_ = l - 1 | 0, + /*<>*/ _F_ = 0; + if(_G_ >= 0){ + var i = _F_; for(;;){ /*<>*/ /*<>*/ var match = get_key$0(eph, i); @@ -31443,19 +31430,19 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ /*<>*/ var - _H_ = i + 1 | 0; - if(_F_ === i) break; - var i = _H_; + _I_ = i + 1 | 0; + if(_G_ === i) break; + var i = _I_; } } /*<>*/ /*<>*/ var - _G_ = get_data$1(eph); - /*<>*/ return _G_; + _H_ = get_data$1(eph); + /*<>*/ return _H_; } - catch(_I_){ - var _D_ = caml_wrap_exception(_I_); - if(_D_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_D_, 0); + catch(_J_){ + var _E_ = caml_wrap_exception(_J_); + if(_E_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_E_, 0); } /*<>*/ } function MakeSeeded$2(H){ @@ -31464,17 +31451,17 @@ c = create$1(k.length - 1); /*<>*/ set_data$1(c, d); /*<>*/ var - _B_ = k.length - 1 - 1 | 0, - /*<>*/ _A_ = 0; - if(_B_ >= 0){ - var i = _A_; + _C_ = k.length - 1 - 1 | 0, + /*<>*/ _B_ = 0; + if(_C_ >= 0){ + var i = _B_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _C_ = i + 1 | 0; - if(_B_ === i) break; - var i = _C_; + _D_ = i + 1 | 0; + if(_C_ === i) break; + var i = _D_; } } /*<>*/ return c; @@ -31482,22 +31469,22 @@ function seeded_hash(seed, k){ /*<>*/ var /*<>*/ h = [0, 0], - _w_ = k.length - 1 - 1 | 0, - /*<>*/ _v_ = 0; - if(_w_ >= 0){ - var i = _v_; + _x_ = k.length - 1 - 1 | 0, + /*<>*/ _w_ = 0; + if(_x_ >= 0){ + var i = _w_; for(;;){ /*<>*/ var - _x_ = h[1], - /*<>*/ _y_ = caml_check_bound(k, i)[1 + i]; + _y_ = h[1], + /*<>*/ _z_ = caml_check_bound(k, i)[1 + i]; h[1] = - ( /*<>*/ caml_call2(H[2], seed, _y_) * 65599 | 0) - + _x_ + ( /*<>*/ caml_call2(H[2], seed, _z_) * 65599 | 0) + + _y_ | 0; /*<>*/ /*<>*/ var - _z_ = i + 1 | 0; - if(_w_ === i) break; - var i = _z_; + _A_ = i + 1 | 0; + if(_x_ === i) break; + var i = _A_; } } return h[1]; @@ -31517,9 +31504,9 @@ if(! match) /*<>*/ return 2; /*<>*/ var ki = match[1], - /*<>*/ _u_ = caml_check_bound(k, i)[1 + i]; + /*<>*/ _v_ = caml_check_bound(k, i)[1 + i]; /*<>*/ if - (! /*<>*/ caml_call2(H[1], _u_, ki)) + (! /*<>*/ caml_call2(H[1], _v_, ki)) /*<>*/ return 1; /*<>*/ var /*<>*/ i$0 = i - 1 | 0, @@ -31530,17 +31517,17 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Obj[24][12], c); /*<>*/ var - _s_ = k.length - 1 - 1 | 0, - /*<>*/ _r_ = 0; - if(_s_ >= 0){ - var i = _r_; + _t_ = k.length - 1 - 1 | 0, + /*<>*/ _s_ = 0; + if(_t_ >= 0){ + var i = _s_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _t_ = i + 1 | 0; - if(_s_ === i) break; - var i = _t_; + _u_ = i + 1 | 0; + if(_t_ === i) break; + var i = _u_; } } /*<>*/ return set_data$1(c, d); @@ -31550,19 +31537,19 @@ /*<>*/ i$1 = length$1(c) - 1 | 0, i = i$1; /*<>*/ for(;;){ - var _p_ = i < 0 ? 1 : 0; - if(_p_) - var _q_ = _p_; + var _q_ = i < 0 ? 1 : 0; + if(_q_) + var _r_ = _q_; else{ /*<>*/ /*<>*/ var - _o_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); - /*<>*/ if(_o_){ + _p_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); + /*<>*/ if(_p_){ var i$0 = i - 1 | 0, i = i$0; continue; } - var _q_ = _o_; + var _r_ = _p_; } - return _q_; + return _r_; } /*<>*/ } /*<>*/ return MakeSeeded @@ -31598,10 +31585,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _n_ = include[1]; + _o_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_n_, _c_, sz); + (_o_, _c_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31634,8 +31621,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$1(b, k, d){ - /*<>*/ var _m_ = b[1]; - b[1] = [0, make$3(k, d), _m_]; + /*<>*/ var _n_ = b[1]; + b[1] = [0, make$3(k, d), _n_]; return 0; /*<>*/ } function test_keys$0(k, e){ @@ -31644,10 +31631,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - _i_ = k.length - 1 - 1 | 0, - /*<>*/ _h_ = 0; - if(_i_ >= 0){ - var i = _h_; + _j_ = k.length - 1 - 1 | 0, + /*<>*/ _i_ = 0; + if(_j_ >= 0){ + var i = _i_; for(;;){ /*<>*/ /*<>*/ var match = get_key$0(e, i); @@ -31655,9 +31642,9 @@ var x = match[1]; if(x === caml_check_bound(k, i)[1 + i]){ /*<>*/ /*<>*/ var - _k_ = i + 1 | 0; - if(_i_ === i) break; - var i = _k_; + _l_ = i + 1 | 0; + if(_j_ === i) break; + var i = _l_; continue; } } @@ -31665,13 +31652,13 @@ (Stdlib[3], 1); } } - /*<>*/ /*<>*/ var _j_ = 1; - /*<>*/ return _j_; + /*<>*/ /*<>*/ var _k_ = 1; + /*<>*/ return _k_; } - catch(_l_){ - var _g_ = caml_wrap_exception(_l_); - if(_g_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_g_, 0); + catch(_m_){ + var _h_ = caml_wrap_exception(_m_); + if(_h_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_h_, 0); } /*<>*/ } function remove$1(b, k){ @@ -31691,13 +31678,13 @@ } /*<>*/ } function find$1(b, k){ - /*<>*/ var _d_ = b[1]; - /*<>*/ function _e_(_f_){ - /*<>*/ return test_keys$0(k, _f_); + /*<>*/ var _e_ = b[1]; + /*<>*/ function _f_(_g_){ + /*<>*/ return test_keys$0(k, _g_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _e_, _d_); + /*<>*/ caml_call2(Stdlib_List[39], _f_, _e_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$1(e); @@ -31784,7 +31771,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - sentinal = undefined, + _l_ = undefined, global_data = runtime.caml_get_global_data(), cst$18 = cst$19, cst$17 = cst$19, @@ -31920,39 +31907,39 @@ /*<>*/ } function is_relative(n){ /*<>*/ var - _aH_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _aI_ = - _aH_ + _aI_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _aJ_ = + _aI_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - return _aI_; + return _aJ_; /*<>*/ } function is_implicit(n){ /*<>*/ /*<>*/ var - _aC_ = is_relative(n); - /*<>*/ if(_aC_){ + _aD_ = is_relative(n); + /*<>*/ if(_aD_){ var - _aD_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aE_ = - _aD_ + _aE_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aF_ = + _aE_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_aE_) + /*<>*/ if(_aF_) var - _aF_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aG_ = - _aF_ + _aG_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aH_ = + _aG_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 3), cst$28); else - var _aG_ = _aE_; + var _aH_ = _aF_; } else - var _aG_ = _aC_; - /*<>*/ return _aG_; + var _aH_ = _aD_; + /*<>*/ return _aH_; /*<>*/ } function check_suffix(name, suff){ /*<>*/ return /*<>*/ caml_call2 @@ -31980,8 +31967,8 @@ /*<>*/ caml_sys_getenv("TMPDIR"), temp_dir_name = _k_; } - catch(_aB_){ - var _a_ = caml_wrap_exception(_aB_); + catch(_aC_){ + var _a_ = caml_wrap_exception(_aC_); if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); var temp_dir_name = cst_tmp; } @@ -31993,10 +31980,10 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 39); /*<>*/ var - _ay_ = l - 1 | 0, - /*<>*/ _ax_ = 0; - if(_ay_ >= 0){ - var i = _ax_; + _az_ = l - 1 | 0, + /*<>*/ _ay_ = 0; + if(_az_ >= 0){ + var i = _ay_; for(;;){ /*<>*/ if (39 === /*<>*/ caml_string_get(s, i)) @@ -32004,14 +31991,14 @@ (Stdlib_Buffer[16], b, quotequote); else{ /*<>*/ /*<>*/ var - _aA_ = /*<>*/ caml_string_get(s, i); + _aB_ = /*<>*/ caml_string_get(s, i); /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, _aA_); + (Stdlib_Buffer[12], b, _aB_); } /*<>*/ /*<>*/ var - _az_ = i + 1 | 0; - if(_ay_ === i) break; - var i = _az_; + _aA_ = i + 1 | 0; + if(_az_ === i) break; + var i = _aA_; } } /*<>*/ /*<>*/ caml_call2 @@ -32024,47 +32011,47 @@ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _am_ = cst_2_1; + var _an_ = cst_2_1; else /*<>*/ var - /*<>*/ _aw_ = quote(f), - _am_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _aw_); - var _an_ = _am_; + /*<>*/ _ax_ = quote(f), + _an_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _ax_); + var _ao_ = _an_; } else - var _an_ = cst$4; + var _ao_ = cst$4; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _ao_ = quote(f$0), - _ap_ = /*<>*/ caml_call2(Stdlib[28], cst, _ao_); + /*<>*/ _ap_ = quote(f$0), + _aq_ = /*<>*/ caml_call2(Stdlib[28], cst, _ap_); else - var _ap_ = cst$3; + var _aq_ = cst$3; /*<>*/ /*<>*/ var - _aq_ = /*<>*/ caml_call2(Stdlib[28], _ap_, _an_); + _ar_ = /*<>*/ caml_call2(Stdlib[28], _aq_, _ao_); if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _ar_ = quote(f$1), - _as_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _ar_); + /*<>*/ _as_ = quote(f$1), + _at_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _as_); else - var _as_ = cst$2; + var _at_ = cst$2; /*<>*/ var - /*<>*/ _at_ = - /*<>*/ caml_call2(Stdlib[28], _as_, _aq_), - /*<>*/ _au_ = + /*<>*/ _au_ = + /*<>*/ caml_call2(Stdlib[28], _at_, _ar_), + /*<>*/ _av_ = /*<>*/ caml_call2 (Stdlib_List[19], quote, [0, cmd, args]), - /*<>*/ _av_ = - /*<>*/ caml_call2(Stdlib_String[6], cst$1, _au_); + /*<>*/ _aw_ = + /*<>*/ caml_call2(Stdlib_String[6], cst$1, _av_); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _av_, _at_); + (Stdlib[28], _aw_, _au_); /*<>*/ } - /*<>*/ function basename(_al_){ - /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _al_); + /*<>*/ function basename(_am_){ + /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _am_); } - /*<>*/ function dirname(_ak_){ - /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _ak_); + /*<>*/ function dirname(_al_){ + /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _al_); } /*<>*/ /*<>*/ var Unix = @@ -32087,96 +32074,96 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _ah_ = 47 === c ? 1 : 0; - if(_ah_) - var _ai_ = _ah_; + _ai_ = 47 === c ? 1 : 0; + if(_ai_) + var _aj_ = _ai_; else - var _aj_ = 92 === c ? 1 : 0, _ai_ = _aj_ || (58 === c ? 1 : 0); - return _ai_; + var _ak_ = 92 === c ? 1 : 0, _aj_ = _ak_ || (58 === c ? 1 : 0); + return _aj_; /*<>*/ } function is_relative$0(n){ /*<>*/ var - _ab_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ac_ = - _ab_ + _ac_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ad_ = + _ac_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ac_){ + if(_ad_){ var - _ad_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ae_ = - _ad_ + _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _af_ = + _ae_ || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ae_) + if(_af_) var - _af_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _ag_ = - _af_ + _ag_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _ah_ = + _ag_ || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else - var _ag_ = _ae_; + var _ah_ = _af_; } else - var _ag_ = _ac_; - return _ag_; + var _ah_ = _ad_; + return _ah_; /*<>*/ } function is_implicit$0(n){ /*<>*/ /*<>*/ var - _U_ = is_relative$0(n); - /*<>*/ if(_U_){ + _V_ = is_relative$0(n); + /*<>*/ if(_V_){ var - _V_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _W_ = - _V_ + _W_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _X_ = + _W_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_W_){ + /*<>*/ if(_X_){ var - _X_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _Y_ = - _X_ + _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _Z_ = + _Y_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), ".\\"); - /*<>*/ if(_Y_){ + /*<>*/ if(_Z_){ var - _Z_ = caml_ml_string_length(n) < 3 ? 1 : 0, - ___ = - _Z_ + ___ = caml_ml_string_length(n) < 3 ? 1 : 0, + _$_ = + ___ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), cst$28); - /*<>*/ if(___) + /*<>*/ if(_$_) var - _$_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aa_ = - _$_ + _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _ab_ = + _aa_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), "..\\"); else - var _aa_ = ___; + var _ab_ = _$_; } else - var _aa_ = _Y_; + var _ab_ = _Z_; } else - var _aa_ = _W_; + var _ab_ = _X_; } else - var _aa_ = _U_; - /*<>*/ return _aa_; + var _ab_ = _V_; + /*<>*/ return _ab_; /*<>*/ } function check_suffix$0(name, suff){ /*<>*/ var - _R_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_R_) + _S_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; + if(_S_) /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 @@ -32184,14 +32171,14 @@ name, caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, caml_ml_string_length(suff)), - /*<>*/ _S_ = + /*<>*/ _T_ = /*<>*/ caml_call1(Stdlib_String[26], suff), - _T_ = + _U_ = /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[26], s), _S_); + ( /*<>*/ caml_call1(Stdlib_String[26], s), _T_); else - var _T_ = _R_; - /*<>*/ return _T_; + var _U_ = _S_; + /*<>*/ return _U_; /*<>*/ } function chop_suffix_opt$0(suffix, filename){ /*<>*/ var @@ -32202,11 +32189,11 @@ /*<>*/ r = /*<>*/ caml_call3 (Stdlib_String[15], filename, len_f - len_s | 0, len_s), - /*<>*/ _Q_ = + /*<>*/ _R_ = /*<>*/ caml_call1(Stdlib_String[26], suffix); /*<>*/ return /*<>*/ caml_string_equal ( /*<>*/ caml_call1(Stdlib_String[26], r), - _Q_) + _R_) ? [0, /*<>*/ caml_call3 (Stdlib_String[15], filename, 0, len_f - len_s | 0)] @@ -32218,8 +32205,8 @@ /*<>*/ caml_sys_getenv("TEMP"), temp_dir_name$0 = _j_; } - catch(_P_){ - var _b_ = caml_wrap_exception(_P_); + catch(_Q_){ + var _b_ = caml_wrap_exception(_Q_); if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); var temp_dir_name$0 = cst$5; } @@ -32236,17 +32223,17 @@ if(i$0 === l){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - /*<>*/ return sentinal; + /*<>*/ return _l_; } /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); if(34 === c){ /*<>*/ loop_bs(0, i$0); - /*<>*/ return sentinal; + /*<>*/ return _l_; } if(92 === c){ /*<>*/ loop_bs(0, i$0); - /*<>*/ return sentinal; + /*<>*/ return _l_; } /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, c); @@ -32262,7 +32249,7 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ add_bs(n$0); - /*<>*/ return sentinal; + /*<>*/ return _l_; } /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(s, i$0); @@ -32271,12 +32258,12 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ loop(i$0 + 1 | 0); - /*<>*/ return sentinal; + /*<>*/ return _l_; } if(92 !== match){ /*<>*/ add_bs(n$0); /*<>*/ loop(i$0); - /*<>*/ return sentinal; + /*<>*/ return _l_; } /*<>*/ var /*<>*/ i$1 = i$0 + 1 | 0, @@ -32286,19 +32273,19 @@ } /*<>*/ } function add_bs(n){ - /*<>*/ /*<>*/ var _N_ = 1; + /*<>*/ /*<>*/ var _O_ = 1; if(n >= 1){ - var j = _N_; + var j = _O_; for(;;){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 92); /*<>*/ /*<>*/ var - _O_ = j + 1 | 0; + _P_ = j + 1 | 0; if(n === j) break; - var j = _O_; + var j = _P_; } } - return sentinal; + return _l_; /*<>*/ } /*<>*/ loop(0); /*<>*/ return /*<>*/ caml_call1 @@ -32313,62 +32300,62 @@ (! /*<>*/ caml_call2(Stdlib_String[14], f, 32)) /*<>*/ return f; /*<>*/ /*<>*/ var - _M_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); + _N_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _M_); + (Stdlib[28], cst$7, _N_); } /*<>*/ /*<>*/ var - _L_ = + _M_ = /*<>*/ caml_call2 (Stdlib[28], cst_Filename_quote_command_bad, f); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _L_); + (Stdlib[2], _M_); /*<>*/ } function quote_command$0(cmd, stdin, stdout, stderr, args){ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _x_ = cst_2_1$0; + var _y_ = cst_2_1$0; else /*<>*/ var - /*<>*/ _J_ = quote_cmd_filename(f), - _x_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _J_); - var _y_ = _x_; + /*<>*/ _K_ = quote_cmd_filename(f), + _y_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _K_); + var _z_ = _y_; } else - var _y_ = cst$16; - var _z_ = [0, _y_, _c_]; + var _z_ = cst$16; + var _A_ = [0, _z_, _c_]; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _A_ = quote_cmd_filename(f$0), - _B_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _A_); + /*<>*/ _B_ = quote_cmd_filename(f$0), + _C_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _B_); else - var _B_ = cst$15; - var _C_ = [0, _B_, _z_]; + var _C_ = cst$15; + var _D_ = [0, _C_, _A_]; if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _D_ = quote_cmd_filename(f$1), - _E_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _D_); + /*<>*/ _E_ = quote_cmd_filename(f$1), + _F_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _E_); else - var _E_ = cst$14; + var _F_ = cst$14; /*<>*/ var - /*<>*/ _G_ = + /*<>*/ _H_ = /*<>*/ caml_call2(Stdlib_List[19], quote$0, args), /*<>*/ s = - /*<>*/ caml_call2(Stdlib_String[6], cst$10, _G_), + /*<>*/ caml_call2(Stdlib_String[6], cst$10, _H_), /*<>*/ b = /*<>*/ caml_call1 (Stdlib_Buffer[1], caml_ml_string_length(s) + 20 | 0), - _F_ = [0, _E_, _C_]; - function _w_(c){ + _G_ = [0, _F_, _D_]; + function _x_(c){ /*<>*/ a: { if(62 <= c){ - var _K_ = c - 63 | 0; - if(60 < _K_ >>> 0){if(62 <= _K_) break a;} else if(31 !== _K_) break a; + var _L_ = c - 63 | 0; + if(60 < _L_ >>> 0){if(62 <= _L_) break a;} else if(31 !== _L_) break a; } else if(42 <= c){ @@ -32388,21 +32375,21 @@ (Stdlib_Buffer[12], b, c); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _w_, s); + (Stdlib_String[29], _x_, s); /*<>*/ var - _H_ = + _I_ = [0, cst$11, - [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _F_]], - /*<>*/ _I_ = - [0, cst$12, [0, quote_cmd_filename(cmd), _H_]]; + [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _G_]], + /*<>*/ _J_ = + [0, cst$12, [0, quote_cmd_filename(cmd), _I_]]; /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[6], cst$13, _I_); + (Stdlib_String[6], cst$13, _J_); /*<>*/ } function drive_and_path(s){ /*<>*/ var - _s_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; - if(_s_){ + _t_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; + if(_t_){ /*<>*/ /*<>*/ var param = /*<>*/ caml_string_get(s, 0); a: @@ -32413,28 +32400,28 @@ if(25 < param - 97 >>> 0) break b; } else if(65 > param) break b; - var _t_ = 1; + var _u_ = 1; break a; } - var _t_ = 0; + var _u_ = 0; } /*<>*/ /*<>*/ var - _u_ = - _t_ + _v_ = + _u_ ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 - : _t_; + : _u_; } else - var _u_ = _s_; - /*<>*/ if(! _u_) + var _v_ = _t_; + /*<>*/ if(! _v_) /*<>*/ return [0, cst$17, s]; /*<>*/ /*<>*/ var - _v_ = + _w_ = /*<>*/ caml_call3 (Stdlib_String[15], s, 2, caml_ml_string_length(s) - 2 | 0); /*<>*/ return [0, /*<>*/ caml_call3(Stdlib_String[15], s, 0, 2), - _v_]; + _w_]; /*<>*/ } function dirname$0(s){ /*<>*/ var @@ -32468,11 +32455,11 @@ quote_command$0, basename$0, dirname$0]; - /*<>*/ function basename$1(_r_){ - /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _r_); + /*<>*/ function basename$1(_s_){ + /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _s_); } - /*<>*/ function dirname$1(_q_){ - /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _q_); + /*<>*/ function dirname$1(_r_){ + /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _r_); } /*<>*/ var /*<>*/ Cygwin = @@ -32515,11 +32502,11 @@ /*<>*/ if (0 !== l && ! is_dir_sep$1(dirname, l - 1 | 0)){ /*<>*/ /*<>*/ var - _p_ = + _q_ = /*<>*/ caml_call2 (Stdlib[28], dir_sep$2, filename); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], dirname, _p_); + (Stdlib[28], dirname, _q_); } /*<>*/ return /*<>*/ caml_call2 (Stdlib[28], dirname, filename); @@ -32622,7 +32609,7 @@ /*<>*/ } /*<>*/ var /*<>*/ _g_ = - [0, function(_o_){ /*<>*/ return _o_;}], + [0, function(_p_){ /*<>*/ return _p_;}], /*<>*/ current_temp_dir_name = /*<>*/ caml_call2(Stdlib_Domain[10][1], _g_, _f_); function set_temp_dir_name(s){ @@ -32662,17 +32649,17 @@ } } /*<>*/ } - function open_temp_file(opt, _m_, _l_, prefix, suffix){ + function open_temp_file(opt, _n_, _m_, prefix, suffix){ /*<>*/ if(opt) var sth = opt[1], mode = sth; else var mode = _i_; - /*<>*/ if(_m_) - var sth$0 = _m_[1], perms = sth$0; + /*<>*/ if(_n_) + var sth$0 = _n_[1], perms = sth$0; else var perms = 384; - /*<>*/ if(_l_) - var sth$1 = _l_[1], temp_dir = sth$1; + /*<>*/ if(_m_) + var sth$1 = _m_[1], temp_dir = sth$1; else var temp_dir = @@ -32684,12 +32671,12 @@ name = temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ /*<>*/ /*<>*/ var - _n_ = + _o_ = [0, name, /*<>*/ caml_call3 (Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; - /*<>*/ return _n_; + /*<>*/ return _o_; } catch(e$0){ var e = caml_wrap_exception(e$0); From d729df0beaf46b7ec106d3f2d16ecdcb81e78714 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 24 Aug 2023 20:25:53 -0500 Subject: [PATCH 060/112] update comment --- compiler/lib/deadcode_dgraph.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index d5c29c7068..4965d16ed2 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -278,7 +278,7 @@ let propagate uses defs live_vars live_table x = match Var.Tbl.get live_table y with (* If y is dead, then x is dead. *) | Dead -> Dead - (* If y is a live block, then x is live if it is used in a live field *) + (* If y is a live block, then x is the join of liveness fields that are x *) | Live fields -> ( match defs.(Var.idx y) with | Expr (Block (_, vars, _)) -> @@ -292,7 +292,7 @@ let propagate uses defs live_vars live_table x = !live | Expr (Field (_, i)) ->( match IntMap.find_opt i fields with - | Some l -> l + | Some l -> Live (IntMap.singleton i l) | None -> Dead) | _ -> Top) (* If y is top and y is a field access, x depends only on that field *) From 2264014850184e0afb1839f3be01c7908a22eb5f Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 24 Aug 2023 20:26:02 -0500 Subject: [PATCH 061/112] Revert "fix printing vars" This reverts commit 2e62a34a2110b7b2b72505c6eea455711772797c. --- compiler/lib/deadcode_dgraph.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 4965d16ed2..b7cb3aecd9 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -412,7 +412,7 @@ module Print = struct Format.eprintf "Usages:\n"; Array.iteri ~f:(fun i ds -> - Format.eprintf "%a: { " Var.print (Var.of_idx i); + Format.eprintf "v%d: { " i; Var.Map.iter (fun d k -> Format.eprintf @@ -428,7 +428,7 @@ module Print = struct let print_liveness live_vars = Format.eprintf "Liveness:\n"; - Array.iteri ~f:(fun i l -> Format.eprintf "%a: %s\n" Var.print (Var.of_idx i) (live_to_string l)) live_vars + Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars let print_live_tbl live_table = Format.eprintf "Liveness with dependencies:\n"; From 7cb2d728d58b94d61acf19de2b4e4f608ebeb171 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 24 Aug 2023 20:27:05 -0500 Subject: [PATCH 062/112] Revert "sentinal name, start recursive liveness" This reverts commit 89df59fb4e6d20cb99f49b152095c0b723967d38. --- compiler/lib/deadcode_dgraph.ml | 51 +++----- compiler/tests-compiler/direct_calls.ml | 20 +-- compiler/tests-compiler/gh1007.ml | 46 +++---- compiler/tests-compiler/gh1494.ml | 2 +- compiler/tests-compiler/global_deadcode.ml | 137 +++++++-------------- 5 files changed, 100 insertions(+), 156 deletions(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index b7cb3aecd9..9f513a1242 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -41,7 +41,7 @@ type def = (** Liveness of a variable [x], forming a lattice structure. *) type live = | Top (** [x] is live and not a block. *) - | Live of live IntMap.t (** [x] is a live block with a (non-empty) set of live fields. *) + | Live of IntSet.t (** [x] is a live block with a (non-empty) set of live fields. *) | Dead (** [x] is dead. *) module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -49,21 +49,19 @@ module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) module Domain = struct type t = live - let rec equal l1 l2 = + let equal l1 l2 = match l1, l2 with | Top, Top | Dead, Dead -> true - | Live f1, Live f2 -> IntMap.equal equal f1 f2 + | Live f1, Live f2 -> IntSet.equal f1 f2 | _ -> false let bot = Dead (** Join the liveness according to lattice structure. *) - let rec join l1 l2 = + let join l1 l2 = match l1, l2 with | _, Top | Top, _ -> Top - | Live f1, Live f2 -> - let fields = IntMap.union (fun _ l1 l2 -> Some (join l1 l2)) f1 f2 in - Live fields + | Live f1, Live f2 -> Live (IntSet.union f1 f2) | Dead, Live f | Live f, Dead -> Live f | Dead, Dead -> Dead end @@ -213,22 +211,19 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = let idx = Var.idx v in live_vars.(idx) <- Top in - let add_live v i l = + let add_live v i = let idx = Var.idx v in match live_vars.(idx) with - | Live fields -> live_vars.(idx) <- Live (IntMap.add i l fields) - | _ -> live_vars.(idx) <- Live (IntMap.singleton i l) + | Live fields -> live_vars.(idx) <- Live (IntSet.add i fields) + | _ -> live_vars.(idx) <- Live (IntSet.singleton i) in let live_instruction i = match i with - | Let (_, e) -> - (* We add all variables in impure expressions as top to ensure they aren't removed. *) + | Let (_x, e) -> if not (pure_expr pure_funs e) then ( let vars = expr_vars e in Var.ISet.iter add_top vars;) - (* We might be able to do better in pure fn applications. The function itself must be kept but - arguments might be dead if they don't escape. *) else (match e with | Apply { f; args; _} -> add_top f; @@ -236,13 +231,13 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = | _ -> ()) | Assign (_, _) -> () | Set_field (x, i, y) -> - add_live x i Top; + add_live x i; add_top y | Array_set (x, y, z) -> add_top x; add_top y; add_top z - | Offset_ref (x, i) -> add_live x i Top + | Offset_ref (x, i) -> add_live x i in let live_block block = List.iter ~f:(fun (i, _) -> live_instruction i) block.body; @@ -282,23 +277,17 @@ let propagate uses defs live_vars live_table x = | Live fields -> ( match defs.(Var.idx y) with | Expr (Block (_, vars, _)) -> - let live = ref Dead in - Array.iteri ~f:(fun i v -> - if Var.equal v x - then match IntMap.find_opt i fields with - | Some l -> live := Domain.join !live l - | None -> ()) + let found = ref false in + Array.iteri + ~f:(fun i v -> + if Var.equal v x && IntSet.mem i fields then found := true) vars; - !live - | Expr (Field (_, i)) ->( - match IntMap.find_opt i fields with - | Some l -> Live (IntMap.singleton i l) - | None -> Dead) + if !found then Top else Dead | _ -> Top) (* If y is top and y is a field access, x depends only on that field *) | Top -> ( match defs.(Var.idx y) with - | Expr (Field (_, i)) -> Live (IntMap.singleton i Top) + | Expr (Field (_, i)) -> Live (IntSet.singleton i) | _ -> Top)) (* If x is used as an argument for parameter y, then contribution is liveness of y *) | Propagate -> Var.Tbl.get live_table y @@ -363,7 +352,7 @@ let zero prog sentinal live_table = | Live fields -> let vars = Array.mapi - ~f:(fun i v -> if IntMap.mem i fields then v else sentinal) + ~f:(fun i v -> if IntSet.mem i fields then v else sentinal) vars |> compact_vars in @@ -404,7 +393,7 @@ let zero prog sentinal live_table = module Print = struct let live_to_string = function | Live fields -> - "live { " ^ IntMap.fold (fun i _ s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" + "live { " ^ IntSet.fold (fun i s -> s ^ Format.sprintf "%d " i) fields "" ^ "}" | Top -> "top" | Dead -> "dead" @@ -439,7 +428,7 @@ end (** Add a sentinal variable declaration to the IR. The fresh variable is assigned to `undefined`. *) let add_sentinal p = - let sentinal = Var.fresh_n "sentinal" in + let sentinal = Var.fresh () in let undefined = Prim (Extern "%undefined", []) in let instr, loc = Let (sentinal, undefined), Before 0 in Code.prepend p [ instr, loc ], sentinal diff --git a/compiler/tests-compiler/direct_calls.ml b/compiler/tests-compiler/direct_calls.ml index e7c66cb85a..98b7a4249c 100644 --- a/compiler/tests-compiler/direct_calls.ml +++ b/compiler/tests-compiler/direct_calls.ml @@ -57,26 +57,26 @@ let%expect_test "direct calls without --enable effects" = [%expect {| function test1(param){ - function f(g, x){caml_call1(g, x); return sentinal;} - var _d_ = 7; - f(function(x){return x + 1 | 0;}, _d_); - var _e_ = 4.; - f(function(x){return x * 2.;}, _e_); + function f(g, x){caml_call1(g, x); return _b_;} + var _e_ = 7; + f(function(x){return x + 1 | 0;}, _e_); + var _f_ = 4.; + f(function(x){return x * 2.;}, _f_); return 0; } //end function test2(param){ - function f(g, x){caml_call1(g, x); return sentinal;} - var _c_ = 7; - f(function(x){return x + 1 | 0;}, _c_); + function f(g, x){caml_call1(g, x); return _b_;} + var _d_ = 7; + f(function(x){return x + 1 | 0;}, _d_); f(function(x){return caml_call2(Stdlib[28], x, cst_a$0);}, cst_a); return 0; } //end function test3(x){ function F(symbol){function f(x){return x + 1 | 0;} return [0, f];} - var M1 = F([0]), M2 = F([0]), _b_ = M2[1].call(null, 2); - return [0, M1[1].call(null, 1), _b_]; + var M1 = F([0]), M2 = F([0]), _c_ = M2[1].call(null, 2); + return [0, M1[1].call(null, 1), _c_]; } //end function test4(x){ diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 6379531de1..6aed85957d 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -369,31 +369,31 @@ let () = M.run () if(2 >= n >>> 0) switch(n){ case 0: - return sentinal; + return _a_; case 1: - odd(0); return sentinal; - default: odd(1); return sentinal; + odd(0); return _a_; + default: odd(1); return _a_; } odd(n - 1 | 0); - return sentinal; + return _a_; }, odd = function(n){ if(2 >= n >>> 0) switch(n){ case 0: - return sentinal; + return _a_; case 1: - even(0); return sentinal; - default: even(1); return sentinal; + even(0); return _a_; + default: even(1); return _a_; } even(n - 1 | 0); - return sentinal; + return _a_; }; even(i); - var _a_ = i + 1 | 0; + var _b_ = i + 1 | 0; if(4 === i) return 0; - var i = _a_; + var i = _b_; } } //end |}] @@ -467,13 +467,13 @@ let () = M.run () f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; delayed[1] = [0, f, delayed[1]]; f(0); - return sentinal; + return _c_; case 1: - odd(0); return sentinal; - default: odd(1); return sentinal; + odd(0); return _c_; + default: odd(1); return _c_; } odd(n - 1 | 0); - return sentinal; + return _c_; } function odd(n){ if(2 >= n >>> 0) @@ -483,13 +483,13 @@ let () = M.run () f = function(param){return caml_call2(Stdlib_Printf[2], _a_, i);}; delayed[1] = [0, f, delayed[1]]; f(0); - return sentinal; + return _c_; case 1: - even(0); return sentinal; - default: even(1); return sentinal; + even(0); return _c_; + default: even(1); return _c_; } even(n - 1 | 0); - return sentinal; + return _c_; } var block = [0, even, odd]; return block; @@ -497,14 +497,14 @@ let () = M.run () closures$0 = closures(i), even = closures$0[1]; even(i); - var _e_ = i + 1 | 0; + var _f_ = i + 1 | 0; if(4 === i){ var - _c_ = caml_call1(Stdlib_List[9], delayed[1]), - _d_ = function(f){return caml_call1(f, 0);}; - return caml_call2(Stdlib_List[17], _d_, _c_); + _d_ = caml_call1(Stdlib_List[9], delayed[1]), + _e_ = function(f){return caml_call1(f, 0);}; + return caml_call2(Stdlib_List[17], _e_, _d_); } - var i = _e_; + var i = _f_; } } //end |}] diff --git a/compiler/tests-compiler/gh1494.ml b/compiler/tests-compiler/gh1494.ml index fd646b38f2..17cab23faf 100644 --- a/compiler/tests-compiler/gh1494.ml +++ b/compiler/tests-compiler/gh1494.ml @@ -39,7 +39,7 @@ let () = [%expect {| function bug(param){ - var g = [0, function(x){return function(_c_){return _c_;};}]; + var g = [0, function(x){return function(_d_){return _d_;};}]; return [0, function(param){return caml_call1(g[1], 1);}, g]; } //end |}] diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index eb48cf9a89..c82dd943ea 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -15,97 +15,41 @@ let%expect_test "Eliminates unused functions from functor" = |} in (* Expect: compiles functor members used in the program *) - print_fun_decl program (Some "_e_"); - [%expect {| - function _e_(Ord){ - function height(param){if(! param) return 0; var h = param[4]; return h;} - function create(l, v, r){ - if(l) var h = l[4], hl = h; else var hl = 0; - if(r) var h$0 = r[4], hr = h$0; else var hr = 0; - var _m_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _m_]; - } - function bal(l, v, r){ - if(l) var h = l[4], hl = h; else var hl = 0; - if(r) var h$0 = r[4], hr = h$0; else var hr = 0; - if((hr + 2 | 0) < hl){ - if(! l) return invalid_arg(_b_); - var lr = l[3], lv = l[2], ll = l[1], _h_ = height(lr); - if(_h_ <= height(ll)) return create(ll, lv, create(lr, v, r)); - if(! lr) return invalid_arg(_a_); - var lrr = lr[3], lrv = lr[2], lrl = lr[1], _i_ = create(lrr, v, r); - return create(create(ll, lv, lrl), lrv, _i_); - } - if((hl + 2 | 0) >= hr){ - var _l_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _l_]; - } - if(! r) return invalid_arg(_d_); - var rr = r[3], rv = r[2], rl = r[1], _j_ = height(rl); - if(_j_ <= height(rr)) return create(create(l, v, rl), rv, rr); - if(! rl) return invalid_arg(_c_); - var rlr = rl[3], rlv = rl[2], rll = rl[1], _k_ = create(rlr, rv, rr); - return create(create(l, v, rll), rlv, _k_); - } - function add(x, t){ - if(! t) return [0, 0, x, 0, 1]; - var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); - if(0 === c) return t; - if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} - var ll = add(x, l); - return l === ll ? t : bal(ll, v, r); - } - function singleton(x){return [0, 0, x, 0, 1];} - var empty = 0; - function find(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) throw caml_maybe_attach_backtrace(Not_found, 1); - var - r = param$0[3], - v = param$0[2], - l = param$0[1], - c = caml_call2(Ord[1], x, v); - if(0 === c) return v; - var r$0 = 0 <= c ? r : l, param$0 = r$0; - } + print_fun_decl program (Some "find"); + [%expect + {| + function find(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) throw caml_maybe_attach_backtrace(Not_found, 1); + var + r = param$0[3], + v = param$0[2], + l = param$0[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return v; + var r$0 = 0 <= c ? r : l, param$0 = r$0; } - return [0, - empty, - sentinal, - sentinal, - add, - singleton, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - sentinal, - find]; } - //end |}] + //end |}]; + print_fun_decl program (Some "add"); + [%expect {| + function add(x, t){ + if(! t) return [0, 0, x, 0, 1]; + var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); + if(0 === c) return t; + if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} + var ll = add(x, l); + return l === ll ? t : bal(ll, v, r); + } + //end |}]; + (* Expect: does not compile unused functor member *) + print_fun_decl program (Some "union"); + [%expect {| not found |}]; + print_fun_decl program (Some "inter"); + [%expect {| not found |}] -let%expect_test "Substitutes unused fields with sentinal" = +let%expect_test "Substitutes unused fields with undefined" = let program = compile_and_parse {| @@ -120,12 +64,23 @@ let%expect_test "Substitutes unused fields with sentinal" = print_fun_decl program (Some "f"); [%expect {| function f(b, x){ - var t = b ? [0, 1, sentinal, x] : [0, 3, sentinal, 4], v = t[3], u = t[1]; + var t = b ? [0, 1, _c_, x] : [0, 3, _c_, 4], v = t[3], u = t[1]; return [0, u, v]; } //end |}]; (* And that variable is defined as `undefined` *) - print_var_decl program "sentinal"; + print_var_decl program "_c_"; [%expect {| - var sentinal = undefined; + var _c_ = undefined; //end |}] + +let%expect_test "Sets unused return value to undefined" = + let program = + compile_and_parse + {| + + |} + in print_fun_decl program (Some "f"); + [%expect {| not found |}]; + print_var_decl program "__"; + [%expect {| var __ = not found |}] \ No newline at end of file From db8cbbf85a9e193f0ff254cc7de7eae56be86b77 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 24 Aug 2023 20:28:34 -0500 Subject: [PATCH 063/112] sentinal name --- compiler/lib/deadcode_dgraph.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/deadcode_dgraph.ml index 9f513a1242..7eb8f8944c 100644 --- a/compiler/lib/deadcode_dgraph.ml +++ b/compiler/lib/deadcode_dgraph.ml @@ -428,7 +428,7 @@ end (** Add a sentinal variable declaration to the IR. The fresh variable is assigned to `undefined`. *) let add_sentinal p = - let sentinal = Var.fresh () in + let sentinal = Var.fresh_n "sentinal" in let undefined = Prim (Extern "%undefined", []) in let instr, loc = Let (sentinal, undefined), Before 0 in Code.prepend p [ instr, loc ], sentinal From 5bef65a3c8304d7a23cbe395d5baa738e8529497 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 24 Aug 2023 20:58:23 -0500 Subject: [PATCH 064/112] promote test changes --- compiler/tests-compiler/direct_calls.ml | 20 +- compiler/tests-compiler/gh1007.ml | 46 +- compiler/tests-compiler/gh1494.ml | 2 +- compiler/tests-compiler/global_deadcode.ml | 6 +- compiler/tests-full/stdlib.cma.expected.js | 4557 ++++++++++---------- 5 files changed, 2322 insertions(+), 2309 deletions(-) diff --git a/compiler/tests-compiler/direct_calls.ml b/compiler/tests-compiler/direct_calls.ml index 98b7a4249c..e7c66cb85a 100644 --- a/compiler/tests-compiler/direct_calls.ml +++ b/compiler/tests-compiler/direct_calls.ml @@ -57,26 +57,26 @@ let%expect_test "direct calls without --enable effects" = [%expect {| function test1(param){ - function f(g, x){caml_call1(g, x); return _b_;} - var _e_ = 7; - f(function(x){return x + 1 | 0;}, _e_); - var _f_ = 4.; - f(function(x){return x * 2.;}, _f_); + function f(g, x){caml_call1(g, x); return sentinal;} + var _d_ = 7; + f(function(x){return x + 1 | 0;}, _d_); + var _e_ = 4.; + f(function(x){return x * 2.;}, _e_); return 0; } //end function test2(param){ - function f(g, x){caml_call1(g, x); return _b_;} - var _d_ = 7; - f(function(x){return x + 1 | 0;}, _d_); + function f(g, x){caml_call1(g, x); return sentinal;} + var _c_ = 7; + f(function(x){return x + 1 | 0;}, _c_); f(function(x){return caml_call2(Stdlib[28], x, cst_a$0);}, cst_a); return 0; } //end function test3(x){ function F(symbol){function f(x){return x + 1 | 0;} return [0, f];} - var M1 = F([0]), M2 = F([0]), _c_ = M2[1].call(null, 2); - return [0, M1[1].call(null, 1), _c_]; + var M1 = F([0]), M2 = F([0]), _b_ = M2[1].call(null, 2); + return [0, M1[1].call(null, 1), _b_]; } //end function test4(x){ diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 6aed85957d..6379531de1 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -369,31 +369,31 @@ let () = M.run () if(2 >= n >>> 0) switch(n){ case 0: - return _a_; + return sentinal; case 1: - odd(0); return _a_; - default: odd(1); return _a_; + odd(0); return sentinal; + default: odd(1); return sentinal; } odd(n - 1 | 0); - return _a_; + return sentinal; }, odd = function(n){ if(2 >= n >>> 0) switch(n){ case 0: - return _a_; + return sentinal; case 1: - even(0); return _a_; - default: even(1); return _a_; + even(0); return sentinal; + default: even(1); return sentinal; } even(n - 1 | 0); - return _a_; + return sentinal; }; even(i); - var _b_ = i + 1 | 0; + var _a_ = i + 1 | 0; if(4 === i) return 0; - var i = _b_; + var i = _a_; } } //end |}] @@ -467,13 +467,13 @@ let () = M.run () f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; delayed[1] = [0, f, delayed[1]]; f(0); - return _c_; + return sentinal; case 1: - odd(0); return _c_; - default: odd(1); return _c_; + odd(0); return sentinal; + default: odd(1); return sentinal; } odd(n - 1 | 0); - return _c_; + return sentinal; } function odd(n){ if(2 >= n >>> 0) @@ -483,13 +483,13 @@ let () = M.run () f = function(param){return caml_call2(Stdlib_Printf[2], _a_, i);}; delayed[1] = [0, f, delayed[1]]; f(0); - return _c_; + return sentinal; case 1: - even(0); return _c_; - default: even(1); return _c_; + even(0); return sentinal; + default: even(1); return sentinal; } even(n - 1 | 0); - return _c_; + return sentinal; } var block = [0, even, odd]; return block; @@ -497,14 +497,14 @@ let () = M.run () closures$0 = closures(i), even = closures$0[1]; even(i); - var _f_ = i + 1 | 0; + var _e_ = i + 1 | 0; if(4 === i){ var - _d_ = caml_call1(Stdlib_List[9], delayed[1]), - _e_ = function(f){return caml_call1(f, 0);}; - return caml_call2(Stdlib_List[17], _e_, _d_); + _c_ = caml_call1(Stdlib_List[9], delayed[1]), + _d_ = function(f){return caml_call1(f, 0);}; + return caml_call2(Stdlib_List[17], _d_, _c_); } - var i = _f_; + var i = _e_; } } //end |}] diff --git a/compiler/tests-compiler/gh1494.ml b/compiler/tests-compiler/gh1494.ml index 17cab23faf..fd646b38f2 100644 --- a/compiler/tests-compiler/gh1494.ml +++ b/compiler/tests-compiler/gh1494.ml @@ -39,7 +39,7 @@ let () = [%expect {| function bug(param){ - var g = [0, function(x){return function(_d_){return _d_;};}]; + var g = [0, function(x){return function(_c_){return _c_;};}]; return [0, function(param){return caml_call1(g[1], 1);}, g]; } //end |}] diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index c82dd943ea..899ce4f854 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -64,14 +64,14 @@ let%expect_test "Substitutes unused fields with undefined" = print_fun_decl program (Some "f"); [%expect {| function f(b, x){ - var t = b ? [0, 1, _c_, x] : [0, 3, _c_, 4], v = t[3], u = t[1]; + var t = b ? [0, 1, sentinal, x] : [0, 3, sentinal, 4], v = t[3], u = t[1]; return [0, u, v]; } //end |}]; (* And that variable is defined as `undefined` *) - print_var_decl program "_c_"; + print_var_decl program "sentinal"; [%expect {| - var _c_ = undefined; + var sentinal = undefined; //end |}] let%expect_test "Sets unused return value to undefined" = diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 7e201668fd..8249793bfe 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -1248,11 +1248,11 @@ : runtime.caml_call_gen(f, [a0]); } var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Assert_failure = global_data.Assert_failure, Stdlib_Sys = global_data.Stdlib__Sys, - _b_ = undefined, cst_Obj_Ephemeron_blit_key = "Obj.Ephemeron.blit_key", cst_Obj_Ephemeron_check_key = "Obj.Ephemeron.check_key", cst_Obj_Ephemeron_unset_key = "Obj.Ephemeron.unset_key", @@ -1330,9 +1330,9 @@ max_ephe_length = Stdlib_Sys[13] - 2 | 0; function create(l){ /*<>*/ var - _h_ = 0 <= l ? 1 : 0, - _i_ = _h_ ? l <= max_ephe_length ? 1 : 0 : _h_; - if(1 - _i_) + _g_ = 0 <= l ? 1 : 0, + _h_ = _g_ ? l <= max_ephe_length ? 1 : 0 : _g_; + if(1 - _h_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_create); /*<>*/ return /*<>*/ runtime.caml_ephe_create @@ -1343,10 +1343,12 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _e_ = 0 <= o ? 1 : 0, - _f_ = _e_ ? o < length(e) ? 1 : 0 : _e_, - _g_ = 1 - _f_; - return _g_ ? ( /*<>*/ caml_call1(Stdlib[1], msg), _b_) : _g_; + _d_ = 0 <= o ? 1 : 0, + _e_ = _d_ ? o < length(e) ? 1 : 0 : _d_, + _f_ = 1 - _e_; + return _f_ + ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) + : _f_; /*<>*/ } function get_key(e, o){ /*<>*/ raise_if_invalid_offset @@ -1385,13 +1387,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _c_ = 0 !== l ? 1 : 0, - _d_ = - _c_ + _b_ = 0 !== l ? 1 : 0, + _c_ = + _b_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _c_; - /*<>*/ return _d_; + : _b_; + /*<>*/ return _c_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_blit_key); @@ -4549,7 +4551,7 @@ : runtime.caml_call_gen(f, [a0, a1]); } var - _g_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Uchar = global_data.Stdlib__Uchar, @@ -4594,15 +4596,15 @@ function init(n, f){ /*<>*/ var /*<>*/ s = /*<>*/ caml_create_bytes(n), - /*<>*/ _ar_ = n - 1 | 0, - /*<>*/ _aq_ = 0; - if(_ar_ >= 0){ - var i = _aq_; + /*<>*/ _aq_ = n - 1 | 0, + /*<>*/ _ap_ = 0; + if(_aq_ >= 0){ + var i = _ap_; for(;;){ caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); - /*<>*/ /*<>*/ var _as_ = i + 1 | 0; - if(_ar_ === i) break; - var i = _as_; + /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; + if(_aq_ === i) break; + var i = _ar_; } } /*<>*/ return s; @@ -4644,11 +4646,11 @@ function symbol(a, b){ /*<>*/ var c = a + b | 0, - _ap_ = b < 0 ? 1 : 0, + _ao_ = b < 0 ? 1 : 0, match = c < 0 ? 1 : 0; a: { - if(a < 0){if(_ap_ && ! match) break a;} else if(! _ap_ && match) break a; + if(a < 0){if(_ao_ && ! match) break a;} else if(! _ao_ && match) break a; /*<>*/ return c; } /*<>*/ return /*<>*/ caml_call1 @@ -4711,32 +4713,32 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _an_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _am_ = 0; - if(_an_ >= 0){ - var i = _am_; + _am_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _al_ = 0; + if(_am_ >= 0){ + var i = _al_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; - if(_an_ === i) break; - var i = _ao_; + /*<>*/ /*<>*/ var _an_ = i + 1 | 0; + if(_am_ === i) break; + var i = _an_; } } return 0; /*<>*/ } function iteri(f, a){ /*<>*/ var - _ak_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _aj_ = 0; - if(_ak_ >= 0){ - var i = _aj_; + _aj_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _al_ = i + 1 | 0; - if(_ak_ === i) break; - var i = _al_; + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ === i) break; + var i = _ak_; } } return 0; @@ -4759,13 +4761,13 @@ param = tl; continue; } - var _ai_ = caml_ml_bytes_length(hd) + acc | 0; + var _ah_ = caml_ml_bytes_length(hd) + acc | 0; } else - var _ai_ = acc; + var _ah_ = acc; /*<>*/ var /*<>*/ dst = - /*<>*/ caml_create_bytes(_ai_), + /*<>*/ caml_create_bytes(_ah_), pos = pos$1, param$0 = l; for(;;){ @@ -4803,10 +4805,10 @@ /*<>*/ } function is_space(param){ /*<>*/ /*<>*/ var - _ah_ = param - 9 | 0; + _ag_ = param - 9 | 0; a: { - if(4 < _ah_ >>> 0){if(23 !== _ah_) break a;} else if(2 === _ah_) break a; + if(4 < _ag_ >>> 0){if(23 !== _ag_) break a;} else if(2 === _ag_) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -4830,10 +4832,10 @@ function unsafe_escape(s){ /*<>*/ var /*<>*/ n = [0, 0], - _aa_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i$0 = _$_; + _$_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ ___ = 0; + if(_$_ >= 0){ + var i$0 = ___; for(;;){ var match = caml_bytes_unsafe_get(s, i$0); a: @@ -4843,12 +4845,12 @@ c: { if(32 <= match){ - var _ae_ = match - 34 | 0; - if(58 < _ae_ >>> 0){ - if(93 <= _ae_) break c; + var _ad_ = match - 34 | 0; + if(58 < _ad_ >>> 0){ + if(93 <= _ad_) break c; } - else if(56 < _ae_ - 1 >>> 0) break b; - var _af_ = 1; + else if(56 < _ad_ - 1 >>> 0) break b; + var _ae_ = 1; break a; } if(11 <= match){ @@ -4856,15 +4858,15 @@ } else if(8 <= match) break b; } - var _af_ = 4; + var _ae_ = 4; break a; } - var _af_ = 2; + var _ae_ = 2; } - n[1] = n[1] + _af_ | 0; - /*<>*/ /*<>*/ var _ag_ = i$0 + 1 | 0; - if(_aa_ === i$0) break; - var i$0 = _ag_; + n[1] = n[1] + _ae_ | 0; + /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; + if(_$_ === i$0) break; + var i$0 = _af_; } } if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; @@ -4872,10 +4874,10 @@ s$0 = /*<>*/ caml_create_bytes(n[1]); n[1] = 0; /*<>*/ var - _ac_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ _ab_ = 0; - if(_ac_ >= 0){ - var i = _ab_; + _ab_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ _aa_ = 0; + if(_ab_ >= 0){ + var i = _aa_; for(;;){ var c = caml_bytes_unsafe_get(s, i); a: @@ -4933,9 +4935,9 @@ caml_bytes_unsafe_set(s$0, n[1], c); } n[1]++; - /*<>*/ /*<>*/ var _ad_ = i + 1 | 0; - if(_ac_ === i) break; - var i = _ad_; + /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; + if(_ab_ === i) break; + var i = _ac_; } } /*<>*/ return s$0; @@ -4950,18 +4952,18 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 0; - if(_Z_ >= 0){ - var i = _Y_; + /*<>*/ _Y_ = l - 1 | 0, + /*<>*/ _X_ = 0; + if(_Y_ >= 0){ + var i = _X_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ === i) break; - var i = ___; + /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; + if(_Y_ === i) break; + var i = _Z_; } } /*<>*/ return r; @@ -4972,18 +4974,18 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _W_ = l - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + /*<>*/ _V_ = l - 1 | 0, + /*<>*/ _U_ = 0; + if(_V_ >= 0){ + var i = _U_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ === i) break; - var i = _X_; + /*<>*/ /*<>*/ var _W_ = i + 1 | 0; + if(_V_ === i) break; + var i = _W_; } } /*<>*/ return r; @@ -4991,17 +4993,17 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _T_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _S_ = 0; - if(_T_ >= 0){ - var i = _S_; + _S_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _R_ = 0; + if(_S_ >= 0){ + var i = _R_; for(;;){ r[1] = /*<>*/ caml_call2 (f, r[1], caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ === i) break; - var i = _U_; + /*<>*/ /*<>*/ var _T_ = i + 1 | 0; + if(_S_ === i) break; + var i = _T_; } } return r[1]; @@ -5009,17 +5011,17 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _Q_ = + /*<>*/ _P_ = /*<>*/ caml_ml_bytes_length(a) - 1 | 0; - if(_Q_ >= 0){ - var i = _Q_; + if(_P_ >= 0){ + var i = _P_; for(;;){ r[1] = /*<>*/ caml_call2 (f, caml_bytes_unsafe_get(a, i), r[1]); - /*<>*/ /*<>*/ var _R_ = i - 1 | 0; + /*<>*/ /*<>*/ var _Q_ = i - 1 | 0; if(0 === i) break; - var i = _R_; + var i = _Q_; } } return r[1]; @@ -5074,8 +5076,8 @@ /*<>*/ var len_s = caml_ml_bytes_length(s), len_pre = caml_ml_bytes_length(prefix), - _P_ = len_pre <= len_s ? 1 : 0; - if(! _P_) return _P_; + _O_ = len_pre <= len_s ? 1 : 0; + if(! _O_) return _O_; var i = 0; /*<>*/ for(;;){ if(i === len_pre) /*<>*/ return 1; @@ -5091,8 +5093,8 @@ len_s = caml_ml_bytes_length(s), len_suf = caml_ml_bytes_length(suffix), diff = len_s - len_suf | 0, - _O_ = 0 <= diff ? 1 : 0; - if(! _O_) return _O_; + _N_ = 0 <= diff ? 1 : 0; + if(! _N_) return _N_; var i = 0; /*<>*/ for(;;){ if(i === len_suf) /*<>*/ return 1; @@ -5191,13 +5193,13 @@ if(0 <= i && l >= i) /*<>*/ try{ /*<>*/ index_rec(s, l, i, c); - /*<>*/ /*<>*/ var _M_ = 1; - /*<>*/ return _M_; + /*<>*/ /*<>*/ var _L_ = 1; + /*<>*/ return _L_; } - catch(_N_){ - var _L_ = caml_wrap_exception(_N_); - if(_L_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_L_, 0); + catch(_M_){ + var _K_ = caml_wrap_exception(_M_); + if(_K_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_K_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_contains_from_Bytes); @@ -5209,13 +5211,13 @@ /*<>*/ if(0 <= i && caml_ml_bytes_length(s) > i) /*<>*/ try{ /*<>*/ rindex_rec(s, i, c); - /*<>*/ /*<>*/ var _J_ = 1; - /*<>*/ return _J_; + /*<>*/ /*<>*/ var _I_ = 1; + /*<>*/ return _I_; } - catch(_K_){ - var _I_ = caml_wrap_exception(_K_); - if(_I_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_I_, 0); + catch(_J_){ + var _H_ = caml_wrap_exception(_J_); + if(_H_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_H_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_rcontains_from_Byte); @@ -5226,23 +5228,23 @@ /*<>*/ r = [0, 0], /*<>*/ j = [0, /*<>*/ caml_ml_bytes_length(s)], - /*<>*/ _E_ = + /*<>*/ _D_ = /*<>*/ caml_ml_bytes_length(s) - 1 | 0; - if(_E_ >= 0){ - var i = _E_; + if(_D_ >= 0){ + var i = _D_; for(;;){ if(caml_bytes_unsafe_get(s, i) === sep){ - var _G_ = r[1]; - r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _G_]; + var _F_ = r[1]; + r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _F_]; j[1] = i; } - /*<>*/ /*<>*/ var _H_ = i - 1 | 0; + /*<>*/ /*<>*/ var _G_ = i - 1 | 0; if(0 === i) break; - var i = _H_; + var i = _G_; } } - var _F_ = r[1]; - /*<>*/ return [0, sub(s, 0, j[1]), _F_]; + var _E_ = r[1]; + /*<>*/ return [0, sub(s, 0, j[1]), _E_]; /*<>*/ } function to_seq(s){ function aux(i, param){ @@ -5251,14 +5253,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _C_ = i + 1 | 0; + /*<>*/ _B_ = i + 1 | 0; /*<>*/ return [0, x, - function(_D_){ /*<>*/ return aux(_C_, _D_);}]; + function(_C_){ /*<>*/ return aux(_B_, _C_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _A_ = 0; - /*<>*/ return function(_B_){ - /*<>*/ return aux(_A_, _B_);}; + /*<>*/ /*<>*/ var _z_ = 0; + /*<>*/ return function(_A_){ + /*<>*/ return aux(_z_, _A_);}; /*<>*/ } function to_seqi(s){ function aux(i, param){ @@ -5267,20 +5269,20 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _y_ = i + 1 | 0; + /*<>*/ _x_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_z_){ /*<>*/ return aux(_y_, _z_);}]; + function(_y_){ /*<>*/ return aux(_x_, _y_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _w_ = 0; - /*<>*/ return function(_x_){ - /*<>*/ return aux(_w_, _x_);}; + /*<>*/ /*<>*/ var _v_ = 0; + /*<>*/ return function(_w_){ + /*<>*/ return aux(_v_, _w_);}; /*<>*/ } function of_seq(i){ /*<>*/ var /*<>*/ n = [0, 0], /*<>*/ buf = [0, make(256, 0)]; - function _v_(c){ + function _u_(c){ /*<>*/ if(n[1] === caml_ml_bytes_length(buf[1])){ /*<>*/ /*<>*/ var new_len = @@ -5302,7 +5304,7 @@ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Seq[4], _v_, i); + (Stdlib_Seq[4], _u_, i); return sub(buf[1], 0, n[1]); /*<>*/ } function unsafe_get_uint16_le(b, i){ @@ -5319,9 +5321,9 @@ /*<>*/ } function get_int8(b, i){ /*<>*/ var - /*<>*/ _t_ = Stdlib_Sys[10] - 8 | 0, - _u_ = Stdlib_Sys[10] - 8 | 0; - return /*<>*/ caml_bytes_get(b, i) << _u_ >> _t_; + /*<>*/ _s_ = Stdlib_Sys[10] - 8 | 0, + _t_ = Stdlib_Sys[10] - 8 | 0; + return /*<>*/ caml_bytes_get(b, i) << _t_ >> _s_; /*<>*/ } function get_uint16_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5337,21 +5339,21 @@ /*<>*/ } function get_int16_ne(b, i){ /*<>*/ var - /*<>*/ _r_ = Stdlib_Sys[10] - 16 | 0, - _s_ = Stdlib_Sys[10] - 16 | 0; - return /*<>*/ caml_bytes_get16(b, i) << _s_ >> _r_; + /*<>*/ _q_ = Stdlib_Sys[10] - 16 | 0, + _r_ = Stdlib_Sys[10] - 16 | 0; + return /*<>*/ caml_bytes_get16(b, i) << _r_ >> _q_; /*<>*/ } function get_int16_le(b, i){ /*<>*/ var - /*<>*/ _p_ = Stdlib_Sys[10] - 16 | 0, - _q_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_le(b, i) << _q_ >> _p_; + /*<>*/ _o_ = Stdlib_Sys[10] - 16 | 0, + _p_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_le(b, i) << _p_ >> _o_; /*<>*/ } function get_int16_be(b, i){ /*<>*/ var - /*<>*/ _n_ = Stdlib_Sys[10] - 16 | 0, - _o_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_be(b, i) << _o_ >> _n_; + /*<>*/ _m_ = Stdlib_Sys[10] - 16 | 0, + _n_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_be(b, i) << _n_ >> _m_; /*<>*/ } function get_int32_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5381,15 +5383,15 @@ /*<>*/ return Stdlib_Sys[11] ? ( /*<>*/ caml_bytes_set16 (b, i, caml_bswap16(x)), - _g_) - : ( /*<>*/ caml_bytes_set16(b, i, x), _g_); + sentinal) + : ( /*<>*/ caml_bytes_set16(b, i, x), sentinal); /*<>*/ } function unsafe_set_uint16_be(b, i, x){ /*<>*/ return Stdlib_Sys[11] - ? ( /*<>*/ caml_bytes_set16(b, i, x), _g_) + ? ( /*<>*/ caml_bytes_set16(b, i, x), sentinal) : ( /*<>*/ caml_bytes_set16 (b, i, caml_bswap16(x)), - _g_); + sentinal); /*<>*/ } function set_int16_le(b, i, x){ /*<>*/ return Stdlib_Sys[11] @@ -5431,9 +5433,9 @@ dec_invalid = Stdlib_Uchar[22]; function dec_ret(n, u){ /*<>*/ /*<>*/ var - _m_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); + _l_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Uchar[21], n, _m_); + (Stdlib_Uchar[21], n, _l_); /*<>*/ } function not_in_x80_to_xBF(b){ /*<>*/ return 2 !== (b >>> 6 | 0) ? 1 : 0; @@ -5446,9 +5448,9 @@ /*<>*/ } function not_in_x90_to_xBF(b){ /*<>*/ var - _k_ = b < 144 ? 1 : 0, - _l_ = _k_ || (191 < b ? 1 : 0); - return _l_; + _j_ = b < 144 ? 1 : 0, + _k_ = _j_ || (191 < b ? 1 : 0); + return _k_; /*<>*/ } function not_in_x80_to_x8F(b){ /*<>*/ return 8 !== (b >>> 4 | 0) ? 1 : 0; @@ -5645,9 +5647,9 @@ (dec_invalid, 1); /*<>*/ } function set_utf_8_uchar(b, i, u){ - /*<>*/ function set(_j_, _i_, _h_){ - /*<>*/ caml_bytes_unsafe_set(_j_, _i_, _h_); - return _g_; + /*<>*/ function set(_i_, _h_, _g_){ + /*<>*/ caml_bytes_unsafe_set(_i_, _h_, _g_); + return sentinal; } /*<>*/ var /*<>*/ max = @@ -6861,7 +6863,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } /*<>*/ var - _b_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Assert_failure = global_data.Assert_failure, @@ -6889,16 +6891,16 @@ /*<>*/ res = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, 0)), - /*<>*/ _at_ = l - 1 | 0, - /*<>*/ _as_ = 1; - if(_at_ >= 1){ - var i = _as_; + /*<>*/ _as_ = l - 1 | 0, + /*<>*/ _ar_ = 1; + if(_as_ >= 1){ + var i = _ar_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _au_ = i + 1 | 0; - if(_at_ === i) break; - var i = _au_; + /*<>*/ /*<>*/ var _at_ = i + 1 | 0; + if(_as_ === i) break; + var i = _at_; } } /*<>*/ return res; @@ -6907,15 +6909,15 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_make_vect(sx, [0]), - /*<>*/ _aq_ = sx - 1 | 0, - /*<>*/ _ap_ = 0; - if(_aq_ >= 0){ - var x = _ap_; + /*<>*/ _ap_ = sx - 1 | 0, + /*<>*/ _ao_ = 0; + if(_ap_ >= 0){ + var x = _ao_; for(;;){ res[1 + x] = /*<>*/ caml_make_vect(sy, init); - /*<>*/ /*<>*/ var _ar_ = x + 1 | 0; - if(_aq_ === x) break; - var x = _ar_; + /*<>*/ /*<>*/ var _aq_ = x + 1 | 0; + if(_ap_ === x) break; + var x = _aq_; } } /*<>*/ return res; @@ -6966,15 +6968,15 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _an_ = a.length - 1 - 1 | 0, - /*<>*/ _am_ = 0; - if(_an_ >= 0){ - var i = _am_; + _am_ = a.length - 1 - 1 | 0, + /*<>*/ _al_ = 0; + if(_am_ >= 0){ + var i = _al_; for(;;){ /*<>*/ /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; - if(_an_ === i) break; - var i = _ao_; + /*<>*/ /*<>*/ var _an_ = i + 1 | 0; + if(_am_ === i) break; + var i = _an_; } } return 0; @@ -6984,16 +6986,16 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_iter2_arrays_must_ha); /*<>*/ var - _ak_ = a.length - 1 - 1 | 0, - /*<>*/ _aj_ = 0; - if(_ak_ >= 0){ - var i = _aj_; + _aj_ = a.length - 1 - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _al_ = i + 1 | 0; - if(_ak_ === i) break; - var i = _al_; + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ === i) break; + var i = _ak_; } } return 0; @@ -7005,16 +7007,16 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _ah_ = l - 1 | 0, - /*<>*/ _ag_ = 1; - if(_ah_ >= 1){ - var i = _ag_; + /*<>*/ _ag_ = l - 1 | 0, + /*<>*/ _af_ = 1; + if(_ag_ >= 1){ + var i = _af_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ai_ = i + 1 | 0; - if(_ah_ === i) break; - var i = _ai_; + /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; + if(_ag_ === i) break; + var i = _ah_; } } /*<>*/ return r; @@ -7031,32 +7033,32 @@ /*<>*/ r = /*<>*/ caml_make_vect (la, /*<>*/ caml_call2(f, a[1], b[1])), - /*<>*/ _ae_ = la - 1 | 0, - /*<>*/ _ad_ = 1; - if(_ae_ >= 1){ - var i = _ad_; + /*<>*/ _ad_ = la - 1 | 0, + /*<>*/ _ac_ = 1; + if(_ad_ >= 1){ + var i = _ac_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _af_ = i + 1 | 0; - if(_ae_ === i) break; - var i = _af_; + /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; + if(_ad_ === i) break; + var i = _ae_; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ /*<>*/ var - _ab_ = a.length - 1 - 1 | 0, - /*<>*/ _aa_ = 0; - if(_ab_ >= 0){ - var i = _aa_; + _aa_ = a.length - 1 - 1 | 0, + /*<>*/ _$_ = 0; + if(_aa_ >= 0){ + var i = _$_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; - if(_ab_ === i) break; - var i = _ac_; + /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; + if(_aa_ === i) break; + var i = _ab_; } } return 0; @@ -7068,16 +7070,16 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call2(f, 0, a[1])), - /*<>*/ ___ = l - 1 | 0, - /*<>*/ _Z_ = 1; - if(___ >= 1){ - var i = _Z_; + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 1; + if(_Z_ >= 1){ + var i = _Y_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _$_ = i + 1 | 0; - if(___ === i) break; - var i = _$_; + /*<>*/ /*<>*/ var ___ = i + 1 | 0; + if(_Z_ === i) break; + var i = ___; } } /*<>*/ return r; @@ -7126,15 +7128,15 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _X_ = a.length - 1 - 1 | 0, - /*<>*/ _W_ = 0; - if(_X_ >= 0){ - var i = _W_; + _W_ = a.length - 1 - 1 | 0, + /*<>*/ _V_ = 0; + if(_W_ >= 0){ + var i = _V_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; - if(_X_ === i) break; - var i = _Y_; + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + if(_W_ === i) break; + var i = _X_; } } return r[1]; @@ -7151,10 +7153,10 @@ /*<>*/ output_array = /*<>*/ caml_make_vect(len, elt), /*<>*/ acc$1 = [0, acc$0], - /*<>*/ _U_ = len - 1 | 0, - /*<>*/ _T_ = 1; - if(_U_ >= 1){ - var i = _T_; + /*<>*/ _T_ = len - 1 | 0, + /*<>*/ _S_ = 1; + if(_T_ >= 1){ + var i = _S_; for(;;){ /*<>*/ var /*<>*/ match$0 = @@ -7163,9 +7165,9 @@ acc$2 = match$0[1]; acc$1[1] = acc$2; /*<>*/ output_array[1 + i] = elt$0; - /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ === i) break; - var i = _V_; + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ === i) break; + var i = _U_; } } /*<>*/ return [0, acc$1[1], output_array]; @@ -7173,14 +7175,14 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _R_ = a.length - 1 - 1 | 0; - if(_R_ >= 0){ - var i = _R_; + /*<>*/ _Q_ = a.length - 1 - 1 | 0; + if(_Q_ >= 0){ + var i = _Q_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _S_ = i - 1 | 0; + /*<>*/ /*<>*/ var _R_ = i - 1 | 0; if(0 === i) break; - var i = _S_; + var i = _R_; } } return r[1]; @@ -7300,17 +7302,17 @@ /*<>*/ caml_make_vect(n, a0), /*<>*/ b = /*<>*/ caml_make_vect(n, b0), - /*<>*/ _P_ = n - 1 | 0, - /*<>*/ _O_ = 1; - if(_P_ >= 1){ - var i = _O_; + /*<>*/ _O_ = n - 1 | 0, + /*<>*/ _N_ = 1; + if(_O_ >= 1){ + var i = _N_; for(;;){ var match$0 = x[1 + i], bi = match$0[2], ai = match$0[1]; /*<>*/ a[1 + i] = ai; /*<>*/ b[1 + i] = bi; - /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(_P_ === i) break; - var i = _Q_; + /*<>*/ /*<>*/ var _P_ = i + 1 | 0; + if(_O_ === i) break; + var i = _P_; } } /*<>*/ return [0, a, b]; @@ -7326,15 +7328,15 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), - /*<>*/ _M_ = na - 1 | 0, - /*<>*/ _L_ = 1; - if(_M_ >= 1){ - var i = _L_; + /*<>*/ _L_ = na - 1 | 0, + /*<>*/ _K_ = 1; + if(_L_ >= 1){ + var i = _K_; for(;;){ x[1 + i] = [0, a[1 + i], b[1 + i]]; - /*<>*/ /*<>*/ var _N_ = i + 1 | 0; - if(_M_ === i) break; - var i = _N_; + /*<>*/ /*<>*/ var _M_ = i + 1 | 0; + if(_L_ === i) break; + var i = _M_; } } /*<>*/ return x; @@ -7348,42 +7350,42 @@ /*<>*/ x = [0, i31]; if((i31 + 2 | 0) < l){ /*<>*/ var - /*<>*/ _E_ = i31 + 1 | 0, - /*<>*/ _F_ = caml_check_bound(a, _E_)[1 + _E_]; + /*<>*/ _D_ = i31 + 1 | 0, + /*<>*/ _E_ = caml_check_bound(a, _D_)[1 + _D_]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _F_) + (cmp, caml_check_bound(a, i31)[1 + i31], _E_) < 0) x[1] = i31 + 1 | 0; /*<>*/ var - /*<>*/ _G_ = i31 + 2 | 0, - /*<>*/ _H_ = caml_check_bound(a, _G_)[1 + _G_], - _I_ = x[1]; + /*<>*/ _F_ = i31 + 2 | 0, + /*<>*/ _G_ = caml_check_bound(a, _F_)[1 + _F_], + _H_ = x[1]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, _I_)[1 + _I_], _H_) + (cmp, caml_check_bound(a, _H_)[1 + _H_], _G_) < 0) x[1] = i31 + 2 | 0; return x[1]; } if((i31 + 1 | 0) < l){ /*<>*/ var - _J_ = i31 + 1 | 0, - /*<>*/ _K_ = caml_check_bound(a, _J_)[1 + _J_]; + _I_ = i31 + 1 | 0, + /*<>*/ _J_ = caml_check_bound(a, _I_)[1 + _I_]; /*<>*/ if (0 > /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _K_)) + (cmp, caml_check_bound(a, i31)[1 + i31], _J_)) /*<>*/ return i31 + 1 | 0; } if(i31 < l) /*<>*/ return i31; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _y_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_y_ >= 0){ - var i$6 = _y_; + var l = a.length - 1, _x_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_x_ >= 0){ + var i$6 = _x_; for(;;){ /*<>*/ /*<>*/ var e$1 = caml_check_bound(a, i$6)[1 + i$6]; @@ -7401,8 +7403,8 @@ break; } /*<>*/ /*<>*/ var - _v_ = caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _v_; + _u_ = caml_check_bound(a, j)[1 + j]; + /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; var i = j; } } @@ -7412,14 +7414,14 @@ var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } - /*<>*/ /*<>*/ var _D_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; if(0 === i$6) break; - var i$6 = _D_; + var i$6 = _C_; } } - /*<>*/ /*<>*/ var _z_ = l - 1 | 0; - if(_z_ >= 2){ - var i$4 = _z_; + /*<>*/ /*<>*/ var _y_ = l - 1 | 0; + if(_y_ >= 2){ + var i$4 = _y_; a: for(;;){ /*<>*/ /*<>*/ var @@ -7431,8 +7433,8 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ j$0 = maxson(i$4, i$1), - /*<>*/ _w_ = caml_check_bound(a, j$0)[1 + j$0]; - /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _w_; + /*<>*/ _v_ = caml_check_bound(a, j$0)[1 + j$0]; + /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _v_; var i$1 = j$0; } } @@ -7453,30 +7455,30 @@ /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; else{ /*<>*/ /*<>*/ var - _x_ = caml_check_bound(a, father)[1 + father]; - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _x_; + _w_ = caml_check_bound(a, father)[1 + father]; + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _w_; if(0 < father){var i$3 = father; continue;} /*<>*/ caml_check_bound(a, 0)[1] = e$0; } - /*<>*/ /*<>*/ var _C_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; if(2 === i$4) break a; - var i$4 = _C_; + var i$4 = _B_; break; } } } } - var _A_ = 1 < l ? 1 : 0; - if(_A_){ + var _z_ = 1 < l ? 1 : 0; + if(_z_){ /*<>*/ /*<>*/ var e = caml_check_bound(a, 1)[2]; /*<>*/ a[2] = caml_check_bound(a, 0)[1]; /*<>*/ a[1] = e; - var _B_ = 0; + var _A_ = 0; } else - var _B_ = _A_; - /*<>*/ return _B_; + var _A_ = _z_; + /*<>*/ return _A_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -7520,38 +7522,38 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _n_ = len - 1 | 0, - /*<>*/ _m_ = 0; - if(_n_ >= 0){ - var i = _m_; + _m_ = len - 1 | 0, + /*<>*/ _l_ = 0; + if(_m_ >= 0){ + var i = _l_; a: for(;;){ /*<>*/ var - _o_ = srcofs + i | 0, - /*<>*/ e = caml_check_bound(a, _o_)[1 + _o_], + _n_ = srcofs + i | 0, + /*<>*/ e = caml_check_bound(a, _n_)[1 + _n_], /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; for(;;){ if(dstofs <= j[1]){ - var _p_ = j[1]; + var _o_ = j[1]; /*<>*/ if (0 < /*<>*/ caml_call2 - (cmp, caml_check_bound(dst, _p_)[1 + _p_], e)){ + (cmp, caml_check_bound(dst, _o_)[1 + _o_], e)){ /*<>*/ var - _q_ = j[1], - /*<>*/ _r_ = caml_check_bound(dst, _q_)[1 + _q_], - _s_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = _r_; + _p_ = j[1], + /*<>*/ _q_ = caml_check_bound(dst, _p_)[1 + _p_], + _r_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _r_)[1 + _r_] = _q_; j[1] += -1; continue; } } - var _t_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _t_)[1 + _t_] = e; - /*<>*/ /*<>*/ var _u_ = i + 1 | 0; - if(_n_ === i) break a; - var i = _u_; + var _s_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; + /*<>*/ /*<>*/ var _t_ = i + 1 | 0; + if(_m_ === i) break a; + var i = _t_; break; } } @@ -7561,14 +7563,14 @@ function sortto(srcofs, dst, dstofs, len){ /*<>*/ if(len <= 5){ /*<>*/ isortto(srcofs, dst, dstofs, len); - /*<>*/ return _b_; + /*<>*/ return sentinal; } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); /*<>*/ merge (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ return _b_; + /*<>*/ return sentinal; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -7587,14 +7589,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _k_ = i + 1 | 0; + /*<>*/ _j_ = i + 1 | 0; /*<>*/ return [0, x, - function(_l_){ /*<>*/ return aux(_k_, _l_);}]; + function(_k_){ /*<>*/ return aux(_j_, _k_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _i_ = 0; - /*<>*/ return function(_j_){ - /*<>*/ return aux(_i_, _j_);}; + /*<>*/ /*<>*/ var _h_ = 0; + /*<>*/ return function(_i_){ + /*<>*/ return aux(_h_, _i_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -7602,22 +7604,22 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _g_ = i + 1 | 0; + /*<>*/ _f_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_h_){ /*<>*/ return aux(_g_, _h_);}]; + function(_g_){ /*<>*/ return aux(_f_, _g_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _e_ = 0; - /*<>*/ return function(_f_){ - /*<>*/ return aux(_e_, _f_);}; + /*<>*/ /*<>*/ var _d_ = 0; + /*<>*/ return function(_e_){ + /*<>*/ return aux(_d_, _e_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _c_ = 0; - function _d_(acc, x){ + /*<>*/ var _b_ = 0; + function _c_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ /*<>*/ var - l = /*<>*/ caml_call3(Stdlib_Seq[5], _d_, _c_, i$2); + l = /*<>*/ caml_call3(Stdlib_Seq[5], _c_, _b_, i$2); if(! l) /*<>*/ return [0]; /*<>*/ var tl = l[2], @@ -7716,7 +7718,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - _j_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Stdlib_List = global_data.Stdlib__List, @@ -7759,8 +7761,8 @@ pi = 3.141592653589793; function is_integer(x){ /*<>*/ var - _ar_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; - return _ar_ ? is_finite(x) : _ar_; + _aq_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; + return _aq_ ? is_finite(x) : _aq_; /*<>*/ } function succ(x){ /*<>*/ return /*<>*/ caml_nextafter_float @@ -7857,34 +7859,34 @@ (10, 100, 0, x); /*<>*/ } function unsafe_fill(a, ofs, len, v){ - /*<>*/ var _ap_ = (ofs + len | 0) - 1 | 0; - if(_ap_ >= ofs){ + /*<>*/ var _ao_ = (ofs + len | 0) - 1 | 0; + if(_ao_ >= ofs){ var i = ofs; for(;;){ /*<>*/ a[1 + i] = v; - /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; - if(_ap_ === i) break; - var i = _aq_; + /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; + if(_ao_ === i) break; + var i = _ap_; } } return 0; /*<>*/ } function check(a, ofs, len, msg){ - /*<>*/ var _al_ = ofs < 0 ? 1 : 0; - if(_al_) - var _am_ = _al_; + /*<>*/ var _ak_ = ofs < 0 ? 1 : 0; + if(_ak_) + var _al_ = _ak_; else{ - var _an_ = len < 0 ? 1 : 0; - if(_an_) - var _am_ = _an_; + var _am_ = len < 0 ? 1 : 0; + if(_am_) + var _al_ = _am_; else var - _ao_ = (ofs + len | 0) < 0 ? 1 : 0, - _am_ = _ao_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); + _an_ = (ofs + len | 0) < 0 ? 1 : 0, + _al_ = _an_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); } - return _am_ - ? ( /*<>*/ caml_call1(Stdlib[1], msg), _j_) - : _am_; + return _al_ + ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) + : _al_; /*<>*/ } function make(n, v){ /*<>*/ /*<>*/ var @@ -7899,16 +7901,16 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_floatarray_create(l), - /*<>*/ _aj_ = l - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + /*<>*/ _ai_ = l - 1 | 0, + /*<>*/ _ah_ = 0; + if(_ai_ >= 0){ + var i = _ah_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; + /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; + if(_ai_ === i) break; + var i = _aj_; } } /*<>*/ return res; @@ -7990,11 +7992,11 @@ (src, sofs, dst, dofs, len); /*<>*/ } function to_list(a){ - /*<>*/ function _ag_(_ah_){ - /*<>*/ return a[1 + _ah_]; + /*<>*/ function _af_(_ag_){ + /*<>*/ return a[1 + _ag_]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[10], a.length - 1, _ag_); + (Stdlib_List[10], a.length - 1, _af_); /*<>*/ } function of_list(l){ /*<>*/ var @@ -8015,16 +8017,16 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _ae_ = a.length - 1 - 1 | 0, - /*<>*/ _ad_ = 0; - if(_ae_ >= 0){ - var i = _ad_; + _ad_ = a.length - 1 - 1 | 0, + /*<>*/ _ac_ = 0; + if(_ad_ >= 0){ + var i = _ac_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); - /*<>*/ /*<>*/ var _af_ = i + 1 | 0; - if(_ae_ === i) break; - var i = _af_; + /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; + if(_ad_ === i) break; + var i = _ae_; } } return 0; @@ -8034,16 +8036,16 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_iter2_arrays_m); /*<>*/ var - _ab_ = a.length - 1 - 1 | 0, - /*<>*/ _aa_ = 0; - if(_ab_ >= 0){ - var i = _aa_; + _aa_ = a.length - 1 - 1 | 0, + /*<>*/ _$_ = 0; + if(_aa_ >= 0){ + var i = _$_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; - if(_ab_ === i) break; - var i = _ac_; + /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; + if(_aa_ === i) break; + var i = _ab_; } } return 0; @@ -8053,16 +8055,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ ___ = l - 1 | 0, - /*<>*/ _Z_ = 0; - if(___ >= 0){ - var i = _Z_; + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 0; + if(_Z_ >= 0){ + var i = _Y_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _$_ = i + 1 | 0; - if(___ === i) break; - var i = _$_; + /*<>*/ /*<>*/ var ___ = i + 1 | 0; + if(_Z_ === i) break; + var i = ___; } } /*<>*/ return r; @@ -8077,32 +8079,32 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_floatarray_create(la), - /*<>*/ _X_ = la - 1 | 0, - /*<>*/ _W_ = 0; - if(_X_ >= 0){ - var i = _W_; + /*<>*/ _W_ = la - 1 | 0, + /*<>*/ _V_ = 0; + if(_W_ >= 0){ + var i = _V_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; - if(_X_ === i) break; - var i = _Y_; + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + if(_W_ === i) break; + var i = _X_; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ /*<>*/ var - _U_ = a.length - 1 - 1 | 0, - /*<>*/ _T_ = 0; - if(_U_ >= 0){ - var i = _T_; + _T_ = a.length - 1 - 1 | 0, + /*<>*/ _S_ = 0; + if(_T_ >= 0){ + var i = _S_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ === i) break; - var i = _V_; + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ === i) break; + var i = _U_; } } return 0; @@ -8112,16 +8114,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _R_ = l - 1 | 0, - /*<>*/ _Q_ = 0; - if(_R_ >= 0){ - var i = _Q_; + /*<>*/ _Q_ = l - 1 | 0, + /*<>*/ _P_ = 0; + if(_Q_ >= 0){ + var i = _P_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _S_ = i + 1 | 0; - if(_R_ === i) break; - var i = _S_; + /*<>*/ /*<>*/ var _R_ = i + 1 | 0; + if(_Q_ === i) break; + var i = _R_; } } /*<>*/ return r; @@ -8129,15 +8131,15 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _O_ = a.length - 1 - 1 | 0, - /*<>*/ _N_ = 0; - if(_O_ >= 0){ - var i = _N_; + _N_ = a.length - 1 - 1 | 0, + /*<>*/ _M_ = 0; + if(_N_ >= 0){ + var i = _M_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ === i) break; - var i = _P_; + /*<>*/ /*<>*/ var _O_ = i + 1 | 0; + if(_N_ === i) break; + var i = _O_; } } return r[1]; @@ -8145,14 +8147,14 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _L_ = a.length - 1 - 1 | 0; - if(_L_ >= 0){ - var i = _L_; + /*<>*/ _K_ = a.length - 1 - 1 | 0; + if(_K_ >= 0){ + var i = _K_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _M_ = i - 1 | 0; + /*<>*/ /*<>*/ var _L_ = i - 1 | 0; if(0 === i) break; - var i = _M_; + var i = _L_; } } return r[1]; @@ -8240,9 +8242,9 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _F_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_F_ >= 0){ - var i$6 = _F_; + var l = a.length - 1, _E_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_E_ >= 0){ + var i$6 = _E_; for(;;){ /*<>*/ /*<>*/ var e$1 = /*<>*/ caml_array_get(a, i$6); @@ -8272,14 +8274,14 @@ /*<>*/ /*<>*/ caml_array_set (a, i$0, e$1); } - /*<>*/ /*<>*/ var _K_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; if(0 === i$6) break; - var i$6 = _K_; + var i$6 = _J_; } } - /*<>*/ /*<>*/ var _G_ = l - 1 | 0; - if(_G_ >= 2){ - var i$4 = _G_; + /*<>*/ /*<>*/ var _F_ = l - 1 | 0; + if(_F_ >= 2){ + var i$4 = _F_; a: for(;;){ /*<>*/ /*<>*/ var @@ -8320,25 +8322,25 @@ /*<>*/ /*<>*/ caml_array_set (a, 0, e$0); } - /*<>*/ /*<>*/ var _J_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; if(2 === i$4) break a; - var i$4 = _J_; + var i$4 = _I_; break; } } } } - var _H_ = 1 < l ? 1 : 0; - if(_H_){ + var _G_ = 1 < l ? 1 : 0; + if(_G_){ /*<>*/ /*<>*/ var e = /*<>*/ caml_array_get(a, 1); /*<>*/ /*<>*/ caml_array_set (a, 1, /*<>*/ caml_array_get(a, 0)); - var _I_ = /*<>*/ caml_array_set(a, 0, e); + var _H_ = /*<>*/ caml_array_set(a, 0, e); } else - var _I_ = _H_; - /*<>*/ return _I_; + var _H_ = _G_; + /*<>*/ return _H_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -8388,10 +8390,10 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _D_ = len - 1 | 0, - /*<>*/ _C_ = 0; - if(_D_ >= 0){ - var i = _C_; + _C_ = len - 1 | 0, + /*<>*/ _B_ = 0; + if(_C_ >= 0){ + var i = _B_; a: for(;;){ /*<>*/ var @@ -8415,9 +8417,9 @@ } /*<>*/ /*<>*/ caml_array_set (dst, j[1] + 1 | 0, e); - /*<>*/ /*<>*/ var _E_ = i + 1 | 0; - if(_D_ === i) break a; - var i = _E_; + /*<>*/ /*<>*/ var _D_ = i + 1 | 0; + if(_C_ === i) break a; + var i = _D_; break; } } @@ -8427,14 +8429,14 @@ function sortto(srcofs, dst, dstofs, len){ /*<>*/ if(len <= 5){ /*<>*/ isortto(srcofs, dst, dstofs, len); - /*<>*/ return _j_; + /*<>*/ return sentinal; } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); /*<>*/ merge (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ return _j_; + /*<>*/ return sentinal; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -8453,14 +8455,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _A_ = i + 1 | 0; + /*<>*/ _z_ = i + 1 | 0; /*<>*/ return [0, x, - function(_B_){ /*<>*/ return aux(_A_, _B_);}]; + function(_A_){ /*<>*/ return aux(_z_, _A_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _y_ = 0; - /*<>*/ return function(_z_){ - /*<>*/ return aux(_y_, _z_);}; + /*<>*/ /*<>*/ var _x_ = 0; + /*<>*/ return function(_y_){ + /*<>*/ return aux(_x_, _y_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -8468,23 +8470,23 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _w_ = i + 1 | 0; + /*<>*/ _v_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_x_){ /*<>*/ return aux(_w_, _x_);}]; + function(_w_){ /*<>*/ return aux(_v_, _w_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _u_ = 0; - /*<>*/ return function(_v_){ - /*<>*/ return aux(_u_, _v_);}; + /*<>*/ /*<>*/ var _t_ = 0; + /*<>*/ return function(_u_){ + /*<>*/ return aux(_t_, _u_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _s_ = 0; - function _t_(acc, x){ + /*<>*/ var _r_ = 0; + function _s_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ var /*<>*/ l = - /*<>*/ caml_call3(Stdlib_Seq[5], _t_, _s_, i$2), + /*<>*/ caml_call3(Stdlib_Seq[5], _s_, _r_, i$2), /*<>*/ len = /*<>*/ caml_call1(Stdlib_List[1], l), /*<>*/ a = @@ -8509,16 +8511,16 @@ /*<>*/ r = /*<>*/ runtime.caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _q_ = l - 1 | 0, - /*<>*/ _p_ = 1; - if(_q_ >= 1){ - var i = _p_; + /*<>*/ _p_ = l - 1 | 0, + /*<>*/ _o_ = 1; + if(_p_ >= 1){ + var i = _o_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _r_ = i + 1 | 0; - if(_q_ === i) break; - var i = _r_; + /*<>*/ /*<>*/ var _q_ = i + 1 | 0; + if(_p_ === i) break; + var i = _q_; } } /*<>*/ return r; @@ -8528,16 +8530,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _n_ = l - 1 | 0, - /*<>*/ _m_ = 0; - if(_n_ >= 0){ - var i = _m_; + /*<>*/ _m_ = l - 1 | 0, + /*<>*/ _l_ = 0; + if(_m_ >= 0){ + var i = _l_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _o_ = i + 1 | 0; - if(_n_ === i) break; - var i = _o_; + /*<>*/ /*<>*/ var _n_ = i + 1 | 0; + if(_m_ === i) break; + var i = _n_; } } /*<>*/ return r; @@ -8548,7 +8550,7 @@ _e_ = caml_array_get, _f_ = [0, - function(_l_){ /*<>*/ return _l_.length - 1;}, + function(_k_){ /*<>*/ return _k_.length - 1;}, _e_, _d_, make, @@ -8615,7 +8617,7 @@ min_max_num, hash, [0, - function(_k_){ /*<>*/ return _k_.length - 1;}, + function(_j_){ /*<>*/ return _j_.length - 1;}, _i_, _h_, make, @@ -9414,6 +9416,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } /*<>*/ var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Obj = global_data.Stdlib__Obj, Stdlib_Array = global_data.Stdlib__Array, @@ -9440,7 +9443,6 @@ 0, 0, 0], - _a_ = undefined, cst_syntax_error = "syntax error"; function grow_stacks(param){ /*<>*/ var @@ -9467,7 +9469,7 @@ (Stdlib_Array[8], env[4], 0, new_end, 0, oldsize); env[4] = new_end; env[5] = newsize; - return _a_; + return sentinal; /*<>*/ } function clear_parser(param){ /*<>*/ /*<>*/ caml_call4 @@ -9520,17 +9522,17 @@ case 4: try{ /*<>*/ var - _j_ = env[13], - /*<>*/ _k_ = + _i_ = env[13], + /*<>*/ _j_ = /*<>*/ caml_call1 - (caml_check_bound(tables[1], _j_)[1 + _j_], env), - /*<>*/ _l_ = 4, - value = _k_, - action = _l_; + (caml_check_bound(tables[1], _i_)[1 + _i_], env), + /*<>*/ _k_ = 4, + value = _j_, + action = _k_; } - catch(_n_){ - var _i_ = caml_wrap_exception(_n_); - if(_i_ !== Parse_error) throw caml_maybe_attach_backtrace(_i_, 0); + catch(_m_){ + var _h_ = caml_wrap_exception(_m_); + if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); var value = 0, action = 5; } var cmd = action, arg = value; @@ -9566,9 +9568,9 @@ ? 1 : 0; /*<>*/ /*<>*/ var - _m_ = /*<>*/ runtime.caml_obj_tag(tok); - /*<>*/ return caml_check_bound(tables[3], _m_) - [1 + _m_] + _l_ = /*<>*/ runtime.caml_obj_tag(tok); + /*<>*/ return caml_check_bound(tables[3], _l_) + [1 + _l_] === curr_char ? 1 : 0; @@ -9578,21 +9580,21 @@ } /*<>*/ } function peek_val(env, n){ - /*<>*/ var _h_ = env[11] - n | 0; - /*<>*/ return caml_check_bound(env[2], _h_)[1 + _h_]; + /*<>*/ var _g_ = env[11] - n | 0; + /*<>*/ return caml_check_bound(env[2], _g_)[1 + _g_]; /*<>*/ } function symbol_start_pos(param){ /*<>*/ var i$1 = env[12], i = i$1; /*<>*/ for(;;){ if(0 >= i){ - var _g_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _g_)[1 + _g_]; + var _f_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _f_)[1 + _f_]; } /*<>*/ var + _d_ = (env[11] - i | 0) + 1 | 0, + /*<>*/ st = caml_check_bound(env[3], _d_)[1 + _d_], _e_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ st = caml_check_bound(env[3], _e_)[1 + _e_], - _f_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ en = caml_check_bound(env[4], _f_)[1 + _f_]; + /*<>*/ en = caml_check_bound(env[4], _e_)[1 + _e_]; /*<>*/ if ( /*<>*/ runtime.caml_notequal(st, en)) /*<>*/ return st; @@ -9602,16 +9604,16 @@ } /*<>*/ } function symbol_end_pos(param){ - /*<>*/ var _d_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _d_)[1 + _d_]; + /*<>*/ var _c_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _c_)[1 + _c_]; /*<>*/ } function rhs_start_pos(n){ - /*<>*/ var _c_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[3], _c_)[1 + _c_]; + /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[3], _b_)[1 + _b_]; /*<>*/ } function rhs_end_pos(n){ - /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[4], _b_)[1 + _b_]; + /*<>*/ var _a_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[4], _a_)[1 + _a_]; /*<>*/ } function symbol_start(param){ /*<>*/ return symbol_start_pos(0)[4]; @@ -12006,6 +12008,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib_Sys = global_data.Stdlib__Sys, @@ -12013,7 +12016,6 @@ Stdlib = global_data.Stdlib, Stdlib_String = global_data.Stdlib__String, Assert_failure = global_data.Assert_failure, - _b_ = undefined, cst_Buffer_truncate = "Buffer.truncate", _a_ = [0, "buffer.ml", 220, 9], cst_Buffer_add_channel = "Buffer.add_channel", @@ -12102,7 +12104,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_Bytes[11], b[1][1], 0, new_buffer, 0, b[2]); b[1] = [0, new_buffer, new_len[1]]; - return _b_; + return sentinal; } new_len[1] = 2 * new_len[1] | 0; } @@ -12164,14 +12166,14 @@ } /*<>*/ } function add_substring(b, s, offset, len){ - /*<>*/ var _s_ = offset < 0 ? 1 : 0; - if(_s_) - var _t_ = _s_; + /*<>*/ var _r_ = offset < 0 ? 1 : 0; + if(_r_) + var _s_ = _r_; else var - _u_ = len < 0 ? 1 : 0, - _t_ = _u_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); - if(_t_) + _t_ = len < 0 ? 1 : 0, + _s_ = _t_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); + if(_s_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Buffer_add_substring_add_s); /*<>*/ var @@ -12226,9 +12228,9 @@ /*<>*/ } function add_channel(b, ic, to_read$1){ /*<>*/ var - _q_ = to_read$1 < 0 ? 1 : 0, - _r_ = _q_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); - if(_r_) + _p_ = to_read$1 < 0 ? 1 : 0, + _q_ = _p_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); + if(_q_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Buffer_add_channel); if(b[1][2] < (b[2] + to_read$1 | 0)) @@ -12274,8 +12276,8 @@ i$4 = 0; /*<>*/ for(;;){ if(i$4 >= lim$1){ - var _p_ = 92 === previous ? 1 : 0; - return _p_ ? add_char(b, previous) : _p_; + var _o_ = 92 === previous ? 1 : 0; + return _o_ ? add_char(b, previous) : _o_; } /*<>*/ /*<>*/ var previous$0 = /*<>*/ caml_string_get(s, i$4); @@ -12415,14 +12417,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _n_ = i + 1 | 0; + /*<>*/ _m_ = i + 1 | 0; /*<>*/ return [0, x, - function(_o_){ /*<>*/ return aux(_n_, _o_);}]; + function(_n_){ /*<>*/ return aux(_m_, _n_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _l_ = 0; - /*<>*/ return function(_m_){ - /*<>*/ return aux(_l_, _m_);}; + /*<>*/ /*<>*/ var _k_ = 0; + /*<>*/ return function(_l_){ + /*<>*/ return aux(_k_, _l_);}; /*<>*/ } function to_seqi(b){ function aux(i, param){ @@ -12431,21 +12433,21 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _j_ = i + 1 | 0; + /*<>*/ _i_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_k_){ /*<>*/ return aux(_j_, _k_);}]; + function(_j_){ /*<>*/ return aux(_i_, _j_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _h_ = 0; - /*<>*/ return function(_i_){ - /*<>*/ return aux(_h_, _i_);}; + /*<>*/ /*<>*/ var _g_ = 0; + /*<>*/ return function(_h_){ + /*<>*/ return aux(_g_, _h_);}; /*<>*/ } function add_seq(b, seq){ - /*<>*/ function _f_(_g_){ - /*<>*/ return add_char(b, _g_); + /*<>*/ function _e_(_f_){ + /*<>*/ return add_char(b, _f_); } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _f_, seq); + (Stdlib_Seq[4], _e_, seq); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var b = create(32); @@ -12524,8 +12526,8 @@ return 0; /*<>*/ } function add_int16_le(b, x){ - /*<>*/ var _e_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; - return add_int16_ne(b, _e_); + /*<>*/ var _d_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; + return add_int16_ne(b, _d_); /*<>*/ } function add_int16_be(b, x){ /*<>*/ var x$0 = Stdlib_Sys[11] ? x : caml_bswap16(x); @@ -12533,8 +12535,8 @@ /*<>*/ } function add_int32_le(b, x){ /*<>*/ var - _d_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; - /*<>*/ return add_int32_ne(b, _d_); + _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; + /*<>*/ return add_int32_ne(b, _c_); /*<>*/ } function add_int32_be(b, x){ /*<>*/ var @@ -12543,8 +12545,8 @@ /*<>*/ } function add_int64_le(b, x){ /*<>*/ var - _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; - /*<>*/ return add_int64_ne(b, _c_); + _b_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; + /*<>*/ return add_int64_ne(b, _b_); /*<>*/ } function add_int64_be(b, x){ /*<>*/ var @@ -12785,7 +12787,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - _a_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Mutex = global_data.Stdlib__Mutex, Stdlib_Condition = global_data.Stdlib__Condition, @@ -12805,7 +12807,7 @@ /*<>*/ /*<>*/ var st = /*<>*/ caml_make_vect(8, unique_value); /*<>*/ /*<>*/ caml_domain_dls_set(st); - /*<>*/ return _a_; + /*<>*/ return sentinal; /*<>*/ } /*<>*/ create_dls(0); /*<>*/ var @@ -12894,7 +12896,7 @@ /*<>*/ first_spawn_function = [0, function(param){ - /*<>*/ return _a_; + /*<>*/ return sentinal; /*<>*/ }]; function before_first_spawn(f){ /*<>*/ if @@ -12915,7 +12917,7 @@ at_exit_key = new_key (0, - function(param, _f_){ + function(param, _e_){ /*<>*/ return 0; /*<>*/ }); function at_exit(f){ @@ -12950,8 +12952,8 @@ /*<>*/ }; } /*<>*/ /*<>*/ var - _b_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); - function _c_(param){ + _a_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); + function _b_(param){ /*<>*/ var split = param[2], k = param[1], idx = k[1]; /*<>*/ return [0, idx, @@ -12959,7 +12961,7 @@ /*<>*/ } /*<>*/ var /*<>*/ pk = - /*<>*/ caml_call2(Stdlib_List[19], _c_, _b_), + /*<>*/ caml_call2(Stdlib_List[19], _b_, _a_), /*<>*/ term_mutex = /*<>*/ caml_call1(Stdlib_Mutex[1], 0), /*<>*/ term_condition = @@ -12971,7 +12973,7 @@ /*<>*/ try{ /*<>*/ create_dls(0); var - _d_ = + _c_ = function(param){ /*<>*/ var v = param[2], @@ -12981,7 +12983,7 @@ /*<>*/ return 0; /*<>*/ }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _d_, pk); + (Stdlib_List[17], _c_, pk); /*<>*/ /*<>*/ var res = /*<>*/ caml_call1(f, 0); } @@ -12998,8 +13000,8 @@ catch(ex){ /*<>*/ var ex$0 = caml_wrap_exception(ex), - /*<>*/ _e_ = 0 === result[0] ? [1, ex$0] : result, - result$0 = _e_; + /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, + result$0 = _d_; } /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], term_mutex); @@ -13130,7 +13132,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - _$_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$9 = "%{", cst$10 = "%}", @@ -13457,14 +13459,14 @@ /*<>*/ var str_ind = c >>> 3 | 0, mask = 1 << (c & 7), - /*<>*/ _dT_ = + /*<>*/ _dS_ = /*<>*/ runtime.caml_bytes_get (char_set, str_ind) | mask; /*<>*/ return /*<>*/ caml_bytes_set (char_set, str_ind, - /*<>*/ caml_call1(Stdlib[29], _dT_)); + /*<>*/ caml_call1(Stdlib[29], _dS_)); /*<>*/ } function freeze_char_set(char_set){ /*<>*/ return /*<>*/ caml_call1 @@ -13476,19 +13478,19 @@ i = 0; for(;;){ /*<>*/ /*<>*/ var - _dR_ = + _dQ_ = /*<>*/ caml_string_get(char_set, i) ^ 255; /*<>*/ /*<>*/ caml_bytes_set (char_set$0, i, - /*<>*/ caml_call1(Stdlib[29], _dR_)); + /*<>*/ caml_call1(Stdlib[29], _dQ_)); /*<>*/ /*<>*/ var - _dS_ = i + 1 | 0; + _dR_ = i + 1 | 0; if(31 === i) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], char_set$0); - var i = _dS_; + var i = _dR_; } /*<>*/ } function is_in_char_set(char_set, c){ @@ -13548,11 +13550,11 @@ case 6: var prec_opt = ign[2], pad_opt$5 = ign[1]; if(prec_opt) - var ndec = prec_opt[1], _dQ_ = [0, ndec]; + var ndec = prec_opt[1], _dP_ = [0, ndec]; else - var _dQ_ = 0; + var _dP_ = 0; /*<>*/ return [0, - [8, _a_, pad_of_pad_opt(pad_opt$5), _dQ_, fmt]]; + [8, _a_, pad_of_pad_opt(pad_opt$5), _dP_, fmt]]; case 7: var pad_opt$6 = ign[1]; /*<>*/ return [0, @@ -13597,14 +13599,14 @@ (Stdlib_Bytes[11], buf[2], 0, new_str, 0, len); buf[2] = new_str; } - return _$_; + return sentinal; /*<>*/ } function buffer_add_char(buf, c){ /*<>*/ buffer_check_size(buf, 1); /*<>*/ /*<>*/ caml_bytes_set (buf[2], buf[1], c); buf[1] = buf[1] + 1 | 0; - return _$_; + return sentinal; /*<>*/ } function buffer_add_string(buf, s){ /*<>*/ var @@ -13613,7 +13615,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_String[48], s, 0, buf[2], buf[1], str_len); buf[1] = buf[1] + str_len | 0; - return _$_; + return sentinal; /*<>*/ } function buffer_contents(buf){ /*<>*/ return caml_call3 @@ -13670,64 +13672,64 @@ /*<>*/ switch(padty){ case 0: /*<>*/ buffer_add_char(buf, 45); - /*<>*/ return _$_; + /*<>*/ return sentinal; case 1: - /*<>*/ return _$_; + /*<>*/ return sentinal; default: /*<>*/ buffer_add_char(buf, 48); - /*<>*/ return _$_; + /*<>*/ return sentinal; } /*<>*/ } function bprint_ignored_flag(buf, ign_flag){ /*<>*/ return ign_flag - ? (buffer_add_char(buf, 95), _$_) + ? (buffer_add_char(buf, 95), sentinal) : ign_flag; /*<>*/ } function bprint_pad_opt(buf, pad_opt){ /*<>*/ if(! pad_opt) - /*<>*/ return _$_; + /*<>*/ return sentinal; var width = pad_opt[1]; /*<>*/ buffer_add_string (buf, /*<>*/ caml_call1(Stdlib_Int[12], width)); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function bprint_padding(buf, pad){ /*<>*/ if(typeof pad === "number") - /*<>*/ return _$_; + /*<>*/ return sentinal; if(0 === pad[0]){ var n = pad[2], padty = pad[1]; /*<>*/ bprint_padty(buf, padty); /*<>*/ buffer_add_string (buf, /*<>*/ caml_call1(Stdlib_Int[12], n)); - /*<>*/ return _$_; + /*<>*/ return sentinal; } var padty$0 = pad[1]; /*<>*/ bprint_padty(buf, padty$0); /*<>*/ buffer_add_char(buf, 42); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function bprint_precision(buf, prec){ /*<>*/ if(typeof prec === "number") - return prec ? (buffer_add_string(buf, cst), _$_) : _$_; + return prec ? (buffer_add_string(buf, cst), sentinal) : sentinal; var n = prec[1]; /*<>*/ buffer_add_char(buf, 46); /*<>*/ buffer_add_string (buf, /*<>*/ caml_call1(Stdlib_Int[12], n)); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function bprint_iconv_flag(buf, iconv){ /*<>*/ switch(iconv){ case 1: case 4: /*<>*/ buffer_add_char(buf, 43); - /*<>*/ return _$_; + /*<>*/ return sentinal; case 2: case 5: /*<>*/ buffer_add_char(buf, 32); - /*<>*/ return _$_; + /*<>*/ return sentinal; case 7: case 9: case 11: @@ -13735,8 +13737,8 @@ case 14: case 15: /*<>*/ buffer_add_char(buf, 35); - /*<>*/ return _$_; - default: /*<>*/ return _$_; + /*<>*/ return sentinal; + default: /*<>*/ return sentinal; } /*<>*/ } function bprint_altint_fmt(buf, ign_flag, iconv, pad, prec, c){ @@ -13748,7 +13750,7 @@ /*<>*/ buffer_add_char(buf, c); /*<>*/ buffer_add_char (buf, char_of_iconv(iconv)); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function bprint_fconv_flag(buf, fconv){ /*<>*/ switch(fconv[1]){ @@ -13757,7 +13759,7 @@ /*<>*/ buffer_add_char(buf, 43); break; default: /*<>*/ buffer_add_char(buf, 32); } - return 8 <= fconv[2] ? (buffer_add_char(buf, 35), _$_) : _$_; + return 8 <= fconv[2] ? (buffer_add_char(buf, 35), sentinal) : sentinal; /*<>*/ } function string_of_formatting_lit(formatting_lit){ /*<>*/ if @@ -13787,40 +13789,40 @@ default: /*<>*/ var c = formatting_lit[1], - /*<>*/ _dP_ = + /*<>*/ _dO_ = /*<>*/ caml_call2 (Stdlib_String[1], 1, c); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _dP_); + (Stdlib[28], cst$7, _dO_); } /*<>*/ } function bprint_char_literal(buf, chr){ /*<>*/ return 37 === chr - ? (buffer_add_string(buf, cst$8), _$_) - : (buffer_add_char(buf, chr), _$_); + ? (buffer_add_string(buf, cst$8), sentinal) + : (buffer_add_char(buf, chr), sentinal); /*<>*/ } function bprint_string_literal(buf, str){ /*<>*/ var - _dN_ = caml_ml_string_length(str) - 1 | 0, - /*<>*/ _dM_ = 0; - if(_dN_ >= 0){ - var i = _dM_; + _dM_ = caml_ml_string_length(str) - 1 | 0, + /*<>*/ _dL_ = 0; + if(_dM_ >= 0){ + var i = _dL_; for(;;){ /*<>*/ bprint_char_literal (buf, /*<>*/ caml_string_get(str, i)); /*<>*/ /*<>*/ var - _dO_ = i + 1 | 0; - if(_dN_ === i) break; - var i = _dO_; + _dN_ = i + 1 | 0; + if(_dM_ === i) break; + var i = _dN_; } } - return _$_; + return sentinal; /*<>*/ } function bprint_fmtty(buf, fmtty){ /*<>*/ var fmtty$0 = fmtty; /*<>*/ for(;;){ if(typeof fmtty$0 === "number") - /*<>*/ return _$_; + /*<>*/ return sentinal; switch(fmtty$0[0]){ case 0: var fmtty$1 = fmtty$0[1]; @@ -13918,7 +13920,7 @@ ign_flag$0 = ign_flag; /*<>*/ for(;;){ if(typeof fmt$0 === "number") - /*<>*/ return _$_; + /*<>*/ return sentinal; switch(fmt$0[0]){ case 0: var rest = fmt$0[1]; @@ -14122,11 +14124,17 @@ /*<>*/ caml_call1 (Stdlib[29], i); return 37 === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37), _$_) + ? (buffer_add_char + (buf, 37), + buffer_add_char(buf, 37), + sentinal) : 64 === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64), _$_) - : (buffer_add_char(buf, c), _$_); + ? (buffer_add_char + (buf, 37), + buffer_add_char(buf, 64), + sentinal) + : (buffer_add_char(buf, c), sentinal); /*<>*/ }; /*<>*/ buffer_add_char(buf, 91); /*<>*/ var @@ -14144,18 +14152,18 @@ /*<>*/ before = /*<>*/ caml_call1 (Stdlib_Char[1], c - 1 | 0), - /*<>*/ _dI_ = + /*<>*/ _dH_ = is_in_char_set(set, c); - /*<>*/ if(_dI_) + /*<>*/ if(_dH_) /*<>*/ var - /*<>*/ _dJ_ = + /*<>*/ _dI_ = is_in_char_set(set, before), - /*<>*/ _dK_ = - _dJ_ ? is_in_char_set(set, after) : _dJ_, - _dL_ = 1 - _dK_; + /*<>*/ _dJ_ = + _dI_ ? is_in_char_set(set, after) : _dI_, + _dK_ = 1 - _dJ_; else - var _dL_ = _dI_; - /*<>*/ return _dL_; + var _dK_ = _dH_; + /*<>*/ return _dK_; /*<>*/ } return is_alone; }, @@ -14289,12 +14297,12 @@ (buf, ign_flag$0); switch(counter){ case 0: - var _dE_ = 108; break; + var _dD_ = 108; break; case 1: - var _dE_ = 110; break; - default: var _dE_ = 78; + var _dD_ = 110; break; + default: var _dD_ = 78; } - /*<>*/ buffer_add_char(buf, _dE_); + /*<>*/ buffer_add_char(buf, _dD_); var fmt$0 = rest$20, ign_flag$0 = 0; break; case 22: @@ -14318,20 +14326,20 @@ /*<>*/ var rest$23 = fmt$0[3], arity = fmt$0[1], - /*<>*/ _dG_ = + /*<>*/ _dF_ = int_of_custom_arity(arity), - _dF_ = 1; - if(_dG_ >= 1){ - var i$8 = _dF_; + _dE_ = 1; + if(_dF_ >= 1){ + var i$8 = _dE_; for(;;){ /*<>*/ buffer_add_char(buf, 37); /*<>*/ bprint_ignored_flag (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 63); /*<>*/ /*<>*/ var - _dH_ = i$8 + 1 | 0; - if(_dG_ === i$8) break; - var i$8 = _dH_; + _dG_ = i$8 + 1 | 0; + if(_dF_ === i$8) break; + var i$8 = _dG_; } } var fmt$0 = rest$23, ign_flag$0 = 0; @@ -14403,17 +14411,17 @@ ed = match[3], af = match[2], fa = match[1], - _dj_ = + _di_ = function(param){ /*<>*/ af(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dj_, + _di_, ed, de]; case 1: @@ -14424,17 +14432,17 @@ ed$0 = match$0[3], af$0 = match$0[2], fa$0 = match$0[1], - _dk_ = + _dj_ = function(param){ /*<>*/ af$0(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$0(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dk_, + _dj_, ed$0, de$0]; case 2: @@ -14445,17 +14453,17 @@ ed$1 = match$1[3], af$1 = match$1[2], fa$1 = match$1[1], - _dl_ = + _dk_ = function(param){ /*<>*/ af$1(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$1(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dl_, + _dk_, ed$1, de$1]; case 3: @@ -14466,17 +14474,17 @@ ed$2 = match$2[3], af$2 = match$2[2], fa$2 = match$2[1], - _dm_ = + _dl_ = function(param){ /*<>*/ af$2(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$2(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dm_, + _dl_, ed$2, de$2]; case 4: @@ -14487,17 +14495,17 @@ ed$3 = match$3[3], af$3 = match$3[2], fa$3 = match$3[1], - _dn_ = + _dm_ = function(param){ /*<>*/ af$3(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$3(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dn_, + _dm_, ed$3, de$3]; case 5: @@ -14508,17 +14516,17 @@ ed$4 = match$4[3], af$4 = match$4[2], fa$4 = match$4[1], - _do_ = + _dn_ = function(param){ /*<>*/ af$4(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$4(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _do_, + _dn_, ed$4, de$4]; case 6: @@ -14529,17 +14537,17 @@ ed$5 = match$5[3], af$5 = match$5[2], fa$5 = match$5[1], - _dp_ = + _do_ = function(param){ /*<>*/ af$5(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$5(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dp_, + _do_, ed$5, de$5]; case 7: @@ -14550,17 +14558,17 @@ ed$6 = match$6[3], af$6 = match$6[2], fa$6 = match$6[1], - _dq_ = + _dp_ = function(param){ /*<>*/ af$6(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$6(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dq_, + _dp_, ed$6, de$6]; case 8: @@ -14571,17 +14579,17 @@ ed$7 = match$7[3], af$7 = match$7[2], fa$7 = match$7[1], - _dr_ = + _dq_ = function(param){ /*<>*/ af$7(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$7(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dr_, + _dq_, ed$7, de$7]; case 9: @@ -14600,33 +14608,33 @@ dj = match$9[3], ga = match$9[2], ag = match$9[1], - _ds_ = + _dr_ = function(param){ /*<>*/ jd(0); /*<>*/ de$8(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dt_ = + _ds_ = function(param){ /*<>*/ ed$8(0); /*<>*/ dj(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _du_ = + _dt_ = function(param){ /*<>*/ ga(0); /*<>*/ af$8(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$8(0); /*<>*/ ag(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _du_, _dt_, - _ds_]; + _ds_, + _dr_]; case 10: /*<>*/ var rest$9 = param[1], @@ -14636,17 +14644,17 @@ ed$9 = match$10[3], af$9 = match$10[2], fa$9 = match$10[1], - _dv_ = + _du_ = function(param){ /*<>*/ af$9(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$9(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dv_, + _du_, ed$9, de$9]; case 11: @@ -14658,17 +14666,17 @@ ed$10 = match$11[3], af$10 = match$11[2], fa$10 = match$11[1], - _dw_ = + _dv_ = function(param){ /*<>*/ af$10(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$10(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dw_, + _dv_, ed$10, de$10]; case 12: @@ -14680,17 +14688,17 @@ ed$11 = match$12[3], af$11 = match$12[2], fa$11 = match$12[1], - _dx_ = + _dw_ = function(param){ /*<>*/ af$11(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$11(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dx_, + _dw_, ed$11, de$11]; case 13: @@ -14702,29 +14710,29 @@ ed$12 = match$13[3], af$12 = match$13[2], fa$12 = match$13[1], - /*<>*/ _dy_ = + /*<>*/ _dx_ = function(param){ /*<>*/ de$12(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dz_ = + _dy_ = function(param){ /*<>*/ ed$12(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dA_ = + _dz_ = function(param){ /*<>*/ af$12(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$12(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dA_, _dz_, - _dy_]; + _dy_, + _dx_]; default: /*<>*/ var rest$13 = param[1], @@ -14734,46 +14742,46 @@ ed$13 = match$14[3], af$13 = match$14[2], fa$13 = match$14[1], - /*<>*/ _dB_ = + /*<>*/ _dA_ = function(param){ /*<>*/ de$13(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dC_ = + _dB_ = function(param){ /*<>*/ ed$13(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dD_ = + _dC_ = function(param){ /*<>*/ af$13(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$13(0); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _dD_, _dC_, - _dB_]; + _dB_, + _dA_]; } - /*<>*/ function _dg_(param){ - /*<>*/ return _$_; + /*<>*/ function _df_(param){ + /*<>*/ return sentinal; /*<>*/ } - function _dh_(param){ - /*<>*/ return _$_; + function _dg_(param){ + /*<>*/ return sentinal; /*<>*/ } - function _di_(param){ - /*<>*/ return _$_; + function _dh_(param){ + /*<>*/ return sentinal; /*<>*/ } /*<>*/ return [0, function(param){ - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, - _di_, _dh_, - _dg_]; + _dg_, + _df_]; /*<>*/ } function trans(ty1, ty2){ /*<>*/ a: @@ -14992,11 +15000,11 @@ /*<>*/ var rest2$7 = ty2[2], ty2$0 = ty2[1], - /*<>*/ _df_ = + /*<>*/ _de_ = trans(rest1$7, rest2$7); /*<>*/ return [8, trans(ty1$0, ty2$0), - _df_]; + _de_]; case 10: break a; case 11: @@ -15286,13 +15294,13 @@ /*<>*/ var rest$13 = fmtty$0[2], formatting_gen = fmtty$0[1], - /*<>*/ _dc_ = fmtty_of_fmt(rest$13); + /*<>*/ _db_ = fmtty_of_fmt(rest$13); if(0 === formatting_gen[0]) - var fmt = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt); + var fmt = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt); else - var fmt$0 = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt$0); + var fmt$0 = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt$0); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], _dd_, _dc_); + (CamlinternalFormatBasics[1], _dc_, _db_); case 19: var rest$14 = fmtty$0[1]; /*<>*/ return [13, @@ -15345,10 +15353,10 @@ case 9: /*<>*/ var fmtty$6 = ign[2], - /*<>*/ _de_ = + /*<>*/ _dd_ = fmtty_of_fmt(fmtty$5); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], fmtty$6, _de_); + (CamlinternalFormatBasics[1], fmtty$6, _dd_); case 10: var fmtty$0 = fmtty$5; break; default: var fmtty$0 = fmtty$5; @@ -15404,11 +15412,11 @@ /*<>*/ } function type_format(fmt, fmtty){ /*<>*/ /*<>*/ var - _db_ = type_format_gen(fmt, fmtty); - if(typeof _db_[2] !== "number") + _da_ = type_format_gen(fmt, fmtty); + if(typeof _da_[2] !== "number") /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); - var fmt$0 = _db_[1]; + var fmt$0 = _da_[1]; /*<>*/ return fmt$0; /*<>*/ } function type_ignored_param_one(ign, fmt, fmtty){ @@ -15693,7 +15701,7 @@ fmt_rest$13 = fmt[3], sub_fmtty$1 = fmt[2], pad_opt$0 = fmt[1], - /*<>*/ _c$_ = + /*<>*/ _c__ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty1)]; @@ -15702,7 +15710,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty$1)], - _c$_)) + _c__)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -15872,12 +15880,12 @@ /*<>*/ var sub_fmtty$3 = ign[2], pad_opt$2 = ign[1], - /*<>*/ _da_ = + /*<>*/ _c$_ = type_ignored_format_substituti(sub_fmtty$3, rest, fmtty0), - match$43 = _da_[2], + match$43 = _c$_[2], fmtty$21 = match$43[2], fmt$22 = match$43[1], - sub_fmtty$4 = _da_[1]; + sub_fmtty$4 = _c$_[1]; /*<>*/ return [0, [23, [9, pad_opt$2, sub_fmtty$4], fmt$22], fmtty$21]; @@ -16069,7 +16077,7 @@ sub_fmtty_rest$17 = sub_fmtty[3], sub2_fmtty$2 = sub_fmtty[2], sub1_fmtty$0 = sub_fmtty[1], - /*<>*/ _c9_ = + /*<>*/ _c8_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty)]; @@ -16078,11 +16086,11 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty$0)], - _c9_)) + _c8_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ /*<>*/ var - _c__ = + _c9_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$1)]; @@ -16091,7 +16099,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$2)], - _c__)) + _c9_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -16183,11 +16191,11 @@ /*<>*/ } function recast(fmt, fmtty){ /*<>*/ /*<>*/ var - _c8_ = symm(fmtty); + _c7_ = symm(fmtty); /*<>*/ return type_format (fmt, /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _c8_)); + (CamlinternalFormatBasics[2], _c7_)); /*<>*/ } function fix_padding(padty, width, str){ /*<>*/ var @@ -16197,10 +16205,10 @@ /*<>*/ caml_call1(Stdlib[18], width); if(width$0 <= len) /*<>*/ return str; /*<>*/ var - _c7_ = 2 === padty$0 ? 48 : 32, + _c6_ = 2 === padty$0 ? 48 : 32, /*<>*/ res = /*<>*/ caml_call2 - (Stdlib_Bytes[1], width$0, _c7_); + (Stdlib_Bytes[1], width$0, _c6_); /*<>*/ switch(padty$0){ case 0: /*<>*/ /*<>*/ caml_call5 @@ -16392,16 +16400,16 @@ /*<>*/ return s; /*<>*/ var /*<>*/ n = [0, 0], - _c2_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c1_ = 0; - if(_c2_ >= 0){ - var i$0 = _c1_; + _c1_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c0_ = 0; + if(_c1_ >= 0){ + var i$0 = _c0_; for(;;){ if(9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) n[1]++; /*<>*/ /*<>*/ var - _c6_ = i$0 + 1 | 0; - if(_c2_ === i$0) break; - var i$0 = _c6_; + _c5_ = i$0 + 1 | 0; + if(_c1_ === i$0) break; + var i$0 = _c5_; } } /*<>*/ var @@ -16414,15 +16422,15 @@ /*<>*/ /*<>*/ caml_bytes_set (buf, pos[1], c); pos[1]++; - return _$_; + return sentinal; /*<>*/ } /*<>*/ var /*<>*/ left = [0, ((digits - 1 | 0) % 3 | 0) + 1 | 0], - _c4_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c3_ = 0; - if(_c4_ >= 0){ - var i = _c3_; + _c3_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c2_ = 0; + if(_c3_ >= 0){ + var i = _c2_; for(;;){ var c = caml_string_unsafe_get(s, i); if(9 < c - 48 >>> 0) @@ -16436,9 +16444,9 @@ /*<>*/ put(c); } /*<>*/ /*<>*/ var - _c5_ = i + 1 | 0; - if(_c4_ === i) break; - var i = _c5_; + _c4_ = i + 1 | 0; + if(_c3_ === i) break; + var i = _c4_; } } /*<>*/ return /*<>*/ caml_call1 @@ -16447,139 +16455,139 @@ function convert_int(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _c0_ = cst_d$0; break; + var _cZ_ = cst_d$0; break; case 2: - var _c0_ = cst_d$1; break; + var _cZ_ = cst_d$1; break; case 4: - var _c0_ = cst_i$1; break; + var _cZ_ = cst_i$1; break; case 5: - var _c0_ = cst_i$2; break; + var _cZ_ = cst_i$2; break; case 6: - var _c0_ = cst_x; break; + var _cZ_ = cst_x; break; case 7: - var _c0_ = cst_x$0; break; + var _cZ_ = cst_x$0; break; case 8: - var _c0_ = cst_X; break; + var _cZ_ = cst_X; break; case 9: - var _c0_ = cst_X$0; break; + var _cZ_ = cst_X$0; break; case 10: - var _c0_ = cst_o; break; + var _cZ_ = cst_o; break; case 11: - var _c0_ = cst_o$0; break; + var _cZ_ = cst_o$0; break; case 0: case 13: - var _c0_ = cst_d; break; + var _cZ_ = cst_d; break; case 3: case 14: - var _c0_ = cst_i$0; break; - default: var _c0_ = cst_u; + var _cZ_ = cst_i$0; break; + default: var _cZ_ = cst_u; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_c0_, n)); + /*<>*/ caml_format_int(_cZ_, n)); /*<>*/ } function convert_int32(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cZ_ = cst_ld$0; break; + var _cY_ = cst_ld$0; break; case 2: - var _cZ_ = cst_ld$1; break; + var _cY_ = cst_ld$1; break; case 4: - var _cZ_ = cst_li$1; break; + var _cY_ = cst_li$1; break; case 5: - var _cZ_ = cst_li$2; break; + var _cY_ = cst_li$2; break; case 6: - var _cZ_ = cst_lx; break; + var _cY_ = cst_lx; break; case 7: - var _cZ_ = cst_lx$0; break; + var _cY_ = cst_lx$0; break; case 8: - var _cZ_ = cst_lX; break; + var _cY_ = cst_lX; break; case 9: - var _cZ_ = cst_lX$0; break; + var _cY_ = cst_lX$0; break; case 10: - var _cZ_ = cst_lo; break; + var _cY_ = cst_lo; break; case 11: - var _cZ_ = cst_lo$0; break; + var _cY_ = cst_lo$0; break; case 0: case 13: - var _cZ_ = cst_ld; break; + var _cY_ = cst_ld; break; case 3: case 14: - var _cZ_ = cst_li$0; break; - default: var _cZ_ = cst_lu; + var _cY_ = cst_li$0; break; + default: var _cY_ = cst_lu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cZ_, n)); + /*<>*/ caml_format_int(_cY_, n)); /*<>*/ } function convert_nativeint(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cY_ = cst_nd$0; break; + var _cX_ = cst_nd$0; break; case 2: - var _cY_ = cst_nd$1; break; + var _cX_ = cst_nd$1; break; case 4: - var _cY_ = cst_ni$1; break; + var _cX_ = cst_ni$1; break; case 5: - var _cY_ = cst_ni$2; break; + var _cX_ = cst_ni$2; break; case 6: - var _cY_ = cst_nx; break; + var _cX_ = cst_nx; break; case 7: - var _cY_ = cst_nx$0; break; + var _cX_ = cst_nx$0; break; case 8: - var _cY_ = cst_nX; break; + var _cX_ = cst_nX; break; case 9: - var _cY_ = cst_nX$0; break; + var _cX_ = cst_nX$0; break; case 10: - var _cY_ = cst_no; break; + var _cX_ = cst_no; break; case 11: - var _cY_ = cst_no$0; break; + var _cX_ = cst_no$0; break; case 0: case 13: - var _cY_ = cst_nd; break; + var _cX_ = cst_nd; break; case 3: case 14: - var _cY_ = cst_ni$0; break; - default: var _cY_ = cst_nu; + var _cX_ = cst_ni$0; break; + default: var _cX_ = cst_nu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cY_, n)); + /*<>*/ caml_format_int(_cX_, n)); /*<>*/ } function convert_int64(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cX_ = cst_Ld$0; break; + var _cW_ = cst_Ld$0; break; case 2: - var _cX_ = cst_Ld$1; break; + var _cW_ = cst_Ld$1; break; case 4: - var _cX_ = cst_Li$1; break; + var _cW_ = cst_Li$1; break; case 5: - var _cX_ = cst_Li$2; break; + var _cW_ = cst_Li$2; break; case 6: - var _cX_ = cst_Lx; break; + var _cW_ = cst_Lx; break; case 7: - var _cX_ = cst_Lx$0; break; + var _cW_ = cst_Lx$0; break; case 8: - var _cX_ = cst_LX; break; + var _cW_ = cst_LX; break; case 9: - var _cX_ = cst_LX$0; break; + var _cW_ = cst_LX$0; break; case 10: - var _cX_ = cst_Lo; break; + var _cW_ = cst_Lo; break; case 11: - var _cX_ = cst_Lo$0; break; + var _cW_ = cst_Lo$0; break; case 0: case 13: - var _cX_ = cst_Ld; break; + var _cW_ = cst_Ld; break; case 3: case 14: - var _cX_ = cst_Li$0; break; - default: var _cX_ = cst_Lu; + var _cW_ = cst_Li$0; break; + default: var _cW_ = cst_Lu; } /*<>*/ return transform_int_alt (iconv, /*<>*/ runtime.caml_int64_format - (_cX_, n)); + (_cW_, n)); /*<>*/ } function convert_float(fconv, prec, x){ function hex(param){ @@ -16611,41 +16619,41 @@ i = 0; /*<>*/ for(;;){ if(i === len) - var _cU_ = 0; + var _cT_ = 0; else{ /*<>*/ /*<>*/ var - _cT_ = + _cS_ = /*<>*/ caml_string_get(str, i) - 46 | 0; a: { - if(23 < _cT_ >>> 0){ - if(55 === _cT_) break a; + if(23 < _cS_ >>> 0){ + if(55 === _cS_) break a; } - else if(21 < _cT_ - 1 >>> 0) break a; + else if(21 < _cS_ - 1 >>> 0) break a; /*<>*/ var /*<>*/ i$0 = i + 1 | 0, i = i$0; continue; } - var _cU_ = 1; + var _cT_ = 1; } /*<>*/ /*<>*/ var - _cV_ = - _cU_ + _cU_ = + _cT_ ? str : /*<>*/ caml_call2 (Stdlib[28], str, cst$17); - /*<>*/ return caml_special_val(_cV_); + /*<>*/ return caml_special_val(_cU_); } case 6: /*<>*/ return hex(0); case 7: /*<>*/ /*<>*/ var - _cW_ = hex(0); + _cV_ = hex(0); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_String[25], _cW_); + (Stdlib_String[25], _cV_); case 8: /*<>*/ return caml_special_val(hex(0)); default: @@ -17030,12 +17038,12 @@ /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _cS_ = recast(fmt, fmtty); + /*<>*/ _cR_ = recast(fmt, fmtty); /*<>*/ return make_printf (k$0, acc$0, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _cS_, rest$13)); /*<>*/ }; + (CamlinternalFormatBasics[3], _cR_, rest$13)); /*<>*/ }; case 15: var rest$14 = fmt$0[1]; /*<>*/ return function(f, x){ @@ -17062,11 +17070,11 @@ fmt$0 = rest$16; break; case 18: - var _cQ_ = fmt$0[1]; - if(0 === _cQ_[0]) + var _cP_ = fmt$0[1]; + if(0 === _cP_[0]) var rest$17 = fmt$0[2], - fmt$1 = _cQ_[1][1], + fmt$1 = _cP_[1][1], k$3 = function(acc, k, rest){ function k$0(kacc){ @@ -17082,7 +17090,7 @@ else var rest$18 = fmt$0[2], - fmt$2 = _cQ_[1][1], + fmt$2 = _cP_[1][1], k$4 = function(acc, k, rest){ function k$0(kacc){ @@ -17138,14 +17146,14 @@ rest$23 = fmt$0[3], f = fmt$0[2], arity = fmt$0[1], - /*<>*/ _cR_ = + /*<>*/ _cQ_ = /*<>*/ caml_call1(f, 0); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cR_]); + (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cQ_]); var counter$0 = counter + 1 | 0; /*<>*/ return make_custom$0 - (counter$0, k$0, acc$0, rest$23, arity, _cR_); + (counter$0, k$0, acc$0, rest$23, arity, _cQ_); } } /*<>*/ } @@ -17328,7 +17336,7 @@ fmt); /*<>*/ }; case 10: var rest$9 = fmtty[1]; - /*<>*/ return function(param, _cP_){ + /*<>*/ return function(param, _cO_){ /*<>*/ return make_from_fmtty (k, acc, rest$9, fmt); /*<>*/ }; case 11: @@ -17357,13 +17365,13 @@ /*<>*/ } function make_invalid_arg(counter, k, acc, fmt){ /*<>*/ /*<>*/ var - _cO_ = [8, acc, cst_Printf_bad_conversion$0]; + _cN_ = [8, acc, cst_Printf_bad_conversion$0]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cO_, fmt]); + (make_printf$0, [0, k, _cN_, fmt]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cO_, fmt); + (counter$0, k, _cN_, fmt); /*<>*/ } function make_custom$0(counter, k, acc, rest, arity, f){ /*<>*/ if(arity){ @@ -17377,13 +17385,13 @@ /*<>*/ caml_call1(f, x)); /*<>*/ }; } /*<>*/ /*<>*/ var - _cN_ = [4, acc, f]; + _cM_ = [4, acc, f]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cN_, rest]); + (make_printf$0, [0, k, _cM_, rest]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cN_, rest); + (counter$0, k, _cM_, rest); /*<>*/ } function make_printf(k, acc, fmt){ /*<>*/ return caml_trampoline(make_printf$0(0, k, acc, fmt)); @@ -17404,68 +17412,68 @@ /*<>*/ if(typeof pad === "number"){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cm_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cM_){ - /*<>*/ return _cm_;}; + _cl_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cL_){ + /*<>*/ return _cl_;}; } if(prec){ /*<>*/ var - /*<>*/ _cj_ = make_iprintf(k, o, fmt), - /*<>*/ _ck_ = - function(_cL_){ /*<>*/ return _cj_;}; - /*<>*/ return function(_cK_){ - /*<>*/ return _ck_;}; + /*<>*/ _ci_ = make_iprintf(k, o, fmt), + /*<>*/ _cj_ = + function(_cK_){ /*<>*/ return _ci_;}; + /*<>*/ return function(_cJ_){ + /*<>*/ return _cj_;}; } /*<>*/ /*<>*/ var - _cl_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cJ_){ - /*<>*/ return _cl_;}; + _ck_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cI_){ + /*<>*/ return _ck_;}; } if(0 === pad[0]){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cq_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cI_){ - /*<>*/ return _cq_;}; + _cp_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cH_){ + /*<>*/ return _cp_;}; } if(prec){ /*<>*/ var - /*<>*/ _cn_ = make_iprintf(k, o, fmt), - /*<>*/ _co_ = - function(_cH_){ /*<>*/ return _cn_;}; - /*<>*/ return function(_cG_){ - /*<>*/ return _co_;}; + /*<>*/ _cm_ = make_iprintf(k, o, fmt), + /*<>*/ _cn_ = + function(_cG_){ /*<>*/ return _cm_;}; + /*<>*/ return function(_cF_){ + /*<>*/ return _cn_;}; } /*<>*/ /*<>*/ var - _cp_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cF_){ - /*<>*/ return _cp_;}; + _co_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cE_){ + /*<>*/ return _co_;}; } if(typeof prec !== "number"){ /*<>*/ var - /*<>*/ _cw_ = make_iprintf(k, o, fmt), - /*<>*/ _cx_ = - function(_cE_){ /*<>*/ return _cw_;}; - /*<>*/ return function(_cD_){ - /*<>*/ return _cx_;}; + /*<>*/ _cv_ = make_iprintf(k, o, fmt), + /*<>*/ _cw_ = + function(_cD_){ /*<>*/ return _cv_;}; + /*<>*/ return function(_cC_){ + /*<>*/ return _cw_;}; } if(prec){ /*<>*/ var - /*<>*/ _cr_ = make_iprintf(k, o, fmt), - /*<>*/ _cs_ = - function(_cC_){ /*<>*/ return _cr_;}, - /*<>*/ _ct_ = - function(_cB_){ /*<>*/ return _cs_;}; - /*<>*/ return function(_cA_){ - /*<>*/ return _ct_;}; + /*<>*/ _cq_ = make_iprintf(k, o, fmt), + /*<>*/ _cr_ = + function(_cB_){ /*<>*/ return _cq_;}, + /*<>*/ _cs_ = + function(_cA_){ /*<>*/ return _cr_;}; + /*<>*/ return function(_cz_){ + /*<>*/ return _cs_;}; } /*<>*/ /*<>*/ var - _cu_ = make_iprintf(k, o, fmt); - /*<>*/ function _cv_(_cz_){ - /*<>*/ return _cu_; + _ct_ = make_iprintf(k, o, fmt); + /*<>*/ function _cu_(_cy_){ + /*<>*/ return _ct_; } - /*<>*/ return function(_cy_){ - /*<>*/ return _cv_;}; + /*<>*/ return function(_cx_){ + /*<>*/ return _cu_;}; /*<>*/ } function make_iprintf$0(counter, k, o, fmt){ /*<>*/ var k$0 = k, fmt$0 = fmt; @@ -17477,69 +17485,69 @@ case 0: /*<>*/ var rest = fmt$0[1], - /*<>*/ _bz_ = + /*<>*/ _by_ = make_iprintf(k$0, o, rest); - /*<>*/ return function(_ci_){ - /*<>*/ return _bz_;}; + /*<>*/ return function(_ch_){ + /*<>*/ return _by_;}; case 1: /*<>*/ var rest$0 = fmt$0[1], - /*<>*/ _bA_ = + /*<>*/ _bz_ = make_iprintf(k$0, o, rest$0); - /*<>*/ return function(_ch_){ - /*<>*/ return _bA_;}; + /*<>*/ return function(_cg_){ + /*<>*/ return _bz_;}; case 2: - var _bB_ = fmt$0[1]; - if(typeof _bB_ === "number"){ + var _bA_ = fmt$0[1]; + if(typeof _bA_ === "number"){ /*<>*/ var rest$1 = fmt$0[2], - /*<>*/ _bC_ = + /*<>*/ _bB_ = make_iprintf(k$0, o, rest$1); - /*<>*/ return function(_cg_){ - /*<>*/ return _bC_;}; + /*<>*/ return function(_cf_){ + /*<>*/ return _bB_;}; } - if(0 === _bB_[0]){ + if(0 === _bA_[0]){ /*<>*/ var rest$2 = fmt$0[2], - /*<>*/ _bD_ = + /*<>*/ _bC_ = make_iprintf(k$0, o, rest$2); - /*<>*/ return function(_cf_){ - /*<>*/ return _bD_;}; + /*<>*/ return function(_ce_){ + /*<>*/ return _bC_;}; } /*<>*/ var rest$3 = fmt$0[2], - /*<>*/ _bE_ = + /*<>*/ _bD_ = make_iprintf(k$0, o, rest$3), - /*<>*/ _bF_ = - function(_ce_){ /*<>*/ return _bE_;}; - /*<>*/ return function(_cd_){ - /*<>*/ return _bF_;}; + /*<>*/ _bE_ = + function(_cd_){ /*<>*/ return _bD_;}; + /*<>*/ return function(_cc_){ + /*<>*/ return _bE_;}; case 3: - var _bG_ = fmt$0[1]; - if(typeof _bG_ === "number"){ + var _bF_ = fmt$0[1]; + if(typeof _bF_ === "number"){ /*<>*/ var rest$4 = fmt$0[2], - /*<>*/ _bH_ = + /*<>*/ _bG_ = make_iprintf(k$0, o, rest$4); - /*<>*/ return function(_cc_){ - /*<>*/ return _bH_;}; + /*<>*/ return function(_cb_){ + /*<>*/ return _bG_;}; } - if(0 === _bG_[0]){ + if(0 === _bF_[0]){ /*<>*/ var rest$5 = fmt$0[2], - /*<>*/ _bI_ = + /*<>*/ _bH_ = make_iprintf(k$0, o, rest$5); - /*<>*/ return function(_cb_){ - /*<>*/ return _bI_;}; + /*<>*/ return function(_ca_){ + /*<>*/ return _bH_;}; } /*<>*/ var rest$6 = fmt$0[2], - /*<>*/ _bJ_ = + /*<>*/ _bI_ = make_iprintf(k$0, o, rest$6), - /*<>*/ _bK_ = - function(_ca_){ /*<>*/ return _bJ_;}; - /*<>*/ return function(_b$_){ - /*<>*/ return _bK_;}; + /*<>*/ _bJ_ = + function(_b$_){ /*<>*/ return _bI_;}; + /*<>*/ return function(_b__){ + /*<>*/ return _bJ_;}; case 4: var rest$7 = fmt$0[4], prec = fmt$0[3], pad = fmt$0[2]; /*<>*/ return fn_of_padding_precision @@ -17561,31 +17569,31 @@ /*<>*/ return fn_of_padding_precision (k$0, o, rest$11, pad$3, prec$3); case 9: - var _bL_ = fmt$0[1]; - if(typeof _bL_ === "number"){ + var _bK_ = fmt$0[1]; + if(typeof _bK_ === "number"){ /*<>*/ var rest$12 = fmt$0[2], - /*<>*/ _bM_ = + /*<>*/ _bL_ = make_iprintf(k$0, o, rest$12); - /*<>*/ return function(_b__){ - /*<>*/ return _bM_;}; + /*<>*/ return function(_b9_){ + /*<>*/ return _bL_;}; } - if(0 === _bL_[0]){ + if(0 === _bK_[0]){ /*<>*/ var rest$13 = fmt$0[2], - /*<>*/ _bN_ = + /*<>*/ _bM_ = make_iprintf(k$0, o, rest$13); - /*<>*/ return function(_b9_){ - /*<>*/ return _bN_;}; + /*<>*/ return function(_b8_){ + /*<>*/ return _bM_;}; } /*<>*/ var rest$14 = fmt$0[2], - /*<>*/ _bO_ = + /*<>*/ _bN_ = make_iprintf(k$0, o, rest$14), - /*<>*/ _bP_ = - function(_b8_){ /*<>*/ return _bO_;}; - /*<>*/ return function(_b7_){ - /*<>*/ return _bP_;}; + /*<>*/ _bO_ = + function(_b7_){ /*<>*/ return _bN_;}; + /*<>*/ return function(_b6_){ + /*<>*/ return _bO_;}; case 10: var rest$15 = fmt$0[1], fmt$0 = rest$15; break; case 11: @@ -17595,45 +17603,45 @@ case 13: /*<>*/ var rest$18 = fmt$0[3], - /*<>*/ _bQ_ = + /*<>*/ _bP_ = make_iprintf(k$0, o, rest$18); - /*<>*/ return function(_b6_){ - /*<>*/ return _bQ_;}; + /*<>*/ return function(_b5_){ + /*<>*/ return _bP_;}; case 14: var rest$19 = fmt$0[3], fmtty = fmt$0[2]; /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _b5_ = recast(fmt, fmtty); + /*<>*/ _b4_ = recast(fmt, fmtty); /*<>*/ return make_iprintf (k$0, o, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _b5_, rest$19)); /*<>*/ }; + (CamlinternalFormatBasics[3], _b4_, rest$19)); /*<>*/ }; case 15: /*<>*/ var rest$20 = fmt$0[1], - /*<>*/ _bR_ = + /*<>*/ _bQ_ = make_iprintf(k$0, o, rest$20), - /*<>*/ _bS_ = - function(_b4_){ /*<>*/ return _bR_;}; - /*<>*/ return function(_b3_){ - /*<>*/ return _bS_;}; + /*<>*/ _bR_ = + function(_b3_){ /*<>*/ return _bQ_;}; + /*<>*/ return function(_b2_){ + /*<>*/ return _bR_;}; case 16: /*<>*/ var rest$21 = fmt$0[1], - /*<>*/ _bT_ = + /*<>*/ _bS_ = make_iprintf(k$0, o, rest$21); - /*<>*/ return function(_b2_){ - /*<>*/ return _bT_;}; + /*<>*/ return function(_b1_){ + /*<>*/ return _bS_;}; case 17: var rest$22 = fmt$0[2], fmt$0 = rest$22; break; case 18: - var _bU_ = fmt$0[1]; - if(0 === _bU_[0]) + var _bT_ = fmt$0[1]; + if(0 === _bT_[0]) var rest$23 = fmt$0[2], - fmt$1 = _bU_[1][1], + fmt$1 = _bT_[1][1], k$3 = function(k, rest){ function k$0(koc){ @@ -17648,7 +17656,7 @@ else var rest$24 = fmt$0[2], - fmt$2 = _bU_[1][1], + fmt$2 = _bT_[1][1], k$4 = function(k, rest){ function k$0(koc){ @@ -17667,32 +17675,32 @@ case 20: /*<>*/ var rest$25 = fmt$0[3], - /*<>*/ _bV_ = + /*<>*/ _bU_ = make_iprintf(k$0, o, rest$25); - /*<>*/ return function(_b1_){ - /*<>*/ return _bV_;}; + /*<>*/ return function(_b0_){ + /*<>*/ return _bU_;}; case 21: /*<>*/ var rest$26 = fmt$0[2], - /*<>*/ _bW_ = + /*<>*/ _bV_ = make_iprintf(k$0, o, rest$26); - /*<>*/ return function(_b0_){ - /*<>*/ return _bW_;}; + /*<>*/ return function(_bZ_){ + /*<>*/ return _bV_;}; case 22: /*<>*/ var rest$27 = fmt$0[1], - /*<>*/ _bX_ = + /*<>*/ _bW_ = make_iprintf(k$0, o, rest$27); - /*<>*/ return function(_bZ_){ - /*<>*/ return _bX_;}; + /*<>*/ return function(_bY_){ + /*<>*/ return _bW_;}; case 23: - var rest$28 = fmt$0[2], ign = fmt$0[1], _bY_ = 0; + var rest$28 = fmt$0[2], ign = fmt$0[1], _bX_ = 0; /*<>*/ return make_ignored_param (function(param){ /*<>*/ return caml_call1 (k$0, o); /*<>*/ }, - _bY_, + _bX_, ign, rest$28); default: @@ -17710,10 +17718,10 @@ /*<>*/ if(param){ /*<>*/ var arity = param[1], - /*<>*/ _bx_ = + /*<>*/ _bw_ = fn_of_custom_arity(k, o, fmt, arity); - /*<>*/ return function(_by_){ - /*<>*/ return _bx_;}; + /*<>*/ return function(_bx_){ + /*<>*/ return _bw_;}; } /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -17884,9 +17892,9 @@ var f = acc$0[2], p$3 = acc$0[1]; /*<>*/ strput_acc(b, p$3); /*<>*/ /*<>*/ var - _bw_ = /*<>*/ caml_call1(f, 0); + _bv_ = /*<>*/ caml_call1(f, 0); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, _bw_); + (Stdlib_Buffer[16], b, _bv_); case 7: var acc$3 = acc$0[1], acc$0 = acc$3; break; case 8: @@ -17917,11 +17925,11 @@ function k(acc){ /*<>*/ strput_acc(buf, acc); /*<>*/ /*<>*/ var - _bv_ = + _bu_ = /*<>*/ caml_call1 (Stdlib_Buffer[2], buf); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _bv_); + (Stdlib[2], _bu_); /*<>*/ } /*<>*/ return make_printf(k, 0, fmt); } @@ -17996,15 +18004,15 @@ else /*<>*/ try{ /*<>*/ var - /*<>*/ _bt_ = + /*<>*/ _bs_ = /*<>*/ runtime.caml_int_of_string ( /*<>*/ caml_call3 (Stdlib_String[15], str, nstart, nend - nstart | 0)), - indent = _bt_; + indent = _bs_; } - catch(_bu_){ - var _bs_ = caml_wrap_exception(_bu_); - if(_bs_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_bs_, 0); + catch(_bt_){ + var _br_ = caml_wrap_exception(_bt_); + if(_br_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_br_, 0); var indent = invalid_box(0); } /*<>*/ /*<>*/ var @@ -18070,7 +18078,7 @@ (end_ind){ /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ } function invalid_format_without(str_ind, c, s){ /*<>*/ return /*<>*/ caml_call4 @@ -18208,9 +18216,9 @@ b: try{ var - _bh_ = str_ind$3 === end_ind ? 1 : 0, - _bi_ = - _bh_ + _bg_ = str_ind$3 === end_ind ? 1 : 0, + _bh_ = + _bg_ || (60 !== @@ -18218,7 +18226,7 @@ (str, str_ind$3) ? 1 : 0); - if(_bi_) + if(_bh_) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -18257,12 +18265,12 @@ str, str_ind$3 - 2 | 0, (str_ind_3 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bj_ = + /*<>*/ _bi_ = [0, s, width, 0], - /*<>*/ _bk_ = + /*<>*/ _bj_ = str_ind_3 + 1 | 0, - formatting_lit$0 = _bj_, - next_ind = _bk_; + formatting_lit$0 = _bi_, + next_ind = _bj_; break b; } } @@ -18288,21 +18296,21 @@ str, str_ind$3 - 2 | 0, (str_ind_5 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bl_ = + /*<>*/ _bk_ = [0, s$0, width, offset], - /*<>*/ _bm_ = + /*<>*/ _bl_ = str_ind_5 + 1 | 0, - formatting_lit$0 = _bl_, - next_ind = _bm_; + formatting_lit$0 = _bk_, + next_ind = _bl_; break b; } /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); } - catch(_br_){ - var _bg_ = caml_wrap_exception(_br_); - if(_bg_ !== Stdlib[8] && _bg_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bg_, 0); + catch(_bq_){ + var _bf_ = caml_wrap_exception(_bq_); + if(_bf_ !== Stdlib[8] && _bf_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bf_, 0); var formatting_lit$0 = formatting_lit, next_ind = str_ind$3; } var @@ -18326,7 +18334,7 @@ if(58 > match$6) break c; } else if(45 === match$6) break c; - var _bp_ = 0; + var _bo_ = 0; break b; } /*<>*/ var @@ -18350,28 +18358,28 @@ str, str_ind$4 - 2 | 0, (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), - _bp_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; + _bo_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; } - var _bo_ = _bp_; + var _bn_ = _bo_; } - catch(_bq_){ - var _bn_ = caml_wrap_exception(_bq_); - if(_bn_ !== Stdlib[8] && _bn_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bn_, 0); - var _bo_ = 0; + catch(_bp_){ + var _bm_ = caml_wrap_exception(_bp_); + if(_bm_ !== Stdlib[8] && _bm_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bm_, 0); + var _bn_ = 0; } - if(_bo_) + if(_bn_) var - match$5 = _bo_[1], + match$5 = _bn_[1], formatting_lit$1 = match$5[2], next_ind$0 = match$5[1], fmt_rest$13 = parse(next_ind$0, end_ind)[1], - _bf_ = [0, [17, formatting_lit$1, fmt_rest$13]]; + _be_ = [0, [17, formatting_lit$1, fmt_rest$13]]; else var fmt_rest$14 = parse(str_ind$4, end_ind)[1], - _bf_ = [0, [17, _Q_, fmt_rest$14]]; - var match$0 = _bf_; + _be_ = [0, [17, _Q_, fmt_rest$14]]; + var match$0 = _be_; break a; case 31: var @@ -18529,29 +18537,29 @@ /*<>*/ var /*<>*/ ignored$2 = [9, get_pad_opt(95), sub_fmtty], - _aO_ = [0, [23, ignored$2, fmt_rest$7]]; + _aN_ = [0, [23, ignored$2, fmt_rest$7]]; else - var _aO_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; - var fmt_result = _aO_; + var _aN_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; + var fmt_result = _aN_; break a; case 44: var fmt_result = parse(str_ind, end_ind); break a; case 67: /*<>*/ var fmt_rest$10 = parse(str_ind, end_ind)[1], - /*<>*/ _aQ_ = + /*<>*/ _aP_ = get_ign(0) ? [0, [23, 1, fmt_rest$10]] : [0, [1, fmt_rest$10]], - fmt_result = _aQ_; + fmt_result = _aP_; break a; case 78: var fmt_rest$14 = parse(str_ind, end_ind)[1], counter$0 = 2; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$6 = [11, counter$0], - _aW_ = [0, [23, ignored$6, fmt_rest$14]]; + _aV_ = [0, [23, ignored$6, fmt_rest$14]]; else - var _aW_ = [0, [21, counter$0, fmt_rest$14]]; - var fmt_result = _aW_; + var _aV_ = [0, [21, counter$0, fmt_rest$14]]; + var fmt_result = _aV_; break a; case 83: /*<>*/ var @@ -18562,15 +18570,15 @@ /*<>*/ var /*<>*/ ignored$7 = [1, get_padprec_opt(95)], - _aX_ = [0, [23, ignored$7, fmt_rest$15]]; + _aW_ = [0, [23, ignored$7, fmt_rest$15]]; else /*<>*/ var /*<>*/ match$5 = make_padding_fmt_ebb(pad$6, fmt_rest$15), fmt_rest$16 = match$5[2], pad$7 = match$5[1], - _aX_ = [0, [3, pad$7, fmt_rest$16]]; - var fmt_result = _aX_; + _aW_ = [0, [3, pad$7, fmt_rest$16]]; + var fmt_result = _aW_; break a; case 91: if(str_ind === end_ind) @@ -18583,7 +18591,7 @@ function(c){ /*<>*/ add_in_char_set (char_set, c); - /*<>*/ return _$_; + /*<>*/ return sentinal; /*<>*/ }, add_range = function(c$0, c){ @@ -18595,12 +18603,12 @@ /*<>*/ caml_call1 (Stdlib[29], i)); /*<>*/ /*<>*/ var - _be_ = i + 1 | 0; + _bd_ = i + 1 | 0; if(c === i) break; - var i = _be_; + var i = _bd_; } } - return _$_; + return sentinal; /*<>*/ }, fail_single_percent = function(str_ind){ @@ -18622,13 +18630,13 @@ if(93 === c) /*<>*/ return str_ind$0 + 1 | 0; - var _bd_ = str_ind$0 + 1 | 0; + var _bc_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_after_char$0, [0, _bd_, end_ind, c]); + (parse_char_set_after_char$0, [0, _bc_, end_ind, c]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_after_char$0 - (counter$0, _bd_, end_ind, c); + (counter$0, _bc_, end_ind, c); } /*<>*/ add_char(45); var str_ind$1 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$1; @@ -18679,13 +18687,13 @@ /*<>*/ return fail_single_percent (str_ind$2); /*<>*/ add_range(c$0, c$3); - var _bb_ = str_ind$2 + 2 | 0; + var _ba_ = str_ind$2 + 2 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _bb_, end_ind]); + (parse_char_set_content, [0, _ba_, end_ind]); var counter$2 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$2, _bb_, end_ind); + (counter$2, _ba_, end_ind); } if(93 === c$2){ /*<>*/ add_char(c$0); @@ -18694,23 +18702,23 @@ | 0; } /*<>*/ add_range(c$0, c$2); - var _bc_ = str_ind$2 + 1 | 0; + var _bb_ = str_ind$2 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _bc_, end_ind]); + (parse_char_set_content, [0, _bb_, end_ind]); var counter$1 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$1, _bc_, end_ind); + (counter$1, _bb_, end_ind); } if(37 === c$0){ /*<>*/ add_char(c$1); - var _ba_ = str_ind$0 + 1 | 0; + var _a$_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _ba_, end_ind]); + (parse_char_set_content, [0, _a$_, end_ind]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$0, _ba_, end_ind); + (counter$0, _a$_, end_ind); } } if(37 === c$0) @@ -18760,10 +18768,10 @@ /*<>*/ var /*<>*/ ignored$9 = [10, get_pad_opt(95), char_set$1], - _a2_ = [0, [23, ignored$9, fmt_rest$19]]; + _a1_ = [0, [23, ignored$9, fmt_rest$19]]; else - var _a2_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; - var fmt_result = _a2_; + var _a1_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; + var fmt_result = _a1_; break a; case 97: var @@ -18783,28 +18791,28 @@ if(match$7){ if(0 === match$7[1]) /*<>*/ var - /*<>*/ _a3_ = + /*<>*/ _a2_ = get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], - _a4_ = _a3_; + _a3_ = _a2_; else var - _a4_ = + _a3_ = legacy_behavior$0 ? char_format(fmt_rest$21) : invalid_format_message (str_ind, cst_non_zero_widths_are_unsupp); - var _a5_ = _a4_; + var _a4_ = _a3_; } else - var _a5_ = char_format(fmt_rest$21); - var fmt_result = _a5_; + var _a4_ = char_format(fmt_rest$21); + var fmt_result = _a4_; break a; case 114: /*<>*/ var fmt_rest$22 = parse(str_ind, end_ind)[1], - /*<>*/ _a6_ = + /*<>*/ _a5_ = get_ign(0) ? [0, [23, 2, fmt_rest$22]] : [0, [19, fmt_rest$22]], - fmt_result = _a6_; + fmt_result = _a5_; break a; case 115: /*<>*/ var @@ -18815,15 +18823,15 @@ /*<>*/ var /*<>*/ ignored$10 = [0, get_padprec_opt(95)], - _a7_ = [0, [23, ignored$10, fmt_rest$23]]; + _a6_ = [0, [23, ignored$10, fmt_rest$23]]; else /*<>*/ var /*<>*/ match$8 = make_padding_fmt_ebb(pad$9, fmt_rest$23), fmt_rest$24 = match$8[2], pad$10 = match$8[1], - _a7_ = [0, [2, pad$10, fmt_rest$24]]; - var fmt_result = _a7_; + _a6_ = [0, [2, pad$10, fmt_rest$24]]; + var fmt_result = _a6_; break a; case 116: var @@ -18842,10 +18850,10 @@ /*<>*/ var /*<>*/ ignored$11 = [8, get_pad_opt(95), sub_fmtty$0], - _a8_ = [0, [23, ignored$11, fmt_rest$26]]; + _a7_ = [0, [23, ignored$11, fmt_rest$26]]; else - var _a8_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; - var fmt_result = _a8_; + var _a7_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; + var fmt_result = _a7_; break a; case 66: case 98: @@ -18857,15 +18865,15 @@ /*<>*/ var /*<>*/ ignored$3 = [7, get_padprec_opt(95)], - _aP_ = [0, [23, ignored$3, fmt_rest$8]]; + _aO_ = [0, [23, ignored$3, fmt_rest$8]]; else /*<>*/ var /*<>*/ match$3 = make_padding_fmt_ebb(pad$3, fmt_rest$8), fmt_rest$9 = match$3[2], pad$4 = match$3[1], - _aP_ = [0, [9, pad$4, fmt_rest$9]]; - var fmt_result = _aP_; + _aO_ = [0, [9, pad$4, fmt_rest$9]]; + var fmt_result = _aO_; break a; case 37: case 64: @@ -18881,22 +18889,22 @@ /*<>*/ symb$0 = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _a9_ = symb$0 - 88 | 0; + /*<>*/ _a8_ = symb$0 - 88 | 0; b: { - if(32 >= _a9_ >>> 0) - switch(_a9_){ + if(32 >= _a8_ >>> 0) + switch(_a8_){ case 0: case 12: case 17: case 23: case 29: case 32: - var _aV_ = 1; break b; + var _aU_ = 1; break b; } - var _aV_ = 0; + var _aU_ = 0; } - /*<>*/ if(_aV_) break; + /*<>*/ if(_aU_) break; } var fmt_rest$13 = parse(str_ind, end_ind)[1]; b: @@ -18917,10 +18925,10 @@ /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$5 = [11, counter], - _aU_ = [0, [23, ignored$5, fmt_rest$13]]; + _aT_ = [0, [23, ignored$5, fmt_rest$13]]; else - var _aU_ = [0, [21, counter, fmt_rest$13]]; - var fmt_result = _aU_; + var _aT_ = [0, [21, counter, fmt_rest$13]]; + var fmt_result = _aT_; break a; case 32: case 35: @@ -18939,26 +18947,26 @@ case 117: case 120: /*<>*/ var - /*<>*/ _aY_ = get_space(0), - /*<>*/ _aZ_ = get_hash(0), + /*<>*/ _aX_ = get_space(0), + /*<>*/ _aY_ = get_hash(0), /*<>*/ iconv$2 = - compute_int_conv(pct_ind, str_ind, get_plus(0), _aZ_, _aY_, symb), + compute_int_conv(pct_ind, str_ind, get_plus(0), _aY_, _aX_, symb), fmt_rest$17 = parse(str_ind, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$8 = [2, iconv$2, get_pad_opt(95)], - _a0_ = [0, [23, ignored$8, fmt_rest$17]]; + _aZ_ = [0, [23, ignored$8, fmt_rest$17]]; else /*<>*/ var - /*<>*/ _a1_ = get_prec(0), + /*<>*/ _a0_ = get_prec(0), /*<>*/ match$6 = - make_padprec_fmt_ebb(get_int_pad(0), _a1_, fmt_rest$17), + make_padprec_fmt_ebb(get_int_pad(0), _a0_, fmt_rest$17), fmt_rest$18 = match$6[3], prec$4 = match$6[2], pad$8 = match$6[1], - _a0_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; - var fmt_result = _a0_; + _aZ_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; + var fmt_result = _aZ_; break a; case 69: case 70: @@ -18988,28 +18996,28 @@ if(3 >= switcher >>> 0){ switch(switcher){ case 0: - var _a__ = 1; break; + var _a9_ = 1; break; case 1: - var _a__ = 0; break; + var _a9_ = 0; break; case 2: - var _a__ = 3; break; - default: var _a__ = 6; + var _a9_ = 3; break; + default: var _a9_ = 6; } - var kind = _a__; + var kind = _a9_; break b; } } else if(69 <= symb){ switch(symb - 69 | 0){ case 0: - var _a$_ = 2; break; + var _a__ = 2; break; case 1: break c; case 2: - var _a$_ = 4; break; - default: var _a$_ = 7; + var _a__ = 4; break; + default: var _a__ = 7; } - var kind = _a$_; + var kind = _a__; break b; } if(hash$1){ @@ -19027,25 +19035,25 @@ match = get_prec(0); if(typeof match === "number") var - _aR_ = + _aQ_ = match ? incompatible_flag(pct_ind, str_ind, 95, cst$26) : 0; else - var ndec = match[1], _aR_ = [0, ndec]; + var ndec = match[1], _aQ_ = [0, ndec]; /*<>*/ var /*<>*/ ignored$4 = - [6, get_pad_opt(95), _aR_], - _aS_ = [0, [23, ignored$4, fmt_rest$11]]; + [6, get_pad_opt(95), _aQ_], + _aR_ = [0, [23, ignored$4, fmt_rest$11]]; } else /*<>*/ var - /*<>*/ _aT_ = get_prec(0), + /*<>*/ _aS_ = get_prec(0), /*<>*/ match$4 = - make_padprec_fmt_ebb(get_pad(0), _aT_, fmt_rest$11), + make_padprec_fmt_ebb(get_pad(0), _aS_, fmt_rest$11), fmt_rest$12 = match$4[3], prec$3 = match$4[2], pad$5 = match$4[1], - _aS_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; - var fmt_result = _aS_; + _aR_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; + var fmt_result = _aR_; break a; } b: @@ -19054,89 +19062,89 @@ switch(symb - 108 | 0){ case 0: /*<>*/ var - /*<>*/ _ay_ = + /*<>*/ _ax_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _az_ = get_space(0), - /*<>*/ _aA_ = get_hash(0), + /*<>*/ _ay_ = get_space(0), + /*<>*/ _az_ = get_hash(0), /*<>*/ iconv = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aA_, _az_, _ay_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _az_, _ay_, _ax_), fmt_rest = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored = [3, iconv, get_pad_opt(95)], - _aB_ = [0, [23, ignored, fmt_rest]]; + _aA_ = [0, [23, ignored, fmt_rest]]; else /*<>*/ var - /*<>*/ _aD_ = get_prec(0), + /*<>*/ _aC_ = get_prec(0), /*<>*/ match$0 = - make_padprec_fmt_ebb(get_int_pad(0), _aD_, fmt_rest), + make_padprec_fmt_ebb(get_int_pad(0), _aC_, fmt_rest), fmt_rest$0 = match$0[3], prec$0 = match$0[2], pad$0 = match$0[1], - _aB_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; - var _aC_ = _aB_; + _aA_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; + var _aB_ = _aA_; break; case 1: break b; default: /*<>*/ var - /*<>*/ _aE_ = + /*<>*/ _aD_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _aF_ = get_space(0), - /*<>*/ _aG_ = get_hash(0), + /*<>*/ _aE_ = get_space(0), + /*<>*/ _aF_ = get_hash(0), /*<>*/ iconv$0 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aG_, _aF_, _aE_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aF_, _aE_, _aD_), fmt_rest$1 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$0 = [4, iconv$0, get_pad_opt(95)], - _aH_ = [0, [23, ignored$0, fmt_rest$1]]; + _aG_ = [0, [23, ignored$0, fmt_rest$1]]; else /*<>*/ var - /*<>*/ _aI_ = get_prec(0), + /*<>*/ _aH_ = get_prec(0), /*<>*/ match$1 = - make_padprec_fmt_ebb(get_int_pad(0), _aI_, fmt_rest$1), + make_padprec_fmt_ebb(get_int_pad(0), _aH_, fmt_rest$1), fmt_rest$2 = match$1[3], prec$1 = match$1[2], pad$1 = match$1[1], - _aH_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; - var _aC_ = _aH_; + _aG_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; + var _aB_ = _aG_; } - var fmt_result = _aC_; + var fmt_result = _aB_; break a; } } else if(76 === symb){ /*<>*/ var - /*<>*/ _aJ_ = + /*<>*/ _aI_ = /*<>*/ caml_string_get(str, str_ind), - /*<>*/ _aK_ = get_space(0), - /*<>*/ _aL_ = get_hash(0), + /*<>*/ _aJ_ = get_space(0), + /*<>*/ _aK_ = get_hash(0), /*<>*/ iconv$1 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aL_, _aK_, _aJ_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aK_, _aJ_, _aI_), fmt_rest$3 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$1 = [5, iconv$1, get_pad_opt(95)], - _aM_ = [0, [23, ignored$1, fmt_rest$3]]; + _aL_ = [0, [23, ignored$1, fmt_rest$3]]; else /*<>*/ var - /*<>*/ _aN_ = get_prec(0), + /*<>*/ _aM_ = get_prec(0), /*<>*/ match$2 = - make_padprec_fmt_ebb(get_int_pad(0), _aN_, fmt_rest$3), + make_padprec_fmt_ebb(get_int_pad(0), _aM_, fmt_rest$3), fmt_rest$4 = match$2[3], prec$2 = match$2[2], pad$2 = match$2[1], - _aM_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; - var fmt_result = _aM_; + _aL_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; + var fmt_result = _aL_; break a; } var @@ -19145,46 +19153,46 @@ (failwith_message(_J_), str, str_ind - 1 | 0, symb); } if(1 - legacy_behavior$0){ - var _ap_ = 1 - plus_used[1], plus$0 = _ap_ ? plus : _ap_; + var _ao_ = 1 - plus_used[1], plus$0 = _ao_ ? plus : _ao_; if(plus$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$27); - var _aq_ = 1 - hash_used[1], hash$0 = _aq_ ? hash : _aq_; + var _ap_ = 1 - hash_used[1], hash$0 = _ap_ ? hash : _ap_; if(hash$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$28); - var _ar_ = 1 - space_used[1], space$0 = _ar_ ? space : _ar_; + var _aq_ = 1 - space_used[1], space$0 = _aq_ ? space : _aq_; if(space$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$29); var - _as_ = 1 - pad_used[1], - _at_ = - _as_ + _ar_ = 1 - pad_used[1], + _as_ = + _ar_ ? /*<>*/ caml_notequal ([0, pad], _K_) - : _as_; - /*<>*/ if(_at_) + : _ar_; + /*<>*/ if(_as_) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst_padding$0); var - _au_ = 1 - prec_used[1], - _av_ = - _au_ + _at_ = 1 - prec_used[1], + _au_ = + _at_ ? /*<>*/ caml_notequal ([0, prec], _L_) - : _au_; - /*<>*/ if(_av_){ - var _aw_ = ign ? 95 : symb; + : _at_; + /*<>*/ if(_au_){ + var _av_ = ign ? 95 : symb; /*<>*/ incompatible_flag - (pct_ind, str_ind, _aw_, cst_precision$2); + (pct_ind, str_ind, _av_, cst_precision$2); } var plus$1 = ign ? plus : ign; if(plus$1) /*<>*/ incompatible_flag (pct_ind, str_ind, 95, cst$30); } - var _ax_ = 1 - ign_used[1], ign$0 = _ax_ ? ign : _ax_; + var _aw_ = 1 - ign_used[1], ign$0 = _aw_ ? ign : _aw_; a: if(ign$0){ b: @@ -19301,10 +19309,10 @@ case 3: if(legacy_behavior$0){ /*<>*/ var - /*<>*/ _ao_ = str_ind$0 + 1 | 0, + /*<>*/ _an_ = str_ind$0 + 1 | 0, minus$0 = minus || (45 === symb$0 ? 1 : 0); /*<>*/ return parse_literal - (minus$0, _ao_); + (minus$0, _an_); } break; } @@ -19331,17 +19339,17 @@ /*<>*/ hash = [0, 0]; function set_flag(str_ind, flag){ /*<>*/ var - _al_ = flag[1], - _am_ = _al_ ? 1 - legacy_behavior$0 : _al_; - if(_am_){ + _ak_ = flag[1], + _al_ = _ak_ ? 1 - legacy_behavior$0 : _ak_; + if(_al_){ /*<>*/ /*<>*/ var - _an_ = + _am_ = /*<>*/ caml_string_get(str, str_ind); /*<>*/ /*<>*/ caml_call3 - (failwith_message(_C_), str, str_ind, _an_); + (failwith_message(_C_), str, str_ind, _am_); } flag[1] = 1; - return _$_; + return sentinal; /*<>*/ } var str_ind$0 = str_ind; /*<>*/ for(;;){ @@ -19511,13 +19519,13 @@ [0, sub_fmt, sub_str], /*<>*/ formatting$0 = is_open_tag ? [0, sub_format$0] : [1, sub_format$0], - /*<>*/ _aj_ = + /*<>*/ _ai_ = [0, [18, formatting$0, fmt_rest$0]]; - /*<>*/ return _aj_; + /*<>*/ return _ai_; } - catch(_ak_){ - var _ai_ = caml_wrap_exception(_ak_); - if(_ai_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ai_, 0); + catch(_aj_){ + var _ah_ = caml_wrap_exception(_aj_); + if(_ah_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ah_, 0); /*<>*/ var fmt_rest = parse(str_ind, end_ind)[1], /*<>*/ formatting = @@ -19557,9 +19565,9 @@ var new_acc = (acc$0 * 10 | 0) + (c - 48 | 0) | 0; if(Stdlib_Sys[12] < new_acc){ /*<>*/ /*<>*/ var - _ah_ = Stdlib_Sys[12]; + _ag_ = Stdlib_Sys[12]; /*<>*/ return /*<>*/ caml_call3 - (failwith_message(_S_), str, new_acc, _ah_); + (failwith_message(_S_), str, new_acc, _ag_); } var str_ind$1 = str_ind$0 + 1 | 0, @@ -19813,16 +19821,16 @@ fmt = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _af_ = [0, type_format(fmt, fmtty), str]; - /*<>*/ return _af_; + _ae_ = [0, type_format(fmt, fmtty), str]; + /*<>*/ return _ae_; } - catch(_ag_){ - var _ad_ = caml_wrap_exception(_ag_); - if(_ad_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ad_, 0); + catch(_af_){ + var _ac_ = caml_wrap_exception(_af_); + if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); /*<>*/ /*<>*/ var - _ae_ = string_of_fmtty(fmtty); + _ad_ = string_of_fmtty(fmtty); /*<>*/ return /*<>*/ caml_call2 - (failwith_message(_Z_), str, _ae_); + (failwith_message(_Z_), str, _ad_); } /*<>*/ } function format_of_string_format(str, param){ @@ -19832,15 +19840,15 @@ fmt$0 = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _ab_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; - /*<>*/ return _ab_; + _aa_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; + /*<>*/ return _aa_; } - catch(_ac_){ - var _aa_ = caml_wrap_exception(_ac_); - if(_aa_ === Type_mismatch) + catch(_ab_){ + var _$_ = caml_wrap_exception(_ab_); + if(_$_ === Type_mismatch) /*<>*/ return /*<>*/ caml_call2 (failwith_message(___), str, str$0); - throw caml_maybe_attach_backtrace(_aa_, 0); + throw caml_maybe_attach_backtrace(_$_, 0); } } var @@ -20048,7 +20056,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5]); } /*<>*/ var - _y_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$6 = "\n", cst$3 = cst$7, @@ -20139,18 +20147,18 @@ /*<>*/ var t = l[2], h = l[1], - /*<>*/ _aE_ = + /*<>*/ _aD_ = /*<>*/ caml_call2(Stdlib[28], prefix, h); - function _aF_(x, y){ + function _aE_(x, y){ /*<>*/ /*<>*/ var - _aH_ = /*<>*/ caml_call2(Stdlib[28], sep, y); + _aG_ = /*<>*/ caml_call2(Stdlib[28], sep, y); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], x, _aH_); + (Stdlib[28], x, _aG_); /*<>*/ } /*<>*/ /*<>*/ var - _aG_ = /*<>*/ caml_call3(Stdlib_List[25], _aF_, _aE_, t); + _aF_ = /*<>*/ caml_call3(Stdlib_List[25], _aE_, _aD_, t); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _aG_, suffix); + (Stdlib[28], _aF_, suffix); /*<>*/ } function help_action(param){ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -20159,11 +20167,11 @@ function add_help(speclist){ /*<>*/ try{ /*<>*/ assoc3(cst_help$2, speclist); - /*<>*/ var /*<>*/ _aB_ = 0, add1 = _aB_; + /*<>*/ var /*<>*/ _aA_ = 0, add1 = _aA_; } - catch(_aD_){ - var _ax_ = caml_wrap_exception(_aD_); - if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); + catch(_aC_){ + var _aw_ = caml_wrap_exception(_aC_); + if(_aw_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_aw_, 0); var add1 = [0, @@ -20172,11 +20180,11 @@ } try{ /*<>*/ assoc3(cst_help$1, speclist); - /*<>*/ var /*<>*/ _aA_ = 0, add2 = _aA_; + /*<>*/ var /*<>*/ _az_ = 0, add2 = _az_; } - catch(_aC_){ - var _ay_ = caml_wrap_exception(_aC_); - if(_ay_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ay_, 0); + catch(_aB_){ + var _ax_ = caml_wrap_exception(_aB_); + if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); var add2 = [0, @@ -20184,34 +20192,34 @@ 0]; } /*<>*/ /*<>*/ var - _az_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); + _ay_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[37], speclist, _az_); + (Stdlib[37], speclist, _ay_); /*<>*/ } function usage_b(buf, speclist, errmsg){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Printf[5], buf, _d_, errmsg); /*<>*/ /*<>*/ var - _at_ = add_help(speclist); - /*<>*/ function _au_(param){ + _as_ = add_help(speclist); + /*<>*/ function _at_(param){ var doc = param[3], spec = param[2], key = param[1], - _av_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; - if(! _av_) return _av_; + _au_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; + if(! _au_) return _au_; if(11 !== spec[0]) /*<>*/ return /*<>*/ caml_call4 (Stdlib_Printf[5], buf, _a_, key, doc); /*<>*/ var l = spec[1], - /*<>*/ _aw_ = make_symlist(cst$1, cst$0, cst, l); + /*<>*/ _av_ = make_symlist(cst$1, cst$0, cst, l); /*<>*/ return /*<>*/ caml_call5 - (Stdlib_Printf[5], buf, _b_, key, _aw_, doc); + (Stdlib_Printf[5], buf, _b_, key, _av_, doc); } /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _au_, _at_); - /*<>*/ return _y_; + (Stdlib_List[17], _at_, _as_); + /*<>*/ return sentinal; /*<>*/ } function usage_string(speclist, errmsg){ /*<>*/ /*<>*/ var @@ -20222,33 +20230,33 @@ /*<>*/ } function usage(speclist, errmsg){ /*<>*/ /*<>*/ var - _as_ = usage_string(speclist, errmsg); + _ar_ = usage_string(speclist, errmsg); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Printf[3], _e_, _as_); + (Stdlib_Printf[3], _e_, _ar_); /*<>*/ } /*<>*/ /*<>*/ var current = [0, 0]; function int_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _aq_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; - /*<>*/ return _aq_; + _ap_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; + /*<>*/ return _ap_; } - catch(_ar_){ - var _ap_ = caml_wrap_exception(_ar_); - if(_ap_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_ap_, 0); + catch(_aq_){ + var _ao_ = caml_wrap_exception(_aq_); + if(_ao_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_ao_, 0); } /*<>*/ } function float_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _an_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; - /*<>*/ return _an_; + _am_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; + /*<>*/ return _am_; } - catch(_ao_){ - var _am_ = caml_wrap_exception(_ao_); - if(_am_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_am_, 0); + catch(_an_){ + var _al_ = caml_wrap_exception(_an_); + if(_al_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_al_, 0); } /*<>*/ } function parse_and_expand_argv_dynamic_ @@ -20303,8 +20311,8 @@ if(current[1] >= argv[1].length - 1) return 0; /*<>*/ try{ /*<>*/ var - _Z_ = current[1], - /*<>*/ s = caml_check_bound(argv[1], _Z_)[1 + _Z_]; + _Y_ = current[1], + /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_]; a: { /*<>*/ if @@ -20313,13 +20321,13 @@ try{ /*<>*/ var follow$1 = 0, - /*<>*/ _ab_ = assoc3(s, speclist[1]), + /*<>*/ _aa_ = assoc3(s, speclist[1]), follow$0 = follow$1, - action = _ab_; + action = _aa_; } - catch(_ak_){ - var ___ = caml_wrap_exception(_ak_); - if(___ !== Stdlib[8]) throw caml_maybe_attach_backtrace(___, 0); + catch(_aj_){ + var _Z_ = caml_wrap_exception(_aj_); + if(_Z_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Z_, 0); /*<>*/ try{ /*<>*/ var /*<>*/ i = @@ -20332,16 +20340,16 @@ /*<>*/ keyword = /*<>*/ caml_call3(Stdlib_String[15], s, 0, i), /*<>*/ follow = [0, arg], - /*<>*/ _aa_ = assoc3(keyword, speclist[1]), + /*<>*/ _$_ = assoc3(keyword, speclist[1]), follow$0 = follow, - action = _aa_; + action = _$_; } - catch(_al_){ - var _$_ = caml_wrap_exception(_al_); - if(_$_ === Stdlib[8]) + catch(_ak_){ + var ___ = caml_wrap_exception(_ak_); + if(___ === Stdlib[8]) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [0, s]], 1); - throw caml_maybe_attach_backtrace(_$_, 0); + throw caml_maybe_attach_backtrace(___, 0); } } var @@ -20349,7 +20357,7 @@ function(s, follow){ function no_arg(param){ /*<>*/ if(! follow) - /*<>*/ return _y_; + /*<>*/ return sentinal; var arg = follow[1]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [1, s, arg, cst_no_argument]], 1); @@ -20367,9 +20375,9 @@ if((current[1] + 1 | 0) >= argv[1].length - 1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [2, s]], 1); - var _aj_ = current[1] + 1 | 0; - /*<>*/ return caml_check_bound(argv[1], _aj_) - [1 + _aj_]; + var _ai_ = current[1] + 1 | 0; + /*<>*/ return caml_check_bound(argv[1], _ai_) + [1 + _ai_]; /*<>*/ } return get_arg; }, @@ -20397,14 +20405,14 @@ /*<>*/ arg = get_arg(0); /*<>*/ try{ /*<>*/ var - /*<>*/ _ad_ = + /*<>*/ _ac_ = [0, /*<>*/ caml_call1(Stdlib[32], arg)], - match = _ad_; + match = _ac_; } - catch(_ai_){ - var _ac_ = caml_wrap_exception(_ai_); - if(_ac_[1] !== Stdlib[6]) - throw caml_maybe_attach_backtrace(_ac_, 0); + catch(_ah_){ + var _ab_ = caml_wrap_exception(_ah_); + if(_ab_[1] !== Stdlib[6]) + throw caml_maybe_attach_backtrace(_ab_, 0); var match = 0; } if(! match) @@ -20499,7 +20507,7 @@ /*<>*/ return consume_arg(0); } /*<>*/ /*<>*/ var - _ae_ = make_symlist(cst$5, cst$4, cst$3, symb); + _ad_ = make_symlist(cst$5, cst$4, cst$3, symb); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, @@ -20507,16 +20515,16 @@ s, arg$5, /*<>*/ caml_call2 - (Stdlib[28], cst_one_of, _ae_)]], + (Stdlib[28], cst_one_of, _ad_)]], 1); case 12: var f$5 = param[1]; /*<>*/ no_arg(0); /*<>*/ for(;;){ if(current[1] >= (argv[1].length - 1 - 1 | 0)) return 0; - var _af_ = current[1] + 1 | 0; + var _ae_ = current[1] + 1 | 0; /*<>*/ /*<>*/ caml_call1 - (f$5, caml_check_bound(argv[1], _af_)[1 + _af_]); + (f$5, caml_check_bound(argv[1], _ae_)[1 + _ae_]); /*<>*/ consume_arg(0); } break; @@ -20530,8 +20538,8 @@ /*<>*/ return /*<>*/ caml_call1 (f$6, /*<>*/ caml_call1(Stdlib_List[9], acc[1])); - var _ah_ = current[1] + 1 | 0, _ag_ = acc[1]; - acc[1] = [0, caml_check_bound(argv[1], _ah_)[1 + _ah_], _ag_]; + var _ag_ = current[1] + 1 | 0, _af_ = acc[1]; + acc[1] = [0, caml_check_bound(argv[1], _ag_)[1 + _ag_], _af_]; /*<>*/ consume_arg(0); } break; @@ -20609,8 +20617,8 @@ function parse(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _Y_ = parse_argv(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _Y_; + _X_ = parse_argv(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _X_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20632,8 +20640,8 @@ function parse_dynamic(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _X_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _X_; + _W_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _W_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20658,9 +20666,9 @@ /*<>*/ argv = [0, caml_sys_argv(0)], /*<>*/ spec = [0, l], /*<>*/ current$0 = [0, current[1]], - /*<>*/ _W_ = + /*<>*/ _V_ = parse_and_expand_argv_dynamic(current$0, argv, spec, f, msg); - /*<>*/ return _W_; + /*<>*/ return _V_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20697,17 +20705,17 @@ /*<>*/ /*<>*/ var n$0 = /*<>*/ caml_call2(Stdlib_String[35], s, 9); } - catch(_U_){ - var _S_ = caml_wrap_exception(_U_); - if(_S_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_S_, 0); + catch(_T_){ + var _R_ = caml_wrap_exception(_T_); + if(_R_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_R_, 0); /*<>*/ try{ /*<>*/ /*<>*/ var n = /*<>*/ caml_call2(Stdlib_String[35], s, 32); } - catch(_V_){ - var _T_ = caml_wrap_exception(_V_); - if(_T_ === Stdlib[8]) /*<>*/ return len; - throw caml_maybe_attach_backtrace(_T_, 0); + catch(_U_){ + var _S_ = caml_wrap_exception(_U_); + if(_S_ === Stdlib[8]) /*<>*/ return len; + throw caml_maybe_attach_backtrace(_S_, 0); } /*<>*/ return loop(n + 1 | 0); } @@ -20717,12 +20725,12 @@ var doc = param[3], spec = param[2], kwd = param[1]; /*<>*/ if(11 === spec[0]) return caml_call2(Stdlib_Int[11], cur, caml_ml_string_length(kwd)); - var _R_ = caml_ml_string_length(kwd) + second_word(doc) | 0; - return caml_call2(Stdlib_Int[11], cur, _R_); + var _Q_ = caml_ml_string_length(kwd) + second_word(doc) | 0; + return caml_call2(Stdlib_Int[11], cur, _Q_); } function replace_leading_tab(s){ /*<>*/ /*<>*/ var seen = [0, 0]; - function _Q_(c){ + function _P_(c){ /*<>*/ if(9 === c && ! seen[1]){ seen[1] = 1; /*<>*/ return 32; @@ -20730,7 +20738,7 @@ /*<>*/ return c; /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[17], _Q_, s); + (Stdlib_String[17], _P_, s); /*<>*/ } function align(opt, speclist){ /*<>*/ if(opt) @@ -20744,7 +20752,7 @@ (Stdlib_List[25], max_arg_len, 0, completed), /*<>*/ len$0 = /*<>*/ caml_call2(Stdlib_Int[10], len, limit); - /*<>*/ function _K_(ksd){ + /*<>*/ function _J_(ksd){ var kwd = ksd[1], spec = ksd[2]; if(! caml_string_notequal(ksd[3], cst$7)) /*<>*/ return ksd; @@ -20752,20 +20760,20 @@ /*<>*/ var msg$0 = ksd[3], /*<>*/ cutcol$0 = second_word(msg$0), - /*<>*/ _N_ = + /*<>*/ _M_ = /*<>*/ caml_call2 (Stdlib_Int[11], 0, len$0 - cutcol$0 | 0) + 3 | 0, /*<>*/ spaces$0 = - /*<>*/ caml_call2(Stdlib_String[1], _N_, 32), - /*<>*/ _O_ = replace_leading_tab(msg$0), - /*<>*/ _P_ = - /*<>*/ caml_call2(Stdlib[28], spaces$0, _O_); + /*<>*/ caml_call2(Stdlib_String[1], _M_, 32), + /*<>*/ _N_ = replace_leading_tab(msg$0), + /*<>*/ _O_ = + /*<>*/ caml_call2(Stdlib[28], spaces$0, _N_); /*<>*/ return [0, kwd, spec, - /*<>*/ caml_call2(Stdlib[28], cst$6, _P_)]; + /*<>*/ caml_call2(Stdlib[28], cst$6, _O_)]; } /*<>*/ var msg = ksd[3], @@ -20779,24 +20787,24 @@ /*<>*/ var /*<>*/ spaces = /*<>*/ caml_call2(Stdlib_String[1], diff, 32), - /*<>*/ _L_ = replace_leading_tab(msg), + /*<>*/ _K_ = replace_leading_tab(msg), /*<>*/ prefix = - /*<>*/ caml_call3(Stdlib_String[15], _L_, 0, cutcol), + /*<>*/ caml_call3(Stdlib_String[15], _K_, 0, cutcol), /*<>*/ suffix = /*<>*/ caml_call3 (Stdlib_String[15], msg, cutcol, caml_ml_string_length(msg) - cutcol | 0), - /*<>*/ _M_ = + /*<>*/ _L_ = /*<>*/ caml_call2(Stdlib[28], spaces, suffix); /*<>*/ return [0, kwd, spec$0, - /*<>*/ caml_call2(Stdlib[28], prefix, _M_)]; + /*<>*/ caml_call2(Stdlib[28], prefix, _L_)]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[19], _K_, completed); + (Stdlib_List[19], _J_, completed); /*<>*/ } function read_aux(trim, sep, file){ /*<>*/ var @@ -20816,21 +20824,21 @@ (0 < len && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ var - _J_ = + _I_ = /*<>*/ caml_call3 (Stdlib_String[15], word, 0, len - 1 | 0); break a; } - var _J_ = word; + var _I_ = word; } - var word$0 = _J_; + var word$0 = _I_; } else var word$0 = word; words[1] = [0, word$0, words[1]]; /*<>*/ /*<>*/ caml_call1 (Stdlib_Buffer[8], buf); - /*<>*/ return _y_; + /*<>*/ return sentinal; /*<>*/ } /*<>*/ try{ for(;;){ @@ -20843,45 +20851,45 @@ (Stdlib_Buffer[12], buf, c); } } - catch(_I_){ - var _G_ = caml_wrap_exception(_I_); - if(_G_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_G_, 0); + catch(_H_){ + var _F_ = caml_wrap_exception(_H_); + if(_F_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_F_, 0); if(0 < /*<>*/ caml_call1(Stdlib_Buffer[7], buf)) /*<>*/ stash(0); /*<>*/ /*<>*/ caml_call1(Stdlib[93], ic); /*<>*/ /*<>*/ var - _H_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); + _G_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Array[10], _H_); + (Stdlib_Array[10], _G_); } /*<>*/ } var _r_ = 10, _s_ = 1; - /*<>*/ function read_arg(_F_){ - /*<>*/ return read_aux(_s_, _r_, _F_); + /*<>*/ function read_arg(_E_){ + /*<>*/ return read_aux(_s_, _r_, _E_); } /*<>*/ var /*<>*/ _t_ = 0, _u_ = 0; - /*<>*/ function read_arg0(_E_){ - /*<>*/ return read_aux(_u_, _t_, _E_); + /*<>*/ function read_arg0(_D_){ + /*<>*/ return read_aux(_u_, _t_, _D_); } function write_aux(sep, file, args){ /*<>*/ /*<>*/ var oc = /*<>*/ caml_call1(Stdlib[61], file); - function _D_(s){ + function _C_(s){ /*<>*/ return caml_call4 (Stdlib_Printf[1], oc, _v_, s, sep); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _D_, args); + (Stdlib_Array[11], _C_, args); /*<>*/ return /*<>*/ caml_call1 (Stdlib[76], oc); /*<>*/ } var _w_ = 10; - /*<>*/ function write_arg(_B_, _C_){ - /*<>*/ return write_aux(_w_, _B_, _C_); + /*<>*/ function write_arg(_A_, _B_){ + /*<>*/ return write_aux(_w_, _A_, _B_); } /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ function write_arg0(_z_, _A_){ - /*<>*/ return write_aux(_x_, _z_, _A_); + /*<>*/ function write_arg0(_y_, _z_){ + /*<>*/ return write_aux(_x_, _y_, _z_); } var Stdlib_Arg = @@ -21544,10 +21552,10 @@ : runtime.caml_call_gen(f, [a0, a1]); } var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Printexc = global_data.Stdlib__Printexc, Stdlib = global_data.Stdlib, - _b_ = undefined, cst_Fun_Finally_raised = "Fun.Finally_raised: ", cst_Stdlib_Fun_Finally_raised = "Stdlib.Fun.Finally_raised"; function const$0(c, param){ @@ -21567,11 +21575,11 @@ /*<>*/ return 0; /*<>*/ var exn = param[2], - /*<>*/ _c_ = + /*<>*/ _b_ = /*<>*/ caml_call1(Stdlib_Printexc[1], exn); /*<>*/ return [0, /*<>*/ caml_call2 - (Stdlib[28], cst_Fun_Finally_raised, _c_)]; + (Stdlib[28], cst_Fun_Finally_raised, _b_)]; /*<>*/ } /*<>*/ /*<>*/ caml_call1 (Stdlib_Printexc[9], _a_); @@ -21579,7 +21587,7 @@ function finally_no_exn(param){ /*<>*/ try{ /*<>*/ /*<>*/ caml_call1(finally$0, 0); - /*<>*/ return _b_; + /*<>*/ return sentinal; } catch(e$0){ /*<>*/ var @@ -22037,7 +22045,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - _a_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Array = global_data.Stdlib__Array, @@ -22099,46 +22107,46 @@ /*<>*/ if(col === idx.length - 1){ /*<>*/ /*<>*/ caml_ba_set_generic (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ return _a_; + /*<>*/ return sentinal; } /*<>*/ var - /*<>*/ _an_ = + /*<>*/ _am_ = caml_check_bound(max, col)[1 + col] - 1 | 0, - /*<>*/ _am_ = 0; - if(_an_ >= 0){ - var j = _am_; + /*<>*/ _al_ = 0; + if(_am_ >= 0){ + var j = _al_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); /*<>*/ /*<>*/ var - _ao_ = j + 1 | 0; - if(_an_ === j) break; - var j = _ao_; + _an_ = j + 1 | 0; + if(_am_ === j) break; + var j = _an_; } } - return _a_; + return sentinal; /*<>*/ } function floop(arr, idx, f, col, max){ /*<>*/ if(0 > col){ /*<>*/ /*<>*/ caml_ba_set_generic (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ return _a_; + /*<>*/ return sentinal; } /*<>*/ var - /*<>*/ _ak_ = caml_check_bound(max, col)[1 + col], - /*<>*/ _aj_ = 1; - if(_ak_ >= 1){ - var j = _aj_; + /*<>*/ _aj_ = caml_check_bound(max, col)[1 + col], + /*<>*/ _ai_ = 1; + if(_aj_ >= 1){ + var j = _ai_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ floop(arr, idx, f, col - 1 | 0, max); /*<>*/ /*<>*/ var - _al_ = j + 1 | 0; - if(_ak_ === j) break; - var j = _al_; + _ak_ = j + 1 | 0; + if(_aj_ === j) break; + var j = _ak_; } } - return _a_; + return sentinal; /*<>*/ } function init(kind, layout, dims, f){ /*<>*/ var @@ -22167,31 +22175,31 @@ /*<>*/ caml_ba_num_dims(a), /*<>*/ d = /*<>*/ caml_make_vect(n, 0), - /*<>*/ _ag_ = n - 1 | 0, - /*<>*/ _af_ = 0; - if(_ag_ >= 0){ - var i = _af_; + /*<>*/ _af_ = n - 1 | 0, + /*<>*/ _ae_ = 0; + if(_af_ >= 0){ + var i = _ae_; for(;;){ /*<>*/ /*<>*/ var - _ah_ = /*<>*/ runtime.caml_ba_dim(a, i); - /*<>*/ caml_check_bound(d, i)[1 + i] = _ah_; + _ag_ = /*<>*/ runtime.caml_ba_dim(a, i); + /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; /*<>*/ /*<>*/ var - _ai_ = i + 1 | 0; - if(_ag_ === i) break; - var i = _ai_; + _ah_ = i + 1 | 0; + if(_af_ === i) break; + var i = _ah_; } } /*<>*/ return d; /*<>*/ } function size_in_bytes(arr){ /*<>*/ var - /*<>*/ _ad_ = dims(arr), - /*<>*/ _ae_ = + /*<>*/ _ac_ = dims(arr), + /*<>*/ _ad_ = /*<>*/ caml_call3 - (Stdlib_Array[15], caml_mul, 1, _ad_); + (Stdlib_Array[15], caml_mul, 1, _ac_); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _ae_); + _ad_); /*<>*/ } function create(kind, layout){ /*<>*/ return /*<>*/ caml_ba_create @@ -22202,9 +22210,9 @@ (arr, [0]); /*<>*/ } function set(arr){ - /*<>*/ /*<>*/ var _ab_ = [0]; - /*<>*/ return function(_ac_){ - /*<>*/ return caml_ba_set_generic(arr, _ab_, _ac_);}; + /*<>*/ /*<>*/ var _aa_ = [0]; + /*<>*/ return function(_ab_){ + /*<>*/ return caml_ba_set_generic(arr, _aa_, _ab_);}; /*<>*/ } function size_in_bytes$0(arr){ /*<>*/ return kind_size_in_bytes @@ -22222,10 +22230,10 @@ /*<>*/ } function size_in_bytes$1(arr){ /*<>*/ /*<>*/ var - _aa_ = /*<>*/ caml_ba_dim_1(arr); + _$_ = /*<>*/ caml_ba_dim_1(arr); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _aa_); + _$_); /*<>*/ } function slice(a, n){ /*<>*/ return /*<>*/ runtime.caml_ba_layout @@ -22237,32 +22245,32 @@ /*<>*/ /*<>*/ var arr = create$0(kind, layout, dim); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var ___ = 1; + /*<>*/ /*<>*/ var _Z_ = 1; if(dim >= 1){ - var i$0 = ___; + var i$0 = _Z_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i$0, /*<>*/ caml_call1(f, i$0)); /*<>*/ /*<>*/ var - _$_ = i$0 + 1 | 0; + ___ = i$0 + 1 | 0; if(dim === i$0) break; - var i$0 = _$_; + var i$0 = ___; } } /*<>*/ return arr; } /*<>*/ var - _Y_ = dim - 1 | 0, - /*<>*/ _X_ = 0; - if(_Y_ >= 0){ - var i = _X_; + _X_ = dim - 1 | 0, + /*<>*/ _W_ = 0; + if(_X_ >= 0){ + var i = _W_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var - _Z_ = i + 1 | 0; - if(_Y_ === i) break; - var i = _Z_; + _Y_ = i + 1 | 0; + if(_X_ === i) break; + var i = _Y_; } } /*<>*/ return arr; @@ -22271,17 +22279,17 @@ /*<>*/ var /*<>*/ ba = create$0(kind, layout, data.length - 1), /*<>*/ ofs = layout ? 1 : 0, - _V_ = data.length - 1 - 1 | 0, - _U_ = 0; - if(_V_ >= 0){ - var i = _U_; + _U_ = data.length - 1 - 1 | 0, + _T_ = 0; + if(_U_ >= 0){ + var i = _T_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); /*<>*/ /*<>*/ var - _W_ = i + 1 | 0; - if(_V_ === i) break; - var i = _W_; + _V_ = i + 1 | 0; + if(_U_ === i) break; + var i = _V_; } } /*<>*/ return ba; @@ -22292,16 +22300,16 @@ /*<>*/ } function size_in_bytes$2(arr){ /*<>*/ var - /*<>*/ _S_ = + /*<>*/ _R_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _T_ = + /*<>*/ _S_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _T_), - _S_); + _S_), + _R_); /*<>*/ } function slice_left(a, n){ /*<>*/ return /*<>*/ caml_ba_slice @@ -22315,54 +22323,54 @@ /*<>*/ /*<>*/ var arr = create$1(kind, layout, dim1, dim2); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _O_ = 1; + /*<>*/ /*<>*/ var _N_ = 1; if(dim2 >= 1){ - var j$0 = _O_; + var j$0 = _N_; for(;;){ - /*<>*/ /*<>*/ var _P_ = 1; + /*<>*/ /*<>*/ var _O_ = 1; if(dim1 >= 1){ - var i$0 = _P_; + var i$0 = _O_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); /*<>*/ /*<>*/ var - _R_ = i$0 + 1 | 0; + _Q_ = i$0 + 1 | 0; if(dim1 === i$0) break; - var i$0 = _R_; + var i$0 = _Q_; } } /*<>*/ /*<>*/ var - _Q_ = j$0 + 1 | 0; + _P_ = j$0 + 1 | 0; if(dim2 === j$0) break; - var j$0 = _Q_; + var j$0 = _P_; } } /*<>*/ return arr; } /*<>*/ var - _J_ = dim1 - 1 | 0, - /*<>*/ _I_ = 0; - if(_J_ >= 0){ - var i = _I_; + _I_ = dim1 - 1 | 0, + /*<>*/ _H_ = 0; + if(_I_ >= 0){ + var i = _H_; for(;;){ /*<>*/ var - _L_ = dim2 - 1 | 0, - /*<>*/ _K_ = 0; - if(_L_ >= 0){ - var j = _K_; + _K_ = dim2 - 1 | 0, + /*<>*/ _J_ = 0; + if(_K_ >= 0){ + var j = _J_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i, j, /*<>*/ caml_call2(f, i, j)); /*<>*/ /*<>*/ var - _N_ = j + 1 | 0; - if(_L_ === j) break; - var j = _N_; + _M_ = j + 1 | 0; + if(_K_ === j) break; + var j = _M_; } } /*<>*/ /*<>*/ var - _M_ = i + 1 | 0; - if(_J_ === i) break; - var i = _M_; + _L_ = i + 1 | 0; + if(_I_ === i) break; + var i = _L_; } } /*<>*/ return arr; @@ -22374,10 +22382,10 @@ 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, /*<>*/ ba = create$1(kind, layout, dim1, dim2), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _D_ = dim1 - 1 | 0, - _C_ = 0; - if(_D_ >= 0){ - var i = _C_; + /*<>*/ _C_ = dim1 - 1 | 0, + _B_ = 0; + if(_C_ >= 0){ + var i = _B_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -22385,23 +22393,23 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array2_of_array_n); /*<>*/ var - /*<>*/ _F_ = dim2 - 1 | 0, - /*<>*/ _E_ = 0; - if(_F_ >= 0){ - var j = _E_; + /*<>*/ _E_ = dim2 - 1 | 0, + /*<>*/ _D_ = 0; + if(_E_ >= 0){ + var j = _D_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (ba, i + ofs | 0, j + ofs | 0, caml_check_bound(row, j)[1 + j]); /*<>*/ /*<>*/ var - _H_ = j + 1 | 0; - if(_F_ === j) break; - var j = _H_; + _G_ = j + 1 | 0; + if(_E_ === j) break; + var j = _G_; } } /*<>*/ /*<>*/ var - _G_ = i + 1 | 0; - if(_D_ === i) break; - var i = _G_; + _F_ = i + 1 | 0; + if(_C_ === i) break; + var i = _F_; } } /*<>*/ return ba; @@ -22412,20 +22420,20 @@ /*<>*/ } function size_in_bytes$3(arr){ /*<>*/ var - /*<>*/ _z_ = + /*<>*/ _y_ = /*<>*/ runtime.caml_ba_dim_3(arr), - /*<>*/ _A_ = + /*<>*/ _z_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _B_ = + /*<>*/ _A_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul (caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _B_), - _A_), - _z_); + _A_), + _z_), + _y_); /*<>*/ } function slice_left_1(a, n, m){ /*<>*/ return /*<>*/ caml_ba_slice @@ -22447,17 +22455,17 @@ /*<>*/ /*<>*/ var arr = create$2(kind, layout, dim1, dim2, dim3); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _t_ = 1; + /*<>*/ /*<>*/ var _s_ = 1; if(dim3 >= 1){ - var k$0 = _t_; + var k$0 = _s_; for(;;){ - /*<>*/ /*<>*/ var _u_ = 1; + /*<>*/ /*<>*/ var _t_ = 1; if(dim2 >= 1){ - var j$0 = _u_; + var j$0 = _t_; for(;;){ - /*<>*/ /*<>*/ var _w_ = 1; + /*<>*/ /*<>*/ var _v_ = 1; if(dim1 >= 1){ - var i$0 = _w_; + var i$0 = _v_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, @@ -22466,61 +22474,61 @@ k$0, /*<>*/ caml_call3(f, i$0, j$0, k$0)); /*<>*/ /*<>*/ var - _y_ = i$0 + 1 | 0; + _x_ = i$0 + 1 | 0; if(dim1 === i$0) break; - var i$0 = _y_; + var i$0 = _x_; } } /*<>*/ /*<>*/ var - _x_ = j$0 + 1 | 0; + _w_ = j$0 + 1 | 0; if(dim2 === j$0) break; - var j$0 = _x_; + var j$0 = _w_; } } /*<>*/ /*<>*/ var - _v_ = k$0 + 1 | 0; + _u_ = k$0 + 1 | 0; if(dim3 === k$0) break; - var k$0 = _v_; + var k$0 = _u_; } } /*<>*/ return arr; } /*<>*/ var - _l_ = dim1 - 1 | 0, - /*<>*/ _k_ = 0; - if(_l_ >= 0){ - var i = _k_; + _k_ = dim1 - 1 | 0, + /*<>*/ _j_ = 0; + if(_k_ >= 0){ + var i = _j_; for(;;){ /*<>*/ var - _n_ = dim2 - 1 | 0, - /*<>*/ _m_ = 0; - if(_n_ >= 0){ - var j = _m_; + _m_ = dim2 - 1 | 0, + /*<>*/ _l_ = 0; + if(_m_ >= 0){ + var j = _l_; for(;;){ /*<>*/ var - _q_ = dim3 - 1 | 0, - /*<>*/ _p_ = 0; - if(_q_ >= 0){ - var k = _p_; + _p_ = dim3 - 1 | 0, + /*<>*/ _o_ = 0; + if(_p_ >= 0){ + var k = _o_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); /*<>*/ /*<>*/ var - _s_ = k + 1 | 0; - if(_q_ === k) break; - var k = _s_; + _r_ = k + 1 | 0; + if(_p_ === k) break; + var k = _r_; } } /*<>*/ /*<>*/ var - _r_ = j + 1 | 0; - if(_n_ === j) break; - var j = _r_; + _q_ = j + 1 | 0; + if(_m_ === j) break; + var j = _q_; } } /*<>*/ /*<>*/ var - _o_ = i + 1 | 0; - if(_l_ === i) break; - var i = _o_; + _n_ = i + 1 | 0; + if(_k_ === i) break; + var i = _n_; } } /*<>*/ return arr; @@ -22536,10 +22544,10 @@ : caml_check_bound(caml_check_bound(data, 0)[1], 0)[1].length - 1, /*<>*/ ba = create$2(kind, layout, dim1, dim2, dim3), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _c_ = dim1 - 1 | 0, - _b_ = 0; - if(_c_ >= 0){ - var i = _b_; + /*<>*/ _b_ = dim1 - 1 | 0, + _a_ = 0; + if(_b_ >= 0){ + var i = _a_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -22547,10 +22555,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n); /*<>*/ var - /*<>*/ _e_ = dim2 - 1 | 0, - /*<>*/ _d_ = 0; - if(_e_ >= 0){ - var j = _d_; + /*<>*/ _d_ = dim2 - 1 | 0, + /*<>*/ _c_ = 0; + if(_d_ >= 0){ + var j = _c_; for(;;){ /*<>*/ /*<>*/ var col = caml_check_bound(row, j)[1 + j]; @@ -22558,10 +22566,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n$0); /*<>*/ var - /*<>*/ _h_ = dim3 - 1 | 0, - /*<>*/ _g_ = 0; - if(_h_ >= 0){ - var k = _g_; + /*<>*/ _g_ = dim3 - 1 | 0, + /*<>*/ _f_ = 0; + if(_g_ >= 0){ + var k = _f_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (ba, @@ -22570,21 +22578,21 @@ k + ofs | 0, caml_check_bound(col, k)[1 + k]); /*<>*/ /*<>*/ var - _j_ = k + 1 | 0; - if(_h_ === k) break; - var k = _j_; + _i_ = k + 1 | 0; + if(_g_ === k) break; + var k = _i_; } } /*<>*/ /*<>*/ var - _i_ = j + 1 | 0; - if(_e_ === j) break; - var j = _i_; + _h_ = j + 1 | 0; + if(_d_ === j) break; + var j = _h_; } } /*<>*/ /*<>*/ var - _f_ = i + 1 | 0; - if(_c_ === i) break; - var i = _f_; + _e_ = i + 1 | 0; + if(_b_ === i) break; + var i = _e_; } } /*<>*/ return ba; @@ -24163,13 +24171,13 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Sys = global_data.Stdlib__Sys, Stdlib_Int = global_data.Stdlib__Int, Stdlib_Array = global_data.Stdlib__Array, Stdlib_Obj = global_data.Stdlib__Obj, - _a_ = undefined, cst_Weak_Make_hash_bucket_cann = "Weak.Make: hash bucket cannot grow more", cst_Weak_fill = "Weak.fill", cst_Weak_blit = "Weak.blit", @@ -24180,9 +24188,9 @@ cst_Weak_create = "Weak.create"; function create(l){ /*<>*/ var - _X_ = 0 <= l ? 1 : 0, - _Y_ = _X_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _X_; - if(1 - _Y_) + _W_ = 0 <= l ? 1 : 0, + _X_ = _W_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _W_; + if(1 - _X_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Weak_create); /*<>*/ return /*<>*/ runtime.caml_weak_create @@ -24193,10 +24201,12 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _U_ = 0 <= o ? 1 : 0, - _V_ = _U_ ? o < length(e) ? 1 : 0 : _U_, - _W_ = 1 - _V_; - return _W_ ? ( /*<>*/ caml_call1(Stdlib[1], msg), _a_) : _W_; + _T_ = 0 <= o ? 1 : 0, + _U_ = _T_ ? o < length(e) ? 1 : 0 : _T_, + _V_ = 1 - _U_; + return _V_ + ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) + : _V_; /*<>*/ } function set(e, o, x){ /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); @@ -24229,13 +24239,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _S_ = 0 !== l ? 1 : 0, - _T_ = - _S_ + _R_ = 0 !== l ? 1 : 0, + _S_ = + _R_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _S_; - /*<>*/ return _T_; + : _R_; + /*<>*/ return _S_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Weak_blit); @@ -24243,14 +24253,14 @@ function fill(ar, ofs, len, x){ /*<>*/ if (0 <= ofs && 0 <= len && (length(ar) - len | 0) >= ofs){ - var _Q_ = (ofs + len | 0) - 1 | 0; - if(_Q_ >= ofs){ + var _P_ = (ofs + len | 0) - 1 | 0; + if(_P_ >= ofs){ var i = ofs; for(;;){ /*<>*/ set(ar, i, x); - /*<>*/ /*<>*/ var _R_ = i + 1 | 0; - if(_Q_ === i) break; - var i = _R_; + /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; + if(_P_ === i) break; + var i = _Q_; } } return 0; @@ -24278,16 +24288,16 @@ /*<>*/ } function clear(t){ /*<>*/ var - _O_ = t[1].length - 1 - 1 | 0, - /*<>*/ _N_ = 0; - if(_O_ >= 0){ - var i = _N_; + _N_ = t[1].length - 1 - 1 | 0, + /*<>*/ _M_ = 0; + if(_N_ >= 0){ + var i = _M_; for(;;){ /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; - /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ === i) break; - var i = _P_; + /*<>*/ /*<>*/ var _O_ = i + 1 | 0; + if(_N_ === i) break; + var i = _O_; } } t[3] = limit; @@ -24295,8 +24305,8 @@ return 0; /*<>*/ } function fold(f, t, init){ - /*<>*/ var _L_ = t[1], i = 0; - /*<>*/ function _M_(b, accu$1){ + /*<>*/ var _K_ = t[1], i = 0; + /*<>*/ function _L_(b, accu$1){ var i$0 = i, accu = accu$1; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu; @@ -24315,11 +24325,11 @@ } } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _M_, _L_, init); + (Stdlib_Array[17], _L_, _K_, init); /*<>*/ } function iter(f, t){ - /*<>*/ var _J_ = t[1], i = 0; - /*<>*/ function _K_(b){ + /*<>*/ var _I_ = t[1], i = 0; + /*<>*/ function _J_(b){ var i$0 = i; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return 0; @@ -24335,15 +24345,15 @@ } } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Array[11], _K_, _J_); + (Stdlib_Array[11], _J_, _I_); /*<>*/ } function count_bucket(i, b, accu){ /*<>*/ var i$0 = i, accu$0 = accu; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu$0; /*<>*/ var - /*<>*/ _I_ = check(b, i$0) ? 1 : 0, - accu$1 = accu$0 + _I_ | 0, + /*<>*/ _H_ = check(b, i$0) ? 1 : 0, + accu$1 = accu$0 + _H_ | 0, i$1 = i$0 + 1 | 0, i$0 = i$1, accu$0 = accu$1; @@ -24351,14 +24361,14 @@ /*<>*/ } function count(t){ /*<>*/ var - /*<>*/ _C_ = 0, - _D_ = t[1], - _E_ = 0; - /*<>*/ function _F_(_G_, _H_){ - /*<>*/ return count_bucket(_E_, _G_, _H_); + /*<>*/ _B_ = 0, + _C_ = t[1], + _D_ = 0; + /*<>*/ function _E_(_F_, _G_){ + /*<>*/ return count_bucket(_D_, _F_, _G_); } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _F_, _D_, _C_); + (Stdlib_Array[17], _E_, _C_, _B_); /*<>*/ } function add_aux(t, setter, d, h, index){ /*<>*/ var @@ -24391,18 +24401,18 @@ /*<>*/ caml_check_bound(newhashes, sz)[1 + sz] = h; /*<>*/ caml_check_bound(t[1], index)[1 + index] = newbucket$0; /*<>*/ caml_check_bound(t[2], index)[1 + index] = newhashes; - var _y_ = sz <= t[3] ? 1 : 0, _z_ = _y_ ? t[3] < newsz ? 1 : 0 : _y_; - if(_z_){ + var _x_ = sz <= t[3] ? 1 : 0, _y_ = _x_ ? t[3] < newsz ? 1 : 0 : _x_; + if(_y_){ t[4] = t[4] + 1 | 0; var i$4 = 0; for(;;){ /*<>*/ var - _o_ = t[5], + _n_ = t[5], /*<>*/ bucket = - caml_check_bound(t[1], _o_)[1 + _o_], - /*<>*/ _p_ = t[5], + caml_check_bound(t[1], _n_)[1 + _n_], + /*<>*/ _o_ = t[5], /*<>*/ hbucket = - caml_check_bound(t[2], _p_)[1 + _p_], + caml_check_bound(t[2], _o_)[1 + _o_], /*<>*/ len = length(bucket), prev_len = (((len - 3 | 0) * 2 | 0) + 2 | 0) / 3 | 0, /*<>*/ live = count_bucket(0, bucket, 0); @@ -24414,28 +24424,28 @@ /*<>*/ for(;;){ if(prev_len > j){ if(0 === prev_len){ + var _q_ = t[5]; + /*<>*/ caml_check_bound(t[1], _q_)[1 + _q_] = emptybucket; var _r_ = t[5]; - /*<>*/ caml_check_bound(t[1], _r_)[1 + _r_] = emptybucket; - var _s_ = t[5]; - /*<>*/ caml_check_bound(t[2], _s_)[1 + _s_] = [0]; + /*<>*/ caml_check_bound(t[2], _r_)[1 + _r_] = [0]; } else{ /*<>*/ /*<>*/ var newbucket = create(prev_len); /*<>*/ blit(bucket, 0, newbucket, 0, prev_len); - var _v_ = t[5]; - /*<>*/ caml_check_bound(t[1], _v_)[1 + _v_] = newbucket; + var _u_ = t[5]; + /*<>*/ caml_check_bound(t[1], _u_)[1 + _u_] = newbucket; /*<>*/ var - /*<>*/ _w_ = + /*<>*/ _v_ = /*<>*/ caml_call3 (Stdlib_Array[5], hbucket, 0, prev_len), - _x_ = t[5]; - /*<>*/ caml_check_bound(t[2], _x_)[1 + _x_] = _w_; + _w_ = t[5]; + /*<>*/ caml_check_bound(t[2], _w_)[1 + _w_] = _v_; } var - _t_ = t[3] < len ? 1 : 0, - _u_ = _t_ ? prev_len <= t[3] ? 1 : 0 : _t_; - if(_u_) t[4] = t[4] - 1 | 0; + _s_ = t[3] < len ? 1 : 0, + _t_ = _s_ ? prev_len <= t[3] ? 1 : 0 : _s_; + if(_t_) t[4] = t[4] - 1 | 0; break; } /*<>*/ if(check(bucket, i$0)) @@ -24443,8 +24453,8 @@ else if(check(bucket, j)){ /*<>*/ blit(bucket, j, bucket, i$0, 1); /*<>*/ /*<>*/ var - _q_ = caml_check_bound(hbucket, j)[1 + j]; - /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _q_; + _p_ = caml_check_bound(hbucket, j)[1 + j]; + /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _p_; /*<>*/ var /*<>*/ j$0 = j - 1 | 0, i$2 = i$0 + 1 | 0, @@ -24459,13 +24469,13 @@ } t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); /*<>*/ /*<>*/ var - _B_ = i$4 + 1 | 0; + _A_ = i$4 + 1 | 0; if(2 === i$4) break; - var i$4 = _B_; + var i$4 = _A_; } } - var _A_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; - if(! _A_) return _A_; + var _z_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; + if(! _z_) return _z_; /*<>*/ var oldlen = t[1].length - 1, /*<>*/ newlen = @@ -24476,9 +24486,9 @@ if(oldlen < newlen){ /*<>*/ var /*<>*/ newt = create$0(newlen), - _m_ = t[1], + _l_ = t[1], i = 0, - /*<>*/ _n_ = + /*<>*/ _m_ = function(j, ob){ var oi = i; /*<>*/ for(;;){ @@ -24504,7 +24514,7 @@ } }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[12], _n_, _m_); + (Stdlib_Array[12], _m_, _l_); t[1] = newt[1]; t[2] = newt[2]; t[3] = newt[3]; @@ -24665,24 +24675,24 @@ } /*<>*/ } function remove(t, d){ - /*<>*/ /*<>*/ var _l_ = 0; + /*<>*/ /*<>*/ var _k_ = 0; /*<>*/ return find_shadow (t, d, function(w, i){ /*<>*/ return set(w, i, 0); /*<>*/ }, - _l_); + _k_); /*<>*/ } function mem(t, d){ - /*<>*/ /*<>*/ var _k_ = 0; + /*<>*/ /*<>*/ var _j_ = 0; /*<>*/ return find_shadow (t, d, function(w, i){ /*<>*/ return 1; /*<>*/ }, - _k_); + _j_); /*<>*/ } function find_all(t, d){ /*<>*/ var @@ -24732,17 +24742,17 @@ /*<>*/ caml_call2(Stdlib_Array[13], length, t[1]); /*<>*/ /*<>*/ caml_call2 (Stdlib_Array[30], runtime.caml_int_compare, lens); - var _b_ = 0; - function _c_(_j_, _i_){ /*<>*/ return _j_ + _i_ | 0;} + var _a_ = 0; + function _b_(_i_, _h_){ /*<>*/ return _i_ + _h_ | 0;} /*<>*/ var /*<>*/ totlen = - /*<>*/ caml_call3(Stdlib_Array[15], _c_, _b_, lens), - /*<>*/ _d_ = len - 1 | 0, - _f_ = len / 2 | 0, - /*<>*/ _e_ = caml_check_bound(lens, _d_)[1 + _d_], - /*<>*/ _g_ = caml_check_bound(lens, _f_)[1 + _f_], - /*<>*/ _h_ = caml_check_bound(lens, 0)[1]; - /*<>*/ return [0, len, count(t), totlen, _h_, _g_, _e_]; + /*<>*/ caml_call3(Stdlib_Array[15], _b_, _a_, lens), + /*<>*/ _c_ = len - 1 | 0, + _e_ = len / 2 | 0, + /*<>*/ _d_ = caml_check_bound(lens, _c_)[1 + _c_], + /*<>*/ _f_ = caml_check_bound(lens, _e_)[1 + _e_], + /*<>*/ _g_ = caml_check_bound(lens, 0)[1]; + /*<>*/ return [0, len, count(t), totlen, _g_, _f_, _d_]; /*<>*/ } /*<>*/ return [0, create$0, @@ -24799,7 +24809,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - _m_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$14 = ".", cst$11 = cst$15, @@ -24849,25 +24859,25 @@ function pp_output_string(state, s){ /*<>*/ caml_call3 (state[17], s, 0, caml_ml_string_length(s)); - return _m_; + return sentinal; /*<>*/ } function pp_output_newline(state){ /*<>*/ /*<>*/ caml_call1 (state[19], 0); - /*<>*/ return _m_; + /*<>*/ return sentinal; /*<>*/ } function format_pp_text(state, size, text){ /*<>*/ state[9] = state[9] - size | 0; /*<>*/ pp_output_string(state, text); state[11] = 0; - return _m_; + return sentinal; /*<>*/ } function format_string(state, s){ /*<>*/ /*<>*/ var - _bO_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); - /*<>*/ return _bO_ - ? (format_pp_text(state, caml_ml_string_length(s), s), _m_) - : _bO_; + _bN_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); + /*<>*/ return _bN_ + ? (format_pp_text(state, caml_ml_string_length(s), s), sentinal) + : _bN_; /*<>*/ } function break_new_line(state, param, width){ var after = param[3], offset = param[2], before = param[1]; @@ -24884,11 +24894,11 @@ /*<>*/ /*<>*/ caml_call1 (state[21], n); /*<>*/ format_string(state, after); - /*<>*/ return _m_; + /*<>*/ return sentinal; } function break_line(state, width){ /*<>*/ break_new_line(state, _a_, width); - /*<>*/ return _m_; + /*<>*/ return sentinal; /*<>*/ } function break_same_line(state, param){ var after = param[3], width = param[2], before = param[1]; @@ -24897,7 +24907,7 @@ /*<>*/ /*<>*/ caml_call1 (state[20], width); /*<>*/ format_string(state, after); - /*<>*/ return _m_; + /*<>*/ return sentinal; } function format_pp_token(state, size$0, param){ /*<>*/ if(typeof param === "number") @@ -24906,7 +24916,7 @@ /*<>*/ /*<>*/ var match$3 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$3) /*<>*/ return _m_; + if(! match$3) /*<>*/ return sentinal; /*<>*/ var tabs = match$3[1][1], /*<>*/ add_tab = @@ -24919,15 +24929,15 @@ : [0, x, add_tab(n, l)]; }; tabs[1] = add_tab(state[6] - state[9] | 0, tabs[1]); - return _m_; + return sentinal; case 1: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[2]); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 2: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[3]); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 3: /*<>*/ /*<>*/ var match$4 = @@ -24935,38 +24945,38 @@ if(match$4){ var width$0 = match$4[1][2]; /*<>*/ break_line(state, width$0); - /*<>*/ return _m_; + /*<>*/ return sentinal; } /*<>*/ pp_output_newline(state); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 4: - var _bM_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; - if(! _bM_) return _bM_; + var _bL_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; + if(! _bL_) return _bL_; /*<>*/ /*<>*/ var match$1 = /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); - if(! match$1) /*<>*/ return _m_; + if(! match$1) /*<>*/ return sentinal; var match$2 = match$1[1], size = match$2[1], length = match$2[3]; state[12] = state[12] - length | 0; state[9] = state[9] + size | 0; - return _m_; + return sentinal; default: /*<>*/ /*<>*/ var match$5 = /*<>*/ caml_call1(Stdlib_Stack[5], state[5]); - if(! match$5) /*<>*/ return _m_; + if(! match$5) /*<>*/ return sentinal; /*<>*/ var tag_name = match$5[1], /*<>*/ marker = /*<>*/ caml_call1(state[25], tag_name); /*<>*/ pp_output_string(state, marker); - /*<>*/ return _m_; + /*<>*/ return sentinal; } switch(param[0]){ case 0: var s = param[1]; /*<>*/ format_pp_text(state, size$0, s); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 1: /*<>*/ var breaks = param[2], @@ -24975,7 +24985,7 @@ before = breaks[1], /*<>*/ match$6 = /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(! match$6) /*<>*/ return _m_; + if(! match$6) /*<>*/ return sentinal; var match$7 = match$6[1], width$1 = match$7[2], @@ -24983,24 +24993,24 @@ /*<>*/ switch(box_type$0){ case 0: /*<>*/ break_same_line(state, fits); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 1: /*<>*/ break_new_line(state, breaks, width$1); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 2: /*<>*/ break_new_line(state, breaks, width$1); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 3: return state[9] < (size$0 + caml_ml_string_length(before) | 0) - ? (break_new_line(state, breaks, width$1), _m_) - : (break_same_line(state, fits), _m_); + ? (break_new_line(state, breaks, width$1), sentinal) + : (break_same_line(state, fits), sentinal); case 4: return state[11] - ? (break_same_line(state, fits), _m_) + ? (break_same_line(state, fits), sentinal) : state [9] < (size$0 + caml_ml_string_length(before) | 0) - ? (break_new_line(state, breaks, width$1), _m_) + ? (break_new_line(state, breaks, width$1), sentinal) : ((state [6] - width$1 @@ -25008,11 +25018,11 @@ + off | 0) < state[10] - ? (break_new_line(state, breaks, width$1), _m_) - : (break_same_line(state, fits), _m_); + ? (break_new_line(state, breaks, width$1), sentinal) + : (break_same_line(state, fits), sentinal); default: /*<>*/ break_same_line(state, fits); - /*<>*/ return _m_; + /*<>*/ return sentinal; } case 2: /*<>*/ var @@ -25021,7 +25031,7 @@ insertion_point = state[6] - state[9] | 0, /*<>*/ match$8 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$8) /*<>*/ return _m_; + if(! match$8) /*<>*/ return sentinal; /*<>*/ var tabs$0 = match$8[1][1], /*<>*/ match$9 = tabs$0[1]; @@ -25031,11 +25041,11 @@ if(param$0){ var tail = param$0[2], head = param$0[1]; if(insertion_point > head){var param$0 = tail; continue;} - var _bN_ = head; + var _bM_ = head; } else - var _bN_ = first; - var tab = _bN_; + var _bM_ = first; + var tab = _bM_; break; } } @@ -25045,10 +25055,10 @@ /*<>*/ return 0 <= offset ? (break_same_line (state, [0, cst$0, offset + n | 0, cst]), - _m_) + sentinal) : (break_new_line (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]), - _m_); + sentinal); case 3: var ty = param[2], @@ -25072,12 +25082,12 @@ 1 === ty ? 1 : state[9] < size$0 ? ty : 5; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); - /*<>*/ return _m_; + /*<>*/ return sentinal; case 4: var tbox = param[1]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], tbox, state[3]); - /*<>*/ return _m_; + /*<>*/ return sentinal; default: /*<>*/ var tag_name$0 = param[1], @@ -25085,7 +25095,7 @@ /*<>*/ caml_call1(state[24], tag_name$0); /*<>*/ pp_output_string(state, marker$0); caml_call2(Stdlib_Stack[3], tag_name$0, state[5]); - return _m_; + return sentinal; } } function advance_left(state){ @@ -25099,10 +25109,10 @@ length = match$0[3], token = match$0[2], pending_count = state[13] - state[12] | 0, - /*<>*/ _bK_ = 0 <= size ? 1 : 0, - /*<>*/ _bL_ = - _bK_ || (state[9] <= pending_count ? 1 : 0); - if(! _bL_) /*<>*/ return _bL_; + /*<>*/ _bJ_ = 0 <= size ? 1 : 0, + /*<>*/ _bK_ = + _bJ_ || (state[9] <= pending_count ? 1 : 0); + if(! _bK_) /*<>*/ return _bK_; /*<>*/ /*<>*/ caml_call1 (Stdlib_Queue[5], state[28]); /*<>*/ /*<>*/ var @@ -25126,28 +25136,31 @@ queue_elem = [0, unknown, _b_, 0]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, -1, queue_elem], stack); - /*<>*/ return _m_; + /*<>*/ return sentinal; /*<>*/ } function set_size(state, ty){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[7], state[1]); - if(! match) /*<>*/ return _m_; + if(! match) /*<>*/ return sentinal; /*<>*/ var match$0 = match[1], queue_elem = match$0[2], left_total = match$0[1], /*<>*/ size = queue_elem[1]; - if(left_total < state[12]){initialize_scan_stack(state[1]); return _m_;} - var _bJ_ = queue_elem[2]; - if(typeof _bJ_ !== "number") - switch(_bJ_[0]){ + if(left_total < state[12]){ + initialize_scan_stack(state[1]); + return sentinal; + } + var _bI_ = queue_elem[2]; + if(typeof _bI_ !== "number") + switch(_bI_[0]){ case 3: if(1 - ty){ queue_elem[1] = state[13] + size | 0; /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[1]); } - /*<>*/ return _m_; + /*<>*/ return sentinal; case 1: case 2: if(ty){ @@ -25155,9 +25168,9 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[1]); } - /*<>*/ return _m_; + /*<>*/ return sentinal; } - /*<>*/ return _m_; + /*<>*/ return sentinal; /*<>*/ } function scan_push(state, b, token){ /*<>*/ pp_enqueue(state, token); @@ -25175,26 +25188,26 @@ /*<>*/ elem = [0, size, [3, indent, br_ty], 0]; /*<>*/ return scan_push(state, 0, elem); } - var _bI_ = state[14] === state[15] ? 1 : 0; - if(! _bI_) return _bI_; + var _bH_ = state[14] === state[15] ? 1 : 0; + if(! _bH_) return _bH_; var s = state[16]; /*<>*/ return enqueue_string_as (state, caml_ml_string_length(s), s); /*<>*/ } function pp_close_box(state, param){ - /*<>*/ var _bG_ = 1 < state[14] ? 1 : 0; - if(_bG_){ + /*<>*/ var _bF_ = 1 < state[14] ? 1 : 0; + if(_bF_){ 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 _bH_ = 0; + var _bG_ = 0; } else - var _bH_ = _bG_; - return _bH_; + var _bG_ = _bF_; + return _bG_; /*<>*/ } function pp_open_stag(state, tag_name){ /*<>*/ if(state[22]){ @@ -25203,8 +25216,8 @@ /*<>*/ /*<>*/ caml_call1 (state[26], tag_name); } - var _bF_ = state[23]; - if(! _bF_) return _bF_; + var _bE_ = state[23]; + if(! _bE_) return _bE_; /*<>*/ /*<>*/ var token = [5, tag_name]; /*<>*/ return pp_enqueue(state, [0, zero, token, 0]); @@ -25212,8 +25225,8 @@ function pp_close_stag(state, param){ /*<>*/ if(state[23]) /*<>*/ pp_enqueue(state, [0, zero, 5, 0]); - var _bD_ = state[22]; - if(_bD_){ + var _bC_ = state[22]; + if(_bC_){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[5], state[4]); if(match){ @@ -25221,11 +25234,11 @@ /*<>*/ return /*<>*/ caml_call1 (state[27], tag_name); } - var _bE_ = 0; + var _bD_ = 0; } else - var _bE_ = _bD_; - /*<>*/ return _bE_; + var _bD_ = _bC_; + /*<>*/ return _bD_; /*<>*/ } function pp_set_print_tags(state, b){ /*<>*/ state[22] = b; @@ -25279,26 +25292,26 @@ /*<>*/ return pp_open_box_gen(state, 0, 3); /*<>*/ } function pp_flush_queue(state, b){ - /*<>*/ var _bB_ = state[4]; - function _bC_(param){ + /*<>*/ var _bA_ = state[4]; + function _bB_(param){ /*<>*/ return pp_close_stag(state, 0); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[12], _bC_, _bB_); + (Stdlib_Stack[12], _bB_, _bA_); /*<>*/ for(;;){ if(1 >= state[14]){ state[13] = pp_infinity; /*<>*/ advance_left(state); if(b) /*<>*/ pp_output_newline(state); /*<>*/ pp_rinit(state); - /*<>*/ return _m_; + /*<>*/ return sentinal; } /*<>*/ pp_close_box(state, 0); } /*<>*/ } function pp_print_as_size(state, size, s){ - /*<>*/ var _bA_ = state[14] < state[15] ? 1 : 0; - return _bA_ ? enqueue_string_as(state, size, s) : _bA_; + /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; + return _bz_ ? enqueue_string_as(state, size, s) : _bz_; /*<>*/ } function pp_print_as(state, isize, s){ /*<>*/ return pp_print_as_size(state, isize, s); @@ -25357,20 +25370,20 @@ (state[18], 0); /*<>*/ } function pp_force_newline(state, param){ - /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; - return _bz_ ? enqueue_advance(state, [0, zero, 3, 0]) : _bz_; + /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; + return _by_ ? enqueue_advance(state, [0, zero, 3, 0]) : _by_; /*<>*/ } function pp_print_if_newline(state, param){ - /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; - return _by_ ? enqueue_advance(state, [0, zero, 4, 0]) : _by_; + /*<>*/ var _bx_ = state[14] < state[15] ? 1 : 0; + return _bx_ ? enqueue_advance(state, [0, zero, 4, 0]) : _bx_; /*<>*/ } function pp_print_custom_break(state, fits, breaks){ /*<>*/ var after = fits[3], width = fits[2], before = fits[1], - _bx_ = state[14] < state[15] ? 1 : 0; - if(! _bx_) return _bx_; + _bw_ = state[14] < state[15] ? 1 : 0; + if(! _bw_) return _bw_; /*<>*/ var size = - state[13] | 0, /*<>*/ token = [1, fits, breaks], @@ -25393,33 +25406,33 @@ /*<>*/ } function pp_open_tbox(state, param){ /*<>*/ state[14] = state[14] + 1 | 0; - var _bw_ = state[14] < state[15] ? 1 : 0; - if(! _bw_) return _bw_; + var _bv_ = state[14] < state[15] ? 1 : 0; + if(! _bv_) return _bv_; /*<>*/ /*<>*/ var elem = [0, zero, [4, [0, [0, 0]]], 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_close_tbox(state, param){ - /*<>*/ var _bt_ = 1 < state[14] ? 1 : 0; - if(_bt_){ - var _bu_ = state[14] < state[15] ? 1 : 0; - if(_bu_){ + /*<>*/ var _bs_ = 1 < state[14] ? 1 : 0; + if(_bs_){ + var _bt_ = state[14] < state[15] ? 1 : 0; + if(_bt_){ /*<>*/ /*<>*/ var elem = [0, zero, 2, 0]; /*<>*/ enqueue_advance(state, elem); state[14] = state[14] - 1 | 0; - var _bv_ = 0; + var _bu_ = 0; } else - var _bv_ = _bu_; + var _bu_ = _bt_; } else - var _bv_ = _bt_; - return _bv_; + var _bu_ = _bs_; + return _bu_; /*<>*/ } function pp_print_tbreak(state, width, offset){ - /*<>*/ var _bs_ = state[14] < state[15] ? 1 : 0; - if(! _bs_) return _bs_; + /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; + if(! _br_) return _br_; /*<>*/ var size = - state[13] | 0, /*<>*/ elem = [0, size, [2, width, offset], width]; @@ -25429,17 +25442,17 @@ /*<>*/ return pp_print_tbreak(state, 0, 0); /*<>*/ } function pp_set_tab(state, param){ - /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; - if(! _br_) return _br_; + /*<>*/ var _bq_ = state[14] < state[15] ? 1 : 0; + if(! _bq_) return _bq_; /*<>*/ /*<>*/ var elem = [0, zero, 0, 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_set_max_boxes(state, n){ /*<>*/ var - _bp_ = 1 < n ? 1 : 0, - _bq_ = _bp_ ? (state[15] = n, 0) : _bp_; - return _bq_; + _bo_ = 1 < n ? 1 : 0, + _bp_ = _bo_ ? (state[15] = n, 0) : _bo_; + return _bp_; /*<>*/ } function pp_get_max_boxes(state, param){ /*<>*/ return state[15]; @@ -25458,10 +25471,10 @@ /*<>*/ return n < 1000000010 ? n : 1000000009; /*<>*/ } function pp_set_max_indent(state, n$0){ - /*<>*/ var _bo_ = 1 < n$0 ? 1 : 0; - if(! _bo_) return _bo_; - var n$1 = state[6] - n$0 | 0, _bn_ = 1 <= n$1 ? 1 : 0; + /*<>*/ var _bn_ = 1 < n$0 ? 1 : 0; if(! _bn_) return _bn_; + var n$1 = state[6] - n$0 | 0, _bm_ = 1 <= n$1 ? 1 : 0; + if(! _bm_) return _bm_; /*<>*/ /*<>*/ var n = pp_limit(n$1); state[7] = n; state[8] = state[6] - state[7] | 0; @@ -25471,19 +25484,19 @@ /*<>*/ return state[8]; /*<>*/ } function pp_set_margin(state, n){ - /*<>*/ var _bl_ = 1 <= n ? 1 : 0; - if(! _bl_) return _bl_; + /*<>*/ var _bk_ = 1 <= n ? 1 : 0; + if(! _bk_) return _bk_; /*<>*/ /*<>*/ var n$0 = pp_limit(n); state[6] = n$0; if(state[8] <= state[6]) var new_max_indent = state[8]; else /*<>*/ var - /*<>*/ _bm_ = + /*<>*/ _bl_ = /*<>*/ caml_call2 (Stdlib_Int[11], state[6] - state[7] | 0, state[6] / 2 | 0), new_max_indent = - /*<>*/ caml_call2(Stdlib_Int[11], _bm_, 1); + /*<>*/ caml_call2(Stdlib_Int[11], _bl_, 1); /*<>*/ return pp_set_max_indent(state, new_max_indent); /*<>*/ } function validate_geometry(param){ @@ -25514,11 +25527,11 @@ /*<>*/ return pp_set_full_geometry(state, geometry); /*<>*/ var msg = match[1], - /*<>*/ _bk_ = + /*<>*/ _bj_ = /*<>*/ caml_call2 (Stdlib[28], cst_Format_pp_set_geometry, msg); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], _bk_], 1); + ([0, Stdlib[6], _bj_], 1); /*<>*/ } function pp_safe_set_geometry(state, max_indent, margin){ /*<>*/ /*<>*/ var @@ -25571,8 +25584,8 @@ function display_blanks(state, n){ /*<>*/ var n$0 = n; /*<>*/ for(;;){ - var _bj_ = 0 < n$0 ? 1 : 0; - if(! _bj_) return _bj_; + var _bi_ = 0 < n$0 ? 1 : 0; + if(! _bi_) return _bi_; if(80 >= n$0) /*<>*/ return /*<>*/ caml_call3 (state[17], blank_line, 0, n$0); @@ -25592,9 +25605,9 @@ (Stdlib[63], oc); /*<>*/ }; state[19] = - function(_bi_){ /*<>*/ return display_newline(state, _bi_);}; - state[20] = function(_bh_){ /*<>*/ return display_blanks(state, _bh_);}; - state[21] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; + function(_bh_){ /*<>*/ return display_newline(state, _bh_);}; + state[20] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; + state[21] = function(_bf_){ /*<>*/ return display_blanks(state, _bf_);}; return 0; /*<>*/ } function default_pp_mark_open_tag(param){ @@ -25602,23 +25615,23 @@ /*<>*/ return cst$10; /*<>*/ var s = param[2], - /*<>*/ _bf_ = + /*<>*/ _be_ = /*<>*/ caml_call2(Stdlib[28], s, cst$8); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$9, _bf_); + (Stdlib[28], cst$9, _be_); /*<>*/ } function default_pp_mark_close_tag(param){ /*<>*/ if(param[1] !== String_tag) /*<>*/ return cst$13; /*<>*/ var s = param[2], - /*<>*/ _be_ = + /*<>*/ _bd_ = /*<>*/ caml_call2(Stdlib[28], s, cst$11); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$12, _be_); + (Stdlib[28], cst$12, _bd_); /*<>*/ } - function default_pp_print_open_tag(_bd_){ /*<>*/ return 0;} - function default_pp_print_close_tag(_bc_){ /*<>*/ return 0;} + function default_pp_print_open_tag(_bc_){ /*<>*/ return 0;} + function default_pp_print_close_tag(_bb_){ /*<>*/ return 0;} function pp_make_formatter(f, g, h, i, j){ /*<>*/ var /*<>*/ pp_queue = @@ -25632,19 +25645,19 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, 1, sys_tok], scan_stack); /*<>*/ var - _a__ = Stdlib[19], - /*<>*/ _a$_ = + _a9_ = Stdlib[19], + /*<>*/ _a__ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _ba_ = + /*<>*/ _a$_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _bb_ = + /*<>*/ _ba_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0); /*<>*/ return [0, scan_stack, /*<>*/ caml_call1(Stdlib_Stack[2], 0), - _bb_, _ba_, _a$_, + _a__, 78, 10, 68, @@ -25654,7 +25667,7 @@ 1, 1, 1, - _a__, + _a9_, cst$14, f, g, @@ -25674,30 +25687,30 @@ (out_funs[1], out_funs[2], out_funs[3], out_funs[4], out_funs[5]); /*<>*/ } function make_formatter(output, flush){ - function _a2_(_a9_){ /*<>*/ return 0;} - function _a3_(_a8_){ /*<>*/ return 0;} + function _a1_(_a8_){ /*<>*/ return 0;} + function _a2_(_a7_){ /*<>*/ return 0;} /*<>*/ /*<>*/ var ppf = pp_make_formatter - (output, flush, function(_a7_){ /*<>*/ return 0;}, _a3_, _a2_); - ppf[19] = function(_a6_){ /*<>*/ return display_newline(ppf, _a6_);}; - ppf[20] = function(_a5_){ /*<>*/ return display_blanks(ppf, _a5_);}; - ppf[21] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; + (output, flush, function(_a6_){ /*<>*/ return 0;}, _a2_, _a1_); + ppf[19] = function(_a5_){ /*<>*/ return display_newline(ppf, _a5_);}; + ppf[20] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; + ppf[21] = function(_a3_){ /*<>*/ return display_blanks(ppf, _a3_);}; /*<>*/ return ppf; /*<>*/ } function formatter_of_out_channel(oc){ - function _a1_(param){ + function _a0_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _a1_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _a0_); /*<>*/ } function formatter_of_buffer(b){ - /*<>*/ function _aZ_(_a0_){ /*<>*/ return 0;} + /*<>*/ function _aY_(_aZ_){ /*<>*/ return 0;} /*<>*/ return make_formatter ( /*<>*/ caml_call1(Stdlib_Buffer[18], b), - _aZ_); + _aY_); /*<>*/ } var pp_buffer_size = 512; function pp_make_buffer(param){ @@ -25728,9 +25741,9 @@ (Stdlib_Domain[10][3], str_formatter_key, str_formatter); /*<>*/ function buffered_out_string(key, str, ofs, len){ /*<>*/ /*<>*/ var - _aY_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); + _aX_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); /*<>*/ return /*<>*/ caml_call4 - (Stdlib_Buffer[18], _aY_, str, ofs, len); + (Stdlib_Buffer[18], _aX_, str, ofs, len); /*<>*/ } function buffered_out_flush(oc, key, param){ /*<>*/ var @@ -25762,31 +25775,31 @@ err_buf_key = /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _i_); function _j_(param){ - function _aH_(_aX_){ /*<>*/ return 0;} - function _aI_(_aW_){ /*<>*/ return 0;} - function _aJ_(_aV_){ /*<>*/ return 0;} - var _aK_ = Stdlib[39]; - /*<>*/ function _aL_(_aU_){ - /*<>*/ return buffered_out_flush(_aK_, std_buf_key, _aU_); + function _aG_(_aW_){ /*<>*/ return 0;} + function _aH_(_aV_){ /*<>*/ return 0;} + function _aI_(_aU_){ /*<>*/ return 0;} + var _aJ_ = Stdlib[39]; + /*<>*/ function _aK_(_aT_){ + /*<>*/ return buffered_out_flush(_aJ_, std_buf_key, _aT_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_aR_, _aS_, _aT_){ - /*<>*/ return buffered_out_string(std_buf_key, _aR_, _aS_, _aT_); + (function(_aQ_, _aR_, _aS_){ + /*<>*/ return buffered_out_string(std_buf_key, _aQ_, _aR_, _aS_); }, - _aL_, - _aJ_, + _aK_, _aI_, - _aH_); - ppf[19] = function(_aQ_){ /*<>*/ return display_newline(ppf, _aQ_);}; - ppf[20] = function(_aP_){ /*<>*/ return display_blanks(ppf, _aP_);}; - ppf[21] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; - /*<>*/ function _aM_(_aN_){ - /*<>*/ return pp_print_flush(ppf, _aN_); + _aH_, + _aG_); + ppf[19] = function(_aP_){ /*<>*/ return display_newline(ppf, _aP_);}; + ppf[20] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; + ppf[21] = function(_aN_){ /*<>*/ return display_blanks(ppf, _aN_);}; + /*<>*/ function _aL_(_aM_){ + /*<>*/ return pp_print_flush(ppf, _aM_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _aM_); + (Stdlib_Domain[6], _aL_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -25795,31 +25808,31 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Domain[10][3], std_formatter_key, std_formatter); function _k_(param){ - function _aq_(_aG_){ /*<>*/ return 0;} - function _ar_(_aF_){ /*<>*/ return 0;} - function _as_(_aE_){ /*<>*/ return 0;} - var _at_ = Stdlib[40]; - /*<>*/ function _au_(_aD_){ - /*<>*/ return buffered_out_flush(_at_, err_buf_key, _aD_); + function _ap_(_aF_){ /*<>*/ return 0;} + function _aq_(_aE_){ /*<>*/ return 0;} + function _ar_(_aD_){ /*<>*/ return 0;} + var _as_ = Stdlib[40]; + /*<>*/ function _at_(_aC_){ + /*<>*/ return buffered_out_flush(_as_, err_buf_key, _aC_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_aA_, _aB_, _aC_){ - /*<>*/ return buffered_out_string(err_buf_key, _aA_, _aB_, _aC_); + (function(_az_, _aA_, _aB_){ + /*<>*/ return buffered_out_string(err_buf_key, _az_, _aA_, _aB_); }, - _au_, - _as_, + _at_, _ar_, - _aq_); - ppf[19] = function(_az_){ /*<>*/ return display_newline(ppf, _az_);}; - ppf[20] = function(_ay_){ /*<>*/ return display_blanks(ppf, _ay_);}; - ppf[21] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; - /*<>*/ function _av_(_aw_){ - /*<>*/ return pp_print_flush(ppf, _aw_); + _aq_, + _ap_); + ppf[19] = function(_ay_){ /*<>*/ return display_newline(ppf, _ay_);}; + ppf[20] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; + ppf[21] = function(_aw_){ /*<>*/ return display_blanks(ppf, _aw_);}; + /*<>*/ function _au_(_av_){ + /*<>*/ return pp_print_flush(ppf, _av_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _av_); + (Stdlib_Domain[6], _au_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -25862,7 +25875,7 @@ (stdbuf, str_formatter); /*<>*/ } function make_synchronized_formatter(output, flush){ - function _ao_(param){ + function _an_(param){ /*<>*/ var /*<>*/ buf = /*<>*/ caml_call1 @@ -25871,12 +25884,12 @@ /*<>*/ caml_call1(Stdlib_Buffer[18], buf); function flush$0(param){ /*<>*/ /*<>*/ var - _ap_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); + _ao_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); /*<>*/ /*<>*/ caml_call3 (output, /*<>*/ caml_call1(Stdlib_Buffer[2], buf), 0, - _ap_); + _ao_); /*<>*/ /*<>*/ caml_call1 (Stdlib_Buffer[8], buf); /*<>*/ return /*<>*/ caml_call1 @@ -25885,15 +25898,15 @@ /*<>*/ return make_formatter(output$0, flush$0); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, _ao_); + (Stdlib_Domain[10][1], 0, _an_); /*<>*/ } function synchronized_formatter_of_out_(oc){ - function _an_(param){ + function _am_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_synchronized_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _an_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _am_); /*<>*/ } function make_symbolic_output_buffer(param){ /*<>*/ return [0, 0]; /*<>*/ } @@ -25922,10 +25935,10 @@ /*<>*/ caml_call3 (Stdlib_String[15], s, i, n)]); } - /*<>*/ function g(_am_){ + /*<>*/ function g(_al_){ /*<>*/ return add_symbolic_output_item(sob, 0); } - /*<>*/ function h(_al_){ + /*<>*/ function h(_ak_){ /*<>*/ return add_symbolic_output_item(sob, 1); } /*<>*/ function i(n){ @@ -26312,8 +26325,8 @@ /*<>*/ } for(;;){ if(right[1] === len){ - var _ak_ = left[1] !== len ? 1 : 0; - return _ak_ ? flush(0) : _ak_; + var _aj_ = left[1] !== len ? 1 : 0; + return _aj_ ? flush(0) : _aj_; } /*<>*/ /*<>*/ var match = /*<>*/ runtime.caml_string_get(s, right[1]); @@ -26335,7 +26348,7 @@ else var none = - function(param, _aj_){ + function(param, _ai_){ /*<>*/ return 0; /*<>*/ }; /*<>*/ if(! param) @@ -26434,56 +26447,56 @@ var acc$1 = match[1]; /*<>*/ output_acc(ppf, p$0); /*<>*/ var - /*<>*/ _aa_ = compute_tag(output_acc, acc$1), + /*<>*/ _$_ = compute_tag(output_acc, acc$1), /*<>*/ match$0 = /*<>*/ caml_call1 - (CamlinternalFormat[20], _aa_), + (CamlinternalFormat[20], _$_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _ab_ = acc[1]; - if(typeof _ab_ !== "number" && 0 === _ab_[0]){ - var _ac_ = _ab_[2]; - if(typeof _ac_ !== "number" && 1 === _ac_[0]){ - var s$0 = acc[2], size = _ac_[2], p$2 = _ab_[1]; + var _aa_ = acc[1]; + if(typeof _aa_ !== "number" && 0 === _aa_[0]){ + var _ab_ = _aa_[2]; + if(typeof _ab_ !== "number" && 1 === _ab_[0]){ + var s$0 = acc[2], size = _ab_[2], p$2 = _aa_[1]; break b; } } - var s = acc[2], p$1 = _ab_; + var s = acc[2], p$1 = _aa_; break a; case 3: - var _ad_ = acc[1]; - if(typeof _ad_ !== "number" && 0 === _ad_[0]){ - var _ae_ = _ad_[2]; - if(typeof _ae_ !== "number" && 1 === _ae_[0]){ - var c$0 = acc[2], size$0 = _ae_[2], p$4 = _ad_[1]; + var _ac_ = acc[1]; + if(typeof _ac_ !== "number" && 0 === _ac_[0]){ + var _ad_ = _ac_[2]; + if(typeof _ad_ !== "number" && 1 === _ad_[0]){ + var c$0 = acc[2], size$0 = _ad_[2], p$4 = _ac_[1]; break; } } - var c = acc[2], p$3 = _ad_; + var c = acc[2], p$3 = _ac_; break c; case 4: - var _af_ = acc[1]; - if(typeof _af_ !== "number" && 0 === _af_[0]){ - var _ag_ = _af_[2]; - if(typeof _ag_ !== "number" && 1 === _ag_[0]){ - var s$0 = acc[2], size = _ag_[2], p$2 = _af_[1]; + var _ae_ = acc[1]; + if(typeof _ae_ !== "number" && 0 === _ae_[0]){ + var _af_ = _ae_[2]; + if(typeof _af_ !== "number" && 1 === _af_[0]){ + var s$0 = acc[2], size = _af_[2], p$2 = _ae_[1]; break b; } } - var s = acc[2], p$1 = _af_; + var s = acc[2], p$1 = _ae_; break a; case 5: - var _ah_ = acc[1]; - if(typeof _ah_ !== "number" && 0 === _ah_[0]){ - var _ai_ = _ah_[2]; - if(typeof _ai_ !== "number" && 1 === _ai_[0]){ - var c$0 = acc[2], size$0 = _ai_[2], p$4 = _ah_[1]; + var _ag_ = acc[1]; + if(typeof _ag_ !== "number" && 0 === _ag_[0]){ + var _ah_ = _ag_[2]; + if(typeof _ah_ !== "number" && 1 === _ah_[0]){ + var c$0 = acc[2], size$0 = _ah_[2], p$4 = _ag_[1]; break; } } - var c = acc[2], p$3 = _ah_; + var c = acc[2], p$3 = _ag_; break c; case 6: var f$0 = acc[2], p$5 = acc[1]; @@ -26541,56 +26554,56 @@ var acc$1 = match[1]; /*<>*/ strput_acc(ppf, p$0); /*<>*/ var - /*<>*/ _T_ = compute_tag(strput_acc, acc$1), + /*<>*/ _S_ = compute_tag(strput_acc, acc$1), /*<>*/ match$0 = /*<>*/ caml_call1 - (CamlinternalFormat[20], _T_), + (CamlinternalFormat[20], _S_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _U_ = acc[1]; - if(typeof _U_ !== "number" && 0 === _U_[0]){ - var _V_ = _U_[2]; - if(typeof _V_ !== "number" && 1 === _V_[0]){ - var s$0 = acc[2], size = _V_[2], p$2 = _U_[1]; + var _T_ = acc[1]; + if(typeof _T_ !== "number" && 0 === _T_[0]){ + var _U_ = _T_[2]; + if(typeof _U_ !== "number" && 1 === _U_[0]){ + var s$0 = acc[2], size = _U_[2], p$2 = _T_[1]; break b; } } - var s = acc[2], p$1 = _U_; + var s = acc[2], p$1 = _T_; break a; case 3: - var _W_ = acc[1]; - if(typeof _W_ !== "number" && 0 === _W_[0]){ - var _X_ = _W_[2]; - if(typeof _X_ !== "number" && 1 === _X_[0]){ - var c$0 = acc[2], size$0 = _X_[2], p$4 = _W_[1]; + var _V_ = acc[1]; + if(typeof _V_ !== "number" && 0 === _V_[0]){ + var _W_ = _V_[2]; + if(typeof _W_ !== "number" && 1 === _W_[0]){ + var c$0 = acc[2], size$0 = _W_[2], p$4 = _V_[1]; break; } } - var c = acc[2], p$3 = _W_; + var c = acc[2], p$3 = _V_; break c; case 4: - var _Y_ = acc[1]; - if(typeof _Y_ !== "number" && 0 === _Y_[0]){ - var _Z_ = _Y_[2]; - if(typeof _Z_ !== "number" && 1 === _Z_[0]){ - var s$0 = acc[2], size = _Z_[2], p$2 = _Y_[1]; + var _X_ = acc[1]; + if(typeof _X_ !== "number" && 0 === _X_[0]){ + var _Y_ = _X_[2]; + if(typeof _Y_ !== "number" && 1 === _Y_[0]){ + var s$0 = acc[2], size = _Y_[2], p$2 = _X_[1]; break b; } } - var s = acc[2], p$1 = _Y_; + var s = acc[2], p$1 = _X_; break a; case 5: - var ___ = acc[1]; - if(typeof ___ !== "number" && 0 === ___[0]){ - var _$_ = ___[2]; - if(typeof _$_ !== "number" && 1 === _$_[0]){ - var c$0 = acc[2], size$0 = _$_[2], p$4 = ___[1]; + var _Z_ = acc[1]; + if(typeof _Z_ !== "number" && 0 === _Z_[0]){ + var ___ = _Z_[2]; + if(typeof ___ !== "number" && 1 === ___[0]){ + var c$0 = acc[2], size$0 = ___[2], p$4 = _Z_[1]; break; } } - var c = acc[2], p$3 = ___; + var c = acc[2], p$3 = _Z_; break c; case 6: var p$5 = acc[1]; @@ -26636,13 +26649,13 @@ function kfprintf(k, ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _R_ = 0; - function _S_(acc){ + /*<>*/ _Q_ = 0; + function _R_(acc){ /*<>*/ output_acc(ppf, acc); return caml_call1(k, ppf); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _S_, _R_, fmt); + (CamlinternalFormat[7], _R_, _Q_, fmt); } function ikfprintf(k, ppf, param){ var fmt = param[1]; @@ -26652,47 +26665,47 @@ function ifprintf(ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _O_ = 0; - function _P_(_Q_){ /*<>*/ return 0;} + /*<>*/ _N_ = 0; + function _O_(_P_){ /*<>*/ return 0;} /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[8], _P_, _O_, fmt); + (CamlinternalFormat[8], _O_, _N_, fmt); } function fprintf(ppf){ - function _L_(_N_){ /*<>*/ return 0;} - /*<>*/ return function(_M_){ - /*<>*/ return kfprintf(_L_, ppf, _M_);}; + function _K_(_M_){ /*<>*/ return 0;} + /*<>*/ return function(_L_){ + /*<>*/ return kfprintf(_K_, ppf, _L_);}; /*<>*/ } function printf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _J_ = 0; - function _K_(acc){ + /*<>*/ _I_ = 0; + function _J_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], std_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _K_, _J_, fmt); + (CamlinternalFormat[7], _J_, _I_, fmt); } function eprintf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _H_ = 0; - function _I_(acc){ + /*<>*/ _G_ = 0; + function _H_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], err_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _I_, _H_, fmt); + (CamlinternalFormat[7], _H_, _G_, fmt); } function kdprintf(k, param){ /*<>*/ var fmt = param[1], - /*<>*/ _F_ = 0; - function _G_(acc){ + /*<>*/ _E_ = 0; + function _F_(acc){ /*<>*/ return /*<>*/ caml_call1 (k, function(ppf){ @@ -26700,7 +26713,7 @@ /*<>*/ }); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _G_, _F_, fmt); + (CamlinternalFormat[7], _F_, _E_, fmt); } function dprintf(fmt){ /*<>*/ return kdprintf @@ -26758,44 +26771,44 @@ /*<>*/ var /*<>*/ fs = pp_get_formatter_out_functions(std_formatter, 0), - _n_ = fs[5], - _o_ = fs[4], - _p_ = fs[3], - _q_ = Stdlib[39]; - /*<>*/ function _r_(_E_){ - /*<>*/ return buffered_out_flush(_q_, std_buf_key, _E_); + _m_ = fs[5], + _n_ = fs[4], + _o_ = fs[3], + _p_ = Stdlib[39]; + /*<>*/ function _q_(_D_){ + /*<>*/ return buffered_out_flush(_p_, std_buf_key, _D_); } /*<>*/ pp_set_formatter_out_functions (std_formatter, [0, - function(_B_, _C_, _D_){ - /*<>*/ return buffered_out_string(std_buf_key, _B_, _C_, _D_); + function(_A_, _B_, _C_){ + /*<>*/ return buffered_out_string(std_buf_key, _A_, _B_, _C_); }, - _r_, - _p_, + _q_, _o_, - _n_]); + _n_, + _m_]); /*<>*/ var /*<>*/ fs$0 = pp_get_formatter_out_functions(err_formatter, 0), - _s_ = fs$0[5], - _t_ = fs$0[4], - _u_ = fs$0[3], - _v_ = Stdlib[40]; - /*<>*/ function _w_(_A_){ - /*<>*/ return buffered_out_flush(_v_, err_buf_key, _A_); + _r_ = fs$0[5], + _s_ = fs$0[4], + _t_ = fs$0[3], + _u_ = Stdlib[40]; + /*<>*/ function _v_(_z_){ + /*<>*/ return buffered_out_flush(_u_, err_buf_key, _z_); } /*<>*/ return pp_set_formatter_out_functions (err_formatter, [0, - function(_x_, _y_, _z_){ + function(_w_, _x_, _y_){ /*<>*/ return buffered_out_string - (err_buf_key, _x_, _y_, _z_); + (err_buf_key, _w_, _x_, _y_); }, - _w_, - _u_, + _v_, _t_, - _s_]); + _s_, + _r_]); /*<>*/ } /*<>*/ /*<>*/ caml_call1 (Stdlib_Domain[5], _l_); @@ -26996,7 +27009,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - _u_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$3 = cst$5, cst$4 = cst$5, @@ -27120,9 +27133,9 @@ if(10 === c) ib[5] = ib[5] + 1 | 0; /*<>*/ return c; } - catch(_bc_){ - var _bb_ = caml_wrap_exception(_bc_); - if(_bb_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_bb_, 0); + catch(_bb_){ + var _ba_ = caml_wrap_exception(_bb_); + if(_ba_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_ba_, 0); ib[2] = null_char; ib[3] = 0; ib[1] = 1; @@ -27215,8 +27228,8 @@ /*<>*/ return create(1, next); /*<>*/ } var _a_ = 0; - /*<>*/ function from_function(_ba_){ - /*<>*/ return create(_a_, _ba_); + /*<>*/ function from_function(_a$_){ + /*<>*/ return create(_a_, _a$_); } /*<>*/ /*<>*/ var len = 1024; function scan_close_at_end(ic){ @@ -27263,12 +27276,12 @@ return from_ic(scan_close_at_end, [1, fname, ic], ic); /*<>*/ } var _b_ = Stdlib[79]; - /*<>*/ function open_in(_a$_){ - /*<>*/ return open_in_file(_b_, _a$_); + /*<>*/ function open_in(_a__){ + /*<>*/ return open_in_file(_b_, _a__); } /*<>*/ /*<>*/ var _c_ = Stdlib[80]; - /*<>*/ function open_in_bin(_a__){ - /*<>*/ return open_in_file(_c_, _a__); + /*<>*/ function open_in_bin(_a9_){ + /*<>*/ return open_in_file(_c_, _a9_); } function from_channel(ic){ /*<>*/ return from_ic(scan_raise_at_end, [0, ic], ic); @@ -27331,15 +27344,15 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _a8_ = 1 - ib[1]; - if(! _a8_) /*<>*/ return _a8_; - /*<>*/ /*<>*/ var _a9_ = c - 9 | 0; + /*<>*/ _a7_ = 1 - ib[1]; + if(! _a7_) /*<>*/ return _a7_; + /*<>*/ /*<>*/ var _a8_ = c - 9 | 0; a: { - if(4 < _a9_ >>> 0){ - if(23 === _a9_) break a; + if(4 < _a8_ >>> 0){ + if(23 === _a8_) break a; } - else if(1 < _a9_ - 2 >>> 0) break a; + else if(1 < _a8_ - 2 >>> 0) break a; /*<>*/ return 0; } /*<>*/ invalidate_current_char(ib); @@ -27385,23 +27398,23 @@ /*<>*/ switch(conv){ case 0: /*<>*/ var - /*<>*/ _a4_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a4_); + /*<>*/ _a3_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a3_); break; case 3: /*<>*/ var - /*<>*/ _a5_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a5_); + /*<>*/ _a4_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a4_); break; case 4: /*<>*/ var - /*<>*/ _a6_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a6_); + /*<>*/ _a5_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a5_); break; case 5: /*<>*/ var - /*<>*/ _a7_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a7_); + /*<>*/ _a6_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a6_); break; default: var tok = token_string(ib); } @@ -27486,31 +27499,31 @@ function is_binary_digit(param){ /*<>*/ return 1 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_binary_int(_a2_, _a3_){ - /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a2_, _a3_); + /*<>*/ function scan_binary_int(_a1_, _a2_){ + /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a1_, _a2_); } function is_octal_digit(param){ /*<>*/ return 7 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_octal_int(_a0_, _a1_){ - /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _a0_, _a1_); + /*<>*/ function scan_octal_int(_aZ_, _a0_){ + /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _aZ_, _a0_); } function is_hexa_digit(param){ /*<>*/ /*<>*/ var - _aZ_ = param - 48 | 0; + _aY_ = param - 48 | 0; a: { - if(22 < _aZ_ >>> 0){ - if(5 < _aZ_ - 49 >>> 0) break a; + if(22 < _aY_ >>> 0){ + if(5 < _aY_ - 49 >>> 0) break a; } - else if(6 >= _aZ_ - 10 >>> 0) break a; + else if(6 >= _aY_ - 10 >>> 0) break a; /*<>*/ return 1; } /*<>*/ return 0; /*<>*/ } - /*<>*/ function scan_hexadecimal_int(_aX_, _aY_){ + /*<>*/ function scan_hexadecimal_int(_aW_, _aX_){ /*<>*/ return scan_digit_plus - (cst_hexadecimal, is_hexa_digit, _aX_, _aY_); + (cst_hexadecimal, is_hexa_digit, _aW_, _aX_); } function scan_sign(width, ib){ /*<>*/ var @@ -27630,38 +27643,38 @@ /*<>*/ len = /*<>*/ caml_ml_string_length(str), /*<>*/ width$0 = [0, width], - /*<>*/ _aU_ = len - 1 | 0, - /*<>*/ _aT_ = 0; - if(_aU_ >= 0){ - var i = _aT_; + /*<>*/ _aT_ = len - 1 | 0, + /*<>*/ _aS_ = 0; + if(_aT_ >= 0){ + var i = _aS_; for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _aV_ = + /*<>*/ _aU_ = lowercase( /*<>*/ caml_string_get(str, i)); - if(lowercase(c) !== _aV_) + if(lowercase(c) !== _aU_) /*<>*/ /*<>*/ caml_call1(error, 0); if(0 === width$0[1]) /*<>*/ /*<>*/ caml_call1(error, 0); width$0[1] = store_char(width$0[1], ib, c); - /*<>*/ /*<>*/ var _aW_ = i + 1 | 0; - if(_aU_ === i) break; - var i = _aW_; + /*<>*/ /*<>*/ var _aV_ = i + 1 | 0; + if(_aT_ === i) break; + var i = _aV_; } } return width$0[1]; /*<>*/ } function scan_hex_float(width, precision, ib){ /*<>*/ var - _aG_ = 0 === width ? 1 : 0, - _aH_ = _aG_ || end_of_input(ib); - /*<>*/ if(_aH_) + _aF_ = 0 === width ? 1 : 0, + _aG_ = _aF_ || end_of_input(ib); + /*<>*/ if(_aG_) /*<>*/ bad_hex_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _aI_ = 0 === width$0 ? 1 : 0, - _aJ_ = _aI_ || end_of_input(ib); - /*<>*/ if(_aJ_) + _aH_ = 0 === width$0 ? 1 : 0, + _aI_ = _aH_ || end_of_input(ib); + /*<>*/ if(_aI_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); a: @@ -27673,9 +27686,9 @@ if(32 <= switcher) break a; /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _aK_ = 0 === width$1 ? 1 : 0, - _aL_ = _aK_ || end_of_input(ib); - /*<>*/ if(_aL_) + _aJ_ = 0 === width$1 ? 1 : 0, + _aK_ = _aJ_ || end_of_input(ib); + /*<>*/ if(_aK_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$1, ib, bad_hex_float, cst_an); @@ -27686,24 +27699,24 @@ if(48 === c){ /*<>*/ var /*<>*/ width$3 = store_char(width$0, ib, c), - _aO_ = 0 === width$3 ? 1 : 0, - _aP_ = _aO_ || end_of_input(ib); - /*<>*/ if(_aP_) + _aN_ = 0 === width$3 ? 1 : 0, + _aO_ = _aN_ || end_of_input(ib); + /*<>*/ if(_aO_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ var width$4 = check_case_insensitive_string(width$3, ib, bad_hex_float, cst_x); /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var - _aQ_ = peek_char(ib) - 46 | 0; + _aP_ = peek_char(ib) - 46 | 0; b: { c: { - if(34 < _aQ_ >>> 0){ - if(66 === _aQ_) break c; + if(34 < _aP_ >>> 0){ + if(66 === _aP_) break c; } - else if(32 < _aQ_ - 1 >>> 0) break c; + else if(32 < _aP_ - 1 >>> 0) break c; var width$5 = scan_hexadecimal_int(width$4, ib); break b; } @@ -27751,9 +27764,9 @@ /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$1), - _aR_ = 0 === width$9 ? 1 : 0, - _aS_ = _aR_ || end_of_input(ib); - /*<>*/ if(_aS_) + _aQ_ = 0 === width$9 ? 1 : 0, + _aR_ = _aQ_ || end_of_input(ib); + /*<>*/ if(_aR_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -27768,9 +27781,9 @@ } /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _aM_ = 0 === width$2 ? 1 : 0, - _aN_ = _aM_ || end_of_input(ib); - /*<>*/ if(_aN_) + _aL_ = 0 === width$2 ? 1 : 0, + _aM_ = _aL_ || end_of_input(ib); + /*<>*/ if(_aM_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$2, ib, bad_hex_float, cst_nfinity); @@ -27779,14 +27792,14 @@ /*<>*/ } function scan_caml_float_rest(width, precision, ib){ /*<>*/ var - _aC_ = 0 === width ? 1 : 0, - _aD_ = _aC_ || end_of_input(ib); - /*<>*/ if(_aD_) /*<>*/ bad_float(0); + _aB_ = 0 === width ? 1 : 0, + _aC_ = _aB_ || end_of_input(ib); + /*<>*/ if(_aC_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_decimal_digit_star(width, ib), - _aE_ = 0 === width$0 ? 1 : 0, - _aF_ = _aE_ || end_of_input(ib); - /*<>*/ if(_aF_) /*<>*/ bad_float(0); + _aD_ = 0 === width$0 ? 1 : 0, + _aE_ = _aD_ || end_of_input(ib); + /*<>*/ if(_aE_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c = peek_char(ib), /*<>*/ switcher = c - 69 | 0; @@ -27810,22 +27823,22 @@ /*<>*/ } function scan_caml_float(width, precision, ib){ /*<>*/ var - _ao_ = 0 === width ? 1 : 0, - _ap_ = _ao_ || end_of_input(ib); - /*<>*/ if(_ap_) /*<>*/ bad_float(0); + _an_ = 0 === width ? 1 : 0, + _ao_ = _an_ || end_of_input(ib); + /*<>*/ if(_ao_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _aq_ = 0 === width$0 ? 1 : 0, - _ar_ = _aq_ || end_of_input(ib); - /*<>*/ if(_ar_) /*<>*/ bad_float(0); + _ap_ = 0 === width$0 ? 1 : 0, + _aq_ = _ap_ || end_of_input(ib); + /*<>*/ if(_aq_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); if(49 <= c){ if(58 > c){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _as_ = 0 === width$1 ? 1 : 0, - _at_ = _as_ || end_of_input(ib); - /*<>*/ if(_at_) /*<>*/ bad_float(0); + _ar_ = 0 === width$1 ? 1 : 0, + _as_ = _ar_ || end_of_input(ib); + /*<>*/ if(_as_) /*<>*/ bad_float(0); /*<>*/ return scan_caml_float_rest (width$1, precision, ib); } @@ -27833,9 +27846,9 @@ else if(48 <= c){ /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _au_ = 0 === width$2 ? 1 : 0, - _av_ = _au_ || end_of_input(ib); - /*<>*/ if(_av_) /*<>*/ bad_float(0); + _at_ = 0 === width$2 ? 1 : 0, + _au_ = _at_ || end_of_input(ib); + /*<>*/ if(_au_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c$0 = peek_char(ib); if(88 !== c$0 && 120 !== c$0) @@ -27843,14 +27856,14 @@ (width$2, precision, ib); /*<>*/ var /*<>*/ width$3 = store_char(width$2, ib, c$0), - _aw_ = 0 === width$3 ? 1 : 0, - _ax_ = _aw_ || end_of_input(ib); - /*<>*/ if(_ax_) /*<>*/ bad_float(0); + _av_ = 0 === width$3 ? 1 : 0, + _aw_ = _av_ || end_of_input(ib); + /*<>*/ if(_aw_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$4 = scan_hexadecimal_int(width$3, ib), - _ay_ = 0 === width$4 ? 1 : 0, - _az_ = _ay_ || end_of_input(ib); - /*<>*/ if(_az_) /*<>*/ bad_float(0); + _ax_ = 0 === width$4 ? 1 : 0, + _ay_ = _ax_ || end_of_input(ib); + /*<>*/ if(_ay_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c$1 = peek_char(ib), /*<>*/ switcher = c$1 - 80 | 0; @@ -27903,9 +27916,9 @@ if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$2), - _aA_ = 0 === width$9 ? 1 : 0, - _aB_ = _aA_ || end_of_input(ib); - /*<>*/ if(_aB_) + _az_ = 0 === width$9 ? 1 : 0, + _aA_ = _az_ || end_of_input(ib); + /*<>*/ if(_aA_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -27922,13 +27935,13 @@ /*<>*/ if(ib[1]) /*<>*/ return width$0; if(! stp){ - /*<>*/ /*<>*/ var _an_ = c - 9 | 0; + /*<>*/ /*<>*/ var _am_ = c - 9 | 0; a: { - if(4 < _an_ >>> 0){ - if(23 === _an_) break a; + if(4 < _am_ >>> 0){ + if(23 === _am_) break a; } - else if(1 < _an_ - 2 >>> 0) break a; + else if(1 < _am_ - 2 >>> 0) break a; /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), width$0 = width$2; @@ -27958,11 +27971,11 @@ (Stdlib_Printf[4], _f_, message)) : c; /*<>*/ } - /*<>*/ function check_next_char_for_char(_al_, _am_){ - /*<>*/ return check_next_char(cst_a_Char, _al_, _am_); + /*<>*/ function check_next_char_for_char(_ak_, _al_){ + /*<>*/ return check_next_char(cst_a_Char, _ak_, _al_); } - /*<>*/ function check_next_char_for_string(_aj_, _ak_){ - /*<>*/ return check_next_char(cst_a_String, _aj_, _ak_); + /*<>*/ function check_next_char_for_string(_ai_, _aj_){ + /*<>*/ return check_next_char(cst_a_String, _ai_, _aj_); } function scan_backslash_char(width, ib){ /*<>*/ /*<>*/ var @@ -27988,16 +28001,16 @@ b: { if(0 <= c && 255 >= c){ - var _ah_ = /*<>*/ caml_call1(Stdlib[29], c); + var _ag_ = /*<>*/ caml_call1(Stdlib[29], c); break b; } var - _ah_ = + _ag_ = bad_input ( /*<>*/ caml_call4 (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); } - /*<>*/ return store_char(width - 2 | 0, ib, _ah_); + /*<>*/ return store_char(width - 2 | 0, ib, _ag_); } /*<>*/ /*<>*/ var switcher = c0 - 92 | 0; @@ -28009,34 +28022,34 @@ function(param){ /*<>*/ var /*<>*/ c = next_char(ib), - /*<>*/ _ai_ = c - 48 | 0; + /*<>*/ _ah_ = c - 48 | 0; a: { - if(22 < _ai_ >>> 0){ - if(5 < _ai_ - 49 >>> 0) break a; + if(22 < _ah_ >>> 0){ + if(5 < _ah_ - 49 >>> 0) break a; } - else if(6 >= _ai_ - 10 >>> 0) break a; + else if(6 >= _ah_ - 10 >>> 0) break a; /*<>*/ return c; } /*<>*/ return bad_input_escape(c); /*<>*/ }, /*<>*/ c1 = get_digit(0), /*<>*/ c2 = get_digit(0), - /*<>*/ _ae_ = hexadecimal_value_of_char(c2), - c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ae_ | 0; + /*<>*/ _ad_ = hexadecimal_value_of_char(c2), + c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ad_ | 0; b: { if(0 <= c$0 && 255 >= c$0){ - var _ag_ = /*<>*/ caml_call1(Stdlib[29], c$0); + var _af_ = /*<>*/ caml_call1(Stdlib[29], c$0); break b; } var - _ag_ = + _af_ = bad_input ( /*<>*/ caml_call3 (Stdlib_Printf[4], _m_, c1, c2)); } - /*<>*/ return store_char(width - 2 | 0, ib, _ag_); + /*<>*/ return store_char(width - 2 | 0, ib, _af_); case 0: case 6: case 18: @@ -28052,17 +28065,17 @@ if(117 > c0) switch(c0 - 110 | 0){ case 0: - var _af_ = 10; break b; + var _ae_ = 10; break b; case 4: - var _af_ = 13; break b; + var _ae_ = 13; break b; case 6: - var _af_ = 9; break b; + var _ae_ = 9; break b; } } - else if(98 === c0){var _af_ = 8; break b;} - var _af_ = c0; + else if(98 === c0){var _ae_ = 8; break b;} + var _ae_ = c0; } - /*<>*/ return store_char(width, ib, _af_); + /*<>*/ return store_char(width, ib, _ae_); } /*<>*/ return bad_input_escape(c0); /*<>*/ } @@ -28080,24 +28093,24 @@ check_next_char_for_string(width$1, ib); if(10 === match){ /*<>*/ /*<>*/ var - _ac_ = ignore_char(width$1, ib); + _ab_ = ignore_char(width$1, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ac_]); + (skip_spaces, [0, _ab_]); var counter$0 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$0, _ac_); + /*<>*/ return skip_spaces(counter$0, _ab_); } if(13 === match){ /*<>*/ /*<>*/ var width$3 = ignore_char(width$1, ib); if(10 === check_next_char_for_string(width$3, ib)){ /*<>*/ /*<>*/ var - _ad_ = ignore_char(width$3, ib); + _ac_ = ignore_char(width$3, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ad_]); + (skip_spaces, [0, _ac_]); var counter$1 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$1, _ad_); + /*<>*/ return skip_spaces(counter$1, _ac_); } /*<>*/ var /*<>*/ width$5 = store_char(width$3, ib, 13), @@ -28144,39 +28157,39 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - ___ = 0 < i$0 ? 1 : 0; - if(___){ + _Z_ = 0 < i$0 ? 1 : 0; + if(_Z_){ /*<>*/ /*<>*/ var - _$_ = 1 - ib[1]; - if(_$_) + ___ = 1 - ib[1]; + if(___) /*<>*/ var - /*<>*/ _aa_ = + /*<>*/ _$_ = /*<>*/ caml_call2 (CamlinternalFormat[1], char_set, c), - /*<>*/ _ab_ = _aa_ ? c !== stp ? 1 : 0 : _aa_; + /*<>*/ _aa_ = _$_ ? c !== stp ? 1 : 0 : _$_; else - var _ab_ = _$_; + var _aa_ = ___; } else - var _ab_ = ___; - if(! _ab_) return _ab_; + var _aa_ = _Z_; + if(! _aa_) return _aa_; /*<>*/ store_char(Stdlib[19], ib, c); var i$1 = i$0 - 1 | 0, i$0 = i$1; } /*<>*/ } if(! scan_indic){ /*<>*/ scan_chars(width, -1); - /*<>*/ return _u_; + /*<>*/ return sentinal; } var c = scan_indic[1]; /*<>*/ scan_chars(width, c); - /*<>*/ /*<>*/ var _Z_ = 1 - ib[1]; - if(! _Z_) /*<>*/ return _Z_; + /*<>*/ /*<>*/ var _Y_ = 1 - ib[1]; + if(! _Y_) /*<>*/ return _Y_; /*<>*/ /*<>*/ var ci = peek_char(ib); return c === ci - ? (invalidate_current_char(ib), _u_) - : (character_mismatch(c, ci), _u_); + ? (invalidate_current_char(ib), sentinal) + : (character_mismatch(c, ci), sentinal); /*<>*/ } function scanf_bad_input(ib, x){ /*<>*/ if(x[1] === Scan_failure) @@ -28253,17 +28266,17 @@ /*<>*/ var rest$13 = fmt$0[3], fmtty = fmt$0[2], - /*<>*/ _W_ = + /*<>*/ _V_ = /*<>*/ caml_call1(CamlinternalFormat[21], fmtty), - /*<>*/ _X_ = + /*<>*/ _W_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _W_); + (CamlinternalFormatBasics[2], _V_); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (take_fmtty_format_readers$0, [0, k, _X_, rest$13]); + (take_fmtty_format_readers$0, [0, k, _W_, rest$13]); var counter$0 = counter + 1 | 0; /*<>*/ return take_fmtty_format_readers$0 - (counter$0, k, _X_, rest$13); + (counter$0, k, _W_, rest$13); case 15: var rest$14 = fmt$0[1], fmt$0 = rest$14; break; case 16: @@ -28271,11 +28284,11 @@ case 17: var rest$16 = fmt$0[2], fmt$0 = rest$16; break; case 18: - var _Y_ = fmt$0[1]; - if(0 === _Y_[0]) + var _X_ = fmt$0[1]; + if(0 === _X_[0]) /*<>*/ var rest$17 = fmt$0[2], - fmt$1 = _Y_[1][1], + fmt$1 = _X_[1][1], /*<>*/ fmt$2 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$1, rest$17), @@ -28283,7 +28296,7 @@ else /*<>*/ var rest$18 = fmt$0[2], - fmt$3 = _Y_[1][1], + fmt$3 = _X_[1][1], /*<>*/ fmt$4 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$3, rest$18), @@ -28393,11 +28406,11 @@ rest = fmtty$0[3], ty2 = fmtty$0[2], ty1 = fmtty$0[1], - /*<>*/ _V_ = + /*<>*/ _U_ = /*<>*/ caml_call1(CamlinternalFormat[21], ty1), /*<>*/ ty = /*<>*/ caml_call2 - (CamlinternalFormat[22], _V_, ty2), + (CamlinternalFormat[22], _U_, ty2), /*<>*/ fmtty$10 = /*<>*/ caml_call2 (CamlinternalFormatBasics[1], ty, rest), @@ -28502,8 +28515,8 @@ /*<>*/ /*<>*/ var c = check_next_char_for_char(width, ib); return 39 === c - ? (ignore_char(width, ib), _u_) - : (character_mismatch(39, c), _u_); + ? (ignore_char(width, ib), sentinal) + : (character_mismatch(39, c), sentinal); /*<>*/ }, /*<>*/ c = checked_peek_char(ib); if(39 === c){ @@ -28544,11 +28557,11 @@ /*<>*/ return pad_prec_scanf (ib, str_rest, readers, pad, 0, scan$0, token_string); case 18: - var _H_ = match[1]; - if(0 === _H_[0]){ + var _G_ = match[1]; + if(0 === _G_[0]){ /*<>*/ var rest$3 = match[2], - fmt$1 = _H_[1][1], + fmt$1 = _G_[1][1], /*<>*/ scan$1 = function(width, param, ib){ /*<>*/ return scan_string(_q_, width, ib); @@ -28565,7 +28578,7 @@ } /*<>*/ var rest$4 = match[2], - fmt$2 = _H_[1][1], + fmt$2 = _G_[1][1], /*<>*/ scan$2 = function(width, param, ib){ /*<>*/ return scan_string(_r_, width, ib); @@ -28742,7 +28755,7 @@ rest$13 = fmt$0[2], pad$8 = fmt$0[1], /*<>*/ scan$8 = - function(param, _U_, ib){ + function(param, _T_, ib){ /*<>*/ var /*<>*/ c = checked_peek_char(ib), /*<>*/ m = @@ -28768,10 +28781,10 @@ /*<>*/ var rest$15 = fmt$0[2], str$0 = fmt$0[1], - /*<>*/ _I_ = - function(_T_){ /*<>*/ return check_char(ib, _T_);}; + /*<>*/ _H_ = + function(_S_){ /*<>*/ return check_char(ib, _S_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _I_, str$0); + (Stdlib_String[29], _H_, str$0); var fmt$0 = rest$15; break; case 12: @@ -28787,10 +28800,10 @@ s = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _J_ = + /*<>*/ _I_ = /*<>*/ caml_call2 (CamlinternalFormat[14], s, fmtty), - fmt$3 = _J_; + fmt$3 = _I_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -28816,23 +28829,23 @@ /*<>*/ caml_call2 (CamlinternalFormat[13], 0, s$0) [1], - /*<>*/ _L_ = + /*<>*/ _K_ = /*<>*/ caml_call1 (CamlinternalFormat[21], fmtty$0), - /*<>*/ _M_ = + /*<>*/ _L_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _L_), + (CamlinternalFormatBasics[2], _K_), /*<>*/ fmt$8 = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$7, _M_), - /*<>*/ _N_ = + (CamlinternalFormat[12], fmt$7, _L_), + /*<>*/ _M_ = /*<>*/ caml_call1 (CamlinternalFormatBasics[2], fmtty$0), - /*<>*/ _O_ = + /*<>*/ _N_ = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$6, _N_), + (CamlinternalFormat[12], fmt$6, _M_), fmt$5 = fmt$8, - fmt$4 = _O_; + fmt$4 = _N_; } catch(exn){ var exn$0 = caml_wrap_exception(exn); @@ -28840,9 +28853,9 @@ throw caml_maybe_attach_backtrace(exn$0, 0); var msg$0 = exn$0[2], - _K_ = bad_input(msg$0), - fmt$5 = _K_[2], - fmt$4 = _K_[1]; + _J_ = bad_input(msg$0), + fmt$5 = _J_[2], + fmt$4 = _J_[1]; } /*<>*/ return [0, [0, fmt$4, s$0], @@ -28861,19 +28874,19 @@ /*<>*/ var rest$19 = fmt$0[2], formatting_lit = fmt$0[1], - /*<>*/ _P_ = + /*<>*/ _O_ = /*<>*/ caml_call1 (CamlinternalFormat[17], formatting_lit), - /*<>*/ _Q_ = - function(_S_){ /*<>*/ return check_char(ib, _S_);}; + /*<>*/ _P_ = + function(_R_){ /*<>*/ return check_char(ib, _R_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _Q_, _P_); + (Stdlib_String[29], _P_, _O_); var fmt$0 = rest$19; break; case 18: - var _R_ = fmt$0[1]; - if(0 === _R_[0]){ - var rest$20 = fmt$0[2], fmt$9 = _R_[1][1]; + var _Q_ = fmt$0[1]; + if(0 === _Q_[0]){ + var rest$20 = fmt$0[2], fmt$9 = _Q_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 123); /*<>*/ var @@ -28883,7 +28896,7 @@ fmt$0 = fmt$10; } else{ - var rest$21 = fmt$0[2], fmt$11 = _R_[1][1]; + var rest$21 = fmt$0[2], fmt$11 = _Q_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 91); /*<>*/ var @@ -28992,16 +29005,16 @@ if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); /*<>*/ var msg = exc[2], - /*<>*/ _D_ = + /*<>*/ _C_ = /*<>*/ caml_call1(Stdlib_String[24], str), - /*<>*/ _E_ = - /*<>*/ caml_call2(Stdlib[28], _D_, cst$0), - /*<>*/ _F_ = - /*<>*/ caml_call2(Stdlib[28], cst_in_format, _E_), - /*<>*/ _G_ = - /*<>*/ caml_call2(Stdlib[28], msg, _F_); + /*<>*/ _D_ = + /*<>*/ caml_call2(Stdlib[28], _C_, cst$0), + /*<>*/ _E_ = + /*<>*/ caml_call2(Stdlib[28], cst_in_format, _D_), + /*<>*/ _F_ = + /*<>*/ caml_call2(Stdlib[28], msg, _E_); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], _G_); + (Stdlib[1], _F_); } /*<>*/ return /*<>*/ caml_call2 (ef, ib, exc); @@ -29032,15 +29045,15 @@ fmt); /*<>*/ } function kscanf_opt(ib, fmt){ - function _B_(x){ + function _A_(x){ /*<>*/ return [0, x]; /*<>*/ } /*<>*/ return kscanf_gen (ib, - function(param, _C_){ + function(param, _B_){ /*<>*/ return 0; /*<>*/ }, - _B_, + _A_, fmt); /*<>*/ } function bscanf(ib, fmt){ @@ -29071,10 +29084,10 @@ str = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _A_ = + /*<>*/ _z_ = /*<>*/ caml_call2 (CamlinternalFormat[15], str, format), - fmt = _A_; + fmt = _z_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -29088,30 +29101,30 @@ /*<>*/ return bscanf_format(from_string(s), format, f); /*<>*/ } function format_from_string(s, fmt){ - /*<>*/ function _x_(x){ + /*<>*/ function _w_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ var - /*<>*/ _y_ = + /*<>*/ _x_ = /*<>*/ caml_call1(Stdlib_String[24], s), - /*<>*/ _z_ = - /*<>*/ caml_call2(Stdlib[28], _y_, cst$1); + /*<>*/ _y_ = + /*<>*/ caml_call2(Stdlib[28], _x_, cst$1); /*<>*/ return sscanf_format - ( /*<>*/ caml_call2(Stdlib[28], cst$2, _z_), + ( /*<>*/ caml_call2(Stdlib[28], cst$2, _y_), fmt, - _x_); + _w_); /*<>*/ } function unescaped(s){ - /*<>*/ function _v_(x){ + /*<>*/ function _u_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ /*<>*/ var - _w_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); + _v_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); /*<>*/ return /*<>*/ caml_call1 (sscanf - ( /*<>*/ caml_call2(Stdlib[28], cst$4, _w_), + ( /*<>*/ caml_call2(Stdlib[28], cst$4, _v_), _t_), - _v_); + _u_); /*<>*/ } var Stdlib_Scanf = @@ -30476,7 +30489,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - _d_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_List = global_data.Stdlib__List, Stdlib = global_data.Stdlib, @@ -30495,7 +30508,7 @@ /*<>*/ /*<>*/ var prng = [246, - function(_aN_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; + function(_aM_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; function create(opt, initial_size){ /*<>*/ if(opt) var sth = opt[1], random = sth; @@ -30506,17 +30519,17 @@ /*<>*/ for(;;){ if(initial_size > x && Stdlib_Sys[13] >= (x * 2 | 0)){var x$0 = x * 2 | 0, x = x$0; continue;} /*<>*/ if(random){ - var _aL_ = runtime.caml_obj_tag(prng); + var _aK_ = runtime.caml_obj_tag(prng); a: - if(250 === _aL_) - var _aM_ = prng[1]; + if(250 === _aK_) + var _aL_ = prng[1]; else{ - if(246 !== _aL_ && 244 !== _aL_){var _aM_ = prng; break a;} - var _aM_ = caml_call1(CamlinternalLazy[2], prng); + if(246 !== _aK_ && 244 !== _aK_){var _aL_ = prng; break a;} + var _aL_ = caml_call1(CamlinternalLazy[2], prng); } var seed = - /*<>*/ caml_call1(Stdlib_Random[15][4], _aM_); + /*<>*/ caml_call1(Stdlib_Random[15][4], _aL_); } else var seed = 0; @@ -30531,16 +30544,16 @@ /*<>*/ h[1] = 0; /*<>*/ var len = h[2].length - 1, - /*<>*/ _aJ_ = len - 1 | 0, - _aI_ = 0; - if(_aJ_ >= 0){ - var i = _aI_; + /*<>*/ _aI_ = len - 1 | 0, + _aH_ = 0; + if(_aI_ >= 0){ + var i = _aH_; for(;;){ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var - _aK_ = i + 1 | 0; - if(_aJ_ === i) break; - var i = _aK_; + _aJ_ = i + 1 | 0; + if(_aI_ === i) break; + var i = _aJ_; } } return 0; @@ -30557,11 +30570,11 @@ /*<>*/ } function copy(h){ /*<>*/ var - _aF_ = h[4], - _aG_ = h[3], - /*<>*/ _aH_ = + _aE_ = h[4], + _aF_ = h[3], + /*<>*/ _aG_ = /*<>*/ caml_call1(Stdlib_Array[6], h[2]); - /*<>*/ return [0, h[1], _aH_, _aG_, _aF_]; + /*<>*/ return [0, h[1], _aG_, _aF_, _aE_]; /*<>*/ } function key_index(h, hkey){ /*<>*/ return hkey & (h[2].length - 1 - 1 | 0); @@ -30581,16 +30594,16 @@ var param$0 = rest; } /*<>*/ } - var d = h[2], _aD_ = d.length - 1 - 1 | 0, _aC_ = 0; - if(_aD_ >= 0){ - var i = _aC_; + var d = h[2], _aC_ = d.length - 1 - 1 | 0, _aB_ = 0; + if(_aC_ >= 0){ + var i = _aB_; for(;;){ /*<>*/ d[1 + i] = do_bucket(caml_check_bound(d, i)[1 + i]); /*<>*/ /*<>*/ var - _aE_ = i + 1 | 0; - if(_aD_ === i) break; - var i = _aE_; + _aD_ = i + 1 | 0; + if(_aC_ === i) break; + var i = _aD_; } } return 0; @@ -30602,9 +30615,9 @@ nsize = osize * 2 | 0; /*<>*/ clean(h); var - _aw_ = nsize < Stdlib_Sys[13] ? 1 : 0, - _ax_ = _aw_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _aw_; - if(_ax_){ + _av_ = nsize < Stdlib_Sys[13] ? 1 : 0, + _aw_ = _av_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _av_; + if(_aw_){ /*<>*/ /*<>*/ var ndata = /*<>*/ caml_make_vect(nsize, 0); h[2] = ndata; @@ -30612,33 +30625,33 @@ insert_bucket = function(param){ /*<>*/ if(! param) - /*<>*/ return _d_; + /*<>*/ return sentinal; var rest = param[3], data = param[2], hkey = param[1]; /*<>*/ insert_bucket(rest); /*<>*/ /*<>*/ var nidx = key_index(h, hkey); /*<>*/ ndata[1 + nidx] = [0, hkey, data, caml_check_bound(ndata, nidx)[1 + nidx]]; - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ }, - /*<>*/ _az_ = osize - 1 | 0, - /*<>*/ _ay_ = 0; - if(_az_ >= 0){ - var i = _ay_; + /*<>*/ _ay_ = osize - 1 | 0, + /*<>*/ _ax_ = 0; + if(_ay_ >= 0){ + var i = _ax_; for(;;){ /*<>*/ insert_bucket (caml_check_bound(odata, i)[1 + i]); /*<>*/ /*<>*/ var - _aB_ = i + 1 | 0; - if(_az_ === i) break; - var i = _aB_; + _aA_ = i + 1 | 0; + if(_ay_ === i) break; + var i = _aA_; } } - var _aA_ = 0; + var _az_ = 0; } else - var _aA_ = _ax_; - return _aA_; + var _az_ = _aw_; + return _az_; /*<>*/ } function add(h, key, info){ /*<>*/ var @@ -30651,8 +30664,8 @@ [0, hkey, container, caml_check_bound(h[2], i)[1 + i]]; /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; h[1] = h[1] + 1 | 0; - var _av_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _av_ ? resize(h) : _av_; + var _au_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _au_ ? resize(h) : _au_; /*<>*/ } function remove(h, key){ /*<>*/ /*<>*/ var @@ -30680,17 +30693,17 @@ /*<>*/ } /*<>*/ var /*<>*/ i = key_index(h, hkey), - /*<>*/ _au_ = + /*<>*/ _at_ = remove_bucket(caml_check_bound(h[2], i)[1 + i]); - /*<>*/ caml_check_bound(h[2], i)[1 + i] = _au_; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = _at_; /*<>*/ return 0; /*<>*/ } function find(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _at_ = key_index(h, hkey), - param = caml_check_bound(h[2], _at_)[1 + _at_]; + /*<>*/ _as_ = key_index(h, hkey), + param = caml_check_bound(h[2], _as_)[1 + _as_]; for(;;){ if(! param) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -30716,8 +30729,8 @@ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _as_ = key_index(h, hkey), - param = caml_check_bound(h[2], _as_)[1 + _as_]; + /*<>*/ _ar_ = key_index(h, hkey), + param = caml_check_bound(h[2], _ar_)[1 + _ar_]; for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -30765,9 +30778,9 @@ } /*<>*/ } /*<>*/ /*<>*/ var - _ar_ = key_index(h, hkey); + _aq_ = key_index(h, hkey); /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _ar_)[1 + _ar_]); + (caml_check_bound(h[2], _aq_)[1 + _aq_]); /*<>*/ } function replace(h, key, info){ /*<>*/ var @@ -30785,8 +30798,8 @@ if(hkey === hk){ if(! /*<>*/ caml_call2(H[3], c, key)){ /*<>*/ /*<>*/ var - _an_ = /*<>*/ caml_call3(H[5], c, key, info); - /*<>*/ return _an_; + _am_ = /*<>*/ caml_call3(H[5], c, key, info); + /*<>*/ return _am_; } var param = next; } @@ -30794,23 +30807,23 @@ var next$0 = param[3], param = next$0; } } - catch(_aq_){ - var _ao_ = caml_wrap_exception(_aq_); - if(_ao_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ao_, 0); + catch(_ap_){ + var _an_ = caml_wrap_exception(_ap_); + if(_an_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_an_, 0); /*<>*/ /*<>*/ var container = /*<>*/ caml_call2(H[1], key, info); /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, hkey, container, l]; h[1] = h[1] + 1 | 0; - var _ap_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _ap_ ? resize(h) : _ap_; + var _ao_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _ao_ ? resize(h) : _ao_; } /*<>*/ } function mem(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _am_ = key_index(h, hkey), - param = caml_check_bound(h[2], _am_)[1 + _am_]; + /*<>*/ _al_ = key_index(h, hkey), + param = caml_check_bound(h[2], _al_)[1 + _al_]; /*<>*/ for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -30838,21 +30851,21 @@ } } function stats(h){ - /*<>*/ var _ag_ = h[2], _ah_ = 0; - function _ai_(m, b){ + /*<>*/ var _af_ = h[2], _ag_ = 0; + function _ah_(m, b){ /*<>*/ /*<>*/ var - _al_ = bucket_length(0, b); + _ak_ = bucket_length(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _al_); + (Stdlib_Int[11], m, _ak_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ai_, _ah_, _ag_), + (Stdlib_Array[15], _ah_, _ag_, _af_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _aj_ = h[2]; - function _ak_(b){ + /*<>*/ _ai_ = h[2]; + function _aj_(b){ /*<>*/ /*<>*/ var l = bucket_length(0, b); /*<>*/ histo[1 + l] = @@ -30860,7 +30873,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _ak_, _aj_); + (Stdlib_Array[11], _aj_, _ai_); /*<>*/ return [0, h[1], h[2].length - 1, mbl, histo]; /*<>*/ } function bucket_length_alive(accu, param){ @@ -30878,22 +30891,22 @@ function stats_alive(h){ /*<>*/ var /*<>*/ size = [0, 0], - /*<>*/ _aa_ = h[2], - _ab_ = 0; - function _ac_(m, b){ + /*<>*/ _$_ = h[2], + _aa_ = 0; + function _ab_(m, b){ /*<>*/ /*<>*/ var - _af_ = bucket_length_alive(0, b); + _ae_ = bucket_length_alive(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _af_); + (Stdlib_Int[11], m, _ae_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ac_, _ab_, _aa_), + (Stdlib_Array[15], _ab_, _aa_, _$_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ad_ = h[2]; - function _ae_(b){ + /*<>*/ _ac_ = h[2]; + function _ad_(b){ /*<>*/ /*<>*/ var l = bucket_length_alive(0, b); size[1] = size[1] + l | 0; @@ -30902,7 +30915,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _ae_, _ad_); + (Stdlib_Array[11], _ad_, _ac_); /*<>*/ return [0, size[1], h[2].length - 1, @@ -30910,20 +30923,20 @@ histo]; /*<>*/ } function add_seq(tbl, i){ - function _$_(param){ + function ___(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return add(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _$_, i); + (Stdlib_Seq[4], ___, i); /*<>*/ } function replace_seq(tbl, i){ - function ___(param){ + function _Z_(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return replace(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], ___, i); + (Stdlib_Seq[4], _Z_, i); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -30962,7 +30975,7 @@ function set_key(t, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ } function check_key(t){ /*<>*/ return /*<>*/ caml_call2 @@ -31048,10 +31061,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _Z_ = include[1]; + _Y_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_Z_, _a_, sz); + (_Y_, _a_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31084,8 +31097,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add(b, k, d){ - /*<>*/ var _Y_ = b[1]; - b[1] = [0, make(k, d), _Y_]; + /*<>*/ var _X_ = b[1]; + b[1] = [0, make(k, d), _X_]; return 0; /*<>*/ } function test_key(k, e){ @@ -31114,13 +31127,13 @@ } /*<>*/ } function find(b, k){ - /*<>*/ var _V_ = b[1]; - /*<>*/ function _W_(_X_){ - /*<>*/ return test_key(k, _X_); + /*<>*/ var _U_ = b[1]; + /*<>*/ function _V_(_W_){ + /*<>*/ return test_key(k, _W_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _W_, _V_); + /*<>*/ caml_call2(Stdlib_List[39], _V_, _U_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data(e); @@ -31143,7 +31156,7 @@ function set_key1(t, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ } function get_key2(t){ /*<>*/ return /*<>*/ caml_call2 @@ -31152,7 +31165,7 @@ function set_key2(t, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, 1, k); - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ } function get_data$0(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31197,11 +31210,11 @@ /*<>*/ var k2 = param[2], k1 = param[1], - /*<>*/ _U_ = + /*<>*/ _T_ = /*<>*/ caml_call2(H2[2], seed, k2) * 65599 | 0; /*<>*/ return /*<>*/ caml_call2 (H1[2], seed, k1) - + _U_ + + _T_ | 0; } function equal(c, param){ @@ -31230,11 +31243,11 @@ } function check_key(c){ /*<>*/ /*<>*/ var - _T_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); - /*<>*/ return _T_ + _S_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); + /*<>*/ return _S_ ? /*<>*/ caml_call2 (Stdlib_Obj[24][7], c, 1) - : _T_; + : _S_; /*<>*/ } /*<>*/ return MakeSeeded ([0, @@ -31253,13 +31266,13 @@ /*<>*/ } /*<>*/ var equal$0 = H1[1], - /*<>*/ _R_ = [0, equal, seeded_hash]; + /*<>*/ _Q_ = [0, equal, seeded_hash]; function seeded_hash$0(seed, x){ /*<>*/ return /*<>*/ caml_call1 (H1[2], x); /*<>*/ } var - include = MakeSeeded$1([0, equal$0, seeded_hash$0], _R_), + include = MakeSeeded$1([0, equal$0, seeded_hash$0], _Q_), clear = include[2], reset = include[3], copy = include[4], @@ -31276,10 +31289,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _S_ = include[1]; + _R_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_S_, _b_, sz); + (_R_, _b_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31312,8 +31325,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$0(b, k1, k2, d){ - /*<>*/ var _Q_ = b[1]; - b[1] = [0, make$1(k1, k2, d), _Q_]; + /*<>*/ var _P_ = b[1]; + b[1] = [0, make$1(k1, k2, d), _P_]; return 0; /*<>*/ } function test_keys(k1, k2, e){ @@ -31343,13 +31356,13 @@ } /*<>*/ } function find$0(b, k1, k2){ - /*<>*/ var _N_ = b[1]; - /*<>*/ function _O_(_P_){ - /*<>*/ return test_keys(k1, k2, _P_); + /*<>*/ var _M_ = b[1]; + /*<>*/ function _N_(_O_){ + /*<>*/ return test_keys(k1, k2, _O_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _O_, _N_); + /*<>*/ caml_call2(Stdlib_List[39], _N_, _M_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$0(e); @@ -31376,7 +31389,7 @@ function set_key$0(t, n, k){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Obj[24][5], t, n, k); - /*<>*/ return _d_; + /*<>*/ return sentinal; /*<>*/ } function get_data$1(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31392,17 +31405,17 @@ /*<>*/ eph = create$1(l); /*<>*/ set_data$1(eph, data); /*<>*/ var - _L_ = l - 1 | 0, - /*<>*/ _K_ = 0; - if(_L_ >= 0){ - var i = _K_; + _K_ = l - 1 | 0, + /*<>*/ _J_ = 0; + if(_K_ >= 0){ + var i = _J_; for(;;){ /*<>*/ set_key$0 (eph, i, caml_check_bound(keys, i)[1 + i]); /*<>*/ /*<>*/ var - _M_ = i + 1 | 0; - if(_L_ === i) break; - var i = _M_; + _L_ = i + 1 | 0; + if(_K_ === i) break; + var i = _L_; } } /*<>*/ return eph; @@ -31415,10 +31428,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - /*<>*/ _G_ = l - 1 | 0, - /*<>*/ _F_ = 0; - if(_G_ >= 0){ - var i = _F_; + /*<>*/ _F_ = l - 1 | 0, + /*<>*/ _E_ = 0; + if(_F_ >= 0){ + var i = _E_; for(;;){ /*<>*/ /*<>*/ var match = get_key$0(eph, i); @@ -31430,19 +31443,19 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ /*<>*/ var - _I_ = i + 1 | 0; - if(_G_ === i) break; - var i = _I_; + _H_ = i + 1 | 0; + if(_F_ === i) break; + var i = _H_; } } /*<>*/ /*<>*/ var - _H_ = get_data$1(eph); - /*<>*/ return _H_; + _G_ = get_data$1(eph); + /*<>*/ return _G_; } - catch(_J_){ - var _E_ = caml_wrap_exception(_J_); - if(_E_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_E_, 0); + catch(_I_){ + var _D_ = caml_wrap_exception(_I_); + if(_D_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_D_, 0); } /*<>*/ } function MakeSeeded$2(H){ @@ -31451,17 +31464,17 @@ c = create$1(k.length - 1); /*<>*/ set_data$1(c, d); /*<>*/ var - _C_ = k.length - 1 - 1 | 0, - /*<>*/ _B_ = 0; - if(_C_ >= 0){ - var i = _B_; + _B_ = k.length - 1 - 1 | 0, + /*<>*/ _A_ = 0; + if(_B_ >= 0){ + var i = _A_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _D_ = i + 1 | 0; - if(_C_ === i) break; - var i = _D_; + _C_ = i + 1 | 0; + if(_B_ === i) break; + var i = _C_; } } /*<>*/ return c; @@ -31469,22 +31482,22 @@ function seeded_hash(seed, k){ /*<>*/ var /*<>*/ h = [0, 0], - _x_ = k.length - 1 - 1 | 0, - /*<>*/ _w_ = 0; - if(_x_ >= 0){ - var i = _w_; + _w_ = k.length - 1 - 1 | 0, + /*<>*/ _v_ = 0; + if(_w_ >= 0){ + var i = _v_; for(;;){ /*<>*/ var - _y_ = h[1], - /*<>*/ _z_ = caml_check_bound(k, i)[1 + i]; + _x_ = h[1], + /*<>*/ _y_ = caml_check_bound(k, i)[1 + i]; h[1] = - ( /*<>*/ caml_call2(H[2], seed, _z_) * 65599 | 0) - + _y_ + ( /*<>*/ caml_call2(H[2], seed, _y_) * 65599 | 0) + + _x_ | 0; /*<>*/ /*<>*/ var - _A_ = i + 1 | 0; - if(_x_ === i) break; - var i = _A_; + _z_ = i + 1 | 0; + if(_w_ === i) break; + var i = _z_; } } return h[1]; @@ -31504,9 +31517,9 @@ if(! match) /*<>*/ return 2; /*<>*/ var ki = match[1], - /*<>*/ _v_ = caml_check_bound(k, i)[1 + i]; + /*<>*/ _u_ = caml_check_bound(k, i)[1 + i]; /*<>*/ if - (! /*<>*/ caml_call2(H[1], _v_, ki)) + (! /*<>*/ caml_call2(H[1], _u_, ki)) /*<>*/ return 1; /*<>*/ var /*<>*/ i$0 = i - 1 | 0, @@ -31517,17 +31530,17 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Obj[24][12], c); /*<>*/ var - _t_ = k.length - 1 - 1 | 0, - /*<>*/ _s_ = 0; - if(_t_ >= 0){ - var i = _s_; + _s_ = k.length - 1 - 1 | 0, + /*<>*/ _r_ = 0; + if(_s_ >= 0){ + var i = _r_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _u_ = i + 1 | 0; - if(_t_ === i) break; - var i = _u_; + _t_ = i + 1 | 0; + if(_s_ === i) break; + var i = _t_; } } /*<>*/ return set_data$1(c, d); @@ -31537,19 +31550,19 @@ /*<>*/ i$1 = length$1(c) - 1 | 0, i = i$1; /*<>*/ for(;;){ - var _q_ = i < 0 ? 1 : 0; - if(_q_) - var _r_ = _q_; + var _p_ = i < 0 ? 1 : 0; + if(_p_) + var _q_ = _p_; else{ /*<>*/ /*<>*/ var - _p_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); - /*<>*/ if(_p_){ + _o_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); + /*<>*/ if(_o_){ var i$0 = i - 1 | 0, i = i$0; continue; } - var _r_ = _p_; + var _q_ = _o_; } - return _r_; + return _q_; } /*<>*/ } /*<>*/ return MakeSeeded @@ -31585,10 +31598,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _o_ = include[1]; + _n_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_o_, _c_, sz); + (_n_, _c_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31621,8 +31634,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$1(b, k, d){ - /*<>*/ var _n_ = b[1]; - b[1] = [0, make$3(k, d), _n_]; + /*<>*/ var _m_ = b[1]; + b[1] = [0, make$3(k, d), _m_]; return 0; /*<>*/ } function test_keys$0(k, e){ @@ -31631,10 +31644,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - _j_ = k.length - 1 - 1 | 0, - /*<>*/ _i_ = 0; - if(_j_ >= 0){ - var i = _i_; + _i_ = k.length - 1 - 1 | 0, + /*<>*/ _h_ = 0; + if(_i_ >= 0){ + var i = _h_; for(;;){ /*<>*/ /*<>*/ var match = get_key$0(e, i); @@ -31642,9 +31655,9 @@ var x = match[1]; if(x === caml_check_bound(k, i)[1 + i]){ /*<>*/ /*<>*/ var - _l_ = i + 1 | 0; - if(_j_ === i) break; - var i = _l_; + _k_ = i + 1 | 0; + if(_i_ === i) break; + var i = _k_; continue; } } @@ -31652,13 +31665,13 @@ (Stdlib[3], 1); } } - /*<>*/ /*<>*/ var _k_ = 1; - /*<>*/ return _k_; + /*<>*/ /*<>*/ var _j_ = 1; + /*<>*/ return _j_; } - catch(_m_){ - var _h_ = caml_wrap_exception(_m_); - if(_h_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_h_, 0); + catch(_l_){ + var _g_ = caml_wrap_exception(_l_); + if(_g_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_g_, 0); } /*<>*/ } function remove$1(b, k){ @@ -31678,13 +31691,13 @@ } /*<>*/ } function find$1(b, k){ - /*<>*/ var _e_ = b[1]; - /*<>*/ function _f_(_g_){ - /*<>*/ return test_keys$0(k, _g_); + /*<>*/ var _d_ = b[1]; + /*<>*/ function _e_(_f_){ + /*<>*/ return test_keys$0(k, _f_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _f_, _e_); + /*<>*/ caml_call2(Stdlib_List[39], _e_, _d_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$1(e); @@ -31771,7 +31784,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - _l_ = undefined, + sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$18 = cst$19, cst$17 = cst$19, @@ -31907,39 +31920,39 @@ /*<>*/ } function is_relative(n){ /*<>*/ var - _aI_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _aJ_ = - _aI_ + _aH_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _aI_ = + _aH_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - return _aJ_; + return _aI_; /*<>*/ } function is_implicit(n){ /*<>*/ /*<>*/ var - _aD_ = is_relative(n); - /*<>*/ if(_aD_){ + _aC_ = is_relative(n); + /*<>*/ if(_aC_){ var - _aE_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aF_ = - _aE_ + _aD_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aE_ = + _aD_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_aF_) + /*<>*/ if(_aE_) var - _aG_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aH_ = - _aG_ + _aF_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aG_ = + _aF_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 3), cst$28); else - var _aH_ = _aF_; + var _aG_ = _aE_; } else - var _aH_ = _aD_; - /*<>*/ return _aH_; + var _aG_ = _aC_; + /*<>*/ return _aG_; /*<>*/ } function check_suffix(name, suff){ /*<>*/ return /*<>*/ caml_call2 @@ -31967,8 +31980,8 @@ /*<>*/ caml_sys_getenv("TMPDIR"), temp_dir_name = _k_; } - catch(_aC_){ - var _a_ = caml_wrap_exception(_aC_); + catch(_aB_){ + var _a_ = caml_wrap_exception(_aB_); if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); var temp_dir_name = cst_tmp; } @@ -31980,10 +31993,10 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 39); /*<>*/ var - _az_ = l - 1 | 0, - /*<>*/ _ay_ = 0; - if(_az_ >= 0){ - var i = _ay_; + _ay_ = l - 1 | 0, + /*<>*/ _ax_ = 0; + if(_ay_ >= 0){ + var i = _ax_; for(;;){ /*<>*/ if (39 === /*<>*/ caml_string_get(s, i)) @@ -31991,14 +32004,14 @@ (Stdlib_Buffer[16], b, quotequote); else{ /*<>*/ /*<>*/ var - _aB_ = /*<>*/ caml_string_get(s, i); + _aA_ = /*<>*/ caml_string_get(s, i); /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, _aB_); + (Stdlib_Buffer[12], b, _aA_); } /*<>*/ /*<>*/ var - _aA_ = i + 1 | 0; - if(_az_ === i) break; - var i = _aA_; + _az_ = i + 1 | 0; + if(_ay_ === i) break; + var i = _az_; } } /*<>*/ /*<>*/ caml_call2 @@ -32011,47 +32024,47 @@ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _an_ = cst_2_1; + var _am_ = cst_2_1; else /*<>*/ var - /*<>*/ _ax_ = quote(f), - _an_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _ax_); - var _ao_ = _an_; + /*<>*/ _aw_ = quote(f), + _am_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _aw_); + var _an_ = _am_; } else - var _ao_ = cst$4; + var _an_ = cst$4; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _ap_ = quote(f$0), - _aq_ = /*<>*/ caml_call2(Stdlib[28], cst, _ap_); + /*<>*/ _ao_ = quote(f$0), + _ap_ = /*<>*/ caml_call2(Stdlib[28], cst, _ao_); else - var _aq_ = cst$3; + var _ap_ = cst$3; /*<>*/ /*<>*/ var - _ar_ = /*<>*/ caml_call2(Stdlib[28], _aq_, _ao_); + _aq_ = /*<>*/ caml_call2(Stdlib[28], _ap_, _an_); if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _as_ = quote(f$1), - _at_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _as_); + /*<>*/ _ar_ = quote(f$1), + _as_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _ar_); else - var _at_ = cst$2; + var _as_ = cst$2; /*<>*/ var - /*<>*/ _au_ = - /*<>*/ caml_call2(Stdlib[28], _at_, _ar_), - /*<>*/ _av_ = + /*<>*/ _at_ = + /*<>*/ caml_call2(Stdlib[28], _as_, _aq_), + /*<>*/ _au_ = /*<>*/ caml_call2 (Stdlib_List[19], quote, [0, cmd, args]), - /*<>*/ _aw_ = - /*<>*/ caml_call2(Stdlib_String[6], cst$1, _av_); + /*<>*/ _av_ = + /*<>*/ caml_call2(Stdlib_String[6], cst$1, _au_); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _aw_, _au_); + (Stdlib[28], _av_, _at_); /*<>*/ } - /*<>*/ function basename(_am_){ - /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _am_); + /*<>*/ function basename(_al_){ + /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _al_); } - /*<>*/ function dirname(_al_){ - /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _al_); + /*<>*/ function dirname(_ak_){ + /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _ak_); } /*<>*/ /*<>*/ var Unix = @@ -32074,96 +32087,96 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _ai_ = 47 === c ? 1 : 0; - if(_ai_) - var _aj_ = _ai_; + _ah_ = 47 === c ? 1 : 0; + if(_ah_) + var _ai_ = _ah_; else - var _ak_ = 92 === c ? 1 : 0, _aj_ = _ak_ || (58 === c ? 1 : 0); - return _aj_; + var _aj_ = 92 === c ? 1 : 0, _ai_ = _aj_ || (58 === c ? 1 : 0); + return _ai_; /*<>*/ } function is_relative$0(n){ /*<>*/ var - _ac_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ad_ = - _ac_ + _ab_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ac_ = + _ab_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ad_){ + if(_ac_){ var - _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _af_ = - _ae_ + _ad_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ae_ = + _ad_ || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_af_) + if(_ae_) var - _ag_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _ah_ = - _ag_ + _af_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _ag_ = + _af_ || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else - var _ah_ = _af_; + var _ag_ = _ae_; } else - var _ah_ = _ad_; - return _ah_; + var _ag_ = _ac_; + return _ag_; /*<>*/ } function is_implicit$0(n){ /*<>*/ /*<>*/ var - _V_ = is_relative$0(n); - /*<>*/ if(_V_){ + _U_ = is_relative$0(n); + /*<>*/ if(_U_){ var - _W_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _X_ = - _W_ + _V_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _W_ = + _V_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_X_){ + /*<>*/ if(_W_){ var - _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _Z_ = - _Y_ + _X_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _Y_ = + _X_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), ".\\"); - /*<>*/ if(_Z_){ + /*<>*/ if(_Y_){ var - ___ = caml_ml_string_length(n) < 3 ? 1 : 0, - _$_ = - ___ + _Z_ = caml_ml_string_length(n) < 3 ? 1 : 0, + ___ = + _Z_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), cst$28); - /*<>*/ if(_$_) + /*<>*/ if(___) var - _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _ab_ = - _aa_ + _$_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aa_ = + _$_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), "..\\"); else - var _ab_ = _$_; + var _aa_ = ___; } else - var _ab_ = _Z_; + var _aa_ = _Y_; } else - var _ab_ = _X_; + var _aa_ = _W_; } else - var _ab_ = _V_; - /*<>*/ return _ab_; + var _aa_ = _U_; + /*<>*/ return _aa_; /*<>*/ } function check_suffix$0(name, suff){ /*<>*/ var - _S_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_S_) + _R_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; + if(_R_) /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 @@ -32171,14 +32184,14 @@ name, caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, caml_ml_string_length(suff)), - /*<>*/ _T_ = + /*<>*/ _S_ = /*<>*/ caml_call1(Stdlib_String[26], suff), - _U_ = + _T_ = /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[26], s), _T_); + ( /*<>*/ caml_call1(Stdlib_String[26], s), _S_); else - var _U_ = _S_; - /*<>*/ return _U_; + var _T_ = _R_; + /*<>*/ return _T_; /*<>*/ } function chop_suffix_opt$0(suffix, filename){ /*<>*/ var @@ -32189,11 +32202,11 @@ /*<>*/ r = /*<>*/ caml_call3 (Stdlib_String[15], filename, len_f - len_s | 0, len_s), - /*<>*/ _R_ = + /*<>*/ _Q_ = /*<>*/ caml_call1(Stdlib_String[26], suffix); /*<>*/ return /*<>*/ caml_string_equal ( /*<>*/ caml_call1(Stdlib_String[26], r), - _R_) + _Q_) ? [0, /*<>*/ caml_call3 (Stdlib_String[15], filename, 0, len_f - len_s | 0)] @@ -32205,8 +32218,8 @@ /*<>*/ caml_sys_getenv("TEMP"), temp_dir_name$0 = _j_; } - catch(_Q_){ - var _b_ = caml_wrap_exception(_Q_); + catch(_P_){ + var _b_ = caml_wrap_exception(_P_); if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); var temp_dir_name$0 = cst$5; } @@ -32223,17 +32236,17 @@ if(i$0 === l){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - /*<>*/ return _l_; + /*<>*/ return sentinal; } /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); if(34 === c){ /*<>*/ loop_bs(0, i$0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } if(92 === c){ /*<>*/ loop_bs(0, i$0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, c); @@ -32249,7 +32262,7 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ add_bs(n$0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(s, i$0); @@ -32258,12 +32271,12 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ loop(i$0 + 1 | 0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } if(92 !== match){ /*<>*/ add_bs(n$0); /*<>*/ loop(i$0); - /*<>*/ return _l_; + /*<>*/ return sentinal; } /*<>*/ var /*<>*/ i$1 = i$0 + 1 | 0, @@ -32273,19 +32286,19 @@ } /*<>*/ } function add_bs(n){ - /*<>*/ /*<>*/ var _O_ = 1; + /*<>*/ /*<>*/ var _N_ = 1; if(n >= 1){ - var j = _O_; + var j = _N_; for(;;){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 92); /*<>*/ /*<>*/ var - _P_ = j + 1 | 0; + _O_ = j + 1 | 0; if(n === j) break; - var j = _P_; + var j = _O_; } } - return _l_; + return sentinal; /*<>*/ } /*<>*/ loop(0); /*<>*/ return /*<>*/ caml_call1 @@ -32300,62 +32313,62 @@ (! /*<>*/ caml_call2(Stdlib_String[14], f, 32)) /*<>*/ return f; /*<>*/ /*<>*/ var - _N_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); + _M_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _N_); + (Stdlib[28], cst$7, _M_); } /*<>*/ /*<>*/ var - _M_ = + _L_ = /*<>*/ caml_call2 (Stdlib[28], cst_Filename_quote_command_bad, f); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _M_); + (Stdlib[2], _L_); /*<>*/ } function quote_command$0(cmd, stdin, stdout, stderr, args){ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _y_ = cst_2_1$0; + var _x_ = cst_2_1$0; else /*<>*/ var - /*<>*/ _K_ = quote_cmd_filename(f), - _y_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _K_); - var _z_ = _y_; + /*<>*/ _J_ = quote_cmd_filename(f), + _x_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _J_); + var _y_ = _x_; } else - var _z_ = cst$16; - var _A_ = [0, _z_, _c_]; + var _y_ = cst$16; + var _z_ = [0, _y_, _c_]; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _B_ = quote_cmd_filename(f$0), - _C_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _B_); + /*<>*/ _A_ = quote_cmd_filename(f$0), + _B_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _A_); else - var _C_ = cst$15; - var _D_ = [0, _C_, _A_]; + var _B_ = cst$15; + var _C_ = [0, _B_, _z_]; if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _E_ = quote_cmd_filename(f$1), - _F_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _E_); + /*<>*/ _D_ = quote_cmd_filename(f$1), + _E_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _D_); else - var _F_ = cst$14; + var _E_ = cst$14; /*<>*/ var - /*<>*/ _H_ = + /*<>*/ _G_ = /*<>*/ caml_call2(Stdlib_List[19], quote$0, args), /*<>*/ s = - /*<>*/ caml_call2(Stdlib_String[6], cst$10, _H_), + /*<>*/ caml_call2(Stdlib_String[6], cst$10, _G_), /*<>*/ b = /*<>*/ caml_call1 (Stdlib_Buffer[1], caml_ml_string_length(s) + 20 | 0), - _G_ = [0, _F_, _D_]; - function _x_(c){ + _F_ = [0, _E_, _C_]; + function _w_(c){ /*<>*/ a: { if(62 <= c){ - var _L_ = c - 63 | 0; - if(60 < _L_ >>> 0){if(62 <= _L_) break a;} else if(31 !== _L_) break a; + var _K_ = c - 63 | 0; + if(60 < _K_ >>> 0){if(62 <= _K_) break a;} else if(31 !== _K_) break a; } else if(42 <= c){ @@ -32375,21 +32388,21 @@ (Stdlib_Buffer[12], b, c); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _x_, s); + (Stdlib_String[29], _w_, s); /*<>*/ var - _I_ = + _H_ = [0, cst$11, - [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _G_]], - /*<>*/ _J_ = - [0, cst$12, [0, quote_cmd_filename(cmd), _I_]]; + [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _F_]], + /*<>*/ _I_ = + [0, cst$12, [0, quote_cmd_filename(cmd), _H_]]; /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[6], cst$13, _J_); + (Stdlib_String[6], cst$13, _I_); /*<>*/ } function drive_and_path(s){ /*<>*/ var - _t_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; - if(_t_){ + _s_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; + if(_s_){ /*<>*/ /*<>*/ var param = /*<>*/ caml_string_get(s, 0); a: @@ -32400,28 +32413,28 @@ if(25 < param - 97 >>> 0) break b; } else if(65 > param) break b; - var _u_ = 1; + var _t_ = 1; break a; } - var _u_ = 0; + var _t_ = 0; } /*<>*/ /*<>*/ var - _v_ = - _u_ + _u_ = + _t_ ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 - : _u_; + : _t_; } else - var _v_ = _t_; - /*<>*/ if(! _v_) + var _u_ = _s_; + /*<>*/ if(! _u_) /*<>*/ return [0, cst$17, s]; /*<>*/ /*<>*/ var - _w_ = + _v_ = /*<>*/ caml_call3 (Stdlib_String[15], s, 2, caml_ml_string_length(s) - 2 | 0); /*<>*/ return [0, /*<>*/ caml_call3(Stdlib_String[15], s, 0, 2), - _w_]; + _v_]; /*<>*/ } function dirname$0(s){ /*<>*/ var @@ -32455,11 +32468,11 @@ quote_command$0, basename$0, dirname$0]; - /*<>*/ function basename$1(_s_){ - /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _s_); + /*<>*/ function basename$1(_r_){ + /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _r_); } - /*<>*/ function dirname$1(_r_){ - /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _r_); + /*<>*/ function dirname$1(_q_){ + /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _q_); } /*<>*/ var /*<>*/ Cygwin = @@ -32502,11 +32515,11 @@ /*<>*/ if (0 !== l && ! is_dir_sep$1(dirname, l - 1 | 0)){ /*<>*/ /*<>*/ var - _q_ = + _p_ = /*<>*/ caml_call2 (Stdlib[28], dir_sep$2, filename); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], dirname, _q_); + (Stdlib[28], dirname, _p_); } /*<>*/ return /*<>*/ caml_call2 (Stdlib[28], dirname, filename); @@ -32609,7 +32622,7 @@ /*<>*/ } /*<>*/ var /*<>*/ _g_ = - [0, function(_p_){ /*<>*/ return _p_;}], + [0, function(_o_){ /*<>*/ return _o_;}], /*<>*/ current_temp_dir_name = /*<>*/ caml_call2(Stdlib_Domain[10][1], _g_, _f_); function set_temp_dir_name(s){ @@ -32649,17 +32662,17 @@ } } /*<>*/ } - function open_temp_file(opt, _n_, _m_, prefix, suffix){ + function open_temp_file(opt, _m_, _l_, prefix, suffix){ /*<>*/ if(opt) var sth = opt[1], mode = sth; else var mode = _i_; - /*<>*/ if(_n_) - var sth$0 = _n_[1], perms = sth$0; + /*<>*/ if(_m_) + var sth$0 = _m_[1], perms = sth$0; else var perms = 384; - /*<>*/ if(_m_) - var sth$1 = _m_[1], temp_dir = sth$1; + /*<>*/ if(_l_) + var sth$1 = _l_[1], temp_dir = sth$1; else var temp_dir = @@ -32671,12 +32684,12 @@ name = temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ /*<>*/ /*<>*/ var - _o_ = + _n_ = [0, name, /*<>*/ caml_call3 (Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; - /*<>*/ return _o_; + /*<>*/ return _n_; } catch(e$0){ var e = caml_wrap_exception(e$0); From ca4642592ab4545d8d9fb9384d41f64ec2963f35 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 24 Aug 2023 22:13:59 -0500 Subject: [PATCH 065/112] omit sentinal fields in generated code --- compiler/lib/driver.ml | 32 ++++++++++++++++------ compiler/lib/generate.ml | 21 +++++++++++--- compiler/lib/generate.mli | 1 + compiler/lib/macro.ml | 2 +- compiler/lib/mlvalue.ml | 6 ++-- compiler/lib/mlvalue.mli | 4 +-- compiler/tests-compiler/global_deadcode.ml | 2 +- 7 files changed, 47 insertions(+), 21 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index f72320508e..3ae57b0298 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -104,15 +104,22 @@ let exact_calls profile p = | O3 -> false | O1 | O2 -> true in - if Config.Flag.globaldeadcode () then + if Config.Flag.globaldeadcode () + then let p, sentinal = Deadcode_dgraph.add_sentinal p in let info = Global_flow.f ~fast p in let p = Deadcode_dgraph.f p sentinal info in - Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p - else + let p = + Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p + in + p, Some sentinal + else let info = Global_flow.f ~fast p in - Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p - else p + let p = + Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p + in + p, None + else p, None let print p = if debug () then Code.Print.program (fun _ _ -> "") p; @@ -181,7 +188,7 @@ let generate ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect - ((p, live_vars), cps_calls) = + ((p, live_vars), cps_calls, sentinal) = if times () then Format.eprintf "Start Generation...@."; let should_export = should_export wrap_with_fun in Generate.f @@ -191,6 +198,7 @@ let generate ~cps_calls ~should_export ~warn_on_unhandled_effect + ~sentinal d let debug_linker = Debug.find "linker" @@ -585,8 +593,11 @@ let full ~standalone ~wrap_with_fun ~profile ~linkall ~source_map formatter d p | O2 -> o2 | O3 -> o3) +> exact_calls profile - +> effects - +> map_fst (Generate_closure.f +> deadcode') + +> (fun (p, sentinal) -> + let p, cps_calls = effects p in + p, cps_calls, sentinal) + +> fun (p, cps_calls, sentinal) -> + deadcode' (Generate_closure.f p), cps_calls, sentinal in let emit = generate d ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect:standalone @@ -598,7 +609,10 @@ let full ~standalone ~wrap_with_fun ~profile ~linkall ~source_map formatter d p in if times () then Format.eprintf "Start Optimizing...@."; let t = Timer.make () in - let r = opt p in + let r : (Code.program * Deadcode.variable_uses) * Effects.cps_calls * Code.Var.t option + = + opt p + in let () = if times () then Format.eprintf " optimizations : %a@." Timer.print t in emit r diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 845e7a3003..ef49532f53 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -285,12 +285,14 @@ module Ctx = struct ; should_export : bool ; effect_warning : bool ref ; cps_calls : Effects.cps_calls + ; sentinal : Var.t option } let initial ~warn_on_unhandled_effect ~exported_runtime ~should_export + ~sentinal blocks live cps_calls @@ -304,6 +306,7 @@ module Ctx = struct ; should_export ; effect_warning = ref (not warn_on_unhandled_effect) ; cps_calls + ; sentinal } end @@ -444,7 +447,7 @@ let rec constant_rec ~ctx x level instrs = | Float_array a -> ( Mlvalue.Array.make ~tag:Obj.double_array_tag - ~args:(Array.to_list (Array.map a ~f:float_const)) + ~args:(Array.to_list (Array.map a ~f:(fun x -> J.Element (float_const x)))) , instrs ) | Int64 i -> let p = @@ -490,9 +493,9 @@ let rec constant_rec ~ctx x level instrs = let instrs = (J.variable_declaration [ J.V v, (js, J.N) ], J.N) :: instrs in - J.EVar (J.V v) :: acc, instrs - | _ -> js :: acc, instrs) - else List.rev l, instrs + J.Element (J.EVar (J.V v)) :: acc, instrs + | _ -> J.Element js :: acc, instrs) + else List.map ~f:(fun x -> J.Element x) (List.rev l), instrs in Mlvalue.Block.make ~tag ~args:l, instrs) | Int i -> int32 i, instrs @@ -1035,6 +1038,14 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = List.fold_right ~f:(fun x (args, prop, queue) -> let (prop', cx), queue = access_queue queue x in + let cx = + match cx with + | J.EVar (J.V v) -> ( + match ctx.sentinal with + | Some s -> if Var.equal v s then J.ElementHole else J.Element cx + | None -> J.Element cx) + | _ -> J.Element cx + in cx :: args, or_p prop prop', queue) (Array.to_list a) ~init:([], const_p, queue) @@ -1792,6 +1803,7 @@ let f ~cps_calls ~should_export ~warn_on_unhandled_effect + ~sentinal debug = let t' = Timer.make () in let share = Share.get ~cps_calls ~alias_prims:exported_runtime p in @@ -1803,6 +1815,7 @@ let f ~warn_on_unhandled_effect ~exported_runtime ~should_export + ~sentinal p.blocks live_vars cps_calls diff --git a/compiler/lib/generate.mli b/compiler/lib/generate.mli index 66053fdc2c..ddb4854644 100644 --- a/compiler/lib/generate.mli +++ b/compiler/lib/generate.mli @@ -25,6 +25,7 @@ val f : -> cps_calls:Effects.cps_calls -> should_export:bool -> warn_on_unhandled_effect:bool + -> sentinal:Code.Var.t option -> Parse_bytecode.Debug.t -> Javascript.program diff --git a/compiler/lib/macro.ml b/compiler/lib/macro.ml index 8904d212ac..c9e9fb2047 100644 --- a/compiler/lib/macro.ml +++ b/compiler/lib/macro.ml @@ -47,7 +47,7 @@ class macro_mapper ~flags = let tag = Int32.to_int (J.Num.to_int32 tag) in let args = List.map args ~f:(function - | J.Arg e -> m#expression e + | J.Arg e -> J.Element (m#expression e) | J.ArgSpread _ -> assert false) in Mlvalue.Block.make ~tag ~args diff --git a/compiler/lib/mlvalue.ml b/compiler/lib/mlvalue.ml index 8b5de2ca7b..6752522408 100644 --- a/compiler/lib/mlvalue.ml +++ b/compiler/lib/mlvalue.ml @@ -35,10 +35,8 @@ let is_immediate e = type_of_is_number J.EqEqEq e module Block = struct let make ~tag ~args = - J.EArr - (List.map - ~f:(fun x -> J.Element x) - (J.ENum (J.Num.of_int32 (Int32.of_int tag)) :: args)) + let tag_elt = J.Element (J.ENum (J.Num.of_int32 (Int32.of_int tag))) in + J.EArr (tag_elt :: args) let tag e = J.EAccess (e, ANormal, zero) diff --git a/compiler/lib/mlvalue.mli b/compiler/lib/mlvalue.mli index c0595eac3b..a4d847783b 100644 --- a/compiler/lib/mlvalue.mli +++ b/compiler/lib/mlvalue.mli @@ -18,7 +18,7 @@ *) module Block : sig - val make : tag:int -> args:Javascript.expression list -> Javascript.expression + val make : tag:int -> args:Javascript.element list -> Javascript.expression val tag : Javascript.expression -> Javascript.expression @@ -26,7 +26,7 @@ module Block : sig end module Array : sig - val make : tag:int -> args:Javascript.expression list -> Javascript.expression + val make : tag:int -> args:Javascript.element list -> Javascript.expression val length : Javascript.expression -> Javascript.expression diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index 899ce4f854..09eefa39a1 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -64,7 +64,7 @@ let%expect_test "Substitutes unused fields with undefined" = print_fun_decl program (Some "f"); [%expect {| function f(b, x){ - var t = b ? [0, 1, sentinal, x] : [0, 3, sentinal, 4], v = t[3], u = t[1]; + var t = b ? [0, 1, , x] : [0, 3, , 4], v = t[3], u = t[1]; return [0, u, v]; } //end |}]; From a702c991278bce2d595d739fbd4b6098c0b621f2 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sat, 26 Aug 2023 17:27:27 -0500 Subject: [PATCH 066/112] default off --- compiler/lib/config.ml | 2 +- compiler/tests-compiler/gh1349.ml | 1 - compiler/tests-compiler/gh1354.ml | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/lib/config.ml b/compiler/lib/config.ml index 9385a063ba..4d6ab7cc25 100644 --- a/compiler/lib/config.ml +++ b/compiler/lib/config.ml @@ -58,7 +58,7 @@ module Flag = struct let deadcode = o ~name:"deadcode" ~default:true - let globaldeadcode = o ~name:"globaldeadcode" ~default:true + let globaldeadcode = o ~name:"globaldeadcode" ~default:false let shortvar = o ~name:"shortvar" ~default:true diff --git a/compiler/tests-compiler/gh1349.ml b/compiler/tests-compiler/gh1349.ml index c385023520..aff3e46862 100644 --- a/compiler/tests-compiler/gh1349.ml +++ b/compiler/tests-compiler/gh1349.ml @@ -35,7 +35,6 @@ let%expect_test _ = (List.concat [ [ "--disable"; "inline" ] ; [ "--disable"; "deadcode" ] - ; [ "--disable"; "globaldeadcode" ] ; [ "--disable"; "staticeval" ] ; [ "--enable"; "shortvar" ] ; [ "--debug"; "shortvar" ] diff --git a/compiler/tests-compiler/gh1354.ml b/compiler/tests-compiler/gh1354.ml index 122686d07b..16789258ba 100644 --- a/compiler/tests-compiler/gh1354.ml +++ b/compiler/tests-compiler/gh1354.ml @@ -37,7 +37,6 @@ with Exit -> (List.concat [ [ "--disable"; "inline" ] ; [ "--disable"; "deadcode" ] - ; [ "--disable"; "globaldeadcode" ] ; [ "--disable"; "staticeval" ] ]) prog @@ -101,7 +100,6 @@ with Exit -> (List.concat [ [ "--disable"; "inline" ] ; [ "--disable"; "deadcode" ] - ; [ "--disable"; "globaldeadcode" ] ; [ "--disable"; "staticeval" ] ]) prog @@ -188,7 +186,6 @@ with Exit -> (List.concat [ [ "--disable"; "inline" ] ; [ "--disable"; "deadcode" ] - ; [ "--disable"; "globaldeadcode" ] ; [ "--disable"; "staticeval" ] ]) prog From 3cdfb6ff6a10cc85af0e5d440a0414d707a6d46e Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sun, 27 Aug 2023 16:54:13 -0500 Subject: [PATCH 067/112] promote changes from making default off --- compiler/tests-compiler/direct_calls.ml | 4 +- compiler/tests-compiler/gh1007.ml | 88 +-- compiler/tests-compiler/global_deadcode.ml | 24 +- compiler/tests-full/stdlib.cma.expected.js | 829 ++++++++++----------- 4 files changed, 434 insertions(+), 511 deletions(-) diff --git a/compiler/tests-compiler/direct_calls.ml b/compiler/tests-compiler/direct_calls.ml index e7c66cb85a..30fdcc82fd 100644 --- a/compiler/tests-compiler/direct_calls.ml +++ b/compiler/tests-compiler/direct_calls.ml @@ -57,7 +57,7 @@ let%expect_test "direct calls without --enable effects" = [%expect {| function test1(param){ - function f(g, x){caml_call1(g, x); return sentinal;} + function f(g, x){return caml_call1(g, x);} var _d_ = 7; f(function(x){return x + 1 | 0;}, _d_); var _e_ = 4.; @@ -66,7 +66,7 @@ let%expect_test "direct calls without --enable effects" = } //end function test2(param){ - function f(g, x){caml_call1(g, x); return sentinal;} + function f(g, x){return caml_call1(g, x);} var _c_ = 7; f(function(x){return x + 1 | 0;}, _c_); f(function(x){return caml_call2(Stdlib[28], x, cst_a$0);}, cst_a); diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 6379531de1..e4971515a8 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -366,29 +366,25 @@ let () = M.run () var even = function(n){ - if(2 >= n >>> 0) - switch(n){ - case 0: - return sentinal; - case 1: - odd(0); return sentinal; - default: odd(1); return sentinal; - } - odd(n - 1 | 0); - return sentinal; + if(2 < n >>> 0) return 1 - (1 - odd(n - 1 | 0)); + switch(n){ + case 0: + return 1; + case 1: + return 1 - (1 - odd(0)); + default: return 1 - (1 - odd(1)); + } }, odd = function(n){ - if(2 >= n >>> 0) - switch(n){ - case 0: - return sentinal; - case 1: - even(0); return sentinal; - default: even(1); return sentinal; - } - even(n - 1 | 0); - return sentinal; + if(2 < n >>> 0) return 1 - (1 - even(n - 1 | 0)); + switch(n){ + case 0: + return 0; + case 1: + return 1 - (1 - even(0)); + default: return 1 - (1 - even(1)); + } }; even(i); var _a_ = i + 1 | 0; @@ -460,36 +456,32 @@ let () = M.run () closures = function(i){ function even(n){ - if(2 >= n >>> 0) - switch(n){ - case 0: - var - f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; - delayed[1] = [0, f, delayed[1]]; - f(0); - return sentinal; - case 1: - odd(0); return sentinal; - default: odd(1); return sentinal; - } - odd(n - 1 | 0); - return sentinal; + if(2 < n >>> 0) return 1 - (1 - odd(n - 1 | 0)); + switch(n){ + case 0: + var + f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; + delayed[1] = [0, f, delayed[1]]; + f(0); + return 1; + case 1: + return 1 - (1 - odd(0)); + default: return 1 - (1 - odd(1)); + } } function odd(n){ - if(2 >= n >>> 0) - switch(n){ - case 0: - var - f = function(param){return caml_call2(Stdlib_Printf[2], _a_, i);}; - delayed[1] = [0, f, delayed[1]]; - f(0); - return sentinal; - case 1: - even(0); return sentinal; - default: even(1); return sentinal; - } - even(n - 1 | 0); - return sentinal; + if(2 < n >>> 0) return 1 - (1 - even(n - 1 | 0)); + switch(n){ + case 0: + var + f = function(param){return caml_call2(Stdlib_Printf[2], _a_, i);}; + delayed[1] = [0, f, delayed[1]]; + f(0); + return 0; + case 1: + return 1 - (1 - even(0)); + default: return 1 - (1 - even(1)); + } } var block = [0, even, odd]; return block; diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index 09eefa39a1..3606f717ce 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -4,6 +4,7 @@ let%expect_test "Eliminates unused functions from functor" = let program = (* Create two instances of Set functor so compiler can't inline one implementation. *) compile_and_parse_whole_program + ~flags: ["--enable"; "globaldeadcode"] {| module Int_set = Set.Make (Int);; module String_set = Set.Make (String);; @@ -49,9 +50,10 @@ let%expect_test "Eliminates unused functions from functor" = print_fun_decl program (Some "inter"); [%expect {| not found |}] -let%expect_test "Substitutes unused fields with undefined" = +let%expect_test "Omit unused fields" = let program = compile_and_parse + ~flags:["--enable"; "globaldeadcode"] {| let f b x = let t = if b then (1, 2, x) else (3, x, 4) in @@ -60,27 +62,11 @@ let%expect_test "Substitutes unused fields with undefined" = in print_int (fst (f true 1) + snd (f false 2)) |} in - (* Expect second field in each triple to be replaced by a sentinal variable. *) + (* Expect second field in each triple to be omitted. *) print_fun_decl program (Some "f"); [%expect {| function f(b, x){ var t = b ? [0, 1, , x] : [0, 3, , 4], v = t[3], u = t[1]; return [0, u, v]; } - //end |}]; - (* And that variable is defined as `undefined` *) - print_var_decl program "sentinal"; - [%expect {| - var sentinal = undefined; - //end |}] - -let%expect_test "Sets unused return value to undefined" = - let program = - compile_and_parse - {| - - |} - in print_fun_decl program (Some "f"); - [%expect {| not found |}]; - print_var_decl program "__"; - [%expect {| var __ = not found |}] \ No newline at end of file + //end |}]; \ No newline at end of file diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 8249793bfe..282f75cac5 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -1248,7 +1248,6 @@ : runtime.caml_call_gen(f, [a0]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Assert_failure = global_data.Assert_failure, @@ -1346,9 +1345,7 @@ _d_ = 0 <= o ? 1 : 0, _e_ = _d_ ? o < length(e) ? 1 : 0 : _d_, _f_ = 1 - _e_; - return _f_ - ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) - : _f_; + return _f_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _f_; /*<>*/ } function get_key(e, o){ /*<>*/ raise_if_invalid_offset @@ -4551,7 +4548,6 @@ : runtime.caml_call_gen(f, [a0, a1]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Uchar = global_data.Stdlib__Uchar, @@ -5381,17 +5377,13 @@ /*<>*/ } function unsafe_set_uint16_le(b, i, x){ /*<>*/ return Stdlib_Sys[11] - ? ( /*<>*/ caml_bytes_set16 - (b, i, caml_bswap16(x)), - sentinal) - : ( /*<>*/ caml_bytes_set16(b, i, x), sentinal); + ? /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)) + : /*<>*/ caml_bytes_set16(b, i, x); /*<>*/ } function unsafe_set_uint16_be(b, i, x){ /*<>*/ return Stdlib_Sys[11] - ? ( /*<>*/ caml_bytes_set16(b, i, x), sentinal) - : ( /*<>*/ caml_bytes_set16 - (b, i, caml_bswap16(x)), - sentinal); + ? /*<>*/ caml_bytes_set16(b, i, x) + : /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)); /*<>*/ } function set_int16_le(b, i, x){ /*<>*/ return Stdlib_Sys[11] @@ -5649,7 +5641,7 @@ function set_utf_8_uchar(b, i, u){ /*<>*/ function set(_i_, _h_, _g_){ /*<>*/ caml_bytes_unsafe_set(_i_, _h_, _g_); - return sentinal; + return 0; } /*<>*/ var /*<>*/ max = @@ -6863,7 +6855,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } /*<>*/ var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Assert_failure = global_data.Assert_failure, @@ -7561,16 +7552,13 @@ return 0; /*<>*/ } function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5){ - /*<>*/ isortto(srcofs, dst, dstofs, len); - /*<>*/ return sentinal; - } + /*<>*/ if(len <= 5) + /*<>*/ return isortto(srcofs, dst, dstofs, len); var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ merge - (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ return sentinal; + /*<>*/ return merge + (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -7718,7 +7706,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Stdlib_List = global_data.Stdlib__List, @@ -7884,9 +7871,7 @@ _an_ = (ofs + len | 0) < 0 ? 1 : 0, _al_ = _an_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); } - return _al_ - ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) - : _al_; + return _al_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _al_; /*<>*/ } function make(n, v){ /*<>*/ /*<>*/ var @@ -8427,16 +8412,13 @@ return 0; /*<>*/ } function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5){ - /*<>*/ isortto(srcofs, dst, dstofs, len); - /*<>*/ return sentinal; - } + /*<>*/ if(len <= 5) + /*<>*/ return isortto(srcofs, dst, dstofs, len); var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ merge - (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ return sentinal; + /*<>*/ return merge + (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -9416,7 +9398,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } /*<>*/ var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Obj = global_data.Stdlib__Obj, Stdlib_Array = global_data.Stdlib__Array, @@ -9469,7 +9450,7 @@ (Stdlib_Array[8], env[4], 0, new_end, 0, oldsize); env[4] = new_end; env[5] = newsize; - return sentinal; + return 0; /*<>*/ } function clear_parser(param){ /*<>*/ /*<>*/ caml_call4 @@ -12008,7 +11989,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib_Sys = global_data.Stdlib__Sys, @@ -12104,7 +12084,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_Bytes[11], b[1][1], 0, new_buffer, 0, b[2]); b[1] = [0, new_buffer, new_len[1]]; - return sentinal; + return 0; } new_len[1] = 2 * new_len[1] | 0; } @@ -12787,7 +12767,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Mutex = global_data.Stdlib__Mutex, Stdlib_Condition = global_data.Stdlib__Condition, @@ -12806,8 +12785,8 @@ function create_dls(param){ /*<>*/ /*<>*/ var st = /*<>*/ caml_make_vect(8, unique_value); - /*<>*/ /*<>*/ caml_domain_dls_set(st); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_domain_dls_set + (st); /*<>*/ } /*<>*/ create_dls(0); /*<>*/ var @@ -12896,7 +12875,7 @@ /*<>*/ first_spawn_function = [0, function(param){ - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }]; function before_first_spawn(f){ /*<>*/ if @@ -13132,7 +13111,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$9 = "%{", cst$10 = "%}", @@ -13459,14 +13437,14 @@ /*<>*/ var str_ind = c >>> 3 | 0, mask = 1 << (c & 7), - /*<>*/ _dS_ = + /*<>*/ _dU_ = /*<>*/ runtime.caml_bytes_get (char_set, str_ind) | mask; /*<>*/ return /*<>*/ caml_bytes_set (char_set, str_ind, - /*<>*/ caml_call1(Stdlib[29], _dS_)); + /*<>*/ caml_call1(Stdlib[29], _dU_)); /*<>*/ } function freeze_char_set(char_set){ /*<>*/ return /*<>*/ caml_call1 @@ -13478,19 +13456,19 @@ i = 0; for(;;){ /*<>*/ /*<>*/ var - _dQ_ = + _dS_ = /*<>*/ caml_string_get(char_set, i) ^ 255; /*<>*/ /*<>*/ caml_bytes_set (char_set$0, i, - /*<>*/ caml_call1(Stdlib[29], _dQ_)); + /*<>*/ caml_call1(Stdlib[29], _dS_)); /*<>*/ /*<>*/ var - _dR_ = i + 1 | 0; + _dT_ = i + 1 | 0; if(31 === i) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], char_set$0); - var i = _dR_; + var i = _dT_; } /*<>*/ } function is_in_char_set(char_set, c){ @@ -13550,11 +13528,11 @@ case 6: var prec_opt = ign[2], pad_opt$5 = ign[1]; if(prec_opt) - var ndec = prec_opt[1], _dP_ = [0, ndec]; + var ndec = prec_opt[1], _dR_ = [0, ndec]; else - var _dP_ = 0; + var _dR_ = 0; /*<>*/ return [0, - [8, _a_, pad_of_pad_opt(pad_opt$5), _dP_, fmt]]; + [8, _a_, pad_of_pad_opt(pad_opt$5), _dR_, fmt]]; case 7: var pad_opt$6 = ign[1]; /*<>*/ return [0, @@ -13587,8 +13565,9 @@ function buffer_check_size(buf, overhead){ /*<>*/ var len = runtime.caml_ml_bytes_length(buf[2]), - min_len = buf[1] + overhead | 0; - if(len < min_len){ + min_len = buf[1] + overhead | 0, + _dP_ = len < min_len ? 1 : 0; + if(_dP_){ /*<>*/ var /*<>*/ new_len = /*<>*/ caml_call2 @@ -13598,15 +13577,18 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_Bytes[11], buf[2], 0, new_str, 0, len); buf[2] = new_str; + var _dQ_ = 0; } - return sentinal; + else + var _dQ_ = _dP_; + return _dQ_; /*<>*/ } function buffer_add_char(buf, c){ /*<>*/ buffer_check_size(buf, 1); /*<>*/ /*<>*/ caml_bytes_set (buf[2], buf[1], c); buf[1] = buf[1] + 1 | 0; - return sentinal; + return 0; /*<>*/ } function buffer_add_string(buf, s){ /*<>*/ var @@ -13615,7 +13597,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_String[48], s, 0, buf[2], buf[1], str_len); buf[1] = buf[1] + str_len | 0; - return sentinal; + return 0; /*<>*/ } function buffer_contents(buf){ /*<>*/ return caml_call3 @@ -13671,74 +13653,68 @@ function bprint_padty(buf, padty){ /*<>*/ switch(padty){ case 0: - /*<>*/ buffer_add_char(buf, 45); - /*<>*/ return sentinal; + /*<>*/ return buffer_add_char(buf, 45); case 1: - /*<>*/ return sentinal; + /*<>*/ return 0; default: - /*<>*/ buffer_add_char(buf, 48); - /*<>*/ return sentinal; + /*<>*/ return buffer_add_char(buf, 48); } /*<>*/ } function bprint_ignored_flag(buf, ign_flag){ /*<>*/ return ign_flag - ? (buffer_add_char(buf, 95), sentinal) + ? buffer_add_char(buf, 95) : ign_flag; /*<>*/ } function bprint_pad_opt(buf, pad_opt){ /*<>*/ if(! pad_opt) - /*<>*/ return sentinal; + /*<>*/ return 0; var width = pad_opt[1]; - /*<>*/ buffer_add_string - (buf, - /*<>*/ caml_call1(Stdlib_Int[12], width)); - /*<>*/ return sentinal; + /*<>*/ return buffer_add_string + (buf, + /*<>*/ caml_call1 + (Stdlib_Int[12], width)); /*<>*/ } function bprint_padding(buf, pad){ /*<>*/ if(typeof pad === "number") - /*<>*/ return sentinal; + /*<>*/ return 0; if(0 === pad[0]){ var n = pad[2], padty = pad[1]; /*<>*/ bprint_padty(buf, padty); - /*<>*/ buffer_add_string - (buf, - /*<>*/ caml_call1(Stdlib_Int[12], n)); - /*<>*/ return sentinal; + /*<>*/ return buffer_add_string + (buf, + /*<>*/ caml_call1 + (Stdlib_Int[12], n)); } var padty$0 = pad[1]; /*<>*/ bprint_padty(buf, padty$0); - /*<>*/ buffer_add_char(buf, 42); - /*<>*/ return sentinal; + /*<>*/ return buffer_add_char(buf, 42); /*<>*/ } function bprint_precision(buf, prec){ /*<>*/ if(typeof prec === "number") - return prec ? (buffer_add_string(buf, cst), sentinal) : sentinal; + return prec ? buffer_add_string(buf, cst) : 0; var n = prec[1]; /*<>*/ buffer_add_char(buf, 46); - /*<>*/ buffer_add_string - (buf, - /*<>*/ caml_call1(Stdlib_Int[12], n)); - /*<>*/ return sentinal; + /*<>*/ return buffer_add_string + (buf, + /*<>*/ caml_call1 + (Stdlib_Int[12], n)); /*<>*/ } function bprint_iconv_flag(buf, iconv){ /*<>*/ switch(iconv){ case 1: case 4: - /*<>*/ buffer_add_char(buf, 43); - /*<>*/ return sentinal; + /*<>*/ return buffer_add_char(buf, 43); case 2: case 5: - /*<>*/ buffer_add_char(buf, 32); - /*<>*/ return sentinal; + /*<>*/ return buffer_add_char(buf, 32); case 7: case 9: case 11: case 13: case 14: case 15: - /*<>*/ buffer_add_char(buf, 35); - /*<>*/ return sentinal; - default: /*<>*/ return sentinal; + /*<>*/ return buffer_add_char(buf, 35); + default: /*<>*/ return 0; } /*<>*/ } function bprint_altint_fmt(buf, ign_flag, iconv, pad, prec, c){ @@ -13748,9 +13724,8 @@ /*<>*/ bprint_padding(buf, pad); /*<>*/ bprint_precision(buf, prec); /*<>*/ buffer_add_char(buf, c); - /*<>*/ buffer_add_char - (buf, char_of_iconv(iconv)); - /*<>*/ return sentinal; + /*<>*/ return buffer_add_char + (buf, char_of_iconv(iconv)); /*<>*/ } function bprint_fconv_flag(buf, fconv){ /*<>*/ switch(fconv[1]){ @@ -13759,7 +13734,7 @@ /*<>*/ buffer_add_char(buf, 43); break; default: /*<>*/ buffer_add_char(buf, 32); } - return 8 <= fconv[2] ? (buffer_add_char(buf, 35), sentinal) : sentinal; + return 8 <= fconv[2] ? buffer_add_char(buf, 35) : 0; /*<>*/ } function string_of_formatting_lit(formatting_lit){ /*<>*/ if @@ -13798,8 +13773,8 @@ /*<>*/ } function bprint_char_literal(buf, chr){ /*<>*/ return 37 === chr - ? (buffer_add_string(buf, cst$8), sentinal) - : (buffer_add_char(buf, chr), sentinal); + ? buffer_add_string(buf, cst$8) + : buffer_add_char(buf, chr); /*<>*/ } function bprint_string_literal(buf, str){ /*<>*/ var @@ -13816,13 +13791,13 @@ var i = _dN_; } } - return sentinal; + return 0; /*<>*/ } function bprint_fmtty(buf, fmtty){ /*<>*/ var fmtty$0 = fmtty; /*<>*/ for(;;){ if(typeof fmtty$0 === "number") - /*<>*/ return sentinal; + /*<>*/ return 0; switch(fmtty$0[0]){ case 0: var fmtty$1 = fmtty$0[1]; @@ -13920,7 +13895,7 @@ ign_flag$0 = ign_flag; /*<>*/ for(;;){ if(typeof fmt$0 === "number") - /*<>*/ return sentinal; + /*<>*/ return 0; switch(fmt$0[0]){ case 0: var rest = fmt$0[1]; @@ -14124,17 +14099,11 @@ /*<>*/ caml_call1 (Stdlib[29], i); return 37 === c - ? (buffer_add_char - (buf, 37), - buffer_add_char(buf, 37), - sentinal) + ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37)) : 64 === c - ? (buffer_add_char - (buf, 37), - buffer_add_char(buf, 64), - sentinal) - : (buffer_add_char(buf, c), sentinal); + ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64)) + : buffer_add_char(buf, c); /*<>*/ }; /*<>*/ buffer_add_char(buf, 91); /*<>*/ var @@ -14414,12 +14383,12 @@ _di_ = function(param){ /*<>*/ af(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _di_, ed, @@ -14435,12 +14404,12 @@ _dj_ = function(param){ /*<>*/ af$0(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$0(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dj_, ed$0, @@ -14456,12 +14425,12 @@ _dk_ = function(param){ /*<>*/ af$1(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$1(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dk_, ed$1, @@ -14477,12 +14446,12 @@ _dl_ = function(param){ /*<>*/ af$2(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$2(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dl_, ed$2, @@ -14498,12 +14467,12 @@ _dm_ = function(param){ /*<>*/ af$3(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$3(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dm_, ed$3, @@ -14519,12 +14488,12 @@ _dn_ = function(param){ /*<>*/ af$4(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$4(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dn_, ed$4, @@ -14540,12 +14509,12 @@ _do_ = function(param){ /*<>*/ af$5(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$5(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _do_, ed$5, @@ -14561,12 +14530,12 @@ _dp_ = function(param){ /*<>*/ af$6(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$6(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dp_, ed$6, @@ -14582,12 +14551,12 @@ _dq_ = function(param){ /*<>*/ af$7(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$7(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dq_, ed$7, @@ -14612,25 +14581,25 @@ function(param){ /*<>*/ jd(0); /*<>*/ de$8(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _ds_ = function(param){ /*<>*/ ed$8(0); /*<>*/ dj(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dt_ = function(param){ /*<>*/ ga(0); /*<>*/ af$8(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$8(0); /*<>*/ ag(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dt_, _ds_, @@ -14647,12 +14616,12 @@ _du_ = function(param){ /*<>*/ af$9(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$9(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _du_, ed$9, @@ -14669,12 +14638,12 @@ _dv_ = function(param){ /*<>*/ af$10(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$10(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dv_, ed$10, @@ -14691,12 +14660,12 @@ _dw_ = function(param){ /*<>*/ af$11(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$11(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dw_, ed$11, @@ -14713,22 +14682,22 @@ /*<>*/ _dx_ = function(param){ /*<>*/ de$12(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dy_ = function(param){ /*<>*/ ed$12(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dz_ = function(param){ /*<>*/ af$12(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$12(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dz_, _dy_, @@ -14745,39 +14714,39 @@ /*<>*/ _dA_ = function(param){ /*<>*/ de$13(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dB_ = function(param){ /*<>*/ ed$13(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dC_ = function(param){ /*<>*/ af$13(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$13(0); - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dC_, _dB_, _dA_]; } /*<>*/ function _df_(param){ - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ } function _dg_(param){ - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ } function _dh_(param){ - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ } /*<>*/ return [0, function(param){ - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, _dh_, _dg_, @@ -16422,7 +16391,7 @@ /*<>*/ /*<>*/ caml_bytes_set (buf, pos[1], c); pos[1]++; - return sentinal; + return 0; /*<>*/ } /*<>*/ var /*<>*/ left = @@ -18052,9 +18021,9 @@ /*<>*/ } function make_padprec_fmt_ebb(pad, prec, fmt){ /*<>*/ if(typeof prec === "number") - var match = prec ? [0, 1] : [0, 0]; + var match = prec ? [0, 1, fmt] : [0, 0, fmt]; else - var p = prec[1], match = [0, [0, p]]; + var p = prec[1], match = [0, [0, p], fmt]; var prec$0 = match[1]; /*<>*/ if(typeof pad === "number") /*<>*/ return [0, 0, prec$0, fmt]; @@ -18076,9 +18045,8 @@ /*<>*/ } /*<>*/ function unexpected_end_of_format (end_ind){ - /*<>*/ invalid_format_message - (end_ind, cst_unexpected_end_of_format); - /*<>*/ return sentinal; + /*<>*/ return invalid_format_message + (end_ind, cst_unexpected_end_of_format); /*<>*/ } function invalid_format_without(str_ind, c, s){ /*<>*/ return /*<>*/ caml_call4 @@ -18589,9 +18557,8 @@ create_char_set(0), add_char = function(c){ - /*<>*/ add_in_char_set - (char_set, c); - /*<>*/ return sentinal; + /*<>*/ return add_in_char_set + (char_set, c); /*<>*/ }, add_range = function(c$0, c){ @@ -18608,7 +18575,7 @@ var i = _bd_; } } - return sentinal; + return 0; /*<>*/ }, fail_single_percent = function(str_ind){ @@ -19349,7 +19316,7 @@ (failwith_message(_C_), str, str_ind, _am_); } flag[1] = 1; - return sentinal; + return 0; /*<>*/ } var str_ind$0 = str_ind; /*<>*/ for(;;){ @@ -20056,7 +20023,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5]); } /*<>*/ var - sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$6 = "\n", cst$3 = cst$7, @@ -20217,9 +20183,8 @@ /*<>*/ return /*<>*/ caml_call5 (Stdlib_Printf[5], buf, _b_, key, _av_, doc); } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _at_, _as_); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[17], _at_, _as_); /*<>*/ } function usage_string(speclist, errmsg){ /*<>*/ /*<>*/ var @@ -20357,7 +20322,7 @@ function(s, follow){ function no_arg(param){ /*<>*/ if(! follow) - /*<>*/ return sentinal; + /*<>*/ return 0; var arg = follow[1]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [1, s, arg, cst_no_argument]], 1); @@ -20836,9 +20801,8 @@ else var word$0 = word; words[1] = [0, word$0, words[1]]; - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Buffer[8], buf); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Buffer[8], buf); /*<>*/ } /*<>*/ try{ for(;;){ @@ -21552,7 +21516,6 @@ : runtime.caml_call_gen(f, [a0, a1]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Printexc = global_data.Stdlib__Printexc, Stdlib = global_data.Stdlib, @@ -21575,19 +21538,20 @@ /*<>*/ return 0; /*<>*/ var exn = param[2], - /*<>*/ _b_ = + /*<>*/ _c_ = /*<>*/ caml_call1(Stdlib_Printexc[1], exn); /*<>*/ return [0, /*<>*/ caml_call2 - (Stdlib[28], cst_Fun_Finally_raised, _b_)]; + (Stdlib[28], cst_Fun_Finally_raised, _c_)]; /*<>*/ } /*<>*/ /*<>*/ caml_call1 (Stdlib_Printexc[9], _a_); function protect(finally$0, work){ function finally_no_exn(param){ /*<>*/ try{ - /*<>*/ /*<>*/ caml_call1(finally$0, 0); - /*<>*/ return sentinal; + /*<>*/ /*<>*/ var + _b_ = /*<>*/ caml_call1(finally$0, 0); + /*<>*/ return _b_; } catch(e$0){ /*<>*/ var @@ -22045,7 +22009,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Array = global_data.Stdlib__Array, @@ -22104,11 +22067,9 @@ /*<>*/ c_layout = 0, fortran_layout = 1; function cloop(arr, idx, f, col, max){ - /*<>*/ if(col === idx.length - 1){ - /*<>*/ /*<>*/ caml_ba_set_generic - (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ return sentinal; - } + /*<>*/ if(col === idx.length - 1) + /*<>*/ return /*<>*/ caml_ba_set_generic + (arr, idx, /*<>*/ caml_call1(f, idx)); /*<>*/ var /*<>*/ _am_ = caml_check_bound(max, col)[1 + col] - 1 | 0, @@ -22124,14 +22085,12 @@ var j = _an_; } } - return sentinal; + return 0; /*<>*/ } function floop(arr, idx, f, col, max){ - /*<>*/ if(0 > col){ - /*<>*/ /*<>*/ caml_ba_set_generic - (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ return sentinal; - } + /*<>*/ if(0 > col) + /*<>*/ return /*<>*/ caml_ba_set_generic + (arr, idx, /*<>*/ caml_call1(f, idx)); /*<>*/ var /*<>*/ _aj_ = caml_check_bound(max, col)[1 + col], /*<>*/ _ai_ = 1; @@ -22146,7 +22105,7 @@ var j = _ak_; } } - return sentinal; + return 0; /*<>*/ } function init(kind, layout, dims, f){ /*<>*/ var @@ -24171,7 +24130,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Sys = global_data.Stdlib__Sys, @@ -24204,9 +24162,7 @@ _T_ = 0 <= o ? 1 : 0, _U_ = _T_ ? o < length(e) ? 1 : 0 : _T_, _V_ = 1 - _U_; - return _V_ - ? ( /*<>*/ caml_call1(Stdlib[1], msg), sentinal) - : _V_; + return _V_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _V_; /*<>*/ } function set(e, o, x){ /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); @@ -24809,7 +24765,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$14 = ".", cst$11 = cst$15, @@ -24857,27 +24812,25 @@ /*<>*/ } var pp_infinity = 1000000010; function pp_output_string(state, s){ - /*<>*/ caml_call3 - (state[17], s, 0, caml_ml_string_length(s)); - return sentinal; + /*<>*/ return caml_call3 + (state[17], s, 0, caml_ml_string_length(s)); /*<>*/ } function pp_output_newline(state){ - /*<>*/ /*<>*/ caml_call1 - (state[19], 0); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call1 + (state[19], 0); /*<>*/ } function format_pp_text(state, size, text){ /*<>*/ state[9] = state[9] - size | 0; /*<>*/ pp_output_string(state, text); state[11] = 0; - return sentinal; + return 0; /*<>*/ } function format_string(state, s){ /*<>*/ /*<>*/ var - _bN_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); - /*<>*/ return _bN_ - ? (format_pp_text(state, caml_ml_string_length(s), s), sentinal) - : _bN_; + _bQ_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); + /*<>*/ return _bQ_ + ? format_pp_text(state, caml_ml_string_length(s), s) + : _bQ_; /*<>*/ } function break_new_line(state, param, width){ var after = param[3], offset = param[2], before = param[1]; @@ -24893,12 +24846,10 @@ var n = state[10]; /*<>*/ /*<>*/ caml_call1 (state[21], n); - /*<>*/ format_string(state, after); - /*<>*/ return sentinal; + /*<>*/ return format_string(state, after); } function break_line(state, width){ - /*<>*/ break_new_line(state, _a_, width); - /*<>*/ return sentinal; + /*<>*/ return break_new_line(state, _a_, width); /*<>*/ } function break_same_line(state, param){ var after = param[3], width = param[2], before = param[1]; @@ -24906,8 +24857,7 @@ state[9] = state[9] - width | 0; /*<>*/ /*<>*/ caml_call1 (state[20], width); - /*<>*/ format_string(state, after); - /*<>*/ return sentinal; + /*<>*/ return format_string(state, after); } function format_pp_token(state, size$0, param){ /*<>*/ if(typeof param === "number") @@ -24916,7 +24866,7 @@ /*<>*/ /*<>*/ var match$3 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$3) /*<>*/ return sentinal; + if(! match$3) /*<>*/ return 0; /*<>*/ var tabs = match$3[1][1], /*<>*/ add_tab = @@ -24929,54 +24879,49 @@ : [0, x, add_tab(n, l)]; }; tabs[1] = add_tab(state[6] - state[9] | 0, tabs[1]); - return sentinal; + return 0; case 1: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[2]); - /*<>*/ return sentinal; + /*<>*/ return 0; case 2: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[3]); - /*<>*/ return sentinal; + /*<>*/ return 0; case 3: /*<>*/ /*<>*/ var match$4 = /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(match$4){ - var width$0 = match$4[1][2]; - /*<>*/ break_line(state, width$0); - /*<>*/ return sentinal; - } - /*<>*/ pp_output_newline(state); - /*<>*/ return sentinal; + if(! match$4) + /*<>*/ return pp_output_newline(state); + var width$0 = match$4[1][2]; + /*<>*/ return break_line(state, width$0); case 4: - var _bL_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; - if(! _bL_) return _bL_; + var _bO_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; + if(! _bO_) return _bO_; /*<>*/ /*<>*/ var match$1 = /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); - if(! match$1) /*<>*/ return sentinal; + if(! match$1) /*<>*/ return 0; var match$2 = match$1[1], size = match$2[1], length = match$2[3]; state[12] = state[12] - length | 0; state[9] = state[9] + size | 0; - return sentinal; + return 0; default: /*<>*/ /*<>*/ var match$5 = /*<>*/ caml_call1(Stdlib_Stack[5], state[5]); - if(! match$5) /*<>*/ return sentinal; + if(! match$5) /*<>*/ return 0; /*<>*/ var tag_name = match$5[1], /*<>*/ marker = /*<>*/ caml_call1(state[25], tag_name); - /*<>*/ pp_output_string(state, marker); - /*<>*/ return sentinal; + /*<>*/ return pp_output_string(state, marker); } switch(param[0]){ case 0: var s = param[1]; - /*<>*/ format_pp_text(state, size$0, s); - /*<>*/ return sentinal; + /*<>*/ return format_pp_text(state, size$0, s); case 1: /*<>*/ var breaks = param[2], @@ -24985,32 +24930,31 @@ before = breaks[1], /*<>*/ match$6 = /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(! match$6) /*<>*/ return sentinal; + if(! match$6) /*<>*/ return 0; var match$7 = match$6[1], width$1 = match$7[2], box_type$0 = match$7[1]; /*<>*/ switch(box_type$0){ case 0: - /*<>*/ break_same_line(state, fits); - /*<>*/ return sentinal; + /*<>*/ return break_same_line(state, fits); case 1: - /*<>*/ break_new_line(state, breaks, width$1); - /*<>*/ return sentinal; + /*<>*/ return break_new_line + (state, breaks, width$1); case 2: - /*<>*/ break_new_line(state, breaks, width$1); - /*<>*/ return sentinal; + /*<>*/ return break_new_line + (state, breaks, width$1); case 3: return state[9] < (size$0 + caml_ml_string_length(before) | 0) - ? (break_new_line(state, breaks, width$1), sentinal) - : (break_same_line(state, fits), sentinal); + ? break_new_line(state, breaks, width$1) + : break_same_line(state, fits); case 4: return state[11] - ? (break_same_line(state, fits), sentinal) + ? break_same_line(state, fits) : state [9] < (size$0 + caml_ml_string_length(before) | 0) - ? (break_new_line(state, breaks, width$1), sentinal) + ? break_new_line(state, breaks, width$1) : ((state [6] - width$1 @@ -25018,11 +24962,10 @@ + off | 0) < state[10] - ? (break_new_line(state, breaks, width$1), sentinal) - : (break_same_line(state, fits), sentinal); + ? break_new_line(state, breaks, width$1) + : break_same_line(state, fits); default: - /*<>*/ break_same_line(state, fits); - /*<>*/ return sentinal; + /*<>*/ return break_same_line(state, fits); } case 2: /*<>*/ var @@ -25031,7 +24974,7 @@ insertion_point = state[6] - state[9] | 0, /*<>*/ match$8 = /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$8) /*<>*/ return sentinal; + if(! match$8) /*<>*/ return 0; /*<>*/ var tabs$0 = match$8[1][1], /*<>*/ match$9 = tabs$0[1]; @@ -25041,11 +24984,11 @@ if(param$0){ var tail = param$0[2], head = param$0[1]; if(insertion_point > head){var param$0 = tail; continue;} - var _bM_ = head; + var _bP_ = head; } else - var _bM_ = first; - var tab = _bM_; + var _bP_ = first; + var tab = _bP_; break; } } @@ -25053,12 +24996,9 @@ var tab = insertion_point; var offset = tab - insertion_point | 0; /*<>*/ return 0 <= offset - ? (break_same_line - (state, [0, cst$0, offset + n | 0, cst]), - sentinal) - : (break_new_line - (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]), - sentinal); + ? break_same_line(state, [0, cst$0, offset + n | 0, cst]) + : break_new_line + (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]); case 3: var ty = param[2], @@ -25080,22 +25020,19 @@ width$2 = state[9] - off$1 | 0, /*<>*/ box_type$1 = 1 === ty ? 1 : state[9] < size$0 ? ty : 5; - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); case 4: var tbox = param[1]; - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[3], tbox, state[3]); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call2 + (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); - caml_call2(Stdlib_Stack[3], tag_name$0, state[5]); - return sentinal; + return caml_call2(Stdlib_Stack[3], tag_name$0, state[5]); } } function advance_left(state){ @@ -25109,10 +25046,10 @@ length = match$0[3], token = match$0[2], pending_count = state[13] - state[12] | 0, - /*<>*/ _bJ_ = 0 <= size ? 1 : 0, - /*<>*/ _bK_ = - _bJ_ || (state[9] <= pending_count ? 1 : 0); - if(! _bK_) /*<>*/ return _bK_; + /*<>*/ _bM_ = 0 <= size ? 1 : 0, + /*<>*/ _bN_ = + _bM_ || (state[9] <= pending_count ? 1 : 0); + if(! _bN_) /*<>*/ return _bN_; /*<>*/ /*<>*/ caml_call1 (Stdlib_Queue[5], state[28]); /*<>*/ /*<>*/ var @@ -25134,43 +25071,48 @@ (Stdlib_Stack[8], stack); /*<>*/ /*<>*/ var queue_elem = [0, unknown, _b_, 0]; - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[3], [0, -1, queue_elem], stack); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Stack[3], [0, -1, queue_elem], stack); /*<>*/ } function set_size(state, ty){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[7], state[1]); - if(! match) /*<>*/ return sentinal; + if(! match) /*<>*/ return 0; /*<>*/ var match$0 = match[1], queue_elem = match$0[2], left_total = match$0[1], /*<>*/ size = queue_elem[1]; - if(left_total < state[12]){ - initialize_scan_stack(state[1]); - return sentinal; - } + if(left_total < state[12]) return initialize_scan_stack(state[1]); var _bI_ = queue_elem[2]; if(typeof _bI_ !== "number") switch(_bI_[0]){ case 3: - if(1 - ty){ - queue_elem[1] = state[13] + size | 0; - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[5], state[1]); - } - /*<>*/ return sentinal; + var + _bK_ = 1 - ty, + _bL_ = + _bK_ + ? (queue_elem + [1] + = state[13] + size | 0, + /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), + 0) + : _bK_; + /*<>*/ return _bL_; case 1: case 2: - if(ty){ - queue_elem[1] = state[13] + size | 0; - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[5], state[1]); - } - /*<>*/ return sentinal; + var + _bJ_ = + ty + ? (queue_elem + [1] + = state[13] + size | 0, + /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), + 0) + : ty; + /*<>*/ return _bJ_; } - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ } function scan_push(state, b, token){ /*<>*/ pp_enqueue(state, token); @@ -25303,8 +25245,7 @@ state[13] = pp_infinity; /*<>*/ advance_left(state); if(b) /*<>*/ pp_output_newline(state); - /*<>*/ pp_rinit(state); - /*<>*/ return sentinal; + /*<>*/ return pp_rinit(state); } /*<>*/ pp_close_box(state, 0); } @@ -27009,7 +26950,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$3 = cst$5, cst$4 = cst$5, @@ -28177,19 +28117,14 @@ var i$1 = i$0 - 1 | 0, i$0 = i$1; } /*<>*/ } - if(! scan_indic){ - /*<>*/ scan_chars(width, -1); - /*<>*/ return sentinal; - } + if(! scan_indic) /*<>*/ return scan_chars(width, -1); var c = scan_indic[1]; /*<>*/ scan_chars(width, c); /*<>*/ /*<>*/ var _Y_ = 1 - ib[1]; if(! _Y_) /*<>*/ return _Y_; /*<>*/ /*<>*/ var ci = peek_char(ib); - return c === ci - ? (invalidate_current_char(ib), sentinal) - : (character_mismatch(c, ci), sentinal); + return c === ci ? invalidate_current_char(ib) : character_mismatch(c, ci); /*<>*/ } function scanf_bad_input(ib, x){ /*<>*/ if(x[1] === Scan_failure) @@ -28515,8 +28450,8 @@ /*<>*/ /*<>*/ var c = check_next_char_for_char(width, ib); return 39 === c - ? (ignore_char(width, ib), sentinal) - : (character_mismatch(39, c), sentinal); + ? ignore_char(width, ib) + : character_mismatch(39, c); /*<>*/ }, /*<>*/ c = checked_peek_char(ib); if(39 === c){ @@ -30489,7 +30424,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), Stdlib_List = global_data.Stdlib__List, Stdlib = global_data.Stdlib, @@ -30625,14 +30559,14 @@ insert_bucket = function(param){ /*<>*/ if(! param) - /*<>*/ return sentinal; + /*<>*/ return 0; var rest = param[3], data = param[2], hkey = param[1]; /*<>*/ insert_bucket(rest); /*<>*/ /*<>*/ var nidx = key_index(h, hkey); /*<>*/ ndata[1 + nidx] = [0, hkey, data, caml_check_bound(ndata, nidx)[1 + nidx]]; - /*<>*/ return sentinal; + /*<>*/ return 0; /*<>*/ }, /*<>*/ _ay_ = osize - 1 | 0, /*<>*/ _ax_ = 0; @@ -30973,9 +30907,8 @@ (Stdlib_Obj[24][3], t, 0); /*<>*/ } function set_key(t, k){ - /*<>*/ /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 0, k); /*<>*/ } function check_key(t){ /*<>*/ return /*<>*/ caml_call2 @@ -31154,18 +31087,16 @@ (Stdlib_Obj[24][3], t, 0); /*<>*/ } function set_key1(t, k){ - /*<>*/ /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 0, k); /*<>*/ } function get_key2(t){ /*<>*/ return /*<>*/ caml_call2 (Stdlib_Obj[24][3], t, 1); /*<>*/ } function set_key2(t, k){ - /*<>*/ /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 1, k); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 1, k); /*<>*/ } function get_data$0(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31387,9 +31318,8 @@ (Stdlib_Obj[24][3], t, n); /*<>*/ } function set_key$0(t, n, k){ - /*<>*/ /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, n, k); - /*<>*/ return sentinal; + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, n, k); /*<>*/ } function get_data$1(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31762,6 +31692,8 @@ caml_string_get = runtime.caml_string_get, caml_string_notequal = runtime.caml_string_notequal, caml_sys_getenv = runtime.caml_sys_getenv, + 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 @@ -31784,7 +31716,6 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var - sentinal = undefined, global_data = runtime.caml_get_global_data(), cst$18 = cst$19, cst$17 = cst$19, @@ -31920,39 +31851,39 @@ /*<>*/ } function is_relative(n){ /*<>*/ var - _aH_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _aI_ = - _aH_ + _aK_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _aL_ = + _aK_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - return _aI_; + return _aL_; /*<>*/ } function is_implicit(n){ /*<>*/ /*<>*/ var - _aC_ = is_relative(n); - /*<>*/ if(_aC_){ + _aF_ = is_relative(n); + /*<>*/ if(_aF_){ var - _aD_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aE_ = - _aD_ + _aG_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aH_ = + _aG_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_aE_) + /*<>*/ if(_aH_) var - _aF_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aG_ = - _aF_ + _aI_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aJ_ = + _aI_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 3), cst$28); else - var _aG_ = _aE_; + var _aJ_ = _aH_; } else - var _aG_ = _aC_; - /*<>*/ return _aG_; + var _aJ_ = _aF_; + /*<>*/ return _aJ_; /*<>*/ } function check_suffix(name, suff){ /*<>*/ return /*<>*/ caml_call2 @@ -31980,8 +31911,8 @@ /*<>*/ caml_sys_getenv("TMPDIR"), temp_dir_name = _k_; } - catch(_aB_){ - var _a_ = caml_wrap_exception(_aB_); + catch(_aE_){ + var _a_ = caml_wrap_exception(_aE_); if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); var temp_dir_name = cst_tmp; } @@ -31993,10 +31924,10 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 39); /*<>*/ var - _ay_ = l - 1 | 0, - /*<>*/ _ax_ = 0; - if(_ay_ >= 0){ - var i = _ax_; + _aB_ = l - 1 | 0, + /*<>*/ _aA_ = 0; + if(_aB_ >= 0){ + var i = _aA_; for(;;){ /*<>*/ if (39 === /*<>*/ caml_string_get(s, i)) @@ -32004,14 +31935,14 @@ (Stdlib_Buffer[16], b, quotequote); else{ /*<>*/ /*<>*/ var - _aA_ = /*<>*/ caml_string_get(s, i); + _aD_ = /*<>*/ caml_string_get(s, i); /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, _aA_); + (Stdlib_Buffer[12], b, _aD_); } /*<>*/ /*<>*/ var - _az_ = i + 1 | 0; - if(_ay_ === i) break; - var i = _az_; + _aC_ = i + 1 | 0; + if(_aB_ === i) break; + var i = _aC_; } } /*<>*/ /*<>*/ caml_call2 @@ -32024,47 +31955,47 @@ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _am_ = cst_2_1; + var _ap_ = cst_2_1; else /*<>*/ var - /*<>*/ _aw_ = quote(f), - _am_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _aw_); - var _an_ = _am_; + /*<>*/ _az_ = quote(f), + _ap_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _az_); + var _aq_ = _ap_; } else - var _an_ = cst$4; + var _aq_ = cst$4; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _ao_ = quote(f$0), - _ap_ = /*<>*/ caml_call2(Stdlib[28], cst, _ao_); + /*<>*/ _ar_ = quote(f$0), + _as_ = /*<>*/ caml_call2(Stdlib[28], cst, _ar_); else - var _ap_ = cst$3; + var _as_ = cst$3; /*<>*/ /*<>*/ var - _aq_ = /*<>*/ caml_call2(Stdlib[28], _ap_, _an_); + _at_ = /*<>*/ caml_call2(Stdlib[28], _as_, _aq_); if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _ar_ = quote(f$1), - _as_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _ar_); + /*<>*/ _au_ = quote(f$1), + _av_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _au_); else - var _as_ = cst$2; + var _av_ = cst$2; /*<>*/ var - /*<>*/ _at_ = - /*<>*/ caml_call2(Stdlib[28], _as_, _aq_), - /*<>*/ _au_ = + /*<>*/ _aw_ = + /*<>*/ caml_call2(Stdlib[28], _av_, _at_), + /*<>*/ _ax_ = /*<>*/ caml_call2 (Stdlib_List[19], quote, [0, cmd, args]), - /*<>*/ _av_ = - /*<>*/ caml_call2(Stdlib_String[6], cst$1, _au_); + /*<>*/ _ay_ = + /*<>*/ caml_call2(Stdlib_String[6], cst$1, _ax_); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _av_, _at_); + (Stdlib[28], _ay_, _aw_); /*<>*/ } - /*<>*/ function basename(_al_){ - /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _al_); + /*<>*/ function basename(_ao_){ + /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _ao_); } - /*<>*/ function dirname(_ak_){ - /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _ak_); + /*<>*/ function dirname(_an_){ + /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _an_); } /*<>*/ /*<>*/ var Unix = @@ -32087,96 +32018,96 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _ah_ = 47 === c ? 1 : 0; - if(_ah_) - var _ai_ = _ah_; + _ak_ = 47 === c ? 1 : 0; + if(_ak_) + var _al_ = _ak_; else - var _aj_ = 92 === c ? 1 : 0, _ai_ = _aj_ || (58 === c ? 1 : 0); - return _ai_; + var _am_ = 92 === c ? 1 : 0, _al_ = _am_ || (58 === c ? 1 : 0); + return _al_; /*<>*/ } function is_relative$0(n){ /*<>*/ var - _ab_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ac_ = - _ab_ + _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _af_ = + _ae_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ac_){ + if(_af_){ var - _ad_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ae_ = - _ad_ + _ag_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ah_ = + _ag_ || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ae_) + if(_ah_) var - _af_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _ag_ = - _af_ + _ai_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aj_ = + _ai_ || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else - var _ag_ = _ae_; + var _aj_ = _ah_; } else - var _ag_ = _ac_; - return _ag_; + var _aj_ = _af_; + return _aj_; /*<>*/ } function is_implicit$0(n){ /*<>*/ /*<>*/ var - _U_ = is_relative$0(n); - /*<>*/ if(_U_){ + _X_ = is_relative$0(n); + /*<>*/ if(_X_){ var - _V_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _W_ = - _V_ + _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _Z_ = + _Y_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), cst$27); - /*<>*/ if(_W_){ + /*<>*/ if(_Z_){ var - _X_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _Y_ = - _X_ + ___ = caml_ml_string_length(n) < 2 ? 1 : 0, + _$_ = + ___ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), ".\\"); - /*<>*/ if(_Y_){ + /*<>*/ if(_$_){ var - _Z_ = caml_ml_string_length(n) < 3 ? 1 : 0, - ___ = - _Z_ + _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _ab_ = + _aa_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), cst$28); - /*<>*/ if(___) + /*<>*/ if(_ab_) var - _$_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aa_ = - _$_ + _ac_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _ad_ = + _ac_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[15], n, 0, 3), "..\\"); else - var _aa_ = ___; + var _ad_ = _ab_; } else - var _aa_ = _Y_; + var _ad_ = _$_; } else - var _aa_ = _W_; + var _ad_ = _Z_; } else - var _aa_ = _U_; - /*<>*/ return _aa_; + var _ad_ = _X_; + /*<>*/ return _ad_; /*<>*/ } function check_suffix$0(name, suff){ /*<>*/ var - _R_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_R_) + _U_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; + if(_U_) /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 @@ -32184,14 +32115,14 @@ name, caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, caml_ml_string_length(suff)), - /*<>*/ _S_ = + /*<>*/ _V_ = /*<>*/ caml_call1(Stdlib_String[26], suff), - _T_ = + _W_ = /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[26], s), _S_); + ( /*<>*/ caml_call1(Stdlib_String[26], s), _V_); else - var _T_ = _R_; - /*<>*/ return _T_; + var _W_ = _U_; + /*<>*/ return _W_; /*<>*/ } function chop_suffix_opt$0(suffix, filename){ /*<>*/ var @@ -32202,11 +32133,11 @@ /*<>*/ r = /*<>*/ caml_call3 (Stdlib_String[15], filename, len_f - len_s | 0, len_s), - /*<>*/ _Q_ = + /*<>*/ _T_ = /*<>*/ caml_call1(Stdlib_String[26], suffix); /*<>*/ return /*<>*/ caml_string_equal ( /*<>*/ caml_call1(Stdlib_String[26], r), - _Q_) + _T_) ? [0, /*<>*/ caml_call3 (Stdlib_String[15], filename, 0, len_f - len_s | 0)] @@ -32218,8 +32149,8 @@ /*<>*/ caml_sys_getenv("TEMP"), temp_dir_name$0 = _j_; } - catch(_P_){ - var _b_ = caml_wrap_exception(_P_); + catch(_S_){ + var _b_ = caml_wrap_exception(_S_); if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); var temp_dir_name$0 = cst$5; } @@ -32230,23 +32161,44 @@ /*<>*/ caml_call1(Stdlib_Buffer[1], l + 20 | 0); /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - function loop(i){ + function add_bs(n){ + /*<>*/ /*<>*/ var _Q_ = 1; + if(n >= 1){ + var j = _Q_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 92); + /*<>*/ /*<>*/ var + _R_ = j + 1 | 0; + if(n === j) break; + var j = _R_; + } + } + return 0; + /*<>*/ } + function loop$0(counter, i){ /*<>*/ var i$0 = i; /*<>*/ for(;;){ - if(i$0 === l){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 34); - /*<>*/ return sentinal; - } + if(i$0 === l) + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 34); /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); if(34 === c){ - /*<>*/ loop_bs(0, i$0); - /*<>*/ return sentinal; + var _O_ = 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (loop_bs, [0, _O_, i$0]); + var counter$1 = counter + 1 | 0; + /*<>*/ return loop_bs(counter$1, _O_, i$0); } if(92 === c){ - /*<>*/ loop_bs(0, i$0); - /*<>*/ return sentinal; + var _P_ = 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (loop_bs, [0, _P_, i$0]); + var counter$0 = counter + 1 | 0; + /*<>*/ return loop_bs(counter$0, _P_, i$0); } /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, c); @@ -32255,14 +32207,13 @@ i$0 = i$1; } /*<>*/ } - function loop_bs(n, i){ + function loop_bs(counter, n, i){ /*<>*/ var n$0 = n, i$0 = i; /*<>*/ for(;;){ if(i$0 === l){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - /*<>*/ add_bs(n$0); - /*<>*/ return sentinal; + /*<>*/ return add_bs(n$0); } /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(s, i$0); @@ -32270,13 +32221,21 @@ /*<>*/ add_bs((2 * n$0 | 0) + 1 | 0); /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - /*<>*/ loop(i$0 + 1 | 0); - /*<>*/ return sentinal; + /*<>*/ /*<>*/ var + _N_ = i$0 + 1 | 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (loop$0, [0, _N_]); + var counter$1 = counter + 1 | 0; + /*<>*/ return loop$0(counter$1, _N_); } if(92 !== match){ /*<>*/ add_bs(n$0); - /*<>*/ loop(i$0); - /*<>*/ return sentinal; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (loop$0, [0, i$0]); + var counter$0 = counter + 1 | 0; + /*<>*/ return loop$0(counter$0, i$0); } /*<>*/ var /*<>*/ i$1 = i$0 + 1 | 0, @@ -32285,21 +32244,7 @@ i$0 = i$1; } /*<>*/ } - function add_bs(n){ - /*<>*/ /*<>*/ var _N_ = 1; - if(n >= 1){ - var j = _N_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 92); - /*<>*/ /*<>*/ var - _O_ = j + 1 | 0; - if(n === j) break; - var j = _O_; - } - } - return sentinal; - /*<>*/ } + function loop(i){ /*<>*/ return caml_trampoline(loop$0(0, i));} /*<>*/ loop(0); /*<>*/ return /*<>*/ caml_call1 (Stdlib_Buffer[2], b); From f0d95068e5a373f1ba2a54990ea5b2e4753c00d5 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sat, 16 Sep 2023 23:25:03 -0500 Subject: [PATCH 068/112] change name to global deadcode --- compiler/lib/{deadcode_dgraph.ml => global_deadcode.ml} | 0 compiler/lib/{deadcode_dgraph.mli => global_deadcode.mli} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename compiler/lib/{deadcode_dgraph.ml => global_deadcode.ml} (100%) rename compiler/lib/{deadcode_dgraph.mli => global_deadcode.mli} (100%) diff --git a/compiler/lib/deadcode_dgraph.ml b/compiler/lib/global_deadcode.ml similarity index 100% rename from compiler/lib/deadcode_dgraph.ml rename to compiler/lib/global_deadcode.ml diff --git a/compiler/lib/deadcode_dgraph.mli b/compiler/lib/global_deadcode.mli similarity index 100% rename from compiler/lib/deadcode_dgraph.mli rename to compiler/lib/global_deadcode.mli From c8c7c53350932db213daa8a686bedd2ccad0a52d Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sat, 16 Sep 2023 23:39:50 -0500 Subject: [PATCH 069/112] format --- compiler/lib/global_deadcode.ml | 47 ++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 7eb8f8944c..3af5e1edf4 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -35,14 +35,14 @@ let times = Debug.find "times" (** Definition of a variable [x]. *) type def = - | Expr of expr (** [x] is defined by an expression. *) - | Param (** [x] is a block or closure parameter. *) + | Expr of expr (** [x] is defined by an expression. *) + | Param (** [x] is a block or closure parameter. *) (** Liveness of a variable [x], forming a lattice structure. *) type live = - | Top (** [x] is live and not a block. *) - | Live of IntSet.t (** [x] is a live block with a (non-empty) set of live fields. *) - | Dead (** [x] is dead. *) + | Top (** [x] is live and not a block. *) + | Live of IntSet.t (** [x] is a live block with a (non-empty) set of live fields. *) + | Dead (** [x] is dead. *) module G = Dgraph.Make_Imperative (Var) (Var.ISet) (Var.Tbl) @@ -85,16 +85,16 @@ let definitions nv prog = block.body) prog.blocks; defs - + let variable_may_escape x (global_info : Global_flow.info) = match global_info.info_variable_may_escape.(Var.idx x) with | Escape | Escape_constant -> true | No -> false -(** Type of variable usage. *) +(** Type of variable usage. *) type usage_kind = - | Compute (** variable y is used to compute x *) - | Propagate (** values of y propagate to x *) + | Compute (** variable y is used to compute x *) + | Propagate (** values of y propagate to x *) (** Compute the adjacency list for the dependency graph of given program. An edge between variables [x] and [y] is marked [Compute] if [x] is used in the definition of [y]. It is marked @@ -136,7 +136,9 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array | _ -> ()) known); add_use Compute x f; - List.iter ~f:(fun a -> if variable_may_escape a global_info then add_use Compute x a) args + List.iter + ~f:(fun a -> if variable_may_escape a global_info then add_use Compute x a) + args | Block (_, vars, _) -> Array.iter ~f:(add_use Compute x) vars | Field (z, _) -> add_use Compute x z | Constant _ -> () @@ -166,8 +168,7 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array | Cond (_, cont1, cont2) -> add_cont_deps cont1; add_cont_deps cont2 - | Switch (_, a) -> - Array.iter ~f:add_cont_deps a; + | Switch (_, a) -> Array.iter ~f:add_cont_deps a | Pushtrap (cont, _, cont_h, _) -> add_cont_deps cont; add_cont_deps cont_h @@ -219,16 +220,19 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = in let live_instruction i = match i with - | Let (_x, e) -> + | Let (_x, e) -> ( if not (pure_expr pure_funs e) - then ( + then let vars = expr_vars e in - Var.ISet.iter add_top vars;) - else (match e with - | Apply { f; args; _} -> + Var.ISet.iter add_top vars + else + match e with + | Apply { f; args; _ } -> add_top f; - List.iter ~f:(fun x -> if variable_may_escape x global_info then add_top x) args - | _ -> ()) + List.iter + ~f:(fun x -> if variable_may_escape x global_info then add_top x) + args + | _ -> ()) | Assign (_, _) -> () | Set_field (x, i, y) -> add_live x i; @@ -263,7 +267,7 @@ let variables deps = that uses [x]. *) let propagate uses defs live_vars live_table x = let idx = Var.idx x in - (** Variable [y] uses [x] either in its definition ([Compute]) or as a closure/block parameter + (* Variable [y] uses [x] either in its definition ([Compute]) or as a closure/block parameter ([Propagate]). In the latter case, the contribution is simply the liveness of [y]. In the former, the contribution depends on the liveness of [y] and its definition. *) let contribution y usage_kind = @@ -377,8 +381,7 @@ let zero prog sentinal live_table = | Raise (_, _) | Stop -> last | Branch cont -> Branch (zero_cont cont) | Cond (x, cont1, cont2) -> Cond (x, zero_cont cont1, zero_cont cont2) - | Switch (x, a) -> - Switch (x, Array.map ~f:zero_cont a) + | Switch (x, a) -> Switch (x, Array.map ~f:zero_cont a) | Pushtrap (cont1, x, cont2, pcs) -> Pushtrap (zero_cont cont1, x, zero_cont cont2, pcs) | Poptrap cont -> Poptrap (zero_cont cont) From 4df539962d03ca39c01162184dbfcbe8c0d0fafd Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sat, 16 Sep 2023 23:40:24 -0500 Subject: [PATCH 070/112] Change expr_vars to use Var.Set --- compiler/lib/global_deadcode.ml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 3af5e1edf4..d79d6ae7b1 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -178,23 +178,25 @@ let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array (** Return the set of variables used in a given expression *) let expr_vars e = - let vars = Var.ISet.empty () in - (match e with + let vars = Var.Set.empty in + match e with | Apply { f; args; _ } -> - Var.ISet.add vars f; - List.iter ~f:(Var.ISet.add vars) args - | Block (_, params, _) -> Array.iter ~f:(Var.ISet.add vars) params - | Field (z, _) -> Var.ISet.add vars z - | Constant _ -> () - | Closure (params, _) -> List.iter ~f:(Var.ISet.add vars) params + let vars = Var.Set.add f vars in + List.fold_left ~f:(fun acc x -> Var.Set.add x acc) ~init:vars args + | Block (_, params, _) -> + Array.fold_left ~f:(fun acc x -> Var.Set.add x acc) ~init:vars params + | Field (z, _) -> Var.Set.add z vars + | Constant _ -> vars + | Closure (params, _) -> + List.fold_left ~f:(fun acc x -> Var.Set.add x acc) ~init:vars params | Prim (_, args) -> - List.iter - ~f:(fun v -> + List.fold_left + ~f:(fun acc v -> match v with - | Pv v -> Var.ISet.add vars v - | Pc _ -> ()) - args); - vars + | Pv v -> Var.Set.add v vars + | Pc _ -> acc) + ~init:vars + args (** Compute the initial liveness of each variable in the program. From 075c6f34c5e4794524e23fa14f99f8fa0acd9f1f Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sat, 16 Sep 2023 23:48:03 -0500 Subject: [PATCH 071/112] fix live_instruction, remove zero cont, contribution case --- compiler/lib/global_deadcode.ml | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index d79d6ae7b1..8e5708e978 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -222,12 +222,11 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = in let live_instruction i = match i with - | Let (_x, e) -> ( + | Let (_x, e) -> if not (pure_expr pure_funs e) - then + then ( let vars = expr_vars e in - Var.ISet.iter add_top vars - else + Var.Set.iter add_top vars; match e with | Apply { f; args; _ } -> add_top f; @@ -235,6 +234,7 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = ~f:(fun x -> if variable_may_escape x global_info then add_top x) args | _ -> ()) + else () | Assign (_, _) -> () | Set_field (x, i, y) -> add_live x i; @@ -289,6 +289,7 @@ let propagate uses defs live_vars live_table x = if Var.equal v x && IntSet.mem i fields then found := true) vars; if !found then Top else Dead + | Expr (Field (_, i)) -> Live (IntSet.singleton i) | _ -> Top) (* If y is top and y is a field access, x depends only on that field *) | Top -> ( @@ -334,25 +335,10 @@ let zero prog sentinal live_table = | _ -> true in let zero_var x = if is_live x then x else sentinal in - let zero_cont ((pc, args) : cont) = - match Addr.Map.find_opt pc prog.blocks with - | Some block -> - let args = - List.map2 - ~f:(fun param arg -> if is_live param then arg else sentinal) - block.params - args - in - pc, args - | None -> pc, args - in let zero_instr instr = match instr with | Let (x, e) -> ( match e with - | Closure (args, cont) -> - let cont = zero_cont cont in - Let (x, Closure (args, cont)) | Block (start, vars, is_array) -> ( match Var.Tbl.get live_table x with | Live fields -> @@ -380,13 +366,7 @@ let zero prog sentinal live_table = let last = match last with | Return x -> Return (zero_var x) - | Raise (_, _) | Stop -> last - | Branch cont -> Branch (zero_cont cont) - | Cond (x, cont1, cont2) -> Cond (x, zero_cont cont1, zero_cont cont2) - | Switch (x, a) -> Switch (x, Array.map ~f:zero_cont a) - | Pushtrap (cont1, x, cont2, pcs) -> - Pushtrap (zero_cont cont1, x, zero_cont cont2, pcs) - | Poptrap cont -> Poptrap (zero_cont cont) + | _ -> last in last, loc in From a343dc9a6d11d4ab4159f399980168b81aadc082 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sat, 16 Sep 2023 23:53:50 -0500 Subject: [PATCH 072/112] re-organize redundant call --- compiler/lib/driver.ml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index f87753c2ac..2b44cb0aea 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -104,21 +104,19 @@ let exact_calls profile p = | O3 -> false | O1 | O2 -> true in - if Config.Flag.globaldeadcode () - then - let p, sentinal = Global_deadcode.add_sentinal p in - let info = Global_flow.f ~fast p in - let p = Global_deadcode.f p sentinal info in - let p = - Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p - in - p, Some sentinal - else - let info = Global_flow.f ~fast p in - let p = - Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p - in - p, None + let p, info, sentinal = + if Config.Flag.globaldeadcode () + then + let p, sentinal = Global_deadcode.add_sentinal p in + let info = Global_flow.f ~fast p in + let p = Global_deadcode.f p sentinal info in + p, info, Some sentinal + else + let info = Global_flow.f ~fast p in + p, info, None + in + let p = Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p in + p, Some sentinal else p, None let print p = From 3523cf5255adf23663866b8af2464cf0a59618fe Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sun, 17 Sep 2023 00:16:33 -0500 Subject: [PATCH 073/112] don't generate dead return exprs --- compiler/lib/generate.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index ef49532f53..0b3ad9327f 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -1594,7 +1594,12 @@ and compile_conditional st queue ~fall_through last scope_stack : _ * _ = match last with | Return x -> let (_px, cx), queue = access_queue queue x in - true, flush_all queue [ J.Return_statement (Some cx), loc ] + let return_expr = + match st.ctx.sentinal with + | Some sentinal when Var.equal sentinal x -> None + | _ -> Some cx + in + true, flush_all queue [ J.Return_statement return_expr, loc ] | Raise (x, k) -> let (_px, cx), queue = access_queue queue x in true, flush_all queue (throw_statement st.ctx cx k loc) From adacd59ed8ddea9f149221c1174410b3ae5e0e1f Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sun, 17 Sep 2023 00:16:39 -0500 Subject: [PATCH 074/112] fix type error --- compiler/lib/driver.ml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 2b44cb0aea..62d47b86b2 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -116,7 +116,7 @@ let exact_calls profile p = p, info, None in let p = Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p in - p, Some sentinal + p, sentinal else p, None let print p = @@ -607,10 +607,7 @@ let full ~standalone ~wrap_with_fun ~profile ~linkall ~source_map formatter d p in if times () then Format.eprintf "Start Optimizing...@."; let t = Timer.make () in - let r : (Code.program * Deadcode.variable_uses) * Effects.cps_calls * Code.Var.t option - = - opt p - in + let r = opt p in let () = if times () then Format.eprintf " optimizations : %a@." Timer.print t in emit r From 3d656ebe8d64f36499aea178dbc7d876aa5c62fd Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sun, 17 Sep 2023 00:23:33 -0500 Subject: [PATCH 075/112] refactor array compact --- compiler/lib/global_deadcode.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 8e5708e978..e9e55085f5 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -325,9 +325,7 @@ let zero prog sentinal live_table = while !i >= 0 && Var.equal vars.(!i) sentinal do i := !i - 1 done; - let compacted = Array.make (!i + 1) sentinal in - Array.blit ~src:vars ~src_pos:0 ~dst:compacted ~dst_pos:0 ~len:(!i + 1); - compacted + Array.sub vars ~pos:0 ~len:(!i + 1) in let is_live v = match Var.Tbl.get live_table v with From 58640303562f2f6680fdbaa0fe3f70c0ef5bd1e9 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sun, 17 Sep 2023 10:17:56 -0500 Subject: [PATCH 076/112] move debug info before zeroing --- compiler/lib/global_deadcode.ml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index e9e55085f5..f6d98daa81 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -430,15 +430,16 @@ let f p sentinal global_info = (* Propagate liveness to dependencies *) let vars = variables uses in let live_table = solver vars uses defs live_vars in + (* Print debug info *) + if debug () + then ( + Code.Print.program (fun _ _ -> "") p; + Print.print_liveness live_vars; + Print.print_uses uses; + Print.print_live_tbl live_table; + Format.eprintf "After Elimination:\n"; + Code.Print.program (fun _ _ -> "") p); (* Zero out dead fields *) let p = zero p sentinal live_table in - if debug () - then ( - Code.Print.program (fun _ _ -> "") p; - Print.print_liveness live_vars; - Print.print_uses uses; - Print.print_live_tbl live_table; - Format.eprintf "After Elimination:\n"; - Code.Print.program (fun _ _ -> "") p); if times () then Format.eprintf " deadcode dgraph.: %a@." Timer.print t; p From 8e9f0c243b5dfbc727284260c76ddba6d34a553b Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sun, 17 Sep 2023 10:24:19 -0500 Subject: [PATCH 077/112] more descriptive sentinal name --- compiler/lib/driver.ml | 22 +++++++++++----------- compiler/lib/generate.ml | 14 +++++++------- compiler/lib/generate.mli | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 62d47b86b2..f5b0d5003c 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -104,19 +104,19 @@ let exact_calls profile p = | O3 -> false | O1 | O2 -> true in - let p, info, sentinal = + let p, info, deadcode_sentinal = if Config.Flag.globaldeadcode () then - let p, sentinal = Global_deadcode.add_sentinal p in + let p, deadcode_sentinal = Global_deadcode.add_sentinal p in let info = Global_flow.f ~fast p in - let p = Global_deadcode.f p sentinal info in - p, info, Some sentinal + let p = Global_deadcode.f p deadcode_sentinal info in + p, info, Some deadcode_sentinal else let info = Global_flow.f ~fast p in p, info, None in let p = Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p in - p, sentinal + p, deadcode_sentinal else p, None let print p = @@ -186,7 +186,7 @@ let generate ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect - ((p, live_vars), cps_calls, sentinal) = + ((p, live_vars), cps_calls, deadcode_sentinal) = if times () then Format.eprintf "Start Generation...@."; let should_export = should_export wrap_with_fun in Generate.f @@ -196,7 +196,7 @@ let generate ~cps_calls ~should_export ~warn_on_unhandled_effect - ~sentinal + ~deadcode_sentinal d let debug_linker = Debug.find "linker" @@ -591,11 +591,11 @@ let full ~standalone ~wrap_with_fun ~profile ~linkall ~source_map formatter d p | O2 -> o2 | O3 -> o3) +> exact_calls profile - +> (fun (p, sentinal) -> + +> (fun (p, deadcode_sentinal) -> let p, cps_calls = effects p in - p, cps_calls, sentinal) - +> fun (p, cps_calls, sentinal) -> - deadcode' (Generate_closure.f p), cps_calls, sentinal + p, cps_calls, deadcode_sentinal) + +> fun (p, cps_calls, deadcode_sentinal) -> + deadcode' (Generate_closure.f p), cps_calls, deadcode_sentinal in let emit = generate d ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect:standalone diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 0b3ad9327f..493721acef 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -285,14 +285,14 @@ module Ctx = struct ; should_export : bool ; effect_warning : bool ref ; cps_calls : Effects.cps_calls - ; sentinal : Var.t option + ; deadcode_sentinal : Var.t option } let initial ~warn_on_unhandled_effect ~exported_runtime ~should_export - ~sentinal + ~deadcode_sentinal blocks live cps_calls @@ -306,7 +306,7 @@ module Ctx = struct ; should_export ; effect_warning = ref (not warn_on_unhandled_effect) ; cps_calls - ; sentinal + ; deadcode_sentinal } end @@ -1041,7 +1041,7 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = let cx = match cx with | J.EVar (J.V v) -> ( - match ctx.sentinal with + match ctx.deadcode_sentinal with | Some s -> if Var.equal v s then J.ElementHole else J.Element cx | None -> J.Element cx) | _ -> J.Element cx @@ -1595,7 +1595,7 @@ and compile_conditional st queue ~fall_through last scope_stack : _ * _ = | Return x -> let (_px, cx), queue = access_queue queue x in let return_expr = - match st.ctx.sentinal with + match st.ctx.deadcode_sentinal with | Some sentinal when Var.equal sentinal x -> None | _ -> Some cx in @@ -1808,7 +1808,7 @@ let f ~cps_calls ~should_export ~warn_on_unhandled_effect - ~sentinal + ~deadcode_sentinal debug = let t' = Timer.make () in let share = Share.get ~cps_calls ~alias_prims:exported_runtime p in @@ -1820,7 +1820,7 @@ let f ~warn_on_unhandled_effect ~exported_runtime ~should_export - ~sentinal + ~deadcode_sentinal p.blocks live_vars cps_calls diff --git a/compiler/lib/generate.mli b/compiler/lib/generate.mli index ddb4854644..6a0df32259 100644 --- a/compiler/lib/generate.mli +++ b/compiler/lib/generate.mli @@ -25,7 +25,7 @@ val f : -> cps_calls:Effects.cps_calls -> should_export:bool -> warn_on_unhandled_effect:bool - -> sentinal:Code.Var.t option + -> deadcode_sentinal:Code.Var.t option -> Parse_bytecode.Debug.t -> Javascript.program From 266221e88f53338cc07a5b0f013163978c6b1b62 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Sun, 17 Sep 2023 10:50:15 -0500 Subject: [PATCH 078/112] add omit return value test --- compiler/tests-compiler/global_deadcode.ml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index 3606f717ce..211f9bea2f 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -69,4 +69,22 @@ let%expect_test "Omit unused fields" = var t = b ? [0, 1, , x] : [0, 3, , 4], v = t[3], u = t[1]; return [0, u, v]; } - //end |}]; \ No newline at end of file + //end |}] + +let%expect_test "Omit unused return expressions" = + let program = + compile_and_parse + ~flags:["--enable"; "globaldeadcode"] + {| + let f x = + print_int x; + x + 1 + in + ignore (f 5 + f 6) + |} + in + (* Expect return value of f to be omitted. *) + print_fun_decl program (Some "f"); + [%expect " + function f(x){caml_call1(Stdlib[44], x); return;} + //end"]; \ No newline at end of file From 9ab2476a25d2fe8c055af90c57ef0b0a753e9270 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 20 Sep 2023 14:21:49 -0500 Subject: [PATCH 079/112] refactor driver final deadcode call --- compiler/lib/driver.ml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index f5b0d5003c..1b0bad697d 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -186,7 +186,7 @@ let generate ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect - ((p, live_vars), cps_calls, deadcode_sentinal) = + (((p, live_vars), cps_calls), deadcode_sentinal) = if times () then Format.eprintf "Start Generation...@."; let should_export = should_export wrap_with_fun in Generate.f @@ -591,11 +591,7 @@ let full ~standalone ~wrap_with_fun ~profile ~linkall ~source_map formatter d p | O2 -> o2 | O3 -> o3) +> exact_calls profile - +> (fun (p, deadcode_sentinal) -> - let p, cps_calls = effects p in - p, cps_calls, deadcode_sentinal) - +> fun (p, cps_calls, deadcode_sentinal) -> - deadcode' (Generate_closure.f p), cps_calls, deadcode_sentinal + +> map_fst (effects +> map_fst (Generate_closure.f +> deadcode')) in let emit = generate d ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect:standalone From d44390fe2292f06d49313425d689f3b4fae41f54 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 2 Oct 2023 15:38:28 -0500 Subject: [PATCH 080/112] rearrange debug output --- compiler/lib/global_deadcode.ml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index f6d98daa81..80be156174 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -432,14 +432,17 @@ let f p sentinal global_info = let live_table = solver vars uses defs live_vars in (* Print debug info *) if debug () - then ( - Code.Print.program (fun _ _ -> "") p; - Print.print_liveness live_vars; - Print.print_uses uses; - Print.print_live_tbl live_table; - Format.eprintf "After Elimination:\n"; - Code.Print.program (fun _ _ -> "") p); + then ( + Format.eprintf "Before Zeroing:\n"; + Code.Print.program (fun _ _ -> "") p; + Print.print_liveness live_vars; + Print.print_uses uses; + Print.print_live_tbl live_table); (* Zero out dead fields *) let p = zero p sentinal live_table in + if debug () + then ( + Format.printf "After Zeroing:\n"; + Code.Print.program (fun _ _ -> "") p); if times () then Format.eprintf " deadcode dgraph.: %a@." Timer.print t; p From 238b5dee9c01120a4d1a55e821efe6d57fda51b6 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 2 Oct 2023 15:42:03 -0500 Subject: [PATCH 081/112] remove clojure parameters from expr_vars --- compiler/lib/global_deadcode.ml | 4 +- compiler/tests-full/stdlib.cma.js | 34020 ++++++++++++++++++++++++++++ testing/dead_field.js | 29 + 3 files changed, 34050 insertions(+), 3 deletions(-) create mode 100644 compiler/tests-full/stdlib.cma.js create mode 100644 testing/dead_field.js diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 80be156174..f40a3981c5 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -186,9 +186,6 @@ let expr_vars e = | Block (_, params, _) -> Array.fold_left ~f:(fun acc x -> Var.Set.add x acc) ~init:vars params | Field (z, _) -> Var.Set.add z vars - | Constant _ -> vars - | Closure (params, _) -> - List.fold_left ~f:(fun acc x -> Var.Set.add x acc) ~init:vars params | Prim (_, args) -> List.fold_left ~f:(fun acc v -> @@ -197,6 +194,7 @@ let expr_vars e = | Pc _ -> acc) ~init:vars args + | Constant _ | Closure (_, _) -> vars (** Compute the initial liveness of each variable in the program. diff --git a/compiler/tests-full/stdlib.cma.js b/compiler/tests-full/stdlib.cma.js new file mode 100644 index 0000000000..e3d09981e8 --- /dev/null +++ b/compiler/tests-full/stdlib.cma.js @@ -0,0 +1,34020 @@ +// Generated by js_of_ocaml +//# buildInfo:effects=false, kind=cma, use-js-string=true, version=5.4.0+git-5.3.0-128-g266221e88f-dirty + +//# unitInfo: Provides: CamlinternalFormatBasics +(function + (globalThis){ + "use strict"; + var runtime = globalThis.jsoo_runtime; + function erase_rel(param){ + /*<>*/ if(typeof param === "number") + /*<>*/ return 0; + switch(param[0]){ + case 0: + var rest = param[1]; + /*<>*/ return [0, erase_rel(rest)]; + case 1: + var rest$0 = param[1]; + /*<>*/ return [1, + erase_rel(rest$0)]; + case 2: + var rest$1 = param[1]; + /*<>*/ return [2, + erase_rel(rest$1)]; + case 3: + var rest$2 = param[1]; + /*<>*/ return [3, + erase_rel(rest$2)]; + case 4: + var rest$3 = param[1]; + /*<>*/ return [4, + erase_rel(rest$3)]; + case 5: + var rest$4 = param[1]; + /*<>*/ return [5, + erase_rel(rest$4)]; + case 6: + var rest$5 = param[1]; + /*<>*/ return [6, + erase_rel(rest$5)]; + case 7: + var rest$6 = param[1]; + /*<>*/ return [7, + erase_rel(rest$6)]; + case 8: + var rest$7 = param[2], ty = param[1]; + /*<>*/ return [8, + ty, + erase_rel(rest$7)]; + case 9: + var rest$8 = param[3], ty1 = param[1]; + /*<>*/ return [9, + ty1, + ty1, + erase_rel(rest$8)]; + case 10: + var rest$9 = param[1]; + /*<>*/ return [10, + erase_rel(rest$9)]; + case 11: + var rest$10 = param[1]; + /*<>*/ return [11, + erase_rel(rest$10)]; + case 12: + var rest$11 = param[1]; + /*<>*/ return [12, + erase_rel(rest$11)]; + case 13: + var rest$12 = param[1]; + /*<>*/ return [13, + erase_rel(rest$12)]; + default: + var rest$13 = param[1]; + /*<>*/ return [14, + erase_rel(rest$13)]; + } + /*<>*/ } + function concat_fmtty(fmtty1, fmtty2){ + /*<>*/ if(typeof fmtty1 === "number") + /*<>*/ return fmtty2; + switch(fmtty1[0]){ + case 0: + var rest = fmtty1[1]; + /*<>*/ return [0, + concat_fmtty(rest, fmtty2)]; + case 1: + var rest$0 = fmtty1[1]; + /*<>*/ return [1, + concat_fmtty(rest$0, fmtty2)]; + case 2: + var rest$1 = fmtty1[1]; + /*<>*/ return [2, + concat_fmtty(rest$1, fmtty2)]; + case 3: + var rest$2 = fmtty1[1]; + /*<>*/ return [3, + concat_fmtty(rest$2, fmtty2)]; + case 4: + var rest$3 = fmtty1[1]; + /*<>*/ return [4, + concat_fmtty(rest$3, fmtty2)]; + case 5: + var rest$4 = fmtty1[1]; + /*<>*/ return [5, + concat_fmtty(rest$4, fmtty2)]; + case 6: + var rest$5 = fmtty1[1]; + /*<>*/ return [6, + concat_fmtty(rest$5, fmtty2)]; + case 7: + var rest$6 = fmtty1[1]; + /*<>*/ return [7, + concat_fmtty(rest$6, fmtty2)]; + case 8: + var rest$7 = fmtty1[2], ty = fmtty1[1]; + /*<>*/ return [8, + ty, + concat_fmtty(rest$7, fmtty2)]; + case 9: + var rest$8 = fmtty1[3], ty2 = fmtty1[2], ty1 = fmtty1[1]; + /*<>*/ return [9, + ty1, + ty2, + concat_fmtty(rest$8, fmtty2)]; + case 10: + var rest$9 = fmtty1[1]; + /*<>*/ return [10, + concat_fmtty(rest$9, fmtty2)]; + case 11: + var rest$10 = fmtty1[1]; + /*<>*/ return [11, + concat_fmtty(rest$10, fmtty2)]; + case 12: + var rest$11 = fmtty1[1]; + /*<>*/ return [12, + concat_fmtty(rest$11, fmtty2)]; + case 13: + var rest$12 = fmtty1[1]; + /*<>*/ return [13, + concat_fmtty(rest$12, fmtty2)]; + default: + var rest$13 = fmtty1[1]; + /*<>*/ return [14, + concat_fmtty(rest$13, fmtty2)]; + } + /*<>*/ } + function concat_fmt(fmt1, fmt2){ + /*<>*/ if(typeof fmt1 === "number") + /*<>*/ return fmt2; + switch(fmt1[0]){ + case 0: + var rest = fmt1[1]; + /*<>*/ return [0, + concat_fmt(rest, fmt2)]; + case 1: + var rest$0 = fmt1[1]; + /*<>*/ return [1, + concat_fmt(rest$0, fmt2)]; + case 2: + var rest$1 = fmt1[2], pad = fmt1[1]; + /*<>*/ return [2, + pad, + concat_fmt(rest$1, fmt2)]; + case 3: + var rest$2 = fmt1[2], pad$0 = fmt1[1]; + /*<>*/ return [3, + pad$0, + concat_fmt(rest$2, fmt2)]; + case 4: + var rest$3 = fmt1[4], prec = fmt1[3], pad$1 = fmt1[2], iconv = fmt1[1]; + /*<>*/ return [4, + iconv, + pad$1, + prec, + concat_fmt(rest$3, fmt2)]; + case 5: + var + rest$4 = fmt1[4], + prec$0 = fmt1[3], + pad$2 = fmt1[2], + iconv$0 = fmt1[1]; + /*<>*/ return [5, + iconv$0, + pad$2, + prec$0, + concat_fmt(rest$4, fmt2)]; + case 6: + var + rest$5 = fmt1[4], + prec$1 = fmt1[3], + pad$3 = fmt1[2], + iconv$1 = fmt1[1]; + /*<>*/ return [6, + iconv$1, + pad$3, + prec$1, + concat_fmt(rest$5, fmt2)]; + case 7: + var + rest$6 = fmt1[4], + prec$2 = fmt1[3], + pad$4 = fmt1[2], + iconv$2 = fmt1[1]; + /*<>*/ return [7, + iconv$2, + pad$4, + prec$2, + concat_fmt(rest$6, fmt2)]; + case 8: + var + rest$7 = fmt1[4], + prec$3 = fmt1[3], + pad$5 = fmt1[2], + fconv = fmt1[1]; + /*<>*/ return [8, + fconv, + pad$5, + prec$3, + concat_fmt(rest$7, fmt2)]; + case 9: + var rest$8 = fmt1[2], pad$6 = fmt1[1]; + /*<>*/ return [9, + pad$6, + concat_fmt(rest$8, fmt2)]; + case 10: + var rest$9 = fmt1[1]; + /*<>*/ return [10, + concat_fmt(rest$9, fmt2)]; + case 11: + var rest$10 = fmt1[2], str = fmt1[1]; + /*<>*/ return [11, + str, + concat_fmt(rest$10, fmt2)]; + case 12: + var rest$11 = fmt1[2], chr = fmt1[1]; + /*<>*/ return [12, + chr, + concat_fmt(rest$11, fmt2)]; + case 13: + var rest$12 = fmt1[3], fmtty = fmt1[2], pad$7 = fmt1[1]; + /*<>*/ return [13, + pad$7, + fmtty, + concat_fmt(rest$12, fmt2)]; + case 14: + var rest$13 = fmt1[3], fmtty$0 = fmt1[2], pad$8 = fmt1[1]; + /*<>*/ return [14, + pad$8, + fmtty$0, + concat_fmt(rest$13, fmt2)]; + case 15: + var rest$14 = fmt1[1]; + /*<>*/ return [15, + concat_fmt(rest$14, fmt2)]; + case 16: + var rest$15 = fmt1[1]; + /*<>*/ return [16, + concat_fmt(rest$15, fmt2)]; + case 17: + var rest$16 = fmt1[2], fmting_lit = fmt1[1]; + /*<>*/ return [17, + fmting_lit, + concat_fmt(rest$16, fmt2)]; + case 18: + var rest$17 = fmt1[2], fmting_gen = fmt1[1]; + /*<>*/ return [18, + fmting_gen, + concat_fmt(rest$17, fmt2)]; + case 19: + var rest$18 = fmt1[1]; + /*<>*/ return [19, + concat_fmt(rest$18, fmt2)]; + case 20: + var rest$19 = fmt1[3], char_set = fmt1[2], width_opt = fmt1[1]; + /*<>*/ return [20, + width_opt, + char_set, + concat_fmt(rest$19, fmt2)]; + case 21: + var rest$20 = fmt1[2], counter = fmt1[1]; + /*<>*/ return [21, + counter, + concat_fmt(rest$20, fmt2)]; + case 22: + var rest$21 = fmt1[1]; + /*<>*/ return [22, + concat_fmt(rest$21, fmt2)]; + case 23: + var rest$22 = fmt1[2], ign = fmt1[1]; + /*<>*/ return [23, + ign, + concat_fmt(rest$22, fmt2)]; + default: + var rest$23 = fmt1[3], f = fmt1[2], arity = fmt1[1]; + /*<>*/ return [24, + arity, + f, + concat_fmt(rest$23, fmt2)]; + } + /*<>*/ } + var CamlinternalFormatBasics = [0, concat_fmtty, erase_rel, concat_fmt]; + runtime.caml_register_global + (0, CamlinternalFormatBasics, "CamlinternalFormatBasics"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib +//# unitInfo: Requires: Assert_failure, CamlinternalFormatBasics, Division_by_zero, End_of_file, Failure, Invalid_argument, Match_failure, Not_found, Out_of_memory, Stack_overflow, Sys_blocked_io, Sys_error, Undefined_recursive_module +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_false$0 = "false", + cst_true$0 = "true", + caml_atomic_cas = runtime.caml_atomic_cas, + caml_atomic_load = runtime.caml_atomic_load, + caml_blit_string = runtime.caml_blit_string, + caml_create_bytes = runtime.caml_create_bytes, + caml_float_of_string = runtime.caml_float_of_string, + caml_int64_float_of_bits = runtime.caml_int64_float_of_bits, + caml_int_of_string = runtime.caml_int_of_string, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_bytes_length = runtime.caml_ml_bytes_length, + caml_ml_channel_size = runtime.caml_ml_channel_size, + caml_ml_channel_size_64 = runtime.caml_ml_channel_size_64, + caml_ml_close_channel = runtime.caml_ml_close_channel, + caml_ml_flush = runtime.caml_ml_flush, + caml_ml_input = runtime.caml_ml_input, + caml_ml_input_char = runtime.caml_ml_input_char, + caml_ml_open_descriptor_in = runtime.caml_ml_open_descriptor_in, + caml_ml_open_descriptor_out = runtime.caml_ml_open_descriptor_out, + caml_ml_output = runtime.caml_ml_output, + caml_ml_output_bytes = runtime.caml_ml_output_bytes, + caml_ml_output_char = runtime.caml_ml_output_char, + caml_ml_set_binary_mode = runtime.caml_ml_set_binary_mode, + caml_ml_set_channel_name = runtime.caml_ml_set_channel_name, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_notequal = runtime.caml_string_notequal, + caml_string_of_bytes = runtime.caml_string_of_bytes, + caml_sys_open = runtime.caml_sys_open, + 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) + : runtime.caml_call_gen(f, [a0, a1]); + } + var + global_data = runtime.caml_get_global_data(), + cst$0 = "%,", + cst = ".", + CamlinternalFormatBasics = global_data.CamlinternalFormatBasics, + Invalid_argument = global_data.Invalid_argument, + Failure = global_data.Failure, + Match_failure = global_data.Match_failure, + Assert_failure = global_data.Assert_failure, + Not_found = global_data.Not_found, + Out_of_memory = global_data.Out_of_memory, + Stack_overflow = global_data.Stack_overflow, + Sys_error = global_data.Sys_error, + End_of_file = global_data.End_of_file, + Division_by_zero = global_data.Division_by_zero, + Sys_blocked_io = global_data.Sys_blocked_io, + Undefined_recursive_module = global_data.Undefined_recursive_module, + cst_really_input = "really_input", + cst_input = "input", + _l_ = [0, 0, [0, 6, 0]], + _k_ = [0, 0, [0, 7, 0]], + cst_output_substring = "output_substring", + cst_output = "output", + _j_ = [0, 1, [0, 3, [0, 4, [0, 6, 0]]]], + _i_ = [0, 1, [0, 3, [0, 4, [0, 7, 0]]]], + _g_ = [0, 1], + _h_ = [0, 0], + cst_bool_of_string = "bool_of_string", + cst_true = cst_true$0, + cst_false = cst_false$0, + cst_char_of_int = "char_of_int", + cst_Stdlib_Exit = "Stdlib.Exit", + _a_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 32752), + _b_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 65520), + _c_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 32752), + _d_ = runtime.caml_int64_create_lo_mi_hi(16777215, 16777215, 32751), + _e_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 16), + _f_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 15536); + function failwith(s){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Failure, s], 1); + /*<>*/ } + function invalid_arg(s){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Invalid_argument, s], 1); + /*<>*/ } + /*<>*/ /*<>*/ var + Exit = [248, cst_Stdlib_Exit, runtime.caml_fresh_oo_id(0)]; + function min(x, y){ + /*<>*/ return /*<>*/ runtime.caml_lessequal + (x, y) + ? x + : y; + /*<>*/ } + function max(x, y){ + /*<>*/ return /*<>*/ runtime.caml_greaterequal + (x, y) + ? x + : y; + /*<>*/ } + function abs(x){ + /*<>*/ return 0 <= x ? x : - x | 0; + /*<>*/ } + function lnot(x){ + /*<>*/ return x ^ -1; + /*<>*/ } + /*<>*/ var + /*<>*/ infinity = + /*<>*/ caml_int64_float_of_bits(_a_), + /*<>*/ neg_infinity = + /*<>*/ caml_int64_float_of_bits(_b_), + /*<>*/ nan = + /*<>*/ caml_int64_float_of_bits(_c_), + /*<>*/ max_float = + /*<>*/ caml_int64_float_of_bits(_d_), + /*<>*/ min_float = + /*<>*/ caml_int64_float_of_bits(_e_), + /*<>*/ epsilon_float = + /*<>*/ caml_int64_float_of_bits(_f_), + max_int = 2147483647, + min_int = -2147483648; + function symbol(s1, s2){ + /*<>*/ var + l1 = caml_ml_string_length(s1), + l2 = caml_ml_string_length(s2), + /*<>*/ s = + /*<>*/ caml_create_bytes(l1 + l2 | 0); + /*<>*/ /*<>*/ caml_blit_string + (s1, 0, s, 0, l1); + /*<>*/ /*<>*/ caml_blit_string + (s2, 0, s, l1, l2); + return caml_string_of_bytes(s); + /*<>*/ } + function char_of_int(n){ + /*<>*/ if(0 <= n && 255 >= n) + /*<>*/ return n; + /*<>*/ return invalid_arg(cst_char_of_int); + /*<>*/ } + function string_of_bool(b){ + /*<>*/ return b ? cst_true : cst_false; + /*<>*/ } + function bool_of_string(param){ + /*<>*/ return caml_string_notequal(param, cst_false$0) + ? caml_string_notequal + (param, cst_true$0) + ? invalid_arg(cst_bool_of_string) + : 1 + : 0; + /*<>*/ } + function bool_of_string_opt(param){ + /*<>*/ return caml_string_notequal(param, cst_false$0) + ? caml_string_notequal(param, cst_true$0) ? 0 : _g_ + : _h_; + /*<>*/ } + function string_of_int(n){ + /*<>*/ return "" + n; + /*<>*/ } + function int_of_string_opt(s){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _B_ = [0, /*<>*/ caml_int_of_string(s)]; + /*<>*/ return _B_; + } + catch(_C_){ + var _A_ = caml_wrap_exception(_C_); + if(_A_[1] === Failure) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_A_, 0); + } + /*<>*/ } + function valid_float_lexem(s){ + /*<>*/ var l = caml_ml_string_length(s), i = 0; + /*<>*/ for(;;){ + if(l <= i) /*<>*/ return symbol(s, cst); + /*<>*/ /*<>*/ var + match = /*<>*/ runtime.caml_string_get(s, i); + a: + { + if(48 <= match){if(58 > match) break a;} else if(45 === match) break a; + /*<>*/ return s; + } + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function string_of_float(f){ + /*<>*/ return valid_float_lexem + ( /*<>*/ runtime.caml_format_float("%.12g", f)); + /*<>*/ } + function float_of_string_opt(s){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _y_ = [0, /*<>*/ caml_float_of_string(s)]; + /*<>*/ return _y_; + } + catch(_z_){ + var _x_ = caml_wrap_exception(_z_); + if(_x_[1] === Failure) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_x_, 0); + } + /*<>*/ } + function symbol$0(l1, l2){ + /*<>*/ if(! l1) /*<>*/ return l2; + var tl = l1[2], hd = l1[1]; + /*<>*/ return [0, hd, symbol$0(tl, l2)]; + /*<>*/ } + /*<>*/ var + /*<>*/ stdin = + /*<>*/ caml_ml_open_descriptor_in(0), + /*<>*/ stdout = + /*<>*/ caml_ml_open_descriptor_out(1), + /*<>*/ stderr = + /*<>*/ caml_ml_open_descriptor_out(2); + function open_out_gen(mode, perm, name){ + /*<>*/ /*<>*/ var + c = + /*<>*/ caml_ml_open_descriptor_out + ( /*<>*/ caml_sys_open(name, mode, perm)); + /*<>*/ /*<>*/ caml_ml_set_channel_name + (c, name); + /*<>*/ return c; + /*<>*/ } + function open_out(name){ + /*<>*/ return open_out_gen(_i_, 438, name); + /*<>*/ } + function open_out_bin(name){ + /*<>*/ return open_out_gen(_j_, 438, name); + /*<>*/ } + function flush_all(param){ + /*<>*/ var + param$0 = /*<>*/ runtime.caml_ml_out_channels_list(0); + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[2], a = param$0[1]; + /*<>*/ try{ + /*<>*/ /*<>*/ caml_ml_flush(a); + } + catch(_w_){ + var _v_ = caml_wrap_exception(_w_); + if(_v_[1] !== Sys_error) throw caml_maybe_attach_backtrace(_v_, 0); + } + var param$0 = l; + } + /*<>*/ } + function output_bytes(oc, s){ + /*<>*/ return /*<>*/ caml_ml_output_bytes + (oc, s, 0, caml_ml_bytes_length(s)); + /*<>*/ } + function output_string(oc, s){ + /*<>*/ return /*<>*/ caml_ml_output + (oc, s, 0, caml_ml_string_length(s)); + /*<>*/ } + function output(oc, s, ofs, len){ + /*<>*/ if + (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) + /*<>*/ return /*<>*/ caml_ml_output_bytes + (oc, s, ofs, len); + /*<>*/ return invalid_arg(cst_output); + /*<>*/ } + function output_substring(oc, s, ofs, len){ + /*<>*/ if + (0 <= ofs && 0 <= len && (caml_ml_string_length(s) - len | 0) >= ofs) + /*<>*/ return /*<>*/ caml_ml_output + (oc, s, ofs, len); + /*<>*/ return invalid_arg(cst_output_substring); + /*<>*/ } + function output_value(chan, v){ + /*<>*/ return /*<>*/ runtime.caml_output_value + (chan, v, 0); + /*<>*/ } + function close_out(oc){ + /*<>*/ /*<>*/ caml_ml_flush(oc); + /*<>*/ return /*<>*/ caml_ml_close_channel + (oc); + /*<>*/ } + function close_out_noerr(oc){ + /*<>*/ try{ + /*<>*/ /*<>*/ caml_ml_flush(oc); + } + catch(_u_){} + /*<>*/ try{ + /*<>*/ /*<>*/ var + _s_ = /*<>*/ caml_ml_close_channel(oc); + /*<>*/ return _s_; + } + catch(_t_){ /*<>*/ return 0;} + /*<>*/ } + function open_in_gen(mode, perm, name){ + /*<>*/ /*<>*/ var + c = + /*<>*/ caml_ml_open_descriptor_in + ( /*<>*/ caml_sys_open(name, mode, perm)); + /*<>*/ /*<>*/ caml_ml_set_channel_name + (c, name); + /*<>*/ return c; + /*<>*/ } + function open_in(name){ + /*<>*/ return open_in_gen(_k_, 0, name); + /*<>*/ } + function open_in_bin(name){ + /*<>*/ return open_in_gen(_l_, 0, name); + /*<>*/ } + function input(ic, s, ofs, len){ + /*<>*/ if + (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) + /*<>*/ return /*<>*/ caml_ml_input + (ic, s, ofs, len); + /*<>*/ return invalid_arg(cst_input); + /*<>*/ } + function unsafe_really_input(ic, s, ofs, len){ + /*<>*/ var ofs$0 = ofs, len$0 = len; + /*<>*/ for(;;){ + if(0 >= len$0) /*<>*/ return 0; + /*<>*/ /*<>*/ var + r = /*<>*/ caml_ml_input(ic, s, ofs$0, len$0); + /*<>*/ if(0 === r) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (End_of_file, 1); + var + len$1 = len$0 - r | 0, + ofs$1 = ofs$0 + r | 0, + ofs$0 = ofs$1, + len$0 = len$1; + } + /*<>*/ } + function really_input(ic, s, ofs, len){ + /*<>*/ if + (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) + /*<>*/ return unsafe_really_input(ic, s, ofs, len); + /*<>*/ return invalid_arg(cst_really_input); + /*<>*/ } + function really_input_string(ic, len){ + /*<>*/ /*<>*/ var + s = /*<>*/ caml_create_bytes(len); + /*<>*/ really_input(ic, s, 0, len); + return caml_string_of_bytes(s); + /*<>*/ } + function input_line(chan){ + /*<>*/ function build_result(buf, pos, param){ + var pos$0 = pos, param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return buf; + /*<>*/ var + tl = param$0[2], + hd = param$0[1], + /*<>*/ len = + /*<>*/ caml_ml_bytes_length(hd); + /*<>*/ /*<>*/ runtime.caml_blit_bytes + (hd, 0, buf, pos$0 - len | 0, len); + var pos$1 = pos$0 - len | 0, pos$0 = pos$1, param$0 = tl; + } + } + var accu = 0, len = 0; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + n = /*<>*/ runtime.caml_ml_input_scan_line(chan); + /*<>*/ if(0 === n){ + if(! accu) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (End_of_file, 1); + var + _r_ = + build_result + ( /*<>*/ caml_create_bytes(len), len, accu); + } + else{ + if(0 >= n){ + /*<>*/ /*<>*/ var + beg = /*<>*/ caml_create_bytes(- n | 0); + /*<>*/ /*<>*/ caml_ml_input + (chan, beg, 0, - n | 0); + /*<>*/ var + len$1 = len - n | 0, + /*<>*/ accu$0 = [0, beg, accu], + accu = accu$0, + len = len$1; + continue; + } + /*<>*/ /*<>*/ var + res = /*<>*/ caml_create_bytes(n - 1 | 0); + /*<>*/ /*<>*/ caml_ml_input + (chan, res, 0, n - 1 | 0); + /*<>*/ /*<>*/ caml_ml_input_char + (chan); + if(accu) + var + len$0 = (len + n | 0) - 1 | 0, + _r_ = + build_result + ( /*<>*/ caml_create_bytes(len$0), + len$0, + [0, res, accu]); + else + var _r_ = res; + } + /*<>*/ return /*<>*/ caml_string_of_bytes + (_r_); + } + /*<>*/ } + function close_in_noerr(ic){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _p_ = /*<>*/ caml_ml_close_channel(ic); + /*<>*/ return _p_; + } + catch(_q_){ /*<>*/ return 0;} + /*<>*/ } + function print_char(c){ + /*<>*/ return /*<>*/ caml_ml_output_char + (stdout, c); + /*<>*/ } + function print_string(s){ + /*<>*/ return output_string(stdout, s); + /*<>*/ } + function print_bytes(s){ + /*<>*/ return output_bytes(stdout, s); + /*<>*/ } + function print_int(i){ + /*<>*/ return output_string(stdout, "" + i); + /*<>*/ } + function print_float(f){ + /*<>*/ return output_string(stdout, string_of_float(f)); + /*<>*/ } + function print_endline(s){ + /*<>*/ output_string(stdout, s); + /*<>*/ /*<>*/ caml_ml_output_char + (stdout, 10); + /*<>*/ return /*<>*/ caml_ml_flush + (stdout); + /*<>*/ } + function print_newline(param){ + /*<>*/ /*<>*/ caml_ml_output_char + (stdout, 10); + /*<>*/ return /*<>*/ caml_ml_flush + (stdout); + /*<>*/ } + function prerr_char(c){ + /*<>*/ return /*<>*/ caml_ml_output_char + (stderr, c); + /*<>*/ } + function prerr_string(s){ + /*<>*/ return output_string(stderr, s); + /*<>*/ } + function prerr_bytes(s){ + /*<>*/ return output_bytes(stderr, s); + /*<>*/ } + function prerr_int(i){ + /*<>*/ return output_string(stderr, "" + i); + /*<>*/ } + function prerr_float(f){ + /*<>*/ return output_string(stderr, string_of_float(f)); + /*<>*/ } + function prerr_endline(s){ + /*<>*/ output_string(stderr, s); + /*<>*/ /*<>*/ caml_ml_output_char + (stderr, 10); + /*<>*/ return /*<>*/ caml_ml_flush + (stderr); + /*<>*/ } + function prerr_newline(param){ + /*<>*/ /*<>*/ caml_ml_output_char + (stderr, 10); + /*<>*/ return /*<>*/ caml_ml_flush + (stderr); + /*<>*/ } + function read_line(param){ + /*<>*/ /*<>*/ caml_ml_flush(stdout); + /*<>*/ return input_line(stdin); + /*<>*/ } + function read_int(param){ + /*<>*/ return /*<>*/ caml_int_of_string + (read_line(0)); + /*<>*/ } + function read_int_opt(param){ + /*<>*/ return int_of_string_opt(read_line(0)); + /*<>*/ } + function read_float(param){ + /*<>*/ return /*<>*/ caml_float_of_string + (read_line(0)); + /*<>*/ } + function read_float_opt(param){ + /*<>*/ return float_of_string_opt(read_line(0)); + /*<>*/ } + function string_of_format(param){ + var str = param[2]; + /*<>*/ return str; + } + function symbol$1(param, _n_){ + /*<>*/ var + str2 = _n_[2], + fmt2 = _n_[1], + str1 = param[2], + fmt1 = param[1], + /*<>*/ _o_ = symbol(str1, symbol(cst$0, str2)); + /*<>*/ return [0, + /*<>*/ caml_call2 + (CamlinternalFormatBasics[3], fmt1, fmt2), + _o_]; + } + /*<>*/ /*<>*/ var + exit_function = [0, flush_all]; + function at_exit(f){ + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ f_yet_to_run = [0, 1], + /*<>*/ old_exit = + /*<>*/ caml_atomic_load(exit_function), + new_exit$0 = + function(f_yet_to_run, old_exit){ + function new_exit(param){ + /*<>*/ if(caml_atomic_cas(f_yet_to_run, 1, 0)) + /*<>*/ /*<>*/ caml_call1 + (f, 0); + /*<>*/ return /*<>*/ caml_call1 + (old_exit, 0); + /*<>*/ } + return new_exit; + }, + new_exit = new_exit$0(f_yet_to_run, old_exit), + success = caml_atomic_cas(exit_function, old_exit, new_exit), + /*<>*/ _m_ = 1 - success; + if(! _m_) /*<>*/ return _m_; + } + /*<>*/ } + /*<>*/ /*<>*/ var + do_domain_local_at_exit = + [0, + function(param){ + /*<>*/ return 0; + /*<>*/ }]; + function do_at_exit(param){ + /*<>*/ /*<>*/ caml_call1 + (do_domain_local_at_exit[1], 0); + /*<>*/ return /*<>*/ caml_call1 + (caml_atomic_load(exit_function), 0); + /*<>*/ } + function exit(retcode){ + /*<>*/ do_at_exit(0); + /*<>*/ return /*<>*/ runtime.caml_sys_exit + (retcode); + /*<>*/ } + /*<>*/ /*<>*/ runtime.caml_register_named_value + ("Pervasives.do_at_exit", do_at_exit); + var + Stdlib = + [0, + invalid_arg, + failwith, + Exit, + Match_failure, + Assert_failure, + Invalid_argument, + Failure, + Not_found, + Out_of_memory, + Stack_overflow, + Sys_error, + End_of_file, + Division_by_zero, + Sys_blocked_io, + Undefined_recursive_module, + min, + max, + abs, + max_int, + min_int, + lnot, + infinity, + neg_infinity, + nan, + max_float, + min_float, + epsilon_float, + symbol, + char_of_int, + string_of_bool, + bool_of_string_opt, + bool_of_string, + string_of_int, + int_of_string_opt, + string_of_float, + float_of_string_opt, + symbol$0, + stdin, + stdout, + stderr, + print_char, + print_string, + print_bytes, + print_int, + print_float, + print_endline, + print_newline, + prerr_char, + prerr_string, + prerr_bytes, + prerr_int, + prerr_float, + prerr_endline, + prerr_newline, + read_line, + read_int_opt, + read_int, + read_float_opt, + read_float, + open_out, + open_out_bin, + open_out_gen, + caml_ml_flush, + flush_all, + caml_ml_output_char, + output_string, + output_bytes, + output, + output_substring, + caml_ml_output_char, + runtime.caml_ml_output_int, + output_value, + runtime.caml_ml_seek_out, + runtime.caml_ml_pos_out, + caml_ml_channel_size, + close_out, + close_out_noerr, + caml_ml_set_binary_mode, + open_in, + open_in_bin, + open_in_gen, + caml_ml_input_char, + input_line, + input, + really_input, + really_input_string, + caml_ml_input_char, + runtime.caml_ml_input_int, + runtime.caml_input_value, + runtime.caml_ml_seek_in, + runtime.caml_ml_pos_in, + caml_ml_channel_size, + caml_ml_close_channel, + close_in_noerr, + caml_ml_set_binary_mode, + [0, + runtime.caml_ml_seek_out_64, + runtime.caml_ml_pos_out_64, + caml_ml_channel_size_64, + runtime.caml_ml_seek_in_64, + runtime.caml_ml_pos_in_64, + caml_ml_channel_size_64], + string_of_format, + symbol$1, + exit, + at_exit, + valid_float_lexem, + unsafe_really_input, + do_at_exit, + do_domain_local_at_exit]; + runtime.caml_register_global(45, Stdlib, "Stdlib"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Either +(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]); + } + /*<>*/ 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 left(v){ + /*<>*/ return [0, v]; + /*<>*/ } + function right(v){ + /*<>*/ return [1, v]; + /*<>*/ } + function is_left(param){ + /*<>*/ return 0 === param[0] ? 1 : 0; + /*<>*/ } + function is_right(param){ + /*<>*/ return 0 === param[0] ? 0 : 1; + /*<>*/ } + function find_left(param){ + /*<>*/ if(0 !== param[0]) + /*<>*/ return 0; + var v = param[1]; + /*<>*/ return [0, v]; + /*<>*/ } + function find_right(param){ + /*<>*/ if(0 === param[0]) + /*<>*/ return 0; + var v = param[1]; + /*<>*/ return [0, v]; + /*<>*/ } + function map_left(f, e){ + /*<>*/ if(0 !== e[0]) /*<>*/ return e; + var v = e[1]; + /*<>*/ return [0, + /*<>*/ caml_call1(f, v)]; + } + function map_right(f, e){ + /*<>*/ if(0 === e[0]) /*<>*/ return e; + var v = e[1]; + /*<>*/ return [1, + /*<>*/ caml_call1(f, v)]; + } + function map(left, right, param){ + /*<>*/ if(0 === param[0]){ + var v = param[1]; + /*<>*/ return [0, + /*<>*/ caml_call1(left, v)]; + } + var v$0 = param[1]; + /*<>*/ return [1, + /*<>*/ caml_call1(right, v$0)]; + } + function fold(left, right, param){ + /*<>*/ if(0 === param[0]){ + var v = param[1]; + /*<>*/ return /*<>*/ caml_call1 + (left, v); + } + var v$0 = param[1]; + /*<>*/ return /*<>*/ caml_call1 + (right, v$0); + } + function equal(left, right, e1, e2){ + /*<>*/ if(0 === e1[0]){ + var v1 = e1[1]; + if(0 === e2[0]){ + var v2 = e2[1]; + /*<>*/ return /*<>*/ caml_call2 + (left, v1, v2); + } + } + else{ + var v1$0 = e1[1]; + if(0 !== e2[0]){ + var v2$0 = e2[1]; + /*<>*/ return /*<>*/ caml_call2 + (right, v1$0, v2$0); + } + } + /*<>*/ return 0; + /*<>*/ } + function compare(left, right, e1, e2){ + /*<>*/ if(0 === e1[0]){ + var v1 = e1[1]; + if(0 !== e2[0]) /*<>*/ return -1; + var v2 = e2[1]; + /*<>*/ return /*<>*/ caml_call2 + (left, v1, v2); + } + var v1$0 = e1[1]; + if(0 === e2[0]) /*<>*/ return 1; + var v2$0 = e2[1]; + /*<>*/ return /*<>*/ caml_call2 + (right, v1$0, v2$0); + /*<>*/ } + var + Stdlib_Either = + [0, + left, + right, + is_left, + is_right, + find_left, + find_right, + map_left, + map_right, + map, + fold, + fold, + fold, + equal, + compare]; + runtime.caml_register_global(0, Stdlib_Either, "Stdlib__Either"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Sys +//# unitInfo: Requires: Stdlib +(function + (globalThis){ + "use strict"; + /*<>*/ var + runtime = globalThis.jsoo_runtime, + 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.0.0", + ocaml_release = [0, 5, 0, 0, 0], + Stdlib = global_data.Stdlib, + /*<>*/ executable_name = + /*<>*/ runtime.caml_sys_executable_name(0), + os_type = /*<>*/ runtime.caml_sys_get_config(0)[1], + backend_type = [0, "js_of_ocaml"], + unix = runtime.caml_sys_const_ostype_unix(0), + win32 = runtime.caml_sys_const_ostype_win32(0), + cygwin = runtime.caml_sys_const_ostype_cygwin(0), + max_array_length = runtime.caml_sys_const_max_wosize(0), + max_floatarray_length = max_array_length / 2 | 0, + max_string_length = (4 * max_array_length | 0) - 1 | 0, + cst_Stdlib_Sys_Break = "Stdlib.Sys.Break", + big_endian = 0, + word_size = 32, + int_size = 32; + function getenv_opt(s){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _d_ = [0, /*<>*/ runtime.caml_sys_getenv(s)]; + /*<>*/ return _d_; + } + catch(_e_){ + var _c_ = caml_wrap_exception(_e_); + if(_c_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_c_, 0); + } + /*<>*/ } + /*<>*/ /*<>*/ var interactive = [0, 0]; + function set_signal(sig_num, sig_beh){ /*<>*/ return 0; + /*<>*/ } + /*<>*/ var + /*<>*/ Break = + [248, cst_Stdlib_Sys_Break, runtime.caml_fresh_oo_id(0)], + sigabrt = -1, + sigalrm = -2, + sigfpe = -3, + sighup = -4, + sigill = -5, + sigint = -6, + sigkill = -7, + sigpipe = -8, + sigquit = -9, + sigsegv = -10, + sigterm = -11, + sigusr1 = -12, + sigusr2 = -13, + sigchld = -14, + sigcont = -15, + sigstop = -16, + sigtstp = -17, + sigttin = -18, + sigttou = -19, + sigvtalrm = -20, + sigprof = -21, + sigbus = -22, + sigpoll = -23, + sigsys = -24, + sigtrap = -25, + sigurg = -26, + sigxcpu = -27, + sigxfsz = -28; + function catch_break(on){ + /*<>*/ return on ? 0 : 0; + /*<>*/ } + var development_version = 0; + function Make(_b_, _a_){ /*<>*/ return [0, 1];} + /*<>*/ var + /*<>*/ Immediate64 = [0, Make], + Stdlib_Sys = + [0, + executable_name, + getenv_opt, + interactive, + os_type, + backend_type, + unix, + win32, + cygwin, + word_size, + int_size, + big_endian, + max_string_length, + max_array_length, + max_floatarray_length, + set_signal, + sigabrt, + sigalrm, + sigfpe, + sighup, + sigill, + sigint, + sigkill, + sigpipe, + sigquit, + sigsegv, + sigterm, + sigusr1, + sigusr2, + sigchld, + sigcont, + sigstop, + sigtstp, + sigttin, + sigttou, + sigvtalrm, + sigprof, + sigbus, + sigpoll, + sigsys, + sigtrap, + sigurg, + sigxcpu, + sigxfsz, + Break, + catch_break, + ocaml_version, + development_version, + ocaml_release, + runtime.caml_ml_enable_runtime_warnings, + runtime.caml_ml_runtime_warnings_enabled, + Immediate64]; + runtime.caml_register_global(4, Stdlib_Sys, "Stdlib__Sys"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Obj +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_Obj_extension_constructor$1 = "Obj.extension_constructor", + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + 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 + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Assert_failure = global_data.Assert_failure, + Stdlib_Sys = global_data.Stdlib__Sys, + cst_Obj_Ephemeron_blit_key = "Obj.Ephemeron.blit_key", + cst_Obj_Ephemeron_check_key = "Obj.Ephemeron.check_key", + cst_Obj_Ephemeron_unset_key = "Obj.Ephemeron.unset_key", + cst_Obj_Ephemeron_set_key = "Obj.Ephemeron.set_key", + cst_Obj_Ephemeron_get_key_copy = "Obj.Ephemeron.get_key_copy", + cst_Obj_Ephemeron_get_key = "Obj.Ephemeron.get_key", + cst_Obj_Ephemeron_create = "Obj.Ephemeron.create", + cst_Obj_extension_constructor$0 = cst_Obj_extension_constructor$1, + cst_Obj_extension_constructor = cst_Obj_extension_constructor$1, + _a_ = [0, "obj.ml", 97, 4]; + function is_block(a){ + /*<>*/ return 1 - (typeof a === "number" ? 1 : 0); + /*<>*/ } + var + double_field = runtime.caml_array_get, + set_double_field = runtime.caml_array_set, + first_non_constant_constructor = 0, + last_non_constant_constructor_ = 243, + forcing_tag = 244, + cont_tag = 245, + lazy_tag = 246, + closure_tag = 247, + object_tag = 248, + infix_tag = 249, + forward_tag = 250, + no_scan_tag = 251, + abstract_tag = 251, + string_tag = 252, + double_tag = 253, + double_array_tag = 254, + custom_tag = 255, + int_tag = 1000, + out_of_heap_tag = 1001, + unaligned_tag = 1002; + function info(obj){ + /*<>*/ if( /*<>*/ caml_obj_tag(obj) !== 247) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); + /*<>*/ var + /*<>*/ info = + /*<>*/ runtime.caml_obj_raw_field(obj, 1), + arity = 64 === Stdlib_Sys[9] ? info >> 56 : info >> 24, + /*<>*/ start_env = info << 8 >>> 9 | 0; + /*<>*/ return [0, arity, start_env]; + /*<>*/ } + function of_val(x){ + /*<>*/ a: + { + if + (is_block(x) + && /*<>*/ caml_obj_tag(x) !== 248 && 1 <= x.length - 1){var slot = x[1]; break a;} + var slot = x; + } + a: + { + if(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); + } + return /*<>*/ caml_obj_tag(name) === 252 + ? slot + : /*<>*/ caml_call1 + (Stdlib[1], cst_Obj_extension_constructor); + /*<>*/ } + function name(slot){ + /*<>*/ return slot[1]; + /*<>*/ } + function id(slot){ + /*<>*/ return slot[2]; + /*<>*/ } + /*<>*/ var + /*<>*/ Extension_constructor = [0, of_val, name, id], + max_ephe_length = Stdlib_Sys[13] - 2 | 0; + function create(l){ + /*<>*/ var + _g_ = 0 <= l ? 1 : 0, + _h_ = _g_ ? l <= max_ephe_length ? 1 : 0 : _g_; + if(1 - _h_) + /*<>*/ /*<>*/ caml_call1 + (Stdlib[1], cst_Obj_Ephemeron_create); + /*<>*/ return /*<>*/ runtime.caml_ephe_create + (l); + /*<>*/ } + function length(x){ + /*<>*/ return x.length - 1 - 2 | 0; + /*<>*/ } + function raise_if_invalid_offset(e, o, msg){ + /*<>*/ var + _d_ = 0 <= o ? 1 : 0, + _e_ = _d_ ? o < length(e) ? 1 : 0 : _d_, + _f_ = 1 - _e_; + return _f_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _f_; + /*<>*/ } + function get_key(e, o){ + /*<>*/ raise_if_invalid_offset + (e, o, cst_Obj_Ephemeron_get_key); + /*<>*/ return /*<>*/ runtime.caml_ephe_get_key + (e, o); + /*<>*/ } + function get_key_copy(e, o){ + /*<>*/ raise_if_invalid_offset + (e, o, cst_Obj_Ephemeron_get_key_copy); + /*<>*/ return /*<>*/ runtime.caml_ephe_get_key_copy + (e, o); + /*<>*/ } + function set_key(e, o, x){ + /*<>*/ raise_if_invalid_offset + (e, o, cst_Obj_Ephemeron_set_key); + /*<>*/ return /*<>*/ runtime.caml_ephe_set_key + (e, o, x); + /*<>*/ } + function unset_key(e, o){ + /*<>*/ raise_if_invalid_offset + (e, o, cst_Obj_Ephemeron_unset_key); + /*<>*/ return /*<>*/ runtime.caml_ephe_unset_key + (e, o); + /*<>*/ } + function check_key(e, o){ + /*<>*/ raise_if_invalid_offset + (e, o, cst_Obj_Ephemeron_check_key); + /*<>*/ return /*<>*/ runtime.caml_ephe_check_key + (e, o); + /*<>*/ } + function blit_key(e1, o1, e2, o2, l){ + /*<>*/ if + (0 <= l + && + 0 <= o1 + && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ + var + _b_ = 0 !== l ? 1 : 0, + _c_ = + _b_ + ? /*<>*/ runtime.caml_ephe_blit_key + (e1, o1, e2, o2, l) + : _b_; + /*<>*/ return _c_; + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Obj_Ephemeron_blit_key); + /*<>*/ } + var + Stdlib_Obj = + [0, + is_block, + double_field, + set_double_field, + first_non_constant_constructor, + last_non_constant_constructor_, + forcing_tag, + cont_tag, + lazy_tag, + closure_tag, + object_tag, + infix_tag, + forward_tag, + no_scan_tag, + abstract_tag, + string_tag, + double_tag, + double_array_tag, + custom_tag, + int_tag, + out_of_heap_tag, + unaligned_tag, + [0, info], + Extension_constructor, + [0, + create, + length, + get_key, + get_key_copy, + set_key, + unset_key, + check_key, + blit_key, + runtime.caml_ephe_get_data, + runtime.caml_ephe_get_data_copy, + runtime.caml_ephe_set_data, + runtime.caml_ephe_unset_data, + runtime.caml_ephe_check_data, + runtime.caml_ephe_blit_data, + max_ephe_length]]; + runtime.caml_register_global(13, Stdlib_Obj, "Stdlib__Obj"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Atomic +(function(globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_atomic_exchange = runtime.caml_atomic_exchange, + caml_atomic_fetch_add = runtime.caml_atomic_fetch_add; + function set(r, x){ + /*<>*/ caml_atomic_exchange(r, x); + return 0; + /*<>*/ } + function incr(r){ + /*<>*/ caml_atomic_fetch_add(r, 1); + return 0; + /*<>*/ } + function decr(r){ + /*<>*/ caml_atomic_fetch_add(r, -1); + return 0; + /*<>*/ } + var + _a_ = caml_atomic_fetch_add, + _b_ = runtime.caml_atomic_cas, + _c_ = caml_atomic_exchange, + _d_ = runtime.caml_atomic_load, + Stdlib_Atomic = + [0, + function(_e_){ /*<>*/ return [0, _e_];}, + _d_, + set, + _c_, + _b_, + _a_, + incr, + decr]; + runtime.caml_register_global(0, Stdlib_Atomic, "Stdlib__Atomic"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: CamlinternalLazy +//# unitInfo: Requires: Stdlib, Stdlib__Obj +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_lazy_update_to_forward = runtime.caml_lazy_update_to_forward, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + 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]); + } + /*<>*/ var + global_data = runtime.caml_get_global_data(), + Stdlib_Obj = global_data.Stdlib__Obj, + /*<>*/ Undefined = + [248, "CamlinternalLazy.Undefined", runtime.caml_fresh_oo_id(0)]; + function force_gen_lazy_block(only_val, blk){ + /*<>*/ if + (0 + !== + /*<>*/ runtime.caml_lazy_update_to_forcing + (blk)) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Undefined, 1); + if(only_val){ + /*<>*/ /*<>*/ var + closure$0 = blk[1]; + /*<>*/ blk[1] = 0; + /*<>*/ /*<>*/ var + result$0 = /*<>*/ caml_call1(closure$0, 0); + /*<>*/ blk[1] = result$0; + /*<>*/ /*<>*/ caml_lazy_update_to_forward + (blk); + /*<>*/ return result$0; + } + /*<>*/ /*<>*/ var + closure = blk[1]; + /*<>*/ blk[1] = 0; + /*<>*/ try{ + /*<>*/ /*<>*/ var + result = /*<>*/ caml_call1(closure, 0); + /*<>*/ blk[1] = result; + /*<>*/ /*<>*/ caml_lazy_update_to_forward + (blk); + /*<>*/ return result; + } + catch(e$0){ + var e = caml_wrap_exception(e$0); + /*<>*/ blk[1] = + function(param){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 0); + /*<>*/ }; + /*<>*/ /*<>*/ runtime.caml_lazy_reset_to_lazy + (blk); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 0); + } + /*<>*/ } + function force_lazy_block(blk){ + /*<>*/ return force_gen_lazy_block(0, blk); + /*<>*/ } + function force_gen(only_val, lzv){ + /*<>*/ /*<>*/ var + t = /*<>*/ runtime.caml_obj_tag(lzv); + if(t === Stdlib_Obj[12]) + /*<>*/ return lzv[1]; + if(t === Stdlib_Obj[6]) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Undefined, 1); + return t !== Stdlib_Obj[8] ? lzv : force_gen_lazy_block(only_val, lzv); + /*<>*/ } + var CamlinternalLazy = [0, Undefined, force_lazy_block, force_gen]; + runtime.caml_register_global(2, CamlinternalLazy, "CamlinternalLazy"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Lazy +//# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Obj +(function + (globalThis){ + "use strict"; + var runtime = globalThis.jsoo_runtime, 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]); + } + /*<>*/ 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); + /*<>*/ } + function from_fun(f){ + /*<>*/ /*<>*/ var + x = /*<>*/ runtime.caml_obj_block(Stdlib_Obj[8], 1); + /*<>*/ x[1] = f; + /*<>*/ return x; + /*<>*/ } + function from_val(v){ + /*<>*/ /*<>*/ var + t = /*<>*/ caml_obj_tag(v); + if + (t !== Stdlib_Obj[12] + && t !== Stdlib_Obj[8] && t !== Stdlib_Obj[6] && t !== Stdlib_Obj[16]) + /*<>*/ return v; + /*<>*/ return /*<>*/ runtime.caml_lazy_make_forward + (v); + /*<>*/ } + function is_val(l){ + /*<>*/ /*<>*/ var _i_ = Stdlib_Obj[8]; + /*<>*/ return /*<>*/ caml_obj_tag(l) + !== _i_ + ? 1 + : 0; + /*<>*/ } + function map(f, x){ + /*<>*/ return [246, + function(_f_){ + var _g_ = caml_obj_tag(x); + a: + if(250 === _g_) + var _h_ = x[1]; + else{ + if(246 !== _g_ && 244 !== _g_){var _h_ = x; break a;} + var _h_ = caml_call1(CamlinternalLazy[2], x); + } + /*<>*/ return /*<>*/ caml_call1 + (f, _h_); + }]; + /*<>*/ } + function map_val(f, x){ + /*<>*/ if(! is_val(x)) + /*<>*/ return [246, + function(_c_){ + var _d_ = caml_obj_tag(x); + a: + if(250 === _d_) + var _e_ = x[1]; + else{ + if(246 !== _d_ && 244 !== _d_){var _e_ = x; break a;} + var _e_ = caml_call1(CamlinternalLazy[2], x); + } + /*<>*/ return /*<>*/ caml_call1 + (f, _e_); + }]; + var _a_ = caml_obj_tag(x); + a: + if(250 === _a_) + var _b_ = x[1]; + else{ + if(246 !== _a_ && 244 !== _a_){var _b_ = x; break a;} + var _b_ = caml_call1(CamlinternalLazy[2], x); + } + /*<>*/ return from_val + ( /*<>*/ caml_call1(f, _b_)); + /*<>*/ } + var + Stdlib_Lazy = + [0, Undefined, map, is_val, from_val, map_val, from_fun, force_val]; + runtime.caml_register_global(2, Stdlib_Lazy, "Stdlib__Lazy"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Seq +//# unitInfo: Requires: Assert_failure, CamlinternalLazy, Stdlib, Stdlib__Atomic, Stdlib__Lazy +(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 + global_data = runtime.caml_get_global_data(), + Assert_failure = global_data.Assert_failure, + Stdlib_Atomic = global_data.Stdlib__Atomic, + CamlinternalLazy = global_data.CamlinternalLazy, + Stdlib = global_data.Stdlib, + Stdlib_Lazy = global_data.Stdlib__Lazy, + _a_ = [0, "seq.ml", 596, 4], + cst_Seq_drop = "Seq.drop", + cst_Seq_take = "Seq.take", + cst_Seq_init = "Seq.init", + cst_Stdlib_Seq_Forced_twice = "Stdlib.Seq.Forced_twice"; + function empty(param){ + /*<>*/ return 0; + /*<>*/ } + function return$0(x, param){ + /*<>*/ return [0, x, empty]; + /*<>*/ } + function cons(x, next, param){ + /*<>*/ return [0, x, next]; + /*<>*/ } + function append(seq1, seq2, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq1, 0); + if(! match) + /*<>*/ return /*<>*/ caml_call1(seq2, 0); + var next = match[2], x = match[1]; + /*<>*/ return [0, + x, + function(_aM_){ /*<>*/ return append(next, seq2, _aM_);}]; + /*<>*/ } + function map(f, seq, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq, 0); + if(! match) /*<>*/ return 0; + var next = match[2], x = match[1]; + /*<>*/ function _aK_(_aL_){ + /*<>*/ return map(f, next, _aL_); + } + /*<>*/ return [0, + /*<>*/ caml_call1(f, x), + _aK_]; + /*<>*/ } + function filter_map(f, seq, param){ + /*<>*/ var seq$0 = seq; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + next = match[2], + x = match[1], + /*<>*/ match$0 = /*<>*/ caml_call1(f, x); + if(match$0){ + var y = match$0[1]; + /*<>*/ return [0, + y, + function(_aJ_){ /*<>*/ return filter_map(f, next, _aJ_);}]; + } + var seq$0 = next; + } + /*<>*/ } + function filter(f, seq, param){ + /*<>*/ var seq$0 = seq; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq$0, 0); + if(! match) /*<>*/ return 0; + var next = match[2], x = match[1]; + /*<>*/ if( /*<>*/ caml_call1(f, x)) + /*<>*/ return [0, + x, + function(_aI_){ /*<>*/ return filter(f, next, _aI_);}]; + var seq$0 = next; + } + /*<>*/ } + function concat(seq, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq, 0); + if(! match) /*<>*/ return 0; + var next = match[2], x = match[1], _aG_ = 0; + /*<>*/ return append + (x, function(_aH_){ /*<>*/ return concat(next, _aH_);}, _aG_); + /*<>*/ } + function flat_map(f, seq, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq, 0); + if(! match) /*<>*/ return 0; + var next = match[2], x = match[1], _aD_ = 0; + /*<>*/ function _aE_(_aF_){ + /*<>*/ return flat_map(f, next, _aF_); + } + /*<>*/ return append + ( /*<>*/ caml_call1(f, x), _aE_, _aD_); + /*<>*/ } + function fold_left(f, acc, seq){ + /*<>*/ var acc$0 = acc, seq$0 = seq; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq$0, 0); + if(! match) /*<>*/ return acc$0; + /*<>*/ var + next = match[2], + x = match[1], + /*<>*/ acc$1 = + /*<>*/ caml_call2(f, acc$0, x), + acc$0 = acc$1, + seq$0 = next; + } + /*<>*/ } + function iter(f, seq){ + /*<>*/ var seq$0 = seq; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq$0, 0); + if(! match) /*<>*/ return 0; + var next = match[2], x = match[1]; + /*<>*/ /*<>*/ caml_call1(f, x); + var seq$0 = next; + } + /*<>*/ } + function unfold(f, u, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(f, u); + if(! match) /*<>*/ return 0; + var match$0 = match[1], u$0 = match$0[2], x = match$0[1]; + /*<>*/ return [0, + x, + function(_aC_){ /*<>*/ return unfold(f, u$0, _aC_);}]; + /*<>*/ } + function is_empty(xs){ + /*<>*/ return /*<>*/ caml_call1(xs, 0) ? 0 : 1; + /*<>*/ } + function uncons(xs){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + var xs$0 = match[2], x = match[1]; + /*<>*/ return [0, [0, x, xs$0]]; + /*<>*/ } + function length(xs$1){ + /*<>*/ var accu = 0, xs = xs$1; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return accu; + /*<>*/ var + xs$0 = match[2], + /*<>*/ accu$0 = accu + 1 | 0, + accu = accu$0, + xs = xs$0; + } + /*<>*/ } + function iteri(f, xs$1){ + /*<>*/ var i = 0, xs = xs$1; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + var xs$0 = match[2], x = match[1]; + /*<>*/ /*<>*/ caml_call2(f, i, x); + var i$0 = i + 1 | 0, i = i$0, xs = xs$0; + } + /*<>*/ } + function fold_lefti(f, accu$1, xs$1){ + /*<>*/ var accu = accu$1, i = 0, xs = xs$1; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return accu; + /*<>*/ var + xs$0 = match[2], + x = match[1], + /*<>*/ accu$0 = + /*<>*/ caml_call3(f, accu, i, x), + /*<>*/ i$0 = i + 1 | 0, + accu = accu$0, + i = i$0, + xs = xs$0; + } + /*<>*/ } + function for_all(p, xs){ + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 1; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ _aB_ = /*<>*/ caml_call1(p, x); + /*<>*/ if(! _aB_) /*<>*/ return _aB_; + var xs$0 = xs$1; + } + /*<>*/ } + function exists(p, xs){ + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ _aA_ = /*<>*/ caml_call1(p, x); + /*<>*/ if(_aA_) /*<>*/ return _aA_; + var xs$0 = xs$1; + } + /*<>*/ } + function find(p, xs){ + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + var xs$1 = match[2], x = match[1]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ return [0, x]; + var xs$0 = xs$1; + } + /*<>*/ } + function find_map(f, xs){ + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ result = /*<>*/ caml_call1(f, x); + if(result) /*<>*/ return result; + var xs$0 = xs$1; + } + /*<>*/ } + function iter2(f, xs, ys){ + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(! match$0) /*<>*/ return 0; + var ys$1 = match$0[2], y = match$0[1]; + /*<>*/ /*<>*/ caml_call2(f, x, y); + var xs$0 = xs$1, ys$0 = ys$1; + } + /*<>*/ } + function fold_left2(f, accu, xs, ys){ + /*<>*/ var accu$0 = accu, xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return accu$0; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(! match$0) /*<>*/ return accu$0; + /*<>*/ var + ys$1 = match$0[2], + y = match$0[1], + /*<>*/ accu$1 = + /*<>*/ caml_call3(f, accu$0, x, y), + accu$0 = accu$1, + xs$0 = xs$1, + ys$0 = ys$1; + } + /*<>*/ } + function for_all2(f, xs, ys){ + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 1; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(! match$0) /*<>*/ return 1; + /*<>*/ var + ys$1 = match$0[2], + y = match$0[1], + /*<>*/ _az_ = /*<>*/ caml_call2(f, x, y); + /*<>*/ if(! _az_) /*<>*/ return _az_; + var xs$0 = xs$1, ys$0 = ys$1; + } + /*<>*/ } + function exists2(f, xs, ys){ + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(! match$0) /*<>*/ return 0; + /*<>*/ var + ys$1 = match$0[2], + y = match$0[1], + /*<>*/ _ay_ = /*<>*/ caml_call2(f, x, y); + /*<>*/ if(_ay_) /*<>*/ return _ay_; + var xs$0 = xs$1, ys$0 = ys$1; + } + /*<>*/ } + function equal(eq, xs, ys){ + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ match = /*<>*/ caml_call1(xs$0, 0), + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(match){ + if(match$0){ + /*<>*/ var + ys$1 = match$0[2], + y = match$0[1], + xs$1 = match[2], + x = match[1], + /*<>*/ _ax_ = + /*<>*/ caml_call2(eq, x, y); + /*<>*/ if(! _ax_) /*<>*/ return _ax_; + var xs$0 = xs$1, ys$0 = ys$1; + continue; + } + } + else if(! match$0) /*<>*/ return 1; + /*<>*/ return 0; + } + /*<>*/ } + function compare(cmp, xs, ys){ + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ match = /*<>*/ caml_call1(xs$0, 0), + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(! match) return match$0 ? -1 : 0; + var xs$1 = match[2], x = match[1]; + if(! match$0) /*<>*/ return 1; + /*<>*/ var + ys$1 = match$0[2], + y = match$0[1], + /*<>*/ c = /*<>*/ caml_call2(cmp, x, y); + /*<>*/ if(0 !== c) /*<>*/ return c; + var xs$0 = xs$1, ys$0 = ys$1; + } + /*<>*/ } + function init_aux(f, i, j, param){ + /*<>*/ if(i >= j) /*<>*/ return 0; + var _au_ = i + 1 | 0; + /*<>*/ function _av_(_aw_){ + /*<>*/ return init_aux(f, _au_, j, _aw_); + } + /*<>*/ return [0, + /*<>*/ caml_call1(f, i), + _av_]; + /*<>*/ } + function init(n, f){ + /*<>*/ if(0 > n) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Seq_init); + var _as_ = 0; + /*<>*/ return function(_at_){ + /*<>*/ return init_aux(f, _as_, n, _at_);}; + /*<>*/ } + function repeat(x, param){ + /*<>*/ return [0, + x, + function(_ar_){ /*<>*/ return repeat(x, _ar_);}]; + /*<>*/ } + function forever(f, param){ + /*<>*/ function _ap_(_aq_){ + /*<>*/ return forever(f, _aq_); + } + /*<>*/ return [0, + /*<>*/ caml_call1(f, 0), + _ap_]; + /*<>*/ } + function cycle_nonempty(xs, param){ + /*<>*/ /*<>*/ var _an_ = 0; + /*<>*/ return append + (xs, + function(_ao_){ /*<>*/ return cycle_nonempty(xs, _ao_);}, + _an_); + /*<>*/ } + function cycle(xs, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + var xs$0 = match[2], x = match[1]; + /*<>*/ function _ak_(_am_){ + /*<>*/ return cycle_nonempty(xs, _am_); + } + /*<>*/ return [0, + x, + function(_al_){ /*<>*/ return append(xs$0, _ak_, _al_);}]; + /*<>*/ } + function iterate1(f, x, param){ + /*<>*/ /*<>*/ var + y = /*<>*/ caml_call1(f, x); + /*<>*/ return [0, + y, + function(_aj_){ /*<>*/ return iterate1(f, y, _aj_);}]; + /*<>*/ } + function iterate(f, x){ + /*<>*/ function _ag_(_ai_){ + /*<>*/ return iterate1(f, x, _ai_); + } + /*<>*/ return function(_ah_){ + /*<>*/ return [0, x, _ag_];}; + /*<>*/ } + function mapi_aux(f, i, xs, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$0 = match[2], + x = match[1], + /*<>*/ _ad_ = i + 1 | 0; + /*<>*/ function _ae_(_af_){ + /*<>*/ return mapi_aux(f, _ad_, xs$0, _af_); + } + /*<>*/ return [0, + /*<>*/ caml_call2(f, i, x), + _ae_]; + /*<>*/ } + function mapi(f, xs){ + /*<>*/ var _ab_ = 0; + /*<>*/ return function(_ac_){ + /*<>*/ return mapi_aux(f, _ab_, xs, _ac_);}; + /*<>*/ } + function tail_scan(f, s, xs, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$0 = match[2], + x = match[1], + /*<>*/ s$0 = /*<>*/ caml_call2(f, s, x); + /*<>*/ return [0, + s$0, + function(_aa_){ /*<>*/ return tail_scan(f, s$0, xs$0, _aa_);}]; + /*<>*/ } + function scan(f, s, xs){ + /*<>*/ function _Z_(_$_){ + /*<>*/ return tail_scan(f, s, xs, _$_); + } + /*<>*/ return function(___){ + /*<>*/ return [0, s, _Z_];}; + /*<>*/ } + function take_aux(n, xs){ + /*<>*/ return 0 === n + ? empty + : function + (param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + var xs$0 = match[2], x = match[1]; + /*<>*/ return [0, x, take_aux(n - 1 | 0, xs$0)]; + /*<>*/ }; + /*<>*/ } + function take(n, xs){ + /*<>*/ if(n < 0) + /*<>*/ /*<>*/ caml_call1 + (Stdlib[1], cst_Seq_take); + /*<>*/ return take_aux(n, xs); + /*<>*/ } + function drop(n, xs){ + /*<>*/ return 0 <= n + ? 0 + === n + ? xs + : function + (param){ + /*<>*/ var n$0 = n, xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$1 = match[2], + /*<>*/ n$1 = n$0 - 1 | 0; + /*<>*/ if(0 === n$1) + /*<>*/ return /*<>*/ caml_call1 + (xs$1, 0); + var n$0 = n$1, xs$0 = xs$1; + } + /*<>*/ } + : /*<>*/ caml_call1(Stdlib[1], cst_Seq_drop); + /*<>*/ } + function take_while(p, xs, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + var xs$0 = match[2], x = match[1]; + /*<>*/ return /*<>*/ caml_call1(p, x) + ? [0, + x, + function(_Y_){ /*<>*/ return take_while(p, xs$0, _Y_);}] + : 0; + /*<>*/ } + function drop_while(p, xs, param){ + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + node = /*<>*/ caml_call1(xs$0, 0); + if(! node) /*<>*/ return 0; + var xs$1 = node[2], x = node[1]; + /*<>*/ if(! /*<>*/ caml_call1(p, x)) + /*<>*/ return node; + var xs$0 = xs$1; + } + /*<>*/ } + function group(eq, xs, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$0 = match[2], + x = match[1], + /*<>*/ _P_ = /*<>*/ caml_call1(eq, x); + /*<>*/ function _Q_(_X_){ + /*<>*/ return drop_while(_P_, xs$0, _X_); + } + /*<>*/ function _R_(_W_){ + /*<>*/ return group(eq, _Q_, _W_); + } + /*<>*/ /*<>*/ var + _S_ = /*<>*/ caml_call1(eq, x); + /*<>*/ function _T_(_V_){ + /*<>*/ return take_while(_S_, xs$0, _V_); + } + /*<>*/ return [0, + function(_U_){ /*<>*/ return [0, x, _T_];}, + _R_]; + /*<>*/ } + /*<>*/ var + /*<>*/ Forced_twice = + [248, cst_Stdlib_Seq_Forced_twice, runtime.caml_fresh_oo_id(0)], + /*<>*/ to_lazy = Stdlib_Lazy[6]; + function failure(param){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Forced_twice, 1); + /*<>*/ } + function memoize(xs){ + function s$0(param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + var xs$0 = match[2], x = match[1]; + /*<>*/ return [0, x, memoize(xs$0)]; + /*<>*/ } + /*<>*/ /*<>*/ var + s = /*<>*/ caml_call1(to_lazy, s$0); + /*<>*/ return function(_O_){ + var _N_ = runtime.caml_obj_tag(s); + if(250 === _N_) return s[1]; + if(246 !== _N_ && 244 !== _N_) /*<>*/ return s; + /*<>*/ return /*<>*/ caml_call1 + (CamlinternalLazy[2], s);}; + /*<>*/ } + function once(xs){ + function f(param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + var xs$0 = match[2], x = match[1]; + /*<>*/ return [0, x, once(xs$0)]; + /*<>*/ } + /*<>*/ /*<>*/ var + action = /*<>*/ caml_call1(Stdlib_Atomic[1], f); + /*<>*/ return function(param){ + /*<>*/ /*<>*/ var + f = /*<>*/ caml_call2(Stdlib_Atomic[4], action, failure); + /*<>*/ return /*<>*/ caml_call1(f, 0); /*<>*/ }; + /*<>*/ } + function zip(xs, ys, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$0 = match[2], + x = match[1], + /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); + if(! match$0) /*<>*/ return 0; + var ys$0 = match$0[2], y = match$0[1]; + /*<>*/ return [0, + [0, x, y], + function(_M_){ /*<>*/ return zip(xs$0, ys$0, _M_);}]; + /*<>*/ } + function map2(f, xs, ys, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$0 = match[2], + x = match[1], + /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); + if(! match$0) /*<>*/ return 0; + var ys$0 = match$0[2], y = match$0[1]; + /*<>*/ function _K_(_L_){ + /*<>*/ return map2(f, xs$0, ys$0, _L_); + } + /*<>*/ return [0, + /*<>*/ caml_call2(f, x, y), + _K_]; + /*<>*/ } + function interleave(xs, ys, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) + /*<>*/ return /*<>*/ caml_call1(ys, 0); + var xs$0 = match[2], x = match[1]; + /*<>*/ return [0, + x, + function(_J_){ /*<>*/ return interleave(ys, xs$0, _J_);}]; + /*<>*/ } + function sorted_merge1(cmp, x, xs, y, ys){ + /*<>*/ return 0 + < /*<>*/ caml_call2(cmp, x, y) + ? [0, + y, + function(_H_){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(ys, 0); + if(! match) /*<>*/ return [0, x, xs]; + var ys$0 = match[2], y = match[1]; + /*<>*/ return sorted_merge1(cmp, x, xs, y, ys$0); + }] + : [0, + x, + function(_I_){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return [0, y, ys]; + var xs$0 = match[2], x = match[1]; + /*<>*/ return sorted_merge1(cmp, x, xs$0, y, ys); + }]; + /*<>*/ } + function sorted_merge(cmp, xs, ys, param){ + /*<>*/ var + /*<>*/ match = /*<>*/ caml_call1(xs, 0), + /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); + if(match){ + if(match$0){ + var ys$0 = match$0[2], y = match$0[1], xs$0 = match[2], x = match[1]; + /*<>*/ return sorted_merge1(cmp, x, xs$0, y, ys$0); + } + var c = match; + } + else{if(! match$0) /*<>*/ return 0; var c = match$0;} + /*<>*/ return c; + /*<>*/ } + function map_fst(xys, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xys, 0); + if(! match) /*<>*/ return 0; + var xys$0 = match[2], x = match[1][1]; + /*<>*/ return [0, + x, + function(_G_){ /*<>*/ return map_fst(xys$0, _G_);}]; + /*<>*/ } + function map_snd(xys, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xys, 0); + if(! match) /*<>*/ return 0; + var xys$0 = match[2], y = match[1][2]; + /*<>*/ return [0, + y, + function(_F_){ /*<>*/ return map_snd(xys$0, _F_);}]; + /*<>*/ } + function unzip(xys){ + /*<>*/ function _C_(_E_){ + /*<>*/ return map_snd(xys, _E_); + } + /*<>*/ return [0, + function(_D_){ /*<>*/ return map_fst(xys, _D_);}, + _C_]; + /*<>*/ } + function filter_map_find_left_map(f, xs, param){ + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ match$0 = /*<>*/ caml_call1(f, x); + if(0 === match$0[0]){ + var y = match$0[1]; + /*<>*/ return [0, + y, + function(_B_){ + /*<>*/ return filter_map_find_left_map(f, xs$1, _B_); + }]; + } + var xs$0 = xs$1; + } + /*<>*/ } + function filter_map_find_right_map(f, xs, param){ + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ match$0 = /*<>*/ caml_call1(f, x); + if(0 !== match$0[0]){ + var z = match$0[1]; + /*<>*/ return [0, + z, + function(_A_){ + /*<>*/ return filter_map_find_right_map(f, xs$1, _A_); + }]; + } + var xs$0 = xs$1; + } + /*<>*/ } + function partition_map(f, xs){ + /*<>*/ function _x_(_z_){ + /*<>*/ return filter_map_find_right_map(f, xs, _z_); + } + /*<>*/ return [0, + function(_y_){ + /*<>*/ return filter_map_find_left_map(f, xs, _y_); + }, + _x_]; + /*<>*/ } + function partition(p, xs){ + function _t_(x){ + /*<>*/ return 1 - /*<>*/ caml_call1(p, x); + /*<>*/ } + /*<>*/ function _u_(_w_){ + /*<>*/ return filter(_t_, xs, _w_); + } + /*<>*/ return [0, + function(_v_){ /*<>*/ return filter(p, xs, _v_);}, + _u_]; + /*<>*/ } + function peel(xss){ + /*<>*/ return unzip + (function(_s_){ /*<>*/ return filter_map(uncons, xss, _s_);}); + /*<>*/ } + function transpose(xss, param){ + /*<>*/ var + /*<>*/ match = peel(xss), + tails = match[2], + heads = match[1]; + /*<>*/ if(! is_empty(heads)) + /*<>*/ return [0, + heads, + function(_r_){ /*<>*/ return transpose(tails, _r_);}]; + /*<>*/ if(is_empty(tails)) /*<>*/ return 0; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); + /*<>*/ } + function _b_(remainders, xss, param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xss, 0); + if(! match) /*<>*/ return transpose(remainders, 0); + /*<>*/ var + xss$0 = match[2], + xs = match[1], + /*<>*/ match$0 = /*<>*/ caml_call1(xs, 0); + if(match$0){ + /*<>*/ var + xs$0 = match$0[2], + x = match$0[1], + /*<>*/ match$1 = peel(remainders), + tails = match$1[2], + heads = match$1[1], + /*<>*/ _l_ = + function(_q_){ /*<>*/ return [0, xs$0, tails];}, + /*<>*/ _m_ = + function(_p_){ /*<>*/ return _b_(_l_, xss$0, _p_);}; + /*<>*/ return [0, + function(_o_){ /*<>*/ return [0, x, heads];}, + _m_]; + } + /*<>*/ var + /*<>*/ match$2 = peel(remainders), + tails$0 = match$2[2], + heads$0 = match$2[1]; + /*<>*/ return [0, + heads$0, + function(_n_){ /*<>*/ return _b_(tails$0, xss$0, _n_);}]; + /*<>*/ } + function map_product(f, xs, ys){ + function _f_(x){ + function _j_(y){ + /*<>*/ return /*<>*/ caml_call2(f, x, y); + /*<>*/ } + /*<>*/ return function(_k_){ + /*<>*/ return map(_j_, ys, _k_);}; + /*<>*/ } + /*<>*/ function xss(_i_){ + /*<>*/ return map(_f_, xs, _i_); + } + /*<>*/ function _e_(_h_){ + /*<>*/ return _b_(empty, xss, _h_); + } + /*<>*/ return function(_g_){ + /*<>*/ return concat(_e_, _g_);}; + /*<>*/ } + function product(xs, ys){ + /*<>*/ return map_product + (function(x, y){ + /*<>*/ return [0, x, y]; + /*<>*/ }, + xs, + ys); + /*<>*/ } + function of_dispenser(it){ + function c(param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(it, 0); + if(! match) /*<>*/ return 0; + var x = match[1]; + /*<>*/ return [0, x, c]; + /*<>*/ } + /*<>*/ return c; + /*<>*/ } + function to_dispenser(xs){ + /*<>*/ /*<>*/ var s = [0, xs]; + /*<>*/ return function(param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(s[1], 0); + if(! match) /*<>*/ return 0; + var xs = match[2], x = match[1]; + s[1] = xs; + /*<>*/ return [0, x]; /*<>*/ }; + /*<>*/ } + function ints(i, param){ + /*<>*/ /*<>*/ var _c_ = i + 1 | 0; + /*<>*/ return [0, + i, + function(_d_){ /*<>*/ return ints(_c_, _d_);}]; + /*<>*/ } + var + Stdlib_Seq = + [0, + is_empty, + uncons, + length, + iter, + fold_left, + iteri, + fold_lefti, + for_all, + exists, + find, + find_map, + iter2, + fold_left2, + for_all2, + exists2, + equal, + compare, + empty, + return$0, + cons, + init, + unfold, + repeat, + forever, + cycle, + iterate, + map, + mapi, + filter, + filter_map, + scan, + take, + drop, + take_while, + drop_while, + group, + memoize, + Forced_twice, + once, + transpose, + append, + concat, + flat_map, + flat_map, + zip, + map2, + interleave, + sorted_merge, + product, + map_product, + unzip, + unzip, + partition_map, + partition, + of_dispenser, + to_dispenser, + ints]; + runtime.caml_register_global(10, Stdlib_Seq, "Stdlib__Seq"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Option +//# unitInfo: Requires: Stdlib, Stdlib__Seq +(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]); + } + /*<>*/ 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_Seq = global_data.Stdlib__Seq, + Stdlib = global_data.Stdlib, + cst_option_is_None = "option is None", + none = 0; + function some(v){ + /*<>*/ return [0, v]; + /*<>*/ } + function value(o, default$0){ + /*<>*/ if(! o) + /*<>*/ return default$0; + var v = o[1]; + /*<>*/ return v; + /*<>*/ } + function get(param){ + /*<>*/ if(! param) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_option_is_None); + var v = param[1]; + /*<>*/ return v; + /*<>*/ } + function bind(o, f){ + /*<>*/ if(! o) /*<>*/ return 0; + var v = o[1]; + /*<>*/ return /*<>*/ caml_call1(f, v); + /*<>*/ } + function join(param){ + /*<>*/ if(! param) /*<>*/ return 0; + var o = param[1]; + /*<>*/ return o; + /*<>*/ } + function map(f, o){ + /*<>*/ if(! o) /*<>*/ return 0; + var v = o[1]; + /*<>*/ return [0, + /*<>*/ caml_call1(f, v)]; + /*<>*/ } + function fold(none, some, param){ + /*<>*/ if(! param) /*<>*/ return none; + var v = param[1]; + /*<>*/ return /*<>*/ caml_call1 + (some, v); + } + function iter(f, param){ + /*<>*/ if(! param) /*<>*/ return 0; + var v = param[1]; + /*<>*/ return /*<>*/ caml_call1(f, v); + } + function is_none(param){ + /*<>*/ return param ? 0 : 1; + /*<>*/ } + function is_some(param){ + /*<>*/ return param ? 1 : 0; + /*<>*/ } + function equal(eq, o0, o1){ + /*<>*/ if(o0){ + if(o1){ + var v1 = o1[1], v0 = o0[1]; + /*<>*/ return /*<>*/ caml_call2 + (eq, v0, v1); + } + } + else if(! o1) /*<>*/ return 1; + /*<>*/ return 0; + /*<>*/ } + function compare(cmp, o0, o1){ + /*<>*/ if(! o0) return o1 ? -1 : 0; + var v0 = o0[1]; + if(! o1) /*<>*/ return 1; + var v1 = o1[1]; + /*<>*/ return /*<>*/ caml_call2 + (cmp, v0, v1); + /*<>*/ } + function to_result(none, param){ + /*<>*/ if(! param) /*<>*/ return [1, none]; + var v = param[1]; + /*<>*/ return [0, v]; + } + function to_list(param){ + /*<>*/ if(! param) /*<>*/ return 0; + var v = param[1]; + /*<>*/ return [0, v, 0]; + /*<>*/ } + function to_seq(param){ + /*<>*/ if(! param) + /*<>*/ return Stdlib_Seq[18]; + var v = param[1]; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Seq[19], v); + /*<>*/ } + var + Stdlib_Option = + [0, + none, + some, + value, + get, + bind, + join, + map, + fold, + iter, + is_none, + is_some, + equal, + compare, + to_result, + to_list, + to_seq]; + runtime.caml_register_global(3, Stdlib_Option, "Stdlib__Option"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Result +//# unitInfo: Requires: Stdlib, Stdlib__Seq +(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]); + } + /*<>*/ 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_Seq = global_data.Stdlib__Seq, + Stdlib = global_data.Stdlib, + cst_result_is_Ok = "result is Ok _", + cst_result_is_Error = "result is Error _"; + function ok(v){ + /*<>*/ return [0, v]; + /*<>*/ } + function error(e){ + /*<>*/ return [1, e]; + /*<>*/ } + function value(r, default$0){ + /*<>*/ if(0 !== r[0]) + /*<>*/ return default$0; + var v = r[1]; + /*<>*/ return v; + /*<>*/ } + function get_ok(param){ + /*<>*/ if(0 !== param[0]) + /*<>*/ return /*<>*/ caml_call1 + (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); + var e = param[1]; + /*<>*/ return e; + /*<>*/ } + function bind(r, f){ + /*<>*/ if(0 !== r[0]) /*<>*/ return r; + var v = r[1]; + /*<>*/ return /*<>*/ caml_call1(f, v); + /*<>*/ } + function join(e){ + /*<>*/ if(0 !== e[0]) /*<>*/ return e; + var r = e[1]; + /*<>*/ return r; + /*<>*/ } + function map(f, e){ + /*<>*/ if(0 !== e[0]) /*<>*/ return e; + var v = e[1]; + /*<>*/ return [0, + /*<>*/ caml_call1(f, v)]; + } + function map_error(f, v){ + /*<>*/ if(0 === v[0]) /*<>*/ return v; + var e = v[1]; + /*<>*/ return [1, + /*<>*/ caml_call1(f, e)]; + } + function fold(ok, error, param){ + /*<>*/ if(0 === param[0]){ + var v = param[1]; + /*<>*/ return /*<>*/ caml_call1 + (ok, v); + } + var e = param[1]; + /*<>*/ return /*<>*/ caml_call1 + (error, e); + } + function iter(f, param){ + /*<>*/ if(0 !== param[0]) /*<>*/ return 0; + var v = param[1]; + /*<>*/ return /*<>*/ caml_call1(f, v); + } + function iter_error(f, param){ + /*<>*/ if(0 === param[0]) /*<>*/ return 0; + var e = param[1]; + /*<>*/ return /*<>*/ caml_call1(f, e); + } + function is_ok(param){ + /*<>*/ return 0 === param[0] ? 1 : 0; + /*<>*/ } + function is_error(param){ + /*<>*/ return 0 === param[0] ? 0 : 1; + /*<>*/ } + function equal(ok, error, r0, r1){ + /*<>*/ if(0 === r0[0]){ + var v0 = r0[1]; + if(0 === r1[0]){ + var v1 = r1[1]; + /*<>*/ return /*<>*/ caml_call2 + (ok, v0, v1); + } + } + else{ + var e0 = r0[1]; + if(0 !== r1[0]){ + var e1 = r1[1]; + /*<>*/ return /*<>*/ caml_call2 + (error, e0, e1); + } + } + /*<>*/ return 0; + /*<>*/ } + function compare(ok, error, r0, r1){ + /*<>*/ if(0 === r0[0]){ + var v0 = r0[1]; + if(0 !== r1[0]) /*<>*/ return -1; + var v1 = r1[1]; + /*<>*/ return /*<>*/ caml_call2 + (ok, v0, v1); + } + var e0 = r0[1]; + if(0 === r1[0]) /*<>*/ return 1; + var e1 = r1[1]; + /*<>*/ return /*<>*/ caml_call2 + (error, e0, e1); + /*<>*/ } + function to_option(param){ + /*<>*/ if(0 !== param[0]) + /*<>*/ return 0; + var v = param[1]; + /*<>*/ return [0, v]; + /*<>*/ } + function to_list(param){ + /*<>*/ if(0 !== param[0]) + /*<>*/ return 0; + var v = param[1]; + /*<>*/ return [0, v, 0]; + /*<>*/ } + function to_seq(param){ + /*<>*/ if(0 !== param[0]) + /*<>*/ return Stdlib_Seq[18]; + var v = param[1]; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Seq[19], v); + /*<>*/ } + var + Stdlib_Result = + [0, + ok, + error, + value, + get_ok, + get_error, + bind, + join, + map, + map_error, + fold, + iter, + iter_error, + is_ok, + is_error, + equal, + compare, + to_option, + to_list, + to_seq]; + runtime.caml_register_global(4, Stdlib_Result, "Stdlib__Result"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Bool +(function(globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_true = "true", + cst_false = "false"; + function equal(_e_, _d_){ /*<>*/ return _e_ === _d_ ? 1 : 0;} + var compare = runtime.caml_int_compare; + function to_float(param){ + /*<>*/ return param ? 1. : 0.; + /*<>*/ } + function to_string(param){ + /*<>*/ return param ? cst_true : cst_false; + /*<>*/ } + function _a_(_c_){ /*<>*/ return _c_;} + var + Stdlib_Bool = + [0, + function(_b_){ /*<>*/ return 1 - _b_;}, + equal, + compare, + _a_, + to_float, + to_string]; + runtime.caml_register_global(4, Stdlib_Bool, "Stdlib__Bool"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Char +//# unitInfo: Requires: Stdlib +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, + caml_create_bytes = runtime.caml_create_bytes, + 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 + global_data = runtime.caml_get_global_data(), + cst = "\\\\", + cst$0 = "\\'", + Stdlib = global_data.Stdlib, + cst_b = "\\b", + cst_t = "\\t", + cst_n = "\\n", + cst_r = "\\r", + cst_Char_chr = "Char.chr"; + function chr(n){ + /*<>*/ if(0 <= n && 255 >= n) + /*<>*/ return n; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Char_chr); + /*<>*/ } + function escaped(c){ + /*<>*/ a: + { + if(40 <= c){ + if(92 === c) /*<>*/ return cst; + if(127 > c) break a; + } + else{ + if(32 <= c){if(39 <= c) /*<>*/ return cst$0; break a;} + if(14 > c) + switch(c){ + case 8: + /*<>*/ return cst_b; + case 9: + /*<>*/ return cst_t; + case 10: + /*<>*/ return cst_n; + case 13: + /*<>*/ return cst_r; + } + } + /*<>*/ /*<>*/ var + s = /*<>*/ caml_create_bytes(4); + caml_bytes_unsafe_set(s, 0, 92); + caml_bytes_unsafe_set(s, 1, 48 + (c / 100 | 0) | 0); + caml_bytes_unsafe_set(s, 2, 48 + ((c / 10 | 0) % 10 | 0) | 0); + caml_bytes_unsafe_set(s, 3, 48 + (c % 10 | 0) | 0); + return caml_string_of_bytes(s); + } + /*<>*/ /*<>*/ var + s$0 = /*<>*/ caml_create_bytes(1); + caml_bytes_unsafe_set(s$0, 0, c); + return caml_string_of_bytes(s$0); + /*<>*/ } + function lowercase_ascii(c){ + /*<>*/ return 25 < c - 65 >>> 0 ? c : c + 32 | 0; + /*<>*/ } + function uppercase_ascii(c){ + /*<>*/ return 25 < c - 97 >>> 0 ? c : c - 32 | 0; + /*<>*/ } + function compare(c1, c2){ + /*<>*/ return c1 - c2 | 0; + /*<>*/ } + function equal(c1, c2){ + /*<>*/ return 0 === (c1 - c2 | 0) ? 1 : 0; + /*<>*/ } + var + Stdlib_Char = + [0, chr, escaped, lowercase_ascii, uppercase_ascii, compare, equal]; + runtime.caml_register_global(8, Stdlib_Char, "Stdlib__Char"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Uchar +//# unitInfo: Requires: Assert_failure, Stdlib +(function + (globalThis){ + "use strict"; + var + 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 + global_data = runtime.caml_get_global_data(), + err_no_pred = "U+0000 has no predecessor", + err_no_succ = "U+10FFFF has no successor", + Assert_failure = global_data.Assert_failure, + Stdlib = global_data.Stdlib, + _d_ = [0, cst_uchar_ml, 88, 18], + _c_ = [0, cst_uchar_ml, 91, 7], + _b_ = [0, cst_uchar_ml, 80, 18], + _a_ = [0, cst_uchar_ml, 85, 7], + cst_is_not_a_latin1_character = " is not a latin1 character", + cst_U = "U+", + cst_is_not_an_Unicode_scalar_v = " is not an Unicode scalar value", + min = 0, + max = 1114111, + lo_bound = 55295, + hi_bound = 57344, + bom = 65279, + rep = 65533; + function succ(u){ + /*<>*/ return u === 55295 + ? hi_bound + : u === 1114111 ? caml_call1(Stdlib[1], err_no_succ) : u + 1 | 0; + /*<>*/ } + function pred(u){ + /*<>*/ return u === 57344 + ? lo_bound + : u === 0 ? caml_call1(Stdlib[1], err_no_pred) : u - 1 | 0; + /*<>*/ } + function is_valid(i){ + /*<>*/ var + _o_ = 0 <= i ? 1 : 0, + _p_ = _o_ ? i <= 55295 ? 1 : 0 : _o_; + if(_p_) + var _q_ = _p_; + else + var _r_ = 57344 <= i ? 1 : 0, _q_ = _r_ ? i <= 1114111 ? 1 : 0 : _r_; + return _q_; + /*<>*/ } + function of_int(i){ + /*<>*/ if(is_valid(i)) /*<>*/ return i; + /*<>*/ /*<>*/ var + _n_ = + /*<>*/ caml_call2 + (Stdlib[28], + /*<>*/ caml_format_int("%X", i), + cst_is_not_an_Unicode_scalar_v); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], _n_); + /*<>*/ } + function is_char(u){ + /*<>*/ return u < 256 ? 1 : 0; + /*<>*/ } + function of_char(c){ + /*<>*/ return c; + /*<>*/ } + function to_char(u){ + /*<>*/ if(255 >= u) /*<>*/ return u; + /*<>*/ var + /*<>*/ _l_ = + /*<>*/ caml_call2 + (Stdlib[28], + /*<>*/ caml_format_int("%04X", u), + cst_is_not_a_latin1_character), + /*<>*/ _m_ = + /*<>*/ caml_call2(Stdlib[28], cst_U, _l_); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], _m_); + /*<>*/ } + function unsafe_to_char(_k_){ /*<>*/ return _k_;} + function equal(_j_, _i_){ /*<>*/ return _j_ === _i_ ? 1 : 0;} + var compare = runtime.caml_int_compare; + function hash(_h_){ /*<>*/ return _h_;} + function utf_decode_is_valid(d){ + /*<>*/ return 1 === (d >>> 27 | 0) ? 1 : 0; + /*<>*/ } + function utf_decode_length(d){ + /*<>*/ return (d >>> 24 | 0) & 7; + /*<>*/ } + function utf_decode_uchar(d){ + /*<>*/ return d & 16777215; + /*<>*/ } + function utf_decode(n, u){ + /*<>*/ return (8 | n) << 24 | u; + /*<>*/ } + function utf_decode_invalid(n){ + /*<>*/ return n << 24 | 65533; + /*<>*/ } + function utf_8_byte_length(u){ + /*<>*/ if(0 > u) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + /*<>*/ if(127 >= u) /*<>*/ return 1; + /*<>*/ if(2047 >= u) /*<>*/ return 2; + /*<>*/ if(65535 >= u) /*<>*/ return 3; + /*<>*/ if(1114111 < u) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); + /*<>*/ return 4; + /*<>*/ } + function utf_16_byte_length(u){ + /*<>*/ if(0 > u) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _d_], 1); + /*<>*/ if(65535 >= u) /*<>*/ return 2; + /*<>*/ if(1114111 < u) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _c_], 1); + /*<>*/ return 4; + /*<>*/ } + function _e_(_g_){ /*<>*/ return _g_;} + var + Stdlib_Uchar = + [0, + min, + max, + bom, + rep, + succ, + pred, + is_valid, + of_int, + function(_f_){ /*<>*/ return _f_;}, + _e_, + is_char, + of_char, + to_char, + unsafe_to_char, + equal, + compare, + hash, + utf_decode_is_valid, + utf_decode_uchar, + utf_decode_length, + utf_decode, + utf_decode_invalid, + utf_8_byte_length, + utf_16_byte_length]; + runtime.caml_register_global(13, Stdlib_Uchar, "Stdlib__Uchar"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__List +//# unitInfo: Requires: Stdlib, Stdlib__Seq, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_List_nth$1 = "List.nth", + caml_compare = runtime.caml_compare, + 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 + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_Sys = global_data.Stdlib__Sys, + cst_List_map2 = "List.map2", + cst_List_iter2 = "List.iter2", + cst_List_fold_left2 = "List.fold_left2", + cst_List_fold_right2 = "List.fold_right2", + cst_List_for_all2 = "List.for_all2", + cst_List_exists2 = "List.exists2", + _b_ = [0, 0, 0], + cst_List_combine = "List.combine", + cst_List_rev_map2 = "List.rev_map2", + cst_List_init = "List.init", + cst_List_nth$0 = cst_List_nth$1, + cst_nth = "nth", + cst_List_nth = cst_List_nth$1, + cst_tl = "tl", + cst_hd = "hd"; + function length(l$0){ + /*<>*/ var len = 0, param = l$0; + for(;;){ + if(! param) /*<>*/ return len; + /*<>*/ var + l = param[2], + /*<>*/ len$0 = len + 1 | 0, + len = len$0, + param = l; + } + /*<>*/ } + function cons(a, l){ + /*<>*/ return [0, a, l]; + /*<>*/ } + function hd(param){ + /*<>*/ if(! param) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[2], cst_hd); + var a = param[1]; + /*<>*/ return a; + /*<>*/ } + function tl(param){ + /*<>*/ if(! param) + /*<>*/ return /*<>*/ caml_call1 + (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); + var l$0 = l, n$0 = n; + /*<>*/ for(;;){ + if(! l$0) + /*<>*/ return /*<>*/ caml_call1 + (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, + l$0 = l$1, + n$0 = n$1; + } + /*<>*/ } + function nth_opt(l, n){ + /*<>*/ if(0 > n) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_nth$0); + var l$0 = l, n$0 = n; + /*<>*/ for(;;){ + if(! l$0) /*<>*/ return 0; + var l$1 = l$0[2], a = l$0[1]; + /*<>*/ if(0 === n$0) + /*<>*/ return [0, a]; + /*<>*/ var + /*<>*/ n$1 = n$0 - 1 | 0, + l$0 = l$1, + n$0 = n$1; + } + /*<>*/ } + var append = Stdlib[37]; + function rev_append(l1, l2){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ + if(! l1$0) /*<>*/ return l2$0; + /*<>*/ var + l1$1 = l1$0[2], + a = l1$0[1], + /*<>*/ l2$1 = [0, a, l2$0], + l1$0 = l1$1, + l2$0 = l2$1; + } + /*<>*/ } + function rev(l){ + /*<>*/ return rev_append(l, 0); + /*<>*/ } + function init_aux(i, n, f){ + /*<>*/ if(n <= i) /*<>*/ return 0; + /*<>*/ /*<>*/ var + r = /*<>*/ caml_call1(f, i); + /*<>*/ return [0, r, init_aux(i + 1 | 0, n, f)]; + /*<>*/ } + var rev_init_threshold = typeof Stdlib_Sys[5] === "number" ? 10000 : 50; + function init(len, f){ + /*<>*/ if(0 > len) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_init); + if(rev_init_threshold >= len) + /*<>*/ return init_aux(0, len, f); + var acc = 0, i = 0; + /*<>*/ for(;;){ + if(len <= i) /*<>*/ return rev(acc); + /*<>*/ var + i$0 = i + 1 | 0, + /*<>*/ acc$0 = + [0, /*<>*/ caml_call1(f, i), acc], + acc = acc$0, + i = i$0; + } + /*<>*/ } + function flatten(param){ + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var + r = param[2], + l = param[1], + /*<>*/ _J_ = flatten(r); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[37], l, _J_); + /*<>*/ } + function map(f, param){ + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var + l = param[2], + a = param[1], + /*<>*/ r = /*<>*/ caml_call1(f, a); + /*<>*/ return [0, r, map(f, l)]; + } + function _a_(i, f, param){ + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var + l = param[2], + a = param[1], + /*<>*/ r = /*<>*/ caml_call2(f, i, a); + /*<>*/ return [0, r, _a_(i + 1 | 0, f, l)]; + } + function mapi(f, l){ + /*<>*/ return _a_(0, f, l); + /*<>*/ } + function rev_map(f, l){ + /*<>*/ var accu = 0, param = l; + for(;;){ + if(! param) /*<>*/ return accu; + /*<>*/ var + l$0 = param[2], + a = param[1], + /*<>*/ accu$0 = + [0, /*<>*/ caml_call1(f, a), accu], + accu = accu$0, + param = l$0; + } + /*<>*/ } + function iter(f, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[2], a = param$0[1]; + /*<>*/ /*<>*/ caml_call1(f, a); + var param$0 = l; + } + } + function iteri(f, l$0){ + /*<>*/ var i = 0, param = l$0; + for(;;){ + if(! param) /*<>*/ return 0; + var l = param[2], a = param[1]; + /*<>*/ /*<>*/ caml_call2(f, i, a); + var i$0 = i + 1 | 0, i = i$0, param = l; + } + /*<>*/ } + function fold_left(f, accu, l){ + /*<>*/ var accu$0 = accu, l$0 = l; + /*<>*/ for(;;){ + if(! l$0) /*<>*/ return accu$0; + /*<>*/ var + l$1 = l$0[2], + a = l$0[1], + /*<>*/ accu$1 = + /*<>*/ caml_call2(f, accu$0, a), + accu$0 = accu$1, + l$0 = l$1; + } + /*<>*/ } + function fold_right(f, l, accu){ + /*<>*/ if(! l) /*<>*/ return accu; + var l$0 = l[2], a = l[1]; + /*<>*/ return /*<>*/ caml_call2 + (f, a, fold_right(f, l$0, accu)); + /*<>*/ } + function map2(f, l1, l2){ + /*<>*/ if(l1){ + if(l2){ + /*<>*/ var + l2$0 = l2[2], + a2 = l2[1], + l1$0 = l1[2], + a1 = l1[1], + /*<>*/ r = + /*<>*/ caml_call2(f, a1, a2); + /*<>*/ return [0, r, map2(f, l1$0, l2$0)]; + } + } + else if(! l2) /*<>*/ return 0; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_map2); + /*<>*/ } + function rev_map2(f, l1, l2){ + /*<>*/ var accu = 0, l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ + if(l1$0){ + if(l2$0){ + /*<>*/ var + l2$1 = l2$0[2], + a2 = l2$0[1], + l1$1 = l1$0[2], + a1 = l1$0[1], + /*<>*/ accu$0 = + [0, /*<>*/ caml_call2(f, a1, a2), accu], + accu = accu$0, + l1$0 = l1$1, + l2$0 = l2$1; + continue; + } + } + else if(! l2$0) /*<>*/ return accu; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_rev_map2); + } + /*<>*/ } + function iter2(f, l1, l2){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ + if(l1$0){ + if(l2$0){ + var l2$1 = l2$0[2], a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1]; + /*<>*/ /*<>*/ caml_call2(f, a1, a2); + var l1$0 = l1$1, l2$0 = l2$1; + continue; + } + } + else if(! l2$0) /*<>*/ return 0; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_iter2); + } + /*<>*/ } + function fold_left2(f, accu, l1, l2){ + /*<>*/ var accu$0 = accu, l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ + if(l1$0){ + if(l2$0){ + /*<>*/ var + l2$1 = l2$0[2], + a2 = l2$0[1], + l1$1 = l1$0[2], + a1 = l1$0[1], + /*<>*/ accu$1 = + /*<>*/ caml_call3(f, accu$0, a1, a2), + accu$0 = accu$1, + l1$0 = l1$1, + l2$0 = l2$1; + continue; + } + } + else if(! l2$0) /*<>*/ return accu$0; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_fold_left2); + } + /*<>*/ } + function fold_right2(f, l1, l2, accu){ + /*<>*/ if(l1){ + if(l2){ + var l2$0 = l2[2], a2 = l2[1], l1$0 = l1[2], a1 = l1[1]; + /*<>*/ return /*<>*/ caml_call3 + (f, a1, a2, fold_right2(f, l1$0, l2$0, accu)); + } + } + else if(! l2) /*<>*/ return accu; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_fold_right2); + /*<>*/ } + function for_all(p, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 1; + /*<>*/ var + l = param$0[2], + a = param$0[1], + /*<>*/ _I_ = /*<>*/ caml_call1(p, a); + /*<>*/ if(! _I_) /*<>*/ return _I_; + var param$0 = l; + } + } + function exists(p, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + l = param$0[2], + a = param$0[1], + /*<>*/ _H_ = /*<>*/ caml_call1(p, a); + /*<>*/ if(_H_) /*<>*/ return _H_; + var param$0 = l; + } + } + function for_all2(p, l1, l2){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ + if(l1$0){ + if(l2$0){ + /*<>*/ var + l2$1 = l2$0[2], + a2 = l2$0[1], + l1$1 = l1$0[2], + a1 = l1$0[1], + /*<>*/ _G_ = + /*<>*/ caml_call2(p, a1, a2); + /*<>*/ if(! _G_) /*<>*/ return _G_; + var l1$0 = l1$1, l2$0 = l2$1; + continue; + } + } + else if(! l2$0) /*<>*/ return 1; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_for_all2); + } + /*<>*/ } + function exists2(p, l1, l2){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ + if(l1$0){ + if(l2$0){ + /*<>*/ var + l2$1 = l2$0[2], + a2 = l2$0[1], + l1$1 = l1$0[2], + a1 = l1$0[1], + /*<>*/ _F_ = + /*<>*/ caml_call2(p, a1, a2); + /*<>*/ if(_F_) /*<>*/ return _F_; + var l1$0 = l1$1, l2$0 = l2$1; + continue; + } + } + else if(! l2$0) /*<>*/ return 0; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_exists2); + } + /*<>*/ } + function mem(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var + l = param$0[2], + a = param$0[1], + _E_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; + if(_E_) return _E_; + var param$0 = l; + } + } + function memq(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[2], a = param$0[1], _D_ = a === x ? 1 : 0; + if(_D_) return _D_; + var param$0 = l; + } + } + function assoc(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; + /*<>*/ if + (0 === /*<>*/ caml_compare(a, x)) + /*<>*/ return b; + var param$0 = l; + } + } + function assoc_opt(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; + /*<>*/ if + (0 === /*<>*/ caml_compare(a, x)) + /*<>*/ return [0, b]; + var param$0 = l; + } + } + function assq(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; + if(a === x) /*<>*/ return b; + var param$0 = l; + } + } + function assq_opt(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; + if(a === x) /*<>*/ return [0, b]; + var param$0 = l; + } + } + function mem_assoc(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var + l = param$0[2], + a = param$0[1][1], + _C_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; + if(_C_) return _C_; + var param$0 = l; + } + } + function mem_assq(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[2], a = param$0[1][1], _B_ = a === x ? 1 : 0; + if(_B_) return _B_; + var param$0 = l; + } + } + function remove_assoc(x, param){ + /*<>*/ if(! param) /*<>*/ return 0; + var l = param[2], pair = param[1], a = pair[1]; + /*<>*/ return 0 + === /*<>*/ caml_compare(a, x) + ? l + : [0, pair, remove_assoc(x, l)]; + } + function remove_assq(x, param){ + /*<>*/ if(! param) /*<>*/ return 0; + var l = param[2], pair = param[1], a = pair[1]; + return a === x ? l : [0, pair, remove_assq(x, l)]; + } + function find(p, param){ + var param$0 = param; + for(;;){ + if(! param$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var l = param$0[2], x = param$0[1]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ return x; + var param$0 = l; + } + } + function find_opt(p, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[2], x = param$0[1]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ return [0, x]; + var param$0 = l; + } + } + function find_map(f, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + l = param$0[2], + x = param$0[1], + /*<>*/ result = + /*<>*/ caml_call1(f, x); + if(result) /*<>*/ return result; + var param$0 = l; + } + } + function find_all(p){ + /*<>*/ /*<>*/ var accu = 0; + /*<>*/ return function(param$0){ + var accu$0 = accu, param = param$0; + for(;;){ + if(! param) /*<>*/ return rev(accu$0); + var l = param[2], x = param[1]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ var + /*<>*/ accu$1 = [0, x, accu$0], + accu$0 = accu$1, + param = l; + else + var param = l; + }}; + /*<>*/ } + function filteri(p, l){ + /*<>*/ var i = 0, acc = 0, param = l; + for(;;){ + if(! param) /*<>*/ return rev(acc); + /*<>*/ var + l$0 = param[2], + x = param[1], + /*<>*/ acc$0 = + /*<>*/ caml_call2(p, i, x) ? [0, x, acc] : acc, + i$0 = i + 1 | 0, + i = i$0, + acc = acc$0, + param = l$0; + } + /*<>*/ } + function filter_map(f){ + /*<>*/ /*<>*/ var accu = 0; + /*<>*/ return function(param$0){ + var accu$0 = accu, param = param$0; + for(;;){ + if(! param) /*<>*/ return rev(accu$0); + /*<>*/ var + l = param[2], + x = param[1], + /*<>*/ match = + /*<>*/ caml_call1(f, x); + if(match) + /*<>*/ var + v = match[1], + /*<>*/ accu$1 = [0, v, accu$0], + accu$0 = accu$1, + param = l; + else + var param = l; + }}; + /*<>*/ } + function concat_map(f, l){ + /*<>*/ var acc = 0, param = l; + for(;;){ + if(! param) /*<>*/ return rev(acc); + /*<>*/ var + l$0 = param[2], + x = param[1], + /*<>*/ xs = /*<>*/ caml_call1(f, x), + /*<>*/ acc$0 = rev_append(xs, acc), + acc = acc$0, + param = l$0; + } + /*<>*/ } + function fold_left_map(f, accu, l){ + /*<>*/ var accu$0 = accu, l_accu = 0, param = l; + for(;;){ + if(! param) /*<>*/ return [0, accu$0, rev(l_accu)]; + /*<>*/ var + l$0 = param[2], + x = param[1], + /*<>*/ match = + /*<>*/ caml_call2(f, accu$0, x), + x$0 = match[2], + accu$1 = match[1], + /*<>*/ l_accu$0 = [0, x$0, l_accu], + accu$0 = accu$1, + l_accu = l_accu$0, + param = l$0; + } + /*<>*/ } + function partition(p, l){ + /*<>*/ var yes = 0, no = 0, param = l; + for(;;){ + if(! param){ + /*<>*/ /*<>*/ var _A_ = rev(no); + /*<>*/ return [0, rev(yes), _A_]; + } + var l$0 = param[2], x = param[1]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ var + /*<>*/ yes$0 = [0, x, yes], + yes = yes$0, + param = l$0; + else + /*<>*/ var + /*<>*/ no$0 = [0, x, no], + no = no$0, + param = l$0; + } + /*<>*/ } + function partition_map(p, l){ + /*<>*/ var left = 0, right = 0, param = l; + for(;;){ + if(! param){ + /*<>*/ /*<>*/ var _z_ = rev(right); + /*<>*/ return [0, rev(left), _z_]; + } + /*<>*/ var + l$0 = param[2], + x = param[1], + /*<>*/ match = /*<>*/ caml_call1(p, x); + if(0 === match[0]) + /*<>*/ var + v = match[1], + /*<>*/ left$0 = [0, v, left], + left = left$0, + param = l$0; + else + /*<>*/ var + v$0 = match[1], + /*<>*/ right$0 = [0, v$0, right], + right = right$0, + param = l$0; + } + /*<>*/ } + function split(param){ + /*<>*/ if(! param) /*<>*/ return _b_; + /*<>*/ var + l = param[2], + match = param[1], + y = match[2], + x = match[1], + /*<>*/ match$0 = split(l), + ry = match$0[2], + rx = match$0[1]; + /*<>*/ return [0, [0, x, rx], [0, y, ry]]; + /*<>*/ } + function combine(l1, l2){ + /*<>*/ if(l1){ + if(l2){ + var l2$0 = l2[2], a2 = l2[1], l1$0 = l1[2], a1 = l1[1]; + /*<>*/ return [0, [0, a1, a2], combine(l1$0, l2$0)]; + } + } + else if(! l2) /*<>*/ return 0; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_List_combine); + /*<>*/ } + function merge(cmp, l1, l2){ + /*<>*/ if(! l1) /*<>*/ return l2; + if(! l2) /*<>*/ return l1; + var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1]; + /*<>*/ return 0 + < /*<>*/ caml_call2(cmp, h1, h2) + ? [0, h2, merge(cmp, l1, t2)] + : [0, h1, merge(cmp, t1, l2)]; + /*<>*/ } + function stable_sort(cmp, l){ + function sort(n, l){ + /*<>*/ if(2 === n){ + if(l){ + var match = l[2]; + if(match){ + /*<>*/ var + tl = match[2], + x2 = match[1], + x1 = l[1], + /*<>*/ s = + 0 < /*<>*/ caml_call2(cmp, x1, x2) + ? [0, x2, [0, x1, 0]] + : [0, x1, [0, x2, 0]]; + /*<>*/ return [0, s, tl]; + } + } + } + else if(3 === n && l){ + var _y_ = l[2]; + if(_y_){ + var match$2 = _y_[2]; + if(match$2){ + /*<>*/ var + tl$1 = match$2[2], + x3 = match$2[1], + x2$0 = _y_[1], + x1$0 = l[1], + /*<>*/ s$0 = + 0 < /*<>*/ caml_call2(cmp, x1$0, x2$0) + ? 0 + < /*<>*/ caml_call2(cmp, x1$0, x3) + ? 0 + < /*<>*/ caml_call2(cmp, x2$0, x3) + ? [0, x3, [0, x2$0, [0, x1$0, 0]]] + : [0, x2$0, [0, x3, [0, x1$0, 0]]] + : [0, x2$0, [0, x1$0, [0, x3, 0]]] + : 0 + < /*<>*/ caml_call2(cmp, x2$0, x3) + ? 0 + < /*<>*/ caml_call2(cmp, x1$0, x3) + ? [0, x3, [0, x1$0, [0, x2$0, 0]]] + : [0, x1$0, [0, x3, [0, x2$0, 0]]] + : [0, x1$0, [0, x2$0, [0, x3, 0]]]; + /*<>*/ return [0, s$0, tl$1]; + } + } + } + /*<>*/ var + n1 = n >> 1, + n2 = n - n1 | 0, + /*<>*/ match$0 = rev_sort(n1, l), + l2$0 = match$0[2], + s1 = match$0[1], + /*<>*/ match$1 = rev_sort(n2, l2$0), + tl$0 = match$1[2], + s2 = match$1[1], + l1 = s1, + l2 = s2, + accu = 0; + /*<>*/ for(;;){ + if(l1){ + if(l2){ + var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1]; + /*<>*/ if + (0 < /*<>*/ caml_call2(cmp, h1, h2)){ + /*<>*/ var + /*<>*/ accu$0 = [0, h1, accu], + l1 = t1, + accu = accu$0; + continue; + } + /*<>*/ var + /*<>*/ accu$1 = [0, h2, accu], + l2 = t2, + accu = accu$1; + continue; + } + var _x_ = rev_append(l1, accu); + } + else + var _x_ = rev_append(l2, accu); + /*<>*/ return [0, _x_, tl$0]; + } + /*<>*/ } + function rev_sort(n, l){ + /*<>*/ if(2 === n){ + if(l){ + var match = l[2]; + if(match){ + /*<>*/ var + tl = match[2], + x2 = match[1], + x1 = l[1], + /*<>*/ s = + 0 < /*<>*/ caml_call2(cmp, x1, x2) + ? [0, x1, [0, x2, 0]] + : [0, x2, [0, x1, 0]]; + /*<>*/ return [0, s, tl]; + } + } + } + else if(3 === n && l){ + var _w_ = l[2]; + if(_w_){ + var match$2 = _w_[2]; + if(match$2){ + /*<>*/ var + tl$1 = match$2[2], + x3 = match$2[1], + x2$0 = _w_[1], + x1$0 = l[1], + /*<>*/ s$0 = + 0 < /*<>*/ caml_call2(cmp, x1$0, x2$0) + ? 0 + < /*<>*/ caml_call2(cmp, x2$0, x3) + ? [0, x1$0, [0, x2$0, [0, x3, 0]]] + : 0 + < /*<>*/ caml_call2(cmp, x1$0, x3) + ? [0, x1$0, [0, x3, [0, x2$0, 0]]] + : [0, x3, [0, x1$0, [0, x2$0, 0]]] + : 0 + < /*<>*/ caml_call2(cmp, x1$0, x3) + ? [0, x2$0, [0, x1$0, [0, x3, 0]]] + : 0 + < /*<>*/ caml_call2(cmp, x2$0, x3) + ? [0, x2$0, [0, x3, [0, x1$0, 0]]] + : [0, x3, [0, x2$0, [0, x1$0, 0]]]; + /*<>*/ return [0, s$0, tl$1]; + } + } + } + /*<>*/ var + n1 = n >> 1, + n2 = n - n1 | 0, + /*<>*/ match$0 = sort(n1, l), + l2$0 = match$0[2], + s1 = match$0[1], + /*<>*/ match$1 = sort(n2, l2$0), + tl$0 = match$1[2], + s2 = match$1[1], + l1 = s1, + l2 = s2, + accu = 0; + /*<>*/ for(;;){ + if(l1){ + if(l2){ + var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1]; + /*<>*/ if + (0 < /*<>*/ caml_call2(cmp, h1, h2)){ + /*<>*/ var + /*<>*/ accu$0 = [0, h2, accu], + l2 = t2, + accu = accu$0; + continue; + } + /*<>*/ var + /*<>*/ accu$1 = [0, h1, accu], + l1 = t1, + accu = accu$1; + continue; + } + var _v_ = rev_append(l1, accu); + } + else + var _v_ = rev_append(l2, accu); + /*<>*/ return [0, _v_, tl$0]; + } + /*<>*/ } + /*<>*/ /*<>*/ var len = length(l); + /*<>*/ return 2 <= len ? sort(len, l)[1] : l; + /*<>*/ } + function sort_uniq(cmp, l){ + function sort(n, l){ + /*<>*/ if(2 === n){ + if(l){ + var match = l[2]; + if(match){ + /*<>*/ var + tl = match[2], + x2 = match[1], + x1 = l[1], + /*<>*/ c$0 = + /*<>*/ caml_call2(cmp, x1, x2), + /*<>*/ s = + 0 === c$0 + ? [0, x1, 0] + : 0 <= c$0 ? [0, x2, [0, x1, 0]] : [0, x1, [0, x2, 0]]; + /*<>*/ return [0, s, tl]; + } + } + } + else if(3 === n && l){ + var _p_ = l[2]; + if(_p_){ + var match$2 = _p_[2]; + if(match$2){ + /*<>*/ var + tl$1 = match$2[2], + x3 = match$2[1], + x2$0 = _p_[1], + x1$0 = l[1], + /*<>*/ c$1 = + /*<>*/ caml_call2(cmp, x1$0, x2$0); + /*<>*/ if(0 === c$1) + /*<>*/ var + /*<>*/ c$2 = + /*<>*/ caml_call2(cmp, x2$0, x3), + /*<>*/ _q_ = + 0 === c$2 + ? [0, x2$0, 0] + : 0 <= c$2 ? [0, x3, [0, x2$0, 0]] : [0, x2$0, [0, x3, 0]], + s$0 = _q_; + else if(0 <= c$1){ + /*<>*/ /*<>*/ var + c$3 = /*<>*/ caml_call2(cmp, x1$0, x3); + /*<>*/ if(0 === c$3) + var _r_ = [0, x2$0, [0, x1$0, 0]]; + else if(0 <= c$3) + /*<>*/ var + /*<>*/ c$4 = + /*<>*/ caml_call2(cmp, x2$0, x3), + /*<>*/ _s_ = + 0 === c$4 + ? [0, x2$0, [0, x1$0, 0]] + : 0 + <= c$4 + ? [0, x3, [0, x2$0, [0, x1$0, 0]]] + : [0, x2$0, [0, x3, [0, x1$0, 0]]], + _r_ = _s_; + else + var _r_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; + var s$0 = _r_; + } + else{ + /*<>*/ /*<>*/ var + c$5 = /*<>*/ caml_call2(cmp, x2$0, x3); + /*<>*/ if(0 === c$5) + var _t_ = [0, x1$0, [0, x2$0, 0]]; + else if(0 <= c$5) + /*<>*/ var + /*<>*/ c$6 = + /*<>*/ caml_call2(cmp, x1$0, x3), + /*<>*/ _u_ = + 0 === c$6 + ? [0, x1$0, [0, x2$0, 0]] + : 0 + <= c$6 + ? [0, x3, [0, x1$0, [0, x2$0, 0]]] + : [0, x1$0, [0, x3, [0, x2$0, 0]]], + _t_ = _u_; + else + var _t_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; + var s$0 = _t_; + } + /*<>*/ return [0, s$0, tl$1]; + } + } + } + /*<>*/ var + n1 = n >> 1, + n2 = n - n1 | 0, + /*<>*/ match$0 = rev_sort(n1, l), + l2$0 = match$0[2], + s1 = match$0[1], + /*<>*/ match$1 = rev_sort(n2, l2$0), + tl$0 = match$1[2], + s2 = match$1[1], + l1 = s1, + l2 = s2, + accu = 0; + /*<>*/ for(;;){ + if(l1){ + if(l2){ + /*<>*/ var + t2 = l2[2], + h2 = l2[1], + t1 = l1[2], + h1 = l1[1], + /*<>*/ c = + /*<>*/ caml_call2(cmp, h1, h2); + /*<>*/ if(0 === c){ + /*<>*/ var + /*<>*/ accu$0 = [0, h1, accu], + l1 = t1, + l2 = t2, + accu = accu$0; + continue; + } + if(0 < c){ + /*<>*/ var + /*<>*/ accu$1 = [0, h1, accu], + l1 = t1, + accu = accu$1; + continue; + } + /*<>*/ var + /*<>*/ accu$2 = [0, h2, accu], + l2 = t2, + accu = accu$2; + continue; + } + var _o_ = rev_append(l1, accu); + } + else + var _o_ = rev_append(l2, accu); + /*<>*/ return [0, _o_, tl$0]; + } + /*<>*/ } + function rev_sort(n, l){ + /*<>*/ if(2 === n){ + if(l){ + var match = l[2]; + if(match){ + /*<>*/ var + tl = match[2], + x2 = match[1], + x1 = l[1], + /*<>*/ c$0 = + /*<>*/ caml_call2(cmp, x1, x2), + /*<>*/ s = + 0 === c$0 + ? [0, x1, 0] + : 0 < c$0 ? [0, x1, [0, x2, 0]] : [0, x2, [0, x1, 0]]; + /*<>*/ return [0, s, tl]; + } + } + } + else if(3 === n && l){ + var _i_ = l[2]; + if(_i_){ + var match$2 = _i_[2]; + if(match$2){ + /*<>*/ var + tl$1 = match$2[2], + x3 = match$2[1], + x2$0 = _i_[1], + x1$0 = l[1], + /*<>*/ c$1 = + /*<>*/ caml_call2(cmp, x1$0, x2$0); + /*<>*/ if(0 === c$1) + /*<>*/ var + /*<>*/ c$2 = + /*<>*/ caml_call2(cmp, x2$0, x3), + /*<>*/ _j_ = + 0 === c$2 + ? [0, x2$0, 0] + : 0 < c$2 ? [0, x2$0, [0, x3, 0]] : [0, x3, [0, x2$0, 0]], + s$0 = _j_; + else if(0 < c$1){ + /*<>*/ /*<>*/ var + c$3 = /*<>*/ caml_call2(cmp, x2$0, x3); + /*<>*/ if(0 === c$3) + var _k_ = [0, x1$0, [0, x2$0, 0]]; + else if(0 < c$3) + var _k_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; + else + /*<>*/ var + /*<>*/ c$4 = + /*<>*/ caml_call2(cmp, x1$0, x3), + /*<>*/ _l_ = + 0 === c$4 + ? [0, x1$0, [0, x2$0, 0]] + : 0 + < c$4 + ? [0, x1$0, [0, x3, [0, x2$0, 0]]] + : [0, x3, [0, x1$0, [0, x2$0, 0]]], + _k_ = _l_; + var s$0 = _k_; + } + else{ + /*<>*/ /*<>*/ var + c$5 = /*<>*/ caml_call2(cmp, x1$0, x3); + /*<>*/ if(0 === c$5) + var _m_ = [0, x2$0, [0, x1$0, 0]]; + else if(0 < c$5) + var _m_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; + else + /*<>*/ var + /*<>*/ c$6 = + /*<>*/ caml_call2(cmp, x2$0, x3), + /*<>*/ _n_ = + 0 === c$6 + ? [0, x2$0, [0, x1$0, 0]] + : 0 + < c$6 + ? [0, x2$0, [0, x3, [0, x1$0, 0]]] + : [0, x3, [0, x2$0, [0, x1$0, 0]]], + _m_ = _n_; + var s$0 = _m_; + } + /*<>*/ return [0, s$0, tl$1]; + } + } + } + /*<>*/ var + n1 = n >> 1, + n2 = n - n1 | 0, + /*<>*/ match$0 = sort(n1, l), + l2$0 = match$0[2], + s1 = match$0[1], + /*<>*/ match$1 = sort(n2, l2$0), + tl$0 = match$1[2], + s2 = match$1[1], + l1 = s1, + l2 = s2, + accu = 0; + /*<>*/ for(;;){ + if(l1){ + if(l2){ + /*<>*/ var + t2 = l2[2], + h2 = l2[1], + t1 = l1[2], + h1 = l1[1], + /*<>*/ c = + /*<>*/ caml_call2(cmp, h1, h2); + /*<>*/ if(0 === c){ + /*<>*/ var + /*<>*/ accu$0 = [0, h1, accu], + l1 = t1, + l2 = t2, + accu = accu$0; + continue; + } + if(0 <= c){ + /*<>*/ var + /*<>*/ accu$1 = [0, h2, accu], + l2 = t2, + accu = accu$1; + continue; + } + /*<>*/ var + /*<>*/ accu$2 = [0, h1, accu], + l1 = t1, + accu = accu$2; + continue; + } + var _h_ = rev_append(l1, accu); + } + else + var _h_ = rev_append(l2, accu); + /*<>*/ return [0, _h_, tl$0]; + } + /*<>*/ } + /*<>*/ /*<>*/ var len = length(l); + /*<>*/ return 2 <= len ? sort(len, l)[1] : l; + /*<>*/ } + function compare_lengths(l1, l2){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ + if(! l1$0) return l2$0 ? -1 : 0; + if(! l2$0) /*<>*/ return 1; + var l2$1 = l2$0[2], l1$1 = l1$0[2], l1$0 = l1$1, l2$0 = l2$1; + } + /*<>*/ } + function compare_length_with(l, n){ + /*<>*/ var l$0 = l, n$0 = n; + /*<>*/ for(;;){ + if(! l$0) return 0 === n$0 ? 0 : 0 < n$0 ? -1 : 1; + var l$1 = l$0[2]; + /*<>*/ if(0 >= n$0) /*<>*/ return 1; + /*<>*/ var + /*<>*/ n$1 = n$0 - 1 | 0, + l$0 = l$1, + n$0 = n$1; + } + /*<>*/ } + function equal(eq, l1, l2){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ + if(l1$0){ + if(l2$0){ + /*<>*/ var + l2$1 = l2$0[2], + a2 = l2$0[1], + l1$1 = l1$0[2], + a1 = l1$0[1], + /*<>*/ _g_ = + /*<>*/ caml_call2(eq, a1, a2); + /*<>*/ if(! _g_) /*<>*/ return _g_; + var l1$0 = l1$1, l2$0 = l2$1; + continue; + } + } + else if(! l2$0) /*<>*/ return 1; + /*<>*/ return 0; + } + /*<>*/ } + function compare(cmp, l1, l2){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ + if(! l1$0) return l2$0 ? -1 : 0; + var l1$1 = l1$0[2], a1 = l1$0[1]; + if(! l2$0) /*<>*/ return 1; + /*<>*/ var + l2$1 = l2$0[2], + a2 = l2$0[1], + /*<>*/ c = + /*<>*/ caml_call2(cmp, a1, a2); + /*<>*/ if(0 !== c) /*<>*/ return c; + var l1$0 = l1$1, l2$0 = l2$1; + } + /*<>*/ } + function to_seq(l){ + /*<>*/ function aux(l, param){ + /*<>*/ if(! l) /*<>*/ return 0; + var tail = l[2], x = l[1]; + /*<>*/ return [0, + x, + function(_f_){ /*<>*/ return aux(tail, _f_);}]; + /*<>*/ } + /*<>*/ return function(_e_){ + /*<>*/ return aux(l, _e_);}; + /*<>*/ } + function of_seq(seq){ + function direct(depth, seq){ + /*<>*/ if(0 === depth){ + var + _c_ = 0, + _d_ = + function(acc, x){ + /*<>*/ return [0, x, acc]; + /*<>*/ }; + /*<>*/ return rev + ( /*<>*/ caml_call3(Stdlib_Seq[5], _d_, _c_, seq)); + } + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq, 0); + if(! match) /*<>*/ return 0; + var next = match[2], x = match[1]; + /*<>*/ return [0, x, direct(depth - 1 | 0, next)]; + /*<>*/ } + /*<>*/ return direct(500, seq); + /*<>*/ } + var + Stdlib_List = + [0, + length, + compare_lengths, + compare_length_with, + cons, + hd, + tl, + nth, + nth_opt, + rev, + init, + append, + rev_append, + flatten, + flatten, + equal, + compare, + iter, + iteri, + map, + mapi, + rev_map, + filter_map, + concat_map, + fold_left_map, + fold_left, + fold_right, + iter2, + map2, + rev_map2, + fold_left2, + fold_right2, + for_all, + exists, + for_all2, + exists2, + mem, + memq, + find, + find_opt, + find_map, + find_all, + find_all, + filteri, + partition, + partition_map, + assoc, + assoc_opt, + assq, + assq_opt, + mem_assoc, + mem_assq, + remove_assoc, + remove_assq, + split, + combine, + stable_sort, + stable_sort, + stable_sort, + sort_uniq, + merge, + to_seq, + of_seq]; + runtime.caml_register_global(18, Stdlib_List, "Stdlib__List"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Int +(function(globalThis){ + "use strict"; + var runtime = globalThis.jsoo_runtime, zero = 0, one = 1, minus_one = -1; + function abs(x){ + /*<>*/ return 0 <= x ? x : - x | 0; + /*<>*/ } + var max_int = 2147483647, min_int = -2147483648; + function lognot(x){ + /*<>*/ return x ^ -1; + /*<>*/ } + function equal(_b_, _a_){ /*<>*/ return _b_ === _a_ ? 1 : 0;} + var compare = runtime.caml_int_compare; + function min(x, y){ + /*<>*/ return x <= y ? x : y; + /*<>*/ } + function max(x, y){ + /*<>*/ return y <= x ? x : y; + /*<>*/ } + function to_string(x){ + /*<>*/ return "" + x; + /*<>*/ } + var + Stdlib_Int = + [0, + zero, + one, + minus_one, + abs, + max_int, + min_int, + lognot, + equal, + compare, + min, + max, + to_string]; + runtime.caml_register_global(1, Stdlib_Int, "Stdlib__Int"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Bytes +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Char, Stdlib__Int, Stdlib__Seq, Stdlib__Sys, Stdlib__Uchar +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_bytes_ml = "bytes.ml", + cst_index_out_of_bounds$3 = "index out of bounds", + caml_blit_bytes = runtime.caml_blit_bytes, + caml_bswap16 = runtime.caml_bswap16, + caml_bytes_get = runtime.caml_bytes_get, + caml_bytes_get16 = runtime.caml_bytes_get16, + 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_set32 = runtime.caml_bytes_set32, + caml_bytes_set64 = runtime.caml_bytes_set64, + caml_bytes_unsafe_get = runtime.caml_bytes_unsafe_get, + caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, + caml_create_bytes = runtime.caml_create_bytes, + caml_fill_bytes = runtime.caml_fill_bytes, + caml_int32_bswap = runtime.caml_int32_bswap, + caml_int64_bswap = runtime.caml_int64_bswap, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_bytes_length = runtime.caml_ml_bytes_length, + caml_string_of_bytes = runtime.caml_string_of_bytes, + 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) + : runtime.caml_call_gen(f, [a0, a1]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Stdlib_Uchar = global_data.Stdlib__Uchar, + Assert_failure = global_data.Assert_failure, + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib_Int = global_data.Stdlib__Int, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_Char = global_data.Stdlib__Char, + cst_index_out_of_bounds$2 = cst_index_out_of_bounds$3, + _f_ = [0, cst_bytes_ml, 820, 20], + _e_ = [0, cst_bytes_ml, 831, 9], + cst_index_out_of_bounds$1 = cst_index_out_of_bounds$3, + cst_index_out_of_bounds$0 = cst_index_out_of_bounds$3, + _d_ = [0, cst_bytes_ml, 766, 20], + _c_ = [0, cst_bytes_ml, 777, 9], + cst_index_out_of_bounds = cst_index_out_of_bounds$3, + _b_ = [0, cst_bytes_ml, 654, 20], + _a_ = [0, cst_bytes_ml, 679, 9], + cst_Bytes_of_seq_cannot_grow_b = "Bytes.of_seq: cannot grow bytes", + cst_String_rcontains_from_Byte = + "String.rcontains_from / Bytes.rcontains_from", + cst_String_contains_from_Bytes = + "String.contains_from / Bytes.contains_from", + cst_String_rindex_from_opt_Byt = + "String.rindex_from_opt / Bytes.rindex_from_opt", + cst_String_rindex_from_Bytes_r = "String.rindex_from / Bytes.rindex_from", + cst_String_index_from_opt_Byte = + "String.index_from_opt / Bytes.index_from_opt", + cst_String_index_from_Bytes_in = "String.index_from / Bytes.index_from", + cst_Bytes_concat = "Bytes.concat", + cst_String_blit_Bytes_blit_str = "String.blit / Bytes.blit_string", + cst_Bytes_blit = "Bytes.blit", + cst_String_fill_Bytes_fill = "String.fill / Bytes.fill", + cst_Bytes_extend = "Bytes.extend", + cst_String_sub_Bytes_sub = "String.sub / Bytes.sub"; + function make(n, c){ + /*<>*/ /*<>*/ var + s = /*<>*/ caml_create_bytes(n); + /*<>*/ /*<>*/ caml_fill_bytes(s, 0, n, c); + /*<>*/ return s; + /*<>*/ } + function init(n, f){ + /*<>*/ var + /*<>*/ s = /*<>*/ caml_create_bytes(n), + /*<>*/ _aq_ = n - 1 | 0, + /*<>*/ _ap_ = 0; + if(_aq_ >= 0){ + var i = _ap_; + for(;;){ + caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); + /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; + if(_aq_ === i) break; + var i = _ar_; + } + } + /*<>*/ return s; + /*<>*/ } + /*<>*/ /*<>*/ var + empty = /*<>*/ caml_create_bytes(0); + function copy(s){ + /*<>*/ var + len = caml_ml_bytes_length(s), + /*<>*/ r = + /*<>*/ caml_create_bytes(len); + /*<>*/ /*<>*/ caml_blit_bytes + (s, 0, r, 0, len); + /*<>*/ return r; + /*<>*/ } + function to_string(b){ + /*<>*/ return /*<>*/ caml_string_of_bytes + (copy(b)); + /*<>*/ } + function of_string(s){ + /*<>*/ return copy(caml_bytes_of_string(s)); + /*<>*/ } + function sub(s, ofs, len){ + /*<>*/ if + (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs){ + /*<>*/ /*<>*/ var + r = /*<>*/ caml_create_bytes(len); + /*<>*/ /*<>*/ caml_blit_bytes + (s, ofs, r, 0, len); + /*<>*/ return r; + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_String_sub_Bytes_sub); + /*<>*/ } + function sub_string(b, ofs, len){ + /*<>*/ return /*<>*/ caml_string_of_bytes + (sub(b, ofs, len)); + /*<>*/ } + function symbol(a, b){ + /*<>*/ var + c = a + b | 0, + _ao_ = b < 0 ? 1 : 0, + match = c < 0 ? 1 : 0; + a: + { + if(a < 0){if(_ao_ && ! match) break a;} else if(! _ao_ && match) break a; + /*<>*/ return c; + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Bytes_extend); + /*<>*/ } + function extend(s, left, right){ + /*<>*/ var + /*<>*/ len = + symbol(symbol(caml_ml_bytes_length(s), left), right), + /*<>*/ r = + /*<>*/ caml_create_bytes(len); + if(0 <= left) + var dstoff = left, srcoff = 0; + else + var dstoff = 0, srcoff = - left | 0; + /*<>*/ /*<>*/ var + cpylen = + /*<>*/ caml_call2 + (Stdlib_Int[10], + caml_ml_bytes_length(s) - srcoff | 0, + len - dstoff | 0); + if(0 < cpylen) + /*<>*/ /*<>*/ caml_blit_bytes + (s, srcoff, r, dstoff, cpylen); + /*<>*/ return r; + /*<>*/ } + function fill(s, ofs, len, c){ + /*<>*/ 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); + /*<>*/ } + function blit(s1, ofs1, s2, ofs2, len){ + /*<>*/ if + (0 <= len + && + 0 <= ofs1 + && + (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); + /*<>*/ } + function blit_string(s1, ofs1, s2, ofs2, len){ + /*<>*/ if + (0 <= len + && + 0 <= ofs1 + && + (runtime.caml_ml_string_length(s1) - len | 0) >= ofs1 + && 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); + /*<>*/ } + function iter(f, a){ + /*<>*/ var + _am_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _al_ = 0; + if(_am_ >= 0){ + var i = _al_; + for(;;){ + /*<>*/ /*<>*/ caml_call1 + (f, caml_bytes_unsafe_get(a, i)); + /*<>*/ /*<>*/ var _an_ = i + 1 | 0; + if(_am_ === i) break; + var i = _an_; + } + } + return 0; + /*<>*/ } + function iteri(f, a){ + /*<>*/ var + _aj_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (f, i, caml_bytes_unsafe_get(a, i)); + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ === i) break; + var i = _ak_; + } + } + return 0; + /*<>*/ } + function concat(sep, l){ + /*<>*/ if(! l) /*<>*/ return empty; + var seplen = caml_ml_bytes_length(sep), acc = 0, param = l, pos$1 = 0; + for(;;){ + if(param){ + var hd = param[1]; + if(param[2]){ + var + tl = param[2], + x = (caml_ml_bytes_length(hd) + seplen | 0) + acc | 0, + acc$0 = + acc <= x + ? x + : /*<>*/ caml_call1(Stdlib[1], cst_Bytes_concat), + acc = acc$0, + param = tl; + continue; + } + var _ah_ = caml_ml_bytes_length(hd) + acc | 0; + } + else + var _ah_ = acc; + /*<>*/ var + /*<>*/ dst = + /*<>*/ caml_create_bytes(_ah_), + pos = pos$1, + param$0 = l; + for(;;){ + if(! param$0) /*<>*/ return dst; + var hd$0 = param$0[1]; + if(! param$0[2]){ + /*<>*/ /*<>*/ caml_blit_bytes + (hd$0, 0, dst, pos, caml_ml_bytes_length(hd$0)); + /*<>*/ return dst; + } + var tl$0 = param$0[2]; + /*<>*/ /*<>*/ caml_blit_bytes + (hd$0, 0, dst, pos, /*<>*/ caml_ml_bytes_length(hd$0)); + /*<>*/ /*<>*/ caml_blit_bytes + (sep, 0, dst, pos + caml_ml_bytes_length(hd$0) | 0, seplen); + var + pos$0 = (pos + caml_ml_bytes_length(hd$0) | 0) + seplen | 0, + pos = pos$0, + param$0 = tl$0; + } + } + } + function cat(s1, s2){ + /*<>*/ var + l1 = caml_ml_bytes_length(s1), + /*<>*/ l2 = + /*<>*/ caml_ml_bytes_length(s2), + /*<>*/ r = + /*<>*/ caml_create_bytes(l1 + l2 | 0); + /*<>*/ /*<>*/ caml_blit_bytes + (s1, 0, r, 0, l1); + /*<>*/ /*<>*/ caml_blit_bytes + (s2, 0, r, l1, l2); + /*<>*/ return r; + /*<>*/ } + function is_space(param){ + /*<>*/ /*<>*/ var + _ag_ = param - 9 | 0; + a: + { + if(4 < _ag_ >>> 0){if(23 !== _ag_) break a;} else if(2 === _ag_) break a; + /*<>*/ return 1; + } + /*<>*/ return 0; + /*<>*/ } + function trim(s){ + /*<>*/ var + len = caml_ml_bytes_length(s), + /*<>*/ i = [0, 0]; + for(;;){ + /*<>*/ if + (i[1] < len && is_space(caml_bytes_unsafe_get(s, i[1]))){i[1]++; continue;} + /*<>*/ /*<>*/ var + j = [0, len - 1 | 0]; + for(;;){ + /*<>*/ if + (i[1] <= j[1] && is_space(caml_bytes_unsafe_get(s, j[1]))){j[1] += -1; continue;} + return i[1] <= j[1] ? sub(s, i[1], (j[1] - i[1] | 0) + 1 | 0) : empty; + } + } + /*<>*/ } + function unsafe_escape(s){ + /*<>*/ var + /*<>*/ n = [0, 0], + _$_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ ___ = 0; + if(_$_ >= 0){ + var i$0 = ___; + for(;;){ + var match = caml_bytes_unsafe_get(s, i$0); + a: + { + b: + { + c: + { + if(32 <= match){ + var _ad_ = match - 34 | 0; + if(58 < _ad_ >>> 0){ + if(93 <= _ad_) break c; + } + else if(56 < _ad_ - 1 >>> 0) break b; + var _ae_ = 1; + break a; + } + if(11 <= match){ + if(13 === match) break b; + } + else if(8 <= match) break b; + } + var _ae_ = 4; + break a; + } + var _ae_ = 2; + } + n[1] = n[1] + _ae_ | 0; + /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; + if(_$_ === i$0) break; + var i$0 = _af_; + } + } + if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; + /*<>*/ /*<>*/ var + s$0 = /*<>*/ caml_create_bytes(n[1]); + n[1] = 0; + /*<>*/ var + _ab_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ _aa_ = 0; + if(_ab_ >= 0){ + var i = _aa_; + for(;;){ + var c = caml_bytes_unsafe_get(s, i); + a: + { + b: + { + c: + { + if(35 <= c){ + if(92 !== c){if(127 <= c) break c; break b;} + } + else{ + if(32 > c){ + if(14 <= c) break c; + switch(c){ + case 8: + caml_bytes_unsafe_set(s$0, n[1], 92); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 98); + break a; + case 9: + caml_bytes_unsafe_set(s$0, n[1], 92); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 116); + break a; + case 10: + caml_bytes_unsafe_set(s$0, n[1], 92); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 110); + break a; + case 13: + caml_bytes_unsafe_set(s$0, n[1], 92); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 114); + break a; + default: break c; + } + } + if(34 > c) break b; + } + caml_bytes_unsafe_set(s$0, n[1], 92); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], c); + break a; + } + caml_bytes_unsafe_set(s$0, n[1], 92); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 48 + (c / 100 | 0) | 0); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 48 + ((c / 10 | 0) % 10 | 0) | 0); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 48 + (c % 10 | 0) | 0); + break a; + } + caml_bytes_unsafe_set(s$0, n[1], c); + } + n[1]++; + /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; + if(_ab_ === i) break; + var i = _ac_; + } + } + /*<>*/ return s$0; + /*<>*/ } + function escaped(b){ + /*<>*/ /*<>*/ var b$0 = copy(b); + /*<>*/ return unsafe_escape(b$0); + /*<>*/ } + function map(f, s){ + /*<>*/ var l = caml_ml_bytes_length(s); + /*<>*/ if(0 === l) /*<>*/ return s; + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_create_bytes(l), + /*<>*/ _Y_ = l - 1 | 0, + /*<>*/ _X_ = 0; + if(_Y_ >= 0){ + var i = _X_; + for(;;){ + caml_bytes_unsafe_set + (r, + i, + /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); + /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; + if(_Y_ === i) break; + var i = _Z_; + } + } + /*<>*/ return r; + /*<>*/ } + function mapi(f, s){ + /*<>*/ var l = caml_ml_bytes_length(s); + /*<>*/ if(0 === l) /*<>*/ return s; + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_create_bytes(l), + /*<>*/ _V_ = l - 1 | 0, + /*<>*/ _U_ = 0; + if(_V_ >= 0){ + var i = _U_; + for(;;){ + caml_bytes_unsafe_set + (r, + i, + /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); + /*<>*/ /*<>*/ var _W_ = i + 1 | 0; + if(_V_ === i) break; + var i = _W_; + } + } + /*<>*/ return r; + /*<>*/ } + function fold_left(f, x, a){ + /*<>*/ var + /*<>*/ r = [0, x], + _S_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _R_ = 0; + if(_S_ >= 0){ + var i = _R_; + for(;;){ + r[1] = + /*<>*/ caml_call2 + (f, r[1], caml_bytes_unsafe_get(a, i)); + /*<>*/ /*<>*/ var _T_ = i + 1 | 0; + if(_S_ === i) break; + var i = _T_; + } + } + return r[1]; + /*<>*/ } + function fold_right(f, a, x){ + /*<>*/ var + /*<>*/ r = [0, x], + /*<>*/ _P_ = + /*<>*/ caml_ml_bytes_length(a) - 1 | 0; + if(_P_ >= 0){ + var i = _P_; + for(;;){ + r[1] = + /*<>*/ caml_call2 + (f, caml_bytes_unsafe_get(a, i), r[1]); + /*<>*/ /*<>*/ var _Q_ = i - 1 | 0; + if(0 === i) break; + var i = _Q_; + } + } + return r[1]; + /*<>*/ } + function exists(p, s){ + /*<>*/ var n = caml_ml_bytes_length(s), i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ if + ( /*<>*/ caml_call1(p, caml_bytes_unsafe_get(s, i))) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function for_all(p, s){ + /*<>*/ var n = caml_ml_bytes_length(s), i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 1; + /*<>*/ if + (! /*<>*/ caml_call1(p, caml_bytes_unsafe_get(s, i))) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function uppercase_ascii(s){ + /*<>*/ return map(Stdlib_Char[4], s); + /*<>*/ } + function lowercase_ascii(s){ + /*<>*/ return map(Stdlib_Char[3], s); + /*<>*/ } + function apply1(f, s){ + /*<>*/ if(0 === caml_ml_bytes_length(s)) + /*<>*/ return s; + /*<>*/ /*<>*/ var r = copy(s); + caml_bytes_unsafe_set + (r, + 0, + /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, 0))); + /*<>*/ return r; + /*<>*/ } + function capitalize_ascii(s){ + /*<>*/ return apply1(Stdlib_Char[4], s); + /*<>*/ } + function uncapitalize_ascii(s){ + /*<>*/ return apply1(Stdlib_Char[3], s); + /*<>*/ } + function starts_with(prefix, s){ + /*<>*/ var + len_s = caml_ml_bytes_length(s), + len_pre = caml_ml_bytes_length(prefix), + _O_ = len_pre <= len_s ? 1 : 0; + if(! _O_) return _O_; + var i = 0; + /*<>*/ for(;;){ + if(i === len_pre) /*<>*/ return 1; + if(caml_bytes_unsafe_get(s, i) !== caml_bytes_unsafe_get(prefix, i)) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function ends_with(suffix, s){ + /*<>*/ var + len_s = caml_ml_bytes_length(s), + len_suf = caml_ml_bytes_length(suffix), + diff = len_s - len_suf | 0, + _N_ = 0 <= diff ? 1 : 0; + if(! _N_) return _N_; + var i = 0; + /*<>*/ for(;;){ + if(i === len_suf) /*<>*/ return 1; + if + (caml_bytes_unsafe_get(s, diff + i | 0) + !== caml_bytes_unsafe_get(suffix, i)) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function index_rec(s, lim, i, c){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(lim <= i$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + if(caml_bytes_unsafe_get(s, i$0) === c) + /*<>*/ return i$0; + var i$1 = i$0 + 1 | 0, i$0 = i$1; + } + /*<>*/ } + function index(s, c){ + /*<>*/ return index_rec + (s, caml_ml_bytes_length(s), 0, c); + /*<>*/ } + function index_rec_opt(s, lim, i, c){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(lim <= i$0) /*<>*/ return 0; + if(caml_bytes_unsafe_get(s, i$0) === c) + /*<>*/ return [0, i$0]; + var i$1 = i$0 + 1 | 0, i$0 = i$1; + } + /*<>*/ } + function index_opt(s, c){ + /*<>*/ return index_rec_opt + (s, caml_ml_bytes_length(s), 0, c); + /*<>*/ } + function index_from(s, i, c){ + /*<>*/ 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); + /*<>*/ } + 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); + /*<>*/ } + function rindex_rec(s, i, c){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(0 > i$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + if(caml_bytes_unsafe_get(s, i$0) === c) + /*<>*/ return i$0; + var i$1 = i$0 - 1 | 0, i$0 = i$1; + } + /*<>*/ } + function rindex(s, c){ + /*<>*/ return rindex_rec + (s, caml_ml_bytes_length(s) - 1 | 0, c); + /*<>*/ } + 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); + /*<>*/ } + function rindex_rec_opt(s, i, c){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(0 > i$0) /*<>*/ return 0; + if(caml_bytes_unsafe_get(s, i$0) === c) + /*<>*/ return [0, i$0]; + var i$1 = i$0 - 1 | 0, i$0 = i$1; + } + /*<>*/ } + function rindex_opt(s, c){ + /*<>*/ return rindex_rec_opt + (s, caml_ml_bytes_length(s) - 1 | 0, c); + /*<>*/ } + 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); + /*<>*/ } + function contains_from(s, i, c){ + /*<>*/ var l = caml_ml_bytes_length(s); + if(0 <= i && l >= i) + /*<>*/ try{ + /*<>*/ index_rec(s, l, i, c); + /*<>*/ /*<>*/ var _L_ = 1; + /*<>*/ return _L_; + } + catch(_M_){ + var _K_ = caml_wrap_exception(_M_); + if(_K_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_K_, 0); + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_String_contains_from_Bytes); + /*<>*/ } + function contains(s, c){ + /*<>*/ return contains_from(s, 0, c); + /*<>*/ } + function rcontains_from(s, i, c){ + /*<>*/ if(0 <= i && caml_ml_bytes_length(s) > i) + /*<>*/ try{ + /*<>*/ rindex_rec(s, i, c); + /*<>*/ /*<>*/ var _I_ = 1; + /*<>*/ return _I_; + } + catch(_J_){ + var _H_ = caml_wrap_exception(_J_); + if(_H_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_H_, 0); + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_String_rcontains_from_Byte); + /*<>*/ } + var compare = runtime.caml_bytes_compare; + function split_on_char(sep, s){ + /*<>*/ var + /*<>*/ r = [0, 0], + /*<>*/ j = + [0, /*<>*/ caml_ml_bytes_length(s)], + /*<>*/ _D_ = + /*<>*/ caml_ml_bytes_length(s) - 1 | 0; + if(_D_ >= 0){ + var i = _D_; + for(;;){ + if(caml_bytes_unsafe_get(s, i) === sep){ + var _F_ = r[1]; + r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _F_]; + j[1] = i; + } + /*<>*/ /*<>*/ var _G_ = i - 1 | 0; + if(0 === i) break; + var i = _G_; + } + } + var _E_ = r[1]; + /*<>*/ return [0, sub(s, 0, j[1]), _E_]; + /*<>*/ } + function to_seq(s){ + function aux(i, param){ + /*<>*/ if(i === caml_ml_bytes_length(s)) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = + /*<>*/ caml_bytes_get(s, i), + /*<>*/ _B_ = i + 1 | 0; + /*<>*/ return [0, + x, + function(_C_){ /*<>*/ return aux(_B_, _C_);}]; + /*<>*/ } + /*<>*/ /*<>*/ var _z_ = 0; + /*<>*/ return function(_A_){ + /*<>*/ return aux(_z_, _A_);}; + /*<>*/ } + function to_seqi(s){ + function aux(i, param){ + /*<>*/ if(i === caml_ml_bytes_length(s)) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = + /*<>*/ caml_bytes_get(s, i), + /*<>*/ _x_ = i + 1 | 0; + /*<>*/ return [0, + [0, i, x], + function(_y_){ /*<>*/ return aux(_x_, _y_);}]; + /*<>*/ } + /*<>*/ /*<>*/ var _v_ = 0; + /*<>*/ return function(_w_){ + /*<>*/ return aux(_v_, _w_);}; + /*<>*/ } + function of_seq(i){ + /*<>*/ var + /*<>*/ n = [0, 0], + /*<>*/ buf = [0, make(256, 0)]; + function _u_(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, + Stdlib_Sys[12]); + if(caml_ml_bytes_length(buf[1]) === new_len) + /*<>*/ /*<>*/ caml_call1 + (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; + } + /*<>*/ /*<>*/ caml_bytes_set + (buf[1], n[1], c); + n[1]++; + return 0; + /*<>*/ } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Seq[4], _u_, i); + return sub(buf[1], 0, n[1]); + /*<>*/ } + function unsafe_get_uint16_le(b, i){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bswap16 + ( /*<>*/ caml_bytes_get16(b, i)) + : /*<>*/ caml_bytes_get16(b, i); + /*<>*/ } + function unsafe_get_uint16_be(b, i){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_get16(b, i) + : /*<>*/ caml_bswap16 + ( /*<>*/ caml_bytes_get16(b, i)); + /*<>*/ } + function get_int8(b, i){ + /*<>*/ var + /*<>*/ _s_ = Stdlib_Sys[10] - 8 | 0, + _t_ = Stdlib_Sys[10] - 8 | 0; + return /*<>*/ caml_bytes_get(b, i) << _t_ >> _s_; + /*<>*/ } + function get_uint16_le(b, i){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bswap16 + ( /*<>*/ caml_bytes_get16(b, i)) + : /*<>*/ caml_bytes_get16(b, i); + /*<>*/ } + function get_uint16_be(b, i){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_get16(b, i) + : /*<>*/ caml_bswap16 + ( /*<>*/ caml_bytes_get16(b, i)); + /*<>*/ } + function get_int16_ne(b, i){ + /*<>*/ var + /*<>*/ _q_ = Stdlib_Sys[10] - 16 | 0, + _r_ = Stdlib_Sys[10] - 16 | 0; + return /*<>*/ caml_bytes_get16(b, i) << _r_ >> _q_; + /*<>*/ } + function get_int16_le(b, i){ + /*<>*/ var + /*<>*/ _o_ = Stdlib_Sys[10] - 16 | 0, + _p_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_le(b, i) << _p_ >> _o_; + /*<>*/ } + function get_int16_be(b, i){ + /*<>*/ var + /*<>*/ _m_ = Stdlib_Sys[10] - 16 | 0, + _n_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_be(b, i) << _n_ >> _m_; + /*<>*/ } + function get_int32_le(b, i){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_int32_bswap + ( /*<>*/ caml_bytes_get32(b, i)) + : /*<>*/ caml_bytes_get32(b, i); + /*<>*/ } + function get_int32_be(b, i){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_get32(b, i) + : /*<>*/ caml_int32_bswap + ( /*<>*/ caml_bytes_get32(b, i)); + /*<>*/ } + function get_int64_le(b, i){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_int64_bswap + ( /*<>*/ caml_bytes_get64(b, i)) + : /*<>*/ caml_bytes_get64(b, i); + /*<>*/ } + function get_int64_be(b, i){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_get64(b, i) + : /*<>*/ caml_int64_bswap + ( /*<>*/ caml_bytes_get64(b, i)); + /*<>*/ } + function unsafe_set_uint16_le(b, i, x){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)) + : /*<>*/ caml_bytes_set16(b, i, x); + /*<>*/ } + function unsafe_set_uint16_be(b, i, x){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_set16(b, i, x) + : /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)); + /*<>*/ } + function set_int16_le(b, i, x){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)) + : /*<>*/ caml_bytes_set16(b, i, x); + /*<>*/ } + function set_int16_be(b, i, x){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_set16(b, i, x) + : /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)); + /*<>*/ } + function set_int32_le(b, i, x){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_set32 + (b, i, /*<>*/ caml_int32_bswap(x)) + : /*<>*/ caml_bytes_set32(b, i, x); + /*<>*/ } + function set_int32_be(b, i, x){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_set32(b, i, x) + : /*<>*/ caml_bytes_set32 + (b, i, /*<>*/ caml_int32_bswap(x)); + /*<>*/ } + function set_int64_le(b, i, x){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_set64 + (b, i, /*<>*/ caml_int64_bswap(x)) + : /*<>*/ caml_bytes_set64(b, i, x); + /*<>*/ } + function set_int64_be(b, i, x){ + /*<>*/ return Stdlib_Sys[11] + ? /*<>*/ caml_bytes_set64(b, i, x) + : /*<>*/ caml_bytes_set64 + (b, i, /*<>*/ caml_int64_bswap(x)); + /*<>*/ } + var + set_uint8 = caml_bytes_set, + set_uint16_ne = caml_bytes_set16, + dec_invalid = Stdlib_Uchar[22]; + function dec_ret(n, u){ + /*<>*/ /*<>*/ var + _l_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Uchar[21], n, _l_); + /*<>*/ } + function not_in_x80_to_xBF(b){ + /*<>*/ return 2 !== (b >>> 6 | 0) ? 1 : 0; + /*<>*/ } + function not_in_xA0_to_xBF(b){ + /*<>*/ return 5 !== (b >>> 5 | 0) ? 1 : 0; + /*<>*/ } + function not_in_x80_to_x9F(b){ + /*<>*/ return 4 !== (b >>> 5 | 0) ? 1 : 0; + /*<>*/ } + function not_in_x90_to_xBF(b){ + /*<>*/ var + _j_ = b < 144 ? 1 : 0, + _k_ = _j_ || (191 < b ? 1 : 0); + return _k_; + /*<>*/ } + function not_in_x80_to_x8F(b){ + /*<>*/ return 8 !== (b >>> 4 | 0) ? 1 : 0; + /*<>*/ } + function utf_8_uchar_3(b0, b1, b2){ + /*<>*/ return (b0 & 15) << 12 | (b1 & 63) << 6 | b2 & 63; + /*<>*/ } + function utf_8_uchar_4(b0, b1, b2, b3){ + /*<>*/ return (b0 & 7) << 18 | (b1 & 63) << 12 + | (b2 & 63) << 6 + | b3 & 63; + /*<>*/ } + function get_utf_8_uchar(b, i){ + /*<>*/ var + /*<>*/ b0 = + /*<>*/ caml_bytes_get(b, i), + /*<>*/ max = + /*<>*/ caml_ml_bytes_length(b) - 1 | 0; + a: + { + /*<>*/ if(224 <= b0){ + if(237 <= b0){ + if(245 <= b0) break a; + switch(b0 - 237 | 0){ + case 0: + /*<>*/ /*<>*/ var i$0 = i + 1 | 0; + if(max < i$0) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + b1 = /*<>*/ caml_bytes_unsafe_get(b, i$0); + /*<>*/ if(not_in_x80_to_x9F(b1)) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + i$1 = i$0 + 1 | 0; + if(max < i$1) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 2); + /*<>*/ /*<>*/ var + b2 = /*<>*/ caml_bytes_unsafe_get(b, i$1); + /*<>*/ return not_in_x80_to_xBF(b2) + ? /*<>*/ caml_call1(dec_invalid, 2) + : dec_ret(3, utf_8_uchar_3(b0, b1, b2)); + case 3: + /*<>*/ /*<>*/ var i$4 = i + 1 | 0; + if(max < i$4) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + b1$1 = /*<>*/ caml_bytes_unsafe_get(b, i$4); + /*<>*/ if(not_in_x90_to_xBF(b1$1)) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + i$5 = i$4 + 1 | 0; + if(max < i$5) + /*<>*/ return /*<>*/ caml_call1 + (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); + /*<>*/ /*<>*/ var + i$6 = i$5 + 1 | 0; + if(max < i$6) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 3); + /*<>*/ /*<>*/ var + b3 = /*<>*/ caml_bytes_unsafe_get(b, i$6); + /*<>*/ return not_in_x80_to_xBF(b3) + ? /*<>*/ caml_call1(dec_invalid, 3) + : dec_ret(4, utf_8_uchar_4(b0, b1$1, b2$1, b3)); + case 7: + /*<>*/ /*<>*/ var + i$10 = i + 1 | 0; + if(max < i$10) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + b1$3 = /*<>*/ caml_bytes_unsafe_get(b, i$10); + /*<>*/ if(not_in_x80_to_x8F(b1$3)) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + i$11 = i$10 + 1 | 0; + if(max < i$11) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 2); + /*<>*/ /*<>*/ var + b2$3 = /*<>*/ caml_bytes_unsafe_get(b, i$11); + /*<>*/ if(not_in_x80_to_xBF(b2$3)) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 2); + /*<>*/ /*<>*/ var + i$12 = i$11 + 1 | 0; + if(max < i$12) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 3); + /*<>*/ /*<>*/ var + b3$1 = /*<>*/ caml_bytes_unsafe_get(b, i$12); + /*<>*/ return not_in_x80_to_xBF(b3$1) + ? /*<>*/ caml_call1(dec_invalid, 3) + : dec_ret(4, utf_8_uchar_4(b0, b1$3, b2$3, b3$1)); + case 1: + case 2: break; + default: + /*<>*/ /*<>*/ var i$7 = i + 1 | 0; + if(max < i$7) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + b1$2 = /*<>*/ caml_bytes_unsafe_get(b, i$7); + /*<>*/ if(not_in_x80_to_xBF(b1$2)) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + i$8 = i$7 + 1 | 0; + if(max < i$8) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 2); + /*<>*/ /*<>*/ var + b2$2 = /*<>*/ caml_bytes_unsafe_get(b, i$8); + /*<>*/ if(not_in_x80_to_xBF(b2$2)) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 2); + /*<>*/ /*<>*/ var + i$9 = i$8 + 1 | 0; + if(max < i$9) + /*<>*/ return /*<>*/ caml_call1 + (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_ret(4, utf_8_uchar_4(b0, b1$2, b2$2, b3$0)); + } + } + else if(225 > b0){ + /*<>*/ /*<>*/ var i$13 = i + 1 | 0; + if(max < i$13) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + b1$4 = /*<>*/ caml_bytes_unsafe_get(b, i$13); + /*<>*/ if(not_in_xA0_to_xBF(b1$4)) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + i$14 = i$13 + 1 | 0; + if(max < i$14) + /*<>*/ return /*<>*/ caml_call1 + (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_ret(3, utf_8_uchar_3(b0, b1$4, b2$4)); + } + /*<>*/ /*<>*/ var i$2 = i + 1 | 0; + if(max < i$2) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + b1$0 = /*<>*/ caml_bytes_unsafe_get(b, i$2); + /*<>*/ if(not_in_x80_to_xBF(b1$0)) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var i$3 = i$2 + 1 | 0; + if(max < i$3) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 2); + /*<>*/ /*<>*/ var + b2$0 = /*<>*/ caml_bytes_unsafe_get(b, i$3); + /*<>*/ return not_in_x80_to_xBF(b2$0) + ? /*<>*/ caml_call1(dec_invalid, 2) + : dec_ret(3, utf_8_uchar_3(b0, b1$0, b2$0)); + } + if(128 > b0) /*<>*/ return dec_ret(1, b0); + if(194 <= b0){ + /*<>*/ /*<>*/ var i$15 = i + 1 | 0; + if(max < i$15) + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ /*<>*/ var + b1$5 = /*<>*/ caml_bytes_unsafe_get(b, i$15); + /*<>*/ return not_in_x80_to_xBF(b1$5) + ? /*<>*/ caml_call1(dec_invalid, 1) + : dec_ret(2, (b0 & 31) << 6 | b1$5 & 63); + } + } + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 1); + /*<>*/ } + function set_utf_8_uchar(b, i, u){ + /*<>*/ function set(_i_, _h_, _g_){ + /*<>*/ caml_bytes_unsafe_set(_i_, _h_, _g_); + return 0; + } + /*<>*/ var + /*<>*/ max = + /*<>*/ caml_ml_bytes_length(b) - 1 | 0, + /*<>*/ u$0 = + /*<>*/ caml_call1(Stdlib_Uchar[10], u); + /*<>*/ if(0 > u$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + /*<>*/ if(127 >= u$0){ + /*<>*/ /*<>*/ caml_bytes_set(b, i, u$0); + /*<>*/ return 1; + } + /*<>*/ if(2047 >= u$0){ + /*<>*/ /*<>*/ var last$1 = i + 1 | 0; + return max < last$1 + ? 0 + : ( /*<>*/ caml_bytes_set + (b, i, 192 | u$0 >>> 6 | 0), + set(b, last$1, 128 | u$0 & 63), + 2); + } + /*<>*/ if(65535 >= u$0){ + /*<>*/ /*<>*/ var last$0 = i + 2 | 0; + return max < last$0 + ? 0 + : ( /*<>*/ caml_bytes_set + (b, i, 224 | u$0 >>> 12 | 0), + set(b, i + 1 | 0, 128 | (u$0 >>> 6 | 0) & 63), + set(b, last$0, 128 | u$0 & 63), + 3); + } + /*<>*/ if(1114111 < u$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); + /*<>*/ /*<>*/ var last = i + 3 | 0; + return max < last + ? 0 + : ( /*<>*/ caml_bytes_set + (b, i, 240 | u$0 >>> 18 | 0), + set(b, i + 1 | 0, 128 | (u$0 >>> 12 | 0) & 63), + set(b, i + 2 | 0, 128 | (u$0 >>> 6 | 0) & 63), + set(b, last, 128 | u$0 & 63), + 4); + /*<>*/ } + function is_valid_utf_8(b){ + /*<>*/ var max = caml_ml_bytes_length(b) - 1 | 0, i = 0; + /*<>*/ for(;;){ + if(max < i) /*<>*/ return 1; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_bytes_unsafe_get(b, i); + a: + { + if(224 <= match){ + if(237 <= match){ + if(245 <= match) break a; + switch(match - 237 | 0){ + case 0: + /*<>*/ /*<>*/ var + last = i + 2 | 0; + /*<>*/ if + (max >= last + && + ! + not_in_x80_to_x9F + ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, last))){ + /*<>*/ var + /*<>*/ i$0 = last + 1 | 0, + i = i$0; + continue; + } + /*<>*/ return 0; + case 3: + /*<>*/ /*<>*/ var + last$1 = i + 3 | 0; + /*<>*/ if + (max >= last$1 + && + ! + not_in_x90_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, i + 2 | 0)) + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, last$1))){ + /*<>*/ var + /*<>*/ i$2 = last$1 + 1 | 0, + i = i$2; + continue; + } + /*<>*/ return 0; + case 7: + /*<>*/ /*<>*/ var + last$3 = i + 3 | 0; + /*<>*/ if + (max >= last$3 + && + ! + not_in_x80_to_x8F + ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, i + 2 | 0)) + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, last$3))){ + /*<>*/ var + /*<>*/ i$4 = last$3 + 1 | 0, + i = i$4; + continue; + } + /*<>*/ return 0; + case 1: + case 2: break; + default: + /*<>*/ /*<>*/ var + last$2 = i + 3 | 0; + /*<>*/ if + (max >= last$2 + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, i + 2 | 0)) + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, last$2))){ + /*<>*/ var + /*<>*/ i$3 = last$2 + 1 | 0, + i = i$3; + continue; + } + /*<>*/ return 0; + } + } + else if(225 > match){ + /*<>*/ /*<>*/ var + last$4 = i + 2 | 0; + /*<>*/ if + (max >= last$4 + && + ! + not_in_xA0_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, last$4))){ + /*<>*/ var + /*<>*/ i$5 = last$4 + 1 | 0, + i = i$5; + continue; + } + /*<>*/ return 0; + } + /*<>*/ /*<>*/ var last$0 = i + 2 | 0; + /*<>*/ if + (max >= last$0 + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, last$0))){ + /*<>*/ var + /*<>*/ i$1 = last$0 + 1 | 0, + i = i$1; + continue; + } + /*<>*/ return 0; + } + if(128 > match){ + /*<>*/ var + /*<>*/ i$7 = i + 1 | 0, + i = i$7; + continue; + } + if(194 <= match){ + /*<>*/ /*<>*/ var last$5 = i + 1 | 0; + /*<>*/ if + (max >= last$5 + && + ! + not_in_x80_to_xBF + ( /*<>*/ caml_bytes_unsafe_get(b, last$5))){ + /*<>*/ var + /*<>*/ i$6 = last$5 + 1 | 0, + i = i$6; + continue; + } + /*<>*/ return 0; + } + } + /*<>*/ return 0; + } + /*<>*/ } + function get_utf_16be_uchar(b, i){ + /*<>*/ /*<>*/ var + max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; + if(0 <= i && max >= i){ + if(i === max) + /*<>*/ return /*<>*/ caml_call1 + (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); + /*<>*/ /*<>*/ var last = i + 3 | 0; + if(max < last) return caml_call1(dec_invalid, (max - i | 0) + 1 | 0); + /*<>*/ /*<>*/ var + lo = unsafe_get_uint16_be(b, i + 2 | 0); + if(56320 <= lo && 57343 >= lo){ + var u = ((hi & 1023) << 10 | lo & 1023) + 65536 | 0; + /*<>*/ return dec_ret(4, u); + } + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 2); + } + /*<>*/ return dec_ret(2, hi); + } + /*<>*/ return /*<>*/ caml_call1 + (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); + /*<>*/ if(0 > u$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _d_], 1); + /*<>*/ if(65535 >= u$0){ + /*<>*/ /*<>*/ var last$0 = i + 1 | 0; + return max < last$0 ? 0 : (unsafe_set_uint16_be(b, i, u$0), 2); + } + /*<>*/ if(1114111 < u$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _c_], 1); + /*<>*/ /*<>*/ var last = i + 3 | 0; + if(max < last) /*<>*/ return 0; + /*<>*/ var + /*<>*/ u$1 = u$0 - 65536 | 0, + hi = 55296 | u$1 >>> 10 | 0, + lo = 56320 | u$1 & 1023; + /*<>*/ unsafe_set_uint16_be(b, i, hi); + /*<>*/ unsafe_set_uint16_be(b, i + 2 | 0, lo); + /*<>*/ return 4; + } + /*<>*/ return /*<>*/ caml_call1 + (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; + /*<>*/ for(;;){ + if(max < i) /*<>*/ return 1; + if(i === max) /*<>*/ return 0; + /*<>*/ /*<>*/ var + u = unsafe_get_uint16_be(b, i); + if(55296 <= u && 57343 >= u){ + /*<>*/ if(56319 < u) + /*<>*/ return 0; + /*<>*/ /*<>*/ var last = i + 3 | 0; + if(max < last) /*<>*/ return 0; + /*<>*/ /*<>*/ var + u$0 = unsafe_get_uint16_be(b, i + 2 | 0); + if(56320 <= u$0 && 57343 >= u$0){ + /*<>*/ var + /*<>*/ i$1 = i + 4 | 0, + i = i$1; + continue; + } + /*<>*/ return 0; + } + /*<>*/ var + /*<>*/ i$0 = i + 2 | 0, + i = i$0; + } + /*<>*/ } + function get_utf_16le_uchar(b, i){ + /*<>*/ /*<>*/ var + max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; + if(0 <= i && max >= i){ + if(i === max) + /*<>*/ return /*<>*/ caml_call1 + (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); + /*<>*/ /*<>*/ var last = i + 3 | 0; + if(max < last) return caml_call1(dec_invalid, (max - i | 0) + 1 | 0); + /*<>*/ /*<>*/ var + lo = unsafe_get_uint16_le(b, i + 2 | 0); + if(56320 <= lo && 57343 >= lo){ + var u = ((hi & 1023) << 10 | lo & 1023) + 65536 | 0; + /*<>*/ return dec_ret(4, u); + } + /*<>*/ return /*<>*/ caml_call1 + (dec_invalid, 2); + } + /*<>*/ return dec_ret(2, hi); + } + /*<>*/ return /*<>*/ caml_call1 + (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); + /*<>*/ if(0 > u$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _f_], 1); + /*<>*/ if(65535 >= u$0){ + /*<>*/ /*<>*/ var last$0 = i + 1 | 0; + return max < last$0 ? 0 : (unsafe_set_uint16_le(b, i, u$0), 2); + } + /*<>*/ if(1114111 < u$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _e_], 1); + /*<>*/ /*<>*/ var last = i + 3 | 0; + if(max < last) /*<>*/ return 0; + /*<>*/ var + /*<>*/ u$1 = u$0 - 65536 | 0, + hi = 55296 | u$1 >>> 10 | 0, + lo = 56320 | u$1 & 1023; + /*<>*/ unsafe_set_uint16_le(b, i, hi); + /*<>*/ unsafe_set_uint16_le(b, i + 2 | 0, lo); + /*<>*/ return 4; + } + /*<>*/ return /*<>*/ caml_call1 + (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; + /*<>*/ for(;;){ + if(max < i) /*<>*/ return 1; + if(i === max) /*<>*/ return 0; + /*<>*/ /*<>*/ var + u = unsafe_get_uint16_le(b, i); + if(55296 <= u && 57343 >= u){ + /*<>*/ if(56319 < u) + /*<>*/ return 0; + /*<>*/ /*<>*/ var last = i + 3 | 0; + if(max < last) /*<>*/ return 0; + /*<>*/ /*<>*/ var + u$0 = unsafe_get_uint16_le(b, i + 2 | 0); + if(56320 <= u$0 && 57343 >= u$0){ + /*<>*/ var + /*<>*/ i$1 = i + 4 | 0, + i = i$1; + continue; + } + /*<>*/ return 0; + } + /*<>*/ var + /*<>*/ i$0 = i + 2 | 0, + i = i$0; + } + /*<>*/ } + var + Stdlib_Bytes = + [0, + make, + init, + empty, + copy, + of_string, + to_string, + sub, + sub_string, + extend, + fill, + blit, + blit_string, + concat, + cat, + iter, + iteri, + map, + mapi, + fold_left, + fold_right, + for_all, + exists, + trim, + escaped, + index, + index_opt, + rindex, + rindex_opt, + index_from, + index_from_opt, + rindex_from, + rindex_from_opt, + contains, + contains_from, + rcontains_from, + uppercase_ascii, + lowercase_ascii, + capitalize_ascii, + uncapitalize_ascii, + compare, + runtime.caml_bytes_equal, + starts_with, + ends_with, + caml_string_of_bytes, + caml_bytes_of_string, + split_on_char, + to_seq, + to_seqi, + of_seq, + get_utf_8_uchar, + set_utf_8_uchar, + is_valid_utf_8, + get_utf_16be_uchar, + set_utf_16be_uchar, + is_valid_utf_16be, + get_utf_16le_uchar, + set_utf_16le_uchar, + is_valid_utf_16le, + caml_bytes_get, + get_int8, + caml_bytes_get16, + get_uint16_be, + get_uint16_le, + get_int16_ne, + get_int16_be, + get_int16_le, + caml_bytes_get32, + get_int32_be, + get_int32_le, + caml_bytes_get64, + get_int64_be, + get_int64_le, + set_uint8, + caml_bytes_set, + set_uint16_ne, + set_int16_be, + set_int16_le, + caml_bytes_set16, + set_int16_be, + set_int16_le, + caml_bytes_set32, + set_int32_be, + set_int32_le, + caml_bytes_set64, + set_int64_be, + set_int64_le, + unsafe_escape]; + runtime.caml_register_global(30, Stdlib_Bytes, "Stdlib__Bytes"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__String +//# unitInfo: Requires: Stdlib, Stdlib__Bytes +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst$0 = "", + caml_blit_string = runtime.caml_blit_string, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_equal = runtime.caml_string_equal, + caml_string_hash = runtime.caml_string_hash, + caml_string_unsafe_get = runtime.caml_string_unsafe_get, + 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) + : 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, + empty = cst$0, + Stdlib = global_data.Stdlib, + Stdlib_Bytes = global_data.Stdlib__Bytes, + bts = Stdlib_Bytes[44], + bos = Stdlib_Bytes[45], + cst_String_rcontains_from_Byte = + "String.rcontains_from / Bytes.rcontains_from", + cst_String_contains_from_Bytes = + "String.contains_from / Bytes.contains_from", + cst_String_rindex_from_opt_Byt = + "String.rindex_from_opt / Bytes.rindex_from_opt", + cst_String_rindex_from_Bytes_r = "String.rindex_from / Bytes.rindex_from", + cst_String_index_from_opt_Byte = + "String.index_from_opt / Bytes.index_from_opt", + cst_String_index_from_Bytes_in = "String.index_from / Bytes.index_from", + cst_String_concat = "String.concat"; + function make(n, c){ + /*<>*/ return /*<>*/ caml_call1 + (bts, /*<>*/ caml_call2(Stdlib_Bytes[1], n, c)); + /*<>*/ } + function init(n, f){ + /*<>*/ return /*<>*/ caml_call1 + (bts, /*<>*/ caml_call2(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 blit = Stdlib_Bytes[12]; + function concat(sep, l){ + /*<>*/ if(! l) /*<>*/ return cst; + var seplen = caml_ml_string_length(sep), acc = 0, param = l, pos$1 = 0; + for(;;){ + if(param){ + var hd = param[1]; + if(param[2]){ + var + tl = param[2], + x = (caml_ml_string_length(hd) + seplen | 0) + acc | 0, + acc$0 = + acc <= x + ? x + : /*<>*/ caml_call1(Stdlib[1], cst_String_concat), + acc = acc$0, + param = tl; + continue; + } + var _W_ = caml_ml_string_length(hd) + acc | 0; + } + else + var _W_ = acc; + /*<>*/ var + /*<>*/ dst = + /*<>*/ runtime.caml_create_bytes(_W_), + pos = pos$1, + param$0 = l; + for(;;){ + if(param$0){ + var hd$0 = param$0[1]; + if(param$0[2]){ + var tl$0 = param$0[2]; + /*<>*/ /*<>*/ caml_blit_string + (hd$0, + 0, + dst, + pos, + /*<>*/ caml_ml_string_length(hd$0)); + /*<>*/ /*<>*/ caml_blit_string + (sep, 0, dst, pos + caml_ml_string_length(hd$0) | 0, seplen); + var + pos$0 = (pos + caml_ml_string_length(hd$0) | 0) + seplen | 0, + pos = pos$0, + param$0 = tl$0; + continue; + } + /*<>*/ /*<>*/ caml_blit_string + (hd$0, 0, dst, pos, caml_ml_string_length(hd$0)); + } + /*<>*/ return /*<>*/ caml_call1 + (bts, dst); + } + } + } + var cat = Stdlib[28]; + function iter(f, s){ + /*<>*/ var + _U_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _T_ = 0; + if(_U_ >= 0){ + var i = _T_; + for(;;){ + /*<>*/ /*<>*/ caml_call1 + (f, caml_string_unsafe_get(s, i)); + /*<>*/ /*<>*/ var _V_ = i + 1 | 0; + if(_U_ === i) break; + var i = _V_; + } + } + return 0; + /*<>*/ } + function iteri(f, s){ + /*<>*/ var + _R_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _Q_ = 0; + if(_R_ >= 0){ + var i = _Q_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (f, i, caml_string_unsafe_get(s, i)); + /*<>*/ /*<>*/ var _S_ = i + 1 | 0; + if(_R_ === i) break; + var i = _S_; + } + } + return 0; + /*<>*/ } + function map(f, s){ + /*<>*/ /*<>*/ var + _P_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (bts, + /*<>*/ caml_call2(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_)); + /*<>*/ } + function fold_right(f, x, a){ + /*<>*/ /*<>*/ var + _N_ = /*<>*/ caml_call1(bos, x); + /*<>*/ return /*<>*/ caml_call3 + (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_); + /*<>*/ } + function exists(f, s){ + /*<>*/ /*<>*/ var + _L_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Bytes[22], f, _L_); + /*<>*/ } + function for_all(f, s){ + /*<>*/ /*<>*/ var + _K_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Bytes[21], f, _K_); + /*<>*/ } + function is_space(param){ + /*<>*/ /*<>*/ var _J_ = param - 9 | 0; + a: + { + if(4 < _J_ >>> 0){if(23 !== _J_) break a;} else if(2 === _J_) break a; + /*<>*/ return 1; + } + /*<>*/ return 0; + /*<>*/ } + function trim(s){ + /*<>*/ if + ( /*<>*/ caml_string_equal(s, cst$0)) + /*<>*/ return s; + /*<>*/ if + (! + is_space(caml_string_unsafe_get(s, 0)) + && + ! + is_space(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_)); + /*<>*/ } + function escaped(s){ + /*<>*/ /*<>*/ var + b = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (bts, /*<>*/ caml_call1(Stdlib_Bytes[87], b)); + /*<>*/ } + function index_rec(s, lim, i, c){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(lim <= i$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + if(caml_string_unsafe_get(s, i$0) === c) + /*<>*/ return i$0; + var i$1 = i$0 + 1 | 0, i$0 = i$1; + } + /*<>*/ } + function index(s, c){ + /*<>*/ return index_rec + (s, caml_ml_string_length(s), 0, c); + /*<>*/ } + function index_rec_opt(s, lim, i, c){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(lim <= i$0) /*<>*/ return 0; + if(caml_string_unsafe_get(s, i$0) === c) + /*<>*/ return [0, i$0]; + var i$1 = i$0 + 1 | 0, i$0 = i$1; + } + /*<>*/ } + function index_opt(s, c){ + /*<>*/ return index_rec_opt + (s, caml_ml_string_length(s), 0, c); + /*<>*/ } + function index_from(s, i, c){ + /*<>*/ 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); + /*<>*/ } + 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); + /*<>*/ } + function rindex_rec(s, i, c){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(0 > i$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + if(caml_string_unsafe_get(s, i$0) === c) + /*<>*/ return i$0; + var i$1 = i$0 - 1 | 0, i$0 = i$1; + } + /*<>*/ } + function rindex(s, c){ + /*<>*/ return rindex_rec + (s, caml_ml_string_length(s) - 1 | 0, c); + /*<>*/ } + 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); + /*<>*/ } + function rindex_rec_opt(s, i, c){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(0 > i$0) /*<>*/ return 0; + if(caml_string_unsafe_get(s, i$0) === c) + /*<>*/ return [0, i$0]; + var i$1 = i$0 - 1 | 0, i$0 = i$1; + } + /*<>*/ } + function rindex_opt(s, c){ + /*<>*/ return rindex_rec_opt + (s, caml_ml_string_length(s) - 1 | 0, c); + /*<>*/ } + 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); + /*<>*/ } + function contains_from(s, i, c){ + /*<>*/ var l = caml_ml_string_length(s); + if(0 <= i && l >= i) + /*<>*/ try{ + /*<>*/ index_rec(s, l, i, c); + /*<>*/ /*<>*/ var _G_ = 1; + /*<>*/ return _G_; + } + catch(_H_){ + var _F_ = caml_wrap_exception(_H_); + if(_F_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_F_, 0); + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_String_contains_from_Bytes); + /*<>*/ } + function contains(s, c){ + /*<>*/ return contains_from(s, 0, c); + /*<>*/ } + function rcontains_from(s, i, c){ + /*<>*/ if(0 <= i && caml_ml_string_length(s) > i) + /*<>*/ try{ + /*<>*/ rindex_rec(s, i, c); + /*<>*/ /*<>*/ var _D_ = 1; + /*<>*/ return _D_; + } + catch(_E_){ + var _C_ = caml_wrap_exception(_E_); + if(_C_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_C_, 0); + } + /*<>*/ return /*<>*/ caml_call1 + (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_)); + /*<>*/ } + function lowercase_ascii(s){ + /*<>*/ /*<>*/ var + _A_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (bts, /*<>*/ caml_call1(Stdlib_Bytes[37], _A_)); + /*<>*/ } + function capitalize_ascii(s){ + /*<>*/ /*<>*/ var + _z_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (bts, /*<>*/ caml_call1(Stdlib_Bytes[38], _z_)); + /*<>*/ } + function uncapitalize_ascii(s){ + /*<>*/ /*<>*/ var + _y_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (bts, /*<>*/ caml_call1(Stdlib_Bytes[39], _y_)); + /*<>*/ } + function starts_with(prefix, s){ + /*<>*/ var + len_s = caml_ml_string_length(s), + len_pre = caml_ml_string_length(prefix), + _x_ = len_pre <= len_s ? 1 : 0; + if(! _x_) return _x_; + var i = 0; + /*<>*/ for(;;){ + if(i === len_pre) /*<>*/ return 1; + if(caml_string_unsafe_get(s, i) !== caml_string_unsafe_get(prefix, i)) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function ends_with(suffix, s){ + /*<>*/ var + len_s = caml_ml_string_length(s), + len_suf = caml_ml_string_length(suffix), + diff = len_s - len_suf | 0, + _w_ = 0 <= diff ? 1 : 0; + if(! _w_) return _w_; + var i = 0; + /*<>*/ for(;;){ + if(i === len_suf) /*<>*/ return 1; + if + (caml_string_unsafe_get(s, diff + i | 0) + !== caml_string_unsafe_get(suffix, i)) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function hash(x){ + /*<>*/ return /*<>*/ caml_string_hash + (0, x); + /*<>*/ } + function split_on_char(sep, s){ + /*<>*/ var + /*<>*/ r = [0, 0], + /*<>*/ j = + [0, /*<>*/ caml_ml_string_length(s)], + /*<>*/ _s_ = + /*<>*/ caml_ml_string_length(s) - 1 | 0; + if(_s_ >= 0){ + var i = _s_; + for(;;){ + if(caml_string_unsafe_get(s, i) === sep){ + var _u_ = r[1]; + r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _u_]; + j[1] = i; + } + /*<>*/ /*<>*/ var _v_ = i - 1 | 0; + if(0 === i) break; + var i = _v_; + } + } + var _t_ = r[1]; + /*<>*/ return [0, sub(s, 0, j[1]), _t_]; + /*<>*/ } + var compare = runtime.caml_string_compare; + function to_seq(s){ + /*<>*/ /*<>*/ var + _r_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[47], _r_); + /*<>*/ } + function to_seqi(s){ + /*<>*/ /*<>*/ var + _q_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[48], _q_); + /*<>*/ } + function of_seq(g){ + /*<>*/ return /*<>*/ caml_call1 + (bts, /*<>*/ caml_call1(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); + /*<>*/ } + function is_valid_utf_8(s){ + /*<>*/ /*<>*/ var + _o_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (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); + /*<>*/ } + function is_valid_utf_16be(s){ + /*<>*/ /*<>*/ var + _m_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (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); + /*<>*/ } + function is_valid_utf_16le(s){ + /*<>*/ /*<>*/ var + _k_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[58], _k_); + /*<>*/ } + function get_int8(s, i){ + /*<>*/ /*<>*/ var + _j_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call2 + (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); + /*<>*/ } + function get_uint16_be(s, i){ + /*<>*/ /*<>*/ var + _h_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call2 + (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); + /*<>*/ } + function get_int16_le(s, i){ + /*<>*/ /*<>*/ var + _f_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call2 + (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); + /*<>*/ } + function get_int32_le(s, i){ + /*<>*/ /*<>*/ var + _d_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call2 + (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); + /*<>*/ } + function get_int64_le(s, i){ + /*<>*/ /*<>*/ var + _b_ = /*<>*/ caml_call1(bos, s); + /*<>*/ return /*<>*/ caml_call2 + (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 + Stdlib_String = + [0, + make, + init, + empty, + of_bytes, + to_bytes, + concat, + cat, + caml_string_equal, + compare, + starts_with, + ends_with, + contains_from, + rcontains_from, + contains, + sub, + split_on_char, + map, + mapi, + fold_left, + fold_right, + for_all, + exists, + trim, + escaped, + uppercase_ascii, + lowercase_ascii, + capitalize_ascii, + uncapitalize_ascii, + iter, + iteri, + index_from, + index_from_opt, + rindex_from, + rindex_from_opt, + index, + index_opt, + rindex, + rindex_opt, + to_seq, + to_seqi, + of_seq, + get_utf_8_uchar, + is_valid_utf_8, + get_utf_16be_uchar, + is_valid_utf_16be, + get_utf_16le_uchar, + is_valid_utf_16le, + blit, + runtime.caml_string_get, + get_int8, + runtime.caml_string_get16, + get_uint16_be, + get_uint16_le, + get_int16_ne, + get_int16_be, + get_int16_le, + runtime.caml_string_get32, + hash, + caml_string_hash, + get_int32_be, + get_int32_le, + runtime.caml_string_get64, + get_int64_be, + get_int64_le]; + runtime.caml_register_global(12, Stdlib_String, "Stdlib__String"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Unit +(function(globalThis){ + "use strict"; + var runtime = globalThis.jsoo_runtime, cst = "()"; + function equal(param, _b_){ + /*<>*/ return 1; + /*<>*/ } + function compare(param, _a_){ + /*<>*/ return 0; + /*<>*/ } + function to_string(param){ + /*<>*/ return cst; + /*<>*/ } + var Stdlib_Unit = [0, equal, compare, to_string]; + runtime.caml_register_global(1, Stdlib_Unit, "Stdlib__Unit"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Marshal +//# unitInfo: Requires: Stdlib, Stdlib__Bytes +(function + (globalThis){ + "use strict"; + var + 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 + global_data = runtime.caml_get_global_data(), + Stdlib_Bytes = global_data.Stdlib__Bytes, + Stdlib = global_data.Stdlib, + cst_Marshal_from_bytes = cst_Marshal_from_bytes$1, + cst_Marshal_from_bytes$0 = cst_Marshal_from_bytes$1, + cst_Marshal_data_size = "Marshal.data_size", + cst_Marshal_to_buffer_substrin = + "Marshal.to_buffer: substring out of bounds"; + function to_buffer(buff, ofs, len, v, flags){ + /*<>*/ if + (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); + /*<>*/ } + var header_size = 20; + function data_size(buff, ofs){ + /*<>*/ if + (0 <= ofs && (caml_ml_bytes_length(buff) - 20 | 0) >= ofs) + /*<>*/ return /*<>*/ caml_marshal_data_size + (buff, ofs); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Marshal_data_size); + /*<>*/ } + function total_size(buff, ofs){ + /*<>*/ return 20 + data_size(buff, ofs) | 0; + /*<>*/ } + function from_bytes(buff, ofs){ + /*<>*/ if + (0 <= ofs && (caml_ml_bytes_length(buff) - 20 | 0) >= ofs){ + /*<>*/ /*<>*/ var + len = /*<>*/ caml_marshal_data_size(buff, ofs); + return (caml_ml_bytes_length(buff) - (20 + len | 0) | 0) < ofs + ? /*<>*/ caml_call1 + (Stdlib[1], cst_Marshal_from_bytes$0) + : /*<>*/ runtime.caml_input_value_from_bytes + (buff, ofs); + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Marshal_from_bytes); + /*<>*/ } + function from_string(buff, ofs){ + /*<>*/ return from_bytes + ( /*<>*/ caml_call1(Stdlib_Bytes[45], buff), + ofs); + /*<>*/ } + var + Stdlib_Marshal = + [0, + runtime.caml_output_value, + to_buffer, + runtime.caml_input_value, + from_bytes, + from_string, + header_size, + data_size, + total_size]; + runtime.caml_register_global(6, Stdlib_Marshal, "Stdlib__Marshal"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Array +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Seq +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_array_sub = runtime.caml_array_sub, + caml_check_bound = runtime.caml_check_bound, + caml_make_vect = runtime.caml_make_vect, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + 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) + : 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, + Assert_failure = global_data.Assert_failure, + Stdlib = global_data.Stdlib, + /*<>*/ Floatarray = [0], + _a_ = [0, "array.ml", 319, 4], + cst_Array_combine = "Array.combine", + cst_Array_exists2 = "Array.exists2", + cst_Array_for_all2 = "Array.for_all2", + cst_Array_map2_arrays_must_hav = + "Array.map2: arrays must have the same length", + cst_Array_iter2_arrays_must_ha = + "Array.iter2: arrays must have the same length", + cst_Array_blit = "Array.blit", + cst_Array_fill = "Array.fill", + cst_Array_sub = "Array.sub", + cst_Array_init = "Array.init", + cst_Stdlib_Array_Bottom = "Stdlib.Array.Bottom"; + function init(l, f){ + /*<>*/ if(0 === l) /*<>*/ return [0]; + if(0 > l) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Array_init); + /*<>*/ var + /*<>*/ res = + /*<>*/ caml_make_vect + (l, /*<>*/ caml_call1(f, 0)), + /*<>*/ _as_ = l - 1 | 0, + /*<>*/ _ar_ = 1; + if(_as_ >= 1){ + var i = _ar_; + for(;;){ + /*<>*/ res[1 + i] = + /*<>*/ caml_call1(f, i); + /*<>*/ /*<>*/ var _at_ = i + 1 | 0; + if(_as_ === i) break; + var i = _at_; + } + } + /*<>*/ return res; + /*<>*/ } + function make_matrix(sx, sy, init){ + /*<>*/ var + /*<>*/ res = + /*<>*/ caml_make_vect(sx, [0]), + /*<>*/ _ap_ = sx - 1 | 0, + /*<>*/ _ao_ = 0; + if(_ap_ >= 0){ + var x = _ao_; + for(;;){ + res[1 + x] = /*<>*/ caml_make_vect(sy, init); + /*<>*/ /*<>*/ var _aq_ = x + 1 | 0; + if(_ap_ === x) break; + var x = _aq_; + } + } + /*<>*/ return res; + /*<>*/ } + function copy(a){ + /*<>*/ var l = a.length - 1; + /*<>*/ return 0 === l + ? [0] + : /*<>*/ caml_array_sub(a, 0, l); + /*<>*/ } + function append(a1, a2){ + /*<>*/ var l1 = a1.length - 1; + /*<>*/ return 0 === l1 + ? copy(a2) + : 0 + === a2.length - 1 + ? /*<>*/ caml_array_sub(a1, 0, l1) + : /*<>*/ runtime.caml_array_append(a1, a2); + /*<>*/ } + function sub(a, ofs, len){ + /*<>*/ 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); + /*<>*/ } + 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); + /*<>*/ } + function blit(a1, ofs1, a2, ofs2, len){ + /*<>*/ if + (0 <= len + && + 0 <= ofs1 + && + (a1.length - 1 - len | 0) >= ofs1 + && 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); + /*<>*/ } + function iter(f, a){ + /*<>*/ var + _am_ = a.length - 1 - 1 | 0, + /*<>*/ _al_ = 0; + if(_am_ >= 0){ + var i = _al_; + for(;;){ + /*<>*/ /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var _an_ = i + 1 | 0; + if(_am_ === i) break; + var i = _an_; + } + } + return 0; + /*<>*/ } + function iter2(f, a, b){ + /*<>*/ if(a.length - 1 !== b.length - 1) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Array_iter2_arrays_must_ha); + /*<>*/ var + _aj_ = a.length - 1 - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (f, a[1 + i], b[1 + i]); + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ === i) break; + var i = _ak_; + } + } + return 0; + /*<>*/ } + function map(f, a){ + /*<>*/ var l = a.length - 1; + /*<>*/ if(0 === l) /*<>*/ return [0]; + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_make_vect + (l, /*<>*/ caml_call1(f, a[1])), + /*<>*/ _ag_ = l - 1 | 0, + /*<>*/ _af_ = 1; + if(_ag_ >= 1){ + var i = _af_; + for(;;){ + /*<>*/ r[1 + i] = + /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; + if(_ag_ === i) break; + var i = _ah_; + } + } + /*<>*/ return r; + /*<>*/ } + function map2(f, a, b){ + /*<>*/ var + la = a.length - 1, + /*<>*/ lb = b.length - 1; + if(la !== lb) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Array_map2_arrays_must_hav); + if(0 === la) /*<>*/ return [0]; + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_make_vect + (la, /*<>*/ caml_call2(f, a[1], b[1])), + /*<>*/ _ad_ = la - 1 | 0, + /*<>*/ _ac_ = 1; + if(_ad_ >= 1){ + var i = _ac_; + for(;;){ + /*<>*/ r[1 + i] = + /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); + /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; + if(_ad_ === i) break; + var i = _ae_; + } + } + /*<>*/ return r; + /*<>*/ } + function iteri(f, a){ + /*<>*/ var + _aa_ = a.length - 1 - 1 | 0, + /*<>*/ _$_ = 0; + if(_aa_ >= 0){ + var i = _$_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (f, i, a[1 + i]); + /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; + if(_aa_ === i) break; + var i = _ab_; + } + } + return 0; + /*<>*/ } + function mapi(f, a){ + /*<>*/ var l = a.length - 1; + /*<>*/ if(0 === l) /*<>*/ return [0]; + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_make_vect + (l, /*<>*/ caml_call2(f, 0, a[1])), + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 1; + if(_Z_ >= 1){ + var i = _Y_; + for(;;){ + /*<>*/ r[1 + i] = + /*<>*/ caml_call2(f, i, a[1 + i]); + /*<>*/ /*<>*/ var ___ = i + 1 | 0; + if(_Z_ === i) break; + var i = ___; + } + } + /*<>*/ return r; + /*<>*/ } + function to_list(a){ + /*<>*/ var i$1 = a.length - 1 - 1 | 0, i = i$1, res = 0; + /*<>*/ for(;;){ + if(0 > i) /*<>*/ return res; + /*<>*/ var + /*<>*/ res$0 = [0, a[1 + i], res], + /*<>*/ i$0 = i - 1 | 0, + i = i$0, + res = res$0; + } + /*<>*/ } + function list_length(accu, param){ + var accu$0 = accu, param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return accu$0; + /*<>*/ var + t = param$0[2], + /*<>*/ accu$1 = accu$0 + 1 | 0, + accu$0 = accu$1, + param$0 = t; + } + } + function of_list(l){ + /*<>*/ if(! l) /*<>*/ return [0]; + /*<>*/ var + tl = l[2], + hd = l[1], + /*<>*/ a = + /*<>*/ caml_make_vect(list_length(0, l), hd), + i = 1, + param = tl; + for(;;){ + if(! param) /*<>*/ return a; + var tl$0 = param[2], hd$0 = param[1]; + /*<>*/ a[1 + i] = hd$0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0, + param = tl$0; + } + /*<>*/ } + function fold_left(f, x, a){ + /*<>*/ var + /*<>*/ r = [0, x], + _W_ = a.length - 1 - 1 | 0, + /*<>*/ _V_ = 0; + if(_W_ >= 0){ + var i = _V_; + for(;;){ + r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + if(_W_ === i) break; + var i = _X_; + } + } + return r[1]; + /*<>*/ } + function fold_left_map(f, acc, input_array){ + /*<>*/ var len = input_array.length - 1; + /*<>*/ if(0 === len) + /*<>*/ return [0, acc, [0]]; + /*<>*/ var + /*<>*/ match = + /*<>*/ caml_call2(f, acc, input_array[1]), + elt = match[2], + acc$0 = match[1], + /*<>*/ output_array = + /*<>*/ caml_make_vect(len, elt), + /*<>*/ acc$1 = [0, acc$0], + /*<>*/ _T_ = len - 1 | 0, + /*<>*/ _S_ = 1; + if(_T_ >= 1){ + var i = _S_; + for(;;){ + /*<>*/ var + /*<>*/ match$0 = + /*<>*/ caml_call2(f, acc$1[1], input_array[1 + i]), + elt$0 = match$0[2], + acc$2 = match$0[1]; + acc$1[1] = acc$2; + /*<>*/ output_array[1 + i] = elt$0; + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ === i) break; + var i = _U_; + } + } + /*<>*/ return [0, acc$1[1], output_array]; + /*<>*/ } + function fold_right(f, a, x){ + /*<>*/ var + /*<>*/ r = [0, x], + /*<>*/ _Q_ = a.length - 1 - 1 | 0; + if(_Q_ >= 0){ + var i = _Q_; + for(;;){ + r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); + /*<>*/ /*<>*/ var _R_ = i - 1 | 0; + if(0 === i) break; + var i = _R_; + } + } + return r[1]; + /*<>*/ } + function exists(p, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ if + ( /*<>*/ caml_call1(p, a[1 + i])) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function for_all(p, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 1; + /*<>*/ if + (! /*<>*/ caml_call1(p, a[1 + i])) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + 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); + var i = 0; + /*<>*/ for(;;){ + if(i === n1) /*<>*/ return 1; + /*<>*/ if + (! /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + 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); + var i = 0; + /*<>*/ for(;;){ + if(i === n1) /*<>*/ return 0; + /*<>*/ if + ( /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function mem(x, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ if + (0 === /*<>*/ runtime.caml_compare(a[1 + i], x)) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function memq(x, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + if(x === a[1 + i]) /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function find_opt(p, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ /*<>*/ var x = a[1 + i]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ return [0, x]; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function find_map(f, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ /*<>*/ var + r = /*<>*/ caml_call1(f, a[1 + i]); + if(r) /*<>*/ return r; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function split(x){ + /*<>*/ if + ( /*<>*/ runtime.caml_equal(x, [0])) + /*<>*/ return [0, [0], [0]]; + /*<>*/ var + match = x[1], + b0 = match[2], + a0 = match[1], + /*<>*/ n = x.length - 1, + /*<>*/ a = + /*<>*/ caml_make_vect(n, a0), + /*<>*/ b = + /*<>*/ caml_make_vect(n, b0), + /*<>*/ _O_ = n - 1 | 0, + /*<>*/ _N_ = 1; + if(_O_ >= 1){ + var i = _N_; + for(;;){ + var match$0 = x[1 + i], bi = match$0[2], ai = match$0[1]; + /*<>*/ a[1 + i] = ai; + /*<>*/ b[1 + i] = bi; + /*<>*/ /*<>*/ var _P_ = i + 1 | 0; + if(_O_ === i) break; + var i = _P_; + } + } + /*<>*/ return [0, a, b]; + /*<>*/ } + function combine(a, b){ + /*<>*/ var + na = a.length - 1, + /*<>*/ nb = b.length - 1; + if(na !== nb) + /*<>*/ /*<>*/ caml_call1 + (Stdlib[1], cst_Array_combine); + if(0 === na) /*<>*/ return [0]; + /*<>*/ var + /*<>*/ x = + /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), + /*<>*/ _L_ = na - 1 | 0, + /*<>*/ _K_ = 1; + if(_L_ >= 1){ + var i = _K_; + for(;;){ + x[1 + i] = [0, a[1 + i], b[1 + i]]; + /*<>*/ /*<>*/ var _M_ = i + 1 | 0; + if(_L_ === i) break; + var i = _M_; + } + } + /*<>*/ return x; + /*<>*/ } + /*<>*/ /*<>*/ var + Bottom = [248, cst_Stdlib_Array_Bottom, runtime.caml_fresh_oo_id(0)]; + function sort(cmp, a){ + function maxson(l, i){ + /*<>*/ var + i31 = ((i + i | 0) + i | 0) + 1 | 0, + /*<>*/ x = [0, i31]; + if((i31 + 2 | 0) < l){ + /*<>*/ var + /*<>*/ _D_ = i31 + 1 | 0, + /*<>*/ _E_ = caml_check_bound(a, _D_)[1 + _D_]; + if + ( /*<>*/ caml_call2 + (cmp, caml_check_bound(a, i31)[1 + i31], _E_) + < 0) + x[1] = i31 + 1 | 0; + /*<>*/ var + /*<>*/ _F_ = i31 + 2 | 0, + /*<>*/ _G_ = caml_check_bound(a, _F_)[1 + _F_], + _H_ = x[1]; + if + ( /*<>*/ caml_call2 + (cmp, caml_check_bound(a, _H_)[1 + _H_], _G_) + < 0) + x[1] = i31 + 2 | 0; + return x[1]; + } + if((i31 + 1 | 0) < l){ + /*<>*/ var + _I_ = i31 + 1 | 0, + /*<>*/ _J_ = caml_check_bound(a, _I_)[1 + _I_]; + /*<>*/ if + (0 + > + /*<>*/ caml_call2 + (cmp, caml_check_bound(a, i31)[1 + i31], _J_)) + /*<>*/ return i31 + 1 | 0; + } + if(i31 < l) /*<>*/ return i31; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Bottom, i], 1); + /*<>*/ } + var l = a.length - 1, _x_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_x_ >= 0){ + var i$6 = _x_; + for(;;){ + /*<>*/ /*<>*/ var + e$1 = caml_check_bound(a, i$6)[1 + i$6]; + /*<>*/ try{ + var i = i$6; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + j = maxson(l, i); + /*<>*/ if + (0 + >= + /*<>*/ caml_call2 + (cmp, caml_check_bound(a, j)[1 + j], e$1)){ + /*<>*/ caml_check_bound(a, i)[1 + i] = e$1; + break; + } + /*<>*/ /*<>*/ var + _u_ = caml_check_bound(a, j)[1 + j]; + /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; + var i = j; + } + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); + var i$0 = exn[2]; + /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; + } + /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; + if(0 === i$6) break; + var i$6 = _C_; + } + } + /*<>*/ /*<>*/ var _y_ = l - 1 | 0; + if(_y_ >= 2){ + var i$4 = _y_; + a: + for(;;){ + /*<>*/ /*<>*/ var + e$0 = caml_check_bound(a, i$4)[1 + i$4]; + /*<>*/ a[1 + i$4] = caml_check_bound(a, 0)[1]; + var i$5 = 0; + /*<>*/ try{ + var i$1 = i$5; + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ j$0 = maxson(i$4, i$1), + /*<>*/ _v_ = caml_check_bound(a, j$0)[1 + j$0]; + /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _v_; + var i$1 = j$0; + } + } + catch(exn){ + var exn$0 = caml_wrap_exception(exn); + if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); + var i$2 = exn$0[2], i$3 = i$2; + /*<>*/ for(;;){ + var father = (i$3 - 1 | 0) / 3 | 0; + if(i$3 === father) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); + /*<>*/ if + (0 + <= + /*<>*/ caml_call2 + (cmp, caml_check_bound(a, father)[1 + father], e$0)) + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; + else{ + /*<>*/ /*<>*/ var + _w_ = caml_check_bound(a, father)[1 + father]; + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _w_; + if(0 < father){var i$3 = father; continue;} + /*<>*/ caml_check_bound(a, 0)[1] = e$0; + } + /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; + if(2 === i$4) break a; + var i$4 = _B_; + break; + } + } + } + } + var _z_ = 1 < l ? 1 : 0; + if(_z_){ + /*<>*/ /*<>*/ var + e = caml_check_bound(a, 1)[2]; + /*<>*/ a[2] = caml_check_bound(a, 0)[1]; + /*<>*/ a[1] = e; + var _A_ = 0; + } + else + var _A_ = _z_; + /*<>*/ return _A_; + /*<>*/ } + function stable_sort(cmp, a){ + function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ + /*<>*/ var + src1r = src1ofs + src1len | 0, + src2r = src2ofs + src2len | 0, + /*<>*/ s2$1 = + caml_check_bound(src2, src2ofs)[1 + src2ofs], + /*<>*/ s1$1 = + caml_check_bound(a, src1ofs)[1 + src1ofs], + i1 = src1ofs, + s1 = s1$1, + i2 = src2ofs, + s2 = s2$1, + d = dstofs; + /*<>*/ for(;;) + /*<>*/ if + (0 < /*<>*/ caml_call2(cmp, s1, s2)){ + /*<>*/ caml_check_bound(dst, d)[1 + d] = s2; + /*<>*/ /*<>*/ var i2$0 = i2 + 1 | 0; + if(i2$0 >= src2r) return blit(a, i1, dst, d + 1 | 0, src1r - i1 | 0); + /*<>*/ var + /*<>*/ d$0 = d + 1 | 0, + /*<>*/ s2$0 = caml_check_bound(src2, i2$0)[1 + i2$0], + i2 = i2$0, + s2 = s2$0, + d = d$0; + } + else{ + /*<>*/ caml_check_bound(dst, d)[1 + d] = s1; + /*<>*/ /*<>*/ var i1$0 = i1 + 1 | 0; + if(i1$0 >= src1r) + return blit(src2, i2, dst, d + 1 | 0, src2r - i2 | 0); + /*<>*/ var + /*<>*/ d$1 = d + 1 | 0, + /*<>*/ s1$0 = caml_check_bound(a, i1$0)[1 + i1$0], + i1 = i1$0, + s1 = s1$0, + d = d$1; + } + /*<>*/ } + function isortto(srcofs, dst, dstofs, len){ + /*<>*/ var + _m_ = len - 1 | 0, + /*<>*/ _l_ = 0; + if(_m_ >= 0){ + var i = _l_; + a: + for(;;){ + /*<>*/ var + _n_ = srcofs + i | 0, + /*<>*/ e = caml_check_bound(a, _n_)[1 + _n_], + /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; + for(;;){ + if(dstofs <= j[1]){ + var _o_ = j[1]; + /*<>*/ if + (0 + < + /*<>*/ caml_call2 + (cmp, caml_check_bound(dst, _o_)[1 + _o_], e)){ + /*<>*/ var + _p_ = j[1], + /*<>*/ _q_ = caml_check_bound(dst, _p_)[1 + _p_], + _r_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _r_)[1 + _r_] = _q_; + j[1] += -1; + continue; + } + } + var _s_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; + /*<>*/ /*<>*/ var _t_ = i + 1 | 0; + if(_m_ === i) break a; + var i = _t_; + break; + } + } + } + return 0; + /*<>*/ } + function sortto(srcofs, dst, dstofs, len){ + /*<>*/ if(len <= 5) + /*<>*/ return isortto(srcofs, dst, dstofs, len); + var l1 = len / 2 | 0, l2 = len - l1 | 0; + /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); + /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); + /*<>*/ return merge + (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ } + var l = a.length - 1; + if(l <= 5) /*<>*/ return isortto(0, a, 0, l); + /*<>*/ var + l1 = l / 2 | 0, + l2 = l - l1 | 0, + /*<>*/ t = + /*<>*/ caml_make_vect(l2, caml_check_bound(a, 0)[1]); + /*<>*/ sortto(l1, t, 0, l2); + /*<>*/ sortto(0, a, l2, l1); + /*<>*/ return merge(l2, l1, t, 0, l2, a, 0); + /*<>*/ } + function to_seq(a){ + function aux(i, param){ + /*<>*/ if(i >= a.length - 1) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = a[1 + i], + /*<>*/ _j_ = i + 1 | 0; + /*<>*/ return [0, + x, + function(_k_){ /*<>*/ return aux(_j_, _k_);}]; + /*<>*/ } + /*<>*/ /*<>*/ var _h_ = 0; + /*<>*/ return function(_i_){ + /*<>*/ return aux(_h_, _i_);}; + /*<>*/ } + function to_seqi(a){ + function aux(i, param){ + /*<>*/ if(i >= a.length - 1) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = a[1 + i], + /*<>*/ _f_ = i + 1 | 0; + /*<>*/ return [0, + [0, i, x], + function(_g_){ /*<>*/ return aux(_f_, _g_);}]; + /*<>*/ } + /*<>*/ /*<>*/ var _d_ = 0; + /*<>*/ return function(_e_){ + /*<>*/ return aux(_d_, _e_);}; + /*<>*/ } + function of_seq(i$2){ + /*<>*/ var _b_ = 0; + function _c_(acc, x){ + /*<>*/ return [0, x, acc]; + /*<>*/ } + /*<>*/ /*<>*/ var + l = /*<>*/ caml_call3(Stdlib_Seq[5], _c_, _b_, i$2); + if(! l) /*<>*/ return [0]; + /*<>*/ var + tl = l[2], + hd = l[1], + /*<>*/ len = list_length(0, l), + /*<>*/ a = + /*<>*/ caml_make_vect(len, hd), + /*<>*/ i$1 = len - 2 | 0, + i = i$1, + param = tl; + for(;;){ + if(! param) /*<>*/ return a; + var tl$0 = param[2], hd$0 = param[1]; + /*<>*/ a[1 + i] = hd$0; + /*<>*/ var + /*<>*/ i$0 = i - 1 | 0, + i = i$0, + param = tl$0; + } + /*<>*/ } + var + Stdlib_Array = + [0, + init, + make_matrix, + append, + runtime.caml_array_concat, + sub, + copy, + fill, + blit, + to_list, + of_list, + iter, + iteri, + map, + mapi, + fold_left, + fold_left_map, + fold_right, + iter2, + map2, + for_all, + exists, + for_all2, + exists2, + mem, + memq, + find_opt, + find_map, + split, + combine, + sort, + stable_sort, + stable_sort, + to_seq, + to_seqi, + of_seq, + Floatarray]; + runtime.caml_register_global(14, Stdlib_Array, "Stdlib__Array"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Float +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Seq +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_Float_array_blit$1 = "Float.array.blit", + cst_float_ml = "float.ml", + caml_array_get = runtime.caml_array_get, + caml_array_set = runtime.caml_array_set, + caml_float_compare = runtime.caml_float_compare, + caml_floatarray_blit = runtime.caml_floatarray_blit, + caml_floatarray_create = runtime.caml_floatarray_create, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_nextafter_float = runtime.caml_nextafter_float, + caml_signbit_float = runtime.caml_signbit_float, + 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) + : 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, + Stdlib_List = global_data.Stdlib__List, + Assert_failure = global_data.Assert_failure, + Stdlib = global_data.Stdlib, + infinity = Stdlib[22], + neg_infinity = Stdlib[23], + nan = Stdlib[24], + _b_ = [0, cst_float_ml, 395, 6], + cst_Float_Array_map2_arrays_mu = + "Float.Array.map2: arrays must have the same length", + cst_Float_Array_iter2_arrays_m = + "Float.Array.iter2: arrays must have the same length", + cst_Float_array_blit = cst_Float_array_blit$1, + cst_Float_array_blit$0 = cst_Float_array_blit$1, + cst_Float_Array_fill = "Float.Array.fill", + cst_Float_Array_sub = "Float.Array.sub", + _a_ = [0, cst_float_ml, 222, 14], + cst_Float_Array_concat = "Float.Array.concat", + cst_Float_Array_init = "Float.Array.init", + cst_Stdlib_Float_Array_Bottom = "Stdlib.Float.Array.Bottom", + zero = 0., + one = 1., + minus_one = -1.; + function is_finite(x){ + /*<>*/ return x - x == 0. ? 1 : 0; + /*<>*/ } + function is_infinite(x){ + /*<>*/ return 1. / x == 0. ? 1 : 0; + /*<>*/ } + function is_nan(x){ + /*<>*/ return x != x ? 1 : 0; + /*<>*/ } + var + max_float = Stdlib[25], + min_float = Stdlib[26], + epsilon = Stdlib[27], + of_string_opt = Stdlib[36], + to_string = Stdlib[35], + pi = 3.141592653589793; + function is_integer(x){ + /*<>*/ var + _aq_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; + return _aq_ ? is_finite(x) : _aq_; + /*<>*/ } + function succ(x){ + /*<>*/ return /*<>*/ caml_nextafter_float + (x, infinity); + /*<>*/ } + function pred(x){ + /*<>*/ return /*<>*/ caml_nextafter_float + (x, neg_infinity); + /*<>*/ } + function equal(x, y){ + /*<>*/ return 0 === caml_float_compare(x, y) ? 1 : 0; + /*<>*/ } + function min(x, y){ + /*<>*/ a: + if(! (x < y)){ + /*<>*/ if + (! + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) + break a; + /*<>*/ return x != x ? x : y; + } + /*<>*/ return y != y ? y : x; + /*<>*/ } + function max(x, y){ + /*<>*/ a: + if(! (x < y)){ + /*<>*/ if + (! + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) + break a; + /*<>*/ return y != y ? y : x; + } + /*<>*/ return x != x ? x : y; + /*<>*/ } + function min_max(x, y){ + /*<>*/ if(x == x && y == y){ + a: + if(! (x < y)){ + /*<>*/ if + (! + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) + break a; + /*<>*/ return [0, y, x]; + } + /*<>*/ return [0, x, y]; + } + /*<>*/ return [0, nan, nan]; + /*<>*/ } + function min_num(x, y){ + /*<>*/ a: + if(! (x < y)){ + /*<>*/ if + (! + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) + break a; + /*<>*/ return y != y ? x : y; + } + /*<>*/ return x != x ? y : x; + /*<>*/ } + function max_num(x, y){ + /*<>*/ a: + if(! (x < y)){ + /*<>*/ if + (! + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) + break a; + /*<>*/ return x != x ? y : x; + } + /*<>*/ return y != y ? x : y; + /*<>*/ } + function min_max_num(x, y){ + /*<>*/ if(x != x) + /*<>*/ return [0, y, y]; + /*<>*/ if(y != y) + /*<>*/ return [0, x, x]; + a: + if(! (x < y)){ + /*<>*/ if + (! + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) + break a; + /*<>*/ return [0, y, x]; + } + /*<>*/ return [0, x, y]; + /*<>*/ } + function hash(x){ + /*<>*/ return /*<>*/ runtime.caml_hash + (10, 100, 0, x); + /*<>*/ } + function unsafe_fill(a, ofs, len, v){ + /*<>*/ var _ao_ = (ofs + len | 0) - 1 | 0; + if(_ao_ >= ofs){ + var i = ofs; + for(;;){ + /*<>*/ a[1 + i] = v; + /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; + if(_ao_ === i) break; + var i = _ap_; + } + } + return 0; + /*<>*/ } + function check(a, ofs, len, msg){ + /*<>*/ var _ak_ = ofs < 0 ? 1 : 0; + if(_ak_) + var _al_ = _ak_; + else{ + var _am_ = len < 0 ? 1 : 0; + if(_am_) + var _al_ = _am_; + else + var + _an_ = (ofs + len | 0) < 0 ? 1 : 0, + _al_ = _an_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); + } + return _al_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _al_; + /*<>*/ } + function make(n, v){ + /*<>*/ /*<>*/ var + result = /*<>*/ caml_floatarray_create(n); + /*<>*/ unsafe_fill(result, 0, n, v); + /*<>*/ return result; + /*<>*/ } + function init(l, f){ + /*<>*/ if(0 > l) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Float_Array_init); + /*<>*/ var + /*<>*/ res = + /*<>*/ caml_floatarray_create(l), + /*<>*/ _ai_ = l - 1 | 0, + /*<>*/ _ah_ = 0; + if(_ai_ >= 0){ + var i = _ah_; + for(;;){ + /*<>*/ res[1 + i] = + /*<>*/ caml_call1(f, i); + /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; + if(_ai_ === i) break; + var i = _aj_; + } + } + /*<>*/ return res; + /*<>*/ } + function append(a1, a2){ + /*<>*/ var + l1 = a1.length - 1, + /*<>*/ l2 = a2.length - 1, + /*<>*/ result = + /*<>*/ caml_floatarray_create(l1 + l2 | 0); + /*<>*/ /*<>*/ caml_floatarray_blit + (a1, 0, result, 0, l1); + /*<>*/ /*<>*/ caml_floatarray_blit + (a2, 0, result, l1, l2); + /*<>*/ return result; + /*<>*/ } + function concat(l){ + /*<>*/ var acc = 0, param = l; + for(;;) + if(param) + var + tl = param[2], + hd = param[1], + x = hd.length - 1 + acc | 0, + acc$0 = + acc <= x + ? x + : /*<>*/ caml_call1 + (Stdlib[1], cst_Float_Array_concat), + acc = acc$0, + param = tl; + else{ + /*<>*/ var + /*<>*/ result = + /*<>*/ caml_floatarray_create(acc), + l$0 = l, + i = 0; + /*<>*/ for(;;){ + if(! l$0){ + if(i === acc) /*<>*/ return result; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); + } + /*<>*/ var + tl$0 = l$0[2], + hd$0 = l$0[1], + /*<>*/ hlen = hd$0.length - 1; + /*<>*/ /*<>*/ caml_floatarray_blit + (hd$0, 0, result, i, hlen); + var i$0 = i + hlen | 0, l$0 = tl$0, i = i$0; + } + } + /*<>*/ } + function sub(a, ofs, len){ + /*<>*/ check(a, ofs, len, cst_Float_Array_sub); + /*<>*/ /*<>*/ var + result = /*<>*/ caml_floatarray_create(len); + /*<>*/ /*<>*/ caml_floatarray_blit + (a, ofs, result, 0, len); + /*<>*/ return result; + /*<>*/ } + function copy(a){ + /*<>*/ var + l = a.length - 1, + /*<>*/ result = + /*<>*/ caml_floatarray_create(l); + /*<>*/ /*<>*/ caml_floatarray_blit + (a, 0, result, 0, l); + /*<>*/ return result; + /*<>*/ } + function fill(a, ofs, len, v){ + /*<>*/ check(a, ofs, len, cst_Float_Array_fill); + /*<>*/ return unsafe_fill(a, ofs, len, v); + /*<>*/ } + function blit(src, sofs, dst, dofs, len){ + /*<>*/ check(src, sofs, len, cst_Float_array_blit); + /*<>*/ check(dst, dofs, len, cst_Float_array_blit$0); + /*<>*/ return /*<>*/ caml_floatarray_blit + (src, sofs, dst, dofs, len); + /*<>*/ } + function to_list(a){ + /*<>*/ function _af_(_ag_){ + /*<>*/ return a[1 + _ag_]; + } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[10], a.length - 1, _af_); + /*<>*/ } + function of_list(l){ + /*<>*/ var + /*<>*/ result = + /*<>*/ caml_floatarray_create + ( /*<>*/ caml_call1(Stdlib_List[1], l)), + i = 0, + l$0 = l; + /*<>*/ for(;;){ + if(! l$0) /*<>*/ return result; + var t = l$0[2], h = l$0[1]; + /*<>*/ result[1 + i] = h; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0, + l$0 = t; + } + /*<>*/ } + function iter(f, a){ + /*<>*/ var + _ad_ = a.length - 1 - 1 | 0, + /*<>*/ _ac_ = 0; + if(_ad_ >= 0){ + var i = _ac_; + for(;;){ + /*<>*/ /*<>*/ caml_call1 + (f, a[1 + i]); + /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; + if(_ad_ === i) break; + var i = _ae_; + } + } + return 0; + /*<>*/ } + function iter2(f, a, b){ + /*<>*/ if(a.length - 1 !== b.length - 1) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Float_Array_iter2_arrays_m); + /*<>*/ var + _aa_ = a.length - 1 - 1 | 0, + /*<>*/ _$_ = 0; + if(_aa_ >= 0){ + var i = _$_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (f, a[1 + i], b[1 + i]); + /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; + if(_aa_ === i) break; + var i = _ab_; + } + } + return 0; + /*<>*/ } + function map(f, a){ + /*<>*/ var + l = a.length - 1, + /*<>*/ r = + /*<>*/ caml_floatarray_create(l), + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 0; + if(_Z_ >= 0){ + var i = _Y_; + for(;;){ + /*<>*/ r[1 + i] = + /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var ___ = i + 1 | 0; + if(_Z_ === i) break; + var i = ___; + } + } + /*<>*/ return r; + /*<>*/ } + function map2(f, a, b){ + /*<>*/ var + la = a.length - 1, + /*<>*/ lb = b.length - 1; + if(la !== lb) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Float_Array_map2_arrays_mu); + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_floatarray_create(la), + /*<>*/ _W_ = la - 1 | 0, + /*<>*/ _V_ = 0; + if(_W_ >= 0){ + var i = _V_; + for(;;){ + /*<>*/ r[1 + i] = + /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + if(_W_ === i) break; + var i = _X_; + } + } + /*<>*/ return r; + /*<>*/ } + function iteri(f, a){ + /*<>*/ var + _T_ = a.length - 1 - 1 | 0, + /*<>*/ _S_ = 0; + if(_T_ >= 0){ + var i = _S_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (f, i, a[1 + i]); + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ === i) break; + var i = _U_; + } + } + return 0; + /*<>*/ } + function mapi(f, a){ + /*<>*/ var + l = a.length - 1, + /*<>*/ r = + /*<>*/ caml_floatarray_create(l), + /*<>*/ _Q_ = l - 1 | 0, + /*<>*/ _P_ = 0; + if(_Q_ >= 0){ + var i = _P_; + for(;;){ + /*<>*/ r[1 + i] = + /*<>*/ caml_call2(f, i, a[1 + i]); + /*<>*/ /*<>*/ var _R_ = i + 1 | 0; + if(_Q_ === i) break; + var i = _R_; + } + } + /*<>*/ return r; + /*<>*/ } + function fold_left(f, x, a){ + /*<>*/ var + /*<>*/ r = [0, x], + _N_ = a.length - 1 - 1 | 0, + /*<>*/ _M_ = 0; + if(_N_ >= 0){ + var i = _M_; + for(;;){ + r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); + /*<>*/ /*<>*/ var _O_ = i + 1 | 0; + if(_N_ === i) break; + var i = _O_; + } + } + return r[1]; + /*<>*/ } + function fold_right(f, a, x){ + /*<>*/ var + /*<>*/ r = [0, x], + /*<>*/ _K_ = a.length - 1 - 1 | 0; + if(_K_ >= 0){ + var i = _K_; + for(;;){ + r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); + /*<>*/ /*<>*/ var _L_ = i - 1 | 0; + if(0 === i) break; + var i = _L_; + } + } + return r[1]; + /*<>*/ } + function exists(p, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ if + ( /*<>*/ caml_call1(p, a[1 + i])) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function for_all(p, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 1; + /*<>*/ if + (! /*<>*/ caml_call1(p, a[1 + i])) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function mem(x, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + if(0 === /*<>*/ caml_float_compare(a[1 + i], x)) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function mem_ieee(x, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + if(x == a[1 + i]) /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + /*<>*/ /*<>*/ var + Bottom = [248, cst_Stdlib_Float_Array_Bottom, runtime.caml_fresh_oo_id(0)]; + function sort(cmp, a){ + function maxson(l, i){ + /*<>*/ var + i31 = ((i + i | 0) + i | 0) + 1 | 0, + /*<>*/ x = [0, i31]; + if((i31 + 2 | 0) < l){ + if + ( /*<>*/ caml_call2 + (cmp, + /*<>*/ caml_array_get(a, i31), + /*<>*/ caml_array_get(a, i31 + 1 | 0)) + < 0) + x[1] = i31 + 1 | 0; + if + ( /*<>*/ caml_call2 + (cmp, + /*<>*/ caml_array_get(a, x[1]), + /*<>*/ caml_array_get(a, i31 + 2 | 0)) + < 0) + x[1] = i31 + 2 | 0; + return x[1]; + } + /*<>*/ if + ((i31 + 1 | 0) < l + && + 0 + > + /*<>*/ caml_call2 + (cmp, + /*<>*/ caml_array_get(a, i31), + /*<>*/ caml_array_get(a, i31 + 1 | 0))) + /*<>*/ return i31 + 1 | 0; + if(i31 < l) /*<>*/ return i31; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Bottom, i], 1); + /*<>*/ } + var l = a.length - 1, _E_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_E_ >= 0){ + var i$6 = _E_; + for(;;){ + /*<>*/ /*<>*/ var + e$1 = /*<>*/ caml_array_get(a, i$6); + /*<>*/ try{ + var i = i$6; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + j = maxson(l, i); + /*<>*/ if + (0 + >= + /*<>*/ caml_call2 + (cmp, /*<>*/ caml_array_get(a, j), e$1)){ + /*<>*/ /*<>*/ caml_array_set + (a, i, e$1); + break; + } + /*<>*/ /*<>*/ caml_array_set + (a, i, /*<>*/ caml_array_get(a, j)); + var i = j; + } + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); + var i$0 = exn[2]; + /*<>*/ /*<>*/ caml_array_set + (a, i$0, e$1); + } + /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; + if(0 === i$6) break; + var i$6 = _J_; + } + } + /*<>*/ /*<>*/ var _F_ = l - 1 | 0; + if(_F_ >= 2){ + var i$4 = _F_; + a: + for(;;){ + /*<>*/ /*<>*/ var + e$0 = /*<>*/ caml_array_get(a, i$4); + /*<>*/ /*<>*/ caml_array_set + (a, i$4, /*<>*/ caml_array_get(a, 0)); + var i$5 = 0; + /*<>*/ try{ + var i$1 = i$5; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + j$0 = maxson(i$4, i$1); + /*<>*/ /*<>*/ caml_array_set + (a, i$1, /*<>*/ caml_array_get(a, j$0)); + var i$1 = j$0; + } + } + catch(exn){ + var exn$0 = caml_wrap_exception(exn); + if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); + var i$2 = exn$0[2], i$3 = i$2; + /*<>*/ for(;;){ + var father = (i$3 - 1 | 0) / 3 | 0; + if(i$3 === father) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + /*<>*/ if + (0 + <= + /*<>*/ caml_call2 + (cmp, /*<>*/ caml_array_get(a, father), e$0)) + /*<>*/ /*<>*/ caml_array_set + (a, i$3, e$0); + else{ + /*<>*/ /*<>*/ caml_array_set + (a, i$3, /*<>*/ caml_array_get(a, father)); + if(0 < father){var i$3 = father; continue;} + /*<>*/ /*<>*/ caml_array_set + (a, 0, e$0); + } + /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; + if(2 === i$4) break a; + var i$4 = _I_; + break; + } + } + } + } + var _G_ = 1 < l ? 1 : 0; + if(_G_){ + /*<>*/ /*<>*/ var + e = /*<>*/ caml_array_get(a, 1); + /*<>*/ /*<>*/ caml_array_set + (a, 1, /*<>*/ caml_array_get(a, 0)); + var _H_ = /*<>*/ caml_array_set(a, 0, e); + } + else + var _H_ = _G_; + /*<>*/ return _H_; + /*<>*/ } + function stable_sort(cmp, a){ + function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ + /*<>*/ var + src1r = src1ofs + src1len | 0, + src2r = src2ofs + src2len | 0, + /*<>*/ s2$1 = + /*<>*/ caml_array_get(src2, src2ofs), + /*<>*/ s1$1 = + /*<>*/ caml_array_get(a, src1ofs), + i1 = src1ofs, + s1 = s1$1, + i2 = src2ofs, + s2 = s2$1, + d = dstofs; + /*<>*/ for(;;) + /*<>*/ if + (0 < /*<>*/ caml_call2(cmp, s1, s2)){ + /*<>*/ /*<>*/ caml_array_set + (dst, d, s2); + /*<>*/ /*<>*/ var + i2$0 = i2 + 1 | 0; + if(i2$0 >= src2r) return blit(a, i1, dst, d + 1 | 0, src1r - i1 | 0); + /*<>*/ var + /*<>*/ d$0 = d + 1 | 0, + /*<>*/ s2$0 = + /*<>*/ caml_array_get(src2, i2$0), + i2 = i2$0, + s2 = s2$0, + d = d$0; + } + else{ + /*<>*/ /*<>*/ caml_array_set + (dst, d, s1); + /*<>*/ /*<>*/ var + i1$0 = i1 + 1 | 0; + if(i1$0 >= src1r) + return blit(src2, i2, dst, d + 1 | 0, src2r - i2 | 0); + /*<>*/ var + /*<>*/ d$1 = d + 1 | 0, + /*<>*/ s1$0 = + /*<>*/ caml_array_get(a, i1$0), + i1 = i1$0, + s1 = s1$0, + d = d$1; + } + /*<>*/ } + function isortto(srcofs, dst, dstofs, len){ + /*<>*/ var + _C_ = len - 1 | 0, + /*<>*/ _B_ = 0; + if(_C_ >= 0){ + var i = _B_; + a: + for(;;){ + /*<>*/ var + /*<>*/ e = + /*<>*/ caml_array_get(a, srcofs + i | 0), + /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; + for(;;){ + /*<>*/ if + (dstofs <= j[1] + && + 0 + < + /*<>*/ caml_call2 + (cmp, /*<>*/ caml_array_get(dst, j[1]), e)){ + /*<>*/ /*<>*/ caml_array_set + (dst, + j[1] + 1 | 0, + /*<>*/ caml_array_get(dst, j[1])); + j[1] += -1; + continue; + } + /*<>*/ /*<>*/ caml_array_set + (dst, j[1] + 1 | 0, e); + /*<>*/ /*<>*/ var _D_ = i + 1 | 0; + if(_C_ === i) break a; + var i = _D_; + break; + } + } + } + return 0; + /*<>*/ } + function sortto(srcofs, dst, dstofs, len){ + /*<>*/ if(len <= 5) + /*<>*/ return isortto(srcofs, dst, dstofs, len); + var l1 = len / 2 | 0, l2 = len - l1 | 0; + /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); + /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); + /*<>*/ return merge + (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ } + var l = a.length - 1; + if(l <= 5) /*<>*/ return isortto(0, a, 0, l); + /*<>*/ var + l1 = l / 2 | 0, + l2 = l - l1 | 0, + /*<>*/ t = + /*<>*/ caml_floatarray_create(l2); + /*<>*/ sortto(l1, t, 0, l2); + /*<>*/ sortto(0, a, l2, l1); + /*<>*/ return merge(l2, l1, t, 0, l2, a, 0); + /*<>*/ } + function to_seq(a){ + function aux(i, param){ + /*<>*/ if(i >= a.length - 1) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = a[1 + i], + /*<>*/ _z_ = i + 1 | 0; + /*<>*/ return [0, + x, + function(_A_){ /*<>*/ return aux(_z_, _A_);}]; + /*<>*/ } + /*<>*/ /*<>*/ var _x_ = 0; + /*<>*/ return function(_y_){ + /*<>*/ return aux(_x_, _y_);}; + /*<>*/ } + function to_seqi(a){ + function aux(i, param){ + /*<>*/ if(i >= a.length - 1) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = a[1 + i], + /*<>*/ _v_ = i + 1 | 0; + /*<>*/ return [0, + [0, i, x], + function(_w_){ /*<>*/ return aux(_v_, _w_);}]; + /*<>*/ } + /*<>*/ /*<>*/ var _t_ = 0; + /*<>*/ return function(_u_){ + /*<>*/ return aux(_t_, _u_);}; + /*<>*/ } + function of_seq(i$2){ + /*<>*/ var _r_ = 0; + function _s_(acc, x){ + /*<>*/ return [0, x, acc]; + /*<>*/ } + /*<>*/ var + /*<>*/ l = + /*<>*/ caml_call3(Stdlib_Seq[5], _s_, _r_, i$2), + /*<>*/ len = + /*<>*/ caml_call1(Stdlib_List[1], l), + /*<>*/ a = + /*<>*/ caml_floatarray_create(len), + /*<>*/ i$1 = len - 1 | 0, + i = i$1, + param = l; + for(;;){ + if(! param) /*<>*/ return a; + var tl = param[2], hd = param[1]; + /*<>*/ a[1 + i] = hd; + /*<>*/ var + /*<>*/ i$0 = i - 1 | 0, + i = i$0, + param = tl; + } + /*<>*/ } + function map_to_array(f, a){ + /*<>*/ var l = a.length - 1; + /*<>*/ if(0 === l) /*<>*/ return [0]; + /*<>*/ var + /*<>*/ r = + /*<>*/ runtime.caml_make_vect + (l, /*<>*/ caml_call1(f, a[1])), + /*<>*/ _p_ = l - 1 | 0, + /*<>*/ _o_ = 1; + if(_p_ >= 1){ + var i = _o_; + for(;;){ + /*<>*/ r[1 + i] = + /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var _q_ = i + 1 | 0; + if(_p_ === i) break; + var i = _q_; + } + } + /*<>*/ return r; + /*<>*/ } + function map_from_array(f, a){ + /*<>*/ var + l = a.length - 1, + /*<>*/ r = + /*<>*/ caml_floatarray_create(l), + /*<>*/ _m_ = l - 1 | 0, + /*<>*/ _l_ = 0; + if(_m_ >= 0){ + var i = _l_; + for(;;){ + /*<>*/ r[1 + i] = + /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var _n_ = i + 1 | 0; + if(_m_ === i) break; + var i = _n_; + } + } + /*<>*/ return r; + /*<>*/ } + var + _c_ = caml_floatarray_create, + _d_ = caml_array_set, + _e_ = caml_array_get, + _f_ = + [0, + function(_k_){ /*<>*/ return _k_.length - 1;}, + _e_, + _d_, + make, + _c_, + init, + append, + concat, + sub, + copy, + fill, + blit, + to_list, + of_list, + iter, + iteri, + map, + mapi, + fold_left, + fold_right, + iter2, + map2, + for_all, + exists, + mem, + mem_ieee, + sort, + stable_sort, + stable_sort, + to_seq, + to_seqi, + of_seq, + map_to_array, + map_from_array], + _g_ = caml_floatarray_create, + _h_ = caml_array_set, + _i_ = caml_array_get, + Stdlib_Float = + [0, + zero, + one, + minus_one, + succ, + pred, + infinity, + neg_infinity, + nan, + pi, + max_float, + min_float, + epsilon, + is_finite, + is_infinite, + is_nan, + is_integer, + of_string_opt, + to_string, + caml_float_compare, + equal, + min, + max, + min_max, + min_num, + max_num, + min_max_num, + hash, + [0, + function(_j_){ /*<>*/ return _j_.length - 1;}, + _i_, + _h_, + make, + _g_, + init, + append, + concat, + sub, + copy, + fill, + blit, + to_list, + of_list, + iter, + iteri, + map, + mapi, + fold_left, + fold_right, + iter2, + map2, + for_all, + exists, + mem, + mem_ieee, + sort, + stable_sort, + stable_sort, + to_seq, + to_seqi, + of_seq, + map_to_array, + map_from_array], + _f_]; + runtime.caml_register_global(22, Stdlib_Float, "Stdlib__Float"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Int32 +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_greaterequal = runtime.caml_greaterequal, + caml_int_compare = runtime.caml_int_compare, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_mul = runtime.caml_mul, + caml_wrap_exception = runtime.caml_wrap_exception, + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Stdlib_Sys = global_data.Stdlib__Sys, + Assert_failure = global_data.Assert_failure, + _b_ = [0, "int32.ml", 69, 6], + zero = 0, + one = 1, + minus_one = -1; + 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; + /*<>*/ } + var min_int = -2147483648, max_int = 2147483647; + function lognot(n){ + /*<>*/ return n ^ -1; + /*<>*/ } + var _a_ = Stdlib_Sys[9]; + if(32 === _a_) + /*<>*/ var + /*<>*/ max_int$0 = Stdlib[19], + unsigned_to_int = + function(n){ + /*<>*/ if + (0 >= /*<>*/ caml_int_compare(0, n) + && 0 >= /*<>*/ caml_int_compare(n, max_int$0)) + /*<>*/ return [0, n]; + /*<>*/ return 0; + /*<>*/ }; + else{ + if(64 !== _a_) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + var + unsigned_to_int = + function(n){ + /*<>*/ return [0, n & -1]; + /*<>*/ }; + } + function to_string(n){ + /*<>*/ return /*<>*/ runtime.caml_format_int + ("%d", n); + /*<>*/ } + function of_string_opt(s){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _d_ = [0, /*<>*/ runtime.caml_int_of_string(s)]; + /*<>*/ return _d_; + } + catch(_e_){ + var _c_ = caml_wrap_exception(_e_); + if(_c_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_c_, 0); + } + /*<>*/ } + var compare = caml_int_compare; + function equal(x, y){ + /*<>*/ return 0 + === /*<>*/ caml_int_compare(x, y) + ? 1 + : 0; + /*<>*/ } + function unsigned_compare(n, m){ + /*<>*/ return /*<>*/ caml_int_compare + (n + 2147483648 | 0, m + 2147483648 | 0); + /*<>*/ } + function min(x, y){ + /*<>*/ return /*<>*/ runtime.caml_lessequal + (x, y) + ? x + : y; + /*<>*/ } + function max(x, y){ + /*<>*/ return /*<>*/ caml_greaterequal + (x, y) + ? x + : y; + /*<>*/ } + function unsigned_div(n, d){ + /*<>*/ if + ( /*<>*/ runtime.caml_lessthan(d, 0)) + /*<>*/ return 0 <= unsigned_compare(n, d) ? one : zero; + /*<>*/ var + /*<>*/ q = + /*<>*/ runtime.caml_div(n >>> 1 | 0, d) << 1, + /*<>*/ r = + n - /*<>*/ caml_mul(q, d) | 0; + /*<>*/ return 0 <= unsigned_compare(r, d) ? q + 1 | 0 : q; + /*<>*/ } + function unsigned_rem(n, d){ + /*<>*/ return n + - /*<>*/ caml_mul(unsigned_div(n, d), d) + | 0; + /*<>*/ } + var + Stdlib_Int32 = + [0, + zero, + one, + minus_one, + unsigned_div, + unsigned_rem, + succ, + pred, + abs, + max_int, + min_int, + lognot, + unsigned_to_int, + of_string_opt, + to_string, + compare, + unsigned_compare, + equal, + min, + max]; + runtime.caml_register_global(14, Stdlib_Int32, "Stdlib__Int32"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Int64 +//# unitInfo: Requires: Stdlib +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_greaterequal = runtime.caml_greaterequal, + caml_int64_compare = runtime.caml_int64_compare, + caml_int64_mul = runtime.caml_int64_mul, + caml_int64_sub = runtime.caml_int64_sub, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_wrap_exception = runtime.caml_wrap_exception, + global_data = runtime.caml_get_global_data(), + zero = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), + one = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), + minus_one = runtime.caml_int64_create_lo_mi_hi(16777215, 16777215, 65535), + min_int = runtime.caml_int64_create_lo_mi_hi(0, 0, 32768), + max_int = runtime.caml_int64_create_lo_mi_hi(16777215, 16777215, 32767), + Stdlib = global_data.Stdlib, + _d_ = runtime.caml_int64_create_lo_mi_hi(16777215, 16777215, 65535), + _c_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), + _b_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), + _a_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0); + function succ(n){ + /*<>*/ return /*<>*/ runtime.caml_int64_add + (n, _a_); + /*<>*/ } + function pred(n){ + /*<>*/ return /*<>*/ caml_int64_sub + (n, _b_); + /*<>*/ } + function abs(n){ + /*<>*/ return /*<>*/ caml_greaterequal + (n, _c_) + ? n + : /*<>*/ runtime.caml_int64_neg(n); + /*<>*/ } + function lognot(n){ + /*<>*/ return /*<>*/ runtime.caml_int64_xor + (n, _d_); + /*<>*/ } + /*<>*/ /*<>*/ var + max_int$0 = + /*<>*/ runtime.caml_int64_of_int32(Stdlib[19]); + function unsigned_to_int(n){ + /*<>*/ if + (0 >= /*<>*/ caml_int64_compare(zero, n) + && 0 >= /*<>*/ caml_int64_compare(n, max_int$0)) + /*<>*/ return [0, runtime.caml_int64_to_int32(n)]; + /*<>*/ return 0; + /*<>*/ } + function to_string(n){ + /*<>*/ return /*<>*/ runtime.caml_int64_format + ("%d", n); + /*<>*/ } + function of_string_opt(s){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _f_ = [0, /*<>*/ runtime.caml_int64_of_string(s)]; + /*<>*/ return _f_; + } + catch(_g_){ + var _e_ = caml_wrap_exception(_g_); + if(_e_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_e_, 0); + } + /*<>*/ } + function compare(x, y){ + /*<>*/ return /*<>*/ caml_int64_compare + (x, y); + /*<>*/ } + function equal(x, y){ + /*<>*/ return 0 + === /*<>*/ caml_int64_compare(x, y) + ? 1 + : 0; + /*<>*/ } + function unsigned_compare(n, m){ + /*<>*/ return /*<>*/ caml_int64_compare + ( /*<>*/ caml_int64_sub(n, min_int), + /*<>*/ caml_int64_sub(m, min_int)); + /*<>*/ } + function min(x, y){ + /*<>*/ return /*<>*/ runtime.caml_lessequal + (x, y) + ? x + : y; + /*<>*/ } + function max(x, y){ + /*<>*/ return /*<>*/ caml_greaterequal + (x, y) + ? x + : y; + /*<>*/ } + function unsigned_div(n, d){ + /*<>*/ if + ( /*<>*/ runtime.caml_lessthan(d, zero)) + /*<>*/ return 0 <= unsigned_compare(n, d) ? one : zero; + /*<>*/ var + /*<>*/ q = + /*<>*/ runtime.caml_int64_shift_left + ( /*<>*/ runtime.caml_int64_div + ( /*<>*/ runtime.caml_int64_shift_right_unsigned + (n, 1), + d), + 1), + /*<>*/ r = + /*<>*/ caml_int64_sub + (n, /*<>*/ caml_int64_mul(q, d)); + /*<>*/ return 0 <= unsigned_compare(r, d) ? succ(q) : q; + /*<>*/ } + function unsigned_rem(n, d){ + /*<>*/ return /*<>*/ caml_int64_sub + (n, /*<>*/ caml_int64_mul(unsigned_div(n, d), d)); + /*<>*/ } + var + Stdlib_Int64 = + [0, + zero, + one, + minus_one, + unsigned_div, + unsigned_rem, + succ, + pred, + abs, + max_int, + min_int, + lognot, + unsigned_to_int, + of_string_opt, + to_string, + compare, + unsigned_compare, + equal, + min, + max]; + runtime.caml_register_global(11, Stdlib_Int64, "Stdlib__Int64"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Nativeint +//# unitInfo: Requires: Stdlib, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_greaterequal = runtime.caml_greaterequal, + caml_int_compare = runtime.caml_int_compare, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_mul = runtime.caml_mul, + caml_wrap_exception = runtime.caml_wrap_exception, + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Stdlib_Sys = global_data.Stdlib__Sys, + zero = 0, + one = 1, + minus_one = -1; + 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; + /*<>*/ } + /*<>*/ var + size = Stdlib_Sys[9], + /*<>*/ min_int = 1 << (size - 1 | 0), + /*<>*/ max_int = min_int - 1 | 0; + function lognot(n){ + /*<>*/ return n ^ -1; + /*<>*/ } + var max_int$0 = Stdlib[19]; + function unsigned_to_int(n){ + /*<>*/ if + (0 >= /*<>*/ caml_int_compare(0, n) + && 0 >= /*<>*/ caml_int_compare(n, max_int$0)) + /*<>*/ return [0, n]; + /*<>*/ return 0; + /*<>*/ } + function to_string(n){ + /*<>*/ return /*<>*/ runtime.caml_format_int + ("%d", n); + /*<>*/ } + function of_string_opt(s){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _b_ = [0, /*<>*/ runtime.caml_int_of_string(s)]; + /*<>*/ return _b_; + } + catch(_c_){ + var _a_ = caml_wrap_exception(_c_); + if(_a_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_a_, 0); + } + /*<>*/ } + var compare = caml_int_compare; + function equal(x, y){ + /*<>*/ return 0 + === /*<>*/ caml_int_compare(x, y) + ? 1 + : 0; + /*<>*/ } + function unsigned_compare(n, m){ + /*<>*/ return /*<>*/ caml_int_compare + (n - min_int | 0, m - min_int | 0); + /*<>*/ } + function min(x, y){ + /*<>*/ return /*<>*/ runtime.caml_lessequal + (x, y) + ? x + : y; + /*<>*/ } + function max(x, y){ + /*<>*/ return /*<>*/ caml_greaterequal + (x, y) + ? x + : y; + /*<>*/ } + function unsigned_div(n, d){ + /*<>*/ if + ( /*<>*/ runtime.caml_lessthan(d, 0)) + /*<>*/ return 0 <= unsigned_compare(n, d) + ? one + : zero; + /*<>*/ var + /*<>*/ q = + /*<>*/ runtime.caml_div(n >>> 1 | 0, d) << 1, + /*<>*/ r = + n - /*<>*/ caml_mul(q, d) | 0; + /*<>*/ return 0 <= unsigned_compare(r, d) + ? q + 1 | 0 + : q; + /*<>*/ } + function unsigned_rem(n, d){ + /*<>*/ return n + - /*<>*/ caml_mul(unsigned_div(n, d), d) + | 0; + /*<>*/ } + var + Stdlib_Nativeint = + [0, + zero, + one, + minus_one, + unsigned_div, + unsigned_rem, + succ, + pred, + abs, + size, + max_int, + min_int, + lognot, + unsigned_to_int, + of_string_opt, + to_string, + compare, + unsigned_compare, + equal, + min, + max]; + runtime.caml_register_global(12, Stdlib_Nativeint, "Stdlib__Nativeint"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Lexing +//# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Int, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst = "", + caml_bytes_get = runtime.caml_bytes_get, + 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], + zero_pos = [0, cst, 1, 0, 0], + Stdlib_Bytes = global_data.Stdlib__Bytes, + Stdlib = global_data.Stdlib, + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib_Int = global_data.Stdlib__Int, + cst_Lexing_lex_refill_cannot_g = "Lexing.lex_refill: cannot grow buffer"; + function engine(tbl, state, buf){ + /*<>*/ var + /*<>*/ result = + /*<>*/ runtime.caml_lex_engine(tbl, state, buf), + _F_ = 0 <= result ? 1 : 0, + _G_ = _F_ ? buf[12] !== dummy_pos ? 1 : 0 : _F_; + if(_G_){ + buf[11] = buf[12]; + var _H_ = buf[12]; + buf[12] = [0, _H_[1], _H_[2], _H_[3], buf[4] + buf[6] | 0]; + } + /*<>*/ return result; + /*<>*/ } + function new_engine(tbl, state, buf){ + /*<>*/ var + /*<>*/ result = + /*<>*/ runtime.caml_new_lex_engine(tbl, state, buf), + _C_ = 0 <= result ? 1 : 0, + _D_ = _C_ ? buf[12] !== dummy_pos ? 1 : 0 : _C_; + if(_D_){ + buf[11] = buf[12]; + var _E_ = buf[12]; + buf[12] = [0, _E_[1], _E_[2], _E_[3], buf[4] + buf[6] | 0]; + } + /*<>*/ return result; + /*<>*/ } + function from_function(opt, read_fun){ + /*<>*/ if(opt) + var sth = opt[1], with_positions = sth; + else + var with_positions = 1; + /*<>*/ var + /*<>*/ _o_ = with_positions ? zero_pos : dummy_pos, + _p_ = with_positions ? zero_pos : dummy_pos, + /*<>*/ aux_buffer = + /*<>*/ caml_create_bytes(512), + _q_ = [0], + /*<>*/ _r_ = 0, + _s_ = 0, + _t_ = 0, + _u_ = 0, + _v_ = 0, + _w_ = 0, + _x_ = 0, + /*<>*/ _y_ = + /*<>*/ caml_create_bytes(1024); + /*<>*/ return [0, + function(lexbuf){ + /*<>*/ var + /*<>*/ read = + /*<>*/ caml_call2 + (read_fun, aux_buffer, caml_ml_bytes_length(aux_buffer)), + /*<>*/ n = 0 < read ? read : (lexbuf[9] = 1, 0); + if(caml_ml_bytes_length(lexbuf[2]) < (lexbuf[3] + n | 0)){ + if + (((lexbuf[3] - lexbuf[5] | 0) + n | 0) + <= caml_ml_bytes_length(lexbuf[2])) + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Bytes[11], + lexbuf[2], + lexbuf[5], + lexbuf[2], + 0, + lexbuf[3] - lexbuf[5] | 0); + else{ + /*<>*/ /*<>*/ var + newlen = + /*<>*/ caml_call2 + (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); + /*<>*/ /*<>*/ var + newbuf = /*<>*/ caml_create_bytes(newlen); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Bytes[11], + lexbuf[2], + lexbuf[5], + newbuf, + 0, + lexbuf[3] - lexbuf[5] | 0); + lexbuf[2] = newbuf; + } + var s = lexbuf[5]; + lexbuf[4] = lexbuf[4] + s | 0; + lexbuf[6] = lexbuf[6] - s | 0; + lexbuf[5] = 0; + lexbuf[7] = lexbuf[7] - s | 0; + lexbuf[3] = lexbuf[3] - s | 0; + var t = lexbuf[10], _A_ = t.length - 1 - 1 | 0, _z_ = 0; + if(_A_ >= 0){ + var i = _z_; + for(;;){ + /*<>*/ /*<>*/ var + v = caml_check_bound(t, i)[1 + i]; + if(0 <= v) + /*<>*/ caml_check_bound(t, i)[1 + i] = v - s | 0; + /*<>*/ /*<>*/ var + _B_ = i + 1 | 0; + if(_A_ === i) break; + var i = _B_; + } + } + } + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Bytes[11], aux_buffer, 0, lexbuf[2], lexbuf[3], n); + lexbuf[3] = lexbuf[3] + n | 0; + return 0; + }, + _y_, + _x_, + _w_, + _v_, + _u_, + _t_, + _s_, + _r_, + _q_, + _p_, + _o_]; + /*<>*/ } + function from_channel(with_positions, ic){ + /*<>*/ return from_function + (with_positions, + function(buf, n){ + /*<>*/ return /*<>*/ caml_call4 + (Stdlib[84], ic, buf, 0, n); + /*<>*/ }); + /*<>*/ } + function from_string(opt, s){ + /*<>*/ if(opt) + var sth = opt[1], with_positions = sth; + else + var with_positions = 1; + /*<>*/ var + /*<>*/ _d_ = with_positions ? zero_pos : dummy_pos, + _e_ = with_positions ? zero_pos : dummy_pos, + _f_ = [0], + /*<>*/ _g_ = 1, + _h_ = 0, + _i_ = 0, + _j_ = 0, + _k_ = 0, + _l_ = 0, + _m_ = runtime.caml_ml_string_length(s), + /*<>*/ _n_ = + /*<>*/ caml_call1(Stdlib_Bytes[5], s); + /*<>*/ return [0, + function(lexbuf){ + /*<>*/ lexbuf[9] = 1; + return 0; + /*<>*/ }, + _n_, + _m_, + _l_, + _k_, + _j_, + _i_, + _h_, + _g_, + _f_, + _e_, + _d_]; + /*<>*/ } + function set_position(lexbuf, position){ + /*<>*/ lexbuf[12] = + [0, lexbuf[12][1], position[2], position[3], position[4]]; + lexbuf[4] = position[4]; + return 0; + /*<>*/ } + function set_filename(lexbuf, fname){ + /*<>*/ var _c_ = lexbuf[12]; + lexbuf[12] = [0, fname, _c_[2], _c_[3], _c_[4]]; + return 0; + /*<>*/ } + function with_positions(lexbuf){ + /*<>*/ return lexbuf[12] !== dummy_pos ? 1 : 0; + /*<>*/ } + function lexeme(lexbuf){ + /*<>*/ var len = lexbuf[6] - lexbuf[5] | 0; + /*<>*/ return /*<>*/ caml_call3 + (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); + /*<>*/ } + 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)]; + /*<>*/ } + function sub_lexeme_char(lexbuf, i){ + /*<>*/ return /*<>*/ caml_bytes_get + (lexbuf[2], i); + /*<>*/ } + function sub_lexeme_char_opt(lexbuf, i){ + /*<>*/ return 0 <= i + ? [0, /*<>*/ caml_bytes_get(lexbuf[2], i)] + : 0; + /*<>*/ } + function lexeme_char(lexbuf, i){ + /*<>*/ return /*<>*/ caml_bytes_get + (lexbuf[2], lexbuf[5] + i | 0); + /*<>*/ } + function lexeme_start(lexbuf){ + /*<>*/ return lexbuf[11][4]; + /*<>*/ } + function lexeme_end(lexbuf){ + /*<>*/ return lexbuf[12][4]; + /*<>*/ } + function lexeme_start_p(lexbuf){ + /*<>*/ return lexbuf[11]; + /*<>*/ } + function lexeme_end_p(lexbuf){ + /*<>*/ return lexbuf[12]; + /*<>*/ } + function new_line(lexbuf){ + /*<>*/ var + lcp = lexbuf[12], + _a_ = lcp !== dummy_pos ? 1 : 0, + _b_ = + _a_ + ? (lexbuf[12] = [0, lcp[1], lcp[2] + 1 | 0, lcp[4], lcp[4]], 0) + : _a_; + return _b_; + /*<>*/ } + function flush_input(lb){ + /*<>*/ lb[6] = 0; + lb[4] = 0; + var lcp = lb[12]; + if(lcp !== dummy_pos) + lb[12] = [0, lcp[1], zero_pos[2], zero_pos[3], zero_pos[4]]; + lb[3] = 0; + return 0; + /*<>*/ } + var + Stdlib_Lexing = + [0, + dummy_pos, + from_channel, + from_string, + from_function, + set_position, + set_filename, + with_positions, + lexeme, + lexeme_char, + lexeme_start, + lexeme_end, + lexeme_start_p, + lexeme_end_p, + new_line, + flush_input, + sub_lexeme, + sub_lexeme_opt, + sub_lexeme_char, + sub_lexeme_char_opt, + engine, + new_engine]; + runtime.caml_register_global(7, Stdlib_Lexing, "Stdlib__Lexing"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Parsing +//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Lexing, Stdlib__Obj +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_check_bound = runtime.caml_check_bound, + caml_fresh_oo_id = runtime.caml_fresh_oo_id, + caml_make_vect = runtime.caml_make_vect, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + 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_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, + Stdlib_Array = global_data.Stdlib__Array, + Stdlib_Lexing = global_data.Stdlib__Lexing, + /*<>*/ YYexit = + [248, "Stdlib.Parsing.YYexit", caml_fresh_oo_id(0)], + /*<>*/ Parse_error = + [248, "Stdlib.Parsing.Parse_error", caml_fresh_oo_id(0)], + /*<>*/ env = + [0, + /*<>*/ caml_make_vect(100, 0), + /*<>*/ caml_make_vect(100, 0), + /*<>*/ caml_make_vect(100, Stdlib_Lexing[1]), + /*<>*/ caml_make_vect(100, Stdlib_Lexing[1]), + 100, + 0, + 0, + 0, + Stdlib_Lexing[1], + Stdlib_Lexing[1], + 0, + 0, + 0, + 0, + 0, + 0], + cst_syntax_error = "syntax error"; + function grow_stacks(param){ + /*<>*/ var + oldsize = env[5], + newsize = oldsize * 2 | 0, + /*<>*/ new_s = + /*<>*/ caml_make_vect(newsize, 0), + /*<>*/ new_v = + /*<>*/ caml_make_vect(newsize, 0), + /*<>*/ new_start = + /*<>*/ caml_make_vect(newsize, Stdlib_Lexing[1]), + /*<>*/ new_end = + /*<>*/ caml_make_vect(newsize, Stdlib_Lexing[1]); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Array[8], env[1], 0, new_s, 0, oldsize); + env[1] = new_s; + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Array[8], env[2], 0, new_v, 0, oldsize); + env[2] = new_v; + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Array[8], env[3], 0, new_start, 0, oldsize); + env[3] = new_start; + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Array[8], env[4], 0, new_end, 0, oldsize); + env[4] = new_end; + env[5] = newsize; + return 0; + /*<>*/ } + function clear_parser(param){ + /*<>*/ /*<>*/ caml_call4 + (Stdlib_Array[7], env[2], 0, env[5], 0); + env[8] = 0; + return 0; + /*<>*/ } + /*<>*/ /*<>*/ var + current_lookahead_fun = + [0, + function(param){ + /*<>*/ return 0; + /*<>*/ }]; + function yyparse(tables, start, lexer, lexbuf){ + /*<>*/ var + init_asp = env[11], + init_sp = env[14], + init_stackbase = env[6], + init_state = env[15], + init_curr_char = env[7], + init_lval = env[8], + init_errflag = env[16]; + env[6] = env[14] + 1 | 0; + env[7] = start; + env[10] = lexbuf[12]; + /*<>*/ try{ + var cmd = 0, arg = 0; + /*<>*/ for(;;) + switch + ( /*<>*/ runtime.caml_parse_engine + (tables, env, cmd, arg)){ + case 0: + /*<>*/ /*<>*/ var + arg$0 = /*<>*/ caml_call1(lexer, lexbuf); + env[9] = lexbuf[11]; + env[10] = lexbuf[12]; + var cmd = 1, arg = arg$0; + break; + case 1: + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Parse_error, 1); + case 2: + /*<>*/ grow_stacks(0); + var cmd = 2, arg = 0; + break; + case 3: + /*<>*/ grow_stacks(0); + var cmd = 3, arg = 0; + break; + case 4: + try{ + /*<>*/ var + _i_ = env[13], + /*<>*/ _j_ = + /*<>*/ caml_call1 + (caml_check_bound(tables[1], _i_)[1 + _i_], env), + /*<>*/ _k_ = 4, + value = _j_, + action = _k_; + } + catch(_m_){ + var _h_ = caml_wrap_exception(_m_); + if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); + var value = 0, action = 5; + } + var cmd = action, arg = value; + break; + default: + /*<>*/ /*<>*/ caml_call1 + (tables[14], cst_syntax_error); + var cmd = 5, arg = 0; + } + } + catch(exn$0){ + /*<>*/ var + exn = caml_wrap_exception(exn$0), + /*<>*/ curr_char = env[7]; + env[11] = init_asp; + env[14] = init_sp; + env[6] = init_stackbase; + env[15] = init_state; + env[7] = init_curr_char; + env[8] = init_lval; + env[16] = init_errflag; + if(exn[1] === YYexit){ + var v = exn[2]; + /*<>*/ return v; + } + current_lookahead_fun[1] = + function(tok){ + /*<>*/ if + (! /*<>*/ caml_call1(Stdlib_Obj[1], tok)) + /*<>*/ return caml_check_bound(tables[2], tok) + [1 + tok] + === curr_char + ? 1 + : 0; + /*<>*/ /*<>*/ var + _l_ = /*<>*/ runtime.caml_obj_tag(tok); + /*<>*/ return caml_check_bound(tables[3], _l_) + [1 + _l_] + === curr_char + ? 1 + : 0; + /*<>*/ }; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (exn, 0); + } + /*<>*/ } + function peek_val(env, n){ + /*<>*/ var _g_ = env[11] - n | 0; + /*<>*/ return caml_check_bound(env[2], _g_)[1 + _g_]; + /*<>*/ } + function symbol_start_pos(param){ + /*<>*/ var i$1 = env[12], i = i$1; + /*<>*/ for(;;){ + if(0 >= i){ + var _f_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _f_)[1 + _f_]; + } + /*<>*/ var + _d_ = (env[11] - i | 0) + 1 | 0, + /*<>*/ st = caml_check_bound(env[3], _d_)[1 + _d_], + _e_ = (env[11] - i | 0) + 1 | 0, + /*<>*/ en = caml_check_bound(env[4], _e_)[1 + _e_]; + /*<>*/ if + ( /*<>*/ runtime.caml_notequal(st, en)) + /*<>*/ return st; + /*<>*/ var + /*<>*/ i$0 = i - 1 | 0, + i = i$0; + } + /*<>*/ } + function symbol_end_pos(param){ + /*<>*/ var _c_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _c_)[1 + _c_]; + /*<>*/ } + function rhs_start_pos(n){ + /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[3], _b_)[1 + _b_]; + /*<>*/ } + function rhs_end_pos(n){ + /*<>*/ var _a_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[4], _a_)[1 + _a_]; + /*<>*/ } + function symbol_start(param){ + /*<>*/ return symbol_start_pos(0)[4]; + /*<>*/ } + function symbol_end(param){ + /*<>*/ return symbol_end_pos(0)[4]; + /*<>*/ } + function rhs_start(n){ + /*<>*/ return rhs_start_pos(n)[4]; + /*<>*/ } + function rhs_end(n){ + /*<>*/ return rhs_end_pos(n)[4]; + /*<>*/ } + function is_current_lookahead(tok){ + /*<>*/ return /*<>*/ caml_call1 + (current_lookahead_fun[1], tok); + /*<>*/ } + function parse_error(param){ + /*<>*/ return 0; + /*<>*/ } + var + Stdlib_Parsing = + [0, + symbol_start, + symbol_end, + rhs_start, + rhs_end, + symbol_start_pos, + symbol_end_pos, + rhs_start_pos, + rhs_end_pos, + clear_parser, + Parse_error, + runtime.caml_set_parser_trace, + YYexit, + yyparse, + peek_val, + is_current_lookahead, + parse_error]; + runtime.caml_register_global(7, Stdlib_Parsing, "Stdlib__Parsing"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Set +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__List, Stdlib__Seq +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_Set_bal$3 = "Set.bal", + 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 + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_List = global_data.Stdlib__List, + Assert_failure = global_data.Assert_failure, + cst_Set_remove_min_elt = "Set.remove_min_elt", + _a_ = [0, 0, 0, 0], + _b_ = [0, 0, 0], + _c_ = [0, "set.ml", 570, 18], + cst_Set_bal = cst_Set_bal$3, + cst_Set_bal$0 = cst_Set_bal$3, + cst_Set_bal$1 = cst_Set_bal$3, + cst_Set_bal$2 = cst_Set_bal$3, + Stdlib_Set = + [0, + function(Ord){ + function height(param){ + /*<>*/ if(! param) /*<>*/ return 0; + var h = param[4]; + /*<>*/ return h; + /*<>*/ } + function create(l, v, r){ + /*<>*/ if(l) var h = l[4], hl = h; else var hl = 0; + /*<>*/ if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + var _Z_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + /*<>*/ return [0, l, v, r, _Z_]; + /*<>*/ } + function bal(l, v, r){ + /*<>*/ if(l) var h = l[4], hl = h; else var hl = 0; + /*<>*/ if(r) + var h$0 = r[4], hr = h$0; + else + var hr = 0; + if((hr + 2 | 0) < hl){ + if(! l) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Set_bal$0); + /*<>*/ var + lr = l[3], + lv = l[2], + ll = l[1], + /*<>*/ _U_ = height(lr); + if(_U_ <= height(ll)) + /*<>*/ return create(ll, lv, create(lr, v, r)); + if(! lr) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Set_bal); + /*<>*/ var + lrr = lr[3], + lrv = lr[2], + lrl = lr[1], + /*<>*/ _V_ = create(lrr, v, r); + /*<>*/ return create(create(ll, lv, lrl), lrv, _V_); + } + if((hl + 2 | 0) >= hr){ + var _Y_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + /*<>*/ return [0, l, v, r, _Y_]; + } + if(! r) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Set_bal$2); + /*<>*/ var + rr = r[3], + rv = r[2], + rl = r[1], + /*<>*/ _W_ = height(rl); + if(_W_ <= height(rr)) + /*<>*/ return create(create(l, v, rl), rv, rr); + if(! rl) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Set_bal$1); + /*<>*/ var + rlr = rl[3], + rlv = rl[2], + rll = rl[1], + /*<>*/ _X_ = create(rlr, rv, rr); + /*<>*/ return create(create(l, v, rll), rlv, _X_); + /*<>*/ } + function add(x, t){ + /*<>*/ if(! t) /*<>*/ return [0, 0, x, 0, 1]; + /*<>*/ var + r = t[3], + v = t[2], + l = t[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) /*<>*/ return t; + if(0 <= c){ + /*<>*/ /*<>*/ var rr = add(x, r); + return r === rr ? t : bal(l, v, rr); + } + /*<>*/ /*<>*/ var ll = add(x, l); + return l === ll ? t : bal(ll, v, r); + } + function singleton(x){ + /*<>*/ return [0, 0, x, 0, 1]; + /*<>*/ } + function add_min_element(x, param){ + /*<>*/ if(! param) /*<>*/ return singleton(x); + var r = param[3], v = param[2], l = param[1]; + /*<>*/ return bal(add_min_element(x, l), v, r); + } + function add_max_element(x, param){ + /*<>*/ if(! param) /*<>*/ return singleton(x); + var r = param[3], v = param[2], l = param[1]; + /*<>*/ return bal(l, v, add_max_element(x, r)); + } + function join(l, v, r){ + /*<>*/ if(! l) + /*<>*/ return add_min_element(v, r); + if(! r) /*<>*/ return add_max_element(v, l); + var + rh = r[4], + rr = r[3], + rv = r[2], + rl = r[1], + lh = l[4], + lr = l[3], + lv = l[2], + ll = l[1]; + return (rh + 2 | 0) < lh + ? bal(ll, lv, join(lr, v, r)) + : (lh + + 2 + | 0) + < rh + ? bal(join(l, v, rl), rv, rr) + : create(l, v, r); + /*<>*/ } + function min_elt(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var l = param$0[1]; + if(! l){var v = param$0[2]; /*<>*/ return v;} + var param$0 = l; + } + /*<>*/ } + function min_elt_opt(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[1]; + if(! l){var v = param$0[2]; /*<>*/ return [0, v];} + var param$0 = l; + } + /*<>*/ } + function max_elt(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + if(! param$0[3]){ + var v = param$0[2]; + /*<>*/ return v; + } + var r = param$0[3], param$0 = r; + } + /*<>*/ } + function max_elt_opt(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + if(! param$0[3]){ + var v = param$0[2]; + /*<>*/ return [0, v]; + } + var r = param$0[3], param$0 = r; + } + /*<>*/ } + function remove_min_elt(param){ + /*<>*/ if(! param) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Set_remove_min_elt); + var l = param[1]; + if(l){ + var r = param[3], v = param[2]; + /*<>*/ return bal(remove_min_elt(l), v, r); + } + var r$0 = param[3]; + /*<>*/ return r$0; + /*<>*/ } + function concat(t1, t2){ + /*<>*/ if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ /*<>*/ var + _T_ = remove_min_elt(t2); + /*<>*/ return join(t1, min_elt(t2), _T_); + /*<>*/ } + function split(x, param){ + /*<>*/ if(! param) /*<>*/ return _a_; + /*<>*/ var + r = param[3], + v = param[2], + l = param[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return [0, l, 1, r]; + if(0 <= c){ + /*<>*/ var + /*<>*/ match = split(x, r), + rr = match[3], + pres = match[2], + lr = match[1]; + /*<>*/ return [0, join(l, v, lr), pres, rr]; + } + /*<>*/ var + /*<>*/ match$0 = split(x, l), + rl = match$0[3], + pres$0 = match$0[2], + ll = match$0[1]; + /*<>*/ return [0, ll, pres$0, join(rl, v, r)]; + } + var empty = 0; + function is_empty(param){ + /*<>*/ return param ? 0 : 1; + /*<>*/ } + function mem(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + r = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v), + _S_ = 0 === c ? 1 : 0; + if(_S_) return _S_; + var r$0 = 0 <= c ? r : l, param$0 = r$0; + } + } + function remove(x, t){ + /*<>*/ if(! t) /*<>*/ return 0; + /*<>*/ var + t2 = t[3], + v = t[2], + t1 = t[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c){ + if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ /*<>*/ var + _R_ = remove_min_elt(t2); + /*<>*/ return bal(t1, min_elt(t2), _R_); + } + if(0 <= c){ + /*<>*/ /*<>*/ var + rr = remove(x, t2); + return t2 === rr ? t : bal(t1, v, rr); + } + /*<>*/ /*<>*/ var ll = remove(x, t1); + return t1 === ll ? t : bal(ll, v, t2); + } + function union(s1, s2){ + /*<>*/ if(! s1) /*<>*/ return s2; + if(! s2) /*<>*/ return s1; + var + h2 = s2[4], + r2 = s2[3], + v2 = s2[2], + l2 = s2[1], + h1 = s1[4], + r1 = s1[3], + v1 = s1[2], + l1 = s1[1]; + if(h2 <= h1){ + if(1 === h2) /*<>*/ return add(v2, s1); + /*<>*/ var + /*<>*/ match = split(v1, s2), + r2$0 = match[3], + l2$0 = match[1], + /*<>*/ _P_ = union(r1, r2$0); + /*<>*/ return join(union(l1, l2$0), v1, _P_); + } + if(1 === h1) /*<>*/ return add(v1, s2); + /*<>*/ var + /*<>*/ match$0 = split(v2, s1), + r1$0 = match$0[3], + l1$0 = match$0[1], + /*<>*/ _Q_ = union(r1$0, r2); + /*<>*/ return join(union(l1$0, l2), v2, _Q_); + /*<>*/ } + function inter(s1, s2){ + /*<>*/ if(! s1) /*<>*/ return 0; + if(! s2) /*<>*/ return 0; + /*<>*/ var + r1 = s1[3], + v1 = s1[2], + l1 = s1[1], + /*<>*/ _M_ = split(v1, s2), + l2 = _M_[1]; + if(_M_[2]){ + /*<>*/ var + r2 = _M_[3], + /*<>*/ _N_ = inter(r1, r2); + /*<>*/ return join(inter(l1, l2), v1, _N_); + } + /*<>*/ var + r2$0 = _M_[3], + /*<>*/ _O_ = inter(r1, r2$0); + /*<>*/ return concat(inter(l1, l2), _O_); + /*<>*/ } + function split_bis(x, param){ + /*<>*/ if(! param) + /*<>*/ return [0, + 0, + function(param){ + /*<>*/ return 0; + /*<>*/ }]; + /*<>*/ var + r = param[3], + v = param[2], + l = param[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) /*<>*/ return 0; + if(0 <= c){ + /*<>*/ /*<>*/ var + match = split_bis(x, r); + if(! match) /*<>*/ return 0; + var rr = match[2], lr = match[1]; + /*<>*/ return [0, join(l, v, lr), rr]; + } + /*<>*/ /*<>*/ var + match$0 = split_bis(x, l); + if(! match$0) /*<>*/ return 0; + var rl = match$0[2], ll = match$0[1]; + /*<>*/ return [0, + ll, + function(param){ + /*<>*/ return join(rl(0), v, r); + /*<>*/ }]; + } + function disjoint(s1, s2){ + /*<>*/ var s1$0 = s1, s2$0 = s2; + /*<>*/ for(;;){ + if(s1$0 && s2$0){ + var r1 = s1$0[3], v1 = s1$0[2], l1 = s1$0[1]; + if(s1$0 === s2$0) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = split_bis(v1, s2$0); + if(! match) /*<>*/ return 0; + /*<>*/ var + r2 = match[2], + l2 = match[1], + /*<>*/ _L_ = disjoint(l1, l2); + /*<>*/ if(! _L_) /*<>*/ return _L_; + /*<>*/ var + /*<>*/ s2$1 = r2(0), + s1$0 = r1, + s2$0 = s2$1; + continue; + } + /*<>*/ return 1; + } + /*<>*/ } + function diff(s1, s2){ + /*<>*/ if(! s1) /*<>*/ return 0; + if(! s2) /*<>*/ return s1; + /*<>*/ var + r1 = s1[3], + v1 = s1[2], + l1 = s1[1], + /*<>*/ _I_ = split(v1, s2), + l2 = _I_[1]; + if(_I_[2]){ + /*<>*/ var + r2 = _I_[3], + /*<>*/ _J_ = diff(r1, r2); + /*<>*/ return concat(diff(l1, l2), _J_); + } + /*<>*/ var + r2$0 = _I_[3], + /*<>*/ _K_ = diff(r1, r2$0); + /*<>*/ return join(diff(l1, l2), v1, _K_); + /*<>*/ } + function cons_enum(s, e){ + /*<>*/ var s$0 = s, e$0 = e; + /*<>*/ for(;;){ + if(! s$0) /*<>*/ return e$0; + /*<>*/ var + r = s$0[3], + v = s$0[2], + l = s$0[1], + /*<>*/ e$1 = [0, v, r, e$0], + s$0 = l, + e$0 = e$1; + } + /*<>*/ } + function compare(s1, s2){ + /*<>*/ var + /*<>*/ e2$2 = cons_enum(s2, 0), + /*<>*/ e1$2 = cons_enum(s1, 0), + e1 = e1$2, + e2 = e2$2; + /*<>*/ for(;;){ + if(! e1) return e2 ? -1 : 0; + if(! e2) /*<>*/ return 1; + /*<>*/ var + e2$0 = e2[3], + r2 = e2[2], + v2 = e2[1], + e1$0 = e1[3], + r1 = e1[2], + v1 = e1[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], v1, v2); + /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ var + /*<>*/ e2$1 = cons_enum(r2, e2$0), + /*<>*/ e1$1 = cons_enum(r1, e1$0), + e1 = e1$1, + e2 = e2$1; + } + /*<>*/ } + function equal(s1, s2){ + /*<>*/ return 0 === compare(s1, s2) ? 1 : 0; + /*<>*/ } + function subset(s1, s2){ + /*<>*/ var s1$0 = s1, s2$0 = s2; + /*<>*/ for(;;){ + if(! s1$0) /*<>*/ return 1; + if(! s2$0) /*<>*/ return 0; + /*<>*/ var + r2 = s2$0[3], + v2 = s2$0[2], + l2 = s2$0[1], + r1 = s1$0[3], + v1 = s1$0[2], + l1 = s1$0[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], v1, v2); + /*<>*/ if(0 === c){ + /*<>*/ /*<>*/ var + _F_ = subset(l1, l2); + /*<>*/ if(! _F_) /*<>*/ return _F_; + var s1$0 = r1, s2$0 = r2; + } + else if(0 <= c){ + /*<>*/ /*<>*/ var + _G_ = subset([0, 0, v1, r1, 0], r2); + /*<>*/ if(! _G_) /*<>*/ return _G_; + var s1$0 = l1; + } + else{ + /*<>*/ /*<>*/ var + _H_ = subset([0, l1, v1, 0, 0], l2); + /*<>*/ if(! _H_) /*<>*/ return _H_; + var s1$0 = r1; + } + } + /*<>*/ } + function iter(f, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var r = param$0[3], v = param$0[2], l = param$0[1]; + /*<>*/ iter(f, l); + /*<>*/ /*<>*/ caml_call1(f, v); + var param$0 = r; + } + } + function fold(f, s, accu){ + /*<>*/ var s$0 = s, accu$0 = accu; + /*<>*/ for(;;){ + if(! s$0) /*<>*/ return accu$0; + /*<>*/ var + r = s$0[3], + v = s$0[2], + l = s$0[1], + /*<>*/ accu$1 = + /*<>*/ caml_call2(f, v, fold(f, l, accu$0)), + s$0 = r, + accu$0 = accu$1; + } + /*<>*/ } + function for_all(p, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 1; + /*<>*/ var + r = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ _C_ = + /*<>*/ caml_call1(p, v); + /*<>*/ if(_C_){ + /*<>*/ /*<>*/ var + _D_ = for_all(p, l); + /*<>*/ if(_D_){var param$0 = r; continue;} + var _E_ = _D_; + } + else + var _E_ = _C_; + /*<>*/ return _E_; + } + } + function exists(p, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + r = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ _z_ = + /*<>*/ caml_call1(p, v); + /*<>*/ if(_z_) + var _A_ = _z_; + else{ + /*<>*/ /*<>*/ var + _B_ = exists(p, l); + /*<>*/ if(! _B_){var param$0 = r; continue;} + var _A_ = _B_; + } + /*<>*/ return _A_; + } + } + function filter(p, t){ + /*<>*/ if(! t) /*<>*/ return 0; + /*<>*/ var + r = t[3], + v = t[2], + l = t[1], + /*<>*/ l$0 = filter(p, l), + /*<>*/ pv = /*<>*/ caml_call1(p, v), + /*<>*/ r$0 = filter(p, r); + /*<>*/ if(! pv) + /*<>*/ return concat(l$0, r$0); + if(l === l$0 && r === r$0) /*<>*/ return t; + /*<>*/ return join(l$0, v, r$0); + } + function partition(p, param){ + /*<>*/ if(! param) /*<>*/ return _b_; + /*<>*/ var + r = param[3], + v = param[2], + l = param[1], + /*<>*/ match = partition(p, l), + lf = match[2], + lt = match[1], + /*<>*/ pv = /*<>*/ caml_call1(p, v), + /*<>*/ match$0 = partition(p, r), + rf = match$0[2], + rt = match$0[1]; + /*<>*/ if(pv){ + /*<>*/ /*<>*/ var + _x_ = concat(lf, rf); + /*<>*/ return [0, join(lt, v, rt), _x_]; + } + /*<>*/ /*<>*/ var + _y_ = join(lf, v, rf); + /*<>*/ return [0, concat(lt, rt), _y_]; + } + function cardinal(param){ + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var + r = param[3], + l = param[1], + /*<>*/ _w_ = cardinal(r); + return (cardinal(l) + 1 | 0) + _w_ | 0; + /*<>*/ } + function elements_aux(accu, param){ + var accu$0 = accu, param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return accu$0; + /*<>*/ var + r = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ accu$1 = [0, v, elements_aux(accu$0, r)], + accu$0 = accu$1, + param$0 = l; + } + } + function elements(s){ + /*<>*/ return elements_aux(0, s); + /*<>*/ } + function find(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + /*<>*/ var + r = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) /*<>*/ return v; + var r$0 = 0 <= c ? r : l, param$0 = r$0; + } + } + function find_first(f, param$0){ + var param$1 = param$0; + for(;;){ + if(! param$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ + var v0 = v0$1, param = l$0; + for(;;){ + if(! param) /*<>*/ return v0; + var r = param[3], v0$0 = param[2], l = param[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) + var v0 = v0$0, param = l; + else + var param = r; + } + } + else + var param$1 = r$0; + } + } + function find_first_opt(f, param$0){ + var param$1 = param$0; + for(;;){ + if(! param$1) /*<>*/ return 0; + var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ + var v0 = v0$1, param = l$0; + for(;;){ + if(! param) /*<>*/ return [0, v0]; + var r = param[3], v0$0 = param[2], l = param[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) + var v0 = v0$0, param = l; + else + var param = r; + } + } + else + var param$1 = r$0; + } + } + function find_last(f, param$0){ + var param$1 = param$0; + for(;;){ + if(! param$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ + var v0 = v0$1, param = r$0; + for(;;){ + if(! param) /*<>*/ return v0; + var r = param[3], v0$0 = param[2], l = param[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) + var v0 = v0$0, param = r; + else + var param = l; + } + } + else + var param$1 = l$0; + } + } + function find_last_opt(f, param$0){ + var param$1 = param$0; + for(;;){ + if(! param$1) /*<>*/ return 0; + var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ + var v0 = v0$1, param = r$0; + for(;;){ + if(! param) /*<>*/ return [0, v0]; + var r = param[3], v0$0 = param[2], l = param[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) + var v0 = v0$0, param = r; + else + var param = l; + } + } + else + var param$1 = l$0; + } + } + function find_opt(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + r = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return [0, v]; + var r$0 = 0 <= c ? r : l, param$0 = r$0; + } + } + function try_join(l, v, r){ + /*<>*/ a: + { + if(0 !== l){ + /*<>*/ /*<>*/ var _v_ = max_elt(l); + /*<>*/ if + (0 <= /*<>*/ caml_call2(Ord[1], _v_, v)) + break a; + } + if(0 !== r){ + /*<>*/ /*<>*/ var _u_ = min_elt(r); + /*<>*/ if + (0 <= /*<>*/ caml_call2(Ord[1], v, _u_)) + break a; + } + /*<>*/ return join(l, v, r); + } + /*<>*/ return union(l, add(v, r)); + /*<>*/ } + function map(f, t){ + /*<>*/ if(! t) /*<>*/ return 0; + /*<>*/ var + r = t[3], + v = t[2], + l = t[1], + /*<>*/ l$0 = map(f, l), + /*<>*/ v$0 = /*<>*/ caml_call1(f, v), + /*<>*/ r$0 = map(f, r); + if(l === l$0 && v === v$0 && r === r$0) + /*<>*/ return t; + /*<>*/ return try_join(l$0, v$0, r$0); + } + function filter_map(f, t){ + /*<>*/ if(! t) /*<>*/ return 0; + /*<>*/ var + r = t[3], + v = t[2], + l = t[1], + /*<>*/ t1 = filter_map(f, l), + /*<>*/ v$0 = /*<>*/ caml_call1(f, v), + /*<>*/ t2 = filter_map(f, r); + /*<>*/ if(v$0){ + var v$1 = v$0[1]; + if(l === t1 && v === v$1 && r === t2) + /*<>*/ return t; + /*<>*/ return try_join(t1, v$1, t2); + } + if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ /*<>*/ var + _t_ = remove_min_elt(t2); + /*<>*/ return try_join(t1, min_elt(t2), _t_); + } + function of_list(l){ + /*<>*/ if(! l) return empty; + var _o_ = l[2], x0 = l[1]; + if(! _o_) /*<>*/ return singleton(x0); + var _p_ = _o_[2], x1 = _o_[1]; + if(! _p_) /*<>*/ return add(x1, singleton(x0)); + var _q_ = _p_[2], x2 = _p_[1]; + if(! _q_) + /*<>*/ return add(x2, add(x1, singleton(x0))); + var _r_ = _q_[2], x3 = _q_[1]; + if(! _r_) + /*<>*/ return add + (x3, add(x2, add(x1, singleton(x0)))); + if(_r_[2]){ + /*<>*/ var + /*<>*/ l$0 = + /*<>*/ caml_call2(Stdlib_List[59], Ord[1], l), + sub = + function(n, l){ + /*<>*/ if(3 >= n >>> 0) + switch(n){ + case 0: + /*<>*/ return [0, 0, l]; + case 1: + if(l){ + var l$3 = l[2], x0 = l[1]; + /*<>*/ return [0, [0, 0, x0, 0, 1], l$3]; + } + break; + case 2: + if(l){ + var match$1 = l[2]; + if(match$1){ + var l$4 = match$1[2], x1 = match$1[1], x0$0 = l[1]; + /*<>*/ return [0, + [0, [0, 0, x0$0, 0, 1], x1, 0, 2], + l$4]; + } + } + break; + default: + if(l){ + var _s_ = l[2]; + if(_s_){ + var match$2 = _s_[2]; + if(match$2){ + var + l$5 = match$2[2], + x2 = match$2[1], + x1$0 = _s_[1], + x0$1 = l[1]; + /*<>*/ return [0, + [0, [0, 0, x0$1, 0, 1], x1$0, [0, 0, x2, 0, 1], 2], + l$5]; + } + } + } + } + /*<>*/ var + nl = n / 2 | 0, + /*<>*/ match = sub(nl, l), + l$0 = match[2], + left = match[1]; + /*<>*/ if(! l$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _c_], 1); + /*<>*/ var + l$1 = l$0[2], + mid = l$0[1], + /*<>*/ match$0 = sub((n - nl | 0) - 1 | 0, l$1), + l$2 = match$0[2], + right = match$0[1]; + /*<>*/ return [0, create(left, mid, right), l$2]; + /*<>*/ }; + /*<>*/ return sub + ( /*<>*/ caml_call1(Stdlib_List[1], l$0), + l$0) + [1]; + } + var x4 = _r_[1]; + /*<>*/ return add + (x4, add(x3, add(x2, add(x1, singleton(x0))))); + /*<>*/ } + function add_seq(i, m){ + function _n_(s, x){ + /*<>*/ return add(x, s); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Seq[5], _n_, m, i); + /*<>*/ } + function of_seq(i){ + /*<>*/ return add_seq(i, empty); + /*<>*/ } + function seq_of_enum(c, param){ + /*<>*/ if(! c) /*<>*/ return 0; + /*<>*/ var + rest = c[3], + t = c[2], + x = c[1], + /*<>*/ _l_ = cons_enum(t, rest); + /*<>*/ return [0, + x, + function(_m_){ /*<>*/ return seq_of_enum(_l_, _m_);}]; + /*<>*/ } + function to_seq(c){ + /*<>*/ /*<>*/ var + _j_ = cons_enum(c, 0); + /*<>*/ return function(_k_){ + /*<>*/ return seq_of_enum(_j_, _k_);}; + /*<>*/ } + function snoc_enum(s, e){ + /*<>*/ var s$0 = s, e$0 = e; + /*<>*/ for(;;){ + if(! s$0) /*<>*/ return e$0; + /*<>*/ var + r = s$0[3], + v = s$0[2], + l = s$0[1], + /*<>*/ e$1 = [0, v, l, e$0], + s$0 = r, + e$0 = e$1; + } + /*<>*/ } + function rev_seq_of_enum(c, param){ + /*<>*/ if(! c) /*<>*/ return 0; + /*<>*/ var + rest = c[3], + t = c[2], + x = c[1], + /*<>*/ _h_ = snoc_enum(t, rest); + /*<>*/ return [0, + x, + function(_i_){ /*<>*/ return rev_seq_of_enum(_h_, _i_);}]; + /*<>*/ } + function to_rev_seq(c){ + /*<>*/ /*<>*/ var + _f_ = snoc_enum(c, 0); + /*<>*/ return function(_g_){ + /*<>*/ return rev_seq_of_enum(_f_, _g_);}; + /*<>*/ } + function to_seq_from(low, s){ + /*<>*/ var s$0 = s, c = 0; + /*<>*/ for(;;){ + if(s$0){ + /*<>*/ var + r = s$0[3], + v = s$0[2], + l = s$0[1], + /*<>*/ n = + /*<>*/ caml_call2(Ord[1], v, low); + if(0 !== n){ + if(0 <= n){ + /*<>*/ var + /*<>*/ c$0 = [0, v, r, c], + s$0 = l, + c = c$0; + continue; + } + var s$0 = r; + continue; + } + var _d_ = [0, v, r, c]; + } + else + var _d_ = c; + /*<>*/ return function(_e_){ + /*<>*/ return seq_of_enum(_d_, _e_);}; + } + /*<>*/ } + return [0, + empty, + is_empty, + mem, + add, + singleton, + remove, + union, + inter, + disjoint, + diff, + compare, + equal, + subset, + iter, + map, + fold, + for_all, + exists, + filter, + filter_map, + partition, + cardinal, + elements, + min_elt, + min_elt_opt, + max_elt, + max_elt_opt, + min_elt, + min_elt_opt, + split, + find, + find_opt, + find_first, + find_first_opt, + find_last, + find_last_opt, + of_list, + to_seq_from, + to_seq, + to_rev_seq, + add_seq, + of_seq]; + }]; + runtime.caml_register_global(12, Stdlib_Set, "Stdlib__Set"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Map +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Seq +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_Map_bal$3 = "Map.bal", + 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 + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Assert_failure = global_data.Assert_failure, + Stdlib_Seq = global_data.Stdlib__Seq, + cst_Map_remove_min_elt = "Map.remove_min_elt", + _a_ = [0, 0, 0, 0], + _b_ = [0, "map.ml", 400, 10], + _c_ = [0, 0, 0], + cst_Map_bal = cst_Map_bal$3, + cst_Map_bal$0 = cst_Map_bal$3, + cst_Map_bal$1 = cst_Map_bal$3, + cst_Map_bal$2 = cst_Map_bal$3, + Stdlib_Map = + [0, + function(Ord){ + function height(param){ + /*<>*/ if(! param) /*<>*/ return 0; + var h = param[5]; + /*<>*/ return h; + /*<>*/ } + function create(l, x, d, r){ + /*<>*/ var + /*<>*/ hl = height(l), + /*<>*/ hr = height(r), + _L_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + /*<>*/ return [0, l, x, d, r, _L_]; + /*<>*/ } + function singleton(x, d){ + /*<>*/ return [0, 0, x, d, 0, 1]; + /*<>*/ } + function bal(l, x, d, r){ + /*<>*/ if(l) var h = l[5], hl = h; else var hl = 0; + /*<>*/ if(r) var h$0 = r[5], hr = h$0; else var hr = 0; + if((hr + 2 | 0) < hl){ + if(! l) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Map_bal$0); + /*<>*/ var + lr = l[4], + ld = l[3], + lv = l[2], + ll = l[1], + /*<>*/ _G_ = height(lr); + if(_G_ <= height(ll)) + /*<>*/ return create + (ll, lv, ld, create(lr, x, d, r)); + if(! lr) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Map_bal); + /*<>*/ var + lrr = lr[4], + lrd = lr[3], + lrv = lr[2], + lrl = lr[1], + /*<>*/ _H_ = create(lrr, x, d, r); + /*<>*/ return create + (create(ll, lv, ld, lrl), lrv, lrd, _H_); + } + if((hl + 2 | 0) >= hr){ + var _K_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + /*<>*/ return [0, l, x, d, r, _K_]; + } + if(! r) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Map_bal$2); + /*<>*/ var + rr = r[4], + rd = r[3], + rv = r[2], + rl = r[1], + /*<>*/ _I_ = height(rl); + if(_I_ <= height(rr)) + /*<>*/ return create + (create(l, x, d, rl), rv, rd, rr); + if(! rl) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Map_bal$1); + /*<>*/ var + rlr = rl[4], + rld = rl[3], + rlv = rl[2], + rll = rl[1], + /*<>*/ _J_ = create(rlr, rv, rd, rr); + /*<>*/ return create + (create(l, x, d, rll), rlv, rld, _J_); + /*<>*/ } + var empty = 0; + function is_empty(param){ + /*<>*/ return param ? 0 : 1; + /*<>*/ } + function add(x, data, m){ + /*<>*/ if(! m) + /*<>*/ return [0, 0, x, data, 0, 1]; + /*<>*/ var + h = m[5], + r = m[4], + d = m[3], + v = m[2], + l = m[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + return d === data ? m : [0, l, x, data, r, h]; + if(0 <= c){ + /*<>*/ /*<>*/ var + rr = add(x, data, r); + return r === rr ? m : bal(l, v, d, rr); + } + /*<>*/ /*<>*/ var + ll = add(x, data, l); + return l === ll ? m : bal(ll, v, d, r); + } + function find(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + /*<>*/ var + r = param$0[4], + d = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) /*<>*/ return d; + var r$0 = 0 <= c ? r : l, param$0 = r$0; + } + } + function find_first(f, param$0){ + var param$1 = param$0; + for(;;){ + if(! param$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var + r$0 = param$1[4], + d0$1 = param$1[3], + v0$1 = param$1[2], + l$0 = param$1[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ + var v0 = v0$1, d0 = d0$1, param = l$0; + for(;;){ + if(! param) /*<>*/ return [0, v0, d0]; + var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) + var v0 = v0$0, d0 = d0$0, param = l; + else + var param = r; + } + } + else + var param$1 = r$0; + } + } + function find_first_opt(f, param$0){ + var param$1 = param$0; + for(;;){ + if(! param$1) /*<>*/ return 0; + var + r$0 = param$1[4], + d0$1 = param$1[3], + v0$1 = param$1[2], + l$0 = param$1[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ + var v0 = v0$1, d0 = d0$1, param = l$0; + for(;;){ + if(! param) /*<>*/ return [0, [0, v0, d0]]; + var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) + var v0 = v0$0, d0 = d0$0, param = l; + else + var param = r; + } + } + else + var param$1 = r$0; + } + } + function find_last(f, param$0){ + var param$1 = param$0; + for(;;){ + if(! param$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var + r$0 = param$1[4], + d0$1 = param$1[3], + v0$1 = param$1[2], + l$0 = param$1[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ + var v0 = v0$1, d0 = d0$1, param = r$0; + for(;;){ + if(! param) /*<>*/ return [0, v0, d0]; + var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) + var v0 = v0$0, d0 = d0$0, param = r; + else + var param = l; + } + } + else + var param$1 = l$0; + } + } + function find_last_opt(f, param$0){ + var param$1 = param$0; + for(;;){ + if(! param$1) /*<>*/ return 0; + var + r$0 = param$1[4], + d0$1 = param$1[3], + v0$1 = param$1[2], + l$0 = param$1[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ + var v0 = v0$1, d0 = d0$1, param = r$0; + for(;;){ + if(! param) /*<>*/ return [0, [0, v0, d0]]; + var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) + var v0 = v0$0, d0 = d0$0, param = r; + else + var param = l; + } + } + else + var param$1 = l$0; + } + } + function find_opt(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + r = param$0[4], + d = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return [0, d]; + var r$0 = 0 <= c ? r : l, param$0 = r$0; + } + } + function mem(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + r = param$0[4], + v = param$0[2], + l = param$0[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v), + _F_ = 0 === c ? 1 : 0; + if(_F_) return _F_; + var r$0 = 0 <= c ? r : l, param$0 = r$0; + } + } + function min_binding(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var l = param$0[1]; + if(! l){ + var d = param$0[3], v = param$0[2]; + /*<>*/ return [0, v, d]; + } + var param$0 = l; + } + /*<>*/ } + function min_binding_opt(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[1]; + if(! l){ + var d = param$0[3], v = param$0[2]; + /*<>*/ return [0, [0, v, d]]; + } + var param$0 = l; + } + /*<>*/ } + function max_binding(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + if(! param$0[4]){ + var d = param$0[3], v = param$0[2]; + /*<>*/ return [0, v, d]; + } + var r = param$0[4], param$0 = r; + } + /*<>*/ } + function max_binding_opt(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + if(! param$0[4]){ + var d = param$0[3], v = param$0[2]; + /*<>*/ return [0, [0, v, d]]; + } + var r = param$0[4], param$0 = r; + } + /*<>*/ } + function remove_min_binding(param){ + /*<>*/ if(! param) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Map_remove_min_elt); + var l = param[1]; + if(l){ + var r = param[4], d = param[3], v = param[2]; + /*<>*/ return bal(remove_min_binding(l), v, d, r); + } + var r$0 = param[4]; + /*<>*/ return r$0; + /*<>*/ } + function _d_(t1, t2){ + /*<>*/ if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ var + /*<>*/ match = min_binding(t2), + d = match[2], + x = match[1]; + /*<>*/ return bal(t1, x, d, remove_min_binding(t2)); + /*<>*/ } + function remove(x, m){ + /*<>*/ if(! m) /*<>*/ return 0; + /*<>*/ var + r = m[4], + d = m[3], + v = m[2], + l = m[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return _d_(l, r); + if(0 <= c){ + /*<>*/ /*<>*/ var rr = remove(x, r); + return r === rr ? m : bal(l, v, d, rr); + } + /*<>*/ /*<>*/ var ll = remove(x, l); + return l === ll ? m : bal(ll, v, d, r); + } + function update(x, f, m){ + /*<>*/ if(! m){ + /*<>*/ /*<>*/ var + match$0 = /*<>*/ caml_call1(f, 0); + if(! match$0) /*<>*/ return 0; + var data$0 = match$0[1]; + /*<>*/ return [0, 0, x, data$0, 0, 1]; + } + /*<>*/ var + h = m[5], + r = m[4], + d = m[3], + v = m[2], + l = m[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(f, [0, d]); + if(! match) /*<>*/ return _d_(l, r); + var data = match[1]; + return d === data ? m : [0, l, x, data, r, h]; + } + if(0 <= c){ + /*<>*/ /*<>*/ var + rr = update(x, f, r); + return r === rr ? m : bal(l, v, d, rr); + } + /*<>*/ /*<>*/ var + ll = update(x, f, l); + return l === ll ? m : bal(ll, v, d, r); + } + function iter(f, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var r = param$0[4], d = param$0[3], v = param$0[2], l = param$0[1]; + /*<>*/ iter(f, l); + /*<>*/ /*<>*/ caml_call2(f, v, d); + var param$0 = r; + } + } + function map(f, param){ + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var + h = param[5], + r = param[4], + d = param[3], + v = param[2], + l = param[1], + /*<>*/ l$0 = map(f, l), + /*<>*/ d$0 = /*<>*/ caml_call1(f, d), + /*<>*/ r$0 = map(f, r); + /*<>*/ return [0, l$0, v, d$0, r$0, h]; + } + function mapi(f, param){ + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var + h = param[5], + r = param[4], + d = param[3], + v = param[2], + l = param[1], + /*<>*/ l$0 = mapi(f, l), + /*<>*/ d$0 = + /*<>*/ caml_call2(f, v, d), + /*<>*/ r$0 = mapi(f, r); + /*<>*/ return [0, l$0, v, d$0, r$0, h]; + } + function fold(f, m, accu){ + /*<>*/ var m$0 = m, accu$0 = accu; + /*<>*/ for(;;){ + if(! m$0) /*<>*/ return accu$0; + /*<>*/ var + r = m$0[4], + d = m$0[3], + v = m$0[2], + l = m$0[1], + /*<>*/ accu$1 = + /*<>*/ caml_call3(f, v, d, fold(f, l, accu$0)), + m$0 = r, + accu$0 = accu$1; + } + /*<>*/ } + function for_all(p, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 1; + /*<>*/ var + r = param$0[4], + d = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ _C_ = + /*<>*/ caml_call2(p, v, d); + /*<>*/ if(_C_){ + /*<>*/ /*<>*/ var + _D_ = for_all(p, l); + /*<>*/ if(_D_){var param$0 = r; continue;} + var _E_ = _D_; + } + else + var _E_ = _C_; + /*<>*/ return _E_; + } + } + function exists(p, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + r = param$0[4], + d = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ _z_ = + /*<>*/ caml_call2(p, v, d); + /*<>*/ if(_z_) + var _A_ = _z_; + else{ + /*<>*/ /*<>*/ var + _B_ = exists(p, l); + /*<>*/ if(! _B_){var param$0 = r; continue;} + var _A_ = _B_; + } + /*<>*/ return _A_; + } + } + function add_min_binding(k, x, param){ + /*<>*/ if(! param) /*<>*/ return singleton(k, x); + var r = param[4], d = param[3], v = param[2], l = param[1]; + /*<>*/ return bal(add_min_binding(k, x, l), v, d, r); + } + function add_max_binding(k, x, param){ + /*<>*/ if(! param) /*<>*/ return singleton(k, x); + var r = param[4], d = param[3], v = param[2], l = param[1]; + /*<>*/ return bal(l, v, d, add_max_binding(k, x, r)); + } + function join(l, v, d, r){ + /*<>*/ if(! l) + /*<>*/ return add_min_binding(v, d, r); + if(! r) /*<>*/ return add_max_binding(v, d, l); + var + rh = r[5], + rr = r[4], + rd = r[3], + rv = r[2], + rl = r[1], + lh = l[5], + lr = l[4], + ld = l[3], + lv = l[2], + ll = l[1]; + return (rh + 2 | 0) < lh + ? bal(ll, lv, ld, join(lr, v, d, r)) + : (lh + + 2 + | 0) + < rh + ? bal(join(l, v, d, rl), rv, rd, rr) + : create(l, v, d, r); + /*<>*/ } + function concat(t1, t2){ + /*<>*/ if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ var + /*<>*/ match = min_binding(t2), + d = match[2], + x = match[1]; + /*<>*/ return join(t1, x, d, remove_min_binding(t2)); + /*<>*/ } + function concat_or_join(t1, v, d, t2){ + /*<>*/ if(! d) + /*<>*/ return concat(t1, t2); + var d$0 = d[1]; + /*<>*/ return join(t1, v, d$0, t2); + /*<>*/ } + function split(x, param){ + /*<>*/ if(! param) /*<>*/ return _a_; + /*<>*/ var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return [0, l, [0, d], r]; + if(0 <= c){ + /*<>*/ var + /*<>*/ match = split(x, r), + rr = match[3], + pres = match[2], + lr = match[1]; + /*<>*/ return [0, join(l, v, d, lr), pres, rr]; + } + /*<>*/ var + /*<>*/ match$0 = split(x, l), + rl = match$0[3], + pres$0 = match$0[2], + ll = match$0[1]; + /*<>*/ return [0, ll, pres$0, join(rl, v, d, r)]; + } + function merge(f, s1, s2){ + /*<>*/ if(s1){ + var h1 = s1[5], r1 = s1[4], d1 = s1[3], v1 = s1[2], l1 = s1[1]; + if(height(s2) <= h1){ + /*<>*/ var + /*<>*/ match = split(v1, s2), + r2 = match[3], + d2 = match[2], + l2 = match[1], + /*<>*/ _v_ = merge(f, r1, r2), + /*<>*/ _w_ = + /*<>*/ caml_call3(f, v1, [0, d1], d2); + /*<>*/ return concat_or_join + (merge(f, l1, l2), v1, _w_, _v_); + } + } + else if(! s2) /*<>*/ return 0; + if(! s2) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + /*<>*/ var + r2$0 = s2[4], + d2$0 = s2[3], + v2 = s2[2], + l2$0 = s2[1], + /*<>*/ match$0 = split(v2, s1), + r1$0 = match$0[3], + d1$0 = match$0[2], + l1$0 = match$0[1], + /*<>*/ _x_ = merge(f, r1$0, r2$0), + /*<>*/ _y_ = + /*<>*/ caml_call3(f, v2, d1$0, [0, d2$0]); + /*<>*/ return concat_or_join + (merge(f, l1$0, l2$0), v2, _y_, _x_); + /*<>*/ } + function union(f, s1, s2){ + /*<>*/ if(s1){ + if(s2){ + var + h2 = s2[5], + r2 = s2[4], + d2 = s2[3], + v2 = s2[2], + l2 = s2[1], + h1 = s1[5], + r1 = s1[4], + d1 = s1[3], + v1 = s1[2], + l1 = s1[1]; + if(h2 <= h1){ + /*<>*/ var + /*<>*/ match = split(v1, s2), + r2$0 = match[3], + d2$0 = match[2], + l2$0 = match[1], + /*<>*/ l = union(f, l1, l2$0), + /*<>*/ r = union(f, r1, r2$0); + /*<>*/ if(! d2$0) + /*<>*/ return join(l, v1, d1, r); + var d2$1 = d2$0[1]; + /*<>*/ return concat_or_join + (l, + v1, + /*<>*/ caml_call3(f, v1, d1, d2$1), + r); + } + /*<>*/ var + /*<>*/ match$0 = split(v2, s1), + r1$0 = match$0[3], + d1$0 = match$0[2], + l1$0 = match$0[1], + /*<>*/ l$0 = union(f, l1$0, l2), + /*<>*/ r$0 = union(f, r1$0, r2); + /*<>*/ if(! d1$0) + /*<>*/ return join(l$0, v2, d2, r$0); + var d1$1 = d1$0[1]; + /*<>*/ return concat_or_join + (l$0, + v2, + /*<>*/ caml_call3(f, v2, d1$1, d2), + r$0); + } + var s = s1; + } + else + var s = s2; + /*<>*/ return s; + /*<>*/ } + function filter(p, m){ + /*<>*/ if(! m) /*<>*/ return 0; + /*<>*/ var + r = m[4], + d = m[3], + v = m[2], + l = m[1], + /*<>*/ l$0 = filter(p, l), + /*<>*/ pvd = + /*<>*/ caml_call2(p, v, d), + /*<>*/ r$0 = filter(p, r); + /*<>*/ if(! pvd) + /*<>*/ return concat(l$0, r$0); + if(l === l$0 && r === r$0) /*<>*/ return m; + /*<>*/ return join(l$0, v, d, r$0); + } + function filter_map(f, param){ + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + /*<>*/ l$0 = filter_map(f, l), + /*<>*/ fvd = + /*<>*/ caml_call2(f, v, d), + /*<>*/ r$0 = filter_map(f, r); + /*<>*/ if(! fvd) + /*<>*/ return concat(l$0, r$0); + var d$0 = fvd[1]; + /*<>*/ return join(l$0, v, d$0, r$0); + } + function partition(p, param){ + /*<>*/ if(! param) /*<>*/ return _c_; + /*<>*/ var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + /*<>*/ match = partition(p, l), + lf = match[2], + lt = match[1], + /*<>*/ pvd = + /*<>*/ caml_call2(p, v, d), + /*<>*/ match$0 = partition(p, r), + rf = match$0[2], + rt = match$0[1]; + /*<>*/ if(pvd){ + /*<>*/ /*<>*/ var + _t_ = concat(lf, rf); + /*<>*/ return [0, join(lt, v, d, rt), _t_]; + } + /*<>*/ /*<>*/ var + _u_ = join(lf, v, d, rf); + /*<>*/ return [0, concat(lt, rt), _u_]; + } + function cons_enum(m, e){ + /*<>*/ var m$0 = m, e$0 = e; + /*<>*/ for(;;){ + if(! m$0) /*<>*/ return e$0; + /*<>*/ var + r = m$0[4], + d = m$0[3], + v = m$0[2], + l = m$0[1], + /*<>*/ e$1 = [0, v, d, r, e$0], + m$0 = l, + e$0 = e$1; + } + /*<>*/ } + function compare(cmp, m1, m2){ + /*<>*/ var + /*<>*/ e2$2 = cons_enum(m2, 0), + /*<>*/ e1$2 = cons_enum(m1, 0), + e1 = e1$2, + e2 = e2$2; + /*<>*/ for(;;){ + if(! e1) return e2 ? -1 : 0; + if(! e2) /*<>*/ return 1; + /*<>*/ var + e2$0 = e2[4], + r2 = e2[3], + d2 = e2[2], + v2 = e2[1], + e1$0 = e1[4], + r1 = e1[3], + d1 = e1[2], + v1 = e1[1], + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], v1, v2); + /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ /*<>*/ var + c$0 = /*<>*/ caml_call2(cmp, d1, d2); + /*<>*/ if(0 !== c$0) + /*<>*/ return c$0; + /*<>*/ var + /*<>*/ e2$1 = cons_enum(r2, e2$0), + /*<>*/ e1$1 = cons_enum(r1, e1$0), + e1 = e1$1, + e2 = e2$1; + } + /*<>*/ } + function equal(cmp, m1, m2){ + /*<>*/ var + /*<>*/ e2$2 = cons_enum(m2, 0), + /*<>*/ e1$2 = cons_enum(m1, 0), + e1 = e1$2, + e2 = e2$2; + /*<>*/ for(;;){ + if(! e1) return e2 ? 0 : 1; + if(! e2) /*<>*/ return 0; + var + e2$0 = e2[4], + r2 = e2[3], + d2 = e2[2], + v2 = e2[1], + e1$0 = e1[4], + r1 = e1[3], + d1 = e1[2], + v1 = e1[1], + _q_ = + 0 === /*<>*/ caml_call2(Ord[1], v1, v2) ? 1 : 0; + if(_q_){ + /*<>*/ /*<>*/ var + _r_ = /*<>*/ caml_call2(cmp, d1, d2); + /*<>*/ if(_r_){ + /*<>*/ var + /*<>*/ e2$1 = cons_enum(r2, e2$0), + /*<>*/ e1$1 = cons_enum(r1, e1$0), + e1 = e1$1, + e2 = e2$1; + continue; + } + var _s_ = _r_; + } + else + var _s_ = _q_; + /*<>*/ return _s_; + } + /*<>*/ } + function cardinal(param){ + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var + r = param[4], + l = param[1], + /*<>*/ _p_ = cardinal(r); + return (cardinal(l) + 1 | 0) + _p_ | 0; + /*<>*/ } + function bindings_aux(accu, param){ + var accu$0 = accu, param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return accu$0; + /*<>*/ var + r = param$0[4], + d = param$0[3], + v = param$0[2], + l = param$0[1], + /*<>*/ accu$1 = + [0, [0, v, d], bindings_aux(accu$0, r)], + accu$0 = accu$1, + param$0 = l; + } + } + function bindings(s){ + /*<>*/ return bindings_aux(0, s); + /*<>*/ } + function add_seq(i, m){ + function _o_(m, param){ + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return add(k, v, m); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Seq[5], _o_, m, i); + /*<>*/ } + function of_seq(i){ + /*<>*/ return add_seq(i, empty); + /*<>*/ } + function seq_of_enum(c, param){ + /*<>*/ if(! c) /*<>*/ return 0; + /*<>*/ var + rest = c[4], + t = c[3], + v = c[2], + k = c[1], + /*<>*/ _m_ = cons_enum(t, rest); + /*<>*/ return [0, + [0, k, v], + function(_n_){ /*<>*/ return seq_of_enum(_m_, _n_);}]; + /*<>*/ } + function to_seq(m){ + /*<>*/ /*<>*/ var + _k_ = cons_enum(m, 0); + /*<>*/ return function(_l_){ + /*<>*/ return seq_of_enum(_k_, _l_);}; + /*<>*/ } + function snoc_enum(s, e){ + /*<>*/ var s$0 = s, e$0 = e; + /*<>*/ for(;;){ + if(! s$0) /*<>*/ return e$0; + /*<>*/ var + r = s$0[4], + d = s$0[3], + v = s$0[2], + l = s$0[1], + /*<>*/ e$1 = [0, v, d, l, e$0], + s$0 = r, + e$0 = e$1; + } + /*<>*/ } + function rev_seq_of_enum(c, param){ + /*<>*/ if(! c) /*<>*/ return 0; + /*<>*/ var + rest = c[4], + t = c[3], + v = c[2], + k = c[1], + /*<>*/ _i_ = snoc_enum(t, rest); + /*<>*/ return [0, + [0, k, v], + function(_j_){ /*<>*/ return rev_seq_of_enum(_i_, _j_);}]; + /*<>*/ } + function to_rev_seq(c){ + /*<>*/ /*<>*/ var + _g_ = snoc_enum(c, 0); + /*<>*/ return function(_h_){ + /*<>*/ return rev_seq_of_enum(_g_, _h_);}; + /*<>*/ } + function to_seq_from(low, m){ + /*<>*/ var m$0 = m, c = 0; + /*<>*/ for(;;){ + if(m$0){ + /*<>*/ var + r = m$0[4], + d = m$0[3], + v = m$0[2], + l = m$0[1], + /*<>*/ n = + /*<>*/ caml_call2(Ord[1], v, low); + if(0 !== n){ + if(0 <= n){ + /*<>*/ var + /*<>*/ c$0 = [0, v, d, r, c], + m$0 = l, + c = c$0; + continue; + } + var m$0 = r; + continue; + } + var _e_ = [0, v, d, r, c]; + } + else + var _e_ = c; + /*<>*/ return function(_f_){ + /*<>*/ return seq_of_enum(_e_, _f_);}; + } + /*<>*/ } + return [0, + empty, + is_empty, + mem, + add, + update, + singleton, + remove, + merge, + union, + compare, + equal, + iter, + fold, + for_all, + exists, + filter, + filter_map, + partition, + cardinal, + bindings, + min_binding, + min_binding_opt, + max_binding, + max_binding_opt, + min_binding, + min_binding_opt, + split, + find, + find_opt, + find_first, + find_first_opt, + find_last, + find_last_opt, + map, + mapi, + to_seq, + to_rev_seq, + to_seq_from, + add_seq, + of_seq]; + }]; + runtime.caml_register_global(11, Stdlib_Map, "Stdlib__Map"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Stack +//# unitInfo: Requires: Stdlib__List, Stdlib__Seq +(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 + global_data = runtime.caml_get_global_data(), + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_List = global_data.Stdlib__List, + /*<>*/ Empty = + [248, "Stdlib.Stack.Empty", runtime.caml_fresh_oo_id(0)]; + function create(param){ + /*<>*/ return [0, 0, 0]; + /*<>*/ } + function clear(s){ + /*<>*/ s[1] = 0; + s[2] = 0; + return 0; + /*<>*/ } + function copy(s){ + /*<>*/ return [0, s[1], s[2]]; + /*<>*/ } + function push(x, s){ + /*<>*/ s[1] = [0, x, s[1]]; + s[2] = s[2] + 1 | 0; + return 0; + /*<>*/ } + function pop(s){ + /*<>*/ var match = s[1]; + if(! match) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Empty, 1); + var tl = match[2], hd = match[1]; + s[1] = tl; + s[2] = s[2] - 1 | 0; + /*<>*/ return hd; + /*<>*/ } + function pop_opt(s){ + /*<>*/ var match = s[1]; + if(! match) /*<>*/ return 0; + var tl = match[2], hd = match[1]; + s[1] = tl; + s[2] = s[2] - 1 | 0; + /*<>*/ return [0, hd]; + /*<>*/ } + function top(s){ + /*<>*/ var match = s[1]; + if(! match) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Empty, 1); + var hd = match[1]; + /*<>*/ return hd; + /*<>*/ } + function top_opt(s){ + /*<>*/ var match = s[1]; + if(! match) /*<>*/ return 0; + var hd = match[1]; + /*<>*/ return [0, hd]; + /*<>*/ } + function is_empty(s){ + /*<>*/ return 0 === s[1] ? 1 : 0; + /*<>*/ } + function length(s){ + /*<>*/ return s[2]; + /*<>*/ } + function iter(f, s){ + /*<>*/ return caml_call2(Stdlib_List[17], f, s[1]); + /*<>*/ } + function fold(f, acc, s){ + /*<>*/ return caml_call3(Stdlib_List[25], f, acc, s[1]); + /*<>*/ } + function to_seq(s){ + /*<>*/ return caml_call1(Stdlib_List[61], s[1]); + /*<>*/ } + function add_seq(q, i){ + function _a_(x){ + /*<>*/ return push(x, q); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[4], _a_, i); + /*<>*/ } + function of_seq(g){ + /*<>*/ /*<>*/ var s = create(0); + /*<>*/ add_seq(s, g); + /*<>*/ return s; + /*<>*/ } + var + Stdlib_Stack = + [0, + Empty, + create, + push, + pop, + pop_opt, + top, + top_opt, + clear, + copy, + is_empty, + length, + iter, + fold, + to_seq, + add_seq, + of_seq]; + runtime.caml_register_global(3, Stdlib_Stack, "Stdlib__Stack"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Queue +//# unitInfo: Requires: Stdlib__Seq +(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 + global_data = runtime.caml_get_global_data(), + Stdlib_Seq = global_data.Stdlib__Seq, + /*<>*/ Empty = + [248, "Stdlib.Queue.Empty", runtime.caml_fresh_oo_id(0)]; + function create(param){ + /*<>*/ return [0, 0, 0, 0]; + /*<>*/ } + function clear(q){ + /*<>*/ q[1] = 0; + q[2] = 0; + q[3] = 0; + return 0; + /*<>*/ } + function add(x, q){ + /*<>*/ var + /*<>*/ cell = [0, x, 0], + /*<>*/ match = q[3]; + return match + ? (q[1] = q[1] + 1 | 0, match[2] = cell, q[3] = cell, 0) + : (q[1] = 1, q[2] = cell, q[3] = cell, 0); + /*<>*/ } + function peek(q){ + /*<>*/ var match = q[2]; + if(! match) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Empty, 1); + var content = match[1]; + /*<>*/ return content; + /*<>*/ } + function peek_opt(q){ + /*<>*/ var match = q[2]; + if(! match) /*<>*/ return 0; + var content = match[1]; + /*<>*/ return [0, content]; + /*<>*/ } + function take(q){ + /*<>*/ var _g_ = q[2]; + if(! _g_) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Empty, 1); + var content = _g_[1]; + if(_g_[2]){ + var next = _g_[2]; + q[1] = q[1] - 1 | 0; + q[2] = next; + /*<>*/ return content; + } + /*<>*/ clear(q); + /*<>*/ return content; + /*<>*/ } + function take_opt(q){ + /*<>*/ var _f_ = q[2]; + if(! _f_) /*<>*/ return 0; + var content = _f_[1]; + if(_f_[2]){ + var next = _f_[2]; + q[1] = q[1] - 1 | 0; + q[2] = next; + /*<>*/ return [0, content]; + } + /*<>*/ clear(q); + /*<>*/ return [0, content]; + /*<>*/ } + function copy(q){ + /*<>*/ var + cell$0 = q[2], + /*<>*/ q_res = [0, q[1], 0, 0], + prev = 0, + cell = cell$0; + /*<>*/ for(;;){ + if(! cell){q_res[3] = prev; /*<>*/ return q_res;} + /*<>*/ var + content = cell[1], + next = cell[2], + /*<>*/ prev$0 = [0, content, 0]; + /*<>*/ if(prev) + prev[2] = prev$0; + else + q_res[2] = prev$0; + var prev = prev$0, cell = next; + } + /*<>*/ } + function is_empty(q){ + /*<>*/ return 0 === q[1] ? 1 : 0; + /*<>*/ } + function length(q){ + /*<>*/ return q[1]; + /*<>*/ } + function iter(f, q){ + /*<>*/ var cell$0 = q[2], cell = cell$0; + /*<>*/ for(;;){ + if(! cell) /*<>*/ return 0; + var content = cell[1], next = cell[2]; + /*<>*/ /*<>*/ caml_call1(f, content); + var cell = next; + } + /*<>*/ } + function fold(f, accu$1, q){ + /*<>*/ var cell$0 = q[2], accu = accu$1, cell = cell$0; + /*<>*/ for(;;){ + if(! cell) /*<>*/ return accu; + /*<>*/ var + content = cell[1], + next = cell[2], + /*<>*/ accu$0 = + /*<>*/ caml_call2(f, accu, content), + accu = accu$0, + cell = next; + } + /*<>*/ } + function transfer(q1, q2){ + /*<>*/ var _e_ = 0 < q1[1] ? 1 : 0; + if(! _e_) return _e_; + var match = q2[3]; + return match + ? (q2 + [1] + = q2[1] + q1[1] | 0, + match[2] = q1[2], + q2[3] = q1[3], + clear(q1)) + : (q2[1] = q1[1], q2[2] = q1[2], q2[3] = q1[3], clear(q1)); + /*<>*/ } + function to_seq(q){ + /*<>*/ function aux(c, param){ + /*<>*/ if(! c) /*<>*/ return 0; + var x = c[1], next = c[2]; + /*<>*/ return [0, + x, + function(_d_){ /*<>*/ return aux(next, _d_);}]; + /*<>*/ } + var _b_ = q[2]; + /*<>*/ return function(_c_){ + /*<>*/ return aux(_b_, _c_);}; + /*<>*/ } + function add_seq(q, i){ + function _a_(x){ + /*<>*/ return add(x, q); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[4], _a_, i); + /*<>*/ } + function of_seq(g){ + /*<>*/ /*<>*/ var q = create(0); + /*<>*/ add_seq(q, g); + /*<>*/ return q; + /*<>*/ } + var + Stdlib_Queue = + [0, + Empty, + create, + add, + add, + take, + take_opt, + take, + peek, + peek_opt, + peek, + clear, + copy, + is_empty, + length, + iter, + fold, + transfer, + to_seq, + add_seq, + of_seq]; + runtime.caml_register_global(2, Stdlib_Queue, "Stdlib__Queue"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Buffer +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Bytes, Stdlib__Seq, Stdlib__String, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_blit_string = runtime.caml_blit_string, + 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, + caml_int64_bswap = runtime.caml_int64_bswap, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_bytes_length = runtime.caml_ml_bytes_length, + 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_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, + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib = global_data.Stdlib, + Stdlib_String = global_data.Stdlib__String, + Assert_failure = global_data.Assert_failure, + cst_Buffer_truncate = "Buffer.truncate", + _a_ = [0, "buffer.ml", 220, 9], + cst_Buffer_add_channel = "Buffer.add_channel", + cst_Buffer_add_substring_add_s = "Buffer.add_substring/add_subbytes", + cst_Buffer_add_cannot_grow_buf = "Buffer.add: cannot grow buffer", + cst_Buffer_nth = "Buffer.nth", + cst_Buffer_blit = "Buffer.blit", + cst_Buffer_sub = "Buffer.sub"; + function create(n){ + /*<>*/ var + n$0 = 1 <= n ? n : 1, + n$1 = Stdlib_Sys[12] < n$0 ? Stdlib_Sys[12] : n$0, + /*<>*/ s = + /*<>*/ caml_create_bytes(n$1); + /*<>*/ return [0, [0, s, n$1], 0, s]; + /*<>*/ } + function contents(b){ + /*<>*/ return caml_call3 + (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]); + /*<>*/ } + 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); + /*<>*/ } + function blit(src, srcoff, dst, dstoff, len){ + /*<>*/ if + (0 <= len + && + 0 <= srcoff + && + (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); + /*<>*/ } + function nth(b, ofs){ + /*<>*/ var + position = b[2], + /*<>*/ match = b[1], + length = match[2], + buffer = match[1]; + if(0 <= ofs && position > ofs && length >= position) + return runtime.caml_bytes_unsafe_get(buffer, ofs); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Buffer_nth); + /*<>*/ } + function length(b){ + /*<>*/ return b[2]; + /*<>*/ } + function clear(b){ + /*<>*/ b[2] = 0; + return 0; + /*<>*/ } + function reset(b){ + /*<>*/ b[2] = 0; + /*<>*/ /*<>*/ var + inner = [0, b[3], caml_ml_bytes_length(b[3])]; + b[1] = inner; + return 0; + /*<>*/ } + function resize(b, more){ + /*<>*/ var + old_pos = b[2], + old_len = b[1][2], + /*<>*/ new_len = [0, old_len]; + for(;;){ + if(new_len[1] >= (old_pos + more | 0)){ + if(Stdlib_Sys[12] < new_len[1]) + 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); + /*<>*/ /*<>*/ var + new_buffer = /*<>*/ caml_create_bytes(new_len[1]); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Bytes[11], b[1][1], 0, new_buffer, 0, b[2]); + b[1] = [0, new_buffer, new_len[1]]; + return 0; + } + new_len[1] = 2 * new_len[1] | 0; + } + /*<>*/ } + function add_char(b, c){ + /*<>*/ var + pos = b[2], + /*<>*/ match = b[1], + length = match[2], + buffer = match[1]; + if(length <= pos){ + /*<>*/ resize(b, 1); + /*<>*/ /*<>*/ caml_bytes_set + (b[1][1], b[2], c); + } + else + caml_bytes_unsafe_set(buffer, pos, c); + b[2] = pos + 1 | 0; + return 0; + /*<>*/ } + var uchar_utf_8_byte_length_max = 4, uchar_utf_16_byte_length_max = 4; + function add_utf_8_uchar(b, u){ + /*<>*/ for(;;){ + 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); + /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} + /*<>*/ resize(b, uchar_utf_8_byte_length_max); + } + /*<>*/ } + function add_utf_16be_uchar(b, u){ + /*<>*/ for(;;){ + 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); + /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} + /*<>*/ resize(b, uchar_utf_16_byte_length_max); + } + /*<>*/ } + function add_utf_16le_uchar(b, u){ + /*<>*/ for(;;){ + 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); + /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} + /*<>*/ resize(b, uchar_utf_16_byte_length_max); + } + /*<>*/ } + function add_substring(b, s, offset, len){ + /*<>*/ var _r_ = offset < 0 ? 1 : 0; + if(_r_) + var _s_ = _r_; + else + var + _t_ = len < 0 ? 1 : 0, + _s_ = _t_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); + if(_s_) + /*<>*/ /*<>*/ caml_call1 + (Stdlib[1], cst_Buffer_add_substring_add_s); + /*<>*/ var + position = b[2], + /*<>*/ match = b[1], + length = match[2], + buffer = match[1], + 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); + } + else + /*<>*/ /*<>*/ caml_blit_string + (s, offset, buffer, position, len); + b[2] = new_position; + return 0; + /*<>*/ } + function add_subbytes(b, s, offset, len){ + /*<>*/ return add_substring + (b, + /*<>*/ caml_call1(Stdlib_Bytes[44], s), + offset, + len); + /*<>*/ } + function add_string(b, s){ + /*<>*/ var + len = caml_ml_string_length(s), + /*<>*/ position = b[2], + /*<>*/ match = b[1], + length = match[2], + buffer = match[1], + new_position = b[2] + len | 0; + if(length < new_position){ + /*<>*/ resize(b, len); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Bytes[12], s, 0, b[1][1], b[2], len); + } + else + /*<>*/ /*<>*/ caml_blit_string + (s, 0, buffer, position, len); + b[2] = new_position; + return 0; + /*<>*/ } + function add_bytes(b, s){ + /*<>*/ return add_string + (b, /*<>*/ caml_call1(Stdlib_Bytes[44], s)); + /*<>*/ } + function add_buffer(b, bs){ + /*<>*/ return add_subbytes(b, bs[1][1], 0, bs[2]); + /*<>*/ } + function add_channel(b, ic, to_read$1){ + /*<>*/ var + _p_ = to_read$1 < 0 ? 1 : 0, + _q_ = _p_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); + if(_q_) + /*<>*/ /*<>*/ caml_call1 + (Stdlib[1], cst_Buffer_add_channel); + if(b[1][2] < (b[2] + to_read$1 | 0)) + /*<>*/ resize(b, to_read$1); + var + ofs$1 = b[2], + buf = b[1][1], + already_read = 0, + ofs = ofs$1, + to_read = to_read$1; + /*<>*/ for(;;){ + if(0 !== to_read){ + /*<>*/ /*<>*/ var + r = + /*<>*/ caml_call4 + (Stdlib[84], ic, buf, ofs, to_read); + /*<>*/ if(0 !== r){ + var + already_read$0 = already_read + r | 0, + ofs$0 = ofs + r | 0, + to_read$0 = to_read - r | 0, + already_read = already_read$0, + ofs = ofs$0, + to_read = to_read$0; + continue; + } + } + b[2] = b[2] + already_read | 0; + if(already_read < to_read$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[12], 1); + /*<>*/ return 0; + } + /*<>*/ } + function output_buffer(oc, b){ + /*<>*/ return caml_call4 + (Stdlib[68], oc, b[1][1], 0, b[2]); + /*<>*/ } + function add_substitute(b, f, s){ + /*<>*/ var + lim$1 = caml_ml_string_length(s), + previous = 32, + i$4 = 0; + /*<>*/ for(;;){ + if(i$4 >= lim$1){ + var _o_ = 92 === previous ? 1 : 0; + return _o_ ? add_char(b, previous) : _o_; + } + /*<>*/ /*<>*/ var + previous$0 = /*<>*/ caml_string_get(s, i$4); + if(36 === previous$0) + if(92 === previous){ + /*<>*/ add_char(b, previous$0); + /*<>*/ var + /*<>*/ i$5 = i$4 + 1 | 0, + previous = 32, + i$4 = i$5; + } + else{ + /*<>*/ /*<>*/ var + start$0 = i$4 + 1 | 0; + if(lim$1 <= start$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + /*<>*/ /*<>*/ var + opening = /*<>*/ caml_string_get(s, start$0); + a: + { + if(40 !== opening && 123 !== opening){ + /*<>*/ var + /*<>*/ start = start$0 + 1 | 0, + lim$0 = caml_ml_string_length(s), + i$2 = start; + /*<>*/ for(;;){ + b: + { + if(lim$0 > i$2){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_string_get(s, i$2); + c: + { + if(91 <= match){ + if(97 <= match){ + if(123 > match) break c; + } + else if(95 === match) break c; + } + else + if(58 <= match){ + if(65 <= match) break c; + } + else if(48 <= match) break c; + var stop$0 = i$2; + break b; + } + var i$3 = i$2 + 1 | 0, i$2 = i$3; + continue; + } + var stop$0 = lim$0; + } + var + match$0 = + [0, + /*<>*/ caml_call3 + (Stdlib_String[15], s, start$0, stop$0 - start$0 | 0), + stop$0]; + break a; + } + } + /*<>*/ var + /*<>*/ new_start = start$0 + 1 | 0, + k$2 = 0; + if(40 === opening) + var closing = 41; + else{ + if(123 !== opening) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); + var closing = 125; + } + var lim = caml_ml_string_length(s), k = k$2, stop = new_start; + /*<>*/ for(;;){ + if(lim <= stop) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + if( /*<>*/ caml_string_get(s, stop) === opening) + var i = stop + 1 | 0, k$0 = k + 1 | 0, k = k$0, stop = i; + else if + ( /*<>*/ caml_string_get(s, stop) === closing){ + if(0 === k){ + var + match$0 = + [0, + /*<>*/ caml_call3 + (Stdlib_String[15], + s, + new_start, + (stop - start$0 | 0) - 1 | 0), + stop + 1 | 0]; + break; + } + var i$0 = stop + 1 | 0, k$1 = k - 1 | 0, k = k$1, stop = i$0; + } + else + var i$1 = stop + 1 | 0, stop = i$1; + } + } + var next_i = match$0[2], ident = match$0[1]; + /*<>*/ add_string + (b, /*<>*/ caml_call1(f, ident)); + var previous = 32, i$4 = next_i; + } + else if(92 === previous){ + /*<>*/ add_char(b, 92); + /*<>*/ add_char(b, previous$0); + /*<>*/ var + /*<>*/ i$6 = i$4 + 1 | 0, + previous = 32, + i$4 = i$6; + } + else if(92 === previous$0) + /*<>*/ var + /*<>*/ i$7 = i$4 + 1 | 0, + previous = previous$0, + i$4 = i$7; + else{ + /*<>*/ add_char(b, previous$0); + /*<>*/ var + /*<>*/ i$8 = i$4 + 1 | 0, + previous = previous$0, + i$4 = i$8; + } + } + /*<>*/ } + function truncate(b, len){ + /*<>*/ if(0 <= len && b[2] >= len){b[2] = len; return 0;} + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Buffer_truncate); + /*<>*/ } + function to_seq(b){ + function aux(i, param){ + /*<>*/ if(b[2] <= i) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = + /*<>*/ caml_bytes_get(b[1][1], i), + /*<>*/ _m_ = i + 1 | 0; + /*<>*/ return [0, + x, + function(_n_){ /*<>*/ return aux(_m_, _n_);}]; + /*<>*/ } + /*<>*/ /*<>*/ var _k_ = 0; + /*<>*/ return function(_l_){ + /*<>*/ return aux(_k_, _l_);}; + /*<>*/ } + function to_seqi(b){ + function aux(i, param){ + /*<>*/ if(b[2] <= i) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = + /*<>*/ caml_bytes_get(b[1][1], i), + /*<>*/ _i_ = i + 1 | 0; + /*<>*/ return [0, + [0, i, x], + function(_j_){ /*<>*/ return aux(_i_, _j_);}]; + /*<>*/ } + /*<>*/ /*<>*/ var _g_ = 0; + /*<>*/ return function(_h_){ + /*<>*/ return aux(_g_, _h_);}; + /*<>*/ } + function add_seq(b, seq){ + /*<>*/ function _e_(_f_){ + /*<>*/ return add_char(b, _f_); + } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[4], _e_, seq); + /*<>*/ } + function of_seq(i){ + /*<>*/ /*<>*/ var b = create(32); + /*<>*/ add_seq(b, i); + /*<>*/ return b; + /*<>*/ } + function add_int8(b, x){ + /*<>*/ var + position = b[2], + /*<>*/ match = b[1], + length = match[2], + buffer = match[1], + /*<>*/ new_position = position + 1 | 0; + if(length < new_position){ + /*<>*/ resize(b, 1); + /*<>*/ /*<>*/ caml_bytes_set + (b[1][1], b[2], x); + } + else + caml_bytes_unsafe_set(buffer, position, x); + b[2] = new_position; + return 0; + /*<>*/ } + function add_int16_ne(b, x){ + /*<>*/ var + position = b[2], + /*<>*/ match = b[1], + length = match[2], + buffer = match[1], + /*<>*/ new_position = position + 2 | 0; + if(length < new_position){ + /*<>*/ resize(b, 2); + /*<>*/ /*<>*/ caml_bytes_set16 + (b[1][1], b[2], x); + } + else + /*<>*/ /*<>*/ caml_bytes_set16 + (buffer, position, x); + b[2] = new_position; + return 0; + /*<>*/ } + function add_int32_ne(b, x){ + /*<>*/ var + position = b[2], + /*<>*/ match = b[1], + length = match[2], + buffer = match[1], + /*<>*/ new_position = position + 4 | 0; + if(length < new_position){ + /*<>*/ resize(b, 4); + /*<>*/ /*<>*/ caml_bytes_set32 + (b[1][1], b[2], x); + } + else + /*<>*/ /*<>*/ caml_bytes_set32 + (buffer, position, x); + b[2] = new_position; + return 0; + /*<>*/ } + function add_int64_ne(b, x){ + /*<>*/ var + position = b[2], + /*<>*/ match = b[1], + length = match[2], + buffer = match[1], + /*<>*/ new_position = position + 8 | 0; + if(length < new_position){ + /*<>*/ resize(b, 8); + /*<>*/ /*<>*/ caml_bytes_set64 + (b[1][1], b[2], x); + } + else + /*<>*/ /*<>*/ caml_bytes_set64 + (buffer, position, x); + b[2] = new_position; + return 0; + /*<>*/ } + function add_int16_le(b, x){ + /*<>*/ var _d_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; + return add_int16_ne(b, _d_); + /*<>*/ } + function add_int16_be(b, x){ + /*<>*/ var x$0 = Stdlib_Sys[11] ? x : caml_bswap16(x); + /*<>*/ return add_int16_ne(b, x$0); + /*<>*/ } + function add_int32_le(b, x){ + /*<>*/ var + _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; + /*<>*/ return add_int32_ne(b, _c_); + /*<>*/ } + function add_int32_be(b, x){ + /*<>*/ var + x$0 = Stdlib_Sys[11] ? x : /*<>*/ caml_int32_bswap(x); + /*<>*/ return add_int32_ne(b, x$0); + /*<>*/ } + function add_int64_le(b, x){ + /*<>*/ var + _b_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; + /*<>*/ return add_int64_ne(b, _b_); + /*<>*/ } + function add_int64_be(b, x){ + /*<>*/ var + x$0 = Stdlib_Sys[11] ? x : /*<>*/ caml_int64_bswap(x); + /*<>*/ return add_int64_ne(b, x$0); + /*<>*/ } + var + Stdlib_Buffer = + [0, + create, + contents, + to_bytes, + sub, + blit, + nth, + length, + clear, + reset, + output_buffer, + truncate, + add_char, + add_utf_8_uchar, + add_utf_16le_uchar, + add_utf_16be_uchar, + add_string, + add_bytes, + add_substring, + add_subbytes, + add_substitute, + add_buffer, + add_channel, + to_seq, + to_seqi, + add_seq, + of_seq, + add_int8, + add_int8, + add_int16_ne, + add_int16_be, + add_int16_le, + add_int16_ne, + add_int16_be, + add_int16_le, + add_int32_ne, + add_int32_be, + add_int32_le, + add_int64_ne, + add_int64_be, + add_int64_le]; + runtime.caml_register_global(14, Stdlib_Buffer, "Stdlib__Buffer"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Mutex +(function(globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + Stdlib_Mutex = + [0, + runtime.caml_ml_mutex_new, + runtime.caml_ml_mutex_lock, + runtime.caml_ml_mutex_try_lock, + runtime.caml_ml_mutex_unlock]; + runtime.caml_register_global(0, Stdlib_Mutex, "Stdlib__Mutex"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Condition +(function(globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + Stdlib_Condition = + [0, + runtime.caml_ml_condition_new, + runtime.caml_ml_condition_wait, + runtime.caml_ml_condition_signal, + runtime.caml_ml_condition_broadcast]; + runtime.caml_register_global(0, Stdlib_Condition, "Stdlib__Condition"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Semaphore +//# unitInfo: Requires: Stdlib, Stdlib__Condition, Stdlib__Mutex +(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 + global_data = runtime.caml_get_global_data(), + Stdlib_Mutex = global_data.Stdlib__Mutex, + Stdlib_Condition = global_data.Stdlib__Condition, + Stdlib = global_data.Stdlib, + cst_Semaphore_Counting_release = "Semaphore.Counting.release: overflow", + cst_Semaphore_Counting_init_wr = + "Semaphore.Counting.init: wrong initial value"; + 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_]; + /*<>*/ } + function release(s){ + /*<>*/ /*<>*/ caml_call1 + (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]); + } + /*<>*/ /*<>*/ caml_call1 + (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]); + /*<>*/ for(;;){ + if(0 !== s[2]){ + s[2] = s[2] - 1 | 0; + return caml_call1(Stdlib_Mutex[4], s[1]); + } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Condition[2], s[3], s[1]); + } + /*<>*/ } + function try_acquire(s){ + /*<>*/ /*<>*/ caml_call1 + (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]); + /*<>*/ return ret; + /*<>*/ } + function get_value(s){ + /*<>*/ return s[2]; + /*<>*/ } + /*<>*/ /*<>*/ var + Counting = [0, make, release, acquire, try_acquire, get_value]; + function make$0(b){ + /*<>*/ var + /*<>*/ _a_ = + /*<>*/ caml_call1(Stdlib_Condition[1], 0), + _b_ = b ? 1 : 0; + /*<>*/ return [0, + /*<>*/ caml_call1(Stdlib_Mutex[1], 0), + _b_, + _a_]; + /*<>*/ } + function release$0(s){ + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Mutex[2], s[1]); + s[2] = 1; + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Condition[3], s[3]); + return caml_call1(Stdlib_Mutex[4], s[1]); + /*<>*/ } + function acquire$0(s){ + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Mutex[2], s[1]); + /*<>*/ for(;;){ + if(0 !== s[2]){s[2] = 0; return caml_call1(Stdlib_Mutex[4], s[1]);} + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Condition[2], s[3], s[1]); + } + /*<>*/ } + function try_acquire$0(s){ + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Mutex[2], s[1]); + var ret = 0 === s[2] ? 0 : (s[2] = 0, 1); + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Mutex[4], s[1]); + /*<>*/ return ret; + /*<>*/ } + /*<>*/ var + /*<>*/ Binary = + [0, make$0, release$0, acquire$0, try_acquire$0], + Stdlib_Semaphore = [0, Counting, Binary]; + runtime.caml_register_global(5, Stdlib_Semaphore, "Stdlib__Semaphore"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Domain +//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Atomic, Stdlib__Condition, Stdlib__List, Stdlib__Mutex +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_check_bound = runtime.caml_check_bound, + caml_domain_dls_set = runtime.caml_domain_dls_set, + caml_make_vect = runtime.caml_make_vect, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_domain_id = runtime.caml_ml_domain_id, + 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) + : 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 + global_data = runtime.caml_get_global_data(), + Stdlib_Mutex = global_data.Stdlib__Mutex, + Stdlib_Condition = global_data.Stdlib__Condition, + Stdlib = global_data.Stdlib, + Stdlib_Atomic = global_data.Stdlib__Atomic, + Stdlib_List = global_data.Stdlib__List, + Stdlib_Array = global_data.Stdlib__Array, + cst_internal_error_Am_I_alread = "internal error: Am I already finished?", + cst_first_domain_already_spawn = "first domain already spawned"; + function cpu_relax(param){ + /*<>*/ return /*<>*/ runtime.caml_ml_domain_cpu_relax + (0); + /*<>*/ } + /*<>*/ /*<>*/ var + unique_value = [0, 0]; + function create_dls(param){ + /*<>*/ /*<>*/ var + st = /*<>*/ caml_make_vect(8, unique_value); + /*<>*/ return /*<>*/ caml_domain_dls_set + (st); + /*<>*/ } + /*<>*/ create_dls(0); + /*<>*/ var + /*<>*/ key_counter = + /*<>*/ caml_call1(Stdlib_Atomic[1], 0), + /*<>*/ parent_keys = + /*<>*/ caml_call1(Stdlib_Atomic[1], 0); + function new_key(split_from_parent, init_orphan){ + /*<>*/ var + /*<>*/ idx = + /*<>*/ caml_call2(Stdlib_Atomic[6], 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[2], parent_keys); + if + (! + (1 + - + /*<>*/ caml_call3 + (Stdlib_Atomic[5], parent_keys, l, [0, ki, l]))) + break; + } + } + /*<>*/ return k; + /*<>*/ } + function maybe_grow(idx){ + /*<>*/ var + st = runtime.caml_domain_dls_get(0), + /*<>*/ sz = st.length - 1; + if(idx < sz) /*<>*/ return st; + var new_sz = sz; + /*<>*/ for(;;){ + if(idx < new_sz){ + /*<>*/ /*<>*/ var + new_st = /*<>*/ caml_make_vect(new_sz, unique_value); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Array[8], st, 0, new_st, 0, sz); + /*<>*/ /*<>*/ caml_domain_dls_set + (new_st); + /*<>*/ return new_st; + } + var s = 2 * new_sz | 0, new_sz = s; + } + /*<>*/ } + function set(param, x){ + /*<>*/ var + idx = param[1], + /*<>*/ st = maybe_grow(idx); + /*<>*/ caml_check_bound(st, idx)[1 + idx] = x; + /*<>*/ return 0; + } + function get(param){ + /*<>*/ var + init = param[2], + idx = param[1], + /*<>*/ st = maybe_grow(idx), + /*<>*/ v = caml_check_bound(st, idx)[1 + idx]; + if(v !== unique_value) /*<>*/ return v; + /*<>*/ /*<>*/ var + v$0 = /*<>*/ caml_call1(init, 0); + /*<>*/ caml_check_bound(st, idx)[1 + idx] = v$0; + /*<>*/ return v$0; + } + function get_id(param){ + var domain = param[1]; + /*<>*/ return domain; + } + function self(param){ + /*<>*/ return /*<>*/ caml_ml_domain_id + (0); + /*<>*/ } + function is_main_domain(param){ + /*<>*/ return 0 + === /*<>*/ caml_ml_domain_id(0) + ? 1 + : 0; + /*<>*/ } + /*<>*/ var + /*<>*/ first_domain_spawned = + /*<>*/ caml_call1(Stdlib_Atomic[1], 0), + /*<>*/ first_spawn_function = + [0, + function(param){ + /*<>*/ return 0; + /*<>*/ }]; + function before_first_spawn(f){ + /*<>*/ if + ( /*<>*/ caml_call1 + (Stdlib_Atomic[2], first_domain_spawned)) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stdlib[6], cst_first_domain_already_spawn], 1); + var old_f = first_spawn_function[1]; + function new_f(param){ + /*<>*/ /*<>*/ caml_call1(old_f, 0); + /*<>*/ return /*<>*/ caml_call1 + (f, 0); + /*<>*/ } + first_spawn_function[1] = new_f; + return 0; + /*<>*/ } + /*<>*/ /*<>*/ var + at_exit_key = + new_key + (0, + function(param, _e_){ + /*<>*/ return 0; + /*<>*/ }); + function at_exit(f){ + /*<>*/ /*<>*/ var + old_exit = get(at_exit_key); + function new_exit(param){ + /*<>*/ /*<>*/ caml_call1(f, 0); + /*<>*/ return /*<>*/ caml_call1 + (old_exit, 0); + /*<>*/ } + /*<>*/ return set(at_exit_key, new_exit); + /*<>*/ } + function do_at_exit(param){ + /*<>*/ /*<>*/ var + f = get(at_exit_key); + /*<>*/ return /*<>*/ caml_call1(f, 0); + /*<>*/ } + Stdlib[104][1] = do_at_exit; + function spawn(f){ + /*<>*/ if + (1 + - + /*<>*/ caml_call1 + (Stdlib_Atomic[2], first_domain_spawned)){ + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Atomic[3], first_domain_spawned, 1); + /*<>*/ /*<>*/ caml_call1 + (first_spawn_function[1], 0); + first_spawn_function[1] = + function(param){ + /*<>*/ return 0; + /*<>*/ }; + } + /*<>*/ /*<>*/ var + _a_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); + function _b_(param){ + /*<>*/ var split = param[2], k = param[1], idx = k[1]; + /*<>*/ return [0, + idx, + /*<>*/ caml_call1(split, get(k))]; + /*<>*/ } + /*<>*/ var + /*<>*/ pk = + /*<>*/ caml_call2(Stdlib_List[19], _b_, _a_), + /*<>*/ term_mutex = + /*<>*/ caml_call1(Stdlib_Mutex[1], 0), + /*<>*/ term_condition = + /*<>*/ caml_call1(Stdlib_Condition[1], 0), + /*<>*/ term_state = [0, 0]; + function body(param){ + /*<>*/ a: + { + /*<>*/ try{ + /*<>*/ create_dls(0); + var + _c_ = + function(param){ + /*<>*/ var + v = param[2], + idx = param[1], + /*<>*/ st = maybe_grow(idx); + /*<>*/ caml_check_bound(st, idx)[1 + idx] = v; + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ /*<>*/ caml_call2 + (Stdlib_List[17], _c_, pk); + /*<>*/ /*<>*/ var + res = /*<>*/ caml_call1(f, 0); + } + catch(ex$0){ + var ex = caml_wrap_exception(ex$0), result = [1, ex]; + break a; + } + var result = [0, res]; + } + /*<>*/ try{ + /*<>*/ do_at_exit(0); + var result$0 = result; + } + catch(ex){ + /*<>*/ var + ex$0 = caml_wrap_exception(ex), + /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, + result$0 = _d_; + } + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Mutex[2], term_mutex); + return term_state[1] + ? /*<>*/ caml_call1 + (Stdlib[2], cst_internal_error_Am_I_alread) + : (term_state + [1] + = [0, result$0], + /*<>*/ caml_call1 + (Stdlib_Condition[4], term_condition)); + /*<>*/ } + /*<>*/ return [0, + /*<>*/ runtime.caml_domain_spawn + (body, term_mutex), + term_mutex, + term_condition, + term_state]; + /*<>*/ } + function join(param){ + var + term_state = param[4], + term_condition = param[3], + term_mutex = param[2]; + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Mutex[2], term_mutex); + /*<>*/ for(;;){ + var match = term_state[1]; + if(match){ + var res = match[1]; + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Mutex[4], term_mutex); + if(0 === res[0]){var x = res[1]; /*<>*/ return x;} + var ex = res[1]; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (ex, 1); + } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Condition[2], term_condition, term_mutex); + } + } + var + recommended_domain_count = runtime.caml_recommended_domain_count, + Stdlib_Domain = + [0, + spawn, + join, + get_id, + self, + before_first_spawn, + at_exit, + cpu_relax, + is_main_domain, + recommended_domain_count, + [0, new_key, get, set]]; + runtime.caml_register_global(8, Stdlib_Domain, "Stdlib__Domain"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: CamlinternalFormat +//# unitInfo: Requires: Assert_failure, CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Char, Stdlib__Int, Stdlib__String, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst$43 = "", + cst_and = " and ", + cst_Li$3 = "%Li", + cst_i$3 = "%i", + cst_li$3 = "%li", + cst_ni$3 = "%ni", + cst_u$0 = "%u", + cst$42 = "' '", + cst$41 = "'#'", + cst$39 = "'*'", + cst$40 = "'+'", + cst$44 = ", ", + cst_0$3 = "0", + cst_at_character_number = ": at character number ", + cst$38 = "@[", + cst$37 = "@{", + cst_bad_input_format_type_mism = + "bad input: format type mismatch between ", + cst_bad_input_format_type_mism$0 = + "bad input: format type mismatch between %S and %S", + cst_camlinternalFormat_ml = "camlinternalFormat.ml", + cst_invalid_format = "invalid format ", + cst_precision$3 = "precision", + caml_blit_string = runtime.caml_blit_string, + caml_bytes_set = runtime.caml_bytes_set, + caml_create_bytes = runtime.caml_create_bytes, + caml_format_float = runtime.caml_format_float, + caml_format_int = runtime.caml_format_int, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_notequal = runtime.caml_notequal, + caml_string_get = runtime.caml_string_get, + caml_string_notequal = runtime.caml_string_notequal, + caml_string_unsafe_get = runtime.caml_string_unsafe_get, + 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) + : 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(), + cst$9 = "%{", + cst$10 = "%}", + cst$11 = "%(", + cst$12 = "%)", + cst$13 = "%?", + cst$18 = cst$37, + cst$19 = cst$38, + cst$20 = cst$37, + cst$21 = cst$38, + cst$22 = cst$37, + cst$23 = cst$38, + cst$26 = cst$39, + cst$24 = "'-'", + cst$25 = cst$39, + cst$27 = cst$40, + cst$28 = cst$41, + cst$29 = cst$42, + cst$30 = cst$40, + cst$31 = "'_'", + sub_format = [0, 0, cst$43], + formatting_lit = [0, "@;", 1, 0], + cst$35 = cst$41, + cst$32 = cst$40, + cst$33 = cst$40, + cst$34 = cst$42, + cst$36 = cst$40, + cst$17 = ".", + cst$14 = "%!", + cst$15 = cst$37, + cst$16 = cst$38, + cst$8 = "%%", + cst$0 = "@]", + cst$1 = "@}", + cst$2 = "@?", + cst$3 = "@\n", + cst$4 = "@.", + cst$5 = "@@", + cst$6 = "@%", + cst$7 = "@", + cst = ".*", + Assert_failure = global_data.Assert_failure, + CamlinternalFormatBasics = global_data.CamlinternalFormatBasics, + Stdlib = global_data.Stdlib, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_String = global_data.Stdlib__String, + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib_Char = global_data.Stdlib__Char, + Stdlib_Bytes = global_data.Stdlib__Bytes, + Stdlib_Int = global_data.Stdlib__Int, + cst_c = "%c", + cst_s = "%s", + cst_i = cst_i$3, + cst_li = cst_li$3, + cst_ni = cst_ni$3, + cst_Li = cst_Li$3, + cst_f = "%f", + cst_B = "%B", + cst_a = "%a", + cst_t = "%t", + cst_r = "%r", + cst_r$0 = "%_r", + _b_ = [0, cst_camlinternalFormat_ml, 850, 23], + _m_ = [0, cst_camlinternalFormat_ml, 814, 21], + _e_ = [0, cst_camlinternalFormat_ml, 815, 21], + _n_ = [0, cst_camlinternalFormat_ml, 818, 21], + _f_ = [0, cst_camlinternalFormat_ml, 819, 21], + _o_ = [0, cst_camlinternalFormat_ml, 822, 19], + _g_ = [0, cst_camlinternalFormat_ml, 823, 19], + _p_ = [0, cst_camlinternalFormat_ml, 826, 22], + _h_ = [0, cst_camlinternalFormat_ml, 827, 22], + _q_ = [0, cst_camlinternalFormat_ml, 831, 30], + _i_ = [0, cst_camlinternalFormat_ml, 832, 30], + _k_ = [0, cst_camlinternalFormat_ml, 836, 26], + _c_ = [0, cst_camlinternalFormat_ml, 837, 26], + _l_ = [0, cst_camlinternalFormat_ml, 846, 28], + _d_ = [0, cst_camlinternalFormat_ml, 847, 28], + _j_ = [0, cst_camlinternalFormat_ml, 851, 23], + _s_ = [0, cst_camlinternalFormat_ml, 1558, 4], + cst_Printf_bad_conversion = "Printf: bad conversion %[", + _t_ = [0, cst_camlinternalFormat_ml, 1626, 39], + _u_ = [0, cst_camlinternalFormat_ml, 1649, 31], + _v_ = [0, cst_camlinternalFormat_ml, 1650, 31], + cst_Printf_bad_conversion$0 = "Printf: bad conversion %_", + _w_ = [0, cst_camlinternalFormat_ml, 1830, 8], + ___ = + [0, + [11, cst_bad_input_format_type_mism, [3, 0, [11, cst_and, [3, 0, 0]]]], + cst_bad_input_format_type_mism$0], + _Z_ = + [0, + [11, cst_bad_input_format_type_mism, [3, 0, [11, cst_and, [3, 0, 0]]]], + cst_bad_input_format_type_mism$0], + _C_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, + cst_at_character_number, + [4, 0, 0, 0, [11, ", duplicate flag ", [1, 0]]]]]], + "invalid format %S: at character number %d, duplicate flag %C"], + cst_0 = cst_0$3, + cst_padding = "padding", + _D_ = [0, 1, 0], + _E_ = [0, 0], + cst_precision = cst_precision$3, + _F_ = [1, 0], + _G_ = [1, 1], + cst_0$2 = "'0'", + cst_0$0 = cst_0$3, + _I_ = [1, 1], + cst_0$1 = cst_0$3, + cst_precision$0 = cst_precision$3, + _H_ = [1, 1], + cst_precision$1 = cst_precision$3, + _M_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, + cst_at_character_number, + [4, + 0, + 0, + 0, + [11, + ", flag ", + [1, + [11, + " is only allowed after the '", + [12, 37, [11, "', before padding and precision", 0]]]]]]]]], + "invalid format %S: at character number %d, flag %C is only allowed after the '%%', before padding and precision"], + _J_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, + cst_at_character_number, + [4, + 0, + 0, + 0, + [11, ', invalid conversion "', [12, 37, [0, [12, 34, 0]]]]]]]], + 'invalid format %S: at character number %d, invalid conversion "%%%c"'], + _K_ = [0, 0], + cst_padding$0 = "`padding'", + _L_ = [0, 0], + cst_precision$2 = "`precision'", + _N_ = [0, [12, 64, 0]], + _O_ = [0, "@ ", 1, 0], + _P_ = [0, "@,", 0, 0], + _Q_ = [2, 60], + _R_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, + ": '", + [12, + 37, + [11, + "' alone is not accepted in character sets, use ", + [12, + 37, + [12, + 37, + [11, " instead at position ", [4, 0, 0, 0, [12, 46, 0]]]]]]]]]], + "invalid format %S: '%%' alone is not accepted in character sets, use %%%% instead at position %d."], + _S_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, + ": integer ", + [4, 0, 0, 0, [11, " is greater than the limit ", [4, 0, 0, 0, 0]]]]]], + "invalid format %S: integer %d is greater than the limit %d"], + cst_digit = "digit", + _T_ = [0, cst_camlinternalFormat_ml, 2837, 11], + _U_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, + ': unclosed sub-format, expected "', + [12, 37, [0, [11, '" at character number ', [4, 0, 0, 0, 0]]]]]]], + 'invalid format %S: unclosed sub-format, expected "%%%c" at character number %d'], + cst_character = "character ')'", + cst_character$0 = "character '}'", + _V_ = [0, cst_camlinternalFormat_ml, 2899, 34], + _W_ = [0, cst_camlinternalFormat_ml, 2935, 28], + _X_ = [0, cst_camlinternalFormat_ml, 2957, 11], + _Y_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, + cst_at_character_number, + [4, + 0, + 0, + 0, + [11, + cst$44, + [2, + 0, + [11, + " is incompatible with '", + [0, [11, "' in sub-format ", [3, 0, 0]]]]]]]]]], + "invalid format %S: at character number %d, %s is incompatible with '%c' in sub-format %S"], + _B_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, + cst_at_character_number, + [4, 0, 0, 0, [11, cst$44, [2, 0, [11, " expected, read ", [1, 0]]]]]]]], + "invalid format %S: at character number %d, %s expected, read %C"], + _A_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, + cst_at_character_number, + [4, 0, 0, 0, [11, ", '", [0, [11, "' without ", [2, 0, 0]]]]]]]], + "invalid format %S: at character number %d, '%c' without %s"], + cst_non_zero_widths_are_unsupp = + "non-zero widths are unsupported for %c conversions", + cst_unexpected_end_of_format = "unexpected end of format", + _z_ = + [0, + [11, + cst_invalid_format, + [3, + 0, + [11, cst_at_character_number, [4, 0, 0, 0, [11, cst$44, [2, 0, 0]]]]]], + "invalid format %S: at character number %d, %s"], + _y_ = + [0, + [11, "invalid box description ", [3, 0, 0]], + "invalid box description %S"], + _x_ = [0, 0, 4], + cst_nan = "nan", + cst_neg_infinity = "neg_infinity", + cst_infinity = "infinity", + _r_ = [0, 103], + cst_nd$0 = "%+nd", + cst_nd$1 = "% nd", + cst_ni$1 = "%+ni", + cst_ni$2 = "% ni", + cst_nx = "%nx", + cst_nx$0 = "%#nx", + cst_nX = "%nX", + cst_nX$0 = "%#nX", + cst_no = "%no", + cst_no$0 = "%#no", + cst_nd = "%nd", + cst_ni$0 = cst_ni$3, + cst_nu = "%nu", + cst_ld$0 = "%+ld", + cst_ld$1 = "% ld", + cst_li$1 = "%+li", + cst_li$2 = "% li", + cst_lx = "%lx", + cst_lx$0 = "%#lx", + cst_lX = "%lX", + cst_lX$0 = "%#lX", + cst_lo = "%lo", + cst_lo$0 = "%#lo", + cst_ld = "%ld", + cst_li$0 = cst_li$3, + cst_lu = "%lu", + cst_Ld$0 = "%+Ld", + cst_Ld$1 = "% Ld", + cst_Li$1 = "%+Li", + cst_Li$2 = "% Li", + cst_Lx = "%Lx", + cst_Lx$0 = "%#Lx", + cst_LX = "%LX", + cst_LX$0 = "%#LX", + cst_Lo = "%Lo", + cst_Lo$0 = "%#Lo", + cst_Ld = "%Ld", + cst_Li$0 = cst_Li$3, + cst_Lu = "%Lu", + cst_d$0 = "%+d", + cst_d$1 = "% d", + cst_i$1 = "%+i", + cst_i$2 = "% i", + cst_x = "%x", + cst_x$0 = "%#x", + cst_X = "%X", + cst_X$0 = "%#X", + cst_o = "%o", + cst_o$0 = "%#o", + cst_d = "%d", + cst_i$0 = cst_i$3, + cst_u = cst_u$0, + cst_0c = "0c", + _a_ = [0, 0, 0], + cst_CamlinternalFormat_Type_mi = "CamlinternalFormat.Type_mismatch"; + function create_char_set(param){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Bytes[1], 32, 0); + /*<>*/ } + function add_in_char_set(char_set, c){ + /*<>*/ var + str_ind = c >>> 3 | 0, + mask = 1 << (c & 7), + /*<>*/ _dU_ = + /*<>*/ runtime.caml_bytes_get + (char_set, str_ind) + | mask; + /*<>*/ return /*<>*/ caml_bytes_set + (char_set, + str_ind, + /*<>*/ caml_call1(Stdlib[29], _dU_)); + /*<>*/ } + function freeze_char_set(char_set){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[6], char_set); + /*<>*/ } + function rev_char_set(char_set){ + /*<>*/ var + /*<>*/ char_set$0 = create_char_set(0), + i = 0; + for(;;){ + /*<>*/ /*<>*/ var + _dS_ = + /*<>*/ caml_string_get(char_set, i) + ^ 255; + /*<>*/ /*<>*/ caml_bytes_set + (char_set$0, + i, + /*<>*/ caml_call1(Stdlib[29], _dS_)); + /*<>*/ /*<>*/ var + _dT_ = i + 1 | 0; + if(31 === i) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], char_set$0); + var i = _dT_; + } + /*<>*/ } + function is_in_char_set(char_set, c){ + /*<>*/ var + str_ind = c >>> 3 | 0, + mask = 1 << (c & 7); + return 0 + !== + ( /*<>*/ caml_string_get + (char_set, str_ind) + & mask) + ? 1 + : 0; + /*<>*/ } + function pad_of_pad_opt(pad_opt){ + /*<>*/ if(! pad_opt) + /*<>*/ return 0; + var width = pad_opt[1]; + /*<>*/ return [0, 1, width]; + /*<>*/ } + function param_format_of_ignored_format(ign, fmt){ + /*<>*/ if(typeof ign === "number") + switch(ign){ + case 0: + /*<>*/ return [0, [0, fmt]]; + case 1: + /*<>*/ return [0, [1, fmt]]; + case 2: + /*<>*/ return [0, [19, fmt]]; + default: /*<>*/ return [0, [22, fmt]]; + } + switch(ign[0]){ + case 0: + var pad_opt = ign[1]; + /*<>*/ return [0, + [2, pad_of_pad_opt(pad_opt), fmt]]; + case 1: + var pad_opt$0 = ign[1]; + /*<>*/ return [0, + [3, pad_of_pad_opt(pad_opt$0), fmt]]; + case 2: + var pad_opt$1 = ign[2], iconv = ign[1]; + /*<>*/ return [0, + [4, iconv, pad_of_pad_opt(pad_opt$1), 0, fmt]]; + case 3: + var pad_opt$2 = ign[2], iconv$0 = ign[1]; + /*<>*/ return [0, + [5, iconv$0, pad_of_pad_opt(pad_opt$2), 0, fmt]]; + case 4: + var pad_opt$3 = ign[2], iconv$1 = ign[1]; + /*<>*/ return [0, + [6, iconv$1, pad_of_pad_opt(pad_opt$3), 0, fmt]]; + case 5: + var pad_opt$4 = ign[2], iconv$2 = ign[1]; + /*<>*/ return [0, + [7, iconv$2, pad_of_pad_opt(pad_opt$4), 0, fmt]]; + case 6: + var prec_opt = ign[2], pad_opt$5 = ign[1]; + if(prec_opt) + var ndec = prec_opt[1], _dR_ = [0, ndec]; + else + var _dR_ = 0; + /*<>*/ return [0, + [8, _a_, pad_of_pad_opt(pad_opt$5), _dR_, fmt]]; + case 7: + var pad_opt$6 = ign[1]; + /*<>*/ return [0, + [9, pad_of_pad_opt(pad_opt$6), fmt]]; + case 8: + var fmtty = ign[2], pad_opt$7 = ign[1]; + /*<>*/ return [0, + [13, pad_opt$7, fmtty, fmt]]; + case 9: + var fmtty$0 = ign[2], pad_opt$8 = ign[1]; + /*<>*/ return [0, + [14, pad_opt$8, fmtty$0, fmt]]; + case 10: + var char_set = ign[2], width_opt = ign[1]; + /*<>*/ return [0, + [20, width_opt, char_set, fmt]]; + default: + var counter = ign[1]; + /*<>*/ return [0, [21, counter, fmt]]; + } + /*<>*/ } + function default_float_precision(fconv){ + /*<>*/ return 5 === fconv[2] ? 12 : -6; + /*<>*/ } + function buffer_create(init_size){ + /*<>*/ return [0, + 0, + /*<>*/ caml_create_bytes(init_size)]; + /*<>*/ } + function buffer_check_size(buf, overhead){ + /*<>*/ var + len = runtime.caml_ml_bytes_length(buf[2]), + min_len = buf[1] + overhead | 0, + _dP_ = len < min_len ? 1 : 0; + if(_dP_){ + /*<>*/ var + /*<>*/ new_len = + /*<>*/ caml_call2 + (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); + buf[2] = new_str; + var _dQ_ = 0; + } + else + var _dQ_ = _dP_; + return _dQ_; + /*<>*/ } + function buffer_add_char(buf, c){ + /*<>*/ buffer_check_size(buf, 1); + /*<>*/ /*<>*/ caml_bytes_set + (buf[2], buf[1], c); + buf[1] = buf[1] + 1 | 0; + return 0; + /*<>*/ } + function buffer_add_string(buf, s){ + /*<>*/ var + str_len = caml_ml_string_length(s); + /*<>*/ buffer_check_size(buf, str_len); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_String[48], s, 0, buf[2], buf[1], str_len); + buf[1] = buf[1] + str_len | 0; + return 0; + /*<>*/ } + function buffer_contents(buf){ + /*<>*/ return caml_call3 + (Stdlib_Bytes[8], buf[2], 0, buf[1]); + /*<>*/ } + function char_of_iconv(iconv){ + /*<>*/ switch(iconv){ + case 6: + case 7: + /*<>*/ return 120; + case 8: + case 9: + /*<>*/ return 88; + case 10: + case 11: + /*<>*/ return 111; + case 12: + case 15: + /*<>*/ return 117; + case 0: + case 1: + case 2: + case 13: + /*<>*/ return 100; + default: /*<>*/ return 105; + } + /*<>*/ } + function char_of_fconv(opt, fconv){ + /*<>*/ if(opt) + var sth = opt[1], cF = sth; + else + var cF = 70; + switch(fconv[2]){ + case 0: + /*<>*/ return 102; + case 1: + /*<>*/ return 101; + case 2: + /*<>*/ return 69; + case 3: + /*<>*/ return 103; + case 4: + /*<>*/ return 71; + case 5: + /*<>*/ return cF; + case 6: + /*<>*/ return 104; + case 7: + /*<>*/ return 72; + default: /*<>*/ return 70; + } + /*<>*/ } + function bprint_padty(buf, padty){ + /*<>*/ switch(padty){ + case 0: + /*<>*/ return buffer_add_char(buf, 45); + case 1: + /*<>*/ return 0; + default: + /*<>*/ return buffer_add_char(buf, 48); + } + /*<>*/ } + function bprint_ignored_flag(buf, ign_flag){ + /*<>*/ return ign_flag + ? buffer_add_char(buf, 95) + : ign_flag; + /*<>*/ } + function bprint_pad_opt(buf, pad_opt){ + /*<>*/ if(! pad_opt) + /*<>*/ return 0; + var width = pad_opt[1]; + /*<>*/ return buffer_add_string + (buf, + /*<>*/ caml_call1 + (Stdlib_Int[12], width)); + /*<>*/ } + function bprint_padding(buf, pad){ + /*<>*/ if(typeof pad === "number") + /*<>*/ return 0; + if(0 === pad[0]){ + var n = pad[2], padty = pad[1]; + /*<>*/ bprint_padty(buf, padty); + /*<>*/ return buffer_add_string + (buf, + /*<>*/ caml_call1 + (Stdlib_Int[12], n)); + } + var padty$0 = pad[1]; + /*<>*/ bprint_padty(buf, padty$0); + /*<>*/ return buffer_add_char(buf, 42); + /*<>*/ } + function bprint_precision(buf, prec){ + /*<>*/ if(typeof prec === "number") + return prec ? buffer_add_string(buf, cst) : 0; + var n = prec[1]; + /*<>*/ buffer_add_char(buf, 46); + /*<>*/ return buffer_add_string + (buf, + /*<>*/ caml_call1 + (Stdlib_Int[12], n)); + /*<>*/ } + function bprint_iconv_flag(buf, iconv){ + /*<>*/ switch(iconv){ + case 1: + case 4: + /*<>*/ return buffer_add_char(buf, 43); + case 2: + case 5: + /*<>*/ return buffer_add_char(buf, 32); + case 7: + case 9: + case 11: + case 13: + case 14: + case 15: + /*<>*/ return buffer_add_char(buf, 35); + default: /*<>*/ return 0; + } + /*<>*/ } + function bprint_altint_fmt(buf, ign_flag, iconv, pad, prec, c){ + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag(buf, ign_flag); + /*<>*/ bprint_iconv_flag(buf, iconv); + /*<>*/ bprint_padding(buf, pad); + /*<>*/ bprint_precision(buf, prec); + /*<>*/ buffer_add_char(buf, c); + /*<>*/ return buffer_add_char + (buf, char_of_iconv(iconv)); + /*<>*/ } + function bprint_fconv_flag(buf, fconv){ + /*<>*/ switch(fconv[1]){ + case 0: break; + case 1: + /*<>*/ buffer_add_char(buf, 43); break; + default: /*<>*/ buffer_add_char(buf, 32); + } + return 8 <= fconv[2] ? buffer_add_char(buf, 35) : 0; + /*<>*/ } + function string_of_formatting_lit(formatting_lit){ + /*<>*/ if + (typeof formatting_lit === "number") + switch(formatting_lit){ + case 0: + /*<>*/ return cst$0; + case 1: + /*<>*/ return cst$1; + case 2: + /*<>*/ return cst$2; + case 3: + /*<>*/ return cst$3; + case 4: + /*<>*/ return cst$4; + case 5: + /*<>*/ return cst$5; + default: /*<>*/ return cst$6; + } + switch(formatting_lit[0]){ + case 0: + var str = formatting_lit[1]; + /*<>*/ return str; + case 1: + var str$0 = formatting_lit[1]; + /*<>*/ return str$0; + default: + /*<>*/ var + c = formatting_lit[1], + /*<>*/ _dO_ = + /*<>*/ caml_call2 + (Stdlib_String[1], 1, c); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], cst$7, _dO_); + } + /*<>*/ } + function bprint_char_literal(buf, chr){ + /*<>*/ return 37 === chr + ? buffer_add_string(buf, cst$8) + : buffer_add_char(buf, chr); + /*<>*/ } + function bprint_string_literal(buf, str){ + /*<>*/ var + _dM_ = caml_ml_string_length(str) - 1 | 0, + /*<>*/ _dL_ = 0; + if(_dM_ >= 0){ + var i = _dL_; + for(;;){ + /*<>*/ bprint_char_literal + (buf, /*<>*/ caml_string_get(str, i)); + /*<>*/ /*<>*/ var + _dN_ = i + 1 | 0; + if(_dM_ === i) break; + var i = _dN_; + } + } + return 0; + /*<>*/ } + function bprint_fmtty(buf, fmtty){ + /*<>*/ var fmtty$0 = fmtty; + /*<>*/ for(;;){ + if(typeof fmtty$0 === "number") + /*<>*/ return 0; + switch(fmtty$0[0]){ + case 0: + var fmtty$1 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_c); + var fmtty$0 = fmtty$1; + break; + case 1: + var fmtty$2 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_s); + var fmtty$0 = fmtty$2; + break; + case 2: + var fmtty$3 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_i); + var fmtty$0 = fmtty$3; + break; + case 3: + var fmtty$4 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_li); + var fmtty$0 = fmtty$4; + break; + case 4: + var fmtty$5 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_ni); + var fmtty$0 = fmtty$5; + break; + case 5: + var fmtty$6 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_Li); + var fmtty$0 = fmtty$6; + break; + case 6: + var fmtty$7 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_f); + var fmtty$0 = fmtty$7; + break; + case 7: + var fmtty$8 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_B); + var fmtty$0 = fmtty$8; + break; + case 8: + var fmtty$9 = fmtty$0[2], sub_fmtty = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst$9); + /*<>*/ bprint_fmtty(buf, sub_fmtty); + /*<>*/ buffer_add_string(buf, cst$10); + var fmtty$0 = fmtty$9; + break; + case 9: + var fmtty$10 = fmtty$0[3], sub_fmtty$0 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst$11); + /*<>*/ bprint_fmtty(buf, sub_fmtty$0); + /*<>*/ buffer_add_string(buf, cst$12); + var fmtty$0 = fmtty$10; + break; + case 10: + var fmtty$11 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_a); + var fmtty$0 = fmtty$11; + break; + case 11: + var fmtty$12 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_t); + var fmtty$0 = fmtty$12; + break; + case 12: + var fmtty$13 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst$13); + var fmtty$0 = fmtty$13; + break; + case 13: + var fmtty$14 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_r); + var fmtty$0 = fmtty$14; + break; + default: + var fmtty$15 = fmtty$0[1]; + /*<>*/ buffer_add_string(buf, cst_r$0); + var fmtty$0 = fmtty$15; + } + } + /*<>*/ } + function int_of_custom_arity(param){ + /*<>*/ if(! param) + /*<>*/ return 0; + var x = param[1]; + return 1 + int_of_custom_arity(x) | 0; + /*<>*/ } + function string_of_fmt(fmt){ + /*<>*/ /*<>*/ var + buf = buffer_create(16); + function fmtiter(fmt, ign_flag){ + /*<>*/ var + fmt$0 = fmt, + ign_flag$0 = ign_flag; + /*<>*/ for(;;){ + if(typeof fmt$0 === "number") + /*<>*/ return 0; + switch(fmt$0[0]){ + case 0: + var rest = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ buffer_add_char(buf, 99); + var fmt$0 = rest, ign_flag$0 = 0; + break; + case 1: + var rest$0 = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ buffer_add_char(buf, 67); + var fmt$0 = rest$0, ign_flag$0 = 0; + break; + case 2: + var rest$1 = fmt$0[2], pad = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ bprint_padding(buf, pad); + /*<>*/ buffer_add_char(buf, 115); + var fmt$0 = rest$1, ign_flag$0 = 0; + break; + case 3: + var rest$2 = fmt$0[2], pad$0 = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ bprint_padding(buf, pad$0); + /*<>*/ buffer_add_char(buf, 83); + var fmt$0 = rest$2, ign_flag$0 = 0; + break; + case 4: + var + rest$3 = fmt$0[4], + prec = fmt$0[3], + pad$1 = fmt$0[2], + iconv = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ bprint_iconv_flag(buf, iconv); + /*<>*/ bprint_padding(buf, pad$1); + /*<>*/ bprint_precision(buf, prec); + /*<>*/ buffer_add_char + (buf, char_of_iconv(iconv)); + var fmt$0 = rest$3, ign_flag$0 = 0; + break; + case 5: + var + rest$4 = fmt$0[4], + prec$0 = fmt$0[3], + pad$2 = fmt$0[2], + iconv$0 = fmt$0[1]; + /*<>*/ bprint_altint_fmt + (buf, ign_flag$0, iconv$0, pad$2, prec$0, 108); + var fmt$0 = rest$4, ign_flag$0 = 0; + break; + case 6: + var + rest$5 = fmt$0[4], + prec$1 = fmt$0[3], + pad$3 = fmt$0[2], + iconv$1 = fmt$0[1]; + /*<>*/ bprint_altint_fmt + (buf, ign_flag$0, iconv$1, pad$3, prec$1, 110); + var fmt$0 = rest$5, ign_flag$0 = 0; + break; + case 7: + var + rest$6 = fmt$0[4], + prec$2 = fmt$0[3], + pad$4 = fmt$0[2], + iconv$2 = fmt$0[1]; + /*<>*/ bprint_altint_fmt + (buf, ign_flag$0, iconv$2, pad$4, prec$2, 76); + var fmt$0 = rest$6, ign_flag$0 = 0; + break; + case 8: + var + rest$7 = fmt$0[4], + prec$3 = fmt$0[3], + pad$5 = fmt$0[2], + fconv = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ bprint_fconv_flag(buf, fconv); + /*<>*/ bprint_padding(buf, pad$5); + /*<>*/ bprint_precision(buf, prec$3); + /*<>*/ buffer_add_char + (buf, char_of_fconv(0, fconv)); + var fmt$0 = rest$7, ign_flag$0 = 0; + break; + case 9: + var rest$8 = fmt$0[2], pad$6 = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ bprint_padding(buf, pad$6); + /*<>*/ buffer_add_char(buf, 66); + var fmt$0 = rest$8, ign_flag$0 = 0; + break; + case 10: + var rest$9 = fmt$0[1]; + /*<>*/ buffer_add_string(buf, cst$14); + var fmt$0 = rest$9; + break; + case 11: + var rest$10 = fmt$0[2], str = fmt$0[1]; + /*<>*/ bprint_string_literal(buf, str); + var fmt$0 = rest$10; + break; + case 12: + var rest$11 = fmt$0[2], chr = fmt$0[1]; + /*<>*/ bprint_char_literal(buf, chr); + var fmt$0 = rest$11; + break; + case 13: + var rest$12 = fmt$0[3], fmtty = fmt$0[2], pad_opt = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ bprint_pad_opt(buf, pad_opt); + /*<>*/ buffer_add_char(buf, 123); + /*<>*/ bprint_fmtty(buf, fmtty); + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ buffer_add_char(buf, 125); + var fmt$0 = rest$12, ign_flag$0 = 0; + break; + case 14: + var rest$13 = fmt$0[3], fmtty$0 = fmt$0[2], pad_opt$0 = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ bprint_pad_opt(buf, pad_opt$0); + /*<>*/ buffer_add_char(buf, 40); + /*<>*/ bprint_fmtty(buf, fmtty$0); + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ buffer_add_char(buf, 41); + var fmt$0 = rest$13, ign_flag$0 = 0; + break; + case 15: + var rest$14 = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ buffer_add_char(buf, 97); + var fmt$0 = rest$14, ign_flag$0 = 0; + break; + case 16: + var rest$15 = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ buffer_add_char(buf, 116); + var fmt$0 = rest$15, ign_flag$0 = 0; + break; + case 17: + var rest$16 = fmt$0[2], fmting_lit = fmt$0[1]; + /*<>*/ bprint_string_literal + (buf, string_of_formatting_lit(fmting_lit)); + var fmt$0 = rest$16; + break; + case 18: + var rest$17 = fmt$0[2], fmting_gen = fmt$0[1]; + /*<>*/ if(0 === fmting_gen[0]){ + var str$0 = fmting_gen[1][2]; + /*<>*/ buffer_add_string(buf, cst$15); + /*<>*/ buffer_add_string(buf, str$0); + } + else{ + var str$1 = fmting_gen[1][2]; + /*<>*/ buffer_add_string(buf, cst$16); + /*<>*/ buffer_add_string(buf, str$1); + } + var fmt$0 = rest$17; + break; + case 19: + var rest$18 = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ buffer_add_char(buf, 114); + var fmt$0 = rest$18, ign_flag$0 = 0; + break; + case 20: + var rest$19 = fmt$0[3], char_set = fmt$0[2], width_opt = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ bprint_pad_opt(buf, width_opt); + var + print_char = + function(buf, i){ + /*<>*/ /*<>*/ var + c = + /*<>*/ caml_call1 + (Stdlib[29], i); + return 37 === c + ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37)) + : 64 + === c + ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64)) + : buffer_add_char(buf, c); + /*<>*/ }; + /*<>*/ buffer_add_char(buf, 91); + /*<>*/ var + /*<>*/ set = + is_in_char_set(char_set, 0) + ? (buffer_add_char(buf, 94), rev_char_set(char_set)) + : char_set, + is_alone$0 = + function(set){ + function is_alone(c){ + /*<>*/ var + /*<>*/ after = + /*<>*/ caml_call1 + (Stdlib_Char[1], c + 1 | 0), + /*<>*/ before = + /*<>*/ caml_call1 + (Stdlib_Char[1], c - 1 | 0), + /*<>*/ _dH_ = + is_in_char_set(set, c); + /*<>*/ if(_dH_) + /*<>*/ var + /*<>*/ _dI_ = + is_in_char_set(set, before), + /*<>*/ _dJ_ = + _dI_ ? is_in_char_set(set, after) : _dI_, + _dK_ = 1 - _dJ_; + else + var _dK_ = _dH_; + /*<>*/ return _dK_; + /*<>*/ } + return is_alone; + }, + is_alone = is_alone$0(set); + /*<>*/ if(is_alone(93)) + /*<>*/ buffer_add_char(buf, 93); + var i = 1; + a: + /*<>*/ for(;;){ + b: + if(i < 256){ + /*<>*/ if + (! + is_in_char_set + (set, + /*<>*/ caml_call1(Stdlib[29], i))){ + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + continue; + } + /*<>*/ /*<>*/ var + switcher = + /*<>*/ caml_call1(Stdlib[29], i) + - 45 + | 0; + if(48 < switcher >>> 0){ + if(210 <= switcher){ + /*<>*/ print_char(buf, 255); + break b; + } + } + else if(46 < switcher - 1 >>> 0){ + /*<>*/ var + /*<>*/ i$2 = i + 1 | 0, + i = i$2; + continue; + } + /*<>*/ /*<>*/ var + i$1 = i + 1 | 0; + /*<>*/ if + (! + is_in_char_set + (set, + /*<>*/ caml_call1 + (Stdlib[29], i$1))){ + /*<>*/ print_char(buf, i$1 - 1 | 0); + /*<>*/ var + /*<>*/ i$6 = i$1 + 1 | 0, + i = i$6; + continue; + } + /*<>*/ /*<>*/ var + switcher$0 = + /*<>*/ caml_call1 + (Stdlib[29], i$1) + - 45 + | 0; + if(48 < switcher$0 >>> 0){ + if(210 <= switcher$0){ + /*<>*/ print_char(buf, 254); + /*<>*/ print_char(buf, 255); + break b; + } + } + else if + (46 < switcher$0 - 1 >>> 0 + && + ! + is_in_char_set + (set, + /*<>*/ caml_call1 + (Stdlib[29], i$1 + 1 | 0))){ + /*<>*/ print_char(buf, i$1 - 1 | 0); + /*<>*/ var + /*<>*/ i$5 = i$1 + 1 | 0, + i = i$5; + continue; + } + /*<>*/ if + (! + is_in_char_set + (set, + /*<>*/ caml_call1 + (Stdlib[29], i$1 + 1 | 0))){ + /*<>*/ print_char(buf, i$1 - 1 | 0); + /*<>*/ print_char(buf, i$1); + /*<>*/ var + /*<>*/ i$4 = i$1 + 2 | 0, + i = i$4; + continue; + } + /*<>*/ var + /*<>*/ j = i$1 + 2 | 0, + i$3 = i$1 - 1 | 0, + j$0 = j; + /*<>*/ for(;;){ + /*<>*/ if + (256 !== j$0 + && + is_in_char_set + (set, + /*<>*/ caml_call1 + (Stdlib[29], j$0))){ + /*<>*/ var + /*<>*/ j$1 = j$0 + 1 | 0, + j$0 = j$1; + continue; + } + /*<>*/ print_char(buf, i$3); + /*<>*/ print_char(buf, 45); + /*<>*/ print_char(buf, j$0 - 1 | 0); + if(j$0 >= 256) break; + /*<>*/ var + /*<>*/ i$7 = j$0 + 1 | 0, + i = i$7; + continue a; + } + } + /*<>*/ if(is_alone(45)) + /*<>*/ buffer_add_char(buf, 45); + /*<>*/ buffer_add_char(buf, 93); + var fmt$0 = rest$19, ign_flag$0 = 0; + break; + } + break; + case 21: + var rest$20 = fmt$0[2], counter = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + switch(counter){ + case 0: + var _dD_ = 108; break; + case 1: + var _dD_ = 110; break; + default: var _dD_ = 78; + } + /*<>*/ buffer_add_char(buf, _dD_); + var fmt$0 = rest$20, ign_flag$0 = 0; + break; + case 22: + var rest$21 = fmt$0[1]; + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ bprint_string_literal + (buf, cst_0c); + var fmt$0 = rest$21, ign_flag$0 = 0; + break; + case 23: + var + rest$22 = fmt$0[2], + ign = fmt$0[1], + fmt$1 = param_format_of_ignored_format(ign, rest$22)[1], + fmt$0 = fmt$1, + ign_flag$0 = 1; + break; + default: + /*<>*/ var + rest$23 = fmt$0[3], + arity = fmt$0[1], + /*<>*/ _dF_ = + int_of_custom_arity(arity), + _dE_ = 1; + if(_dF_ >= 1){ + var i$8 = _dE_; + for(;;){ + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ bprint_ignored_flag + (buf, ign_flag$0); + /*<>*/ buffer_add_char(buf, 63); + /*<>*/ /*<>*/ var + _dG_ = i$8 + 1 | 0; + if(_dF_ === i$8) break; + var i$8 = _dG_; + } + } + var fmt$0 = rest$23, ign_flag$0 = 0; + } + } + /*<>*/ } + /*<>*/ fmtiter(fmt, 0); + /*<>*/ return buffer_contents(buf); + /*<>*/ } + function symm(param){ + /*<>*/ if(typeof param === "number") + /*<>*/ return 0; + switch(param[0]){ + case 0: + var rest = param[1]; + /*<>*/ return [0, symm(rest)]; + case 1: + var rest$0 = param[1]; + /*<>*/ return [1, symm(rest$0)]; + case 2: + var rest$1 = param[1]; + /*<>*/ return [2, symm(rest$1)]; + case 3: + var rest$2 = param[1]; + /*<>*/ return [3, symm(rest$2)]; + case 4: + var rest$3 = param[1]; + /*<>*/ return [4, symm(rest$3)]; + case 5: + var rest$4 = param[1]; + /*<>*/ return [5, symm(rest$4)]; + case 6: + var rest$5 = param[1]; + /*<>*/ return [6, symm(rest$5)]; + case 7: + var rest$6 = param[1]; + /*<>*/ return [7, symm(rest$6)]; + case 8: + var rest$7 = param[2], ty = param[1]; + /*<>*/ return [8, ty, symm(rest$7)]; + case 9: + var rest$8 = param[3], ty2 = param[2], ty1 = param[1]; + /*<>*/ return [9, ty2, ty1, symm(rest$8)]; + case 10: + var rest$9 = param[1]; + /*<>*/ return [10, symm(rest$9)]; + case 11: + var rest$10 = param[1]; + /*<>*/ return [11, symm(rest$10)]; + case 12: + var rest$11 = param[1]; + /*<>*/ return [12, symm(rest$11)]; + case 13: + var rest$12 = param[1]; + /*<>*/ return [13, symm(rest$12)]; + default: + var rest$13 = param[1]; + /*<>*/ return [14, symm(rest$13)]; + } + /*<>*/ } + function fmtty_rel_det(param){ + /*<>*/ if(typeof param !== "number") + switch(param[0]){ + case 0: + /*<>*/ var + rest = param[1], + /*<>*/ match = fmtty_rel_det(rest), + de = match[4], + ed = match[3], + af = match[2], + fa = match[1], + _di_ = + function(param){ + /*<>*/ af(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa(0); + /*<>*/ return 0; + /*<>*/ }, + _di_, + ed, + de]; + case 1: + /*<>*/ var + rest$0 = param[1], + /*<>*/ match$0 = fmtty_rel_det(rest$0), + de$0 = match$0[4], + ed$0 = match$0[3], + af$0 = match$0[2], + fa$0 = match$0[1], + _dj_ = + function(param){ + /*<>*/ af$0(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$0(0); + /*<>*/ return 0; + /*<>*/ }, + _dj_, + ed$0, + de$0]; + case 2: + /*<>*/ var + rest$1 = param[1], + /*<>*/ match$1 = fmtty_rel_det(rest$1), + de$1 = match$1[4], + ed$1 = match$1[3], + af$1 = match$1[2], + fa$1 = match$1[1], + _dk_ = + function(param){ + /*<>*/ af$1(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$1(0); + /*<>*/ return 0; + /*<>*/ }, + _dk_, + ed$1, + de$1]; + case 3: + /*<>*/ var + rest$2 = param[1], + /*<>*/ match$2 = fmtty_rel_det(rest$2), + de$2 = match$2[4], + ed$2 = match$2[3], + af$2 = match$2[2], + fa$2 = match$2[1], + _dl_ = + function(param){ + /*<>*/ af$2(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$2(0); + /*<>*/ return 0; + /*<>*/ }, + _dl_, + ed$2, + de$2]; + case 4: + /*<>*/ var + rest$3 = param[1], + /*<>*/ match$3 = fmtty_rel_det(rest$3), + de$3 = match$3[4], + ed$3 = match$3[3], + af$3 = match$3[2], + fa$3 = match$3[1], + _dm_ = + function(param){ + /*<>*/ af$3(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$3(0); + /*<>*/ return 0; + /*<>*/ }, + _dm_, + ed$3, + de$3]; + case 5: + /*<>*/ var + rest$4 = param[1], + /*<>*/ match$4 = fmtty_rel_det(rest$4), + de$4 = match$4[4], + ed$4 = match$4[3], + af$4 = match$4[2], + fa$4 = match$4[1], + _dn_ = + function(param){ + /*<>*/ af$4(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$4(0); + /*<>*/ return 0; + /*<>*/ }, + _dn_, + ed$4, + de$4]; + case 6: + /*<>*/ var + rest$5 = param[1], + /*<>*/ match$5 = fmtty_rel_det(rest$5), + de$5 = match$5[4], + ed$5 = match$5[3], + af$5 = match$5[2], + fa$5 = match$5[1], + _do_ = + function(param){ + /*<>*/ af$5(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$5(0); + /*<>*/ return 0; + /*<>*/ }, + _do_, + ed$5, + de$5]; + case 7: + /*<>*/ var + rest$6 = param[1], + /*<>*/ match$6 = fmtty_rel_det(rest$6), + de$6 = match$6[4], + ed$6 = match$6[3], + af$6 = match$6[2], + fa$6 = match$6[1], + _dp_ = + function(param){ + /*<>*/ af$6(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$6(0); + /*<>*/ return 0; + /*<>*/ }, + _dp_, + ed$6, + de$6]; + case 8: + /*<>*/ var + rest$7 = param[2], + /*<>*/ match$7 = fmtty_rel_det(rest$7), + de$7 = match$7[4], + ed$7 = match$7[3], + af$7 = match$7[2], + fa$7 = match$7[1], + _dq_ = + function(param){ + /*<>*/ af$7(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$7(0); + /*<>*/ return 0; + /*<>*/ }, + _dq_, + ed$7, + de$7]; + case 9: + /*<>*/ var + rest$8 = param[3], + ty2 = param[2], + ty1 = param[1], + /*<>*/ match$8 = fmtty_rel_det(rest$8), + de$8 = match$8[4], + ed$8 = match$8[3], + af$8 = match$8[2], + fa$8 = match$8[1], + /*<>*/ ty = trans(symm(ty1), ty2), + /*<>*/ match$9 = fmtty_rel_det(ty), + jd = match$9[4], + dj = match$9[3], + ga = match$9[2], + ag = match$9[1], + _dr_ = + function(param){ + /*<>*/ jd(0); + /*<>*/ de$8(0); + /*<>*/ return 0; + /*<>*/ }, + _ds_ = + function(param){ + /*<>*/ ed$8(0); + /*<>*/ dj(0); + /*<>*/ return 0; + /*<>*/ }, + _dt_ = + function(param){ + /*<>*/ ga(0); + /*<>*/ af$8(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$8(0); + /*<>*/ ag(0); + /*<>*/ return 0; + /*<>*/ }, + _dt_, + _ds_, + _dr_]; + case 10: + /*<>*/ var + rest$9 = param[1], + /*<>*/ match$10 = + fmtty_rel_det(rest$9), + de$9 = match$10[4], + ed$9 = match$10[3], + af$9 = match$10[2], + fa$9 = match$10[1], + _du_ = + function(param){ + /*<>*/ af$9(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$9(0); + /*<>*/ return 0; + /*<>*/ }, + _du_, + ed$9, + de$9]; + case 11: + /*<>*/ var + rest$10 = param[1], + /*<>*/ match$11 = + fmtty_rel_det(rest$10), + de$10 = match$11[4], + ed$10 = match$11[3], + af$10 = match$11[2], + fa$10 = match$11[1], + _dv_ = + function(param){ + /*<>*/ af$10(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$10(0); + /*<>*/ return 0; + /*<>*/ }, + _dv_, + ed$10, + de$10]; + case 12: + /*<>*/ var + rest$11 = param[1], + /*<>*/ match$12 = + fmtty_rel_det(rest$11), + de$11 = match$12[4], + ed$11 = match$12[3], + af$11 = match$12[2], + fa$11 = match$12[1], + _dw_ = + function(param){ + /*<>*/ af$11(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$11(0); + /*<>*/ return 0; + /*<>*/ }, + _dw_, + ed$11, + de$11]; + case 13: + /*<>*/ var + rest$12 = param[1], + /*<>*/ match$13 = + fmtty_rel_det(rest$12), + de$12 = match$13[4], + ed$12 = match$13[3], + af$12 = match$13[2], + fa$12 = match$13[1], + /*<>*/ _dx_ = + function(param){ + /*<>*/ de$12(0); + /*<>*/ return 0; + /*<>*/ }, + _dy_ = + function(param){ + /*<>*/ ed$12(0); + /*<>*/ return 0; + /*<>*/ }, + _dz_ = + function(param){ + /*<>*/ af$12(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$12(0); + /*<>*/ return 0; + /*<>*/ }, + _dz_, + _dy_, + _dx_]; + default: + /*<>*/ var + rest$13 = param[1], + /*<>*/ match$14 = + fmtty_rel_det(rest$13), + de$13 = match$14[4], + ed$13 = match$14[3], + af$13 = match$14[2], + fa$13 = match$14[1], + /*<>*/ _dA_ = + function(param){ + /*<>*/ de$13(0); + /*<>*/ return 0; + /*<>*/ }, + _dB_ = + function(param){ + /*<>*/ ed$13(0); + /*<>*/ return 0; + /*<>*/ }, + _dC_ = + function(param){ + /*<>*/ af$13(0); + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ return [0, + function(param){ + /*<>*/ fa$13(0); + /*<>*/ return 0; + /*<>*/ }, + _dC_, + _dB_, + _dA_]; + } + /*<>*/ function _df_(param){ + /*<>*/ return 0; + /*<>*/ } + function _dg_(param){ + /*<>*/ return 0; + /*<>*/ } + function _dh_(param){ + /*<>*/ return 0; + /*<>*/ } + /*<>*/ return [0, + function(param){ + /*<>*/ return 0; + /*<>*/ }, + _dh_, + _dg_, + _df_]; + /*<>*/ } + function trans(ty1, ty2){ + /*<>*/ a: + { + b: + { + c: + { + d: + { + e: + { + f: + { + g: + { + if(typeof ty1 !== "number"){ + switch(ty1[0]){ + case 0: + var rest1 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 0: + var rest2 = ty2[1]; + /*<>*/ return [0, + trans(rest1, rest2)]; + case 8: + break f; + case 9: + break g; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + break; + case 1: + var rest1$0 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 1: + var rest2$0 = ty2[1]; + /*<>*/ return [1, + trans(rest1$0, rest2$0)]; + case 8: + break f; + case 9: + break g; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + break; + case 2: + var rest1$1 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 2: + var rest2$1 = ty2[1]; + /*<>*/ return [2, + trans(rest1$1, rest2$1)]; + case 8: + break f; + case 9: + break g; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + break; + case 3: + var rest1$2 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 3: + var rest2$2 = ty2[1]; + /*<>*/ return [3, + trans(rest1$2, rest2$2)]; + case 8: + break f; + case 9: + break g; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + break; + case 4: + var rest1$3 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 4: + var rest2$3 = ty2[1]; + /*<>*/ return [4, + trans(rest1$3, rest2$3)]; + case 8: + break f; + case 9: + break g; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + break; + case 5: + var rest1$4 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 5: + var rest2$4 = ty2[1]; + /*<>*/ return [5, + trans(rest1$4, rest2$4)]; + case 8: + break f; + case 9: + break g; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + break; + case 6: + var rest1$5 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 6: + var rest2$5 = ty2[1]; + /*<>*/ return [6, + trans(rest1$5, rest2$5)]; + case 8: + break f; + case 9: + break g; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + break; + case 7: + var rest1$6 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 7: + var rest2$6 = ty2[1]; + /*<>*/ return [7, + trans(rest1$6, rest2$6)]; + case 8: + break f; + case 9: + break g; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + break; + case 8: + var rest1$7 = ty1[2], ty1$0 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 8: + /*<>*/ var + rest2$7 = ty2[2], + ty2$0 = ty2[1], + /*<>*/ _de_ = + trans(rest1$7, rest2$7); + /*<>*/ return [8, + trans(ty1$0, ty2$0), + _de_]; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _k_], 1); + case 9: + var rest1$8 = ty1[3], ty12 = ty1[2], ty11 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 8: + break f; + case 9: + /*<>*/ var + rest2$8 = ty2[3], + ty22 = ty2[2], + ty21 = ty2[1], + /*<>*/ ty = + trans(symm(ty12), ty21), + /*<>*/ match = + fmtty_rel_det(ty), + f4 = match[4], + f2 = match[2]; + /*<>*/ f2(0); + /*<>*/ f4(0); + /*<>*/ return [9, + ty11, + ty22, + trans(rest1$8, rest2$8)]; + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _l_], 1); + case 10: + var rest1$9 = ty1[1]; + if(typeof ty2 !== "number" && 10 === ty2[0]){ + var rest2$9 = ty2[1]; + /*<>*/ return [10, + trans(rest1$9, rest2$9)]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _m_], 1); + case 11: + var rest1$10 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 10: + break a; + case 11: + var rest2$10 = ty2[1]; + /*<>*/ return [11, + trans(rest1$10, rest2$10)]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _n_], 1); + case 12: + var rest1$11 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 10: + break a; + case 11: + break b; + case 12: + var rest2$11 = ty2[1]; + /*<>*/ return [12, + trans(rest1$11, rest2$11)]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _o_], 1); + case 13: + var rest1$12 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + var rest2$12 = ty2[1]; + /*<>*/ return [13, + trans(rest1$12, rest2$12)]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _p_], 1); + default: + var rest1$13 = ty1[1]; + if(typeof ty2 !== "number") + switch(ty2[0]){ + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + var rest2$13 = ty2[1]; + /*<>*/ return [14, + trans(rest1$13, rest2$13)]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _q_], 1); + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _j_], 1); + } + if(typeof ty2 === "number") + /*<>*/ return 0; + switch(ty2[0]){ + case 10: + break a; + case 11: + break b; + case 12: + break c; + case 13: + break d; + case 14: + break e; + case 8: + break f; + case 9: break; + default: + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + } + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _d_], 1); + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _c_], 1); + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _i_], 1); + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _h_], 1); + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _g_], 1); + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _f_], 1); + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _e_], 1); + /*<>*/ } + function fmtty_of_padding_fmtty(pad, fmtty){ + /*<>*/ return typeof pad === "number" + ? fmtty + : 0 === pad[0] ? fmtty : [2, fmtty]; + /*<>*/ } + function fmtty_of_custom(arity, fmtty){ + /*<>*/ if(! arity) + /*<>*/ return fmtty; + var arity$0 = arity[1]; + /*<>*/ return [12, + fmtty_of_custom(arity$0, fmtty)]; + /*<>*/ } + function fmtty_of_fmt(fmtty){ + /*<>*/ var fmtty$0 = fmtty; + /*<>*/ for(;;){ + if(typeof fmtty$0 === "number") + /*<>*/ return 0; + switch(fmtty$0[0]){ + case 0: + var rest = fmtty$0[1]; + /*<>*/ return [0, fmtty_of_fmt(rest)]; + case 1: + var rest$0 = fmtty$0[1]; + /*<>*/ return [0, fmtty_of_fmt(rest$0)]; + case 2: + var rest$1 = fmtty$0[2], pad = fmtty$0[1]; + /*<>*/ return fmtty_of_padding_fmtty + (pad, [1, fmtty_of_fmt(rest$1)]); + case 3: + var rest$2 = fmtty$0[2], pad$0 = fmtty$0[1]; + /*<>*/ return fmtty_of_padding_fmtty + (pad$0, [1, fmtty_of_fmt(rest$2)]); + case 4: + /*<>*/ var + rest$3 = fmtty$0[4], + prec = fmtty$0[3], + pad$1 = fmtty$0[2], + /*<>*/ ty_rest = fmtty_of_fmt(rest$3), + /*<>*/ prec_ty = + fmtty_of_precision_fmtty(prec, [2, ty_rest]); + /*<>*/ return fmtty_of_padding_fmtty + (pad$1, prec_ty); + case 5: + /*<>*/ var + rest$4 = fmtty$0[4], + prec$0 = fmtty$0[3], + pad$2 = fmtty$0[2], + /*<>*/ ty_rest$0 = + fmtty_of_fmt(rest$4), + /*<>*/ prec_ty$0 = + fmtty_of_precision_fmtty(prec$0, [3, ty_rest$0]); + /*<>*/ return fmtty_of_padding_fmtty + (pad$2, prec_ty$0); + case 6: + /*<>*/ var + rest$5 = fmtty$0[4], + prec$1 = fmtty$0[3], + pad$3 = fmtty$0[2], + /*<>*/ ty_rest$1 = + fmtty_of_fmt(rest$5), + /*<>*/ prec_ty$1 = + fmtty_of_precision_fmtty(prec$1, [4, ty_rest$1]); + /*<>*/ return fmtty_of_padding_fmtty + (pad$3, prec_ty$1); + case 7: + /*<>*/ var + rest$6 = fmtty$0[4], + prec$2 = fmtty$0[3], + pad$4 = fmtty$0[2], + /*<>*/ ty_rest$2 = + fmtty_of_fmt(rest$6), + /*<>*/ prec_ty$2 = + fmtty_of_precision_fmtty(prec$2, [5, ty_rest$2]); + /*<>*/ return fmtty_of_padding_fmtty + (pad$4, prec_ty$2); + case 8: + /*<>*/ var + rest$7 = fmtty$0[4], + prec$3 = fmtty$0[3], + pad$5 = fmtty$0[2], + /*<>*/ ty_rest$3 = + fmtty_of_fmt(rest$7), + /*<>*/ prec_ty$3 = + fmtty_of_precision_fmtty(prec$3, [6, ty_rest$3]); + /*<>*/ return fmtty_of_padding_fmtty + (pad$5, prec_ty$3); + case 9: + var rest$8 = fmtty$0[2], pad$6 = fmtty$0[1]; + /*<>*/ return fmtty_of_padding_fmtty + (pad$6, [7, fmtty_of_fmt(rest$8)]); + case 10: + var fmtty$1 = fmtty$0[1], fmtty$0 = fmtty$1; break; + case 11: + var fmtty$2 = fmtty$0[2], fmtty$0 = fmtty$2; break; + case 12: + var fmtty$3 = fmtty$0[2], fmtty$0 = fmtty$3; break; + case 13: + var rest$9 = fmtty$0[3], ty = fmtty$0[2]; + /*<>*/ return [8, + ty, + fmtty_of_fmt(rest$9)]; + case 14: + var rest$10 = fmtty$0[3], ty$0 = fmtty$0[2]; + /*<>*/ return [9, + ty$0, + ty$0, + fmtty_of_fmt(rest$10)]; + case 15: + var rest$11 = fmtty$0[1]; + /*<>*/ return [10, + fmtty_of_fmt(rest$11)]; + case 16: + var rest$12 = fmtty$0[1]; + /*<>*/ return [11, + fmtty_of_fmt(rest$12)]; + case 17: + var fmtty$4 = fmtty$0[2], fmtty$0 = fmtty$4; break; + case 18: + /*<>*/ var + rest$13 = fmtty$0[2], + formatting_gen = fmtty$0[1], + /*<>*/ _db_ = fmtty_of_fmt(rest$13); + if(0 === formatting_gen[0]) + var fmt = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt); + else + var fmt$0 = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt$0); + /*<>*/ return /*<>*/ caml_call2 + (CamlinternalFormatBasics[1], _dc_, _db_); + case 19: + var rest$14 = fmtty$0[1]; + /*<>*/ return [13, + fmtty_of_fmt(rest$14)]; + case 20: + var rest$15 = fmtty$0[3]; + /*<>*/ return [1, + fmtty_of_fmt(rest$15)]; + case 21: + var rest$16 = fmtty$0[2]; + /*<>*/ return [2, + fmtty_of_fmt(rest$16)]; + case 22: + var rest$17 = fmtty$0[1]; + /*<>*/ return [0, + fmtty_of_fmt(rest$17)]; + case 23: + var fmtty$5 = fmtty$0[2], ign = fmtty$0[1]; + if(typeof ign === "number") + switch(ign){ + case 0: + var fmtty$0 = fmtty$5; break; + case 1: + var fmtty$0 = fmtty$5; break; + case 2: + /*<>*/ return [14, + fmtty_of_fmt(fmtty$5)]; + default: var fmtty$0 = fmtty$5; + } + else + switch(ign[0]){ + case 0: + var fmtty$0 = fmtty$5; break; + case 1: + var fmtty$0 = fmtty$5; break; + case 2: + var fmtty$0 = fmtty$5; break; + case 3: + var fmtty$0 = fmtty$5; break; + case 4: + var fmtty$0 = fmtty$5; break; + case 5: + var fmtty$0 = fmtty$5; break; + case 6: + var fmtty$0 = fmtty$5; break; + case 7: + var fmtty$0 = fmtty$5; break; + case 8: + var fmtty$0 = fmtty$5; break; + case 9: + /*<>*/ var + fmtty$6 = ign[2], + /*<>*/ _dd_ = + fmtty_of_fmt(fmtty$5); + /*<>*/ return /*<>*/ caml_call2 + (CamlinternalFormatBasics[1], fmtty$6, _dd_); + case 10: + var fmtty$0 = fmtty$5; break; + default: var fmtty$0 = fmtty$5; + } + break; + default: + var rest$18 = fmtty$0[3], arity = fmtty$0[1]; + /*<>*/ return fmtty_of_custom + (arity, fmtty_of_fmt(rest$18)); + } + } + /*<>*/ } + function fmtty_of_precision_fmtty(prec, fmtty){ + /*<>*/ return typeof prec === "number" + ? prec ? [2, fmtty] : fmtty + : fmtty; + /*<>*/ } + /*<>*/ /*<>*/ var + Type_mismatch = + [248, cst_CamlinternalFormat_Type_mi, runtime.caml_fresh_oo_id(0)]; + function type_padding(pad, fmtty){ + /*<>*/ if(typeof pad === "number") + /*<>*/ return [0, 0, fmtty]; + if(0 === pad[0]){ + var w = pad[2], padty = pad[1]; + /*<>*/ return [0, [0, padty, w], fmtty]; + } + if(typeof fmtty !== "number" && 2 === fmtty[0]){ + var rest = fmtty[1], padty$0 = pad[1]; + /*<>*/ return [0, [1, padty$0], rest]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + /*<>*/ } + function type_padprec(pad, prec, fmtty){ + /*<>*/ /*<>*/ var + match = type_padding(pad, fmtty); + if(typeof prec !== "number"){ + var rest$1 = match[2], pad$2 = match[1], p = prec[1]; + /*<>*/ return [0, pad$2, [0, p], rest$1]; + } + if(! prec){ + var rest$0 = match[2], pad$1 = match[1]; + /*<>*/ return [0, pad$1, 0, rest$0]; + } + var match$0 = match[2]; + if(typeof match$0 !== "number" && 2 === match$0[0]){ + var rest = match$0[1], pad$0 = match[1]; + /*<>*/ return [0, pad$0, 1, rest]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + /*<>*/ } + function type_format(fmt, fmtty){ + /*<>*/ /*<>*/ var + _da_ = type_format_gen(fmt, fmtty); + if(typeof _da_[2] !== "number") + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + var fmt$0 = _da_[1]; + /*<>*/ return fmt$0; + /*<>*/ } + function type_ignored_param_one(ign, fmt, fmtty){ + /*<>*/ var + /*<>*/ match = + type_format_gen(fmt, fmtty), + fmtty$0 = match[2], + fmt$0 = match[1]; + /*<>*/ return [0, + [23, ign, fmt$0], + fmtty$0]; + /*<>*/ } + function type_format_gen(fmt, fmtty0){ + /*<>*/ if(typeof fmt === "number") + /*<>*/ return [0, 0, fmtty0]; + switch(fmt[0]){ + case 0: + if(typeof fmtty0 !== "number" && 0 === fmtty0[0]){ + /*<>*/ var + fmtty_rest = fmtty0[1], + fmt_rest = fmt[1], + /*<>*/ match = + type_format_gen(fmt_rest, fmtty_rest), + fmtty = match[2], + fmt$0 = match[1]; + /*<>*/ return [0, [0, fmt$0], fmtty]; + } + break; + case 1: + if(typeof fmtty0 !== "number" && 0 === fmtty0[0]){ + /*<>*/ var + fmtty_rest$0 = fmtty0[1], + fmt_rest$0 = fmt[1], + /*<>*/ match$0 = + type_format_gen(fmt_rest$0, fmtty_rest$0), + fmtty$0 = match$0[2], + fmt$1 = match$0[1]; + /*<>*/ return [0, [1, fmt$1], fmtty$0]; + } + break; + case 2: + /*<>*/ var + fmt_rest$1 = fmt[2], + pad = fmt[1], + /*<>*/ match$1 = + type_padding(pad, fmtty0), + pad$0 = match$1[1], + match$2 = match$1[2]; + if(typeof match$2 !== "number" && 1 === match$2[0]){ + /*<>*/ var + fmtty_rest$1 = match$2[1], + /*<>*/ match$3 = + type_format_gen(fmt_rest$1, fmtty_rest$1), + fmtty$1 = match$3[2], + fmt$2 = match$3[1]; + /*<>*/ return [0, + [2, pad$0, fmt$2], + fmtty$1]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + case 3: + /*<>*/ var + fmt_rest$2 = fmt[2], + pad$1 = fmt[1], + /*<>*/ match$4 = + type_padding(pad$1, fmtty0), + pad$2 = match$4[1], + match$5 = match$4[2]; + if(typeof match$5 !== "number" && 1 === match$5[0]){ + /*<>*/ var + fmtty_rest$2 = match$5[1], + /*<>*/ match$6 = + type_format_gen(fmt_rest$2, fmtty_rest$2), + fmtty$2 = match$6[2], + fmt$3 = match$6[1]; + /*<>*/ return [0, + [3, pad$2, fmt$3], + fmtty$2]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + case 4: + /*<>*/ var + fmt_rest$3 = fmt[4], + prec = fmt[3], + pad$3 = fmt[2], + iconv = fmt[1], + /*<>*/ match$7 = + type_padprec(pad$3, prec, fmtty0), + pad$4 = match$7[1], + match$8 = match$7[3]; + if(typeof match$8 !== "number" && 2 === match$8[0]){ + /*<>*/ var + fmtty_rest$3 = match$8[1], + prec$0 = match$7[2], + /*<>*/ match$9 = + type_format_gen(fmt_rest$3, fmtty_rest$3), + fmtty$3 = match$9[2], + fmt$4 = match$9[1]; + /*<>*/ return [0, + [4, iconv, pad$4, prec$0, fmt$4], + fmtty$3]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + case 5: + /*<>*/ var + fmt_rest$4 = fmt[4], + prec$1 = fmt[3], + pad$5 = fmt[2], + iconv$0 = fmt[1], + /*<>*/ match$10 = + type_padprec(pad$5, prec$1, fmtty0), + pad$6 = match$10[1], + match$11 = match$10[3]; + if(typeof match$11 !== "number" && 3 === match$11[0]){ + /*<>*/ var + fmtty_rest$4 = match$11[1], + prec$2 = match$10[2], + /*<>*/ match$12 = + type_format_gen(fmt_rest$4, fmtty_rest$4), + fmtty$4 = match$12[2], + fmt$5 = match$12[1]; + /*<>*/ return [0, + [5, iconv$0, pad$6, prec$2, fmt$5], + fmtty$4]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + case 6: + /*<>*/ var + fmt_rest$5 = fmt[4], + prec$3 = fmt[3], + pad$7 = fmt[2], + iconv$1 = fmt[1], + /*<>*/ match$13 = + type_padprec(pad$7, prec$3, fmtty0), + pad$8 = match$13[1], + match$14 = match$13[3]; + if(typeof match$14 !== "number" && 4 === match$14[0]){ + /*<>*/ var + fmtty_rest$5 = match$14[1], + prec$4 = match$13[2], + /*<>*/ match$15 = + type_format_gen(fmt_rest$5, fmtty_rest$5), + fmtty$5 = match$15[2], + fmt$6 = match$15[1]; + /*<>*/ return [0, + [6, iconv$1, pad$8, prec$4, fmt$6], + fmtty$5]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + case 7: + /*<>*/ var + fmt_rest$6 = fmt[4], + prec$5 = fmt[3], + pad$9 = fmt[2], + iconv$2 = fmt[1], + /*<>*/ match$16 = + type_padprec(pad$9, prec$5, fmtty0), + pad$10 = match$16[1], + match$17 = match$16[3]; + if(typeof match$17 !== "number" && 5 === match$17[0]){ + /*<>*/ var + fmtty_rest$6 = match$17[1], + prec$6 = match$16[2], + /*<>*/ match$18 = + type_format_gen(fmt_rest$6, fmtty_rest$6), + fmtty$6 = match$18[2], + fmt$7 = match$18[1]; + /*<>*/ return [0, + [7, iconv$2, pad$10, prec$6, fmt$7], + fmtty$6]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + case 8: + /*<>*/ var + fmt_rest$7 = fmt[4], + prec$7 = fmt[3], + pad$11 = fmt[2], + fconv = fmt[1], + /*<>*/ match$19 = + type_padprec(pad$11, prec$7, fmtty0), + pad$12 = match$19[1], + match$20 = match$19[3]; + if(typeof match$20 !== "number" && 6 === match$20[0]){ + /*<>*/ var + fmtty_rest$7 = match$20[1], + prec$8 = match$19[2], + /*<>*/ match$21 = + type_format_gen(fmt_rest$7, fmtty_rest$7), + fmtty$7 = match$21[2], + fmt$8 = match$21[1]; + /*<>*/ return [0, + [8, fconv, pad$12, prec$8, fmt$8], + fmtty$7]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + case 9: + /*<>*/ var + fmt_rest$8 = fmt[2], + pad$13 = fmt[1], + /*<>*/ match$22 = + type_padding(pad$13, fmtty0), + pad$14 = match$22[1], + match$23 = match$22[2]; + if(typeof match$23 !== "number" && 7 === match$23[0]){ + /*<>*/ var + fmtty_rest$8 = match$23[1], + /*<>*/ match$24 = + type_format_gen(fmt_rest$8, fmtty_rest$8), + fmtty$8 = match$24[2], + fmt$9 = match$24[1]; + /*<>*/ return [0, + [9, pad$14, fmt$9], + fmtty$8]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + case 10: + /*<>*/ var + fmt_rest$9 = fmt[1], + /*<>*/ match$25 = + type_format_gen(fmt_rest$9, fmtty0), + fmtty$9 = match$25[2], + fmt$10 = match$25[1]; + /*<>*/ return [0, [10, fmt$10], fmtty$9]; + case 11: + /*<>*/ var + fmt_rest$10 = fmt[2], + str = fmt[1], + /*<>*/ match$26 = + type_format_gen(fmt_rest$10, fmtty0), + fmtty$10 = match$26[2], + fmt$11 = match$26[1]; + /*<>*/ return [0, + [11, str, fmt$11], + fmtty$10]; + case 12: + /*<>*/ var + fmt_rest$11 = fmt[2], + chr = fmt[1], + /*<>*/ match$27 = + type_format_gen(fmt_rest$11, fmtty0), + fmtty$11 = match$27[2], + fmt$12 = match$27[1]; + /*<>*/ return [0, + [12, chr, fmt$12], + fmtty$11]; + case 13: + if(typeof fmtty0 !== "number" && 8 === fmtty0[0]){ + var + fmtty_rest$9 = fmtty0[2], + sub_fmtty = fmtty0[1], + fmt_rest$12 = fmt[3], + sub_fmtty$0 = fmt[2], + pad_opt = fmt[1]; + /*<>*/ if + ( /*<>*/ caml_notequal + ([0, sub_fmtty$0], [0, sub_fmtty])) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + /*<>*/ var + /*<>*/ match$28 = + type_format_gen(fmt_rest$12, fmtty_rest$9), + fmtty$12 = match$28[2], + fmt$13 = match$28[1]; + /*<>*/ return [0, + [13, pad_opt, sub_fmtty, fmt$13], + fmtty$12]; + } + break; + case 14: + if(typeof fmtty0 !== "number" && 9 === fmtty0[0]){ + /*<>*/ var + fmtty_rest$10 = fmtty0[3], + sub_fmtty1 = fmtty0[1], + fmt_rest$13 = fmt[3], + sub_fmtty$1 = fmt[2], + pad_opt$0 = fmt[1], + /*<>*/ _c__ = + [0, + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], sub_fmtty1)]; + /*<>*/ if + ( /*<>*/ caml_notequal + ([0, + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], sub_fmtty$1)], + _c__)) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + /*<>*/ var + /*<>*/ match$29 = + type_format_gen + (fmt_rest$13, + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], fmtty_rest$10)), + fmtty$13 = match$29[2], + fmt$14 = match$29[1]; + /*<>*/ return [0, + [14, pad_opt$0, sub_fmtty1, fmt$14], + fmtty$13]; + } + break; + case 15: + if(typeof fmtty0 !== "number" && 10 === fmtty0[0]){ + /*<>*/ var + fmtty_rest$11 = fmtty0[1], + fmt_rest$14 = fmt[1], + /*<>*/ match$30 = + type_format_gen(fmt_rest$14, fmtty_rest$11), + fmtty$14 = match$30[2], + fmt$15 = match$30[1]; + /*<>*/ return [0, + [15, fmt$15], + fmtty$14]; + } + break; + case 16: + if(typeof fmtty0 !== "number" && 11 === fmtty0[0]){ + /*<>*/ var + fmtty_rest$12 = fmtty0[1], + fmt_rest$15 = fmt[1], + /*<>*/ match$31 = + type_format_gen(fmt_rest$15, fmtty_rest$12), + fmtty$15 = match$31[2], + fmt$16 = match$31[1]; + /*<>*/ return [0, + [16, fmt$16], + fmtty$15]; + } + break; + case 17: + /*<>*/ var + fmt_rest$16 = fmt[2], + formatting_lit = fmt[1], + /*<>*/ match$32 = + type_format_gen(fmt_rest$16, fmtty0), + fmtty$16 = match$32[2], + fmt$17 = match$32[1]; + /*<>*/ return [0, + [17, formatting_lit, fmt$17], + fmtty$16]; + case 18: + var fmt_rest$17 = fmt[2], formatting_gen = fmt[1]; + if(0 === formatting_gen[0]){ + /*<>*/ var + match$36 = formatting_gen[1], + str$0 = match$36[2], + fmt1 = match$36[1], + /*<>*/ match$37 = + type_format_gen(fmt1, fmtty0), + fmtty2 = match$37[2], + fmt2 = match$37[1], + /*<>*/ match$38 = + type_format_gen(fmt_rest$17, fmtty2), + fmtty3 = match$38[2], + fmt3 = match$38[1]; + /*<>*/ return [0, + [18, [0, [0, fmt2, str$0]], fmt3], + fmtty3]; + } + /*<>*/ var + match$39 = formatting_gen[1], + str$1 = match$39[2], + fmt1$0 = match$39[1], + /*<>*/ match$40 = + type_format_gen(fmt1$0, fmtty0), + fmtty2$0 = match$40[2], + fmt2$0 = match$40[1], + /*<>*/ match$41 = + type_format_gen(fmt_rest$17, fmtty2$0), + fmtty3$0 = match$41[2], + fmt3$0 = match$41[1]; + /*<>*/ return [0, + [18, [1, [0, fmt2$0, str$1]], fmt3$0], + fmtty3$0]; + case 19: + if(typeof fmtty0 !== "number" && 13 === fmtty0[0]){ + /*<>*/ var + fmtty_rest$13 = fmtty0[1], + fmt_rest$18 = fmt[1], + /*<>*/ match$33 = + type_format_gen(fmt_rest$18, fmtty_rest$13), + fmtty$17 = match$33[2], + fmt$18 = match$33[1]; + /*<>*/ return [0, + [19, fmt$18], + fmtty$17]; + } + break; + case 20: + if(typeof fmtty0 !== "number" && 1 === fmtty0[0]){ + /*<>*/ var + fmtty_rest$14 = fmtty0[1], + fmt_rest$19 = fmt[3], + char_set = fmt[2], + width_opt = fmt[1], + /*<>*/ match$34 = + type_format_gen(fmt_rest$19, fmtty_rest$14), + fmtty$18 = match$34[2], + fmt$19 = match$34[1]; + /*<>*/ return [0, + [20, width_opt, char_set, fmt$19], + fmtty$18]; + } + break; + case 21: + if(typeof fmtty0 !== "number" && 2 === fmtty0[0]){ + /*<>*/ var + fmtty_rest$15 = fmtty0[1], + fmt_rest$20 = fmt[2], + counter = fmt[1], + /*<>*/ match$35 = + type_format_gen(fmt_rest$20, fmtty_rest$15), + fmtty$19 = match$35[2], + fmt$20 = match$35[1]; + /*<>*/ return [0, + [21, counter, fmt$20], + fmtty$19]; + } + break; + case 23: + var rest = fmt[2], ign = fmt[1]; + if(typeof ign !== "number") + switch(ign[0]){ + case 0: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 1: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 2: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 3: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 4: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 5: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 6: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 7: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 8: + var sub_fmtty$2 = ign[2], pad_opt$1 = ign[1]; + /*<>*/ return type_ignored_param_one + ([8, pad_opt$1, sub_fmtty$2], rest, fmtty0); + case 9: + /*<>*/ var + sub_fmtty$3 = ign[2], + pad_opt$2 = ign[1], + /*<>*/ _c$_ = + type_ignored_format_substituti(sub_fmtty$3, rest, fmtty0), + match$43 = _c$_[2], + fmtty$21 = match$43[2], + fmt$22 = match$43[1], + sub_fmtty$4 = _c$_[1]; + /*<>*/ return [0, + [23, [9, pad_opt$2, sub_fmtty$4], fmt$22], + fmtty$21]; + case 10: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + default: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + } + switch(ign){ + case 0: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 1: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + case 2: + if(typeof fmtty0 !== "number" && 14 === fmtty0[0]){ + /*<>*/ var + fmtty_rest$16 = fmtty0[1], + /*<>*/ match$42 = + type_format_gen(rest, fmtty_rest$16), + fmtty$20 = match$42[2], + fmt$21 = match$42[1]; + /*<>*/ return [0, + [23, 2, fmt$21], + fmtty$20]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + default: + /*<>*/ return type_ignored_param_one + (ign, rest, fmtty0); + } + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + /*<>*/ } + function type_ignored_format_substituti(sub_fmtty, fmt, fmtty){ + /*<>*/ if(typeof sub_fmtty === "number") + /*<>*/ return [0, + 0, + type_format_gen(fmt, fmtty)]; + switch(sub_fmtty[0]){ + case 0: + if(typeof fmtty !== "number" && 0 === fmtty[0]){ + /*<>*/ var + fmtty_rest = fmtty[1], + sub_fmtty_rest = sub_fmtty[1], + /*<>*/ match = + type_ignored_format_substituti(sub_fmtty_rest, fmt, fmtty_rest), + fmt$0 = match[2], + sub_fmtty_rest$0 = match[1]; + /*<>*/ return [0, + [0, sub_fmtty_rest$0], + fmt$0]; + } + break; + case 1: + if(typeof fmtty !== "number" && 1 === fmtty[0]){ + /*<>*/ var + fmtty_rest$0 = fmtty[1], + sub_fmtty_rest$1 = sub_fmtty[1], + /*<>*/ match$0 = + type_ignored_format_substituti(sub_fmtty_rest$1, fmt, fmtty_rest$0), + fmt$1 = match$0[2], + sub_fmtty_rest$2 = match$0[1]; + /*<>*/ return [0, + [1, sub_fmtty_rest$2], + fmt$1]; + } + break; + case 2: + if(typeof fmtty !== "number" && 2 === fmtty[0]){ + /*<>*/ var + fmtty_rest$1 = fmtty[1], + sub_fmtty_rest$3 = sub_fmtty[1], + /*<>*/ match$1 = + type_ignored_format_substituti(sub_fmtty_rest$3, fmt, fmtty_rest$1), + fmt$2 = match$1[2], + sub_fmtty_rest$4 = match$1[1]; + /*<>*/ return [0, + [2, sub_fmtty_rest$4], + fmt$2]; + } + break; + case 3: + if(typeof fmtty !== "number" && 3 === fmtty[0]){ + /*<>*/ var + fmtty_rest$2 = fmtty[1], + sub_fmtty_rest$5 = sub_fmtty[1], + /*<>*/ match$2 = + type_ignored_format_substituti(sub_fmtty_rest$5, fmt, fmtty_rest$2), + fmt$3 = match$2[2], + sub_fmtty_rest$6 = match$2[1]; + /*<>*/ return [0, + [3, sub_fmtty_rest$6], + fmt$3]; + } + break; + case 4: + if(typeof fmtty !== "number" && 4 === fmtty[0]){ + /*<>*/ var + fmtty_rest$3 = fmtty[1], + sub_fmtty_rest$7 = sub_fmtty[1], + /*<>*/ match$3 = + type_ignored_format_substituti(sub_fmtty_rest$7, fmt, fmtty_rest$3), + fmt$4 = match$3[2], + sub_fmtty_rest$8 = match$3[1]; + /*<>*/ return [0, + [4, sub_fmtty_rest$8], + fmt$4]; + } + break; + case 5: + if(typeof fmtty !== "number" && 5 === fmtty[0]){ + /*<>*/ var + fmtty_rest$4 = fmtty[1], + sub_fmtty_rest$9 = sub_fmtty[1], + /*<>*/ match$4 = + type_ignored_format_substituti(sub_fmtty_rest$9, fmt, fmtty_rest$4), + fmt$5 = match$4[2], + sub_fmtty_rest$10 = match$4[1]; + /*<>*/ return [0, + [5, sub_fmtty_rest$10], + fmt$5]; + } + break; + case 6: + if(typeof fmtty !== "number" && 6 === fmtty[0]){ + /*<>*/ var + fmtty_rest$5 = fmtty[1], + sub_fmtty_rest$11 = sub_fmtty[1], + /*<>*/ match$5 = + type_ignored_format_substituti + (sub_fmtty_rest$11, fmt, fmtty_rest$5), + fmt$6 = match$5[2], + sub_fmtty_rest$12 = match$5[1]; + /*<>*/ return [0, + [6, sub_fmtty_rest$12], + fmt$6]; + } + break; + case 7: + if(typeof fmtty !== "number" && 7 === fmtty[0]){ + /*<>*/ var + fmtty_rest$6 = fmtty[1], + sub_fmtty_rest$13 = sub_fmtty[1], + /*<>*/ match$6 = + type_ignored_format_substituti + (sub_fmtty_rest$13, fmt, fmtty_rest$6), + fmt$7 = match$6[2], + sub_fmtty_rest$14 = match$6[1]; + /*<>*/ return [0, + [7, sub_fmtty_rest$14], + fmt$7]; + } + break; + case 8: + if(typeof fmtty !== "number" && 8 === fmtty[0]){ + var + fmtty_rest$7 = fmtty[2], + sub2_fmtty = fmtty[1], + sub_fmtty_rest$15 = sub_fmtty[2], + sub2_fmtty$0 = sub_fmtty[1]; + /*<>*/ if + ( /*<>*/ caml_notequal + ([0, sub2_fmtty$0], [0, sub2_fmtty])) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + /*<>*/ var + /*<>*/ match$7 = + type_ignored_format_substituti + (sub_fmtty_rest$15, fmt, fmtty_rest$7), + fmt$8 = match$7[2], + sub_fmtty_rest$16 = match$7[1]; + /*<>*/ return [0, + [8, sub2_fmtty, sub_fmtty_rest$16], + fmt$8]; + } + break; + case 9: + if(typeof fmtty !== "number" && 9 === fmtty[0]){ + /*<>*/ var + fmtty_rest$8 = fmtty[3], + sub2_fmtty$1 = fmtty[2], + sub1_fmtty = fmtty[1], + sub_fmtty_rest$17 = sub_fmtty[3], + sub2_fmtty$2 = sub_fmtty[2], + sub1_fmtty$0 = sub_fmtty[1], + /*<>*/ _c8_ = + [0, + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], sub1_fmtty)]; + /*<>*/ if + ( /*<>*/ caml_notequal + ([0, + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], sub1_fmtty$0)], + _c8_)) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + /*<>*/ /*<>*/ var + _c9_ = + [0, + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], sub2_fmtty$1)]; + /*<>*/ if + ( /*<>*/ caml_notequal + ([0, + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], sub2_fmtty$2)], + _c9_)) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + /*<>*/ var + /*<>*/ sub_fmtty$0 = + trans(symm(sub1_fmtty), sub2_fmtty$1), + /*<>*/ match$8 = + fmtty_rel_det(sub_fmtty$0), + f4 = match$8[4], + f2 = match$8[2]; + /*<>*/ f2(0); + /*<>*/ f4(0); + /*<>*/ var + /*<>*/ match$9 = + type_ignored_format_substituti + ( /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], sub_fmtty_rest$17), + fmt, + fmtty_rest$8), + fmt$9 = match$9[2], + sub_fmtty_rest$18 = match$9[1]; + /*<>*/ return [0, + [9, sub1_fmtty, sub2_fmtty$1, symm(sub_fmtty_rest$18)], + fmt$9]; + } + break; + case 10: + if(typeof fmtty !== "number" && 10 === fmtty[0]){ + /*<>*/ var + fmtty_rest$9 = fmtty[1], + sub_fmtty_rest$19 = sub_fmtty[1], + /*<>*/ match$10 = + type_ignored_format_substituti + (sub_fmtty_rest$19, fmt, fmtty_rest$9), + fmt$10 = match$10[2], + sub_fmtty_rest$20 = match$10[1]; + /*<>*/ return [0, + [10, sub_fmtty_rest$20], + fmt$10]; + } + break; + case 11: + if(typeof fmtty !== "number" && 11 === fmtty[0]){ + /*<>*/ var + fmtty_rest$10 = fmtty[1], + sub_fmtty_rest$21 = sub_fmtty[1], + /*<>*/ match$11 = + type_ignored_format_substituti + (sub_fmtty_rest$21, fmt, fmtty_rest$10), + fmt$11 = match$11[2], + sub_fmtty_rest$22 = match$11[1]; + /*<>*/ return [0, + [11, sub_fmtty_rest$22], + fmt$11]; + } + break; + case 13: + if(typeof fmtty !== "number" && 13 === fmtty[0]){ + /*<>*/ var + fmtty_rest$11 = fmtty[1], + sub_fmtty_rest$23 = sub_fmtty[1], + /*<>*/ match$12 = + type_ignored_format_substituti + (sub_fmtty_rest$23, fmt, fmtty_rest$11), + fmt$12 = match$12[2], + sub_fmtty_rest$24 = match$12[1]; + /*<>*/ return [0, + [13, sub_fmtty_rest$24], + fmt$12]; + } + break; + case 14: + if(typeof fmtty !== "number" && 14 === fmtty[0]){ + /*<>*/ var + fmtty_rest$12 = fmtty[1], + sub_fmtty_rest$25 = sub_fmtty[1], + /*<>*/ match$13 = + type_ignored_format_substituti + (sub_fmtty_rest$25, fmt, fmtty_rest$12), + fmt$13 = match$13[2], + sub_fmtty_rest$26 = match$13[1]; + /*<>*/ return [0, + [14, sub_fmtty_rest$26], + fmt$13]; + } + break; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Type_mismatch, 1); + /*<>*/ } + function recast(fmt, fmtty){ + /*<>*/ /*<>*/ var + _c7_ = symm(fmtty); + /*<>*/ return type_format + (fmt, + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], _c7_)); + /*<>*/ } + 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); + if(width$0 <= len) /*<>*/ return str; + /*<>*/ var + _c6_ = 2 === padty$0 ? 48 : 32, + /*<>*/ res = + /*<>*/ caml_call2 + (Stdlib_Bytes[1], width$0, _c6_); + /*<>*/ switch(padty$0){ + case 0: + /*<>*/ /*<>*/ caml_call5 + (Stdlib_String[48], str, 0, res, 0, len); + break; + case 1: + /*<>*/ /*<>*/ caml_call5 + (Stdlib_String[48], str, 0, res, width$0 - len | 0, len); + break; + default: + a: + if(0 < len){ + /*<>*/ if + (43 + !== /*<>*/ caml_string_get(str, 0) + && + 45 + !== /*<>*/ caml_string_get(str, 0) + && + 32 + !== /*<>*/ caml_string_get(str, 0)) + break a; + /*<>*/ /*<>*/ caml_bytes_set + (res, + 0, + /*<>*/ caml_string_get(str, 0)); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_String[48], + str, + 1, + res, + (width$0 - len | 0) + 1 | 0, + len - 1 | 0); + break; + } + a: + if + (1 < len + && + 48 + === /*<>*/ caml_string_get(str, 0)){ + /*<>*/ if + (120 + !== /*<>*/ caml_string_get(str, 1) + && + 88 + !== /*<>*/ caml_string_get(str, 1)) + break a; + /*<>*/ /*<>*/ caml_bytes_set + (res, + 1, + /*<>*/ caml_string_get(str, 1)); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_String[48], + str, + 2, + res, + (width$0 - len | 0) + 2 | 0, + len - 2 | 0); + break; + } + /*<>*/ /*<>*/ caml_call5 + (Stdlib_String[48], str, 0, res, width$0 - len | 0, len); + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], res); + /*<>*/ } + function fix_int_precision(prec, str){ + /*<>*/ var + /*<>*/ prec$0 = + /*<>*/ caml_call1(Stdlib[18], prec), + /*<>*/ len = + /*<>*/ caml_ml_string_length(str), + /*<>*/ c = + /*<>*/ caml_string_get(str, 0); + a: + { + b: + { + if(58 > c){ + if(32 !== c){ + if(43 > c) break a; + switch(c - 43 | 0){ + case 5: + c: + if(len < (prec$0 + 2 | 0) && 1 < len){ + /*<>*/ if + (120 + !== + /*<>*/ caml_string_get(str, 1) + && + 88 + !== + /*<>*/ caml_string_get(str, 1)) + break c; + /*<>*/ /*<>*/ var + res$1 = + /*<>*/ caml_call2 + (Stdlib_Bytes[1], prec$0 + 2 | 0, 48); + /*<>*/ /*<>*/ caml_bytes_set + (res$1, + 1, + /*<>*/ caml_string_get(str, 1)); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_String[48], + str, + 2, + res$1, + (prec$0 - len | 0) + 4 | 0, + len - 2 | 0); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], res$1); + } + break b; + case 0: + case 2: break; + case 1: + case 3: + case 4: + break a; + default: break b; + } + } + if(len >= (prec$0 + 1 | 0)) break a; + /*<>*/ /*<>*/ var + res$0 = + /*<>*/ caml_call2 + (Stdlib_Bytes[1], prec$0 + 1 | 0, 48); + /*<>*/ /*<>*/ caml_bytes_set + (res$0, 0, c); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_String[48], + str, + 1, + res$0, + (prec$0 - len | 0) + 2 | 0, + len - 1 | 0); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], res$0); + } + if(71 <= c){if(5 < c - 97 >>> 0) break a;} else if(65 > c) break a; + } + if(len < prec$0){ + /*<>*/ /*<>*/ var + res = + /*<>*/ caml_call2 + (Stdlib_Bytes[1], prec$0, 48); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_String[48], str, 0, res, prec$0 - len | 0, len); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], res); + } + } + /*<>*/ return str; + /*<>*/ } + function string_to_caml_string(str){ + /*<>*/ var + /*<>*/ str$0 = + /*<>*/ caml_call1 + (Stdlib_String[24], str), + /*<>*/ l = + /*<>*/ caml_ml_string_length(str$0), + /*<>*/ res = + /*<>*/ caml_call2 + (Stdlib_Bytes[1], l + 2 | 0, 34); + /*<>*/ /*<>*/ caml_blit_string + (str$0, 0, res, 1, l); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], res); + /*<>*/ } + function format_of_fconv(fconv, prec){ + /*<>*/ var + /*<>*/ prec$0 = + /*<>*/ caml_call1(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)); + /*<>*/ buffer_add_char(buf, symb); + /*<>*/ return buffer_contents(buf); + /*<>*/ } + function transform_int_alt(iconv, s){ + /*<>*/ if(13 > iconv) + /*<>*/ return s; + /*<>*/ var + /*<>*/ n = [0, 0], + _c1_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c0_ = 0; + if(_c1_ >= 0){ + var i$0 = _c0_; + for(;;){ + if(9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) n[1]++; + /*<>*/ /*<>*/ var + _c5_ = i$0 + 1 | 0; + if(_c1_ === i$0) break; + var i$0 = _c5_; + } + } + /*<>*/ var + digits = n[1], + /*<>*/ buf = + /*<>*/ caml_create_bytes + (caml_ml_string_length(s) + ((digits - 1 | 0) / 3 | 0) | 0), + /*<>*/ pos = [0, 0]; + function put(c){ + /*<>*/ /*<>*/ caml_bytes_set + (buf, pos[1], c); + pos[1]++; + return 0; + /*<>*/ } + /*<>*/ var + /*<>*/ left = + [0, ((digits - 1 | 0) % 3 | 0) + 1 | 0], + _c3_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c2_ = 0; + if(_c3_ >= 0){ + var i = _c2_; + for(;;){ + var c = caml_string_unsafe_get(s, i); + if(9 < c - 48 >>> 0) + /*<>*/ put(c); + else{ + if(0 === left[1]){ + /*<>*/ put(95); + left[1] = 3; + } + left[1] += -1; + /*<>*/ put(c); + } + /*<>*/ /*<>*/ var + _c4_ = i + 1 | 0; + if(_c3_ === i) break; + var i = _c4_; + } + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], buf); + /*<>*/ } + function convert_int(iconv, n){ + /*<>*/ switch(iconv){ + case 1: + var _cZ_ = cst_d$0; break; + case 2: + var _cZ_ = cst_d$1; break; + case 4: + var _cZ_ = cst_i$1; break; + case 5: + var _cZ_ = cst_i$2; break; + case 6: + var _cZ_ = cst_x; break; + case 7: + var _cZ_ = cst_x$0; break; + case 8: + var _cZ_ = cst_X; break; + case 9: + var _cZ_ = cst_X$0; break; + case 10: + var _cZ_ = cst_o; break; + case 11: + var _cZ_ = cst_o$0; break; + case 0: + case 13: + var _cZ_ = cst_d; break; + case 3: + case 14: + var _cZ_ = cst_i$0; break; + default: var _cZ_ = cst_u; + } + /*<>*/ return transform_int_alt + (iconv, + /*<>*/ caml_format_int(_cZ_, n)); + /*<>*/ } + function convert_int32(iconv, n){ + /*<>*/ switch(iconv){ + case 1: + var _cY_ = cst_ld$0; break; + case 2: + var _cY_ = cst_ld$1; break; + case 4: + var _cY_ = cst_li$1; break; + case 5: + var _cY_ = cst_li$2; break; + case 6: + var _cY_ = cst_lx; break; + case 7: + var _cY_ = cst_lx$0; break; + case 8: + var _cY_ = cst_lX; break; + case 9: + var _cY_ = cst_lX$0; break; + case 10: + var _cY_ = cst_lo; break; + case 11: + var _cY_ = cst_lo$0; break; + case 0: + case 13: + var _cY_ = cst_ld; break; + case 3: + case 14: + var _cY_ = cst_li$0; break; + default: var _cY_ = cst_lu; + } + /*<>*/ return transform_int_alt + (iconv, + /*<>*/ caml_format_int(_cY_, n)); + /*<>*/ } + function convert_nativeint(iconv, n){ + /*<>*/ switch(iconv){ + case 1: + var _cX_ = cst_nd$0; break; + case 2: + var _cX_ = cst_nd$1; break; + case 4: + var _cX_ = cst_ni$1; break; + case 5: + var _cX_ = cst_ni$2; break; + case 6: + var _cX_ = cst_nx; break; + case 7: + var _cX_ = cst_nx$0; break; + case 8: + var _cX_ = cst_nX; break; + case 9: + var _cX_ = cst_nX$0; break; + case 10: + var _cX_ = cst_no; break; + case 11: + var _cX_ = cst_no$0; break; + case 0: + case 13: + var _cX_ = cst_nd; break; + case 3: + case 14: + var _cX_ = cst_ni$0; break; + default: var _cX_ = cst_nu; + } + /*<>*/ return transform_int_alt + (iconv, + /*<>*/ caml_format_int(_cX_, n)); + /*<>*/ } + function convert_int64(iconv, n){ + /*<>*/ switch(iconv){ + case 1: + var _cW_ = cst_Ld$0; break; + case 2: + var _cW_ = cst_Ld$1; break; + case 4: + var _cW_ = cst_Li$1; break; + case 5: + var _cW_ = cst_Li$2; break; + case 6: + var _cW_ = cst_Lx; break; + case 7: + var _cW_ = cst_Lx$0; break; + case 8: + var _cW_ = cst_LX; break; + case 9: + var _cW_ = cst_LX$0; break; + case 10: + var _cW_ = cst_Lo; break; + case 11: + var _cW_ = cst_Lo$0; break; + case 0: + case 13: + var _cW_ = cst_Ld; break; + case 3: + case 14: + var _cW_ = cst_Li$0; break; + default: var _cW_ = cst_Lu; + } + /*<>*/ return transform_int_alt + (iconv, + /*<>*/ runtime.caml_int64_format + (_cW_, n)); + /*<>*/ } + function convert_float(fconv, prec, x){ + function hex(param){ + /*<>*/ switch(fconv[1]){ + case 0: + var sign = 45; break; + case 1: + var sign = 43; break; + default: var sign = 32; + } + /*<>*/ return /*<>*/ runtime.caml_hexstring_of_float + (x, prec, sign); + /*<>*/ } + /*<>*/ function caml_special_val(str){ + /*<>*/ /*<>*/ var + match = + /*<>*/ runtime.caml_classify_float(x); + return 3 === match + ? x < 0. ? cst_neg_infinity : cst_infinity + : 4 <= match ? cst_nan : str; + /*<>*/ } + switch(fconv[2]){ + case 5: + /*<>*/ var + /*<>*/ str = + /*<>*/ caml_format_float + (format_of_fconv(fconv, prec), x), + len = caml_ml_string_length(str), + i = 0; + /*<>*/ for(;;){ + if(i === len) + var _cT_ = 0; + else{ + /*<>*/ /*<>*/ var + _cS_ = + /*<>*/ caml_string_get(str, i) + - 46 + | 0; + a: + { + if(23 < _cS_ >>> 0){ + if(55 === _cS_) break a; + } + else if(21 < _cS_ - 1 >>> 0) break a; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + continue; + } + var _cT_ = 1; + } + /*<>*/ /*<>*/ var + _cU_ = + _cT_ + ? str + : /*<>*/ caml_call2 + (Stdlib[28], str, cst$17); + /*<>*/ return caml_special_val(_cU_); + } + case 6: + /*<>*/ return hex(0); + case 7: + /*<>*/ /*<>*/ var + _cV_ = hex(0); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_String[25], _cV_); + case 8: + /*<>*/ return caml_special_val(hex(0)); + default: + /*<>*/ return /*<>*/ caml_format_float + (format_of_fconv(fconv, prec), x); + } + /*<>*/ } + function string_of_fmtty(fmtty){ + /*<>*/ /*<>*/ var + buf = buffer_create(16); + /*<>*/ bprint_fmtty(buf, fmtty); + /*<>*/ return buffer_contents(buf); + /*<>*/ } + function make_int_padding_precision(k, acc, fmt, pad, prec, trans, iconv){ + /*<>*/ if(typeof pad === "number"){ + if(typeof prec === "number") + return prec + ? function + (p, x){ + /*<>*/ /*<>*/ var + str = + fix_int_precision + (p, + /*<>*/ caml_call2 + (trans, iconv, x)); + /*<>*/ return make_printf + (k, [4, acc, str], fmt); + /*<>*/ } + : function + (x){ + /*<>*/ /*<>*/ var + str = + /*<>*/ caml_call2 + (trans, iconv, x); + /*<>*/ return make_printf + (k, [4, acc, str], fmt); + /*<>*/ }; + var p = prec[1]; + /*<>*/ return function(x){ + /*<>*/ /*<>*/ var + str = + fix_int_precision + (p, + /*<>*/ caml_call2(trans, iconv, x)); + /*<>*/ return make_printf + (k, [4, acc, str], fmt); /*<>*/ }; + } + if(0 === pad[0]){ + var w = pad[2], padty = pad[1]; + if(typeof prec === "number") + return prec + ? function + (p, x){ + /*<>*/ /*<>*/ var + str = + fix_padding + (padty, + w, + fix_int_precision + (p, + /*<>*/ caml_call2 + (trans, iconv, x))); + /*<>*/ return make_printf + (k, [4, acc, str], fmt); + /*<>*/ } + : function + (x){ + /*<>*/ /*<>*/ var + str = + fix_padding + (padty, + w, + /*<>*/ caml_call2 + (trans, iconv, x)); + /*<>*/ return make_printf + (k, [4, acc, str], fmt); + /*<>*/ }; + var p$0 = prec[1]; + /*<>*/ return function(x){ + /*<>*/ /*<>*/ var + str = + fix_padding + (padty, + w, + fix_int_precision + (p$0, + /*<>*/ caml_call2 + (trans, iconv, x))); + /*<>*/ return make_printf + (k, [4, acc, str], fmt); /*<>*/ }; + } + var padty$0 = pad[1]; + if(typeof prec === "number") + return prec + ? function + (w, p, x){ + /*<>*/ /*<>*/ var + str = + fix_padding + (padty$0, + w, + fix_int_precision + (p, + /*<>*/ caml_call2 + (trans, iconv, x))); + /*<>*/ return make_printf + (k, [4, acc, str], fmt); + /*<>*/ } + : function + (w, x){ + /*<>*/ /*<>*/ var + str = + fix_padding + (padty$0, + w, + /*<>*/ caml_call2 + (trans, iconv, x)); + /*<>*/ return make_printf + (k, [4, acc, str], fmt); + /*<>*/ }; + var p$1 = prec[1]; + /*<>*/ return function(w, x){ + /*<>*/ /*<>*/ var + str = + fix_padding + (padty$0, + w, + fix_int_precision + (p$1, + /*<>*/ caml_call2(trans, iconv, x))); + /*<>*/ return make_printf + (k, [4, acc, str], fmt); /*<>*/ }; + /*<>*/ } + function make_padding(k, acc, fmt, pad, trans){ + /*<>*/ if(typeof pad === "number") + /*<>*/ return function(x){ + /*<>*/ /*<>*/ var + new_acc = + [4, acc, /*<>*/ caml_call1(trans, x)]; + /*<>*/ return make_printf + (k, new_acc, fmt); /*<>*/ }; + if(0 === pad[0]){ + var width = pad[2], padty = pad[1]; + /*<>*/ return function(x){ + /*<>*/ /*<>*/ var + new_acc = + [4, + acc, + fix_padding + (padty, + width, + /*<>*/ caml_call1(trans, x))]; + /*<>*/ return make_printf + (k, new_acc, fmt); /*<>*/ }; + } + var padty$0 = pad[1]; + /*<>*/ return function(w, x){ + /*<>*/ /*<>*/ var + new_acc = + [4, + acc, + fix_padding + (padty$0, + w, + /*<>*/ caml_call1(trans, x))]; + /*<>*/ return make_printf(k, new_acc, fmt); /*<>*/ }; + /*<>*/ } + function make_printf$0(counter, k, acc, fmt){ + /*<>*/ var + k$0 = k, + acc$0 = acc, + fmt$0 = fmt; + /*<>*/ for(;;){ + if(typeof fmt$0 === "number") + /*<>*/ return /*<>*/ caml_call1 + (k$0, acc$0); + switch(fmt$0[0]){ + case 0: + var rest = fmt$0[1]; + /*<>*/ return function(c){ + /*<>*/ /*<>*/ var + new_acc = [5, acc$0, c]; + /*<>*/ return make_printf + (k$0, new_acc, rest); /*<>*/ }; + case 1: + var rest$0 = fmt$0[1]; + /*<>*/ return function(c){ + /*<>*/ var + /*<>*/ str = + /*<>*/ caml_call1 + (Stdlib_Char[2], c), + /*<>*/ l = + /*<>*/ caml_ml_string_length(str), + /*<>*/ res = + /*<>*/ caml_call2 + (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)]; + /*<>*/ return make_printf + (k$0, new_acc, rest$0); /*<>*/ }; + case 2: + var rest$1 = fmt$0[2], pad = fmt$0[1]; + /*<>*/ return make_padding + (k$0, + acc$0, + rest$1, + pad, + function(str){ + /*<>*/ return str; + /*<>*/ }); + case 3: + var rest$2 = fmt$0[2], pad$0 = fmt$0[1]; + /*<>*/ return make_padding + (k$0, acc$0, rest$2, pad$0, string_to_caml_string); + case 4: + var + rest$3 = fmt$0[4], + prec = fmt$0[3], + pad$1 = fmt$0[2], + iconv = fmt$0[1]; + /*<>*/ return make_int_padding_precision + (k$0, acc$0, rest$3, pad$1, prec, convert_int, iconv); + case 5: + var + rest$4 = fmt$0[4], + prec$0 = fmt$0[3], + pad$2 = fmt$0[2], + iconv$0 = fmt$0[1]; + /*<>*/ return make_int_padding_precision + (k$0, acc$0, rest$4, pad$2, prec$0, convert_int32, iconv$0); + case 6: + var + rest$5 = fmt$0[4], + prec$1 = fmt$0[3], + pad$3 = fmt$0[2], + iconv$1 = fmt$0[1]; + /*<>*/ return make_int_padding_precision + (k$0, + acc$0, + rest$5, + pad$3, + prec$1, + convert_nativeint, + iconv$1); + case 7: + var + rest$6 = fmt$0[4], + prec$2 = fmt$0[3], + pad$4 = fmt$0[2], + iconv$2 = fmt$0[1]; + /*<>*/ return make_int_padding_precision + (k$0, acc$0, rest$6, pad$4, prec$2, convert_int64, iconv$2); + case 8: + var + rest$7 = fmt$0[4], + prec$3 = fmt$0[3], + pad$5 = fmt$0[2], + fconv = fmt$0[1]; + if(typeof pad$5 === "number"){ + if(typeof prec$3 === "number") + return prec$3 + ? function + (p, x){ + /*<>*/ /*<>*/ var + str = convert_float(fconv, p, x); + /*<>*/ return make_printf + (k$0, [4, acc$0, str], rest$7); + /*<>*/ } + : function + (x){ + /*<>*/ /*<>*/ var + str = + convert_float(fconv, default_float_precision(fconv), x); + /*<>*/ return make_printf + (k$0, [4, acc$0, str], rest$7); + /*<>*/ }; + var p = prec$3[1]; + /*<>*/ return function(x){ + /*<>*/ /*<>*/ var + str = convert_float(fconv, p, x); + /*<>*/ return make_printf + (k$0, [4, acc$0, str], rest$7); /*<>*/ }; + } + if(0 === pad$5[0]){ + var w = pad$5[2], padty = pad$5[1]; + if(typeof prec$3 === "number") + return prec$3 + ? function + (p, x){ + /*<>*/ /*<>*/ var + str = fix_padding(padty, w, convert_float(fconv, p, x)); + /*<>*/ return make_printf + (k$0, [4, acc$0, str], rest$7); + /*<>*/ } + : function + (x){ + /*<>*/ var + /*<>*/ str = + convert_float(fconv, default_float_precision(fconv), x), + /*<>*/ str$0 = + fix_padding(padty, w, str); + /*<>*/ return make_printf + (k$0, [4, acc$0, str$0], rest$7); + /*<>*/ }; + var p$0 = prec$3[1]; + /*<>*/ return function(x){ + /*<>*/ /*<>*/ var + str = fix_padding(padty, w, convert_float(fconv, p$0, x)); + /*<>*/ return make_printf + (k$0, [4, acc$0, str], rest$7); /*<>*/ }; + } + var padty$0 = pad$5[1]; + if(typeof prec$3 === "number") + return prec$3 + ? function + (w, p, x){ + /*<>*/ /*<>*/ var + str = fix_padding(padty$0, w, convert_float(fconv, p, x)); + /*<>*/ return make_printf + (k$0, [4, acc$0, str], rest$7); + /*<>*/ } + : function + (w, x){ + /*<>*/ var + /*<>*/ str = + convert_float(fconv, default_float_precision(fconv), x), + /*<>*/ str$0 = + fix_padding(padty$0, w, str); + /*<>*/ return make_printf + (k$0, [4, acc$0, str$0], rest$7); + /*<>*/ }; + var p$1 = prec$3[1]; + /*<>*/ return function(w, x){ + /*<>*/ /*<>*/ var + str = fix_padding(padty$0, w, convert_float(fconv, p$1, x)); + /*<>*/ return make_printf + (k$0, [4, acc$0, str], rest$7); /*<>*/ }; + case 9: + var rest$8 = fmt$0[2], pad$6 = fmt$0[1]; + /*<>*/ return make_padding + (k$0, acc$0, rest$8, pad$6, Stdlib[30]); + case 10: + /*<>*/ var + rest$9 = fmt$0[1], + /*<>*/ acc$1 = [7, acc$0], + acc$0 = acc$1, + fmt$0 = rest$9; + break; + case 11: + /*<>*/ var + rest$10 = fmt$0[2], + str = fmt$0[1], + /*<>*/ acc$2 = [2, acc$0, str], + acc$0 = acc$2, + fmt$0 = rest$10; + break; + case 12: + /*<>*/ var + rest$11 = fmt$0[2], + chr = fmt$0[1], + /*<>*/ acc$3 = [3, acc$0, chr], + acc$0 = acc$3, + fmt$0 = rest$11; + break; + case 13: + /*<>*/ var + rest$12 = fmt$0[3], + sub_fmtty = fmt$0[2], + /*<>*/ ty = + string_of_fmtty(sub_fmtty); + /*<>*/ return function(str){ + /*<>*/ return make_printf + (k$0, [4, acc$0, ty], rest$12); /*<>*/ }; + case 14: + var rest$13 = fmt$0[3], fmtty = fmt$0[2]; + /*<>*/ return function(param){ + /*<>*/ var + fmt = param[1], + /*<>*/ _cR_ = recast(fmt, fmtty); + /*<>*/ return make_printf + (k$0, + acc$0, + /*<>*/ caml_call2 + (CamlinternalFormatBasics[3], _cR_, rest$13)); /*<>*/ }; + case 15: + var rest$14 = fmt$0[1]; + /*<>*/ return function(f, x){ + /*<>*/ return make_printf + (k$0, + [6, + acc$0, + function(o){ + /*<>*/ return caml_call2 + (f, o, x); + /*<>*/ }], + rest$14); /*<>*/ }; + case 16: + var rest$15 = fmt$0[1]; + /*<>*/ return function(f){ + /*<>*/ return make_printf + (k$0, [6, acc$0, f], rest$15); /*<>*/ }; + case 17: + /*<>*/ var + rest$16 = fmt$0[2], + fmting_lit = fmt$0[1], + /*<>*/ acc$4 = [0, acc$0, fmting_lit], + acc$0 = acc$4, + fmt$0 = rest$16; + break; + case 18: + var _cP_ = fmt$0[1]; + if(0 === _cP_[0]) + var + rest$17 = fmt$0[2], + fmt$1 = _cP_[1][1], + k$3 = + function(acc, k, rest){ + function k$0(kacc){ + /*<>*/ return make_printf + (k, [1, acc, [0, kacc]], rest); + /*<>*/ } + return k$0; + }, + k$1 = k$3(acc$0, k$0, rest$17), + k$0 = k$1, + acc$0 = 0, + fmt$0 = fmt$1; + else + var + rest$18 = fmt$0[2], + fmt$2 = _cP_[1][1], + k$4 = + function(acc, k, rest){ + function k$0(kacc){ + /*<>*/ return make_printf + (k, [1, acc, [1, kacc]], rest); + /*<>*/ } + return k$0; + }, + k$2 = k$4(acc$0, k$0, rest$18), + k$0 = k$2, + acc$0 = 0, + fmt$0 = fmt$2; + break; + case 19: + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _s_], 1); + case 20: + /*<>*/ var + rest$19 = fmt$0[3], + /*<>*/ new_acc = + [8, acc$0, cst_Printf_bad_conversion]; + /*<>*/ return function(param){ + /*<>*/ return make_printf + (k$0, new_acc, rest$19); /*<>*/ }; + case 21: + var rest$20 = fmt$0[2]; + /*<>*/ return function(n){ + /*<>*/ /*<>*/ var + new_acc = + [4, + acc$0, + /*<>*/ caml_format_int + (cst_u$0, n)]; + /*<>*/ return make_printf + (k$0, new_acc, rest$20); /*<>*/ }; + case 22: + var rest$21 = fmt$0[1]; + /*<>*/ return function(c){ + /*<>*/ /*<>*/ var + new_acc = [5, acc$0, c]; + /*<>*/ return make_printf + (k$0, new_acc, rest$21); /*<>*/ }; + case 23: + var rest$22 = fmt$0[2], ign = fmt$0[1]; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_ignored_param$0, [0, k$0, acc$0, ign, rest$22]); + var counter$1 = counter + 1 | 0; + /*<>*/ return make_ignored_param$0 + (counter$1, k$0, acc$0, ign, rest$22); + default: + /*<>*/ var + rest$23 = fmt$0[3], + f = fmt$0[2], + arity = fmt$0[1], + /*<>*/ _cQ_ = + /*<>*/ caml_call1(f, 0); + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cQ_]); + var counter$0 = counter + 1 | 0; + /*<>*/ return make_custom$0 + (counter$0, k$0, acc$0, rest$23, arity, _cQ_); + } + } + /*<>*/ } + function make_ignored_param$0(counter, k, acc, ign, fmt){ + /*<>*/ if(typeof ign === "number") + switch(ign){ + case 0: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$0 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$0, k, acc, fmt); + case 1: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$1 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$1, k, acc, fmt); + case 2: + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _t_], 1); + default: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$2 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$2, k, acc, fmt); + } + switch(ign[0]){ + case 0: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$3 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$3, k, acc, fmt); + case 1: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$4 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$4, k, acc, fmt); + case 2: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$5 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$5, k, acc, fmt); + case 3: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$6 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$6, k, acc, fmt); + case 4: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$7 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$7, k, acc, fmt); + case 5: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$8 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$8, k, acc, fmt); + case 6: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$9 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$9, k, acc, fmt); + case 7: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$10 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$10, k, acc, fmt); + case 8: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$11 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$11, k, acc, fmt); + case 9: + var fmtty = ign[2]; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_from_fmtty$0, [0, k, acc, fmtty, fmt]); + var counter$14 = counter + 1 | 0; + /*<>*/ return make_from_fmtty$0 + (counter$14, k, acc, fmtty, fmt); + case 10: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$12 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$12, k, acc, fmt); + default: + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$13 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$13, k, acc, fmt); + } + /*<>*/ } + function make_from_fmtty$0(counter, k, acc, fmtty, fmt){ + /*<>*/ if(typeof fmtty !== "number") + switch(fmtty[0]){ + case 0: + var rest = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest, fmt); /*<>*/ }; + case 1: + var rest$0 = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$0, fmt); /*<>*/ }; + case 2: + var rest$1 = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$1, fmt); /*<>*/ }; + case 3: + var rest$2 = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$2, fmt); /*<>*/ }; + case 4: + var rest$3 = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$3, fmt); /*<>*/ }; + case 5: + var rest$4 = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$4, fmt); /*<>*/ }; + case 6: + var rest$5 = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$5, fmt); /*<>*/ }; + case 7: + var rest$6 = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$6, fmt); /*<>*/ }; + case 8: + var rest$7 = fmtty[2]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$7, fmt); /*<>*/ }; + case 9: + /*<>*/ var + rest$8 = fmtty[3], + ty2 = fmtty[2], + ty1 = fmtty[1], + /*<>*/ ty = trans(symm(ty1), ty2); + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, + acc, + /*<>*/ caml_call2 + (CamlinternalFormatBasics[1], ty, rest$8), + fmt); /*<>*/ }; + case 10: + var rest$9 = fmtty[1]; + /*<>*/ return function(param, _cO_){ + /*<>*/ return make_from_fmtty + (k, acc, rest$9, fmt); /*<>*/ }; + case 11: + var rest$10 = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$10, fmt); /*<>*/ }; + case 12: + var rest$11 = fmtty[1]; + /*<>*/ return function(param){ + /*<>*/ return make_from_fmtty + (k, acc, rest$11, fmt); /*<>*/ }; + case 13: + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _u_], 1); + default: + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _v_], 1); + } + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_invalid_arg, [0, k, acc, fmt]); + var counter$0 = counter + 1 | 0; + /*<>*/ return make_invalid_arg + (counter$0, k, acc, fmt); + /*<>*/ } + function make_invalid_arg(counter, k, acc, fmt){ + /*<>*/ /*<>*/ var + _cN_ = [8, acc, cst_Printf_bad_conversion$0]; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_printf$0, [0, k, _cN_, fmt]); + var counter$0 = counter + 1 | 0; + /*<>*/ return make_printf$0 + (counter$0, k, _cN_, fmt); + /*<>*/ } + function make_custom$0(counter, k, acc, rest, arity, f){ + /*<>*/ if(arity){ + var arity$0 = arity[1]; + /*<>*/ return function(x){ + /*<>*/ return make_custom + (k, + acc, + rest, + arity$0, + /*<>*/ caml_call1(f, x)); /*<>*/ }; + } + /*<>*/ /*<>*/ var + _cM_ = [4, acc, f]; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_printf$0, [0, k, _cM_, rest]); + var counter$0 = counter + 1 | 0; + /*<>*/ return make_printf$0 + (counter$0, k, _cM_, rest); + /*<>*/ } + function make_printf(k, acc, fmt){ + /*<>*/ return caml_trampoline(make_printf$0(0, k, acc, fmt)); + } + function make_ignored_param(k, acc, ign, fmt){ + /*<>*/ return caml_trampoline + (make_ignored_param$0(0, k, acc, ign, fmt)); + } + function make_from_fmtty(k, acc, fmtty, fmt){ + /*<>*/ return caml_trampoline + (make_from_fmtty$0(0, k, acc, fmtty, fmt)); + } + function make_custom(k, acc, rest, arity, f){ + /*<>*/ return caml_trampoline + (make_custom$0(0, k, acc, rest, arity, f)); + } + function fn_of_padding_precision(k, o, fmt, pad, prec){ + /*<>*/ if(typeof pad === "number"){ + if(typeof prec !== "number"){ + /*<>*/ /*<>*/ var + _cl_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cL_){ + /*<>*/ return _cl_;}; + } + if(prec){ + /*<>*/ var + /*<>*/ _ci_ = make_iprintf(k, o, fmt), + /*<>*/ _cj_ = + function(_cK_){ /*<>*/ return _ci_;}; + /*<>*/ return function(_cJ_){ + /*<>*/ return _cj_;}; + } + /*<>*/ /*<>*/ var + _ck_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cI_){ + /*<>*/ return _ck_;}; + } + if(0 === pad[0]){ + if(typeof prec !== "number"){ + /*<>*/ /*<>*/ var + _cp_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cH_){ + /*<>*/ return _cp_;}; + } + if(prec){ + /*<>*/ var + /*<>*/ _cm_ = make_iprintf(k, o, fmt), + /*<>*/ _cn_ = + function(_cG_){ /*<>*/ return _cm_;}; + /*<>*/ return function(_cF_){ + /*<>*/ return _cn_;}; + } + /*<>*/ /*<>*/ var + _co_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cE_){ + /*<>*/ return _co_;}; + } + if(typeof prec !== "number"){ + /*<>*/ var + /*<>*/ _cv_ = make_iprintf(k, o, fmt), + /*<>*/ _cw_ = + function(_cD_){ /*<>*/ return _cv_;}; + /*<>*/ return function(_cC_){ + /*<>*/ return _cw_;}; + } + if(prec){ + /*<>*/ var + /*<>*/ _cq_ = make_iprintf(k, o, fmt), + /*<>*/ _cr_ = + function(_cB_){ /*<>*/ return _cq_;}, + /*<>*/ _cs_ = + function(_cA_){ /*<>*/ return _cr_;}; + /*<>*/ return function(_cz_){ + /*<>*/ return _cs_;}; + } + /*<>*/ /*<>*/ var + _ct_ = make_iprintf(k, o, fmt); + /*<>*/ function _cu_(_cy_){ + /*<>*/ return _ct_; + } + /*<>*/ return function(_cx_){ + /*<>*/ return _cu_;}; + /*<>*/ } + function make_iprintf$0(counter, k, o, fmt){ + /*<>*/ var k$0 = k, fmt$0 = fmt; + /*<>*/ for(;;){ + if(typeof fmt$0 === "number") + /*<>*/ return /*<>*/ caml_call1 + (k$0, o); + switch(fmt$0[0]){ + case 0: + /*<>*/ var + rest = fmt$0[1], + /*<>*/ _by_ = + make_iprintf(k$0, o, rest); + /*<>*/ return function(_ch_){ + /*<>*/ return _by_;}; + case 1: + /*<>*/ var + rest$0 = fmt$0[1], + /*<>*/ _bz_ = + make_iprintf(k$0, o, rest$0); + /*<>*/ return function(_cg_){ + /*<>*/ return _bz_;}; + case 2: + var _bA_ = fmt$0[1]; + if(typeof _bA_ === "number"){ + /*<>*/ var + rest$1 = fmt$0[2], + /*<>*/ _bB_ = + make_iprintf(k$0, o, rest$1); + /*<>*/ return function(_cf_){ + /*<>*/ return _bB_;}; + } + if(0 === _bA_[0]){ + /*<>*/ var + rest$2 = fmt$0[2], + /*<>*/ _bC_ = + make_iprintf(k$0, o, rest$2); + /*<>*/ return function(_ce_){ + /*<>*/ return _bC_;}; + } + /*<>*/ var + rest$3 = fmt$0[2], + /*<>*/ _bD_ = + make_iprintf(k$0, o, rest$3), + /*<>*/ _bE_ = + function(_cd_){ /*<>*/ return _bD_;}; + /*<>*/ return function(_cc_){ + /*<>*/ return _bE_;}; + case 3: + var _bF_ = fmt$0[1]; + if(typeof _bF_ === "number"){ + /*<>*/ var + rest$4 = fmt$0[2], + /*<>*/ _bG_ = + make_iprintf(k$0, o, rest$4); + /*<>*/ return function(_cb_){ + /*<>*/ return _bG_;}; + } + if(0 === _bF_[0]){ + /*<>*/ var + rest$5 = fmt$0[2], + /*<>*/ _bH_ = + make_iprintf(k$0, o, rest$5); + /*<>*/ return function(_ca_){ + /*<>*/ return _bH_;}; + } + /*<>*/ var + rest$6 = fmt$0[2], + /*<>*/ _bI_ = + make_iprintf(k$0, o, rest$6), + /*<>*/ _bJ_ = + function(_b$_){ /*<>*/ return _bI_;}; + /*<>*/ return function(_b__){ + /*<>*/ return _bJ_;}; + case 4: + var rest$7 = fmt$0[4], prec = fmt$0[3], pad = fmt$0[2]; + /*<>*/ return fn_of_padding_precision + (k$0, o, rest$7, pad, prec); + case 5: + var rest$8 = fmt$0[4], prec$0 = fmt$0[3], pad$0 = fmt$0[2]; + /*<>*/ return fn_of_padding_precision + (k$0, o, rest$8, pad$0, prec$0); + case 6: + var rest$9 = fmt$0[4], prec$1 = fmt$0[3], pad$1 = fmt$0[2]; + /*<>*/ return fn_of_padding_precision + (k$0, o, rest$9, pad$1, prec$1); + case 7: + var rest$10 = fmt$0[4], prec$2 = fmt$0[3], pad$2 = fmt$0[2]; + /*<>*/ return fn_of_padding_precision + (k$0, o, rest$10, pad$2, prec$2); + case 8: + var rest$11 = fmt$0[4], prec$3 = fmt$0[3], pad$3 = fmt$0[2]; + /*<>*/ return fn_of_padding_precision + (k$0, o, rest$11, pad$3, prec$3); + case 9: + var _bK_ = fmt$0[1]; + if(typeof _bK_ === "number"){ + /*<>*/ var + rest$12 = fmt$0[2], + /*<>*/ _bL_ = + make_iprintf(k$0, o, rest$12); + /*<>*/ return function(_b9_){ + /*<>*/ return _bL_;}; + } + if(0 === _bK_[0]){ + /*<>*/ var + rest$13 = fmt$0[2], + /*<>*/ _bM_ = + make_iprintf(k$0, o, rest$13); + /*<>*/ return function(_b8_){ + /*<>*/ return _bM_;}; + } + /*<>*/ var + rest$14 = fmt$0[2], + /*<>*/ _bN_ = + make_iprintf(k$0, o, rest$14), + /*<>*/ _bO_ = + function(_b7_){ /*<>*/ return _bN_;}; + /*<>*/ return function(_b6_){ + /*<>*/ return _bO_;}; + case 10: + var rest$15 = fmt$0[1], fmt$0 = rest$15; break; + case 11: + var rest$16 = fmt$0[2], fmt$0 = rest$16; break; + case 12: + var rest$17 = fmt$0[2], fmt$0 = rest$17; break; + case 13: + /*<>*/ var + rest$18 = fmt$0[3], + /*<>*/ _bP_ = + make_iprintf(k$0, o, rest$18); + /*<>*/ return function(_b5_){ + /*<>*/ return _bP_;}; + case 14: + var rest$19 = fmt$0[3], fmtty = fmt$0[2]; + /*<>*/ return function(param){ + /*<>*/ var + fmt = param[1], + /*<>*/ _b4_ = recast(fmt, fmtty); + /*<>*/ return make_iprintf + (k$0, + o, + /*<>*/ caml_call2 + (CamlinternalFormatBasics[3], _b4_, rest$19)); /*<>*/ }; + case 15: + /*<>*/ var + rest$20 = fmt$0[1], + /*<>*/ _bQ_ = + make_iprintf(k$0, o, rest$20), + /*<>*/ _bR_ = + function(_b3_){ /*<>*/ return _bQ_;}; + /*<>*/ return function(_b2_){ + /*<>*/ return _bR_;}; + case 16: + /*<>*/ var + rest$21 = fmt$0[1], + /*<>*/ _bS_ = + make_iprintf(k$0, o, rest$21); + /*<>*/ return function(_b1_){ + /*<>*/ return _bS_;}; + case 17: + var rest$22 = fmt$0[2], fmt$0 = rest$22; break; + case 18: + var _bT_ = fmt$0[1]; + if(0 === _bT_[0]) + var + rest$23 = fmt$0[2], + fmt$1 = _bT_[1][1], + k$3 = + function(k, rest){ + function k$0(koc){ + /*<>*/ return make_iprintf + (k, koc, rest); + /*<>*/ } + return k$0; + }, + k$1 = k$3(k$0, rest$23), + k$0 = k$1, + fmt$0 = fmt$1; + else + var + rest$24 = fmt$0[2], + fmt$2 = _bT_[1][1], + k$4 = + function(k, rest){ + function k$0(koc){ + /*<>*/ return make_iprintf + (k, koc, rest); + /*<>*/ } + return k$0; + }, + k$2 = k$4(k$0, rest$24), + k$0 = k$2, + fmt$0 = fmt$2; + break; + case 19: + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _w_], 1); + case 20: + /*<>*/ var + rest$25 = fmt$0[3], + /*<>*/ _bU_ = + make_iprintf(k$0, o, rest$25); + /*<>*/ return function(_b0_){ + /*<>*/ return _bU_;}; + case 21: + /*<>*/ var + rest$26 = fmt$0[2], + /*<>*/ _bV_ = + make_iprintf(k$0, o, rest$26); + /*<>*/ return function(_bZ_){ + /*<>*/ return _bV_;}; + case 22: + /*<>*/ var + rest$27 = fmt$0[1], + /*<>*/ _bW_ = + make_iprintf(k$0, o, rest$27); + /*<>*/ return function(_bY_){ + /*<>*/ return _bW_;}; + case 23: + var rest$28 = fmt$0[2], ign = fmt$0[1], _bX_ = 0; + /*<>*/ return make_ignored_param + (function(param){ + /*<>*/ return caml_call1 + (k$0, o); + /*<>*/ }, + _bX_, + ign, + rest$28); + default: + var rest$29 = fmt$0[3], arity = fmt$0[1]; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (fn_of_custom_arity$0, [0, k$0, o, rest$29, arity]); + var counter$0 = counter + 1 | 0; + /*<>*/ return fn_of_custom_arity$0 + (counter$0, k$0, o, rest$29, arity); + } + } + /*<>*/ } + function fn_of_custom_arity$0(counter, k, o, fmt, param){ + /*<>*/ if(param){ + /*<>*/ var + arity = param[1], + /*<>*/ _bw_ = + fn_of_custom_arity(k, o, fmt, arity); + /*<>*/ return function(_bx_){ + /*<>*/ return _bw_;}; + } + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (make_iprintf$0, [0, k, o, fmt]); + var counter$0 = counter + 1 | 0; + /*<>*/ return make_iprintf$0 + (counter$0, k, o, fmt); + /*<>*/ } + function make_iprintf(k, o, fmt){ + /*<>*/ return caml_trampoline(make_iprintf$0(0, k, o, fmt)); + } + function fn_of_custom_arity(k, o, fmt, param){ + /*<>*/ return caml_trampoline + (fn_of_custom_arity$0(0, k, o, fmt, param)); + } + function output_acc(o, acc){ + /*<>*/ var acc$0 = acc; + /*<>*/ for(;;){ + if(typeof acc$0 === "number") + /*<>*/ return 0; + switch(acc$0[0]){ + case 0: + /*<>*/ var + fmting_lit = acc$0[2], + p = acc$0[1], + /*<>*/ s = + string_of_formatting_lit(fmting_lit); + /*<>*/ output_acc(o, p); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[66], o, s); + case 1: + var match = acc$0[2], p$0 = acc$0[1]; + if(0 === match[0]){ + var acc$1 = match[1]; + /*<>*/ output_acc(o, p$0); + /*<>*/ /*<>*/ caml_call2 + (Stdlib[66], o, cst$18); + var acc$0 = acc$1; + } + else{ + var acc$2 = match[1]; + /*<>*/ output_acc(o, p$0); + /*<>*/ /*<>*/ caml_call2 + (Stdlib[66], o, cst$19); + var acc$0 = acc$2; + } + break; + case 6: + var f = acc$0[2], p$3 = acc$0[1]; + /*<>*/ output_acc(o, p$3); + /*<>*/ return /*<>*/ caml_call1 + (f, o); + case 7: + var p$4 = acc$0[1]; + /*<>*/ output_acc(o, p$4); + /*<>*/ return /*<>*/ caml_call1 + (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); + 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); + default: + var c = acc$0[2], p$2 = acc$0[1]; + /*<>*/ output_acc(o, p$2); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[65], o, c); + } + } + /*<>*/ } + function bufput_acc(b, acc){ + /*<>*/ var acc$0 = acc; + /*<>*/ for(;;){ + if(typeof acc$0 === "number") + /*<>*/ return 0; + switch(acc$0[0]){ + case 0: + /*<>*/ var + fmting_lit = acc$0[2], + p = acc$0[1], + /*<>*/ s = + string_of_formatting_lit(fmting_lit); + /*<>*/ bufput_acc(b, p); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[16], b, s); + case 1: + var match = acc$0[2], p$0 = acc$0[1]; + if(0 === match[0]){ + var acc$1 = match[1]; + /*<>*/ bufput_acc(b, p$0); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[16], b, cst$20); + var acc$0 = acc$1; + } + else{ + var acc$2 = match[1]; + /*<>*/ bufput_acc(b, p$0); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[16], b, cst$21); + var acc$0 = acc$2; + } + break; + case 6: + var f = acc$0[2], p$3 = acc$0[1]; + /*<>*/ bufput_acc(b, p$3); + /*<>*/ return /*<>*/ caml_call1 + (f, b); + case 7: + var acc$3 = acc$0[1], acc$0 = acc$3; break; + case 8: + var msg = acc$0[2], p$4 = acc$0[1]; + /*<>*/ bufput_acc(b, p$4); + /*<>*/ return /*<>*/ caml_call1 + (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); + default: + var c = acc$0[2], p$2 = acc$0[1]; + /*<>*/ bufput_acc(b, p$2); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, c); + } + } + /*<>*/ } + function strput_acc(b, acc){ + /*<>*/ var acc$0 = acc; + /*<>*/ for(;;){ + if(typeof acc$0 === "number") + /*<>*/ return 0; + switch(acc$0[0]){ + case 0: + /*<>*/ var + fmting_lit = acc$0[2], + p = acc$0[1], + /*<>*/ s = + string_of_formatting_lit(fmting_lit); + /*<>*/ strput_acc(b, p); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[16], b, s); + case 1: + var match = acc$0[2], p$0 = acc$0[1]; + if(0 === match[0]){ + var acc$1 = match[1]; + /*<>*/ strput_acc(b, p$0); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[16], b, cst$22); + var acc$0 = acc$1; + } + else{ + var acc$2 = match[1]; + /*<>*/ strput_acc(b, p$0); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[16], b, cst$23); + var acc$0 = acc$2; + } + break; + case 6: + var f = acc$0[2], p$3 = acc$0[1]; + /*<>*/ strput_acc(b, p$3); + /*<>*/ /*<>*/ var + _bv_ = /*<>*/ caml_call1(f, 0); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[16], b, _bv_); + case 7: + var acc$3 = acc$0[1], acc$0 = acc$3; break; + case 8: + var msg = acc$0[2], p$4 = acc$0[1]; + /*<>*/ strput_acc(b, p$4); + /*<>*/ return /*<>*/ caml_call1 + (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); + default: + var c = acc$0[2], p$2 = acc$0[1]; + /*<>*/ strput_acc(b, p$2); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, c); + } + } + /*<>*/ } + function failwith_message(param){ + /*<>*/ var + fmt = param[1], + /*<>*/ buf = + /*<>*/ caml_call1 + (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_); + /*<>*/ } + /*<>*/ return make_printf(k, 0, fmt); + } + function open_box_of_string(str){ + /*<>*/ if + ( /*<>*/ runtime.caml_string_equal + (str, cst$43)) + /*<>*/ return _x_; + var len = caml_ml_string_length(str); + function invalid_box(param){ + /*<>*/ return /*<>*/ caml_call1 + (failwith_message(_y_), str); + /*<>*/ } + function parse_spaces(i){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(i$0 === len) /*<>*/ return i$0; + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_string_get(str, i$0); + if(9 !== match && 32 !== match) + /*<>*/ return i$0; + /*<>*/ var + /*<>*/ i$1 = i$0 + 1 | 0, + i$0 = i$1; + } + /*<>*/ } + /*<>*/ var + /*<>*/ wstart = parse_spaces(0), + wend = wstart; + /*<>*/ for(;;){ + if + (wend !== len + && + 25 + >= + /*<>*/ caml_string_get(str, wend) + - 97 + >>> 0){ + /*<>*/ var + /*<>*/ j = wend + 1 | 0, + wend = j; + continue; + } + /*<>*/ var + /*<>*/ box_name = + /*<>*/ caml_call3 + (Stdlib_String[15], str, wstart, wend - wstart | 0), + /*<>*/ nstart = parse_spaces(wend), + nend = nstart; + /*<>*/ for(;;){ + a: + if(nend !== len){ + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_string_get(str, nend); + b: + { + if(48 <= match){ + if(58 > match) break b; + } + else if(45 === match) break b; + break a; + } + /*<>*/ var + /*<>*/ j$0 = nend + 1 | 0, + nend = j$0; + continue; + } + if(nstart === nend) + var indent = 0; + else + /*<>*/ try{ + /*<>*/ var + /*<>*/ _bs_ = + /*<>*/ runtime.caml_int_of_string + ( /*<>*/ caml_call3 + (Stdlib_String[15], str, nstart, nend - nstart | 0)), + indent = _bs_; + } + catch(_bt_){ + var _br_ = caml_wrap_exception(_bt_); + if(_br_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_br_, 0); + var indent = invalid_box(0); + } + /*<>*/ /*<>*/ var + exp_end = parse_spaces(nend); + if(exp_end !== len) + /*<>*/ invalid_box(0); + a: + { + if + (caml_string_notequal(box_name, cst$43) + && caml_string_notequal(box_name, "b")){ + if(! caml_string_notequal(box_name, "h")){var box_type = 0; break a;} + if(! caml_string_notequal(box_name, "hov")){var box_type = 3; break a;} + if(! caml_string_notequal(box_name, "hv")){var box_type = 2; break a;} + if(caml_string_notequal(box_name, "v")){ + var box_type = invalid_box(0); + break a; + } + var box_type = 1; + break a; + } + var box_type = 4; + } + /*<>*/ return [0, indent, box_type]; + } + } + /*<>*/ } + function make_padding_fmt_ebb(pad, fmt){ + /*<>*/ if(typeof pad === "number") + /*<>*/ return [0, 0, fmt]; + if(0 === pad[0]){ + var w = pad[2], s = pad[1]; + /*<>*/ return [0, [0, s, w], fmt]; + } + var s$0 = pad[1]; + /*<>*/ return [0, [1, s$0], fmt]; + /*<>*/ } + function make_padprec_fmt_ebb(pad, prec, fmt){ + /*<>*/ if(typeof prec === "number") + var match = prec ? [0, 1, fmt] : [0, 0, fmt]; + else + var p = prec[1], match = [0, [0, p], fmt]; + var prec$0 = match[1]; + /*<>*/ if(typeof pad === "number") + /*<>*/ return [0, 0, prec$0, fmt]; + /*<>*/ if(0 === pad[0]){ + var w = pad[2], s = pad[1]; + /*<>*/ return [0, [0, s, w], prec$0, fmt]; + } + var s$0 = pad[1]; + /*<>*/ return [0, [1, s$0], prec$0, fmt]; + /*<>*/ } + function fmt_ebb_of_string(legacy_behavior, str){ + /*<>*/ if(legacy_behavior) + var flag = legacy_behavior[1], legacy_behavior$0 = flag; + else + var legacy_behavior$0 = 1; + function invalid_format_message(str_ind, msg){ + /*<>*/ return /*<>*/ caml_call3 + (failwith_message(_z_), str, str_ind, msg); + /*<>*/ } + /*<>*/ function unexpected_end_of_format + (end_ind){ + /*<>*/ return invalid_format_message + (end_ind, cst_unexpected_end_of_format); + /*<>*/ } + function invalid_format_without(str_ind, c, s){ + /*<>*/ return /*<>*/ caml_call4 + (failwith_message(_A_), str, str_ind, c, s); + /*<>*/ } + function expected_character(str_ind, expected, read){ + /*<>*/ return /*<>*/ caml_call4 + (failwith_message(_B_), str, str_ind, expected, read); + /*<>*/ } + function add_literal(lit_start, str_ind, fmt){ + /*<>*/ var + size = str_ind - lit_start | 0; + return 0 === size + ? [0, fmt] + : 1 + === size + ? [0, + [12, + /*<>*/ caml_string_get + (str, lit_start), + fmt]] + : [0, + [11, + /*<>*/ caml_call3 + (Stdlib_String[15], str, lit_start, size), + fmt]]; + /*<>*/ } + function parse(lit_start, end_ind){ + /*<>*/ var str_ind = lit_start; + /*<>*/ for(;;){ + if(str_ind === end_ind) + /*<>*/ return add_literal + (lit_start, str_ind, 0); + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_string_get(str, str_ind); + if(37 === match){ + var str_ind$2 = str_ind + 1 | 0; + if(str_ind$2 === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + var + match$1 = + 95 + === + /*<>*/ caml_string_get + (str, str_ind$2) + ? parse_flags(str_ind, str_ind$2 + 1 | 0, end_ind, 1) + : parse_flags(str_ind, str_ind$2, end_ind, 0), + fmt_rest = match$1[1]; + /*<>*/ return add_literal + (lit_start, str_ind, fmt_rest); + } + if(64 === match){ + var str_ind$0 = str_ind + 1 | 0; + a: + if(str_ind$0 === end_ind) + var match$0 = _N_; + else{ + /*<>*/ /*<>*/ var + c = + /*<>*/ caml_string_get + (str, str_ind$0); + if(65 <= c){ + if(94 <= c){ + /*<>*/ /*<>*/ var + switcher = c - 123 | 0; + if(2 >= switcher >>> 0) + switch(switcher){ + case 0: + var match$0 = parse_tag(1, str_ind$0 + 1 | 0, end_ind); break a; + case 1: break; + default: + var + fmt_rest$2 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, 1, fmt_rest$2]]; + break a; + } + } + else if(91 <= c) + switch(c - 91 | 0){ + case 0: + var match$0 = parse_tag(0, str_ind$0 + 1 | 0, end_ind); break a; + case 1: break; + default: + var + fmt_rest$3 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, 0, fmt_rest$3]]; + break a; + } + } + else{ + if(10 === c){ + var + fmt_rest$4 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, 3, fmt_rest$4]]; + break a; + } + if(32 <= c) + switch(c - 32 | 0){ + case 0: + var + fmt_rest$5 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, _O_, fmt_rest$5]]; + break a; + case 5: + /*<>*/ if + ((str_ind$0 + 1 | 0) < end_ind + && + 37 + === + /*<>*/ caml_string_get + (str, str_ind$0 + 1 | 0)){ + var + fmt_rest$6 = parse(str_ind$0 + 2 | 0, end_ind)[1], + match$0 = [0, [17, 6, fmt_rest$6]]; + break a; + } + var + fmt_rest$7 = parse(str_ind$0, end_ind)[1], + match$0 = [0, [12, 64, fmt_rest$7]]; + break a; + case 12: + var + fmt_rest$8 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, _P_, fmt_rest$8]]; + break a; + case 14: + var + fmt_rest$9 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, 4, fmt_rest$9]]; + break a; + case 27: + var str_ind$3 = str_ind$0 + 1 | 0; + b: + try{ + var + _bg_ = str_ind$3 === end_ind ? 1 : 0, + _bh_ = + _bg_ + || + (60 + !== + /*<>*/ caml_string_get + (str, str_ind$3) + ? 1 + : 0); + if(_bh_) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + /*<>*/ var + /*<>*/ str_ind_1 = + parse_spaces(str_ind$3 + 1 | 0, end_ind), + /*<>*/ match$2 = + /*<>*/ caml_string_get + (str, str_ind_1); + c: + { + if(48 <= match$2){ + if(58 > match$2) break c; + } + else if(45 === match$2) break c; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + } + /*<>*/ var + /*<>*/ match$3 = + parse_integer(str_ind_1, end_ind), + width = match$3[2], + str_ind_2 = match$3[1], + /*<>*/ str_ind_3 = + parse_spaces(str_ind_2, end_ind), + /*<>*/ switcher$0 = + /*<>*/ caml_string_get + (str, str_ind_3) + - 45 + | 0; + if(12 < switcher$0 >>> 0){ + if(17 === switcher$0){ + /*<>*/ var + /*<>*/ s = + /*<>*/ caml_call3 + (Stdlib_String[15], + str, + str_ind$3 - 2 | 0, + (str_ind_3 - str_ind$3 | 0) + 3 | 0), + /*<>*/ _bi_ = + [0, s, width, 0], + /*<>*/ _bj_ = + str_ind_3 + 1 | 0, + formatting_lit$0 = _bi_, + next_ind = _bj_; + break b; + } + } + else if(1 < switcher$0 - 1 >>> 0){ + /*<>*/ var + /*<>*/ match$4 = + parse_integer(str_ind_3, end_ind), + offset = match$4[2], + str_ind_4 = match$4[1], + /*<>*/ str_ind_5 = + parse_spaces(str_ind_4, end_ind); + if + (62 + !== + /*<>*/ caml_string_get + (str, str_ind_5)) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + /*<>*/ var + /*<>*/ s$0 = + /*<>*/ caml_call3 + (Stdlib_String[15], + 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, + formatting_lit$0 = _bk_, + next_ind = _bl_; + break b; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + } + catch(_bq_){ + var _bf_ = caml_wrap_exception(_bq_); + if(_bf_ !== Stdlib[8] && _bf_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bf_, 0); + var formatting_lit$0 = formatting_lit, next_ind = str_ind$3; + } + var + fmt_rest$12 = parse(next_ind, end_ind)[1], + match$0 = [0, [17, formatting_lit$0, fmt_rest$12]]; + break a; + case 28: + var str_ind$4 = str_ind$0 + 1 | 0; + /*<>*/ try{ + /*<>*/ var + /*<>*/ str_ind_1$0 = + parse_spaces(str_ind$4, end_ind), + /*<>*/ match$6 = + /*<>*/ caml_string_get + (str, str_ind_1$0); + b: + { + c: + { + if(48 <= match$6){ + if(58 > match$6) break c; + } + else if(45 === match$6) break c; + var _bo_ = 0; + break b; + } + /*<>*/ var + /*<>*/ match$7 = + parse_integer(str_ind_1$0, end_ind), + size = match$7[2], + str_ind_2$0 = match$7[1], + /*<>*/ str_ind_3$0 = + parse_spaces(str_ind_2$0, end_ind); + if + (62 + !== + /*<>*/ caml_string_get + (str, str_ind_3$0)) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + /*<>*/ var + /*<>*/ s$1 = + /*<>*/ caml_call3 + (Stdlib_String[15], + str, + str_ind$4 - 2 | 0, + (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), + _bo_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; + } + var _bn_ = _bo_; + } + catch(_bp_){ + var _bm_ = caml_wrap_exception(_bp_); + if(_bm_ !== Stdlib[8] && _bm_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bm_, 0); + var _bn_ = 0; + } + if(_bn_) + var + match$5 = _bn_[1], + formatting_lit$1 = match$5[2], + next_ind$0 = match$5[1], + fmt_rest$13 = parse(next_ind$0, end_ind)[1], + _be_ = [0, [17, formatting_lit$1, fmt_rest$13]]; + else + var + fmt_rest$14 = parse(str_ind$4, end_ind)[1], + _be_ = [0, [17, _Q_, fmt_rest$14]]; + var match$0 = _be_; + break a; + case 31: + var + fmt_rest$10 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, 2, fmt_rest$10]]; + break a; + case 32: + var + fmt_rest$11 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, 5, fmt_rest$11]]; + break a; + } + } + var + fmt_rest$1 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, [2, c], fmt_rest$1]]; + } + var fmt_rest$0 = match$0[1]; + /*<>*/ return add_literal + (lit_start, str_ind, fmt_rest$0); + } + var str_ind$1 = str_ind + 1 | 0, str_ind = str_ind$1; + } + /*<>*/ } + function parse_conversion + (pct_ind, + str_ind, + end_ind, + plus, + hash, + space, + ign, + pad, + prec, + padprec, + symb){ + /*<>*/ var + /*<>*/ plus_used = [0, 0], + /*<>*/ hash_used = [0, 0], + /*<>*/ space_used = [0, 0], + /*<>*/ ign_used = [0, 0], + /*<>*/ pad_used = [0, 0], + /*<>*/ prec_used = [0, 0]; + function get_plus(param){ + /*<>*/ plus_used[1] = 1; + /*<>*/ return plus; + /*<>*/ } + function get_hash(param){ + /*<>*/ hash_used[1] = 1; + return hash; + /*<>*/ } + function get_space(param){ + /*<>*/ space_used[1] = 1; + return space; + /*<>*/ } + function get_ign(param){ + /*<>*/ ign_used[1] = 1; + return ign; + /*<>*/ } + function get_pad(param){ + /*<>*/ pad_used[1] = 1; + return pad; + /*<>*/ } + function get_prec(param){ + /*<>*/ prec_used[1] = 1; + return prec; + /*<>*/ } + function get_padprec(param){ + /*<>*/ pad_used[1] = 1; + return padprec; + /*<>*/ } + function get_int_pad(param){ + /*<>*/ var + /*<>*/ pad = get_pad(0), + /*<>*/ match = get_prec(0); + /*<>*/ if + (typeof match === "number" && ! match) + /*<>*/ return pad; + if(typeof pad === "number") + /*<>*/ return 0; + if(0 !== pad[0]) + return 2 <= pad[1] + ? legacy_behavior$0 + ? _H_ + : incompatible_flag(pct_ind, str_ind, 48, cst_precision$1) + : pad; + if(2 > pad[1]) /*<>*/ return pad; + var n = pad[2]; + /*<>*/ return legacy_behavior$0 + ? [0, 1, n] + : incompatible_flag(pct_ind, str_ind, 48, cst_precision$0); + /*<>*/ } + function check_no_0(symb, pad){ + /*<>*/ if(typeof pad === "number") + /*<>*/ return pad; + if(0 !== pad[0]) + return 2 <= pad[1] + ? legacy_behavior$0 + ? _I_ + : incompatible_flag(pct_ind, str_ind, symb, cst_0$1) + : pad; + if(2 > pad[1]) /*<>*/ return pad; + var width = pad[2]; + /*<>*/ return legacy_behavior$0 + ? [0, 1, width] + : incompatible_flag(pct_ind, str_ind, symb, cst_0$0); + /*<>*/ } + function opt_of_pad(c, pad){ + /*<>*/ if(typeof pad === "number") + /*<>*/ return 0; + if(0 === pad[0]) + switch(pad[1]){ + case 0: + var width = pad[2]; + /*<>*/ return legacy_behavior$0 + ? [0, width] + : incompatible_flag(pct_ind, str_ind, c, cst$24); + case 1: + var width$0 = pad[2]; + /*<>*/ return [0, width$0]; + default: + var width$1 = pad[2]; + /*<>*/ return legacy_behavior$0 + ? [0, width$1] + : incompatible_flag(pct_ind, str_ind, c, cst_0$2); + } + /*<>*/ return incompatible_flag + (pct_ind, str_ind, c, cst$25); + /*<>*/ } + function get_pad_opt(c){ + /*<>*/ return opt_of_pad(c, get_pad(0)); + /*<>*/ } + function get_padprec_opt(c){ + /*<>*/ return opt_of_pad + (c, get_padprec(0)); + /*<>*/ } + a: + { + /*<>*/ if(124 > symb) + switch(symb){ + case 33: + var + fmt_rest$5 = parse(str_ind, end_ind)[1], + fmt_result = [0, [10, fmt_rest$5]]; + break a; + case 40: + /*<>*/ var + /*<>*/ sub_end = + search_subformat_end(str_ind, end_ind, 41), + fmt_rest$7 = parse(sub_end + 2 | 0, end_ind)[1], + sub_fmt = parse(str_ind, sub_end)[1], + /*<>*/ sub_fmtty = + fmtty_of_fmt(sub_fmt); + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$2 = + [9, get_pad_opt(95), sub_fmtty], + _aN_ = [0, [23, ignored$2, fmt_rest$7]]; + else + var _aN_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; + var fmt_result = _aN_; + break a; + case 44: + var fmt_result = parse(str_ind, end_ind); break a; + case 67: + /*<>*/ var + fmt_rest$10 = parse(str_ind, end_ind)[1], + /*<>*/ _aP_ = + get_ign(0) ? [0, [23, 1, fmt_rest$10]] : [0, [1, fmt_rest$10]], + fmt_result = _aP_; + break a; + case 78: + var fmt_rest$14 = parse(str_ind, end_ind)[1], counter$0 = 2; + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$6 = [11, counter$0], + _aV_ = [0, [23, ignored$6, fmt_rest$14]]; + else + var _aV_ = [0, [21, counter$0, fmt_rest$14]]; + var fmt_result = _aV_; + break a; + case 83: + /*<>*/ var + /*<>*/ pad$6 = + check_no_0(symb, get_padprec(0)), + fmt_rest$15 = parse(str_ind, end_ind)[1]; + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$7 = + [1, get_padprec_opt(95)], + _aW_ = [0, [23, ignored$7, fmt_rest$15]]; + else + /*<>*/ var + /*<>*/ match$5 = + make_padding_fmt_ebb(pad$6, fmt_rest$15), + fmt_rest$16 = match$5[2], + pad$7 = match$5[1], + _aW_ = [0, [3, pad$7, fmt_rest$16]]; + var fmt_result = _aW_; + break a; + case 91: + if(str_ind === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ var + /*<>*/ char_set = + create_char_set(0), + add_char = + function(c){ + /*<>*/ return add_in_char_set + (char_set, c); + /*<>*/ }, + add_range = + function(c$0, c){ + /*<>*/ if(c >= c$0){ + var i = c$0; + for(;;){ + /*<>*/ add_in_char_set + (char_set, + /*<>*/ caml_call1 + (Stdlib[29], i)); + /*<>*/ /*<>*/ var + _bd_ = i + 1 | 0; + if(c === i) break; + var i = _bd_; + } + } + return 0; + /*<>*/ }, + fail_single_percent = + function(str_ind){ + /*<>*/ return /*<>*/ caml_call2 + (failwith_message(_R_), str, str_ind); + /*<>*/ }, + parse_char_set_content = + function(counter, str_ind, end_ind){ + /*<>*/ var str_ind$0 = str_ind; + /*<>*/ for(;;){ + if(str_ind$0 === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ /*<>*/ var + c = + /*<>*/ caml_string_get + (str, str_ind$0); + if(45 !== c){ + if(93 === c) + /*<>*/ return str_ind$0 + 1 + | 0; + var _bc_ = str_ind$0 + 1 | 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (parse_char_set_after_char$0, [0, _bc_, end_ind, c]); + var counter$0 = counter + 1 | 0; + /*<>*/ return parse_char_set_after_char$0 + (counter$0, _bc_, end_ind, c); + } + /*<>*/ add_char(45); + var str_ind$1 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$1; + } + /*<>*/ }, + parse_char_set_after_char$0 = + function(counter, str_ind, end_ind, c){ + /*<>*/ var + str_ind$0 = str_ind, + c$0 = c; + /*<>*/ for(;;){ + if(str_ind$0 === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ /*<>*/ var + c$1 = + /*<>*/ caml_string_get + (str, str_ind$0); + a: + { + if(46 <= c$1){ + if(64 !== c$1){ + if(93 !== c$1) break a; + /*<>*/ add_char(c$0); + /*<>*/ return str_ind$0 + 1 + | 0; + } + } + else if(37 !== c$1){ + if(45 > c$1) break a; + var str_ind$2 = str_ind$0 + 1 | 0; + if(str_ind$2 === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ /*<>*/ var + c$2 = + /*<>*/ caml_string_get + (str, str_ind$2); + if(37 === c$2){ + if((str_ind$2 + 1 | 0) === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ /*<>*/ var + c$3 = + /*<>*/ caml_string_get + (str, str_ind$2 + 1 | 0); + if(37 !== c$3 && 64 !== c$3) + /*<>*/ return fail_single_percent + (str_ind$2); + /*<>*/ add_range(c$0, c$3); + var _ba_ = str_ind$2 + 2 | 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (parse_char_set_content, [0, _ba_, end_ind]); + var counter$2 = counter + 1 | 0; + /*<>*/ return parse_char_set_content + (counter$2, _ba_, end_ind); + } + if(93 === c$2){ + /*<>*/ add_char(c$0); + /*<>*/ add_char(45); + /*<>*/ return str_ind$2 + 1 + | 0; + } + /*<>*/ add_range(c$0, c$2); + var _bb_ = str_ind$2 + 1 | 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (parse_char_set_content, [0, _bb_, end_ind]); + var counter$1 = counter + 1 | 0; + /*<>*/ return parse_char_set_content + (counter$1, _bb_, end_ind); + } + if(37 === c$0){ + /*<>*/ add_char(c$1); + var _a$_ = str_ind$0 + 1 | 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (parse_char_set_content, [0, _a$_, end_ind]); + var counter$0 = counter + 1 | 0; + /*<>*/ return parse_char_set_content + (counter$0, _a$_, end_ind); + } + } + if(37 === c$0) + /*<>*/ fail_single_percent + (str_ind$0); + /*<>*/ add_char(c$0); + var + str_ind$1 = str_ind$0 + 1 | 0, + str_ind$0 = str_ind$1, + c$0 = c$1; + } + /*<>*/ }, + parse_char_set_after_char = + function(str_ind, end_ind, c){ + /*<>*/ return caml_trampoline + (parse_char_set_after_char$0(0, str_ind, end_ind, c)); + }; + if(str_ind === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + if + (94 + === + /*<>*/ caml_string_get + (str, str_ind)) + var + str_ind$0 = str_ind + 1 | 0, + reverse = 1, + str_ind$1 = str_ind$0; + else + var reverse = 0, str_ind$1 = str_ind; + if(str_ind$1 === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ var + /*<>*/ c = + /*<>*/ caml_string_get + (str, str_ind$1), + /*<>*/ next_ind = + parse_char_set_after_char(str_ind$1 + 1 | 0, end_ind, c), + /*<>*/ char_set$0 = + freeze_char_set(char_set), + /*<>*/ char_set$1 = + reverse ? rev_char_set(char_set$0) : char_set$0, + fmt_rest$19 = parse(next_ind, end_ind)[1]; + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$9 = + [10, get_pad_opt(95), char_set$1], + _a1_ = [0, [23, ignored$9, fmt_rest$19]]; + else + var _a1_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; + var fmt_result = _a1_; + break a; + case 97: + var + fmt_rest$20 = parse(str_ind, end_ind)[1], + fmt_result = [0, [15, fmt_rest$20]]; + break a; + case 99: + /*<>*/ var + char_format = + function(fmt_rest){ + /*<>*/ return get_ign(0) + ? [0, [23, 0, fmt_rest]] + : [0, [0, fmt_rest]]; + /*<>*/ }, + fmt_rest$21 = parse(str_ind, end_ind)[1], + /*<>*/ match$7 = get_pad_opt(99); + if(match$7){ + if(0 === match$7[1]) + /*<>*/ var + /*<>*/ _a2_ = + get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], + _a3_ = _a2_; + else + var + _a3_ = + legacy_behavior$0 + ? char_format(fmt_rest$21) + : invalid_format_message + (str_ind, cst_non_zero_widths_are_unsupp); + var _a4_ = _a3_; + } + else + var _a4_ = char_format(fmt_rest$21); + var fmt_result = _a4_; + break a; + case 114: + /*<>*/ var + fmt_rest$22 = parse(str_ind, end_ind)[1], + /*<>*/ _a5_ = + get_ign(0) ? [0, [23, 2, fmt_rest$22]] : [0, [19, fmt_rest$22]], + fmt_result = _a5_; + break a; + case 115: + /*<>*/ var + /*<>*/ pad$9 = + check_no_0(symb, get_padprec(0)), + fmt_rest$23 = parse(str_ind, end_ind)[1]; + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$10 = + [0, get_padprec_opt(95)], + _a6_ = [0, [23, ignored$10, fmt_rest$23]]; + else + /*<>*/ var + /*<>*/ match$8 = + make_padding_fmt_ebb(pad$9, fmt_rest$23), + fmt_rest$24 = match$8[2], + pad$10 = match$8[1], + _a6_ = [0, [2, pad$10, fmt_rest$24]]; + var fmt_result = _a6_; + break a; + case 116: + var + fmt_rest$25 = parse(str_ind, end_ind)[1], + fmt_result = [0, [16, fmt_rest$25]]; + break a; + case 123: + /*<>*/ var + /*<>*/ sub_end$0 = + search_subformat_end(str_ind, end_ind, 125), + sub_fmt$0 = parse(str_ind, sub_end$0)[1], + fmt_rest$26 = parse(sub_end$0 + 2 | 0, end_ind)[1], + /*<>*/ sub_fmtty$0 = + fmtty_of_fmt(sub_fmt$0); + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$11 = + [8, get_pad_opt(95), sub_fmtty$0], + _a7_ = [0, [23, ignored$11, fmt_rest$26]]; + else + var _a7_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; + var fmt_result = _a7_; + break a; + case 66: + case 98: + /*<>*/ var + /*<>*/ pad$3 = + check_no_0(symb, get_padprec(0)), + fmt_rest$8 = parse(str_ind, end_ind)[1]; + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$3 = + [7, get_padprec_opt(95)], + _aO_ = [0, [23, ignored$3, fmt_rest$8]]; + else + /*<>*/ var + /*<>*/ match$3 = + make_padding_fmt_ebb(pad$3, fmt_rest$8), + fmt_rest$9 = match$3[2], + pad$4 = match$3[1], + _aO_ = [0, [9, pad$4, fmt_rest$9]]; + var fmt_result = _aO_; + break a; + case 37: + case 64: + var + fmt_rest$6 = parse(str_ind, end_ind)[1], + fmt_result = [0, [12, symb, fmt_rest$6]]; + break a; + case 76: + case 108: + case 110: + if(str_ind !== end_ind){ + /*<>*/ var + /*<>*/ symb$0 = + /*<>*/ caml_string_get + (str, str_ind), + /*<>*/ _a8_ = symb$0 - 88 | 0; + b: + { + if(32 >= _a8_ >>> 0) + switch(_a8_){ + case 0: + case 12: + case 17: + case 23: + case 29: + case 32: + var _aU_ = 1; break b; + } + var _aU_ = 0; + } + /*<>*/ if(_aU_) break; + } + var fmt_rest$13 = parse(str_ind, end_ind)[1]; + b: + { + if(108 <= symb){ + if(111 > symb) + switch(symb - 108 | 0){ + case 0: + var counter = 0; break b; + case 1: break; + default: var counter = 1; break b; + } + } + else if(76 === symb){var counter = 2; break b;} + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _V_], 1); + } + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$5 = [11, counter], + _aT_ = [0, [23, ignored$5, fmt_rest$13]]; + else + var _aT_ = [0, [21, counter, fmt_rest$13]]; + var fmt_result = _aT_; + break a; + case 32: + case 35: + case 43: + case 45: + case 95: + var + fmt_result = + /*<>*/ caml_call3 + (failwith_message(_M_), str, pct_ind, symb); + break a; + case 88: + case 100: + case 105: + case 111: + case 117: + case 120: + /*<>*/ var + /*<>*/ _aX_ = get_space(0), + /*<>*/ _aY_ = get_hash(0), + /*<>*/ iconv$2 = + compute_int_conv(pct_ind, str_ind, get_plus(0), _aY_, _aX_, symb), + fmt_rest$17 = parse(str_ind, end_ind)[1]; + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$8 = + [2, iconv$2, get_pad_opt(95)], + _aZ_ = [0, [23, ignored$8, fmt_rest$17]]; + else + /*<>*/ var + /*<>*/ _a0_ = get_prec(0), + /*<>*/ match$6 = + make_padprec_fmt_ebb(get_int_pad(0), _a0_, fmt_rest$17), + fmt_rest$18 = match$6[3], + prec$4 = match$6[2], + pad$8 = match$6[1], + _aZ_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; + var fmt_result = _aZ_; + break a; + case 69: + case 70: + case 71: + case 72: + case 101: + case 102: + case 103: + case 104: + /*<>*/ var + /*<>*/ space$1 = get_space(0), + /*<>*/ hash$1 = get_hash(0), + /*<>*/ plus$2 = get_plus(0), + flag = + plus$2 + ? space$1 + ? legacy_behavior$0 + ? 1 + : incompatible_flag(pct_ind, str_ind, 32, cst$36) + : 1 + : space$1 ? 2 : 0; + b: + { + c: + if(73 <= symb){ + var switcher = symb - 101 | 0; + if(3 >= switcher >>> 0){ + switch(switcher){ + case 0: + var _a9_ = 1; break; + case 1: + var _a9_ = 0; break; + case 2: + var _a9_ = 3; break; + default: var _a9_ = 6; + } + var kind = _a9_; + break b; + } + } + else if(69 <= symb){ + switch(symb - 69 | 0){ + case 0: + var _a__ = 2; break; + case 1: + break c; + case 2: + var _a__ = 4; break; + default: var _a__ = 7; + } + var kind = _a__; + break b; + } + if(hash$1){ + if(70 === symb){var kind = 8; break b;} + } + else if(70 === symb){var kind = 5; break b;} + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _X_], 1); + } + /*<>*/ var + /*<>*/ fconv = [0, flag, kind], + fmt_rest$11 = parse(str_ind, end_ind)[1]; + /*<>*/ if(get_ign(0)){ + /*<>*/ /*<>*/ var + match = get_prec(0); + if(typeof match === "number") + var + _aQ_ = + match ? incompatible_flag(pct_ind, str_ind, 95, cst$26) : 0; + else + var ndec = match[1], _aQ_ = [0, ndec]; + /*<>*/ var + /*<>*/ ignored$4 = + [6, get_pad_opt(95), _aQ_], + _aR_ = [0, [23, ignored$4, fmt_rest$11]]; + } + else + /*<>*/ var + /*<>*/ _aS_ = get_prec(0), + /*<>*/ match$4 = + make_padprec_fmt_ebb(get_pad(0), _aS_, fmt_rest$11), + fmt_rest$12 = match$4[3], + prec$3 = match$4[2], + pad$5 = match$4[1], + _aR_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; + var fmt_result = _aR_; + break a; + } + b: + if(108 <= symb){ + if(111 > symb){ + switch(symb - 108 | 0){ + case 0: + /*<>*/ var + /*<>*/ _ax_ = + /*<>*/ caml_string_get + (str, str_ind), + /*<>*/ _ay_ = get_space(0), + /*<>*/ _az_ = get_hash(0), + /*<>*/ iconv = + compute_int_conv + (pct_ind, str_ind + 1 | 0, get_plus(0), _az_, _ay_, _ax_), + fmt_rest = parse(str_ind + 1 | 0, end_ind)[1]; + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored = + [3, iconv, get_pad_opt(95)], + _aA_ = [0, [23, ignored, fmt_rest]]; + else + /*<>*/ var + /*<>*/ _aC_ = get_prec(0), + /*<>*/ match$0 = + make_padprec_fmt_ebb(get_int_pad(0), _aC_, fmt_rest), + fmt_rest$0 = match$0[3], + prec$0 = match$0[2], + pad$0 = match$0[1], + _aA_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; + var _aB_ = _aA_; + break; + case 1: + break b; + default: + /*<>*/ var + /*<>*/ _aD_ = + /*<>*/ caml_string_get + (str, str_ind), + /*<>*/ _aE_ = get_space(0), + /*<>*/ _aF_ = get_hash(0), + /*<>*/ iconv$0 = + compute_int_conv + (pct_ind, str_ind + 1 | 0, get_plus(0), _aF_, _aE_, _aD_), + fmt_rest$1 = parse(str_ind + 1 | 0, end_ind)[1]; + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$0 = + [4, iconv$0, get_pad_opt(95)], + _aG_ = [0, [23, ignored$0, fmt_rest$1]]; + else + /*<>*/ var + /*<>*/ _aH_ = get_prec(0), + /*<>*/ match$1 = + make_padprec_fmt_ebb(get_int_pad(0), _aH_, fmt_rest$1), + fmt_rest$2 = match$1[3], + prec$1 = match$1[2], + pad$1 = match$1[1], + _aG_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; + var _aB_ = _aG_; + } + var fmt_result = _aB_; + break a; + } + } + else if(76 === symb){ + /*<>*/ var + /*<>*/ _aI_ = + /*<>*/ caml_string_get(str, str_ind), + /*<>*/ _aJ_ = get_space(0), + /*<>*/ _aK_ = get_hash(0), + /*<>*/ iconv$1 = + compute_int_conv + (pct_ind, str_ind + 1 | 0, get_plus(0), _aK_, _aJ_, _aI_), + fmt_rest$3 = parse(str_ind + 1 | 0, end_ind)[1]; + /*<>*/ if(get_ign(0)) + /*<>*/ var + /*<>*/ ignored$1 = + [5, iconv$1, get_pad_opt(95)], + _aL_ = [0, [23, ignored$1, fmt_rest$3]]; + else + /*<>*/ var + /*<>*/ _aM_ = get_prec(0), + /*<>*/ match$2 = + make_padprec_fmt_ebb(get_int_pad(0), _aM_, fmt_rest$3), + fmt_rest$4 = match$2[3], + prec$2 = match$2[2], + pad$2 = match$2[1], + _aL_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; + var fmt_result = _aL_; + break a; + } + var + fmt_result = + /*<>*/ caml_call3 + (failwith_message(_J_), str, str_ind - 1 | 0, symb); + } + if(1 - legacy_behavior$0){ + var _ao_ = 1 - plus_used[1], plus$0 = _ao_ ? plus : _ao_; + if(plus$0) + /*<>*/ incompatible_flag + (pct_ind, str_ind, symb, cst$27); + var _ap_ = 1 - hash_used[1], hash$0 = _ap_ ? hash : _ap_; + if(hash$0) + /*<>*/ incompatible_flag + (pct_ind, str_ind, symb, cst$28); + var _aq_ = 1 - space_used[1], space$0 = _aq_ ? space : _aq_; + if(space$0) + /*<>*/ incompatible_flag + (pct_ind, str_ind, symb, cst$29); + var + _ar_ = 1 - pad_used[1], + _as_ = + _ar_ + ? /*<>*/ caml_notequal + ([0, pad], _K_) + : _ar_; + /*<>*/ if(_as_) + /*<>*/ incompatible_flag + (pct_ind, str_ind, symb, cst_padding$0); + var + _at_ = 1 - prec_used[1], + _au_ = + _at_ + ? /*<>*/ caml_notequal + ([0, prec], _L_) + : _at_; + /*<>*/ if(_au_){ + var _av_ = ign ? 95 : symb; + /*<>*/ incompatible_flag + (pct_ind, str_ind, _av_, cst_precision$2); + } + var plus$1 = ign ? plus : ign; + if(plus$1) + /*<>*/ incompatible_flag + (pct_ind, str_ind, 95, cst$30); + } + var _aw_ = 1 - ign_used[1], ign$0 = _aw_ ? ign : _aw_; + a: + if(ign$0){ + b: + { + if(38 <= symb){ + if(44 !== symb && 64 !== symb) break b; + } + else if(33 !== symb && 37 > symb) break b; + if(legacy_behavior$0) break a; + } + /*<>*/ incompatible_flag + (pct_ind, str_ind, symb, cst$31); + } + /*<>*/ return fmt_result; + } + function parse_after_precision + (pct_ind, str_ind, end_ind, minus, plus, hash, space, ign, pad, prec){ + /*<>*/ if(str_ind === end_ind) + /*<>*/ unexpected_end_of_format(end_ind); + function parse_conv(padprec){ + /*<>*/ return parse_conversion + (pct_ind, + str_ind + 1 | 0, + end_ind, + plus, + hash, + space, + ign, + pad, + prec, + padprec, + /*<>*/ caml_string_get + (str, str_ind)); + /*<>*/ } + if(typeof pad !== "number") + /*<>*/ return parse_conv(pad); + if(typeof prec === "number" && ! prec) + /*<>*/ return parse_conv(0); + if(minus){ + if(typeof prec === "number") + /*<>*/ return parse_conv(_F_); + var n = prec[1]; + /*<>*/ return parse_conv([0, 0, n]); + } + if(typeof prec === "number") + /*<>*/ return parse_conv(_G_); + var n$0 = prec[1]; + /*<>*/ return parse_conv([0, 1, n$0]); + /*<>*/ } + function parse_after_padding + (pct_ind, str_ind, end_ind, minus, plus, hash, space, ign, pad){ + /*<>*/ if(str_ind === end_ind) + /*<>*/ unexpected_end_of_format(end_ind); + /*<>*/ /*<>*/ var + symb = + /*<>*/ caml_string_get(str, str_ind); + if(46 !== symb) + /*<>*/ return parse_conversion + (pct_ind, + str_ind + 1 | 0, + end_ind, + plus, + hash, + space, + ign, + pad, + 0, + pad, + symb); + var str_ind$0 = str_ind + 1 | 0; + if(str_ind$0 === end_ind) + /*<>*/ unexpected_end_of_format(end_ind); + function parse_literal(minus, str_ind){ + /*<>*/ var + /*<>*/ match = + parse_positive(str_ind, end_ind, 0), + prec = match[2], + new_ind = match[1]; + /*<>*/ return parse_after_precision + (pct_ind, + new_ind, + end_ind, + minus, + plus, + hash, + space, + ign, + pad, + [0, prec]); + /*<>*/ } + /*<>*/ /*<>*/ var + symb$0 = + /*<>*/ caml_string_get(str, str_ind$0); + if(48 <= symb$0){ + if(58 > symb$0) + /*<>*/ return parse_literal + (minus, str_ind$0); + } + else if(42 <= symb$0) + switch(symb$0 - 42 | 0){ + case 0: + /*<>*/ return parse_after_precision + (pct_ind, + str_ind$0 + 1 | 0, + end_ind, + minus, + plus, + hash, + space, + ign, + pad, + 1); + case 1: + case 3: + if(legacy_behavior$0){ + /*<>*/ var + /*<>*/ _an_ = str_ind$0 + 1 | 0, + minus$0 = minus || (45 === symb$0 ? 1 : 0); + /*<>*/ return parse_literal + (minus$0, _an_); + } + break; + } + return legacy_behavior$0 + ? parse_after_precision + (pct_ind, + str_ind$0, + end_ind, + minus, + plus, + hash, + space, + ign, + pad, + _E_) + : invalid_format_without(str_ind$0 - 1 | 0, 46, cst_precision); + /*<>*/ } + function parse_flags(pct_ind, str_ind, end_ind, ign){ + /*<>*/ var + /*<>*/ zero = [0, 0], + /*<>*/ minus = [0, 0], + /*<>*/ plus = [0, 0], + /*<>*/ space = [0, 0], + /*<>*/ hash = [0, 0]; + function set_flag(str_ind, flag){ + /*<>*/ var + _ak_ = flag[1], + _al_ = _ak_ ? 1 - legacy_behavior$0 : _ak_; + if(_al_){ + /*<>*/ /*<>*/ var + _am_ = + /*<>*/ caml_string_get(str, str_ind); + /*<>*/ /*<>*/ caml_call3 + (failwith_message(_C_), str, str_ind, _am_); + } + flag[1] = 1; + return 0; + /*<>*/ } + var str_ind$0 = str_ind; + /*<>*/ for(;;){ + if(str_ind$0 === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ /*<>*/ var + switcher = + /*<>*/ caml_string_get + (str, str_ind$0) + - 32 + | 0; + if(16 >= switcher >>> 0) + switch(switcher){ + case 0: + /*<>*/ set_flag(str_ind$0, space); + /*<>*/ var + /*<>*/ str_ind$1 = + str_ind$0 + 1 | 0, + str_ind$0 = str_ind$1; + continue; + case 3: + /*<>*/ set_flag(str_ind$0, hash); + /*<>*/ var + /*<>*/ str_ind$2 = + str_ind$0 + 1 | 0, + str_ind$0 = str_ind$2; + continue; + case 11: + /*<>*/ set_flag(str_ind$0, plus); + /*<>*/ var + /*<>*/ str_ind$3 = + str_ind$0 + 1 | 0, + str_ind$0 = str_ind$3; + continue; + case 13: + /*<>*/ set_flag(str_ind$0, minus); + /*<>*/ var + /*<>*/ str_ind$4 = + str_ind$0 + 1 | 0, + str_ind$0 = str_ind$4; + continue; + case 16: + /*<>*/ set_flag(str_ind$0, zero); + /*<>*/ var + /*<>*/ str_ind$5 = + str_ind$0 + 1 | 0, + str_ind$0 = str_ind$5; + continue; + } + var + space$0 = space[1], + hash$0 = hash[1], + plus$0 = plus[1], + minus$0 = minus[1], + zero$0 = zero[1]; + if(str_ind$0 === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ var + padty = + zero$0 + ? minus$0 + ? legacy_behavior$0 + ? 0 + : incompatible_flag(pct_ind, str_ind$0, 45, cst_0) + : 2 + : minus$0 ? 0 : 1, + /*<>*/ match = + /*<>*/ caml_string_get + (str, str_ind$0); + if(48 <= match){ + if(58 > match){ + /*<>*/ var + /*<>*/ match$0 = + parse_positive(str_ind$0, end_ind, 0), + width = match$0[2], + new_ind = match$0[1]; + /*<>*/ return parse_after_padding + (pct_ind, + new_ind, + end_ind, + minus$0, + plus$0, + hash$0, + space$0, + ign, + [0, padty, width]); + } + } + else if(42 === match) + /*<>*/ return parse_after_padding + (pct_ind, + str_ind$0 + 1 | 0, + end_ind, + minus$0, + plus$0, + hash$0, + space$0, + ign, + [1, padty]); + switch(padty){ + case 0: + if(1 - legacy_behavior$0) + /*<>*/ invalid_format_without + (str_ind$0 - 1 | 0, 45, cst_padding); + /*<>*/ return parse_after_padding + (pct_ind, + str_ind$0, + end_ind, + minus$0, + plus$0, + hash$0, + space$0, + ign, + 0); + case 1: + /*<>*/ return parse_after_padding + (pct_ind, + str_ind$0, + end_ind, + minus$0, + plus$0, + hash$0, + space$0, + ign, + 0); + default: + /*<>*/ return parse_after_padding + (pct_ind, + str_ind$0, + end_ind, + minus$0, + plus$0, + hash$0, + space$0, + ign, + _D_); + } + } + /*<>*/ } + function parse_tag(is_open_tag, str_ind, end_ind){ + /*<>*/ try{ + if(str_ind === end_ind) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + if + (60 + !== + /*<>*/ caml_string_get(str, str_ind)) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + /*<>*/ /*<>*/ var + ind = + /*<>*/ caml_call3 + (Stdlib_String[31], 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[15], str, str_ind, (ind - str_ind | 0) + 1 | 0), + fmt_rest$0 = parse(ind + 1 | 0, end_ind)[1], + sub_fmt = parse(str_ind, ind + 1 | 0)[1], + /*<>*/ sub_format$0 = + [0, sub_fmt, sub_str], + /*<>*/ formatting$0 = + is_open_tag ? [0, sub_format$0] : [1, sub_format$0], + /*<>*/ _ai_ = + [0, [18, formatting$0, fmt_rest$0]]; + /*<>*/ return _ai_; + } + catch(_aj_){ + var _ah_ = caml_wrap_exception(_aj_); + if(_ah_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ah_, 0); + /*<>*/ var + fmt_rest = parse(str_ind, end_ind)[1], + /*<>*/ formatting = + is_open_tag ? [0, sub_format] : [1, sub_format]; + /*<>*/ return [0, + [18, formatting, fmt_rest]]; + } + /*<>*/ } + function parse_spaces(str_ind, end_ind){ + /*<>*/ var str_ind$0 = str_ind; + /*<>*/ for(;;){ + if(str_ind$0 === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ if + (32 + !== + /*<>*/ caml_string_get(str, str_ind$0)) + /*<>*/ return str_ind$0; + var str_ind$1 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$1; + } + /*<>*/ } + function parse_positive(str_ind, end_ind, acc){ + /*<>*/ var + str_ind$0 = str_ind, + acc$0 = acc; + /*<>*/ for(;;){ + if(str_ind$0 === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ /*<>*/ var + c = + /*<>*/ caml_string_get + (str, str_ind$0); + if(9 < c - 48 >>> 0) + /*<>*/ return [0, str_ind$0, acc$0]; + var new_acc = (acc$0 * 10 | 0) + (c - 48 | 0) | 0; + if(Stdlib_Sys[12] < new_acc){ + /*<>*/ /*<>*/ var + _ag_ = Stdlib_Sys[12]; + /*<>*/ return /*<>*/ caml_call3 + (failwith_message(_S_), str, new_acc, _ag_); + } + var + str_ind$1 = str_ind$0 + 1 | 0, + str_ind$0 = str_ind$1, + acc$0 = new_acc; + } + /*<>*/ } + function parse_integer(str_ind, end_ind){ + /*<>*/ if(str_ind === end_ind) + /*<>*/ unexpected_end_of_format(end_ind); + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_string_get(str, str_ind); + if(48 <= match){ + if(58 > match) + /*<>*/ return parse_positive + (str_ind, end_ind, 0); + } + else if(45 === match){ + if((str_ind + 1 | 0) === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ /*<>*/ var + c = + /*<>*/ caml_string_get + (str, str_ind + 1 | 0); + if(9 < c - 48 >>> 0) + /*<>*/ return expected_character + (str_ind + 1 | 0, cst_digit, c); + /*<>*/ var + /*<>*/ match$0 = + parse_positive(str_ind + 1 | 0, end_ind, 0), + n = match$0[2], + next_ind = match$0[1]; + /*<>*/ return [0, next_ind, - n | 0]; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _T_], 1); + /*<>*/ } + function search_subformat_end(str_ind, end_ind, c){ + /*<>*/ var str_ind$0 = str_ind; + /*<>*/ for(;;){ + if(str_ind$0 === end_ind) + /*<>*/ /*<>*/ caml_call3 + (failwith_message(_U_), str, c, end_ind); + if + (37 + === + /*<>*/ caml_string_get + (str, str_ind$0)){ + if((str_ind$0 + 1 | 0) === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + if + ( /*<>*/ caml_string_get + (str, str_ind$0 + 1 | 0) + === c) + /*<>*/ return str_ind$0; + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_string_get + (str, str_ind$0 + 1 | 0); + if(95 <= match){ + if(123 <= match){ + if(126 > match) + switch(match - 123 | 0){ + case 0: + /*<>*/ var + /*<>*/ sub_end = + search_subformat_end(str_ind$0 + 2 | 0, end_ind, 125), + /*<>*/ str_ind$2 = + sub_end + 2 | 0, + str_ind$0 = str_ind$2; + continue; + case 1: break; + default: + /*<>*/ return expected_character + (str_ind$0 + 1 | 0, cst_character, 125); + } + } + else if(96 > match){ + if((str_ind$0 + 2 | 0) === end_ind) + /*<>*/ unexpected_end_of_format + (end_ind); + /*<>*/ /*<>*/ var + match$0 = + /*<>*/ caml_string_get + (str, str_ind$0 + 2 | 0); + if(40 === match$0){ + /*<>*/ var + /*<>*/ sub_end$0 = + search_subformat_end(str_ind$0 + 3 | 0, end_ind, 41), + /*<>*/ str_ind$3 = + sub_end$0 + 2 | 0, + str_ind$0 = str_ind$3; + continue; + } + if(123 === match$0){ + /*<>*/ var + /*<>*/ sub_end$1 = + search_subformat_end(str_ind$0 + 3 | 0, end_ind, 125), + /*<>*/ str_ind$4 = + sub_end$1 + 2 | 0, + str_ind$0 = str_ind$4; + continue; + } + var str_ind$5 = str_ind$0 + 3 | 0, str_ind$0 = str_ind$5; + continue; + } + } + else{ + if(40 === match){ + /*<>*/ var + /*<>*/ sub_end$2 = + search_subformat_end(str_ind$0 + 2 | 0, end_ind, 41), + /*<>*/ str_ind$6 = sub_end$2 + 2 | 0, + str_ind$0 = str_ind$6; + continue; + } + if(41 === match) + /*<>*/ return expected_character + (str_ind$0 + 1 | 0, cst_character$0, 41); + } + var str_ind$1 = str_ind$0 + 2 | 0, str_ind$0 = str_ind$1; + } + else + var str_ind$7 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$7; + } + /*<>*/ } + function incompatible_flag(pct_ind, str_ind, symb, option){ + /*<>*/ /*<>*/ var + subfmt = + /*<>*/ caml_call3 + (Stdlib_String[15], str, pct_ind, str_ind - pct_ind | 0); + /*<>*/ return /*<>*/ caml_call5 + (failwith_message(_Y_), str, pct_ind, option, symb, subfmt); + /*<>*/ } + function compute_int_conv(pct_ind, str_ind, plus, hash, space, symb){ + /*<>*/ var + plus$0 = plus, + hash$0 = hash, + space$0 = space; + /*<>*/ for(;;){ + a: + { + if(plus$0){ + if(! hash$0){ + if(space$0) break a; + if(100 === symb) /*<>*/ return 1; + if(105 === symb) /*<>*/ return 4; + break a; + } + } + else{ + if(! hash$0){ + if(space$0){ + if(100 === symb) /*<>*/ return 2; + if(105 === symb) /*<>*/ return 5; + break a; + } + var switcher$1 = symb - 88 | 0; + if(32 < switcher$1 >>> 0) break a; + switch(switcher$1){ + case 0: + /*<>*/ return 8; + case 12: + /*<>*/ return 0; + case 17: + /*<>*/ return 3; + case 23: + /*<>*/ return 10; + case 29: + /*<>*/ return 12; + case 32: + /*<>*/ return 6; + default: break a; + } + } + if(! space$0){ + var switcher$0 = symb - 88 | 0; + if(32 >= switcher$0 >>> 0) + switch(switcher$0){ + case 0: + /*<>*/ return 9; + case 12: + /*<>*/ return 13; + case 17: + /*<>*/ return 14; + case 23: + /*<>*/ return 11; + case 29: + /*<>*/ return 15; + case 32: + /*<>*/ return 7; + } + } + } + var switcher = symb - 88 | 0; + if(32 >= switcher >>> 0) + switch(switcher){ + case 0: + if(legacy_behavior$0) + /*<>*/ return 9; + break; + case 23: + if(legacy_behavior$0) + /*<>*/ return 11; + break; + case 32: + if(legacy_behavior$0) + /*<>*/ return 7; + break; + case 12: + case 17: + case 29: + if(! legacy_behavior$0) + /*<>*/ return incompatible_flag + (pct_ind, str_ind, symb, cst$35); + var hash$0 = 0; + continue; + } + } + if(plus$0) + if(space$0){ + if(! legacy_behavior$0) + /*<>*/ return incompatible_flag + (pct_ind, str_ind, 32, cst$32); + var space$0 = 0; + } + else{ + if(! legacy_behavior$0) + /*<>*/ return incompatible_flag + (pct_ind, str_ind, symb, cst$33); + var plus$0 = 0; + } + else{ + if(! space$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _W_], 1); + if(! legacy_behavior$0) + /*<>*/ return incompatible_flag + (pct_ind, str_ind, symb, cst$34); + var space$0 = 0; + } + } + /*<>*/ } + return parse(0, caml_ml_string_length(str)); + } + function format_of_string_fmtty(str, fmtty){ + /*<>*/ var + fmt = fmt_ebb_of_string(0, str)[1]; + /*<>*/ try{ + /*<>*/ /*<>*/ var + _ae_ = [0, type_format(fmt, fmtty), str]; + /*<>*/ return _ae_; + } + catch(_af_){ + var _ac_ = caml_wrap_exception(_af_); + if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); + /*<>*/ /*<>*/ var + _ad_ = string_of_fmtty(fmtty); + /*<>*/ return /*<>*/ caml_call2 + (failwith_message(_Z_), str, _ad_); + } + /*<>*/ } + function format_of_string_format(str, param){ + var + str$0 = param[2], + fmt = param[1], + fmt$0 = fmt_ebb_of_string(0, str)[1]; + /*<>*/ try{ + /*<>*/ /*<>*/ var + _aa_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; + /*<>*/ return _aa_; + } + catch(_ab_){ + var _$_ = caml_wrap_exception(_ab_); + if(_$_ === Type_mismatch) + /*<>*/ return /*<>*/ caml_call2 + (failwith_message(___), str, str$0); + throw caml_maybe_attach_backtrace(_$_, 0); + } + } + var + CamlinternalFormat = + [0, + is_in_char_set, + rev_char_set, + create_char_set, + add_in_char_set, + freeze_char_set, + param_format_of_ignored_format, + make_printf, + make_iprintf, + output_acc, + bufput_acc, + strput_acc, + type_format, + fmt_ebb_of_string, + format_of_string_fmtty, + format_of_string_format, + char_of_iconv, + string_of_formatting_lit, + string_of_fmtty, + string_of_fmt, + open_box_of_string, + symm, + trans, + recast]; + runtime.caml_register_global(197, CamlinternalFormat, "CamlinternalFormat"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Printf +//# unitInfo: Requires: CamlinternalFormat, Stdlib, Stdlib__Buffer +(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]); + } + /*<>*/ 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, + CamlinternalFormat = global_data.CamlinternalFormat, + Stdlib = global_data.Stdlib; + function kfprintf(k, o, param){ + /*<>*/ var + fmt = param[1], + /*<>*/ _g_ = 0; + function _h_(acc){ + /*<>*/ /*<>*/ caml_call2 + (CamlinternalFormat[9], o, acc); + return caml_call1(k, o); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[7], _h_, _g_, fmt); + } + function kbprintf(k, b, param){ + /*<>*/ var + fmt = param[1], + /*<>*/ _e_ = 0; + function _f_(acc){ + /*<>*/ /*<>*/ caml_call2 + (CamlinternalFormat[10], b, acc); + return caml_call1(k, b); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[7], _f_, _e_, fmt); + } + function ikfprintf(k, oc, param){ + var fmt = param[1]; + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[8], k, oc, fmt); + } + function fprintf(oc, fmt){ + /*<>*/ return kfprintf + (function(_d_){ /*<>*/ return 0;}, oc, fmt); + /*<>*/ } + function bprintf(b, fmt){ + /*<>*/ return kbprintf + (function(_c_){ /*<>*/ return 0;}, b, fmt); + /*<>*/ } + function ifprintf(oc, fmt){ + /*<>*/ return ikfprintf + (function(_b_){ /*<>*/ return 0;}, oc, fmt); + /*<>*/ } + function ibprintf(b, fmt){ + /*<>*/ return ikfprintf + (function(_a_){ /*<>*/ return 0;}, b, fmt); + /*<>*/ } + function printf(fmt){ + /*<>*/ return fprintf(Stdlib[39], fmt); + /*<>*/ } + function eprintf(fmt){ + /*<>*/ return fprintf(Stdlib[40], fmt); + /*<>*/ } + 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); + /*<>*/ return /*<>*/ caml_call1 + (k, /*<>*/ caml_call1(Stdlib_Buffer[2], buf)); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[7], k$0, 0, fmt); + } + function sprintf(fmt){ + /*<>*/ return ksprintf + (function(s){ + /*<>*/ return s; + /*<>*/ }, + fmt); + /*<>*/ } + var + Stdlib_Printf = + [0, + fprintf, + printf, + eprintf, + sprintf, + bprintf, + ifprintf, + ibprintf, + kfprintf, + ikfprintf, + ksprintf, + kbprintf, + ikfprintf, + ksprintf]; + runtime.caml_register_global(3, Stdlib_Printf, "Stdlib__Printf"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Arg +//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Buffer, Stdlib__Int, Stdlib__List, Stdlib__Printf, Stdlib__String, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst$7 = "", + cst$9 = " ", + cst_Display_this_list_of_optio$1 = " Display this list of options", + cst_s = "%s", + cst_help$4 = "--help", + cst_help$3 = "-help", + cst$8 = ".\n", + cst_a_float$1 = "a float", + cst_an_integer$1 = "an integer", + caml_check_bound = runtime.caml_check_bound, + caml_equal = runtime.caml_equal, + caml_fresh_oo_id = runtime.caml_fresh_oo_id, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_get = runtime.caml_string_get, + caml_string_notequal = runtime.caml_string_notequal, + caml_sys_argv = runtime.caml_sys_argv, + 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) + : 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]); + } + /*<>*/ 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$6 = "\n", + cst$3 = cst$7, + cst$4 = " ", + cst$5 = cst$7, + cst$2 = "(?)", + cst = "}", + cst$0 = "|", + cst$1 = "{", + Stdlib = global_data.Stdlib, + Stdlib_Printf = global_data.Stdlib__Printf, + Stdlib_Array = global_data.Stdlib__Array, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_List = global_data.Stdlib__List, + Stdlib_String = global_data.Stdlib__String, + Stdlib_Int = global_data.Stdlib__Int, + /*<>*/ Bad = [248, "Stdlib.Arg.Bad", caml_fresh_oo_id(0)], + /*<>*/ Help = [248, "Stdlib.Arg.Help", caml_fresh_oo_id(0)], + /*<>*/ Stop = [248, "Stdlib.Arg.Stop", caml_fresh_oo_id(0)], + _v_ = [0, [2, 0, [0, 0]], "%s%c"], + _p_ = [0, [2, 0, 0], cst_s], + _q_ = [0, [2, 0, 0], cst_s], + _n_ = [0, [2, 0, 0], cst_s], + _o_ = [0, [2, 0, 0], cst_s], + _l_ = [0, [2, 0, 0], cst_s], + _m_ = [0, [2, 0, 0], cst_s], + cst_a_boolean = "a boolean", + cst_an_integer = cst_an_integer$1, + cst_an_integer$0 = cst_an_integer$1, + cst_a_float = cst_a_float$1, + cst_a_float$0 = cst_a_float$1, + cst_one_of = "one of: ", + cst_Arg_Expand_is_is_only_allo = + "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic", + cst_no_argument = "no argument", + _f_ = + [0, + [2, 0, [11, ": unknown option '", [2, 0, [11, "'.\n", 0]]]], + "%s: unknown option '%s'.\n"], + _i_ = + [0, + [2, + 0, + [11, + ": wrong argument '", + [2, + 0, + [11, + "'; option '", + [2, 0, [11, "' expects ", [2, 0, [11, cst$8, 0]]]]]]]], + "%s: wrong argument '%s'; option '%s' expects %s.\n"], + _j_ = + [0, + [2, 0, [11, ": option '", [2, 0, [11, "' needs an argument.\n", 0]]]], + "%s: option '%s' needs an argument.\n"], + _k_ = [0, [2, 0, [11, ": ", [2, 0, [11, cst$8, 0]]]], "%s: %s.\n"], + _g_ = [0, cst_help$3], + _h_ = [0, cst_help$4], + _e_ = [0, [2, 0, 0], cst_s], + _d_ = [0, [2, 0, [12, 10, 0]], "%s\n"], + cst_help$2 = cst_help$3, + cst_Display_this_list_of_optio = cst_Display_this_list_of_optio$1, + cst_help = cst_help$3, + cst_help$1 = cst_help$4, + cst_Display_this_list_of_optio$0 = cst_Display_this_list_of_optio$1, + cst_help$0 = cst_help$4, + _c_ = [0, cst_help$3], + _a_ = [0, [11, cst$9, [2, 0, [12, 32, [2, 0, [12, 10, 0]]]]], " %s %s\n"], + _b_ = + [0, + [11, cst$9, [2, 0, [12, 32, [2, 0, [2, 0, [12, 10, 0]]]]]], + " %s %s%s\n"], + cst_none = ""; + function assoc3(x, l){ + /*<>*/ var l$0 = l; + /*<>*/ for(;;){ + if(! l$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var match = l$0[1], y2 = match[2], y1 = match[1]; + /*<>*/ if( /*<>*/ caml_equal(y1, x)) + /*<>*/ return y2; + var t = l$0[2], l$0 = t; + } + /*<>*/ } + function make_symlist(prefix, sep, suffix, l){ + /*<>*/ if(! l) /*<>*/ return cst_none; + /*<>*/ var + t = l[2], + h = l[1], + /*<>*/ _aD_ = + /*<>*/ caml_call2(Stdlib[28], prefix, h); + function _aE_(x, y){ + /*<>*/ /*<>*/ var + _aG_ = /*<>*/ caml_call2(Stdlib[28], sep, y); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], x, _aG_); + /*<>*/ } + /*<>*/ /*<>*/ var + _aF_ = /*<>*/ caml_call3(Stdlib_List[25], _aE_, _aD_, t); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], _aF_, suffix); + /*<>*/ } + function help_action(param){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, _c_], 1); + /*<>*/ } + function add_help(speclist){ + /*<>*/ try{ + /*<>*/ assoc3(cst_help$2, speclist); + /*<>*/ var /*<>*/ _aA_ = 0, add1 = _aA_; + } + catch(_aC_){ + var _aw_ = caml_wrap_exception(_aC_); + if(_aw_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_aw_, 0); + var + add1 = + [0, + [0, cst_help, [0, help_action], cst_Display_this_list_of_optio], + 0]; + } + try{ + /*<>*/ assoc3(cst_help$1, speclist); + /*<>*/ var /*<>*/ _az_ = 0, add2 = _az_; + } + catch(_aB_){ + var _ax_ = caml_wrap_exception(_aB_); + if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); + var + add2 = + [0, + [0, cst_help$0, [0, help_action], cst_Display_this_list_of_optio$0], + 0]; + } + /*<>*/ /*<>*/ var + _ay_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[37], speclist, _ay_); + /*<>*/ } + function usage_b(buf, speclist, errmsg){ + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Printf[5], buf, _d_, errmsg); + /*<>*/ /*<>*/ var + _as_ = add_help(speclist); + /*<>*/ function _at_(param){ + var + doc = param[3], + spec = param[2], + key = param[1], + _au_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; + if(! _au_) return _au_; + if(11 !== spec[0]) + /*<>*/ return /*<>*/ caml_call4 + (Stdlib_Printf[5], buf, _a_, key, doc); + /*<>*/ var + l = spec[1], + /*<>*/ _av_ = make_symlist(cst$1, cst$0, cst, l); + /*<>*/ return /*<>*/ caml_call5 + (Stdlib_Printf[5], buf, _b_, key, _av_, doc); + } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[17], _at_, _as_); + /*<>*/ } + function usage_string(speclist, errmsg){ + /*<>*/ /*<>*/ var + b = /*<>*/ caml_call1(Stdlib_Buffer[1], 200); + /*<>*/ usage_b(b, speclist, errmsg); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Buffer[2], b); + /*<>*/ } + function usage(speclist, errmsg){ + /*<>*/ /*<>*/ var + _ar_ = usage_string(speclist, errmsg); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Printf[3], _e_, _ar_); + /*<>*/ } + /*<>*/ /*<>*/ var current = [0, 0]; + function int_of_string_opt(x){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _ap_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; + /*<>*/ return _ap_; + } + catch(_aq_){ + var _ao_ = caml_wrap_exception(_aq_); + if(_ao_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_ao_, 0); + } + /*<>*/ } + function float_of_string_opt(x){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _am_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; + /*<>*/ return _am_; + } + catch(_an_){ + var _al_ = caml_wrap_exception(_an_); + if(_al_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_al_, 0); + } + /*<>*/ } + function parse_and_expand_argv_dynamic_ + (allow_expand, current, argv, speclist, anonfun, errmsg){ + var initpos = current[1]; + function convert_error(error){ + /*<>*/ var + /*<>*/ b = + /*<>*/ caml_call1(Stdlib_Buffer[1], 200), + progname = + initpos < argv[1].length - 1 + ? caml_check_bound(argv[1], initpos)[1 + initpos] + : cst$2; + /*<>*/ switch(error[0]){ + case 0: + var s = error[1]; + if + (caml_string_notequal(s, cst_help$4) + && caml_string_notequal(s, cst_help$3)) + /*<>*/ /*<>*/ caml_call4 + (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); + break; + case 2: + var s$0 = error[1]; + /*<>*/ /*<>*/ caml_call4 + (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); + } + /*<>*/ 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)]; + /*<>*/ } + /*<>*/ current[1]++; + for(;;){ + if(current[1] >= argv[1].length - 1) return 0; + /*<>*/ try{ + /*<>*/ var + _Y_ = current[1], + /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_]; + a: + { + /*<>*/ if + (1 <= /*<>*/ caml_ml_string_length(s) + && 45 === /*<>*/ caml_string_get(s, 0)){ + try{ + /*<>*/ var + follow$1 = 0, + /*<>*/ _aa_ = assoc3(s, speclist[1]), + follow$0 = follow$1, + action = _aa_; + } + catch(_aj_){ + var _Z_ = caml_wrap_exception(_aj_); + if(_Z_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Z_, 0); + /*<>*/ try{ + /*<>*/ var + /*<>*/ i = + /*<>*/ caml_call2(Stdlib_String[35], s, 61), + /*<>*/ len = + /*<>*/ caml_ml_string_length(s), + /*<>*/ arg = + /*<>*/ caml_call3 + (Stdlib_String[15], s, i + 1 | 0, len - (i + 1 | 0) | 0), + /*<>*/ keyword = + /*<>*/ caml_call3(Stdlib_String[15], s, 0, i), + /*<>*/ follow = [0, arg], + /*<>*/ _$_ = assoc3(keyword, speclist[1]), + follow$0 = follow, + action = _$_; + } + catch(_ak_){ + var ___ = caml_wrap_exception(_ak_); + if(___ === Stdlib[8]) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [0, s]], 1); + throw caml_maybe_attach_backtrace(___, 0); + } + } + var + no_arg$0 = + function(s, follow){ + function no_arg(param){ + /*<>*/ if(! follow) + /*<>*/ return 0; + var arg = follow[1]; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg, cst_no_argument]], 1); + /*<>*/ } + return no_arg; + }, + no_arg = no_arg$0(s, follow$0), + get_arg$0 = + function(s, follow){ + function get_arg(param){ + /*<>*/ if(follow){ + var arg = follow[1]; + /*<>*/ return arg; + } + if((current[1] + 1 | 0) >= argv[1].length - 1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [2, s]], 1); + var _ai_ = current[1] + 1 | 0; + /*<>*/ return caml_check_bound(argv[1], _ai_) + [1 + _ai_]; + /*<>*/ } + return get_arg; + }, + get_arg = get_arg$0(s, follow$0), + consume_arg$0 = + function(follow){ + function consume_arg(param){ + /*<>*/ return follow ? 0 : (current[1]++, 0); + /*<>*/ } + return consume_arg; + }, + consume_arg = consume_arg$0(follow$0), + treat_action$0 = + function(s, no_arg, get_arg, consume_arg){ + function treat_action(param){ + /*<>*/ switch(param[0]){ + case 0: + var f = param[1]; + /*<>*/ no_arg(0); + /*<>*/ return /*<>*/ caml_call1 + (f, 0); + case 1: + /*<>*/ var + f$0 = param[1], + /*<>*/ arg = get_arg(0); + /*<>*/ try{ + /*<>*/ var + /*<>*/ _ac_ = + [0, /*<>*/ caml_call1(Stdlib[32], arg)], + match = _ac_; + } + catch(_ah_){ + var _ab_ = caml_wrap_exception(_ah_); + if(_ab_[1] !== Stdlib[6]) + throw caml_maybe_attach_backtrace(_ab_, 0); + var match = 0; + } + if(! match) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg, cst_a_boolean]], 1); + var s$0 = match[1]; + /*<>*/ /*<>*/ caml_call1 + (f$0, s$0); + /*<>*/ return consume_arg(0); + case 2: + var r = param[1]; + /*<>*/ no_arg(0); + r[1] = 1; + return 0; + case 3: + var r$0 = param[1]; + /*<>*/ no_arg(0); + r$0[1] = 0; + return 0; + case 4: + /*<>*/ var + f$1 = param[1], + /*<>*/ arg$0 = get_arg(0); + /*<>*/ /*<>*/ caml_call1 + (f$1, arg$0); + /*<>*/ return consume_arg(0); + case 5: + var r$1 = param[1]; + r$1[1] = get_arg(0); + /*<>*/ return consume_arg(0); + case 6: + /*<>*/ var + f$2 = param[1], + /*<>*/ arg$1 = get_arg(0), + /*<>*/ match$0 = int_of_string_opt(arg$1); + if(! match$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg$1, cst_an_integer]], 1); + var x = match$0[1]; + /*<>*/ /*<>*/ caml_call1 + (f$2, x); + /*<>*/ return consume_arg(0); + case 7: + /*<>*/ var + r$2 = param[1], + /*<>*/ arg$2 = get_arg(0), + /*<>*/ match$1 = int_of_string_opt(arg$2); + if(! match$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg$2, cst_an_integer$0]], 1); + var x$0 = match$1[1]; + r$2[1] = x$0; + /*<>*/ return consume_arg(0); + case 8: + /*<>*/ var + f$3 = param[1], + /*<>*/ arg$3 = get_arg(0), + /*<>*/ match$2 = float_of_string_opt(arg$3); + if(! match$2) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg$3, cst_a_float]], 1); + var x$1 = match$2[1]; + /*<>*/ /*<>*/ caml_call1 + (f$3, x$1); + /*<>*/ return consume_arg(0); + case 9: + /*<>*/ var + r$3 = param[1], + /*<>*/ arg$4 = get_arg(0), + /*<>*/ match$3 = float_of_string_opt(arg$4); + if(! match$3) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg$4, cst_a_float$0]], 1); + var x$2 = match$3[1]; + r$3[1] = x$2; + /*<>*/ return consume_arg(0); + case 10: + var specs = param[1]; + /*<>*/ no_arg(0); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[17], treat_action, specs); + case 11: + /*<>*/ var + f$4 = param[2], + symb = param[1], + /*<>*/ arg$5 = get_arg(0); + /*<>*/ if + ( /*<>*/ caml_call2 + (Stdlib_List[36], arg$5, symb)){ + /*<>*/ /*<>*/ caml_call1 + (f$4, arg$5); + /*<>*/ return consume_arg(0); + } + /*<>*/ /*<>*/ var + _ad_ = make_symlist(cst$5, cst$4, cst$3, symb); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, + Stop, + [1, + s, + arg$5, + /*<>*/ caml_call2 + (Stdlib[28], cst_one_of, _ad_)]], + 1); + case 12: + var f$5 = param[1]; + /*<>*/ no_arg(0); + /*<>*/ for(;;){ + if(current[1] >= (argv[1].length - 1 - 1 | 0)) return 0; + var _ae_ = current[1] + 1 | 0; + /*<>*/ /*<>*/ caml_call1 + (f$5, caml_check_bound(argv[1], _ae_)[1 + _ae_]); + /*<>*/ consume_arg(0); + } + break; + case 13: + var f$6 = param[1]; + /*<>*/ no_arg(0); + /*<>*/ /*<>*/ var + acc = [0, 0]; + /*<>*/ for(;;){ + if(current[1] >= (argv[1].length - 1 - 1 | 0)) + /*<>*/ return /*<>*/ caml_call1 + (f$6, + /*<>*/ caml_call1(Stdlib_List[9], acc[1])); + var _ag_ = current[1] + 1 | 0, _af_ = acc[1]; + acc[1] = [0, caml_check_bound(argv[1], _ag_)[1 + _ag_], _af_]; + /*<>*/ consume_arg(0); + } + break; + default: + var f$7 = param[1]; + if(1 - allow_expand) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stdlib[6], cst_Arg_Expand_is_is_only_allo], 1); + /*<>*/ var + /*<>*/ arg$6 = get_arg(0), + /*<>*/ newarg = + /*<>*/ caml_call1(f$7, arg$6); + /*<>*/ consume_arg(0); + /*<>*/ var + /*<>*/ before = + /*<>*/ caml_call3 + (Stdlib_Array[5], argv[1], 0, current[1] + 1 | 0), + /*<>*/ after = + /*<>*/ caml_call3 + (Stdlib_Array[5], + argv[1], + current[1] + 1 | 0, + (argv[1].length - 1 - current[1] | 0) - 1 | 0); + argv[1] = + /*<>*/ caml_call1 + (Stdlib_Array[4], [0, before, [0, newarg, [0, after, 0]]]); + return 0; + } + /*<>*/ } + return treat_action; + }, + treat_action = treat_action$0(s, no_arg, get_arg, consume_arg); + /*<>*/ treat_action(action); + break a; + } + /*<>*/ /*<>*/ caml_call1(anonfun, s); + } + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn[1] === Bad){ + var m = exn[2]; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (convert_error([3, m]), 1); + } + if(exn[1] !== Stop) throw caml_maybe_attach_backtrace(exn, 0); + var e = exn[2]; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (convert_error(e), 1); + } + current[1]++; + } + } + function parse_and_expand_argv_dynamic + (current, argv, speclist, anonfun, errmsg){ + /*<>*/ return parse_and_expand_argv_dynamic_ + (1, current, argv, speclist, anonfun, errmsg); + /*<>*/ } + function parse_argv_dynamic(opt, argv, speclist, anonfun, errmsg){ + /*<>*/ if(opt) + var sth = opt[1], current$0 = sth; + else + var current$0 = current; + /*<>*/ return parse_and_expand_argv_dynamic_ + (0, current$0, [0, argv], speclist, anonfun, errmsg); + /*<>*/ } + function parse_argv(opt, argv, speclist, anonfun, errmsg){ + /*<>*/ if(opt) + var sth = opt[1], current$0 = sth; + else + var current$0 = current; + /*<>*/ return parse_argv_dynamic + ([0, current$0], argv, [0, speclist], anonfun, errmsg); + /*<>*/ } + function parse(l, f, msg){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _X_ = parse_argv(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _X_; + } + catch(exn$0){ + 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); + } + 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); + } + /*<>*/ } + function parse_dynamic(l, f, msg){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _W_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _W_; + } + catch(exn$0){ + 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); + } + 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); + } + /*<>*/ } + function parse_expand(l, f, msg){ + /*<>*/ try{ + /*<>*/ var + /*<>*/ argv = [0, caml_sys_argv(0)], + /*<>*/ spec = [0, l], + /*<>*/ current$0 = [0, current[1]], + /*<>*/ _V_ = + parse_and_expand_argv_dynamic(current$0, argv, spec, f, msg); + /*<>*/ return _V_; + } + catch(exn$0){ + 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); + } + 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); + } + /*<>*/ } + function second_word(s){ + /*<>*/ var len = caml_ml_string_length(s); + function loop(n){ + /*<>*/ var n$0 = n; + /*<>*/ for(;;){ + if(len <= n$0) /*<>*/ return len; + /*<>*/ if + (32 !== /*<>*/ caml_string_get(s, n$0)) + /*<>*/ return n$0; + /*<>*/ var + /*<>*/ n$1 = n$0 + 1 | 0, + n$0 = n$1; + } + /*<>*/ } + /*<>*/ try{ + /*<>*/ /*<>*/ var + n$0 = /*<>*/ caml_call2(Stdlib_String[35], s, 9); + } + catch(_T_){ + var _R_ = caml_wrap_exception(_T_); + if(_R_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_R_, 0); + /*<>*/ try{ + /*<>*/ /*<>*/ var + n = /*<>*/ caml_call2(Stdlib_String[35], s, 32); + } + catch(_U_){ + var _S_ = caml_wrap_exception(_U_); + if(_S_ === Stdlib[8]) /*<>*/ return len; + throw caml_maybe_attach_backtrace(_S_, 0); + } + /*<>*/ return loop(n + 1 | 0); + } + /*<>*/ return loop(n$0 + 1 | 0); + /*<>*/ } + function max_arg_len(cur, param){ + var doc = param[3], spec = param[2], kwd = param[1]; + /*<>*/ if(11 === spec[0]) + return caml_call2(Stdlib_Int[11], cur, caml_ml_string_length(kwd)); + var _Q_ = caml_ml_string_length(kwd) + second_word(doc) | 0; + return caml_call2(Stdlib_Int[11], cur, _Q_); + } + function replace_leading_tab(s){ + /*<>*/ /*<>*/ var seen = [0, 0]; + function _P_(c){ + /*<>*/ if(9 === c && ! seen[1]){ + seen[1] = 1; + /*<>*/ return 32; + } + /*<>*/ return c; + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_String[17], _P_, s); + /*<>*/ } + function align(opt, speclist){ + /*<>*/ if(opt) + var sth = opt[1], limit = sth; + else + var limit = Stdlib[19]; + /*<>*/ var + /*<>*/ completed = add_help(speclist), + /*<>*/ len = + /*<>*/ caml_call3 + (Stdlib_List[25], max_arg_len, 0, completed), + /*<>*/ len$0 = + /*<>*/ caml_call2(Stdlib_Int[10], len, limit); + /*<>*/ function _J_(ksd){ + var kwd = ksd[1], spec = ksd[2]; + if(! caml_string_notequal(ksd[3], cst$7)) + /*<>*/ return ksd; + if(11 === spec[0]){ + /*<>*/ var + msg$0 = ksd[3], + /*<>*/ cutcol$0 = second_word(msg$0), + /*<>*/ _M_ = + /*<>*/ caml_call2 + (Stdlib_Int[11], 0, len$0 - cutcol$0 | 0) + + 3 + | 0, + /*<>*/ spaces$0 = + /*<>*/ caml_call2(Stdlib_String[1], _M_, 32), + /*<>*/ _N_ = replace_leading_tab(msg$0), + /*<>*/ _O_ = + /*<>*/ caml_call2(Stdlib[28], spaces$0, _N_); + /*<>*/ return [0, + kwd, + spec, + /*<>*/ caml_call2(Stdlib[28], cst$6, _O_)]; + } + /*<>*/ var + msg = ksd[3], + spec$0 = ksd[2], + /*<>*/ cutcol = second_word(msg), + /*<>*/ kwd_len = + /*<>*/ caml_ml_string_length(kwd), + diff = (len$0 - kwd_len | 0) - cutcol | 0; + /*<>*/ if(0 >= diff) + /*<>*/ return [0, kwd, spec$0, replace_leading_tab(msg)]; + /*<>*/ var + /*<>*/ spaces = + /*<>*/ caml_call2(Stdlib_String[1], diff, 32), + /*<>*/ _K_ = replace_leading_tab(msg), + /*<>*/ prefix = + /*<>*/ caml_call3(Stdlib_String[15], _K_, 0, cutcol), + /*<>*/ suffix = + /*<>*/ caml_call3 + (Stdlib_String[15], + msg, + cutcol, + caml_ml_string_length(msg) - cutcol | 0), + /*<>*/ _L_ = + /*<>*/ caml_call2(Stdlib[28], spaces, suffix); + /*<>*/ return [0, + kwd, + spec$0, + /*<>*/ caml_call2(Stdlib[28], prefix, _L_)]; + } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[19], _J_, completed); + /*<>*/ } + function read_aux(trim, sep, file){ + /*<>*/ var + /*<>*/ ic = + /*<>*/ caml_call1(Stdlib[80], file), + /*<>*/ buf = + /*<>*/ caml_call1(Stdlib_Buffer[1], 200), + /*<>*/ words = [0, 0]; + function stash(param){ + /*<>*/ /*<>*/ var + word = /*<>*/ caml_call1(Stdlib_Buffer[2], buf); + /*<>*/ if(trim){ + var len = caml_ml_string_length(word); + a: + { + /*<>*/ if + (0 < len + && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ + var + _I_ = + /*<>*/ caml_call3 + (Stdlib_String[15], word, 0, len - 1 | 0); + break a; + } + var _I_ = word; + } + var word$0 = _I_; + } + else + var word$0 = word; + words[1] = [0, word$0, words[1]]; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Buffer[8], buf); + /*<>*/ } + /*<>*/ try{ + for(;;){ + /*<>*/ /*<>*/ var + c = /*<>*/ caml_call1(Stdlib[82], ic); + if(c === sep) + /*<>*/ stash(0); + else + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], buf, c); + } + } + catch(_H_){ + var _F_ = caml_wrap_exception(_H_); + if(_F_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_F_, 0); + if(0 < /*<>*/ caml_call1(Stdlib_Buffer[7], buf)) + /*<>*/ stash(0); + /*<>*/ /*<>*/ caml_call1(Stdlib[93], ic); + /*<>*/ /*<>*/ var + _G_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Array[10], _G_); + } + /*<>*/ } + var _r_ = 10, _s_ = 1; + /*<>*/ function read_arg(_E_){ + /*<>*/ return read_aux(_s_, _r_, _E_); + } + /*<>*/ var /*<>*/ _t_ = 0, _u_ = 0; + /*<>*/ function read_arg0(_D_){ + /*<>*/ return read_aux(_u_, _t_, _D_); + } + function write_aux(sep, file, args){ + /*<>*/ /*<>*/ var + oc = /*<>*/ caml_call1(Stdlib[61], file); + function _C_(s){ + /*<>*/ return caml_call4 + (Stdlib_Printf[1], oc, _v_, s, sep); + /*<>*/ } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Array[11], _C_, args); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[76], oc); + /*<>*/ } + var _w_ = 10; + /*<>*/ function write_arg(_A_, _B_){ + /*<>*/ return write_aux(_w_, _A_, _B_); + } + /*<>*/ /*<>*/ var _x_ = 0; + /*<>*/ function write_arg0(_y_, _z_){ + /*<>*/ return write_aux(_x_, _y_, _z_); + } + var + Stdlib_Arg = + [0, + parse, + parse_dynamic, + parse_argv, + parse_argv_dynamic, + parse_and_expand_argv_dynamic, + parse_expand, + Help, + Bad, + usage, + usage_string, + align, + current, + read_arg, + read_arg0, + write_arg, + write_arg0]; + runtime.caml_register_global(54, Stdlib_Arg, "Stdlib__Arg"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Printexc +//# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Buffer, Stdlib__Obj, Stdlib__Printf +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst$4 = "", + cst_s = "%s\n", + cst_Program_not_linked_with_g_$0 = + "(Program not linked with -g, cannot print stack backtrace)\n", + cst_characters = ", characters ", + cst_Fatal_error_exception = "Fatal error: exception ", + cst_Fatal_error_exception_s = "Fatal error: exception %s\n", + cst_Uncaught_exception = "Uncaught exception: ", + cst_Uncaught_exception_s = "Uncaught exception: %s\n", + caml_check_bound = runtime.caml_check_bound, + caml_get_exception_raw_backtra = runtime.caml_get_exception_raw_backtrace, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_obj_tag = runtime.caml_obj_tag, + 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) + : 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_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]); + } + /*<>*/ var + global_data = runtime.caml_get_global_data(), + cst$0 = cst$4, + cst$3 = cst$4, + partial = [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, 0]]], + cst$1 = cst$4, + cst$2 = cst$4, + cst = "_", + locfmt = + [0, + [11, + 'File "', + [2, + 0, + [11, + '", line ', + [4, + 0, + 0, + 0, + [11, + cst_characters, + [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, [11, ": ", [2, 0, 0]]]]]]]]]], + 'File "%s", line %d, characters %d-%d: %s'], + Stdlib_Printf = global_data.Stdlib__Printf, + Stdlib_Atomic = global_data.Stdlib__Atomic, + Stdlib = global_data.Stdlib, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_Obj = global_data.Stdlib__Obj, + /*<>*/ printers = + /*<>*/ caml_call1(Stdlib_Atomic[1], 0), + _c_ = [0, [11, ", ", [2, 0, [2, 0, 0]]], ", %s%s"], + _o_ = + [0, + [11, cst_Fatal_error_exception, [2, 0, [12, 10, 0]]], + cst_Fatal_error_exception_s], + _p_ = + [0, + [11, + "Fatal error in uncaught exception handler: exception ", + [2, 0, [12, 10, 0]]], + "Fatal error in uncaught exception handler: exception %s\n"], + cst_Fatal_error_out_of_memory_ = + "Fatal error: out of memory in uncaught exception handler", + _n_ = + [0, + [11, cst_Fatal_error_exception, [2, 0, [12, 10, 0]]], + cst_Fatal_error_exception_s], + _l_ = [0, [2, 0, [12, 10, 0]], cst_s], + cst_Program_not_linked_with_g_ = cst_Program_not_linked_with_g_$0, + _j_ = [0, [2, 0, [12, 10, 0]], cst_s], + _k_ = + [0, + [11, cst_Program_not_linked_with_g_$0, 0], + cst_Program_not_linked_with_g_$0], + cst_Raised_at = "Raised at", + cst_Re_raised_at = "Re-raised at", + cst_Raised_by_primitive_operat = "Raised by primitive operation at", + cst_Called_from = "Called from", + cst_inlined = " (inlined)", + _h_ = + [0, + [2, + 0, + [12, + 32, + [2, + 0, + [11, + ' in file "', + [2, + 0, + [12, + 34, + [2, + 0, + [11, ", line ", [4, 0, 0, 0, [11, cst_characters, partial]]]]]]]]]], + '%s %s in file "%s"%s, line %d, characters %d-%d'], + _i_ = [0, [2, 0, [11, " unknown location", 0]], "%s unknown location"], + _g_ = + [0, + [11, cst_Uncaught_exception, [2, 0, [12, 10, 0]]], + cst_Uncaught_exception_s], + _f_ = + [0, + [11, cst_Uncaught_exception, [2, 0, [12, 10, 0]]], + cst_Uncaught_exception_s], + cst_Out_of_memory = "Out of memory", + cst_Stack_overflow = "Stack overflow", + cst_Pattern_matching_failed = "Pattern matching failed", + cst_Assertion_failed = "Assertion failed", + cst_Undefined_recursive_module = "Undefined recursive module", + _d_ = [0, [12, 40, [2, 0, [2, 0, [12, 41, 0]]]], "(%s%s)"], + _e_ = [0, [12, 40, [2, 0, [12, 41, 0]]], "(%s)"], + _b_ = [0, [4, 0, 0, 0, 0], "%d"], + _a_ = [0, [3, 0, 0], "%S"], + _m_ = + [0, + cst$4, + "(Cannot print locations:\n bytecode executable program file not found)", + "(Cannot print locations:\n bytecode executable program file appears to be corrupt)", + "(Cannot print locations:\n bytecode executable program file has wrong magic number)", + "(Cannot print locations:\n bytecode executable program file cannot be opened;\n -- too many open files. Try running with OCAMLRUNPARAM=b=2)"]; + 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 + _al_ = Stdlib_Obj[15]; + if( /*<>*/ caml_obj_tag(f) === _al_) + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Printf[4], _a_, f); + /*<>*/ /*<>*/ var + _am_ = Stdlib_Obj[16]; + return /*<>*/ caml_obj_tag(f) === _am_ + ? /*<>*/ caml_call1(Stdlib[35], f) + : cst; + /*<>*/ } + function other_fields(x, i){ + /*<>*/ if(x.length - 1 <= i) + /*<>*/ return cst$0; + /*<>*/ var + /*<>*/ _aj_ = other_fields(x, i + 1 | 0), + /*<>*/ _ak_ = field(x, i); + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Printf[4], _c_, _ak_, _aj_); + /*<>*/ } + function use_printers(x){ + /*<>*/ var + param = /*<>*/ caml_call1(Stdlib_Atomic[2], printers); + /*<>*/ for(;;){ + if(! param) /*<>*/ return 0; + var tl = param[2], hd = param[1]; + a: + { + /*<>*/ try{ + /*<>*/ /*<>*/ var + val = /*<>*/ caml_call1(hd, x); + } + catch(_ai_){break a;} + if(val){var s = val[1]; /*<>*/ return [0, s];} + } + var param = tl; + } + /*<>*/ } + function string_of_extension_constructo(t){ + /*<>*/ if + (0 === /*<>*/ caml_obj_tag(t)){ + /*<>*/ var + /*<>*/ constructor = t[1][1], + match = t.length - 1; + if(2 < match >>> 0) + /*<>*/ var + /*<>*/ _ae_ = other_fields(t, 2), + /*<>*/ _af_ = field(t, 1), + _ah_ = + /*<>*/ caml_call3 + (Stdlib_Printf[4], _d_, _af_, _ae_); + else + switch(match){ + case 0: + var _ah_ = cst$1; break; + case 1: + var _ah_ = cst$2; break; + default: + /*<>*/ var + /*<>*/ _ag_ = field(t, 1), + _ah_ = + /*<>*/ caml_call2(Stdlib_Printf[4], _e_, _ag_); + } + var match$0 = [0, constructor, [0, _ah_]]; + } + else + var match$0 = [0, t[1], 0]; + var fields_opt = match$0[2], constructor$0 = match$0[1]; + /*<>*/ if(! fields_opt) + /*<>*/ return constructor$0; + var f = fields_opt[1]; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], constructor$0, f); + /*<>*/ } + function to_string_default(x){ + /*<>*/ if(x === Stdlib[9]) + /*<>*/ return cst_Out_of_memory; + if(x === Stdlib[10]) /*<>*/ 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, + file, + line, + char$0, + char$0 + 5 | 0, + cst_Pattern_matching_failed); + } + if(x[1] === Stdlib[5]){ + var + match$0 = x[2], + char$1 = match$0[3], + line$0 = match$0[2], + file$0 = match$0[1]; + /*<>*/ return /*<>*/ caml_call6 + (Stdlib_Printf[4], + locfmt, + file$0, + line$0, + char$1, + char$1 + 6 | 0, + cst_Assertion_failed); + } + if(x[1] !== Stdlib[15]) + /*<>*/ return string_of_extension_constructo(x); + var + match$1 = x[2], + char$2 = match$1[3], + line$1 = match$1[2], + file$1 = match$1[1]; + /*<>*/ return /*<>*/ caml_call6 + (Stdlib_Printf[4], + locfmt, + file$1, + line$1, + char$2, + char$2 + 6 | 0, + cst_Undefined_recursive_module); + /*<>*/ } + function to_string(e){ + /*<>*/ /*<>*/ var + match = use_printers(e); + if(! match) /*<>*/ return to_string_default(e); + var s = match[1]; + /*<>*/ return s; + /*<>*/ } + function print(fct, arg){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _ad_ = /*<>*/ caml_call1(fct, arg); + /*<>*/ return _ad_; + } + catch(x$0){ + /*<>*/ var + x = caml_wrap_exception(x$0), + /*<>*/ _ac_ = to_string(x); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Printf[3], _f_, _ac_); + /*<>*/ /*<>*/ caml_call1 + (Stdlib[63], Stdlib[40]); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (x, 0); + } + /*<>*/ } + function catch$0(fct, arg){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _ab_ = /*<>*/ caml_call1(fct, arg); + /*<>*/ return _ab_; + } + catch(x$0){ + var x = caml_wrap_exception(x$0); + /*<>*/ /*<>*/ caml_call1 + (Stdlib[63], Stdlib[39]); + /*<>*/ /*<>*/ var + _aa_ = to_string(x); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Printf[3], _g_, _aa_); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[99], 2); + } + /*<>*/ } + function raw_backtrace_entries(bt){ + /*<>*/ return bt; + /*<>*/ } + function convert_raw_backtrace(bt){ + /*<>*/ return [0, + /*<>*/ runtime.caml_convert_raw_backtrace(bt)]; + /*<>*/ } + function format_backtrace_slot(pos, slot){ + function info(is_raise){ + /*<>*/ return is_raise + ? 0 === pos ? cst_Raised_at : cst_Re_raised_at + : 0 === pos ? cst_Raised_by_primitive_operat : cst_Called_from; + /*<>*/ } + /*<>*/ if(0 === slot[0]){ + /*<>*/ var + _U_ = slot[5], + _V_ = slot[4], + _W_ = slot[3], + _X_ = slot[6] ? cst_inlined : cst$3, + _Y_ = slot[2], + _Z_ = slot[7], + /*<>*/ ___ = info(slot[1]); + /*<>*/ return [0, + /*<>*/ caml_call8 + (Stdlib_Printf[4], _h_, ___, _Z_, _Y_, _X_, _W_, _V_, _U_)]; + } + if(slot[1]) /*<>*/ return 0; + /*<>*/ /*<>*/ var _$_ = info(0); + /*<>*/ return [0, + /*<>*/ caml_call2(Stdlib_Printf[4], _i_, _$_)]; + /*<>*/ } + function print_raw_backtrace(outchan, raw_backtrace){ + /*<>*/ /*<>*/ var + backtrace = convert_raw_backtrace(raw_backtrace); + if(! backtrace) + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Printf[1], outchan, _k_); + var a = backtrace[1], _S_ = a.length - 1 - 1 | 0, _R_ = 0; + if(_S_ >= 0){ + var i = _R_; + for(;;){ + /*<>*/ /*<>*/ var + match = format_backtrace_slot(i, caml_check_bound(a, i)[1 + i]); + if(match){ + var str = match[1]; + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Printf[1], outchan, _j_, str); + } + /*<>*/ /*<>*/ var + _T_ = i + 1 | 0; + if(_S_ === i) break; + var i = _T_; + } + } + return 0; + /*<>*/ } + function print_backtrace(outchan){ + /*<>*/ return print_raw_backtrace + (outchan, + /*<>*/ caml_get_exception_raw_backtra(0)); + /*<>*/ } + function raw_backtrace_to_string(raw_backtrace){ + /*<>*/ /*<>*/ var + backtrace = convert_raw_backtrace(raw_backtrace); + if(! backtrace) + /*<>*/ return cst_Program_not_linked_with_g_; + /*<>*/ var + a = backtrace[1], + /*<>*/ b = + /*<>*/ caml_call1(Stdlib_Buffer[1], 1024), + _P_ = a.length - 1 - 1 | 0, + /*<>*/ _O_ = 0; + if(_P_ >= 0){ + var i = _O_; + for(;;){ + /*<>*/ /*<>*/ var + match = format_backtrace_slot(i, caml_check_bound(a, i)[1 + i]); + if(match){ + var str = match[1]; + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Printf[5], b, _l_, str); + } + /*<>*/ /*<>*/ var + _Q_ = i + 1 | 0; + if(_P_ === i) break; + var i = _Q_; + } + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Buffer[2], b); + /*<>*/ } + function backtrace_slot_is_raise(param){ + /*<>*/ return 0 === param[0] ? param[1] : param[1]; + /*<>*/ } + function backtrace_slot_is_inline(param){ + /*<>*/ return 0 === param[0] ? param[6] : 0; + /*<>*/ } + function backtrace_slot_location(param){ + /*<>*/ return 0 === param[0] + ? [0, [0, param[2], param[3], param[4], param[5]]] + : 0; + /*<>*/ } + function backtrace_slot_defname(param){ + /*<>*/ if + (0 === param[0] && runtime.caml_string_notequal(param[7], cst$4)) + /*<>*/ return [0, param[7]]; + /*<>*/ return 0; + /*<>*/ } + function backtrace_slots(raw_backtrace){ + /*<>*/ /*<>*/ var + match = convert_raw_backtrace(raw_backtrace); + if(! match) /*<>*/ return 0; + var backtrace = match[1], i$1 = backtrace.length - 1 - 1 | 0, i = i$1; + /*<>*/ for(;;){ + if(-1 === i) + var _N_ = 0; + else{ + var _M_ = 0 === caml_check_bound(backtrace, i)[1 + i][0] ? 1 : 0; + /*<>*/ if(! _M_){ + var i$0 = i - 1 | 0, i = i$0; + continue; + } + var _N_ = _M_; + } + /*<>*/ return _N_ ? [0, backtrace] : 0; + } + /*<>*/ } + function backtrace_slots_of_raw_entry(entry){ + /*<>*/ return backtrace_slots([0, entry]); + /*<>*/ } + function raw_backtrace_length(bt){ + /*<>*/ return bt.length - 1; + /*<>*/ } + function get_backtrace(param){ + /*<>*/ return raw_backtrace_to_string + ( /*<>*/ caml_get_exception_raw_backtra(0)); + /*<>*/ } + function register_printer(fn){ + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ old_printers = + /*<>*/ caml_call1(Stdlib_Atomic[2], printers), + /*<>*/ new_printers = [0, fn, old_printers], + /*<>*/ success = + /*<>*/ caml_call3 + (Stdlib_Atomic[5], printers, old_printers, new_printers), + /*<>*/ _L_ = 1 - success; + if(! _L_) /*<>*/ return _L_; + } + /*<>*/ } + function exn_slot(x){ + /*<>*/ return 0 + === /*<>*/ caml_obj_tag(x) + ? x[1] + : x; + /*<>*/ } + function exn_slot_id(x){ + /*<>*/ /*<>*/ var + slot = exn_slot(x); + /*<>*/ return slot[2]; + /*<>*/ } + function exn_slot_name(x){ + /*<>*/ /*<>*/ var + slot = exn_slot(x); + /*<>*/ return slot[1]; + /*<>*/ } + var errors = _m_.slice(); + function default_uncaught_exception_han(exn, raw_backtrace){ + /*<>*/ /*<>*/ var + _I_ = to_string(exn); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Printf[3], _n_, _I_); + /*<>*/ print_raw_backtrace(Stdlib[40], raw_backtrace); + /*<>*/ /*<>*/ var + status = /*<>*/ runtime.caml_ml_debug_info_status(0); + if(status < 0){ + /*<>*/ var + /*<>*/ _J_ = + /*<>*/ caml_call1(Stdlib[18], status), + /*<>*/ _K_ = caml_check_bound(errors, _J_)[1 + _J_]; + /*<>*/ /*<>*/ caml_call1 + (Stdlib[53], _K_); + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[63], Stdlib[40]); + /*<>*/ } + /*<>*/ /*<>*/ var + uncaught_exception_handler = [0, default_uncaught_exception_han]; + function set_uncaught_exception_handler(fn){ + /*<>*/ uncaught_exception_handler[1] = fn; + return 0; + /*<>*/ } + var empty_backtrace = [0]; + function handle_uncaught_exception(exn$0, debugger_in_use){ + /*<>*/ try{ + /*<>*/ try{ + var + raw_backtrace = + debugger_in_use + ? empty_backtrace + : /*<>*/ caml_get_exception_raw_backtra(0); + /*<>*/ try{ + /*<>*/ /*<>*/ caml_call1 + (Stdlib[103], 0); + } + catch(_H_){} + /*<>*/ try{ + /*<>*/ var + /*<>*/ _D_ = + /*<>*/ caml_call2 + (uncaught_exception_handler[1], exn$0, raw_backtrace), + _C_ = _D_; + } + catch(exn$1){ + /*<>*/ var + exn = caml_wrap_exception(exn$1), + /*<>*/ raw_backtrace$0 = + /*<>*/ caml_get_exception_raw_backtra(0), + /*<>*/ _A_ = to_string(exn$0); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Printf[3], _o_, _A_); + /*<>*/ print_raw_backtrace + (Stdlib[40], raw_backtrace); + /*<>*/ /*<>*/ var + _B_ = to_string(exn); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Printf[3], _p_, _B_); + /*<>*/ print_raw_backtrace + (Stdlib[40], raw_backtrace$0); + var + _C_ = /*<>*/ caml_call1(Stdlib[63], Stdlib[40]); + } + var _E_ = _C_; + } + catch(_G_){ + var _z_ = caml_wrap_exception(_G_); + if(_z_ !== Stdlib[9]) throw caml_maybe_attach_backtrace(_z_, 0); + var + _E_ = + /*<>*/ caml_call1 + (Stdlib[53], cst_Fatal_error_out_of_memory_); + } + /*<>*/ return _E_; + } + catch(_F_){ /*<>*/ return 0;} + /*<>*/ } + /*<>*/ /*<>*/ runtime.caml_register_named_value + ("Printexc.handle_uncaught_exception", handle_uncaught_exception); + function _q_(_y_){ + /*<>*/ return runtime.caml_raw_backtrace_next_slot(_y_); + } + function _r_(_x_){ + /*<>*/ return runtime.caml_convert_raw_backtrace_slot(_x_); + } + function _s_(_w_, _v_){ + /*<>*/ return runtime.caml_raw_backtrace_slot(_w_, _v_); + } + var + _t_ = + [0, + backtrace_slot_is_raise, + backtrace_slot_is_inline, + backtrace_slot_location, + backtrace_slot_defname, + format_backtrace_slot], + Stdlib_Printexc = + [0, + to_string, + to_string_default, + print, + catch$0, + print_backtrace, + get_backtrace, + runtime.caml_record_backtrace, + runtime.caml_backtrace_status, + register_printer, + use_printers, + raw_backtrace_entries, + function(_u_){ /*<>*/ return caml_get_exception_raw_backtra(_u_);}, + print_raw_backtrace, + raw_backtrace_to_string, + default_uncaught_exception_han, + set_uncaught_exception_handler, + backtrace_slots, + backtrace_slots_of_raw_entry, + _t_, + raw_backtrace_length, + _s_, + _r_, + _q_, + exn_slot_id, + exn_slot_name, + string_of_extension_constructo]; + runtime.caml_register_global(42, Stdlib_Printexc, "Stdlib__Printexc"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Fun +//# unitInfo: Requires: Stdlib, Stdlib__Printexc +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_restore_raw_backtrace = runtime.caml_restore_raw_backtrace, + 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) + : runtime.caml_call_gen(f, [a0, a1]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib_Printexc = global_data.Stdlib__Printexc, + Stdlib = global_data.Stdlib, + cst_Fun_Finally_raised = "Fun.Finally_raised: ", + cst_Stdlib_Fun_Finally_raised = "Stdlib.Fun.Finally_raised"; + function const$0(c, param){ + /*<>*/ return c; + /*<>*/ } + function flip(f, x, y){ + /*<>*/ return /*<>*/ caml_call2(f, y, x); + /*<>*/ } + function negate(p, v){ + /*<>*/ return 1 - /*<>*/ caml_call1(p, v); + /*<>*/ } + /*<>*/ /*<>*/ var + Finally_raised = + [248, cst_Stdlib_Fun_Finally_raised, runtime.caml_fresh_oo_id(0)]; + function _a_(param){ + /*<>*/ if(param[1] !== Finally_raised) + /*<>*/ return 0; + /*<>*/ var + exn = param[2], + /*<>*/ _c_ = + /*<>*/ caml_call1(Stdlib_Printexc[1], exn); + /*<>*/ return [0, + /*<>*/ caml_call2 + (Stdlib[28], cst_Fun_Finally_raised, _c_)]; + /*<>*/ } + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Printexc[9], _a_); + function protect(finally$0, work){ + function finally_no_exn(param){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _b_ = /*<>*/ caml_call1(finally$0, 0); + /*<>*/ return _b_; + } + catch(e$0){ + /*<>*/ var + e = caml_wrap_exception(e$0), + /*<>*/ bt = + /*<>*/ caml_call1(Stdlib_Printexc[12], 0), + /*<>*/ exn = [0, Finally_raised, e]; + caml_restore_raw_backtrace(exn, bt); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (exn, 0); + } + /*<>*/ } + /*<>*/ try{ + /*<>*/ /*<>*/ var + result = /*<>*/ caml_call1(work, 0); + } + catch(work_exn$0){ + /*<>*/ var + work_exn = caml_wrap_exception(work_exn$0), + /*<>*/ work_bt = + /*<>*/ caml_call1(Stdlib_Printexc[12], 0); + /*<>*/ finally_no_exn(0); + caml_restore_raw_backtrace(work_exn, work_bt); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (work_exn, 0); + } + /*<>*/ finally_no_exn(0); + /*<>*/ return result; + /*<>*/ } + var Stdlib_Fun = [0, const$0, flip, negate, protect, Finally_raised]; + runtime.caml_register_global(4, Stdlib_Fun, "Stdlib__Fun"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Gc +//# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Printf, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst = "\n", + caml_ml_string_length = runtime.caml_ml_string_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]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib_Atomic = global_data.Stdlib__Atomic, + Stdlib = global_data.Stdlib, + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib_Printf = global_data.Stdlib__Printf, + _a_ = + [0, + [11, "minor_collections: ", [4, 0, 0, 0, [12, 10, 0]]], + "minor_collections: %d\n"], + _b_ = + [0, + [11, "major_collections: ", [4, 0, 0, 0, [12, 10, 0]]], + "major_collections: %d\n"], + _c_ = + [0, + [11, "compactions: ", [4, 0, 0, 0, [12, 10, 0]]], + "compactions: %d\n"], + _d_ = + [0, + [11, "forced_major_collections: ", [4, 0, 0, 0, [12, 10, 0]]], + "forced_major_collections: %d\n"], + _e_ = [0, [12, 10, 0], cst], + _f_ = [0, [8, [0, 0, 0], 0, [0, 0], 0], "%.0f"], + _g_ = + [0, + [11, "minor_words: ", [8, [0, 0, 0], [1, 1], [0, 0], [12, 10, 0]]], + "minor_words: %*.0f\n"], + _h_ = + [0, + [11, "promoted_words: ", [8, [0, 0, 0], [1, 1], [0, 0], [12, 10, 0]]], + "promoted_words: %*.0f\n"], + _i_ = + [0, + [11, "major_words: ", [8, [0, 0, 0], [1, 1], [0, 0], [12, 10, 0]]], + "major_words: %*.0f\n"], + _j_ = [0, [12, 10, 0], cst], + _k_ = [0, [4, 0, 0, 0, 0], "%d"], + _l_ = + [0, + [11, "top_heap_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], + "top_heap_words: %*d\n"], + _m_ = + [0, + [11, "heap_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], + "heap_words: %*d\n"], + _n_ = + [0, + [11, "live_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], + "live_words: %*d\n"], + _o_ = + [0, + [11, "free_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], + "free_words: %*d\n"], + _p_ = + [0, + [11, "largest_free: ", [4, 0, [1, 1], 0, [12, 10, 0]]], + "largest_free: %*d\n"], + _q_ = + [0, + [11, "fragments: ", [4, 0, [1, 1], 0, [12, 10, 0]]], + "fragments: %*d\n"], + _r_ = [0, [12, 10, 0], cst], + _s_ = + [0, + [11, "live_blocks: ", [4, 0, 0, 0, [12, 10, 0]]], + "live_blocks: %d\n"], + _t_ = + [0, + [11, "free_blocks: ", [4, 0, 0, 0, [12, 10, 0]]], + "free_blocks: %d\n"], + _u_ = + [0, + [11, "heap_chunks: ", [4, 0, 0, 0, [12, 10, 0]]], + "heap_chunks: %d\n"]; + function eventlog_pause(param){ + /*<>*/ return 0; + /*<>*/ } + 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 + 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 + 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]); + /*<>*/ } + function allocated_bytes(param){ + /*<>*/ var + /*<>*/ match = + /*<>*/ runtime.caml_gc_counters(0), + ma = match[3], + pro = match[2], + mi = match[1]; + /*<>*/ return (mi + ma - pro) * (Stdlib_Sys[9] / 8 | 0); + /*<>*/ } + function create_alarm(f){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Atomic[1], 1); + /*<>*/ } + function delete_alarm(a){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Atomic[3], a, 0); + /*<>*/ } + function _v_(param){ /*<>*/ return 0; /*<>*/ } + function _w_(param){ /*<>*/ return 0; /*<>*/ } + function _x_(param){ /*<>*/ return 0; /*<>*/ } + function _y_(param){ /*<>*/ return 0; /*<>*/ } + /*<>*/ /*<>*/ var + null_tracker = + [0, + function(param){ /*<>*/ return 0; /*<>*/ }, + _y_, + _x_, + _w_, + _v_]; + function start(sampling_rate, opt, tracker){ + /*<>*/ if(opt) + var sth = opt[1], callstack_size = sth; + else + var callstack_size = Stdlib[19]; + /*<>*/ return /*<>*/ runtime.caml_memprof_start + (sampling_rate, callstack_size, tracker); + /*<>*/ } + var _z_ = [0, null_tracker, start, runtime.caml_memprof_stop]; + function _A_(_E_){ /*<>*/ return runtime.caml_final_release(_E_);} + var + _B_ = runtime.caml_final_register_called_without_value, + Stdlib_Gc = + [0, + print_stat, + allocated_bytes, + function(_D_, _C_){ + /*<>*/ return runtime.caml_final_register(_D_, _C_); + }, + _B_, + _A_, + create_alarm, + delete_alarm, + eventlog_pause, + eventlog_resume, + _z_]; + runtime.caml_register_global(25, Stdlib_Gc, "Stdlib__Gc"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Digest +//# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Char, Stdlib__String +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_Digest_from_hex$1 = "Digest.from_hex", + caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, + caml_create_bytes = runtime.caml_create_bytes, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_md5_string = runtime.caml_md5_string, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_get = runtime.caml_string_get, + 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) + : runtime.caml_call_gen(f, [a0, a1]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Stdlib_Char = global_data.Stdlib__Char, + Stdlib_Bytes = global_data.Stdlib__Bytes, + Stdlib_String = global_data.Stdlib__String, + compare = Stdlib_String[9], + equal = Stdlib_String[8], + cst_Digest_from_hex$0 = cst_Digest_from_hex$1, + cst_Digest_from_hex = cst_Digest_from_hex$1, + cst_Digest_to_hex = "Digest.to_hex", + cst_Digest_substring = "Digest.substring"; + function string(str){ + /*<>*/ return /*<>*/ caml_md5_string + (str, 0, caml_ml_string_length(str)); + /*<>*/ } + function bytes(b){ + /*<>*/ return string + ( /*<>*/ caml_call1(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); + /*<>*/ } + function subbytes(b, ofs, len){ + /*<>*/ return substring + ( /*<>*/ caml_call1(Stdlib_Bytes[44], b), + ofs, + len); + /*<>*/ } + function file(filename){ + /*<>*/ /*<>*/ var + ic = /*<>*/ caml_call1(Stdlib[80], filename); + /*<>*/ try{ + /*<>*/ /*<>*/ var + d = /*<>*/ runtime.caml_md5_chan(ic, -1); + } + catch(e$0){ + var e = caml_wrap_exception(e$0); + /*<>*/ /*<>*/ caml_call1 + (Stdlib[93], ic); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 0); + } + /*<>*/ /*<>*/ caml_call1 + (Stdlib[93], ic); + /*<>*/ return d; + /*<>*/ } + function output(chan, digest){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[66], chan, digest); + /*<>*/ } + function input(chan){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[86], chan, 16); + /*<>*/ } + function char_hex(n){ + /*<>*/ var _e_ = 10 <= n ? 87 : 48; + return n + _e_ | 0; + /*<>*/ } + function to_hex(d){ + /*<>*/ if(16 !== caml_ml_string_length(d)) + /*<>*/ /*<>*/ caml_call1 + (Stdlib[1], cst_Digest_to_hex); + /*<>*/ var + /*<>*/ result = + /*<>*/ caml_create_bytes(32), + i = 0; + for(;;){ + /*<>*/ /*<>*/ var + x = /*<>*/ caml_string_get(d, i); + caml_bytes_unsafe_set(result, i * 2 | 0, char_hex(x >>> 4 | 0)); + caml_bytes_unsafe_set(result, (i * 2 | 0) + 1 | 0, char_hex(x & 15)); + /*<>*/ /*<>*/ var _d_ = i + 1 | 0; + if(15 === i) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], result); + var i = _d_; + } + /*<>*/ } + function from_hex(s){ + /*<>*/ if(32 !== caml_ml_string_length(s)) + /*<>*/ /*<>*/ caml_call1 + (Stdlib[1], cst_Digest_from_hex); + /*<>*/ function digit(c){ + /*<>*/ if(65 <= c){ + if(97 <= c){ + if(103 > c) return (c - 97 | 0) + 10 | 0; + } + else if(71 > c) return (c - 65 | 0) + 10 | 0; + } + else if(9 >= c - 48 >>> 0) return c - 48 | 0; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stdlib[6], cst_Digest_from_hex$0], 1); + /*<>*/ } + /*<>*/ var + /*<>*/ result = + /*<>*/ caml_create_bytes(16), + i = 0; + for(;;){ + /*<>*/ var + i$0 = 2 * i | 0, + /*<>*/ _a_ = + digit( /*<>*/ caml_string_get(s, i$0 + 1 | 0)), + _b_ = + (digit( /*<>*/ caml_string_get(s, i$0)) << 4) + _a_ + | 0; + /*<>*/ /*<>*/ runtime.caml_bytes_set + (result, i, /*<>*/ caml_call1(Stdlib_Char[1], _b_)); + /*<>*/ /*<>*/ var _c_ = i + 1 | 0; + if(15 === i) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], result); + var i = _c_; + } + /*<>*/ } + var + Stdlib_Digest = + [0, + compare, + equal, + string, + bytes, + substring, + subbytes, + file, + output, + input, + to_hex, + from_hex]; + runtime.caml_register_global(8, Stdlib_Digest, "Stdlib__Digest"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Bigarray +//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_Bigarray_Array3_of_array_n$1 = + "Bigarray.Array3.of_array: non-cubic data", + caml_ba_change_layout = runtime.caml_ba_change_layout, + caml_ba_create = runtime.caml_ba_create, + caml_ba_dim_1 = runtime.caml_ba_dim_1, + caml_ba_dim_2 = runtime.caml_ba_dim_2, + caml_ba_kind = runtime.caml_ba_kind, + caml_ba_num_dims = runtime.caml_ba_num_dims, + caml_ba_reshape = runtime.caml_ba_reshape, + caml_ba_set_1 = runtime.caml_ba_set_1, + caml_ba_set_2 = runtime.caml_ba_set_2, + caml_ba_set_3 = runtime.caml_ba_set_3, + caml_ba_set_generic = runtime.caml_ba_set_generic, + caml_ba_slice = runtime.caml_ba_slice, + caml_check_bound = runtime.caml_check_bound, + caml_make_vect = runtime.caml_make_vect, + caml_mul = runtime.caml_mul; + /*<>*/ 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 + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Stdlib_Array = global_data.Stdlib__Array, + Stdlib_Sys = global_data.Stdlib__Sys, + cst_Bigarray_array3_of_genarra = "Bigarray.array3_of_genarray", + cst_Bigarray_array2_of_genarra = "Bigarray.array2_of_genarray", + cst_Bigarray_array1_of_genarra = "Bigarray.array1_of_genarray", + cst_Bigarray_array0_of_genarra = "Bigarray.array0_of_genarray", + cst_Bigarray_Array3_of_array_n = cst_Bigarray_Array3_of_array_n$1, + cst_Bigarray_Array3_of_array_n$0 = cst_Bigarray_Array3_of_array_n$1, + cst_Bigarray_Array2_of_array_n = + "Bigarray.Array2.of_array: non-rectangular data", + float32 = 0, + float64 = 1, + int8_signed = 2, + int8_unsigned = 3, + int16_signed = 4, + int16_unsigned = 5, + int32 = 6, + int64 = 7, + int$0 = 8, + nativeint = 9, + complex32 = 10, + complex64 = 11, + char$0 = 12; + function kind_size_in_bytes(param){ + /*<>*/ switch(param){ + case 0: + /*<>*/ return 4; + case 1: + /*<>*/ return 8; + case 2: + /*<>*/ return 1; + case 3: + /*<>*/ return 1; + case 4: + /*<>*/ return 2; + case 5: + /*<>*/ return 2; + case 6: + /*<>*/ return 4; + case 7: + /*<>*/ return 8; + case 8: + return Stdlib_Sys[9] / 8 | 0; + case 9: + return Stdlib_Sys[9] / 8 | 0; + case 10: + /*<>*/ return 8; + case 11: + /*<>*/ return 16; + default: /*<>*/ return 1; + } + /*<>*/ } + /*<>*/ var + /*<>*/ c_layout = 0, + fortran_layout = 1; + function cloop(arr, idx, f, col, max){ + /*<>*/ if(col === idx.length - 1) + /*<>*/ return /*<>*/ caml_ba_set_generic + (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ var + /*<>*/ _am_ = + caml_check_bound(max, col)[1 + col] - 1 | 0, + /*<>*/ _al_ = 0; + if(_am_ >= 0){ + var j = _al_; + for(;;){ + /*<>*/ caml_check_bound(idx, col)[1 + col] = j; + /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); + /*<>*/ /*<>*/ var + _an_ = j + 1 | 0; + if(_am_ === j) break; + var j = _an_; + } + } + return 0; + /*<>*/ } + function floop(arr, idx, f, col, max){ + /*<>*/ if(0 > col) + /*<>*/ return /*<>*/ caml_ba_set_generic + (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ var + /*<>*/ _aj_ = caml_check_bound(max, col)[1 + col], + /*<>*/ _ai_ = 1; + if(_aj_ >= 1){ + var j = _ai_; + for(;;){ + /*<>*/ caml_check_bound(idx, col)[1 + col] = j; + /*<>*/ floop(arr, idx, f, col - 1 | 0, max); + /*<>*/ /*<>*/ var + _ak_ = j + 1 | 0; + if(_aj_ === j) break; + var j = _ak_; + } + } + return 0; + /*<>*/ } + function init(kind, layout, dims, f){ + /*<>*/ var + /*<>*/ arr = + /*<>*/ caml_ba_create(kind, layout, dims), + /*<>*/ dlen = dims.length - 1; + /*<>*/ return layout + ? (floop + (arr, + /*<>*/ caml_make_vect(dlen, 1), + f, + dlen - 1 | 0, + dims), + arr) + : (cloop + (arr, + /*<>*/ caml_make_vect(dlen, 0), + f, + 0, + dims), + arr); + /*<>*/ } + function dims(a){ + /*<>*/ var + /*<>*/ n = + /*<>*/ caml_ba_num_dims(a), + /*<>*/ d = + /*<>*/ caml_make_vect(n, 0), + /*<>*/ _af_ = n - 1 | 0, + /*<>*/ _ae_ = 0; + if(_af_ >= 0){ + var i = _ae_; + for(;;){ + /*<>*/ /*<>*/ var + _ag_ = /*<>*/ runtime.caml_ba_dim(a, i); + /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; + /*<>*/ /*<>*/ var + _ah_ = i + 1 | 0; + if(_af_ === i) break; + var i = _ah_; + } + } + /*<>*/ return d; + /*<>*/ } + function size_in_bytes(arr){ + /*<>*/ var + /*<>*/ _ac_ = dims(arr), + /*<>*/ _ad_ = + /*<>*/ caml_call3 + (Stdlib_Array[15], caml_mul, 1, _ac_); + /*<>*/ return /*<>*/ caml_mul + (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), + _ad_); + /*<>*/ } + function create(kind, layout){ + /*<>*/ return /*<>*/ caml_ba_create + (kind, layout, [0]); + /*<>*/ } + function get(arr){ + /*<>*/ return /*<>*/ runtime.caml_ba_get_generic + (arr, [0]); + /*<>*/ } + function set(arr){ + /*<>*/ /*<>*/ var _aa_ = [0]; + /*<>*/ return function(_ab_){ + /*<>*/ return caml_ba_set_generic(arr, _aa_, _ab_);}; + /*<>*/ } + function size_in_bytes$0(arr){ + /*<>*/ return kind_size_in_bytes + ( /*<>*/ caml_ba_kind(arr)); + /*<>*/ } + function of_value(kind, layout, v){ + /*<>*/ /*<>*/ var + a = create(kind, layout); + /*<>*/ set(a)(v); + /*<>*/ return a; + /*<>*/ } + function create$0(kind, layout, dim){ + /*<>*/ return /*<>*/ caml_ba_create + (kind, layout, [0, dim]); + /*<>*/ } + function size_in_bytes$1(arr){ + /*<>*/ /*<>*/ var + _$_ = /*<>*/ caml_ba_dim_1(arr); + /*<>*/ return /*<>*/ caml_mul + (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), + _$_); + /*<>*/ } + function slice(a, n){ + /*<>*/ return /*<>*/ runtime.caml_ba_layout + (a) + ? /*<>*/ caml_ba_slice(a, [0, n]) + : /*<>*/ caml_ba_slice(a, [0, n]); + /*<>*/ } + function init$0(kind, layout, dim, f){ + /*<>*/ /*<>*/ var + arr = create$0(kind, layout, dim); + /*<>*/ if(layout){ + /*<>*/ /*<>*/ var _Z_ = 1; + if(dim >= 1){ + var i$0 = _Z_; + for(;;){ + /*<>*/ /*<>*/ caml_ba_set_1 + (arr, i$0, /*<>*/ caml_call1(f, i$0)); + /*<>*/ /*<>*/ var + ___ = i$0 + 1 | 0; + if(dim === i$0) break; + var i$0 = ___; + } + } + /*<>*/ return arr; + } + /*<>*/ var + _X_ = dim - 1 | 0, + /*<>*/ _W_ = 0; + if(_X_ >= 0){ + var i = _W_; + for(;;){ + /*<>*/ /*<>*/ caml_ba_set_1 + (arr, i, /*<>*/ caml_call1(f, i)); + /*<>*/ /*<>*/ var + _Y_ = i + 1 | 0; + if(_X_ === i) break; + var i = _Y_; + } + } + /*<>*/ return arr; + /*<>*/ } + function of_array(kind, layout, data){ + /*<>*/ var + /*<>*/ ba = create$0(kind, layout, data.length - 1), + /*<>*/ ofs = layout ? 1 : 0, + _U_ = data.length - 1 - 1 | 0, + _T_ = 0; + if(_U_ >= 0){ + var i = _T_; + for(;;){ + /*<>*/ /*<>*/ caml_ba_set_1 + (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); + /*<>*/ /*<>*/ var + _V_ = i + 1 | 0; + if(_U_ === i) break; + var i = _V_; + } + } + /*<>*/ return ba; + /*<>*/ } + function create$1(kind, layout, dim1, dim2){ + /*<>*/ return /*<>*/ caml_ba_create + (kind, layout, [0, dim1, dim2]); + /*<>*/ } + function size_in_bytes$2(arr){ + /*<>*/ var + /*<>*/ _R_ = + /*<>*/ caml_ba_dim_2(arr), + /*<>*/ _S_ = + /*<>*/ caml_ba_dim_1(arr); + return caml_mul + ( /*<>*/ caml_mul + (kind_size_in_bytes + ( /*<>*/ caml_ba_kind(arr)), + _S_), + _R_); + /*<>*/ } + function slice_left(a, n){ + /*<>*/ return /*<>*/ caml_ba_slice + (a, [0, n]); + /*<>*/ } + function slice_right(a, n){ + /*<>*/ return /*<>*/ caml_ba_slice + (a, [0, n]); + /*<>*/ } + function init$1(kind, layout, dim1, dim2, f){ + /*<>*/ /*<>*/ var + arr = create$1(kind, layout, dim1, dim2); + /*<>*/ if(layout){ + /*<>*/ /*<>*/ var _N_ = 1; + if(dim2 >= 1){ + var j$0 = _N_; + for(;;){ + /*<>*/ /*<>*/ var _O_ = 1; + if(dim1 >= 1){ + var i$0 = _O_; + for(;;){ + /*<>*/ /*<>*/ caml_ba_set_2 + (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); + /*<>*/ /*<>*/ var + _Q_ = i$0 + 1 | 0; + if(dim1 === i$0) break; + var i$0 = _Q_; + } + } + /*<>*/ /*<>*/ var + _P_ = j$0 + 1 | 0; + if(dim2 === j$0) break; + var j$0 = _P_; + } + } + /*<>*/ return arr; + } + /*<>*/ var + _I_ = dim1 - 1 | 0, + /*<>*/ _H_ = 0; + if(_I_ >= 0){ + var i = _H_; + for(;;){ + /*<>*/ var + _K_ = dim2 - 1 | 0, + /*<>*/ _J_ = 0; + if(_K_ >= 0){ + var j = _J_; + for(;;){ + /*<>*/ /*<>*/ caml_ba_set_2 + (arr, i, j, /*<>*/ caml_call2(f, i, j)); + /*<>*/ /*<>*/ var + _M_ = j + 1 | 0; + if(_K_ === j) break; + var j = _M_; + } + } + /*<>*/ /*<>*/ var + _L_ = i + 1 | 0; + if(_I_ === i) break; + var i = _L_; + } + } + /*<>*/ return arr; + /*<>*/ } + function of_array$0(kind, layout, data){ + /*<>*/ var + dim1 = data.length - 1, + /*<>*/ dim2 = + 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, + /*<>*/ ba = create$1(kind, layout, dim1, dim2), + /*<>*/ ofs = layout ? 1 : 0, + /*<>*/ _C_ = dim1 - 1 | 0, + _B_ = 0; + if(_C_ >= 0){ + var i = _B_; + 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); + /*<>*/ var + /*<>*/ _E_ = dim2 - 1 | 0, + /*<>*/ _D_ = 0; + if(_E_ >= 0){ + var j = _D_; + for(;;){ + /*<>*/ /*<>*/ caml_ba_set_2 + (ba, i + ofs | 0, j + ofs | 0, caml_check_bound(row, j)[1 + j]); + /*<>*/ /*<>*/ var + _G_ = j + 1 | 0; + if(_E_ === j) break; + var j = _G_; + } + } + /*<>*/ /*<>*/ var + _F_ = i + 1 | 0; + if(_C_ === i) break; + var i = _F_; + } + } + /*<>*/ return ba; + /*<>*/ } + function create$2(kind, layout, dim1, dim2, dim3){ + /*<>*/ return /*<>*/ caml_ba_create + (kind, layout, [0, dim1, dim2, dim3]); + /*<>*/ } + function size_in_bytes$3(arr){ + /*<>*/ var + /*<>*/ _y_ = + /*<>*/ runtime.caml_ba_dim_3(arr), + /*<>*/ _z_ = + /*<>*/ caml_ba_dim_2(arr), + /*<>*/ _A_ = + /*<>*/ caml_ba_dim_1(arr); + return caml_mul + (caml_mul + ( /*<>*/ caml_mul + (kind_size_in_bytes + ( /*<>*/ caml_ba_kind(arr)), + _A_), + _z_), + _y_); + /*<>*/ } + function slice_left_1(a, n, m){ + /*<>*/ return /*<>*/ caml_ba_slice + (a, [0, n, m]); + /*<>*/ } + function slice_right_1(a, n, m){ + /*<>*/ return /*<>*/ caml_ba_slice + (a, [0, n, m]); + /*<>*/ } + function slice_left_2(a, n){ + /*<>*/ return /*<>*/ caml_ba_slice + (a, [0, n]); + /*<>*/ } + function slice_right_2(a, n){ + /*<>*/ return /*<>*/ caml_ba_slice + (a, [0, n]); + /*<>*/ } + function init$2(kind, layout, dim1, dim2, dim3, f){ + /*<>*/ /*<>*/ var + arr = create$2(kind, layout, dim1, dim2, dim3); + /*<>*/ if(layout){ + /*<>*/ /*<>*/ var _s_ = 1; + if(dim3 >= 1){ + var k$0 = _s_; + for(;;){ + /*<>*/ /*<>*/ var _t_ = 1; + if(dim2 >= 1){ + var j$0 = _t_; + for(;;){ + /*<>*/ /*<>*/ var _v_ = 1; + if(dim1 >= 1){ + var i$0 = _v_; + for(;;){ + /*<>*/ /*<>*/ caml_ba_set_3 + (arr, + i$0, + j$0, + k$0, + /*<>*/ caml_call3(f, i$0, j$0, k$0)); + /*<>*/ /*<>*/ var + _x_ = i$0 + 1 | 0; + if(dim1 === i$0) break; + var i$0 = _x_; + } + } + /*<>*/ /*<>*/ var + _w_ = j$0 + 1 | 0; + if(dim2 === j$0) break; + var j$0 = _w_; + } + } + /*<>*/ /*<>*/ var + _u_ = k$0 + 1 | 0; + if(dim3 === k$0) break; + var k$0 = _u_; + } + } + /*<>*/ return arr; + } + /*<>*/ var + _k_ = dim1 - 1 | 0, + /*<>*/ _j_ = 0; + if(_k_ >= 0){ + var i = _j_; + for(;;){ + /*<>*/ var + _m_ = dim2 - 1 | 0, + /*<>*/ _l_ = 0; + if(_m_ >= 0){ + var j = _l_; + for(;;){ + /*<>*/ var + _p_ = dim3 - 1 | 0, + /*<>*/ _o_ = 0; + if(_p_ >= 0){ + var k = _o_; + for(;;){ + /*<>*/ /*<>*/ caml_ba_set_3 + (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); + /*<>*/ /*<>*/ var + _r_ = k + 1 | 0; + if(_p_ === k) break; + var k = _r_; + } + } + /*<>*/ /*<>*/ var + _q_ = j + 1 | 0; + if(_m_ === j) break; + var j = _q_; + } + } + /*<>*/ /*<>*/ var + _n_ = i + 1 | 0; + if(_k_ === i) break; + var i = _n_; + } + } + /*<>*/ return arr; + /*<>*/ } + function of_array$1(kind, layout, data){ + /*<>*/ var + dim1 = data.length - 1, + /*<>*/ dim2 = + 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, + /*<>*/ dim3 = + 0 === dim2 + ? 0 + : caml_check_bound(caml_check_bound(data, 0)[1], 0)[1].length - 1, + /*<>*/ ba = create$2(kind, layout, dim1, dim2, dim3), + /*<>*/ ofs = layout ? 1 : 0, + /*<>*/ _b_ = dim1 - 1 | 0, + _a_ = 0; + if(_b_ >= 0){ + var i = _a_; + 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); + /*<>*/ 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); + /*<>*/ var + /*<>*/ _g_ = dim3 - 1 | 0, + /*<>*/ _f_ = 0; + if(_g_ >= 0){ + var k = _f_; + for(;;){ + /*<>*/ /*<>*/ caml_ba_set_3 + (ba, + i + ofs | 0, + j + ofs | 0, + k + ofs | 0, + caml_check_bound(col, k)[1 + k]); + /*<>*/ /*<>*/ var + _i_ = k + 1 | 0; + if(_g_ === k) break; + var k = _i_; + } + } + /*<>*/ /*<>*/ var + _h_ = j + 1 | 0; + if(_d_ === j) break; + var j = _h_; + } + } + /*<>*/ /*<>*/ var + _e_ = i + 1 | 0; + if(_b_ === i) break; + var i = _e_; + } + } + /*<>*/ return ba; + /*<>*/ } + function array0_of_genarray(a){ + /*<>*/ return 0 + === /*<>*/ caml_ba_num_dims(a) + ? a + : /*<>*/ caml_call1 + (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); + /*<>*/ } + function array2_of_genarray(a){ + /*<>*/ return 2 + === /*<>*/ caml_ba_num_dims(a) + ? a + : /*<>*/ caml_call1 + (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); + /*<>*/ } + function reshape_0(a){ + /*<>*/ return /*<>*/ caml_ba_reshape + (a, [0]); + /*<>*/ } + function reshape_1(a, dim1){ + /*<>*/ return /*<>*/ caml_ba_reshape + (a, [0, dim1]); + /*<>*/ } + function reshape_2(a, dim1, dim2){ + /*<>*/ return /*<>*/ caml_ba_reshape + (a, [0, dim1, dim2]); + /*<>*/ } + function reshape_3(a, dim1, dim2, dim3){ + /*<>*/ return /*<>*/ caml_ba_reshape + (a, [0, dim1, dim2, dim3]); + /*<>*/ } + var + Stdlib_Bigarray = + [0, + float32, + float64, + complex32, + complex64, + int8_signed, + int8_unsigned, + int16_signed, + int16_unsigned, + int$0, + int32, + int64, + nativeint, + char$0, + kind_size_in_bytes, + c_layout, + fortran_layout, + [0, init, dims, size_in_bytes], + [0, + create, + of_value, + caml_ba_change_layout, + size_in_bytes$0, + get, + set, + of_value], + [0, + create$0, + init$0, + caml_ba_change_layout, + size_in_bytes$1, + slice, + of_array], + [0, + create$1, + init$1, + caml_ba_change_layout, + size_in_bytes$2, + slice_left, + slice_right, + of_array$0], + [0, + create$2, + init$2, + caml_ba_change_layout, + size_in_bytes$3, + slice_left_1, + slice_right_1, + slice_left_2, + slice_right_2, + of_array$1], + array0_of_genarray, + array1_of_genarray, + array2_of_genarray, + array3_of_genarray, + caml_ba_reshape, + reshape_0, + reshape_1, + reshape_2, + reshape_3]; + runtime.caml_register_global(10, Stdlib_Bigarray, "Stdlib__Bigarray"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Random +//# unitInfo: Requires: Stdlib, Stdlib__Bigarray, Stdlib__Bytes, Stdlib__Digest, Stdlib__Domain, Stdlib__Int32, Stdlib__Int64, Stdlib__Nativeint, Stdlib__String +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_ba_blit = runtime.caml_ba_blit, + caml_ba_set_1 = runtime.caml_ba_set_1, + caml_bytes_set = runtime.caml_bytes_set, + caml_greaterthan = runtime.caml_greaterthan, + caml_int64_of_int32 = runtime.caml_int64_of_int32, + caml_int64_shift_right_unsigne = runtime.caml_int64_shift_right_unsigned, + caml_int64_sub = runtime.caml_int64_sub, + caml_int64_to_int32 = runtime.caml_int64_to_int32, + caml_lessequal = runtime.caml_lessequal, + 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 + global_data = runtime.caml_get_global_data(), + Stdlib_Domain = global_data.Stdlib__Domain, + Stdlib = global_data.Stdlib, + Stdlib_Int32 = global_data.Stdlib__Int32, + Stdlib_Int64 = global_data.Stdlib__Int64, + Stdlib_Bytes = global_data.Stdlib__Bytes, + Stdlib_Digest = global_data.Stdlib__Digest, + Stdlib_String = global_data.Stdlib__String, + Stdlib_Bigarray = global_data.Stdlib__Bigarray, + Stdlib_Nativeint = global_data.Stdlib__Nativeint, + _j_ = runtime.caml_int64_create_lo_mi_hi(14371852, 15349651, 22696), + _k_ = runtime.caml_int64_create_lo_mi_hi(12230193, 11438743, 35013), + _l_ = runtime.caml_int64_create_lo_mi_hi(1424933, 15549263, 2083), + _m_ = runtime.caml_int64_create_lo_mi_hi(9492471, 4696708, 43520), + _f_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), + _h_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), + _i_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), + _g_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), + cst_Random_int64 = "Random.int64", + cst_Random_int32 = "Random.int32", + cst_Random_full_int = "Random.full_int", + cst_Random_int = "Random.int", + _a_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), + _b_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), + _e_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), + _c_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), + _d_ = runtime.caml_int64_create_lo_mi_hi(2, 0, 0); + function create(param){ + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Bigarray[19][1], 7, 0, 4); + /*<>*/ } + function set(s, i1, i2, i3, i4){ + /*<>*/ /*<>*/ caml_ba_set_1 + (s, 0, /*<>*/ runtime.caml_int64_or(i1, _a_)); + /*<>*/ /*<>*/ caml_ba_set_1(s, 1, i2); + /*<>*/ /*<>*/ var + i3$0 = /*<>*/ caml_notequal(i3, _b_) ? i3 : _e_; + /*<>*/ /*<>*/ caml_ba_set_1(s, 2, i3$0); + /*<>*/ /*<>*/ var + i4$0 = /*<>*/ caml_notequal(i4, _c_) ? i4 : _d_; + /*<>*/ return /*<>*/ caml_ba_set_1 + (s, 3, i4$0); + /*<>*/ } + function mk(i1, i2, i3, i4){ + /*<>*/ /*<>*/ var s = create(0); + /*<>*/ set(s, i1, i2, i3, i4); + /*<>*/ return s; + /*<>*/ } + function copy(s){ + /*<>*/ /*<>*/ var s$0 = create(0); + /*<>*/ /*<>*/ caml_ba_blit(s, s$0); + /*<>*/ return s$0; + /*<>*/ } + function reinit(s, seed){ + /*<>*/ var + n = seed.length - 1, + /*<>*/ b = + /*<>*/ runtime.caml_create_bytes((n * 8 | 0) + 1 | 0), + /*<>*/ _p_ = n - 1 | 0, + /*<>*/ _o_ = 0; + if(_p_ >= 0){ + var i = _o_; + for(;;){ + /*<>*/ /*<>*/ var + _t_ = + /*<>*/ caml_int64_of_int32 + (runtime.caml_check_bound(seed, i)[1 + i]); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Bytes[86], b, i * 8 | 0, _t_); + /*<>*/ /*<>*/ var _u_ = i + 1 | 0; + if(_p_ === i) break; + var i = _u_; + } + } + /*<>*/ /*<>*/ caml_bytes_set + (b, n * 8 | 0, 1); + /*<>*/ /*<>*/ var + d1 = /*<>*/ caml_call1(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); + /*<>*/ return set + (s, + /*<>*/ caml_call2(Stdlib_String[64], d1, 0), + _s_, + _r_, + _q_); + /*<>*/ } + function make(seed){ + /*<>*/ /*<>*/ var s = create(0); + /*<>*/ reinit(s, seed); + /*<>*/ return s; + /*<>*/ } + function make_self_init(param){ + /*<>*/ return make + ( /*<>*/ caml_sys_random_seed(0)); + /*<>*/ } + function bits(s){ + /*<>*/ return /*<>*/ caml_int64_to_int32 + ( /*<>*/ caml_lxm_next(s)) + & 1073741823; + /*<>*/ } + function intaux(s, n){ + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ r = bits(s), + v = caml_mod(r, n); + if(((1073741823 - n | 0) + 1 | 0) >= (r - v | 0)) + /*<>*/ return v; + } + /*<>*/ } + function int$0(s, bound){ + /*<>*/ if(1073741823 >= bound && 0 < bound) + /*<>*/ return intaux(s, bound); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Random_int); + /*<>*/ } + function full_int(s, bound){ + /*<>*/ if(0 >= bound) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Random_full_int); + if(1073741823 >= bound) /*<>*/ return intaux(s, bound); + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ _n_ = Stdlib[19], + r = + /*<>*/ caml_int64_to_int32 + ( /*<>*/ caml_lxm_next(s)) + & _n_, + v = caml_mod(r, bound); + if(((Stdlib[19] - bound | 0) + 1 | 0) >= (r - v | 0)) + /*<>*/ return v; + } + /*<>*/ } + function bits32(s){ + /*<>*/ return /*<>*/ caml_int64_to_int32 + ( /*<>*/ caml_lxm_next(s)); + /*<>*/ } + function int32(s, bound){ + /*<>*/ if + ( /*<>*/ caml_lessequal(bound, 0)) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Random_int32); + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ r = bits32(s) >>> 1 | 0, + /*<>*/ v = + /*<>*/ caml_mod(r, bound); + /*<>*/ if + (! + /*<>*/ caml_greaterthan + (r - v | 0, (Stdlib_Int32[9] - bound | 0) + 1 | 0)) + /*<>*/ return v; + } + /*<>*/ } + var bits64 = caml_lxm_next; + function int64(s, bound){ + /*<>*/ if + ( /*<>*/ caml_lessequal(bound, _g_)) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Random_int64); + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_int64_shift_right_unsigne + ( /*<>*/ caml_lxm_next(s), 1), + /*<>*/ v = + /*<>*/ runtime.caml_int64_mod(r, bound); + /*<>*/ if + (! + /*<>*/ caml_greaterthan + ( /*<>*/ caml_int64_sub(r, v), + /*<>*/ runtime.caml_int64_add + ( /*<>*/ caml_int64_sub(Stdlib_Int64[9], bound), + _f_))) + /*<>*/ return v; + } + /*<>*/ } + var + nativebits = + 32 === Stdlib_Nativeint[9] + ? function + (s){ + /*<>*/ return bits32(s); + /*<>*/ } + : function + (s){ + /*<>*/ return /*<>*/ caml_int64_to_int32 + ( /*<>*/ caml_lxm_next(s)); + /*<>*/ }, + nativeint = + 32 === Stdlib_Nativeint[9] + ? function + (s, bound){ + /*<>*/ return int32(s, bound); + /*<>*/ } + : function + (s, bound){ + /*<>*/ return /*<>*/ caml_int64_to_int32 + (int64 + (s, /*<>*/ caml_int64_of_int32(bound))); + /*<>*/ }; + function float$0(s, bound){ + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ b = /*<>*/ caml_lxm_next(s), + /*<>*/ n = + /*<>*/ caml_int64_shift_right_unsigne(b, 11); + /*<>*/ if + ( /*<>*/ caml_notequal(n, _h_)) + /*<>*/ return /*<>*/ runtime.caml_int64_to_float + (n) + * 1.1102230246251565e-16 + * bound; + } + /*<>*/ } + function bool(s){ + /*<>*/ return /*<>*/ runtime.caml_lessthan + ( /*<>*/ caml_lxm_next(s), _i_); + /*<>*/ } + function split(s){ + /*<>*/ var + /*<>*/ i1 = /*<>*/ caml_lxm_next(s), + /*<>*/ i2 = /*<>*/ caml_lxm_next(s), + /*<>*/ i3 = /*<>*/ caml_lxm_next(s), + /*<>*/ i4 = /*<>*/ caml_lxm_next(s); + /*<>*/ return mk(i1, i2, i3, i4); + /*<>*/ } + function mk_default(param){ + /*<>*/ return mk(_m_, _l_, _k_, _j_); + /*<>*/ } + /*<>*/ /*<>*/ var + random_key = + /*<>*/ caml_call2 + (Stdlib_Domain[10][1], [0, split], mk_default); + function bits$0(param){ + /*<>*/ return bits + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key)); + /*<>*/ } + function int$1(bound){ + /*<>*/ return int$0 + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key), + bound); + /*<>*/ } + function full_int$0(bound){ + /*<>*/ return full_int + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key), + bound); + /*<>*/ } + function int32$0(bound){ + /*<>*/ return int32 + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key), + bound); + /*<>*/ } + function nativeint$0(bound){ + /*<>*/ return nativeint + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key), + bound); + /*<>*/ } + function int64$0(bound){ + /*<>*/ return int64 + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key), + bound); + /*<>*/ } + function float$1(scale){ + /*<>*/ return float$0 + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key), + scale); + /*<>*/ } + function bool$0(param){ + /*<>*/ return bool + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key)); + /*<>*/ } + function bits32$0(param){ + /*<>*/ return bits32 + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key)); + /*<>*/ } + function bits64$0(param){ + /*<>*/ return /*<>*/ caml_lxm_next + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key)); + /*<>*/ } + function nativebits$0(param){ + /*<>*/ return nativebits + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key)); + /*<>*/ } + function full_init(seed){ + /*<>*/ return reinit + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key), + seed); + /*<>*/ } + function init(seed){ + /*<>*/ return full_init([0, seed]); + /*<>*/ } + function self_init(param){ + /*<>*/ return full_init + ( /*<>*/ caml_sys_random_seed(0)); + /*<>*/ } + function split$0(param){ + /*<>*/ return split + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key)); + /*<>*/ } + function get_state(param){ + /*<>*/ return copy + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key)); + /*<>*/ } + function set_state(s){ + /*<>*/ return /*<>*/ caml_ba_blit + (s, + /*<>*/ caml_call1 + (Stdlib_Domain[10][2], random_key)); + /*<>*/ } + var + Stdlib_Random = + [0, + init, + full_init, + self_init, + bits$0, + int$1, + full_int$0, + int32$0, + nativeint$0, + int64$0, + float$1, + bool$0, + bits32$0, + bits64$0, + nativebits$0, + [0, + make, + make_self_init, + copy, + bits, + int$0, + full_int, + int32, + nativeint, + int64, + float$0, + bool, + bits32, + bits64, + nativebits, + split], + get_state, + set_state, + split$0]; + runtime.caml_register_global(29, Stdlib_Random, "Stdlib__Random"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Hashtbl +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Array, Stdlib__Atomic, Stdlib__Domain, Stdlib__Int, Stdlib__Random, Stdlib__Seq, Stdlib__String, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_check_bound = runtime.caml_check_bound, + caml_compare = runtime.caml_compare, + caml_hash = runtime.caml_hash, + caml_make_vect = runtime.caml_make_vect, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_sys_getenv = runtime.caml_sys_getenv, + 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) + : 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(), + cst = "", + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib = global_data.Stdlib, + Stdlib_Atomic = global_data.Stdlib__Atomic, + Stdlib_Domain = global_data.Stdlib__Domain, + Stdlib_Random = global_data.Stdlib__Random, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_Int = global_data.Stdlib__Int, + Stdlib_Array = global_data.Stdlib__Array; + global_data.Assert_failure; + var + Stdlib_String = global_data.Stdlib__String, + cst_Hashtbl_unsupported_hash_t = "Hashtbl: unsupported hash table format", + _d_ = [0, 0]; + function ongoing_traversal(h){ + /*<>*/ var + _aB_ = h.length - 1 < 4 ? 1 : 0, + _aC_ = _aB_ || (h[4] < 0 ? 1 : 0); + return _aC_; + /*<>*/ } + function flip_ongoing_traversal(h){ + /*<>*/ h[4] = - h[4] | 0; + return 0; + /*<>*/ } + try{ + /*<>*/ var + /*<>*/ _f_ = + /*<>*/ caml_sys_getenv("OCAMLRUNPARAM"), + params = _f_; + } + catch(_az_){ + var _a_ = caml_wrap_exception(_az_); + if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); + /*<>*/ try{ + /*<>*/ var + /*<>*/ _e_ = + /*<>*/ caml_sys_getenv("CAMLRUNPARAM"), + _c_ = _e_; + } + catch(_aA_){ + var _b_ = caml_wrap_exception(_aA_); + if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); + var _c_ = cst; + } + var params = _c_; + } + /*<>*/ var + /*<>*/ randomized_default = + /*<>*/ caml_call2(Stdlib_String[14], params, 82), + /*<>*/ randomized = + /*<>*/ caml_call1 + (Stdlib_Atomic[1], randomized_default); + function randomize(param){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Atomic[3], randomized, 1); + /*<>*/ } + function is_randomized(param){ + /*<>*/ return caml_call1(Stdlib_Atomic[2], randomized); + /*<>*/ } + /*<>*/ /*<>*/ var + prng_key = + /*<>*/ caml_call2 + (Stdlib_Domain[10][1], 0, Stdlib_Random[15][2]); + function power_2_above(x, n){ + /*<>*/ var x$0 = x; + /*<>*/ for(;;){ + if(n <= x$0) /*<>*/ return x$0; + if(Stdlib_Sys[13] < (x$0 * 2 | 0)) /*<>*/ return x$0; + var x$1 = x$0 * 2 | 0, x$0 = x$1; + } + /*<>*/ } + function create(opt, initial_size){ + /*<>*/ if(opt) + var sth = opt[1], random = sth; + else + var + random = + /*<>*/ caml_call1(Stdlib_Atomic[2], randomized); + /*<>*/ /*<>*/ var + s = power_2_above(16, initial_size); + /*<>*/ if(random) + /*<>*/ var + /*<>*/ _ay_ = + /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), + seed = /*<>*/ caml_call1(Stdlib_Random[15][4], _ay_); + else + var seed = 0; + /*<>*/ return [0, + 0, + /*<>*/ caml_make_vect(s, 0), + seed, + s]; + /*<>*/ } + function clear(h){ + /*<>*/ var _ax_ = 0 < h[1] ? 1 : 0; + return _ax_ + ? (h + [1] + = 0, + /*<>*/ caml_call4 + (Stdlib_Array[7], h[2], 0, h[2].length - 1, 0)) + : _ax_; + /*<>*/ } + function reset(h){ + /*<>*/ var len = h[2].length - 1; + if + (4 <= h.length - 1 + && len !== /*<>*/ caml_call1(Stdlib[18], h[4])){ + h[1] = 0; + h[2] = + /*<>*/ caml_make_vect + ( /*<>*/ caml_call1(Stdlib[18], h[4]), 0); + return 0; + } + /*<>*/ return clear(h); + /*<>*/ } + function copy_bucketlist(param){ + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var + key = param[1], + data = param[2], + next = param[3], + /*<>*/ prec$1 = [0, key, data, next], + prec = prec$1, + param$0 = next; + for(;;){ + if(! param$0) /*<>*/ return prec$1; + /*<>*/ var + key$0 = param$0[1], + data$0 = param$0[2], + next$0 = param$0[3], + /*<>*/ prec$0 = [0, key$0, data$0, next$0]; + prec[3] = prec$0; + var prec = prec$0, param$0 = next$0; + } + /*<>*/ } + function copy(h){ + /*<>*/ var + _au_ = h[4], + _av_ = h[3], + /*<>*/ _aw_ = + /*<>*/ caml_call2 + (Stdlib_Array[13], copy_bucketlist, h[2]); + /*<>*/ return [0, h[1], _aw_, _av_, _au_]; + /*<>*/ } + function length(h){ + /*<>*/ return h[1]; + /*<>*/ } + function insert_all_buckets(indexfun, inplace, odata, ndata){ + /*<>*/ var + nsize = ndata.length - 1, + /*<>*/ ndata_tail = + /*<>*/ caml_make_vect(nsize, 0), + _ao_ = odata.length - 1 - 1 | 0, + /*<>*/ _an_ = 0; + if(_ao_ >= 0){ + var i$0 = _an_; + a: + for(;;){ + /*<>*/ var + /*<>*/ cell$1 = + caml_check_bound(odata, i$0)[1 + i$0], + cell = cell$1; + /*<>*/ for(;;){ + if(! cell){ + /*<>*/ /*<>*/ var + _at_ = i$0 + 1 | 0; + if(_ao_ === i$0) break a; + var i$0 = _at_; + break; + } + /*<>*/ var + key = cell[1], + data = cell[2], + next = cell[3], + /*<>*/ cell$0 = inplace ? cell : [0, key, data, 0], + /*<>*/ nidx = + /*<>*/ caml_call1(indexfun, key), + /*<>*/ match = + caml_check_bound(ndata_tail, nidx)[1 + nidx]; + if(match) + match[3] = cell$0; + else + /*<>*/ caml_check_bound(ndata, nidx)[1 + nidx] = cell$0; + /*<>*/ caml_check_bound(ndata_tail, nidx)[1 + nidx] + = cell$0; + var cell = next; + } + } + } + if(inplace){ + /*<>*/ var + _aq_ = nsize - 1 | 0, + /*<>*/ _ap_ = 0; + if(_aq_ >= 0){ + var i = _ap_; + for(;;){ + /*<>*/ /*<>*/ var + match$0 = caml_check_bound(ndata_tail, i)[1 + i]; + if(match$0) match$0[3] = 0; + /*<>*/ /*<>*/ var + _as_ = i + 1 | 0; + if(_aq_ === i) break; + var i = _as_; + } + } + var _ar_ = 0; + } + else + var _ar_ = inplace; + return _ar_; + /*<>*/ } + function resize(indexfun, h){ + /*<>*/ var + odata = h[2], + /*<>*/ osize = odata.length - 1, + nsize = osize * 2 | 0, + _am_ = nsize < Stdlib_Sys[13] ? 1 : 0; + if(! _am_) return _am_; + /*<>*/ var + /*<>*/ ndata = + /*<>*/ caml_make_vect(nsize, 0), + /*<>*/ inplace = 1 - ongoing_traversal(h); + h[2] = ndata; + /*<>*/ return insert_all_buckets + ( /*<>*/ caml_call1(indexfun, h), + inplace, + odata, + ndata); + /*<>*/ } + function iter(f, h){ + /*<>*/ /*<>*/ var + old_trav = ongoing_traversal(h); + if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); + /*<>*/ try{ + var d = h[2], _ai_ = d.length - 1 - 1 | 0, _ah_ = 0; + if(_ai_ >= 0){ + var i = _ah_; + a: + for(;;){ + var param = caml_check_bound(d, i)[1 + i]; + /*<>*/ for(;;){ + if(! param){ + /*<>*/ /*<>*/ var + _al_ = i + 1 | 0; + if(_ai_ === i) break a; + var i = _al_; + break; + } + var key = param[1], data = param[2], next = param[3]; + /*<>*/ /*<>*/ caml_call2 + (f, key, data); + var param = next; + } + } + } + var _aj_ = 1 - old_trav, _ak_ = _aj_ ? flip_ongoing_traversal(h) : _aj_; + /*<>*/ return _ak_; + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + /*<>*/ if(old_trav) + throw caml_maybe_attach_backtrace(exn, 0); + /*<>*/ flip_ongoing_traversal(h); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (exn, 0); + } + /*<>*/ } + function filter_map_inplace(f, h){ + /*<>*/ var + d = h[2], + /*<>*/ old_trav = ongoing_traversal(h); + if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); + /*<>*/ try{ + var _ad_ = d.length - 1 - 1 | 0, _ac_ = 0; + if(_ad_ >= 0){ + var i = _ac_; + a: + for(;;){ + /*<>*/ var + /*<>*/ slot$0 = caml_check_bound(h[2], i)[1 + i], + prec = 0, + slot = slot$0; + for(;;){ + if(! slot){ + if(prec) + prec[3] = 0; + else + /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; + /*<>*/ /*<>*/ var + _ag_ = i + 1 | 0; + if(_ad_ === i) break a; + var i = _ag_; + break; + } + /*<>*/ var + key = slot[1], + data = slot[2], + next = slot[3], + /*<>*/ match = + /*<>*/ caml_call2(f, key, data); + if(match){ + var data$0 = match[1]; + /*<>*/ if(prec) + prec[3] = slot; + else + /*<>*/ caml_check_bound(h[2], i)[1 + i] = slot; + slot[2] = data$0; + var prec = slot, slot = next; + } + else{h[1] = h[1] - 1 | 0; var slot = next;} + } + } + } + var _ae_ = 1 - old_trav, _af_ = _ae_ ? flip_ongoing_traversal(h) : _ae_; + /*<>*/ return _af_; + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + /*<>*/ if(old_trav) + throw caml_maybe_attach_backtrace(exn, 0); + /*<>*/ flip_ongoing_traversal(h); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (exn, 0); + } + /*<>*/ } + function fold(f, h, init){ + /*<>*/ /*<>*/ var + old_trav = ongoing_traversal(h); + if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); + /*<>*/ try{ + /*<>*/ var + d = h[2], + /*<>*/ accu$1 = [0, init], + _$_ = d.length - 1 - 1 | 0, + /*<>*/ ___ = 0; + if(_$_ >= 0){ + var i = ___; + a: + for(;;){ + /*<>*/ var + accu$2 = accu$1[1], + /*<>*/ b$0 = caml_check_bound(d, i)[1 + i], + b = b$0, + accu = accu$2; + /*<>*/ for(;;){ + if(! b){ + accu$1[1] = accu; + /*<>*/ /*<>*/ var + _ab_ = i + 1 | 0; + if(_$_ === i) break a; + var i = _ab_; + break; + } + /*<>*/ var + key = b[1], + data = b[2], + next = b[3], + /*<>*/ accu$0 = + /*<>*/ caml_call3(f, key, data, accu), + b = next, + accu = accu$0; + } + } + } + if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); + var _aa_ = accu$1[1]; + return _aa_; + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + /*<>*/ if(old_trav) + throw caml_maybe_attach_backtrace(exn, 0); + /*<>*/ flip_ongoing_traversal(h); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (exn, 0); + } + /*<>*/ } + function bucket_length(accu, param){ + var accu$0 = accu, param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return accu$0; + /*<>*/ var + next = param$0[3], + /*<>*/ accu$1 = accu$0 + 1 | 0, + accu$0 = accu$1, + param$0 = next; + } + } + function stats(h){ + /*<>*/ var _U_ = h[2], _V_ = 0; + function _W_(m, b){ + /*<>*/ /*<>*/ var + _Z_ = bucket_length(0, b); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Int[11], m, _Z_); + /*<>*/ } + /*<>*/ var + /*<>*/ mbl = + /*<>*/ caml_call3(Stdlib_Array[15], _W_, _V_, _U_), + /*<>*/ histo = + /*<>*/ caml_make_vect(mbl + 1 | 0, 0), + /*<>*/ _X_ = h[2]; + function _Y_(b){ + /*<>*/ /*<>*/ var + l = bucket_length(0, b); + /*<>*/ histo[1 + l] = + caml_check_bound(histo, l)[1 + l] + 1 | 0; + /*<>*/ return 0; + /*<>*/ } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Array[11], _Y_, _X_); + /*<>*/ return [0, h[1], h[2].length - 1, mbl, histo]; + /*<>*/ } + function to_seq(tbl){ + /*<>*/ var tbl_data = tbl[2]; + /*<>*/ function aux(i, buck, param){ + /*<>*/ var i$0 = i, buck$0 = buck; + /*<>*/ for(;;){ + if(buck$0){ + var key = buck$0[1], data = buck$0[2], next = buck$0[3]; + /*<>*/ return [0, + [0, key, data], + function(_T_){ /*<>*/ return aux(i$0, next, _T_);}]; + } + if(i$0 === tbl_data.length - 1) /*<>*/ return 0; + /*<>*/ var + /*<>*/ buck$1 = + caml_check_bound(tbl_data, i$0)[1 + i$0], + /*<>*/ i$1 = i$0 + 1 | 0, + i$0 = i$1, + buck$0 = buck$1; + } + /*<>*/ } + /*<>*/ var /*<>*/ _Q_ = 0, _R_ = 0; + /*<>*/ return function(_S_){ + /*<>*/ return aux(_R_, _Q_, _S_);}; + /*<>*/ } + function to_seq_keys(m){ + /*<>*/ /*<>*/ var _N_ = to_seq(m); + function _O_(_P_){ /*<>*/ return _P_[1];} + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[27], _O_, _N_); + /*<>*/ } + function to_seq_values(m){ + /*<>*/ /*<>*/ var _K_ = to_seq(m); + function _L_(_M_){ /*<>*/ return _M_[2];} + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[27], _L_, _K_); + /*<>*/ } + function MakeSeeded(H){ + function key_index(h, key){ + /*<>*/ var _J_ = h[2].length - 1 - 1 | 0; + /*<>*/ return /*<>*/ caml_call2 + (H[2], h[3], key) + & _J_; + /*<>*/ } + function add(h, key, data){ + /*<>*/ var + /*<>*/ i = key_index(h, key), + /*<>*/ bucket = + [0, key, data, caml_check_bound(h[2], i)[1 + i]]; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; + h[1] = h[1] + 1 | 0; + var _I_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _I_ ? resize(key_index, h) : _I_; + /*<>*/ } + function remove(h, key){ + /*<>*/ var + /*<>*/ i = key_index(h, key), + /*<>*/ c = caml_check_bound(h[2], i)[1 + i], + prec$0 = 0, + prec = c; + for(;;){ + if(! prec) /*<>*/ return 0; + var k = prec[1], next = prec[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], k, key)){ + h[1] = h[1] - 1 | 0; + return prec$0 + ? (prec$0[3] = next, 0) + : (caml_check_bound(h[2], i)[1 + i] = next, 0); + } + var prec$0 = prec, prec = next; + } + /*<>*/ } + function find(h, key){ + /*<>*/ var + /*<>*/ _H_ = key_index(h, key), + /*<>*/ match = caml_check_bound(h[2], _H_)[1 + _H_]; + if(! match) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var k1 = match[1], d1 = match[2], next1 = match[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], key, k1)) + /*<>*/ return d1; + if(! next1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var k2 = next1[1], d2 = next1[2], next2 = next1[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], key, k2)) + /*<>*/ return d2; + if(! next2) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var k3 = next2[1], d3 = next2[2], next3 = next2[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], key, k3)) + /*<>*/ return d3; + var param = next3; + for(;;){ + if(! param) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var k = param[1], data = param[2], next = param[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], key, k)) + /*<>*/ return data; + var param = next; + } + /*<>*/ } + function find_opt(h, key){ + /*<>*/ var + /*<>*/ _G_ = key_index(h, key), + /*<>*/ match = caml_check_bound(h[2], _G_)[1 + _G_]; + if(! match) /*<>*/ return 0; + var k1 = match[1], d1 = match[2], next1 = match[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], key, k1)) + /*<>*/ return [0, d1]; + if(! next1) /*<>*/ return 0; + var k2 = next1[1], d2 = next1[2], next2 = next1[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], key, k2)) + /*<>*/ return [0, d2]; + if(! next2) /*<>*/ return 0; + var k3 = next2[1], d3 = next2[2], next3 = next2[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], key, k3)) + /*<>*/ return [0, d3]; + var param = next3; + for(;;){ + if(! param) /*<>*/ return 0; + var k = param[1], data = param[2], next = param[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], key, k)) + /*<>*/ return [0, data]; + var param = next; + } + /*<>*/ } + function find_all(h, key){ + function find_in_bucket(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + var k = param$0[1], d = param$0[2], next = param$0[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], k, key)) + /*<>*/ return [0, d, find_in_bucket(next)]; + var param$0 = next; + } + /*<>*/ } + /*<>*/ /*<>*/ var + _F_ = key_index(h, key); + /*<>*/ return find_in_bucket + (caml_check_bound(h[2], _F_)[1 + _F_]); + /*<>*/ } + function replace(h, key, data){ + /*<>*/ var + /*<>*/ i = key_index(h, key), + /*<>*/ l = caml_check_bound(h[2], i)[1 + i], + slot = l; + for(;;){ + if(slot){ + var k = slot[1], next = slot[3]; + /*<>*/ if + (! /*<>*/ caml_call2(H[1], k, key)){var slot = next; continue;} + slot[1] = key; + slot[2] = data; + var _C_ = 0; + } + else + var _C_ = 1; + /*<>*/ if(_C_){ + /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, key, data, l]; + h[1] = h[1] + 1 | 0; + var _D_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + if(_D_) /*<>*/ return resize(key_index, h); + var _E_ = _D_; + } + else + var _E_ = _C_; + return _E_; + } + /*<>*/ } + function mem(h, key){ + /*<>*/ var + /*<>*/ _B_ = key_index(h, key), + param = caml_check_bound(h[2], _B_)[1 + _B_]; + /*<>*/ for(;;){ + if(! param) /*<>*/ return 0; + /*<>*/ var + k = param[1], + next = param[3], + /*<>*/ _A_ = + /*<>*/ caml_call2(H[1], k, key); + /*<>*/ if(_A_) + /*<>*/ return _A_; + var param = next; + } + /*<>*/ } + function add_seq(tbl, i){ + function _z_(param){ + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return add(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[4], _z_, i); + /*<>*/ } + function replace_seq(tbl, i){ + function _y_(param){ + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return replace(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[4], _y_, i); + /*<>*/ } + function of_seq(i){ + /*<>*/ /*<>*/ var + tbl = create(0, 16); + /*<>*/ replace_seq(tbl, i); + /*<>*/ return tbl; + /*<>*/ } + /*<>*/ return [0, + create, + clear, + reset, + copy, + add, + remove, + find, + find_opt, + find_all, + replace, + mem, + iter, + filter_map_inplace, + fold, + length, + stats, + to_seq, + to_seq_keys, + to_seq_values, + add_seq, + replace_seq, + of_seq]; + } + function Make(H){ + var equal = H[1]; + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_call1 + (H[2], x); + /*<>*/ } + var + include = MakeSeeded([0, equal, seeded_hash]), + clear = include[2], + reset = include[3], + copy = include[4], + add = include[5], + remove = include[6], + find = include[7], + find_opt = include[8], + find_all = include[9], + replace = include[10], + mem = include[11], + iter = include[12], + filter_map_inplace = include[13], + fold = include[14], + length = include[15], + stats = include[16], + to_seq = include[17], + to_seq_keys = include[18], + to_seq_values = include[19], + add_seq = include[20], + replace_seq = include[21], + _x_ = include[1]; + function create(sz){ + /*<>*/ return /*<>*/ caml_call2 + (_x_, _d_, sz); + /*<>*/ } + function of_seq(i){ + /*<>*/ /*<>*/ var + tbl = create(16); + /*<>*/ /*<>*/ caml_call2 + (replace_seq, tbl, i); + /*<>*/ return tbl; + /*<>*/ } + /*<>*/ return [0, + create, + clear, + reset, + copy, + add, + remove, + find, + find_opt, + find_all, + replace, + mem, + iter, + filter_map_inplace, + fold, + length, + stats, + to_seq, + to_seq_keys, + to_seq_values, + add_seq, + replace_seq, + of_seq]; + } + function hash(x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, 0, x); + /*<>*/ } + function hash_param(n1, n2, x){ + /*<>*/ return /*<>*/ caml_hash + (n1, n2, 0, x); + /*<>*/ } + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, seed, x); + /*<>*/ } + function key_index(h, key){ + /*<>*/ return 4 <= h.length - 1 + ? /*<>*/ caml_hash + (10, 100, h[3], key) + & (h[2].length - 1 - 1 | 0) + : /*<>*/ caml_call1 + (Stdlib[1], cst_Hashtbl_unsupported_hash_t); + /*<>*/ } + function add(h, key, data){ + /*<>*/ var + /*<>*/ i = key_index(h, key), + /*<>*/ bucket = + [0, key, data, caml_check_bound(h[2], i)[1 + i]]; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; + h[1] = h[1] + 1 | 0; + var _w_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _w_ ? resize(key_index, h) : _w_; + /*<>*/ } + function remove(h, key){ + /*<>*/ var + /*<>*/ i = key_index(h, key), + /*<>*/ c = caml_check_bound(h[2], i)[1 + i], + prec$0 = 0, + prec = c; + for(;;){ + if(! prec) /*<>*/ return 0; + var k = prec[1], next = prec[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(k, key)){ + h[1] = h[1] - 1 | 0; + return prec$0 + ? (prec$0[3] = next, 0) + : (caml_check_bound(h[2], i)[1 + i] = next, 0); + } + var prec$0 = prec, prec = next; + } + /*<>*/ } + function find(h, key){ + /*<>*/ var + /*<>*/ _v_ = key_index(h, key), + /*<>*/ match = caml_check_bound(h[2], _v_)[1 + _v_]; + if(! match) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var k1 = match[1], d1 = match[2], next1 = match[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k1)) + /*<>*/ return d1; + if(! next1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var k2 = next1[1], d2 = next1[2], next2 = next1[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k2)) + /*<>*/ return d2; + if(! next2) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var k3 = next2[1], d3 = next2[2], next3 = next2[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k3)) + /*<>*/ return d3; + var param = next3; + for(;;){ + if(! param) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var k = param[1], data = param[2], next = param[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k)) + /*<>*/ return data; + var param = next; + } + /*<>*/ } + function find_opt(h, key){ + /*<>*/ var + /*<>*/ _u_ = key_index(h, key), + /*<>*/ match = caml_check_bound(h[2], _u_)[1 + _u_]; + if(! match) /*<>*/ return 0; + var k1 = match[1], d1 = match[2], next1 = match[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k1)) + /*<>*/ return [0, d1]; + if(! next1) /*<>*/ return 0; + var k2 = next1[1], d2 = next1[2], next2 = next1[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k2)) + /*<>*/ return [0, d2]; + if(! next2) /*<>*/ return 0; + var k3 = next2[1], d3 = next2[2], next3 = next2[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k3)) + /*<>*/ return [0, d3]; + var param = next3; + for(;;){ + if(! param) /*<>*/ return 0; + var k = param[1], data = param[2], next = param[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k)) + /*<>*/ return [0, data]; + var param = next; + } + /*<>*/ } + function find_all(h, key){ + function find_in_bucket(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + var k = param$0[1], data = param$0[2], next = param$0[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(k, key)) + /*<>*/ return [0, data, find_in_bucket(next)]; + var param$0 = next; + } + /*<>*/ } + /*<>*/ /*<>*/ var + _t_ = key_index(h, key); + /*<>*/ return find_in_bucket + (caml_check_bound(h[2], _t_)[1 + _t_]); + /*<>*/ } + function replace(h, key, data){ + /*<>*/ var + /*<>*/ i = key_index(h, key), + /*<>*/ l = caml_check_bound(h[2], i)[1 + i], + slot = l; + for(;;){ + if(slot){ + var k = slot[1], next = slot[3]; + /*<>*/ if + (0 !== /*<>*/ caml_compare(k, key)){var slot = next; continue;} + slot[1] = key; + slot[2] = data; + var _q_ = 0; + } + else + var _q_ = 1; + /*<>*/ if(_q_){ + /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, key, data, l]; + h[1] = h[1] + 1 | 0; + var _r_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + if(_r_) /*<>*/ return resize(key_index, h); + var _s_ = _r_; + } + else + var _s_ = _q_; + return _s_; + } + /*<>*/ } + function mem(h, key){ + /*<>*/ var + /*<>*/ _p_ = key_index(h, key), + param = caml_check_bound(h[2], _p_)[1 + _p_]; + /*<>*/ for(;;){ + if(! param) /*<>*/ return 0; + var + k = param[1], + next = param[3], + _o_ = 0 === /*<>*/ caml_compare(k, key) ? 1 : 0; + if(_o_) return _o_; + var param = next; + } + /*<>*/ } + function add_seq(tbl, i){ + function _n_(param){ + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return add(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[4], _n_, i); + /*<>*/ } + function replace_seq(tbl, i){ + function _m_(param){ + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return replace(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[4], _m_, i); + /*<>*/ } + function of_seq(i){ + /*<>*/ /*<>*/ var + tbl = create(0, 16); + /*<>*/ replace_seq(tbl, i); + /*<>*/ return tbl; + /*<>*/ } + function rebuild(opt, h){ + /*<>*/ if(opt) + var sth = opt[1], random = sth; + else + var + random = + /*<>*/ caml_call1(Stdlib_Atomic[2], randomized); + /*<>*/ /*<>*/ var + s = power_2_above(16, h[2].length - 1); + /*<>*/ if(random) + /*<>*/ var + /*<>*/ _g_ = + /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), + seed = /*<>*/ caml_call1(Stdlib_Random[15][4], _g_); + else + var seed = 4 <= h.length - 1 ? h[3] : 0; + /*<>*/ var + _h_ = 4 <= h.length - 1 ? h[4] : s, + /*<>*/ h$0 = + [0, h[1], /*<>*/ caml_make_vect(s, 0), seed, _h_], + _i_ = h$0[2], + _j_ = h[2], + _k_ = 0; + /*<>*/ insert_all_buckets + (function(_l_){ /*<>*/ return key_index(h$0, _l_);}, _k_, _j_, _i_); + /*<>*/ return h$0; + /*<>*/ } + var + Stdlib_Hashtbl = + [0, + create, + clear, + reset, + copy, + add, + find, + find_opt, + find_all, + mem, + remove, + replace, + iter, + filter_map_inplace, + fold, + length, + randomize, + is_randomized, + rebuild, + stats, + to_seq, + to_seq_keys, + to_seq_values, + add_seq, + replace_seq, + of_seq, + Make, + MakeSeeded, + hash, + seeded_hash, + hash_param, + caml_hash]; + runtime.caml_register_global(16, Stdlib_Hashtbl, "Stdlib__Hashtbl"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Weak +//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Int, Stdlib__Obj, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_check_bound = runtime.caml_check_bound, + caml_make_vect = runtime.caml_make_vect, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_mod = runtime.caml_mod; + /*<>*/ 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_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, + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib_Int = global_data.Stdlib__Int, + Stdlib_Array = global_data.Stdlib__Array, + Stdlib_Obj = global_data.Stdlib__Obj, + cst_Weak_Make_hash_bucket_cann = "Weak.Make: hash bucket cannot grow more", + cst_Weak_fill = "Weak.fill", + cst_Weak_blit = "Weak.blit", + cst_Weak_check = "Weak.check", + cst_Weak_get_copy = "Weak.get_copy", + cst_Weak_get = "Weak.get", + cst_Weak_set = "Weak.set", + cst_Weak_create = "Weak.create"; + function create(l){ + /*<>*/ var + _W_ = 0 <= l ? 1 : 0, + _X_ = _W_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _W_; + if(1 - _X_) + /*<>*/ /*<>*/ caml_call1 + (Stdlib[1], cst_Weak_create); + /*<>*/ return /*<>*/ runtime.caml_weak_create + (l); + /*<>*/ } + function length(x){ + /*<>*/ return x.length - 1 - 2 | 0; + /*<>*/ } + function raise_if_invalid_offset(e, o, msg){ + /*<>*/ var + _T_ = 0 <= o ? 1 : 0, + _U_ = _T_ ? o < length(e) ? 1 : 0 : _T_, + _V_ = 1 - _U_; + return _V_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _V_; + /*<>*/ } + function set(e, o, x){ + /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); + if(! x) + /*<>*/ return /*<>*/ runtime.caml_ephe_unset_key + (e, o); + var x$0 = x[1]; + /*<>*/ return /*<>*/ runtime.caml_ephe_set_key + (e, o, x$0); + /*<>*/ } + function get(e, o){ + /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_get); + /*<>*/ return /*<>*/ runtime.caml_ephe_get_key + (e, o); + /*<>*/ } + function get_copy(e, o){ + /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_get_copy); + /*<>*/ return /*<>*/ runtime.caml_ephe_get_key_copy + (e, o); + /*<>*/ } + function check(e, o){ + /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_check); + /*<>*/ return /*<>*/ runtime.caml_ephe_check_key + (e, o); + /*<>*/ } + function blit(e1, o1, e2, o2, l){ + /*<>*/ if + (0 <= l + && + 0 <= o1 + && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ + var + _R_ = 0 !== l ? 1 : 0, + _S_ = + _R_ + ? /*<>*/ runtime.caml_ephe_blit_key + (e1, o1, e2, o2, l) + : _R_; + /*<>*/ return _S_; + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Weak_blit); + /*<>*/ } + function fill(ar, ofs, len, x){ + /*<>*/ if + (0 <= ofs && 0 <= len && (length(ar) - len | 0) >= ofs){ + var _P_ = (ofs + len | 0) - 1 | 0; + if(_P_ >= ofs){ + var i = ofs; + for(;;){ + /*<>*/ set(ar, i, x); + /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; + if(_P_ === i) break; + var i = _Q_; + } + } + return 0; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stdlib[6], cst_Weak_fill], 1); + /*<>*/ } + function Make(H){ + /*<>*/ /*<>*/ var + emptybucket = create(0); + function get_index(t, h){ + /*<>*/ return caml_mod(h & Stdlib[19], t[1].length - 1); + /*<>*/ } + var limit = 7; + function create$0(sz){ + /*<>*/ var + sz$0 = 7 <= sz ? sz : 7, + sz$1 = Stdlib_Sys[13] < sz$0 ? Stdlib_Sys[13] : sz$0; + /*<>*/ return [0, + /*<>*/ caml_make_vect(sz$1, emptybucket), + /*<>*/ caml_make_vect(sz$1, [0]), + limit, + 0, + 0]; + /*<>*/ } + function clear(t){ + /*<>*/ var + _N_ = t[1].length - 1 - 1 | 0, + /*<>*/ _M_ = 0; + if(_N_ >= 0){ + var i = _M_; + for(;;){ + /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; + /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; + /*<>*/ /*<>*/ var _O_ = i + 1 | 0; + if(_N_ === i) break; + var i = _O_; + } + } + t[3] = limit; + t[4] = 0; + return 0; + /*<>*/ } + function fold(f, t, init){ + /*<>*/ var _K_ = t[1], i = 0; + /*<>*/ function _L_(b, accu$1){ + var i$0 = i, accu = accu$1; + /*<>*/ for(;;){ + if(length(b) <= i$0) /*<>*/ return accu; + /*<>*/ /*<>*/ var + match = get(b, i$0); + if(match) + /*<>*/ var + v = match[1], + /*<>*/ accu$0 = + /*<>*/ caml_call2(f, v, accu), + i$1 = i$0 + 1 | 0, + i$0 = i$1, + accu = accu$0; + else + var i$2 = i$0 + 1 | 0, i$0 = i$2; + } + } + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Array[17], _L_, _K_, init); + /*<>*/ } + function iter(f, t){ + /*<>*/ var _I_ = t[1], i = 0; + /*<>*/ function _J_(b){ + var i$0 = i; + /*<>*/ for(;;){ + if(length(b) <= i$0) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = get(b, i$0); + if(match){ + var v = match[1]; + /*<>*/ /*<>*/ caml_call1(f, v); + var i$1 = i$0 + 1 | 0, i$0 = i$1; + } + else + var i$2 = i$0 + 1 | 0, i$0 = i$2; + } + } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Array[11], _J_, _I_); + /*<>*/ } + function count_bucket(i, b, accu){ + /*<>*/ var i$0 = i, accu$0 = accu; + /*<>*/ for(;;){ + if(length(b) <= i$0) /*<>*/ return accu$0; + /*<>*/ var + /*<>*/ _H_ = check(b, i$0) ? 1 : 0, + accu$1 = accu$0 + _H_ | 0, + i$1 = i$0 + 1 | 0, + i$0 = i$1, + accu$0 = accu$1; + } + /*<>*/ } + function count(t){ + /*<>*/ var + /*<>*/ _B_ = 0, + _C_ = t[1], + _D_ = 0; + /*<>*/ function _E_(_F_, _G_){ + /*<>*/ return count_bucket(_D_, _F_, _G_); + } + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Array[17], _E_, _C_, _B_); + /*<>*/ } + function add_aux(t, setter, d, h, index){ + /*<>*/ var + /*<>*/ bucket$0 = + caml_check_bound(t[1], index)[1 + index], + /*<>*/ hashes = + caml_check_bound(t[2], index)[1 + index], + /*<>*/ sz = length(bucket$0), + i$3 = 0; + /*<>*/ for(;;){ + if(sz <= i$3){ + /*<>*/ /*<>*/ var + newsz = + /*<>*/ caml_call2 + (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); + /*<>*/ var + /*<>*/ newbucket$0 = create(newsz), + /*<>*/ newhashes = + /*<>*/ caml_make_vect(newsz, 0); + /*<>*/ blit(bucket$0, 0, newbucket$0, 0, sz); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Array[8], 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; + /*<>*/ caml_check_bound(t[2], index)[1 + index] = newhashes; + var _x_ = sz <= t[3] ? 1 : 0, _y_ = _x_ ? t[3] < newsz ? 1 : 0 : _x_; + if(_y_){ + t[4] = t[4] + 1 | 0; + var i$4 = 0; + for(;;){ + /*<>*/ var + _n_ = t[5], + /*<>*/ bucket = + caml_check_bound(t[1], _n_)[1 + _n_], + /*<>*/ _o_ = t[5], + /*<>*/ hbucket = + caml_check_bound(t[2], _o_)[1 + _o_], + /*<>*/ len = length(bucket), + prev_len = (((len - 3 | 0) * 2 | 0) + 2 | 0) / 3 | 0, + /*<>*/ live = count_bucket(0, bucket, 0); + if(live <= prev_len){ + /*<>*/ var + /*<>*/ j$2 = length(bucket) - 1 | 0, + i$0 = 0, + j = j$2; + /*<>*/ for(;;){ + if(prev_len > j){ + if(0 === prev_len){ + var _q_ = t[5]; + /*<>*/ caml_check_bound(t[1], _q_)[1 + _q_] = emptybucket; + var _r_ = t[5]; + /*<>*/ caml_check_bound(t[2], _r_)[1 + _r_] = [0]; + } + else{ + /*<>*/ /*<>*/ var + newbucket = create(prev_len); + /*<>*/ blit(bucket, 0, newbucket, 0, prev_len); + var _u_ = t[5]; + /*<>*/ caml_check_bound(t[1], _u_)[1 + _u_] = newbucket; + /*<>*/ var + /*<>*/ _v_ = + /*<>*/ caml_call3 + (Stdlib_Array[5], hbucket, 0, prev_len), + _w_ = t[5]; + /*<>*/ caml_check_bound(t[2], _w_)[1 + _w_] = _v_; + } + var + _s_ = t[3] < len ? 1 : 0, + _t_ = _s_ ? prev_len <= t[3] ? 1 : 0 : _s_; + if(_t_) t[4] = t[4] - 1 | 0; + break; + } + /*<>*/ if(check(bucket, i$0)) + var i$1 = i$0 + 1 | 0, i$0 = i$1; + else if(check(bucket, j)){ + /*<>*/ blit(bucket, j, bucket, i$0, 1); + /*<>*/ /*<>*/ var + _p_ = caml_check_bound(hbucket, j)[1 + j]; + /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _p_; + /*<>*/ var + /*<>*/ j$0 = j - 1 | 0, + i$2 = i$0 + 1 | 0, + i$0 = i$2, + j = j$0; + } + else + /*<>*/ var + /*<>*/ j$1 = j - 1 | 0, + j = j$1; + } + } + t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); + /*<>*/ /*<>*/ var + _A_ = i$4 + 1 | 0; + if(2 === i$4) break; + var i$4 = _A_; + } + } + var _z_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; + if(! _z_) return _z_; + /*<>*/ var + oldlen = t[1].length - 1, + /*<>*/ newlen = + /*<>*/ caml_call2 + (Stdlib_Int[10], + ((3 * oldlen | 0) / 2 | 0) + 3 | 0, + Stdlib_Sys[13]); + if(oldlen < newlen){ + /*<>*/ var + /*<>*/ newt = create$0(newlen), + _l_ = t[1], + i = 0, + /*<>*/ _m_ = + function(j, ob){ + var oi = i; + /*<>*/ for(;;){ + if(length(ob) <= oi) /*<>*/ return 0; + if(check(ob, oi)){ + /*<>*/ var + /*<>*/ oh = caml_check_bound(t[2], j)[1 + j], + setter$0 = + function(oi){ + function setter(nb, ni, param){ + /*<>*/ return blit(ob, oi, nb, ni, 1); + /*<>*/ } + return setter; + }, + setter = setter$0(oi), + /*<>*/ h = caml_check_bound(oh, oi)[1 + oi]; + /*<>*/ add_aux + (newt, setter, 0, h, get_index(newt, h)); + var i$0 = oi + 1 | 0, oi = i$0; + } + else + var i$1 = oi + 1 | 0, oi = i$1; + } + }; + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Array[12], _m_, _l_); + t[1] = newt[1]; + t[2] = newt[2]; + t[3] = newt[3]; + t[4] = newt[4]; + t[5] = caml_mod(t[5], newt[1].length - 1); + return 0; + } + t[3] = Stdlib[19]; + t[4] = 0; + return 0; + } + /*<>*/ if(! check(bucket$0, i$3)){ + /*<>*/ /*<>*/ caml_call3 + (setter, bucket$0, i$3, d); + /*<>*/ caml_check_bound(hashes, i$3)[1 + i$3] = h; + /*<>*/ return 0; + } + /*<>*/ var + /*<>*/ i$5 = i$3 + 1 | 0, + i$3 = i$5; + } + /*<>*/ } + function add(t, d){ + /*<>*/ /*<>*/ var + h = /*<>*/ caml_call1(H[2], d); + /*<>*/ return add_aux + (t, set, [0, d], h, get_index(t, h)); + /*<>*/ } + function find_or(t, d, ifnotfound){ + /*<>*/ var + /*<>*/ h = /*<>*/ caml_call1(H[2], d), + /*<>*/ index = get_index(t, h), + /*<>*/ bucket = + caml_check_bound(t[1], index)[1 + index], + /*<>*/ hashes = + caml_check_bound(t[2], index)[1 + index], + /*<>*/ sz = length(bucket), + i = 0; + /*<>*/ for(;;){ + if(sz <= i) + /*<>*/ return /*<>*/ caml_call2 + (ifnotfound, h, index); + if(h === caml_check_bound(hashes, i)[1 + i]){ + /*<>*/ /*<>*/ var + match = get_copy(bucket, i); + if(match){ + var v = match[1]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], v, d)){ + /*<>*/ /*<>*/ var + match$0 = get(bucket, i); + if(match$0){ + var v$0 = match$0[1]; + /*<>*/ return v$0; + } + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + continue; + } + } + /*<>*/ var + /*<>*/ i$1 = i + 1 | 0, + i = i$1; + } + else + /*<>*/ var + /*<>*/ i$2 = i + 1 | 0, + i = i$2; + } + /*<>*/ } + function merge(t, d){ + /*<>*/ return find_or + (t, + d, + function(h, index){ + /*<>*/ add_aux(t, set, [0, d], h, index); + /*<>*/ return d; + /*<>*/ }); + /*<>*/ } + function find(t, d){ + /*<>*/ return find_or + (t, + d, + function(h, index){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + /*<>*/ }); + /*<>*/ } + function find_opt(t, d){ + /*<>*/ var + /*<>*/ h = /*<>*/ caml_call1(H[2], d), + /*<>*/ index = get_index(t, h), + /*<>*/ bucket = + caml_check_bound(t[1], index)[1 + index], + /*<>*/ hashes = + caml_check_bound(t[2], index)[1 + index], + /*<>*/ sz = length(bucket), + i = 0; + /*<>*/ for(;;){ + if(sz <= i) /*<>*/ return 0; + if(h === caml_check_bound(hashes, i)[1 + i]){ + /*<>*/ /*<>*/ var + match = get_copy(bucket, i); + if(match){ + var v = match[1]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], v, d)){ + /*<>*/ /*<>*/ var + v$0 = get(bucket, i); + if(v$0) /*<>*/ return v$0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + continue; + } + } + /*<>*/ var + /*<>*/ i$1 = i + 1 | 0, + i = i$1; + } + else + /*<>*/ var + /*<>*/ i$2 = i + 1 | 0, + i = i$2; + } + /*<>*/ } + function find_shadow(t, d, iffound, ifnotfound){ + /*<>*/ var + /*<>*/ h = /*<>*/ caml_call1(H[2], d), + /*<>*/ index = get_index(t, h), + /*<>*/ bucket = + caml_check_bound(t[1], index)[1 + index], + /*<>*/ hashes = + caml_check_bound(t[2], index)[1 + index], + /*<>*/ sz = length(bucket), + i = 0; + /*<>*/ for(;;){ + if(sz <= i) return ifnotfound; + if(h === caml_check_bound(hashes, i)[1 + i]){ + /*<>*/ /*<>*/ var + match = get_copy(bucket, i); + if(match){ + var v = match[1]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], v, d)) + /*<>*/ return /*<>*/ caml_call2 + (iffound, bucket, i); + } + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + else + /*<>*/ var + /*<>*/ i$1 = i + 1 | 0, + i = i$1; + } + /*<>*/ } + function remove(t, d){ + /*<>*/ /*<>*/ var _k_ = 0; + /*<>*/ return find_shadow + (t, + d, + function(w, i){ + /*<>*/ return set(w, i, 0); + /*<>*/ }, + _k_); + /*<>*/ } + function mem(t, d){ + /*<>*/ /*<>*/ var _j_ = 0; + /*<>*/ return find_shadow + (t, + d, + function(w, i){ + /*<>*/ return 1; + /*<>*/ }, + _j_); + /*<>*/ } + function find_all(t, d){ + /*<>*/ var + /*<>*/ h = /*<>*/ caml_call1(H[2], d), + /*<>*/ index = get_index(t, h), + /*<>*/ bucket = + caml_check_bound(t[1], index)[1 + index], + /*<>*/ hashes = + caml_check_bound(t[2], index)[1 + index], + /*<>*/ sz = length(bucket), + i = 0, + accu = 0; + /*<>*/ for(;;){ + if(sz <= i) /*<>*/ return accu; + if(h === caml_check_bound(hashes, i)[1 + i]){ + /*<>*/ /*<>*/ var + match = get_copy(bucket, i); + if(match){ + var v = match[1]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], v, d)){ + /*<>*/ /*<>*/ var + match$0 = get(bucket, i); + if(match$0){ + /*<>*/ var + v$0 = match$0[1], + /*<>*/ accu$0 = [0, v$0, accu], + /*<>*/ i$0 = i + 1 | 0, + i = i$0, + accu = accu$0; + continue; + } + var i$1 = i + 1 | 0, i = i$1; + continue; + } + } + var i$2 = i + 1 | 0, i = i$2; + } + else + var i$3 = i + 1 | 0, i = i$3; + } + /*<>*/ } + function stats(t){ + /*<>*/ var + len = t[1].length - 1, + /*<>*/ lens = + /*<>*/ caml_call2(Stdlib_Array[13], length, t[1]); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Array[30], runtime.caml_int_compare, lens); + var _a_ = 0; + function _b_(_i_, _h_){ /*<>*/ return _i_ + _h_ | 0;} + /*<>*/ var + /*<>*/ totlen = + /*<>*/ caml_call3(Stdlib_Array[15], _b_, _a_, lens), + /*<>*/ _c_ = len - 1 | 0, + _e_ = len / 2 | 0, + /*<>*/ _d_ = caml_check_bound(lens, _c_)[1 + _c_], + /*<>*/ _f_ = caml_check_bound(lens, _e_)[1 + _e_], + /*<>*/ _g_ = caml_check_bound(lens, 0)[1]; + /*<>*/ return [0, len, count(t), totlen, _g_, _f_, _d_]; + /*<>*/ } + /*<>*/ return [0, + create$0, + clear, + merge, + add, + remove, + find, + find_opt, + find_all, + mem, + iter, + fold, + count, + stats]; + } + var + Stdlib_Weak = + [0, create, length, set, get, get_copy, check, fill, blit, Make]; + runtime.caml_register_global(13, Stdlib_Weak, "Stdlib__Weak"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Format +//# unitInfo: Requires: CamlinternalFormat, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Domain, Stdlib__Int, Stdlib__List, Stdlib__Queue, Stdlib__Stack, Stdlib__String +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst$16 = "", + cst$15 = ">", + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_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]); + } + var + global_data = runtime.caml_get_global_data(), + cst$14 = ".", + cst$11 = cst$15, + cst$12 = "<\/", + cst$13 = cst$16, + cst$8 = cst$15, + cst$9 = "<", + cst$10 = cst$16, + cst$7 = "\n", + cst$3 = cst$16, + cst$4 = cst$16, + cst$5 = cst$16, + cst$6 = cst$16, + cst = cst$16, + cst$0 = cst$16, + cst$1 = cst$16, + cst$2 = cst$16, + Stdlib_Queue = global_data.Stdlib__Queue, + CamlinternalFormat = global_data.CamlinternalFormat, + Stdlib = global_data.Stdlib, + Stdlib_String = global_data.Stdlib__String, + Stdlib_Domain = global_data.Stdlib__Domain, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_List = global_data.Stdlib__List, + Stdlib_Stack = global_data.Stdlib__Stack, + Stdlib_Int = global_data.Stdlib__Int, + Stdlib_Bytes = global_data.Stdlib__Bytes, + _f_ = [3, 0, 3], + cst_Format_pp_set_geometry = "Format.pp_set_geometry: ", + _e_ = [1, "max_indent < 2"], + _c_ = [1, "margin <= max_indent"], + _d_ = [0, 0], + _b_ = [0, cst$16], + _a_ = [0, cst$16, 0, cst$16], + cst_Stdlib_Format_String_tag = "Stdlib.Format.String_tag"; + function id(x){ /*<>*/ return x; /*<>*/ } + /*<>*/ var + /*<>*/ String_tag = + [248, cst_Stdlib_Format_String_tag, runtime.caml_fresh_oo_id(0)], + zero = 0, + unknown = -1; + function pp_enqueue(state, token){ + /*<>*/ state[13] = state[13] + token[3] | 0; + return caml_call2(Stdlib_Queue[3], token, state[28]); + /*<>*/ } + var pp_infinity = 1000000010; + function pp_output_string(state, s){ + /*<>*/ return caml_call3 + (state[17], s, 0, caml_ml_string_length(s)); + /*<>*/ } + function pp_output_newline(state){ + /*<>*/ return /*<>*/ caml_call1 + (state[19], 0); + /*<>*/ } + function format_pp_text(state, size, text){ + /*<>*/ state[9] = state[9] - size | 0; + /*<>*/ pp_output_string(state, text); + state[11] = 0; + return 0; + /*<>*/ } + function format_string(state, s){ + /*<>*/ /*<>*/ var + _bQ_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); + /*<>*/ return _bQ_ + ? format_pp_text(state, caml_ml_string_length(s), s) + : _bQ_; + /*<>*/ } + function break_new_line(state, param, width){ + var after = param[3], offset = param[2], before = param[1]; + /*<>*/ format_string(state, before); + /*<>*/ pp_output_newline(state); + state[11] = 1; + /*<>*/ var + indent = (state[6] - width | 0) + offset | 0, + /*<>*/ real_indent = + /*<>*/ caml_call2(Stdlib_Int[10], state[8], indent); + state[10] = real_indent; + state[9] = state[6] - state[10] | 0; + var n = state[10]; + /*<>*/ /*<>*/ caml_call1 + (state[21], n); + /*<>*/ return format_string(state, after); + } + function break_line(state, width){ + /*<>*/ return break_new_line(state, _a_, width); + /*<>*/ } + function break_same_line(state, param){ + var after = param[3], width = param[2], before = param[1]; + /*<>*/ format_string(state, before); + state[9] = state[9] - width | 0; + /*<>*/ /*<>*/ caml_call1 + (state[20], width); + /*<>*/ return format_string(state, after); + } + function format_pp_token(state, size$0, param){ + /*<>*/ if(typeof param === "number") + switch(param){ + case 0: + /*<>*/ /*<>*/ var + match$3 = + /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); + if(! match$3) /*<>*/ return 0; + /*<>*/ var + tabs = match$3[1][1], + /*<>*/ add_tab = + function(n, ls){ + /*<>*/ if(! ls) /*<>*/ return [0, n, 0]; + var l = ls[2], x = ls[1]; + /*<>*/ return /*<>*/ runtime.caml_lessthan + (n, x) + ? [0, n, ls] + : [0, x, add_tab(n, l)]; + }; + tabs[1] = add_tab(state[6] - state[9] | 0, tabs[1]); + return 0; + case 1: + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[5], state[2]); + /*<>*/ return 0; + case 2: + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[5], state[3]); + /*<>*/ return 0; + case 3: + /*<>*/ /*<>*/ var + match$4 = + /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); + if(! match$4) + /*<>*/ return pp_output_newline(state); + var width$0 = match$4[1][2]; + /*<>*/ return break_line(state, width$0); + case 4: + var _bO_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; + if(! _bO_) return _bO_; + /*<>*/ /*<>*/ var + match$1 = + /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); + if(! match$1) /*<>*/ return 0; + var match$2 = match$1[1], size = match$2[1], length = match$2[3]; + state[12] = state[12] - length | 0; + state[9] = state[9] + size | 0; + return 0; + default: + /*<>*/ /*<>*/ var + match$5 = + /*<>*/ caml_call1(Stdlib_Stack[5], state[5]); + if(! match$5) /*<>*/ return 0; + /*<>*/ var + tag_name = match$5[1], + /*<>*/ marker = + /*<>*/ caml_call1(state[25], tag_name); + /*<>*/ return pp_output_string(state, marker); + } + switch(param[0]){ + case 0: + var s = param[1]; + /*<>*/ return format_pp_text(state, size$0, s); + case 1: + /*<>*/ var + breaks = param[2], + fits = param[1], + /*<>*/ off = breaks[2], + before = breaks[1], + /*<>*/ match$6 = + /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); + if(! match$6) /*<>*/ return 0; + var + match$7 = match$6[1], + width$1 = match$7[2], + box_type$0 = match$7[1]; + /*<>*/ switch(box_type$0){ + case 0: + /*<>*/ return break_same_line(state, fits); + case 1: + /*<>*/ return break_new_line + (state, breaks, width$1); + case 2: + /*<>*/ return break_new_line + (state, breaks, width$1); + case 3: + return state[9] < (size$0 + caml_ml_string_length(before) | 0) + ? break_new_line(state, breaks, width$1) + : break_same_line(state, fits); + case 4: + return state[11] + ? break_same_line(state, fits) + : state + [9] + < (size$0 + caml_ml_string_length(before) | 0) + ? break_new_line(state, breaks, width$1) + : ((state + [6] + - width$1 + | 0) + + off + | 0) + < state[10] + ? break_new_line(state, breaks, width$1) + : break_same_line(state, fits); + default: + /*<>*/ return break_same_line(state, fits); + } + case 2: + /*<>*/ var + off$0 = param[2], + n = param[1], + insertion_point = state[6] - state[9] | 0, + /*<>*/ match$8 = + /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); + if(! match$8) /*<>*/ return 0; + /*<>*/ var + tabs$0 = match$8[1][1], + /*<>*/ match$9 = tabs$0[1]; + if(match$9){ + var first = match$9[1], param$0 = tabs$0[1]; + /*<>*/ for(;;){ + if(param$0){ + var tail = param$0[2], head = param$0[1]; + if(insertion_point > head){var param$0 = tail; continue;} + var _bP_ = head; + } + else + var _bP_ = first; + var tab = _bP_; + break; + } + } + else + var tab = insertion_point; + var offset = tab - insertion_point | 0; + /*<>*/ return 0 <= offset + ? break_same_line(state, [0, cst$0, offset + n | 0, cst]) + : break_new_line + (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]); + case 3: + var + ty = param[2], + off$1 = param[1], + insertion_point$0 = state[6] - state[9] | 0; + if(state[8] < insertion_point$0){ + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); + if(match){ + var match$0 = match[1], width = match$0[2], box_type = match$0[1]; + if(state[9] < width && 3 >= box_type - 1 >>> 0) + /*<>*/ break_line(state, width); + } + else + /*<>*/ pp_output_newline(state); + } + /*<>*/ var + 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]); + case 4: + var tbox = param[1]; + /*<>*/ return /*<>*/ caml_call2 + (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]); + } + } + function advance_left(state){ + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(Stdlib_Queue[9], state[28]); + if(! match) /*<>*/ return 0; + /*<>*/ var + match$0 = match[1], + size = match$0[1], + length = match$0[3], + token = match$0[2], + pending_count = state[13] - state[12] | 0, + /*<>*/ _bM_ = 0 <= size ? 1 : 0, + /*<>*/ _bN_ = + _bM_ || (state[9] <= pending_count ? 1 : 0); + if(! _bN_) /*<>*/ return _bN_; + /*<>*/ /*<>*/ caml_call1 + (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; + } + /*<>*/ } + function enqueue_advance(state, tok){ + /*<>*/ pp_enqueue(state, tok); + /*<>*/ return advance_left(state); + /*<>*/ } + function enqueue_string_as(state, size, s){ + /*<>*/ return enqueue_advance + (state, [0, size, [0, s], size]); + /*<>*/ } + function initialize_scan_stack(stack){ + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[8], stack); + /*<>*/ /*<>*/ var + queue_elem = [0, unknown, _b_, 0]; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Stack[3], [0, -1, queue_elem], stack); + /*<>*/ } + function set_size(state, ty){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(Stdlib_Stack[7], state[1]); + if(! match) /*<>*/ return 0; + /*<>*/ var + match$0 = match[1], + queue_elem = match$0[2], + left_total = match$0[1], + /*<>*/ size = queue_elem[1]; + if(left_total < state[12]) return initialize_scan_stack(state[1]); + var _bI_ = queue_elem[2]; + if(typeof _bI_ !== "number") + switch(_bI_[0]){ + case 3: + var + _bK_ = 1 - ty, + _bL_ = + _bK_ + ? (queue_elem + [1] + = state[13] + size | 0, + /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), + 0) + : _bK_; + /*<>*/ return _bL_; + case 1: + case 2: + var + _bJ_ = + ty + ? (queue_elem + [1] + = state[13] + size | 0, + /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), + 0) + : ty; + /*<>*/ return _bJ_; + } + /*<>*/ return 0; + /*<>*/ } + function scan_push(state, b, token){ + /*<>*/ pp_enqueue(state, token); + if(b) /*<>*/ set_size(state, 1); + /*<>*/ /*<>*/ var + elem = [0, state[13], token]; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Stack[3], elem, state[1]); + /*<>*/ } + function pp_open_box_gen(state, indent, br_ty){ + /*<>*/ state[14] = state[14] + 1 | 0; + if(state[14] < state[15]){ + /*<>*/ var + size = - state[13] | 0, + /*<>*/ elem = [0, size, [3, indent, br_ty], 0]; + /*<>*/ return scan_push(state, 0, elem); + } + var _bH_ = state[14] === state[15] ? 1 : 0; + if(! _bH_) return _bH_; + var s = state[16]; + /*<>*/ return enqueue_string_as + (state, caml_ml_string_length(s), s); + /*<>*/ } + function pp_close_box(state, param){ + /*<>*/ var _bF_ = 1 < state[14] ? 1 : 0; + if(_bF_){ + 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 _bG_ = 0; + } + else + var _bG_ = _bF_; + return _bG_; + /*<>*/ } + function pp_open_stag(state, tag_name){ + /*<>*/ if(state[22]){ + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Stack[3], tag_name, state[4]); + /*<>*/ /*<>*/ caml_call1 + (state[26], tag_name); + } + var _bE_ = state[23]; + if(! _bE_) return _bE_; + /*<>*/ /*<>*/ 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 _bC_ = state[22]; + if(_bC_){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(Stdlib_Stack[5], state[4]); + if(match){ + var tag_name = match[1]; + /*<>*/ return /*<>*/ caml_call1 + (state[27], tag_name); + } + var _bD_ = 0; + } + else + var _bD_ = _bC_; + /*<>*/ return _bD_; + /*<>*/ } + function pp_set_print_tags(state, b){ + /*<>*/ state[22] = b; + return 0; + /*<>*/ } + function pp_set_mark_tags(state, b){ + /*<>*/ state[23] = b; + return 0; + /*<>*/ } + function pp_get_print_tags(state, param){ + /*<>*/ return state[22]; + /*<>*/ } + function pp_get_mark_tags(state, param){ + /*<>*/ return state[23]; + /*<>*/ } + function pp_set_tags(state, b){ + /*<>*/ pp_set_print_tags(state, b); + /*<>*/ return pp_set_mark_tags(state, b); + /*<>*/ } + function pp_get_formatter_stag_function(state, param){ + /*<>*/ return [0, + state[24], + state[25], + state[26], + state[27]]; + /*<>*/ } + function pp_set_formatter_stag_function(state, param){ + var pct = param[4], pot = param[3], mct = param[2], mot = param[1]; + state[24] = mot; + state[25] = mct; + state[26] = pot; + state[27] = pct; + return 0; + } + function pp_rinit(state){ + /*<>*/ state[12] = 1; + state[13] = 1; + caml_call1(Stdlib_Queue[11], state[28]); + /*<>*/ initialize_scan_stack(state[1]); + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[8], state[2]); + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[8], state[3]); + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[8], state[4]); + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[8], 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, b){ + /*<>*/ var _bA_ = state[4]; + function _bB_(param){ + /*<>*/ return pp_close_stag(state, 0); + /*<>*/ } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Stack[12], _bB_, _bA_); + /*<>*/ for(;;){ + if(1 >= state[14]){ + state[13] = pp_infinity; + /*<>*/ advance_left(state); + if(b) /*<>*/ pp_output_newline(state); + /*<>*/ return pp_rinit(state); + } + /*<>*/ pp_close_box(state, 0); + } + /*<>*/ } + function pp_print_as_size(state, size, s){ + /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; + return _bz_ ? enqueue_string_as(state, size, s) : _bz_; + /*<>*/ } + function pp_print_as(state, isize, s){ + /*<>*/ return pp_print_as_size(state, isize, s); + /*<>*/ } + function pp_print_string(state, s){ + /*<>*/ return pp_print_as + (state, caml_ml_string_length(s), s); + /*<>*/ } + function pp_print_bytes(state, s){ + /*<>*/ return pp_print_as + (state, + runtime.caml_ml_bytes_length(s), + /*<>*/ caml_call1(Stdlib_Bytes[6], s)); + /*<>*/ } + function pp_print_int(state, i){ + /*<>*/ return pp_print_string + (state, /*<>*/ caml_call1(Stdlib_Int[12], i)); + /*<>*/ } + function pp_print_float(state, f){ + /*<>*/ return pp_print_string + (state, /*<>*/ caml_call1(Stdlib[35], f)); + /*<>*/ } + function pp_print_bool(state, b){ + /*<>*/ return pp_print_string + (state, /*<>*/ caml_call1(Stdlib[30], b)); + /*<>*/ } + function pp_print_char(state, c){ + /*<>*/ return pp_print_as + (state, + 1, + /*<>*/ caml_call2(Stdlib_String[1], 1, c)); + /*<>*/ } + function pp_open_hbox(state, param){ + /*<>*/ return pp_open_box_gen(state, 0, 0); + /*<>*/ } + function pp_open_vbox(state, indent){ + /*<>*/ return pp_open_box_gen(state, indent, 1); + /*<>*/ } + function pp_open_hvbox(state, indent){ + /*<>*/ return pp_open_box_gen(state, indent, 2); + /*<>*/ } + function pp_open_hovbox(state, indent){ + /*<>*/ return pp_open_box_gen(state, indent, 3); + /*<>*/ } + function pp_open_box(state, indent){ + /*<>*/ return pp_open_box_gen(state, indent, 4); + /*<>*/ } + function pp_print_newline(state, param){ + /*<>*/ pp_flush_queue(state, 1); + /*<>*/ return /*<>*/ caml_call1 + (state[18], 0); + /*<>*/ } + function pp_print_flush(state, param){ + /*<>*/ pp_flush_queue(state, 0); + /*<>*/ return /*<>*/ caml_call1 + (state[18], 0); + /*<>*/ } + function pp_force_newline(state, param){ + /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; + return _by_ ? enqueue_advance(state, [0, zero, 3, 0]) : _by_; + /*<>*/ } + function pp_print_if_newline(state, param){ + /*<>*/ var _bx_ = state[14] < state[15] ? 1 : 0; + return _bx_ ? enqueue_advance(state, [0, zero, 4, 0]) : _bx_; + /*<>*/ } + function pp_print_custom_break(state, fits, breaks){ + /*<>*/ var + after = fits[3], + width = fits[2], + before = fits[1], + _bw_ = state[14] < state[15] ? 1 : 0; + if(! _bw_) return _bw_; + /*<>*/ var + size = - state[13] | 0, + /*<>*/ token = [1, fits, breaks], + length = + (caml_ml_string_length(before) + width | 0) + + /*<>*/ caml_ml_string_length(after) + | 0, + /*<>*/ elem = [0, size, token, length]; + /*<>*/ return scan_push(state, 1, elem); + /*<>*/ } + function pp_print_break(state, width, offset){ + /*<>*/ return pp_print_custom_break + (state, [0, cst$6, width, cst$5], [0, cst$4, offset, cst$3]); + /*<>*/ } + function pp_print_space(state, param){ + /*<>*/ return pp_print_break(state, 1, 0); + /*<>*/ } + function pp_print_cut(state, param){ + /*<>*/ return pp_print_break(state, 0, 0); + /*<>*/ } + function pp_open_tbox(state, param){ + /*<>*/ state[14] = state[14] + 1 | 0; + var _bv_ = state[14] < state[15] ? 1 : 0; + if(! _bv_) return _bv_; + /*<>*/ /*<>*/ var + elem = [0, zero, [4, [0, [0, 0]]], 0]; + /*<>*/ return enqueue_advance(state, elem); + /*<>*/ } + function pp_close_tbox(state, param){ + /*<>*/ var _bs_ = 1 < state[14] ? 1 : 0; + if(_bs_){ + var _bt_ = state[14] < state[15] ? 1 : 0; + if(_bt_){ + /*<>*/ /*<>*/ var + elem = [0, zero, 2, 0]; + /*<>*/ enqueue_advance(state, elem); + state[14] = state[14] - 1 | 0; + var _bu_ = 0; + } + else + var _bu_ = _bt_; + } + else + var _bu_ = _bs_; + return _bu_; + /*<>*/ } + function pp_print_tbreak(state, width, offset){ + /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; + if(! _br_) return _br_; + /*<>*/ var + size = - state[13] | 0, + /*<>*/ elem = [0, size, [2, width, offset], width]; + /*<>*/ return scan_push(state, 1, elem); + /*<>*/ } + function pp_print_tab(state, param){ + /*<>*/ return pp_print_tbreak(state, 0, 0); + /*<>*/ } + function pp_set_tab(state, param){ + /*<>*/ var _bq_ = state[14] < state[15] ? 1 : 0; + if(! _bq_) return _bq_; + /*<>*/ /*<>*/ var + elem = [0, zero, 0, 0]; + /*<>*/ return enqueue_advance(state, elem); + /*<>*/ } + function pp_set_max_boxes(state, n){ + /*<>*/ var + _bo_ = 1 < n ? 1 : 0, + _bp_ = _bo_ ? (state[15] = n, 0) : _bo_; + return _bp_; + /*<>*/ } + function pp_get_max_boxes(state, param){ + /*<>*/ return state[15]; + /*<>*/ } + function pp_over_max_boxes(state, param){ + /*<>*/ return state[14] === state[15] ? 1 : 0; + /*<>*/ } + function pp_set_ellipsis_text(state, s){ + /*<>*/ state[16] = s; + return 0; + /*<>*/ } + function pp_get_ellipsis_text(state, param){ + /*<>*/ return state[16]; + /*<>*/ } + function pp_limit(n){ + /*<>*/ return n < 1000000010 ? n : 1000000009; + /*<>*/ } + function pp_set_max_indent(state, n$0){ + /*<>*/ var _bn_ = 1 < n$0 ? 1 : 0; + if(! _bn_) return _bn_; + var n$1 = state[6] - n$0 | 0, _bm_ = 1 <= n$1 ? 1 : 0; + if(! _bm_) return _bm_; + /*<>*/ /*<>*/ var n = pp_limit(n$1); + state[7] = n; + state[8] = state[6] - state[7] | 0; + /*<>*/ return pp_rinit(state); + /*<>*/ } + function pp_get_max_indent(state, param){ + /*<>*/ return state[8]; + /*<>*/ } + function pp_set_margin(state, n){ + /*<>*/ var _bk_ = 1 <= n ? 1 : 0; + if(! _bk_) return _bk_; + /*<>*/ /*<>*/ var n$0 = pp_limit(n); + state[6] = n$0; + if(state[8] <= state[6]) + var new_max_indent = state[8]; + else + /*<>*/ var + /*<>*/ _bl_ = + /*<>*/ caml_call2 + (Stdlib_Int[11], state[6] - state[7] | 0, state[6] / 2 | 0), + new_max_indent = + /*<>*/ caml_call2(Stdlib_Int[11], _bl_, 1); + /*<>*/ return pp_set_max_indent(state, new_max_indent); + /*<>*/ } + function validate_geometry(param){ + var margin = param[2], max_indent = param[1]; + /*<>*/ return 2 <= max_indent + ? margin <= max_indent ? _c_ : _d_ + : _e_; + } + function check_geometry(geometry){ + /*<>*/ return 0 === validate_geometry(geometry)[0] + ? 1 + : 0; + /*<>*/ } + function pp_get_margin(state, param){ + /*<>*/ return state[6]; + /*<>*/ } + function pp_set_full_geometry(state, param){ + var margin = param[2], max_indent = param[1]; + /*<>*/ pp_set_margin(state, margin); + /*<>*/ pp_set_max_indent(state, max_indent); + /*<>*/ return 0; + } + function pp_set_geometry(state, max_indent, margin){ + /*<>*/ var + /*<>*/ geometry = [0, max_indent, margin], + /*<>*/ match = validate_geometry(geometry); + if(0 === match[0]) + /*<>*/ return pp_set_full_geometry(state, geometry); + /*<>*/ var + msg = match[1], + /*<>*/ _bj_ = + /*<>*/ caml_call2 + (Stdlib[28], cst_Format_pp_set_geometry, msg); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stdlib[6], _bj_], 1); + /*<>*/ } + function pp_safe_set_geometry(state, max_indent, margin){ + /*<>*/ /*<>*/ var + geometry = [0, max_indent, margin]; + return 0 === validate_geometry(geometry)[0] + ? pp_set_full_geometry(state, geometry) + : 0; + /*<>*/ } + function pp_get_geometry(state, param){ + /*<>*/ return [0, state[8], state[6]]; + /*<>*/ } + function pp_update_geometry(state, update){ + /*<>*/ /*<>*/ var + geometry = pp_get_geometry(state, 0); + /*<>*/ return pp_set_full_geometry + (state, /*<>*/ caml_call1(update, geometry)); + /*<>*/ } + function pp_set_formatter_out_functions(state, param){ + var j = param[5], i = param[4], h = param[3], g = param[2], f = param[1]; + state[17] = f; + state[18] = g; + state[19] = h; + state[20] = i; + state[21] = j; + return 0; + } + function pp_get_formatter_out_functions(state, param){ + /*<>*/ return [0, + state[17], + state[18], + state[19], + state[20], + state[21]]; + /*<>*/ } + function pp_set_formatter_output_functi(state, f, g){ + /*<>*/ state[17] = f; + state[18] = g; + return 0; + /*<>*/ } + function pp_get_formatter_output_functi(state, param){ + /*<>*/ return [0, state[17], state[18]]; + /*<>*/ } + function display_newline(state, param){ + /*<>*/ return /*<>*/ caml_call3 + (state[17], cst$7, 0, 1); + /*<>*/ } + /*<>*/ /*<>*/ var + blank_line = + /*<>*/ caml_call2(Stdlib_String[1], 80, 32); + function display_blanks(state, n){ + /*<>*/ var n$0 = n; + /*<>*/ for(;;){ + var _bi_ = 0 < n$0 ? 1 : 0; + if(! _bi_) return _bi_; + if(80 >= n$0) + /*<>*/ return /*<>*/ caml_call3 + (state[17], blank_line, 0, n$0); + /*<>*/ /*<>*/ caml_call3 + (state[17], blank_line, 0, 80); + /*<>*/ var + /*<>*/ n$1 = n$0 - 80 | 0, + n$0 = n$1; + } + /*<>*/ } + function pp_set_formatter_out_channel(state, oc){ + /*<>*/ state[17] = + /*<>*/ caml_call1(Stdlib[69], oc); + state[18] = + function(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[63], oc); + /*<>*/ }; + state[19] = + function(_bh_){ /*<>*/ return display_newline(state, _bh_);}; + state[20] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; + state[21] = function(_bf_){ /*<>*/ return display_blanks(state, _bf_);}; + return 0; + /*<>*/ } + function default_pp_mark_open_tag(param){ + /*<>*/ if(param[1] !== String_tag) + /*<>*/ return cst$10; + /*<>*/ var + s = param[2], + /*<>*/ _be_ = + /*<>*/ caml_call2(Stdlib[28], s, cst$8); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], cst$9, _be_); + /*<>*/ } + function default_pp_mark_close_tag(param){ + /*<>*/ if(param[1] !== String_tag) + /*<>*/ return cst$13; + /*<>*/ var + s = param[2], + /*<>*/ _bd_ = + /*<>*/ caml_call2(Stdlib[28], s, cst$11); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], cst$12, _bd_); + /*<>*/ } + function default_pp_print_open_tag(_bc_){ /*<>*/ return 0;} + function default_pp_print_close_tag(_bb_){ /*<>*/ return 0;} + function pp_make_formatter(f, g, h, i, j){ + /*<>*/ var + /*<>*/ pp_queue = + /*<>*/ caml_call1(Stdlib_Queue[2], 0), + /*<>*/ sys_tok = [0, unknown, _f_, 0]; + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Queue[3], sys_tok, pp_queue); + /*<>*/ /*<>*/ var + scan_stack = /*<>*/ caml_call1(Stdlib_Stack[2], 0); + /*<>*/ initialize_scan_stack(scan_stack); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Stack[3], [0, 1, sys_tok], scan_stack); + /*<>*/ var + _a9_ = Stdlib[19], + /*<>*/ _a__ = + /*<>*/ caml_call1(Stdlib_Stack[2], 0), + /*<>*/ _a$_ = + /*<>*/ caml_call1(Stdlib_Stack[2], 0), + /*<>*/ _ba_ = + /*<>*/ caml_call1(Stdlib_Stack[2], 0); + /*<>*/ return [0, + scan_stack, + /*<>*/ caml_call1(Stdlib_Stack[2], 0), + _ba_, + _a$_, + _a__, + 78, + 10, + 68, + 78, + 0, + 1, + 1, + 1, + 1, + _a9_, + cst$14, + f, + g, + h, + i, + j, + 0, + 0, + default_pp_mark_open_tag, + default_pp_mark_close_tag, + default_pp_print_open_tag, + default_pp_print_close_tag, + pp_queue]; + } + function formatter_of_out_functions(out_funs){ + /*<>*/ return pp_make_formatter + (out_funs[1], out_funs[2], out_funs[3], out_funs[4], out_funs[5]); + /*<>*/ } + function make_formatter(output, flush){ + function _a1_(_a8_){ /*<>*/ return 0;} + function _a2_(_a7_){ /*<>*/ return 0;} + /*<>*/ /*<>*/ var + ppf = + pp_make_formatter + (output, flush, function(_a6_){ /*<>*/ return 0;}, _a2_, _a1_); + ppf[19] = function(_a5_){ /*<>*/ return display_newline(ppf, _a5_);}; + ppf[20] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; + ppf[21] = function(_a3_){ /*<>*/ return display_blanks(ppf, _a3_);}; + /*<>*/ return ppf; + /*<>*/ } + function formatter_of_out_channel(oc){ + function _a0_(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[63], oc); + /*<>*/ } + /*<>*/ return make_formatter + ( /*<>*/ caml_call1(Stdlib[69], oc), _a0_); + /*<>*/ } + function formatter_of_buffer(b){ + /*<>*/ function _aY_(_aZ_){ /*<>*/ return 0;} + /*<>*/ return make_formatter + ( /*<>*/ caml_call1(Stdlib_Buffer[18], b), + _aY_); + /*<>*/ } + var pp_buffer_size = 512; + function pp_make_buffer(param){ + /*<>*/ return caml_call1 + (Stdlib_Buffer[1], pp_buffer_size); + /*<>*/ } + /*<>*/ var + /*<>*/ stdbuf = pp_make_buffer(0), + /*<>*/ std_formatter = + formatter_of_out_channel(Stdlib[39]), + /*<>*/ err_formatter = + 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); + function _g_(param){ + /*<>*/ return formatter_of_buffer + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], stdbuf_key)); + /*<>*/ } + /*<>*/ /*<>*/ var + str_formatter_key = + /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _g_); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Domain[10][3], str_formatter_key, str_formatter); + /*<>*/ function buffered_out_string(key, str, ofs, len){ + /*<>*/ /*<>*/ var + _aX_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); + /*<>*/ return /*<>*/ caml_call4 + (Stdlib_Buffer[18], _aX_, 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); + /*<>*/ } + function _h_(param){ + /*<>*/ return caml_call1 + (Stdlib_Buffer[1], pp_buffer_size); + /*<>*/ } + /*<>*/ /*<>*/ var + std_buf_key = + /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _h_); + function _i_(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Buffer[1], pp_buffer_size); + /*<>*/ } + /*<>*/ /*<>*/ var + err_buf_key = + /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _i_); + function _j_(param){ + function _aG_(_aW_){ /*<>*/ return 0;} + function _aH_(_aV_){ /*<>*/ return 0;} + function _aI_(_aU_){ /*<>*/ return 0;} + var _aJ_ = Stdlib[39]; + /*<>*/ function _aK_(_aT_){ + /*<>*/ return buffered_out_flush(_aJ_, std_buf_key, _aT_); + } + /*<>*/ /*<>*/ var + ppf = + pp_make_formatter + (function(_aQ_, _aR_, _aS_){ + /*<>*/ return buffered_out_string(std_buf_key, _aQ_, _aR_, _aS_); + }, + _aK_, + _aI_, + _aH_, + _aG_); + ppf[19] = function(_aP_){ /*<>*/ return display_newline(ppf, _aP_);}; + ppf[20] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; + ppf[21] = function(_aN_){ /*<>*/ return display_blanks(ppf, _aN_);}; + /*<>*/ function _aL_(_aM_){ + /*<>*/ return pp_print_flush(ppf, _aM_); + } + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Domain[6], _aL_); + /*<>*/ return ppf; + /*<>*/ } + /*<>*/ /*<>*/ var + std_formatter_key = + /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _j_); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Domain[10][3], std_formatter_key, std_formatter); + function _k_(param){ + function _ap_(_aF_){ /*<>*/ return 0;} + function _aq_(_aE_){ /*<>*/ return 0;} + function _ar_(_aD_){ /*<>*/ return 0;} + var _as_ = Stdlib[40]; + /*<>*/ function _at_(_aC_){ + /*<>*/ return buffered_out_flush(_as_, err_buf_key, _aC_); + } + /*<>*/ /*<>*/ var + ppf = + pp_make_formatter + (function(_az_, _aA_, _aB_){ + /*<>*/ return buffered_out_string(err_buf_key, _az_, _aA_, _aB_); + }, + _at_, + _ar_, + _aq_, + _ap_); + ppf[19] = function(_ay_){ /*<>*/ return display_newline(ppf, _ay_);}; + ppf[20] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; + ppf[21] = function(_aw_){ /*<>*/ return display_blanks(ppf, _aw_);}; + /*<>*/ function _au_(_av_){ + /*<>*/ return pp_print_flush(ppf, _av_); + } + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Domain[6], _au_); + /*<>*/ return ppf; + /*<>*/ } + /*<>*/ /*<>*/ var + err_formatter_key = + /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _k_); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Domain[10][3], err_formatter_key, err_formatter); + function get_std_formatter(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key); + /*<>*/ } + function get_err_formatter(param){ + /*<>*/ return caml_call1 + (Stdlib_Domain[10][2], err_formatter_key); + /*<>*/ } + function get_str_formatter(param){ + /*<>*/ return caml_call1 + (Stdlib_Domain[10][2], str_formatter_key); + /*<>*/ } + function get_stdbuf(param){ + /*<>*/ return caml_call1 + (Stdlib_Domain[10][2], stdbuf_key); + /*<>*/ } + 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); + /*<>*/ return s; + /*<>*/ } + function flush_str_formatter(param){ + /*<>*/ var + /*<>*/ stdbuf = + /*<>*/ caml_call1(Stdlib_Domain[10][2], stdbuf_key), + /*<>*/ str_formatter = + /*<>*/ caml_call1 + (Stdlib_Domain[10][2], str_formatter_key); + /*<>*/ return flush_buffer_formatter + (stdbuf, str_formatter); + /*<>*/ } + function make_synchronized_formatter(output, flush){ + function _an_(param){ + /*<>*/ var + /*<>*/ buf = + /*<>*/ caml_call1 + (Stdlib_Buffer[1], pp_buffer_size), + /*<>*/ output$0 = + /*<>*/ caml_call1(Stdlib_Buffer[18], buf); + function flush$0(param){ + /*<>*/ /*<>*/ var + _ao_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); + /*<>*/ /*<>*/ caml_call3 + (output, + /*<>*/ caml_call1(Stdlib_Buffer[2], buf), + 0, + _ao_); + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Buffer[8], buf); + /*<>*/ return /*<>*/ caml_call1 + (flush, 0); + /*<>*/ } + /*<>*/ return make_formatter(output$0, flush$0); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Domain[10][1], 0, _an_); + /*<>*/ } + function synchronized_formatter_of_out_(oc){ + function _am_(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[63], oc); + /*<>*/ } + /*<>*/ return make_synchronized_formatter + ( /*<>*/ caml_call1(Stdlib[69], oc), _am_); + /*<>*/ } + function make_symbolic_output_buffer(param){ /*<>*/ return [0, 0]; + /*<>*/ } + function clear_symbolic_output_buffer(sob){ + /*<>*/ sob[1] = 0; + return 0; + /*<>*/ } + function get_symbolic_output_buffer(sob){ + /*<>*/ return caml_call1(Stdlib_List[9], sob[1]); + /*<>*/ } + function flush_symbolic_output_buffer(sob){ + /*<>*/ /*<>*/ var + items = get_symbolic_output_buffer(sob); + /*<>*/ clear_symbolic_output_buffer(sob); + /*<>*/ return items; + /*<>*/ } + function add_symbolic_output_item(sob, item){ + /*<>*/ sob[1] = [0, item, sob[1]]; + return 0; + /*<>*/ } + function formatter_of_symbolic_output_b(sob){ + /*<>*/ function f(s, i, n){ + /*<>*/ return add_symbolic_output_item + (sob, + [0, + /*<>*/ caml_call3 + (Stdlib_String[15], s, i, n)]); + } + /*<>*/ function g(_al_){ + /*<>*/ return add_symbolic_output_item(sob, 0); + } + /*<>*/ function h(_ak_){ + /*<>*/ return add_symbolic_output_item(sob, 1); + } + /*<>*/ function i(n){ + /*<>*/ return add_symbolic_output_item(sob, [1, n]); + } + /*<>*/ function j(n){ + /*<>*/ return add_symbolic_output_item(sob, [2, n]); + } + /*<>*/ return pp_make_formatter(f, g, h, i, j); + /*<>*/ } + function open_hbox(v){ + /*<>*/ return pp_open_hbox + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function open_hvbox(v){ + /*<>*/ return pp_open_hvbox + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function open_box(v){ + /*<>*/ return pp_open_box + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function open_stag(v){ + /*<>*/ return pp_open_stag + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function print_as(v, w){ + /*<>*/ return pp_print_as + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key), + v, + w); + /*<>*/ } + function print_string(v){ + /*<>*/ return pp_print_string + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function print_int(v){ + /*<>*/ return pp_print_int + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function print_char(v){ + /*<>*/ return pp_print_char + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function print_break(v, w){ + /*<>*/ return pp_print_break + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function print_space(v){ + /*<>*/ return pp_print_space + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function print_flush(v){ + /*<>*/ return pp_print_flush + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function print_if_newline(v){ + /*<>*/ return pp_print_if_newline + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function close_tbox(v){ + /*<>*/ return pp_close_tbox + ( /*<>*/ caml_call1 + (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), + v, + w); + /*<>*/ } + function set_tab(v){ + /*<>*/ return pp_set_tab + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function set_margin(v){ + /*<>*/ return pp_set_margin + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key), + v); + /*<>*/ } + function get_margin(v){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key) + [6]; + /*<>*/ } + function set_max_indent(v){ + /*<>*/ return pp_set_max_indent + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key), + v); + /*<>*/ } + function get_max_indent(v){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key) + [8]; + /*<>*/ } + function set_geometry(max_indent, margin){ + /*<>*/ return pp_set_geometry + ( /*<>*/ caml_call1 + (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), + max_indent, + margin); + /*<>*/ } + function get_geometry(v){ + /*<>*/ return pp_get_geometry + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function set_max_boxes(v){ + /*<>*/ return pp_set_max_boxes + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key), + v); + /*<>*/ } + function get_max_boxes(v){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key) + [15]; + /*<>*/ } + function over_max_boxes(v){ + /*<>*/ return pp_over_max_boxes + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function get_ellipsis_text(v){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key) + [16]; + /*<>*/ } + function set_formatter_out_channel(v){ + /*<>*/ return pp_set_formatter_out_channel + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function get_formatter_out_functions(v){ + /*<>*/ return pp_get_formatter_out_functions + ( /*<>*/ caml_call1 + (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), + v, + w); + /*<>*/ } + function get_formatter_output_functions(v){ + /*<>*/ return pp_get_formatter_output_functi + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function get_formatter_stag_functions(v){ + /*<>*/ return pp_get_formatter_stag_function + ( /*<>*/ caml_call1 + (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), + v); + /*<>*/ } + function get_print_tags(v){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key) + [22]; + /*<>*/ } + function set_mark_tags(v){ + /*<>*/ return pp_set_mark_tags + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key), + v); + /*<>*/ } + function get_mark_tags(v){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key) + [23]; + /*<>*/ } + function set_tags(v){ + /*<>*/ return pp_set_tags + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key), + v); + /*<>*/ } + function pp_print_list(opt, pp_v, ppf, param){ + var opt$0 = opt, param$0 = param; + for(;;){ + /*<>*/ if(opt$0) + var sth = opt$0[1], pp_sep = sth; + else + var pp_sep = pp_print_cut; + /*<>*/ if(! param$0) + /*<>*/ return 0; + var v = param$0[1]; + if(! param$0[2]) + /*<>*/ return /*<>*/ caml_call2 + (pp_v, ppf, v); + var vs = param$0[2]; + /*<>*/ /*<>*/ caml_call2 + (pp_v, ppf, v); + /*<>*/ /*<>*/ caml_call2 + (pp_sep, ppf, 0); + /*<>*/ var + /*<>*/ opt$1 = [0, pp_sep], + opt$0 = opt$1, + param$0 = vs; + } + } + function pp_print_seq(opt, pp_v, ppf, seq$1){ + /*<>*/ if(opt) + var sth = opt[1], pp_sep = sth; + else + var pp_sep = pp_print_cut; + /*<>*/ /*<>*/ var + match$0 = /*<>*/ caml_call1(seq$1, 0); + if(! match$0) /*<>*/ return 0; + var seq$2 = match$0[2], v$0 = match$0[1]; + /*<>*/ /*<>*/ caml_call2 + (pp_v, ppf, v$0); + var seq = seq$2; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq, 0); + if(! match) /*<>*/ return 0; + var seq$0 = match[2], v = match[1]; + /*<>*/ /*<>*/ caml_call2 + (pp_sep, ppf, 0); + /*<>*/ /*<>*/ caml_call2 + (pp_v, ppf, v); + var seq = seq$0; + } + /*<>*/ } + function pp_print_text(ppf, s){ + /*<>*/ var + len = caml_ml_string_length(s), + /*<>*/ left = [0, 0], + /*<>*/ right = [0, 0]; + function flush(param){ + /*<>*/ pp_print_string + (ppf, + /*<>*/ caml_call3 + (Stdlib_String[15], s, left[1], right[1] - left[1] | 0)); + right[1]++; + left[1] = right[1]; + return 0; + /*<>*/ } + for(;;){ + if(right[1] === len){ + var _aj_ = left[1] !== len ? 1 : 0; + return _aj_ ? flush(0) : _aj_; + } + /*<>*/ /*<>*/ var + match = /*<>*/ runtime.caml_string_get(s, right[1]); + if(10 === match){ + /*<>*/ flush(0); + /*<>*/ pp_force_newline(ppf, 0); + } + else if(32 === match){ + /*<>*/ flush(0); + /*<>*/ pp_print_space(ppf, 0); + } + else + right[1]++; + } + /*<>*/ } + function pp_print_option(opt, pp_v, ppf, param){ + /*<>*/ if(opt) + var sth = opt[1], none = sth; + else + var + none = + function(param, _ai_){ + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ if(! param) + /*<>*/ return /*<>*/ caml_call2 + (none, ppf, 0); + var v = param[1]; + /*<>*/ return /*<>*/ caml_call2 + (pp_v, ppf, v); + } + function pp_print_result(ok, error, ppf, param){ + /*<>*/ if(0 === param[0]){ + var v = param[1]; + /*<>*/ return /*<>*/ caml_call2 + (ok, ppf, v); + } + var e = param[1]; + /*<>*/ return /*<>*/ caml_call2 + (error, ppf, e); + } + function pp_print_either(left, right, ppf, param){ + /*<>*/ if(0 === param[0]){ + var l = param[1]; + /*<>*/ return /*<>*/ caml_call2 + (left, ppf, l); + } + var r = param[1]; + /*<>*/ return /*<>*/ caml_call2 + (right, ppf, r); + } + function compute_tag(output, tag_acc){ + /*<>*/ var + /*<>*/ buf = + /*<>*/ caml_call1(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); + /*<>*/ return 2 <= len + ? /*<>*/ caml_call3 + (Stdlib_Buffer[4], buf, 1, len - 2 | 0) + : /*<>*/ caml_call1(Stdlib_Buffer[2], buf); + /*<>*/ } + function output_formatting_lit(ppf, fmting_lit){ + /*<>*/ if(typeof fmting_lit === "number") + switch(fmting_lit){ + case 0: + /*<>*/ return pp_close_box(ppf, 0); + case 1: + /*<>*/ return pp_close_stag(ppf, 0); + case 2: + /*<>*/ return pp_print_flush(ppf, 0); + case 3: + /*<>*/ return pp_force_newline(ppf, 0); + case 4: + /*<>*/ return pp_print_newline(ppf, 0); + case 5: + /*<>*/ return pp_print_char(ppf, 64); + default: /*<>*/ return pp_print_char(ppf, 37); + } + switch(fmting_lit[0]){ + case 0: + var offset = fmting_lit[3], width = fmting_lit[2]; + /*<>*/ return pp_print_break(ppf, width, offset); + case 1: + /*<>*/ return 0; + default: + var c = fmting_lit[1]; + /*<>*/ pp_print_char(ppf, 64); + /*<>*/ return pp_print_char(ppf, c); + } + /*<>*/ } + function output_acc(ppf, acc){ + /*<>*/ if(typeof acc === "number") + /*<>*/ return 0; + a: + { + b: + { + c: + { + switch(acc[0]){ + case 0: + var f = acc[2], p = acc[1]; + /*<>*/ output_acc(ppf, p); + /*<>*/ return output_formatting_lit(ppf, f); + case 1: + var match = acc[2], p$0 = acc[1]; + if(0 === match[0]){ + var acc$0 = match[1]; + /*<>*/ output_acc(ppf, p$0); + /*<>*/ return pp_open_stag + (ppf, [0, String_tag, compute_tag(output_acc, acc$0)]); + } + var acc$1 = match[1]; + /*<>*/ output_acc(ppf, p$0); + /*<>*/ var + /*<>*/ _$_ = compute_tag(output_acc, acc$1), + /*<>*/ match$0 = + /*<>*/ caml_call1 + (CamlinternalFormat[20], _$_), + bty = match$0[2], + indent = match$0[1]; + /*<>*/ return pp_open_box_gen(ppf, indent, bty); + case 2: + var _aa_ = acc[1]; + if(typeof _aa_ !== "number" && 0 === _aa_[0]){ + var _ab_ = _aa_[2]; + if(typeof _ab_ !== "number" && 1 === _ab_[0]){ + var s$0 = acc[2], size = _ab_[2], p$2 = _aa_[1]; + break b; + } + } + var s = acc[2], p$1 = _aa_; + break a; + case 3: + var _ac_ = acc[1]; + if(typeof _ac_ !== "number" && 0 === _ac_[0]){ + var _ad_ = _ac_[2]; + if(typeof _ad_ !== "number" && 1 === _ad_[0]){ + var c$0 = acc[2], size$0 = _ad_[2], p$4 = _ac_[1]; + break; + } + } + var c = acc[2], p$3 = _ac_; + break c; + case 4: + var _ae_ = acc[1]; + if(typeof _ae_ !== "number" && 0 === _ae_[0]){ + var _af_ = _ae_[2]; + if(typeof _af_ !== "number" && 1 === _af_[0]){ + var s$0 = acc[2], size = _af_[2], p$2 = _ae_[1]; + break b; + } + } + var s = acc[2], p$1 = _ae_; + break a; + case 5: + var _ag_ = acc[1]; + if(typeof _ag_ !== "number" && 0 === _ag_[0]){ + var _ah_ = _ag_[2]; + if(typeof _ah_ !== "number" && 1 === _ah_[0]){ + var c$0 = acc[2], size$0 = _ah_[2], p$4 = _ag_[1]; + break; + } + } + var c = acc[2], p$3 = _ag_; + break c; + case 6: + var f$0 = acc[2], p$5 = acc[1]; + /*<>*/ output_acc(ppf, p$5); + /*<>*/ return /*<>*/ caml_call1 + (f$0, ppf); + case 7: + var p$6 = acc[1]; + /*<>*/ output_acc(ppf, p$6); + /*<>*/ return pp_print_flush(ppf, 0); + default: + var msg = acc[2], p$7 = acc[1]; + /*<>*/ output_acc(ppf, p$7); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], msg); + } + /*<>*/ output_acc(ppf, p$4); + /*<>*/ return pp_print_as_size + (ppf, + size$0, + /*<>*/ caml_call2 + (Stdlib_String[1], 1, c$0)); + } + /*<>*/ output_acc(ppf, p$3); + /*<>*/ return pp_print_char(ppf, c); + } + /*<>*/ output_acc(ppf, p$2); + /*<>*/ return pp_print_as_size(ppf, size, s$0); + } + /*<>*/ output_acc(ppf, p$1); + /*<>*/ return pp_print_string(ppf, s); + /*<>*/ } + function strput_acc(ppf, acc){ + /*<>*/ if(typeof acc === "number") + /*<>*/ return 0; + a: + { + b: + { + c: + { + switch(acc[0]){ + case 0: + var f = acc[2], p = acc[1]; + /*<>*/ strput_acc(ppf, p); + /*<>*/ return output_formatting_lit(ppf, f); + case 1: + var match = acc[2], p$0 = acc[1]; + if(0 === match[0]){ + var acc$0 = match[1]; + /*<>*/ strput_acc(ppf, p$0); + /*<>*/ return pp_open_stag + (ppf, [0, String_tag, compute_tag(strput_acc, acc$0)]); + } + var acc$1 = match[1]; + /*<>*/ strput_acc(ppf, p$0); + /*<>*/ var + /*<>*/ _S_ = compute_tag(strput_acc, acc$1), + /*<>*/ match$0 = + /*<>*/ caml_call1 + (CamlinternalFormat[20], _S_), + bty = match$0[2], + indent = match$0[1]; + /*<>*/ return pp_open_box_gen(ppf, indent, bty); + case 2: + var _T_ = acc[1]; + if(typeof _T_ !== "number" && 0 === _T_[0]){ + var _U_ = _T_[2]; + if(typeof _U_ !== "number" && 1 === _U_[0]){ + var s$0 = acc[2], size = _U_[2], p$2 = _T_[1]; + break b; + } + } + var s = acc[2], p$1 = _T_; + break a; + case 3: + var _V_ = acc[1]; + if(typeof _V_ !== "number" && 0 === _V_[0]){ + var _W_ = _V_[2]; + if(typeof _W_ !== "number" && 1 === _W_[0]){ + var c$0 = acc[2], size$0 = _W_[2], p$4 = _V_[1]; + break; + } + } + var c = acc[2], p$3 = _V_; + break c; + case 4: + var _X_ = acc[1]; + if(typeof _X_ !== "number" && 0 === _X_[0]){ + var _Y_ = _X_[2]; + if(typeof _Y_ !== "number" && 1 === _Y_[0]){ + var s$0 = acc[2], size = _Y_[2], p$2 = _X_[1]; + break b; + } + } + var s = acc[2], p$1 = _X_; + break a; + case 5: + var _Z_ = acc[1]; + if(typeof _Z_ !== "number" && 0 === _Z_[0]){ + var ___ = _Z_[2]; + if(typeof ___ !== "number" && 1 === ___[0]){ + var c$0 = acc[2], size$0 = ___[2], p$4 = _Z_[1]; + break; + } + } + var c = acc[2], p$3 = _Z_; + break c; + case 6: + var p$5 = acc[1]; + if(typeof p$5 !== "number" && 0 === p$5[0]){ + var match$1 = p$5[2]; + if(typeof match$1 !== "number" && 1 === match$1[0]){ + var f$1 = acc[2], size$1 = match$1[2], p$6 = p$5[1]; + /*<>*/ strput_acc(ppf, p$6); + /*<>*/ return pp_print_as_size + (ppf, size$1, /*<>*/ caml_call1(f$1, 0)); + } + } + var f$0 = acc[2]; + /*<>*/ strput_acc(ppf, p$5); + /*<>*/ return pp_print_string + (ppf, /*<>*/ caml_call1(f$0, 0)); + case 7: + var p$7 = acc[1]; + /*<>*/ strput_acc(ppf, p$7); + /*<>*/ return pp_print_flush(ppf, 0); + default: + var msg = acc[2], p$8 = acc[1]; + /*<>*/ strput_acc(ppf, p$8); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], msg); + } + /*<>*/ strput_acc(ppf, p$4); + /*<>*/ return pp_print_as_size + (ppf, + size$0, + /*<>*/ caml_call2 + (Stdlib_String[1], 1, c$0)); + } + /*<>*/ strput_acc(ppf, p$3); + /*<>*/ return pp_print_char(ppf, c); + } + /*<>*/ strput_acc(ppf, p$2); + /*<>*/ return pp_print_as_size(ppf, size, s$0); + } + /*<>*/ strput_acc(ppf, p$1); + /*<>*/ return pp_print_string(ppf, s); + /*<>*/ } + function kfprintf(k, ppf, param){ + /*<>*/ var + fmt = param[1], + /*<>*/ _Q_ = 0; + function _R_(acc){ + /*<>*/ output_acc(ppf, acc); + return caml_call1(k, ppf); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[7], _R_, _Q_, fmt); + } + function ikfprintf(k, ppf, param){ + var fmt = param[1]; + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[8], k, ppf, fmt); + } + function ifprintf(ppf, param){ + /*<>*/ var + fmt = param[1], + /*<>*/ _N_ = 0; + function _O_(_P_){ /*<>*/ return 0;} + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[8], _O_, _N_, fmt); + } + function fprintf(ppf){ + function _K_(_M_){ /*<>*/ return 0;} + /*<>*/ return function(_L_){ + /*<>*/ return kfprintf(_K_, ppf, _L_);}; + /*<>*/ } + function printf(param){ + /*<>*/ var + fmt = param[1], + /*<>*/ _I_ = 0; + function _J_(acc){ + /*<>*/ return output_acc + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key), + acc); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[7], _J_, _I_, fmt); + } + function eprintf(param){ + /*<>*/ var + fmt = param[1], + /*<>*/ _G_ = 0; + function _H_(acc){ + /*<>*/ return output_acc + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], err_formatter_key), + acc); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[7], _H_, _G_, fmt); + } + function kdprintf(k, param){ + /*<>*/ var + fmt = param[1], + /*<>*/ _E_ = 0; + function _F_(acc){ + /*<>*/ return /*<>*/ caml_call1 + (k, + function(ppf){ + /*<>*/ return output_acc(ppf, acc); + /*<>*/ }); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[7], _F_, _E_, fmt); + } + function dprintf(fmt){ + /*<>*/ return kdprintf + (function(i){ + /*<>*/ return i; + /*<>*/ }, + fmt); + /*<>*/ } + function ksprintf(k, param){ + /*<>*/ var + fmt = param[1], + /*<>*/ b = pp_make_buffer(0), + /*<>*/ ppf = formatter_of_buffer(b); + function k$0(acc){ + /*<>*/ strput_acc(ppf, acc); + /*<>*/ return /*<>*/ caml_call1 + (k, flush_buffer_formatter(b, ppf)); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[7], k$0, 0, fmt); + } + function sprintf(fmt){ + /*<>*/ return ksprintf(id, fmt); + /*<>*/ } + function kasprintf(k, param){ + /*<>*/ var + fmt = param[1], + /*<>*/ b = pp_make_buffer(0), + /*<>*/ ppf = formatter_of_buffer(b); + function k$0(acc){ + /*<>*/ output_acc(ppf, acc); + /*<>*/ return /*<>*/ caml_call1 + (k, flush_buffer_formatter(b, ppf)); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (CamlinternalFormat[7], k$0, 0, fmt); + } + function asprintf(fmt){ + /*<>*/ return kasprintf(id, fmt); + /*<>*/ } + function flush_standard_formatters(param){ + /*<>*/ pp_print_flush + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], std_formatter_key), + 0); + /*<>*/ return pp_print_flush + ( /*<>*/ caml_call1 + (Stdlib_Domain[10][2], err_formatter_key), + 0); + /*<>*/ } + /*<>*/ /*<>*/ caml_call1 + (Stdlib[100], flush_standard_formatters); + function _l_(param){ + /*<>*/ flush_standard_formatters(0); + /*<>*/ var + /*<>*/ fs = + pp_get_formatter_out_functions(std_formatter, 0), + _m_ = fs[5], + _n_ = fs[4], + _o_ = fs[3], + _p_ = Stdlib[39]; + /*<>*/ function _q_(_D_){ + /*<>*/ return buffered_out_flush(_p_, std_buf_key, _D_); + } + /*<>*/ pp_set_formatter_out_functions + (std_formatter, + [0, + function(_A_, _B_, _C_){ + /*<>*/ return buffered_out_string(std_buf_key, _A_, _B_, _C_); + }, + _q_, + _o_, + _n_, + _m_]); + /*<>*/ var + /*<>*/ fs$0 = + pp_get_formatter_out_functions(err_formatter, 0), + _r_ = fs$0[5], + _s_ = fs$0[4], + _t_ = fs$0[3], + _u_ = Stdlib[40]; + /*<>*/ function _v_(_z_){ + /*<>*/ return buffered_out_flush(_u_, err_buf_key, _z_); + } + /*<>*/ return pp_set_formatter_out_functions + (err_formatter, + [0, + function(_w_, _x_, _y_){ + /*<>*/ return buffered_out_string + (err_buf_key, _w_, _x_, _y_); + }, + _v_, + _t_, + _s_, + _r_]); + /*<>*/ } + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Domain[5], _l_); + var + Stdlib_Format = + [0, + pp_open_box, + open_box, + pp_close_box, + close_box, + pp_open_hbox, + open_hbox, + pp_open_vbox, + open_vbox, + pp_open_hvbox, + open_hvbox, + pp_open_hovbox, + open_hovbox, + pp_print_string, + print_string, + pp_print_bytes, + print_bytes, + pp_print_as, + print_as, + pp_print_int, + print_int, + pp_print_float, + print_float, + pp_print_char, + print_char, + pp_print_bool, + print_bool, + pp_print_space, + print_space, + pp_print_cut, + print_cut, + pp_print_break, + print_break, + pp_print_custom_break, + pp_force_newline, + force_newline, + pp_print_if_newline, + print_if_newline, + pp_print_flush, + print_flush, + pp_print_newline, + print_newline, + pp_set_margin, + set_margin, + pp_get_margin, + get_margin, + pp_set_max_indent, + set_max_indent, + pp_get_max_indent, + get_max_indent, + check_geometry, + pp_set_geometry, + set_geometry, + pp_safe_set_geometry, + safe_set_geometry, + pp_update_geometry, + update_geometry, + pp_get_geometry, + get_geometry, + pp_set_max_boxes, + set_max_boxes, + pp_get_max_boxes, + get_max_boxes, + pp_over_max_boxes, + over_max_boxes, + pp_open_tbox, + open_tbox, + pp_close_tbox, + close_tbox, + pp_set_tab, + set_tab, + pp_print_tab, + print_tab, + pp_print_tbreak, + print_tbreak, + pp_set_ellipsis_text, + set_ellipsis_text, + pp_get_ellipsis_text, + get_ellipsis_text, + String_tag, + pp_open_stag, + open_stag, + pp_close_stag, + close_stag, + pp_set_tags, + set_tags, + pp_set_print_tags, + set_print_tags, + pp_set_mark_tags, + set_mark_tags, + pp_get_print_tags, + get_print_tags, + pp_get_mark_tags, + get_mark_tags, + pp_set_formatter_out_channel, + set_formatter_out_channel, + pp_set_formatter_output_functi, + set_formatter_output_functions, + pp_get_formatter_output_functi, + get_formatter_output_functions, + pp_set_formatter_out_functions, + set_formatter_out_functions, + pp_get_formatter_out_functions, + get_formatter_out_functions, + pp_set_formatter_stag_function, + set_formatter_stag_functions, + pp_get_formatter_stag_function, + get_formatter_stag_functions, + formatter_of_out_channel, + synchronized_formatter_of_out_, + std_formatter, + get_std_formatter, + err_formatter, + get_err_formatter, + formatter_of_buffer, + stdbuf, + get_stdbuf, + str_formatter, + get_str_formatter, + flush_str_formatter, + make_formatter, + make_synchronized_formatter, + formatter_of_out_functions, + make_symbolic_output_buffer, + clear_symbolic_output_buffer, + get_symbolic_output_buffer, + flush_symbolic_output_buffer, + add_symbolic_output_item, + formatter_of_symbolic_output_b, + pp_print_list, + pp_print_seq, + pp_print_text, + pp_print_option, + pp_print_result, + pp_print_either, + fprintf, + printf, + eprintf, + sprintf, + asprintf, + dprintf, + ifprintf, + kfprintf, + kdprintf, + ikfprintf, + ksprintf, + kasprintf]; + runtime.caml_register_global(35, Stdlib_Format, "Stdlib__Format"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Scanf +//# unitInfo: Requires: Assert_failure, CamlinternalFormat, CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Int, Stdlib__Printf, Stdlib__String +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst$5 = '"', + cst$6 = "-", + cst_character = "character ", + cst_scanf_ml = "scanf.ml", + cst_scanf_bad_conversion$3 = 'scanf: bad conversion "%*"', + cst_scanning_of = "scanning of ", + caml_bytes_get = runtime.caml_bytes_get, + caml_int_of_string = runtime.caml_int_of_string, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_get = runtime.caml_string_get, + caml_string_notequal = runtime.caml_string_notequal, + 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) + : 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(), + cst$3 = cst$5, + cst$4 = cst$5, + cst$1 = cst$5, + cst$2 = cst$5, + cst$0 = cst$5, + cst = cst$6, + CamlinternalFormat = global_data.CamlinternalFormat, + CamlinternalFormatBasics = global_data.CamlinternalFormatBasics, + Stdlib_String = global_data.Stdlib__String, + Stdlib = global_data.Stdlib, + Assert_failure = global_data.Assert_failure, + Stdlib_Printf = global_data.Stdlib__Printf, + Stdlib_Int = global_data.Stdlib__Int, + Stdlib_Buffer = global_data.Stdlib__Buffer, + _r_ = [0, 91], + _q_ = [0, 123], + cst_end_of_input_not_found = "end of input not found", + cst_scanf_bad_conversion_a = 'scanf: bad conversion "%a"', + cst_scanf_bad_conversion_t = 'scanf: bad conversion "%t"', + cst_scanf_missing_reader = "scanf: missing reader", + _s_ = [0, cst_scanf_ml, 1414, 13], + cst_scanf_bad_conversion_custo = + 'scanf: bad conversion "%?" (custom converter)', + cst_scanf_bad_conversion = cst_scanf_bad_conversion$3, + cst_scanf_bad_conversion$0 = cst_scanf_bad_conversion$3, + cst_scanf_bad_conversion$1 = 'scanf: bad conversion "%-"', + cst_scanf_bad_conversion$2 = cst_scanf_bad_conversion$3, + _t_ = [0, [3, 0, [10, 0]], "%S%!"], + cst_in_format = ' in format "', + _p_ = [0, 37, ""], + _o_ = + [0, + [11, + "scanf: bad input at char number ", + [4, 3, 0, 0, [11, ": ", [2, 0, 0]]]], + "scanf: bad input at char number %i: %s"], + _n_ = + [0, + [11, "the character ", [1, [11, " cannot start a boolean", 0]]], + "the character %C cannot start a boolean"], + _m_ = + [0, + [11, "bad character hexadecimal encoding \\", [0, [0, 0]]], + "bad character hexadecimal encoding \\%c%c"], + _l_ = + [0, + [11, "bad character decimal encoding \\", [0, [0, [0, 0]]]], + "bad character decimal encoding \\%c%c%c"], + cst_an = "an", + cst_x = "x", + cst_nfinity = "nfinity", + cst_digits = "digits", + _k_ = + [0, + [11, + cst_character, + [1, [11, " is not a valid ", [2, 0, [11, " digit", 0]]]]], + "character %C is not a valid %s digit"], + cst_decimal_digits = "decimal digits", + _j_ = + [0, + [11, cst_character, [1, [11, " is not a decimal digit", 0]]], + "character %C is not a decimal digit"], + cst_0b = "0b", + cst_0o = "0o", + cst_0u = "0u", + cst_0x = "0x", + _i_ = [0, cst_scanf_ml, 516, 9], + _h_ = + [0, + [11, "invalid boolean '", [2, 0, [12, 39, 0]]], + "invalid boolean '%s'"], + _g_ = + [0, + [11, "looking for ", [1, [11, ", found ", [1, 0]]]], + "looking for %C, found %C"], + cst_not_a_valid_float_in_hexad = + "not a valid float in hexadecimal notation", + cst_no_dot_or_exponent_part_fo = + "no dot or exponent part found in float token", + _f_ = + [0, + [11, + cst_scanning_of, + [2, + 0, + [11, + " failed: premature end of file occurred before end of token", + 0]]], + "scanning of %s failed: premature end of file occurred before end of token"], + _e_ = + [0, + [11, + cst_scanning_of, + [2, + 0, + [11, " failed: the specified length was too short for token", 0]]], + "scanning of %s failed: the specified length was too short for token"], + _d_ = + [0, + [11, "illegal escape character ", [1, 0]], + "illegal escape character %C"], + cst_unnamed_function = "unnamed function", + cst_unnamed_character_string = "unnamed character string", + cst_unnamed_Stdlib_input_chann = "unnamed Stdlib input channel", + cst_Stdlib_Scanf_Scan_failure = "Stdlib.Scanf.Scan_failure", + cst_binary = "binary", + cst_octal = "octal", + cst_hexadecimal = "hexadecimal", + cst_a_Char = "a Char", + cst_a_String = "a String", + null_char = 0; + function next_char(ib){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + c = /*<>*/ caml_call1(ib[7], 0); + ib[2] = c; + ib[3] = 1; + ib[4] = ib[4] + 1 | 0; + if(10 === c) ib[5] = ib[5] + 1 | 0; + /*<>*/ return c; + } + catch(_bb_){ + var _ba_ = caml_wrap_exception(_bb_); + if(_ba_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_ba_, 0); + ib[2] = null_char; + ib[3] = 0; + ib[1] = 1; + /*<>*/ return null_char; + } + /*<>*/ } + function peek_char(ib){ + /*<>*/ return ib[3] ? ib[2] : next_char(ib); + /*<>*/ } + function checked_peek_char(ib){ + /*<>*/ /*<>*/ var c = peek_char(ib); + if(ib[1]) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[12], 1); + /*<>*/ return c; + /*<>*/ } + function end_of_input(ib){ + /*<>*/ peek_char(ib); + return ib[1]; + /*<>*/ } + function beginning_of_input(ib){ + /*<>*/ return 0 === ib[4] ? 1 : 0; + /*<>*/ } + function name_of_input(ib){ + /*<>*/ var match = ib[9]; + if(typeof match === "number") + return 0 === match ? cst_unnamed_function : cst_unnamed_character_string; + if(0 === match[0]) + /*<>*/ return cst_unnamed_Stdlib_input_chann; + var fname = match[1]; + /*<>*/ return fname; + /*<>*/ } + function char_count(ib){ + /*<>*/ return ib[3] ? ib[4] - 1 | 0 : ib[4]; + /*<>*/ } + function invalidate_current_char(ib){ + /*<>*/ ib[3] = 0; + return 0; + /*<>*/ } + function token_string(ib){ + /*<>*/ var + token_buffer = ib[8], + /*<>*/ tok = + /*<>*/ caml_call1(Stdlib_Buffer[2], token_buffer); + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Buffer[8], token_buffer); + ib[6] = ib[6] + 1 | 0; + /*<>*/ return tok; + /*<>*/ } + function skip_char(width, ib){ + /*<>*/ invalidate_current_char(ib); + /*<>*/ return width; + /*<>*/ } + function ignore_char(width, ib){ + /*<>*/ return skip_char(width - 1 | 0, ib); + /*<>*/ } + function store_char(width, ib, c){ + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], ib[8], c); + /*<>*/ return ignore_char(width, ib); + /*<>*/ } + var default_token_buffer_size = 1024; + function create(iname, next){ + /*<>*/ return [0, + 0, + null_char, + 0, + 0, + 0, + 0, + next, + /*<>*/ caml_call1 + (Stdlib_Buffer[1], default_token_buffer_size), + iname]; + /*<>*/ } + function from_string(s){ + /*<>*/ var + /*<>*/ i = [0, 0], + /*<>*/ len = + /*<>*/ caml_ml_string_length(s); + function next(param){ + /*<>*/ if(len <= i[1]) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[12], 1); + /*<>*/ /*<>*/ var + c = /*<>*/ caml_string_get(s, i[1]); + /*<>*/ i[1]++; + /*<>*/ return c; + /*<>*/ } + /*<>*/ return create(1, next); + /*<>*/ } + var _a_ = 0; + /*<>*/ function from_function(_a$_){ + /*<>*/ return create(_a_, _a$_); + } + /*<>*/ /*<>*/ var len = 1024; + function scan_close_at_end(ic){ + /*<>*/ /*<>*/ caml_call1 + (Stdlib[93], ic); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[12], 1); + /*<>*/ } + function scan_raise_at_end(ic){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[12], 1); + /*<>*/ } + function from_ic(scan_close_ic, iname, ic){ + /*<>*/ var + /*<>*/ buf = + /*<>*/ runtime.caml_create_bytes(1024), + /*<>*/ i = [0, 0], + /*<>*/ lim = [0, 0], + /*<>*/ eof = [0, 0]; + function next(param){ + /*<>*/ if(i[1] < lim[1]){ + /*<>*/ /*<>*/ var + c = /*<>*/ caml_bytes_get(buf, i[1]); + /*<>*/ i[1]++; + /*<>*/ return c; + } + if(eof[1]) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[12], 1); + lim[1] = /*<>*/ caml_call4(Stdlib[84], ic, buf, 0, len); + return 0 === lim[1] + ? (eof[1] = 1, caml_call1(scan_close_ic, ic)) + : (i[1] = 1, /*<>*/ caml_bytes_get(buf, 0)); + /*<>*/ } + /*<>*/ return create(iname, next); + /*<>*/ } + /*<>*/ /*<>*/ var + stdin = from_ic(scan_raise_at_end, [1, cst, Stdlib[38]], Stdlib[38]); + function open_in_file(open_in, fname){ + /*<>*/ if(! caml_string_notequal(fname, cst$6)) + /*<>*/ return stdin; + /*<>*/ /*<>*/ var + ic = /*<>*/ caml_call1(open_in, fname); + return from_ic(scan_close_at_end, [1, fname, ic], ic); + /*<>*/ } + var _b_ = Stdlib[79]; + /*<>*/ function open_in(_a__){ + /*<>*/ return open_in_file(_b_, _a__); + } + /*<>*/ /*<>*/ var _c_ = Stdlib[80]; + /*<>*/ function open_in_bin(_a9_){ + /*<>*/ return open_in_file(_c_, _a9_); + } + function from_channel(ic){ + /*<>*/ return from_ic(scan_raise_at_end, [0, ic], ic); + /*<>*/ } + function close_in(ib){ + /*<>*/ var match = ib[9]; + if(typeof match === "number") /*<>*/ return 0; + if(0 === match[0]){ + var ic = match[1]; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[93], ic); + } + var ic$0 = match[2]; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[93], ic$0); + /*<>*/ } + /*<>*/ /*<>*/ var + Scan_failure = + [248, cst_Stdlib_Scanf_Scan_failure, runtime.caml_fresh_oo_id(0)]; + function bad_input(s){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Scan_failure, s], 1); + /*<>*/ } + function bad_input_escape(c){ + /*<>*/ return bad_input + ( /*<>*/ caml_call2(Stdlib_Printf[4], _d_, c)); + /*<>*/ } + function bad_token_length(message){ + /*<>*/ return bad_input + ( /*<>*/ caml_call2 + (Stdlib_Printf[4], _e_, message)); + /*<>*/ } + function bad_float(param){ + /*<>*/ return bad_input(cst_no_dot_or_exponent_part_fo); + /*<>*/ } + 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)); + /*<>*/ } + function check_this_char(ib, c){ + /*<>*/ /*<>*/ var + ci = checked_peek_char(ib); + return ci === c ? invalidate_current_char(ib) : character_mismatch(c, ci); + /*<>*/ } + function check_char(ib, c$0){ + /*<>*/ if(10 === c$0){ + /*<>*/ /*<>*/ var + ci = checked_peek_char(ib); + /*<>*/ return 10 === ci + ? invalidate_current_char(ib) + : 13 + === ci + ? (invalidate_current_char(ib), check_this_char(ib, 10)) + : character_mismatch(10, ci); + } + if(32 !== c$0) /*<>*/ return check_this_char(ib, c$0); + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ c = peek_char(ib), + /*<>*/ _a7_ = 1 - ib[1]; + if(! _a7_) /*<>*/ return _a7_; + /*<>*/ /*<>*/ var _a8_ = c - 9 | 0; + a: + { + if(4 < _a8_ >>> 0){ + if(23 === _a8_) break a; + } + else if(1 < _a8_ - 2 >>> 0) break a; + /*<>*/ return 0; + } + /*<>*/ invalidate_current_char(ib); + } + /*<>*/ } + function token_char(ib){ + /*<>*/ return /*<>*/ caml_string_get + (token_string(ib), 0); + /*<>*/ } + function token_bool(ib){ + /*<>*/ /*<>*/ var s = token_string(ib); + return caml_string_notequal(s, "false") + ? caml_string_notequal + (s, "true") + ? bad_input + ( /*<>*/ caml_call2(Stdlib_Printf[4], _h_, s)) + : 1 + : 0; + /*<>*/ } + function integer_conversion_of_char(param){ + /*<>*/ /*<>*/ var + switcher = param - 88 | 0; + if(32 >= switcher >>> 0) + switch(switcher){ + case 10: + /*<>*/ return 0; + case 12: + /*<>*/ return 1; + case 17: + /*<>*/ return 2; + case 23: + /*<>*/ return 3; + case 29: + /*<>*/ return 4; + case 0: + case 32: + /*<>*/ return 5; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _i_], 1); + /*<>*/ } + function token_int_literal(conv, ib){ + /*<>*/ switch(conv){ + case 0: + /*<>*/ var + /*<>*/ _a3_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a3_); + break; + case 3: + /*<>*/ var + /*<>*/ _a4_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a4_); + break; + case 4: + /*<>*/ var + /*<>*/ _a5_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a5_); + break; + case 5: + /*<>*/ var + /*<>*/ _a6_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a6_); + break; + default: var tok = token_string(ib); + } + /*<>*/ /*<>*/ var + l = /*<>*/ caml_ml_string_length(tok); + /*<>*/ if + (0 !== l && 43 === /*<>*/ caml_string_get(tok, 0)) + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_String[15], tok, 1, l - 1 | 0); + /*<>*/ return tok; + /*<>*/ } + function token_float(ib){ + /*<>*/ return /*<>*/ runtime.caml_float_of_string + (token_string(ib)); + /*<>*/ } + function scan_decimal_digit_star(width, ib){ + /*<>*/ var width$0 = width; + /*<>*/ for(;;){ + if(0 === width$0) /*<>*/ return width$0; + /*<>*/ /*<>*/ var c = peek_char(ib); + /*<>*/ if(ib[1]) + /*<>*/ return width$0; + if(58 <= c){ + if(95 === c){ + /*<>*/ var + /*<>*/ width$1 = ignore_char(width$0, ib), + width$0 = width$1; + continue; + } + } + else if(48 <= c){ + /*<>*/ var + /*<>*/ width$2 = store_char(width$0, ib, c), + width$0 = width$2; + continue; + } + /*<>*/ return width$0; + } + /*<>*/ } + function scan_decimal_digit_plus(width, ib){ + /*<>*/ if(0 === width) + /*<>*/ return bad_token_length(cst_decimal_digits); + /*<>*/ /*<>*/ var + c = checked_peek_char(ib); + if(9 < c - 48 >>> 0) + /*<>*/ return bad_input + ( /*<>*/ caml_call2(Stdlib_Printf[4], _j_, c)); + /*<>*/ /*<>*/ var + width$0 = store_char(width, ib, c); + /*<>*/ return scan_decimal_digit_star(width$0, ib); + /*<>*/ } + function scan_digit_plus(basis, digitp, width$2, ib){ + /*<>*/ if(0 === width$2) + /*<>*/ return bad_token_length(cst_digits); + /*<>*/ /*<>*/ 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)); + /*<>*/ var + /*<>*/ width$3 = store_char(width$2, ib, c$0), + width = width$3; + /*<>*/ for(;;){ + if(0 === width) /*<>*/ return width; + /*<>*/ /*<>*/ var c = peek_char(ib); + /*<>*/ if(ib[1]) /*<>*/ return width; + /*<>*/ if + ( /*<>*/ caml_call1(digitp, c)) + /*<>*/ var + /*<>*/ width$0 = store_char(width, ib, c), + width = width$0; + else{ + if(95 !== c) /*<>*/ return width; + /*<>*/ var + /*<>*/ width$1 = ignore_char(width, ib), + width = width$1; + } + } + /*<>*/ } + function is_binary_digit(param){ + /*<>*/ return 1 < param - 48 >>> 0 ? 0 : 1; + /*<>*/ } + /*<>*/ function scan_binary_int(_a1_, _a2_){ + /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a1_, _a2_); + } + function is_octal_digit(param){ + /*<>*/ return 7 < param - 48 >>> 0 ? 0 : 1; + /*<>*/ } + /*<>*/ function scan_octal_int(_aZ_, _a0_){ + /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _aZ_, _a0_); + } + function is_hexa_digit(param){ + /*<>*/ /*<>*/ var + _aY_ = param - 48 | 0; + a: + { + if(22 < _aY_ >>> 0){ + if(5 < _aY_ - 49 >>> 0) break a; + } + else if(6 >= _aY_ - 10 >>> 0) break a; + /*<>*/ return 1; + } + /*<>*/ return 0; + /*<>*/ } + /*<>*/ function scan_hexadecimal_int(_aW_, _aX_){ + /*<>*/ return scan_digit_plus + (cst_hexadecimal, is_hexa_digit, _aW_, _aX_); + } + function scan_sign(width, ib){ + /*<>*/ var + /*<>*/ c = checked_peek_char(ib), + /*<>*/ switcher = c - 43 | 0; + if(2 >= switcher >>> 0) + switch(switcher){ + case 0: + /*<>*/ return store_char(width, ib, c); + case 1: break; + default: /*<>*/ return store_char(width, ib, c); + } + /*<>*/ return width; + /*<>*/ } + function scan_optionally_signed_decimal(width, ib){ + /*<>*/ /*<>*/ var + width$0 = scan_sign(width, ib); + /*<>*/ return scan_decimal_digit_plus(width$0, ib); + /*<>*/ } + function scan_int_conversion(conv, width$1, ib){ + /*<>*/ switch(conv){ + case 0: + /*<>*/ return scan_binary_int(width$1, ib); + case 1: + /*<>*/ return scan_optionally_signed_decimal + (width$1, ib); + case 2: + /*<>*/ var + /*<>*/ width$0 = scan_sign(width$1, ib), + /*<>*/ c = checked_peek_char(ib); + if(48 !== c) + /*<>*/ return scan_decimal_digit_plus(width$0, ib); + /*<>*/ /*<>*/ var + width = store_char(width$0, ib, c); + /*<>*/ if(0 === width) + /*<>*/ return width; + /*<>*/ /*<>*/ var + c$0 = peek_char(ib); + /*<>*/ if(ib[1]) + /*<>*/ return width; + a: + { + if(99 <= c$0){ + if(111 === c$0) + /*<>*/ return scan_octal_int + (store_char(width, ib, c$0), ib); + if(120 === c$0) break a; + } + else{ + if(88 === c$0) break a; + if(98 <= c$0) + /*<>*/ return scan_binary_int + (store_char(width, ib, c$0), ib); + } + /*<>*/ return scan_decimal_digit_star(width, ib); + } + /*<>*/ return scan_hexadecimal_int + (store_char(width, ib, c$0), ib); + case 3: + /*<>*/ return scan_octal_int(width$1, ib); + case 4: + /*<>*/ return scan_decimal_digit_plus(width$1, ib); + default: + /*<>*/ return scan_hexadecimal_int(width$1, ib); + } + /*<>*/ } + function scan_fractional_part(width, ib){ + /*<>*/ if(0 === width) + /*<>*/ return width; + /*<>*/ /*<>*/ var c = peek_char(ib); + /*<>*/ return ib[1] + ? width + : 9 + < c - 48 >>> 0 + ? width + : scan_decimal_digit_star(store_char(width, ib, c), ib); + /*<>*/ } + function scan_exponent_part(width, ib){ + /*<>*/ if(0 === width) + /*<>*/ return width; + /*<>*/ /*<>*/ var c = peek_char(ib); + /*<>*/ if(ib[1]) /*<>*/ return width; + if(69 !== c && 101 !== c) /*<>*/ return width; + /*<>*/ return scan_optionally_signed_decimal + (store_char(width, ib, c), ib); + /*<>*/ } + function scan_float(width$1, precision, ib){ + /*<>*/ var + /*<>*/ width = scan_sign(width$1, ib), + /*<>*/ width$0 = scan_decimal_digit_star(width, ib); + /*<>*/ if(0 === width$0) + /*<>*/ return [0, width$0, precision]; + /*<>*/ /*<>*/ var c = peek_char(ib); + /*<>*/ if(ib[1]) + /*<>*/ return [0, width$0, precision]; + if(46 !== c) + /*<>*/ return [0, + scan_exponent_part(width$0, ib), + precision]; + /*<>*/ var + /*<>*/ width$2 = store_char(width$0, ib, c), + /*<>*/ precision$0 = + /*<>*/ caml_call2(Stdlib_Int[10], width$2, precision), + width$3 = + width$2 - (precision$0 - scan_fractional_part(precision$0, ib) | 0) | 0; + /*<>*/ return [0, + scan_exponent_part(width$3, ib), + precision$0]; + /*<>*/ } + function check_case_insensitive_string(width, ib, error, str){ + /*<>*/ function lowercase(c){ + /*<>*/ return 25 < c - 65 >>> 0 + ? c + : caml_call1(Stdlib[29], (c - 65 | 0) + 97 | 0); + /*<>*/ } + /*<>*/ var + /*<>*/ len = + /*<>*/ caml_ml_string_length(str), + /*<>*/ width$0 = [0, width], + /*<>*/ _aT_ = len - 1 | 0, + /*<>*/ _aS_ = 0; + if(_aT_ >= 0){ + var i = _aS_; + for(;;){ + /*<>*/ var + /*<>*/ c = peek_char(ib), + /*<>*/ _aU_ = + lowercase( /*<>*/ caml_string_get(str, i)); + if(lowercase(c) !== _aU_) + /*<>*/ /*<>*/ caml_call1(error, 0); + if(0 === width$0[1]) + /*<>*/ /*<>*/ caml_call1(error, 0); + width$0[1] = store_char(width$0[1], ib, c); + /*<>*/ /*<>*/ var _aV_ = i + 1 | 0; + if(_aT_ === i) break; + var i = _aV_; + } + } + return width$0[1]; + /*<>*/ } + function scan_hex_float(width, precision, ib){ + /*<>*/ var + _aF_ = 0 === width ? 1 : 0, + _aG_ = _aF_ || end_of_input(ib); + /*<>*/ if(_aG_) + /*<>*/ bad_hex_float(0); + /*<>*/ var + /*<>*/ width$0 = scan_sign(width, ib), + _aH_ = 0 === width$0 ? 1 : 0, + _aI_ = _aH_ || end_of_input(ib); + /*<>*/ if(_aI_) + /*<>*/ bad_hex_float(0); + /*<>*/ /*<>*/ var c = peek_char(ib); + a: + { + if(78 <= c){ + /*<>*/ /*<>*/ var + switcher = c - 79 | 0; + if(30 < switcher >>> 0){ + if(32 <= switcher) break a; + /*<>*/ var + /*<>*/ width$1 = store_char(width$0, ib, c), + _aJ_ = 0 === width$1 ? 1 : 0, + _aK_ = _aJ_ || end_of_input(ib); + /*<>*/ if(_aK_) + /*<>*/ bad_hex_float(0); + /*<>*/ return check_case_insensitive_string + (width$1, ib, bad_hex_float, cst_an); + } + if(26 !== switcher) break a; + } + else{ + if(48 === c){ + /*<>*/ var + /*<>*/ width$3 = store_char(width$0, ib, c), + _aN_ = 0 === width$3 ? 1 : 0, + _aO_ = _aN_ || end_of_input(ib); + /*<>*/ if(_aO_) + /*<>*/ bad_hex_float(0); + /*<>*/ /*<>*/ var + width$4 = + check_case_insensitive_string(width$3, ib, bad_hex_float, cst_x); + /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ + /*<>*/ /*<>*/ var + _aP_ = peek_char(ib) - 46 | 0; + b: + { + c: + { + if(34 < _aP_ >>> 0){ + if(66 === _aP_) break c; + } + else if(32 < _aP_ - 1 >>> 0) break c; + var width$5 = scan_hexadecimal_int(width$4, ib); + break b; + } + var width$5 = width$4; + } + /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ + /*<>*/ /*<>*/ var + c$0 = peek_char(ib); + if(46 === c$0){ + /*<>*/ /*<>*/ var + width$6 = store_char(width$5, ib, c$0); + b: + { + /*<>*/ if(0 !== width$6 && ! end_of_input(ib)){ + /*<>*/ /*<>*/ var + match = peek_char(ib); + c: + { + if(80 !== match && 112 !== match){ + /*<>*/ var + /*<>*/ precision$0 = + /*<>*/ caml_call2 + (Stdlib_Int[10], width$6, precision), + width$10 = + width$6 + - (precision$0 - scan_hexadecimal_int(precision$0, ib) | 0) + | 0; + break c; + } + var width$10 = width$6; + } + var width$7 = width$10; + break b; + } + var width$7 = width$6; + } + var width$8 = width$7; + } + else + var width$8 = width$5; + /*<>*/ if(0 !== width$8 && ! end_of_input(ib)){ + /*<>*/ /*<>*/ var + c$1 = peek_char(ib); + if(80 !== c$1 && 112 !== c$1) + /*<>*/ return width$8; + /*<>*/ var + /*<>*/ width$9 = store_char(width$8, ib, c$1), + _aQ_ = 0 === width$9 ? 1 : 0, + _aR_ = _aQ_ || end_of_input(ib); + /*<>*/ if(_aR_) + /*<>*/ bad_hex_float(0); + /*<>*/ return scan_optionally_signed_decimal + (width$9, ib); + } + /*<>*/ return width$8; + } + /*<>*/ return width$5; + } + /*<>*/ return width$4; + } + if(73 !== c) break a; + } + /*<>*/ var + /*<>*/ width$2 = store_char(width$0, ib, c), + _aL_ = 0 === width$2 ? 1 : 0, + _aM_ = _aL_ || end_of_input(ib); + /*<>*/ if(_aM_) + /*<>*/ bad_hex_float(0); + /*<>*/ return check_case_insensitive_string + (width$2, ib, bad_hex_float, cst_nfinity); + } + /*<>*/ return bad_hex_float(0); + /*<>*/ } + function scan_caml_float_rest(width, precision, ib){ + /*<>*/ var + _aB_ = 0 === width ? 1 : 0, + _aC_ = _aB_ || end_of_input(ib); + /*<>*/ if(_aC_) /*<>*/ bad_float(0); + /*<>*/ var + /*<>*/ width$0 = scan_decimal_digit_star(width, ib), + _aD_ = 0 === width$0 ? 1 : 0, + _aE_ = _aD_ || end_of_input(ib); + /*<>*/ if(_aE_) /*<>*/ bad_float(0); + /*<>*/ var + /*<>*/ c = peek_char(ib), + /*<>*/ switcher = c - 69 | 0; + if(32 < switcher >>> 0){ + if(-23 === switcher){ + /*<>*/ var + /*<>*/ width$1 = store_char(width$0, ib, c), + /*<>*/ precision$0 = + /*<>*/ caml_call2 + (Stdlib_Int[10], width$1, precision), + /*<>*/ width_precision = + scan_fractional_part(precision$0, ib), + frac_width = precision$0 - width_precision | 0, + width$2 = width$1 - frac_width | 0; + /*<>*/ return scan_exponent_part(width$2, ib); + } + } + else if(30 < switcher - 1 >>> 0) + /*<>*/ return scan_exponent_part(width$0, ib); + /*<>*/ return bad_float(0); + /*<>*/ } + function scan_caml_float(width, precision, ib){ + /*<>*/ var + _an_ = 0 === width ? 1 : 0, + _ao_ = _an_ || end_of_input(ib); + /*<>*/ if(_ao_) /*<>*/ bad_float(0); + /*<>*/ var + /*<>*/ width$0 = scan_sign(width, ib), + _ap_ = 0 === width$0 ? 1 : 0, + _aq_ = _ap_ || end_of_input(ib); + /*<>*/ if(_aq_) /*<>*/ bad_float(0); + /*<>*/ /*<>*/ var c = peek_char(ib); + if(49 <= c){ + if(58 > c){ + /*<>*/ var + /*<>*/ width$1 = store_char(width$0, ib, c), + _ar_ = 0 === width$1 ? 1 : 0, + _as_ = _ar_ || end_of_input(ib); + /*<>*/ if(_as_) /*<>*/ bad_float(0); + /*<>*/ return scan_caml_float_rest + (width$1, precision, ib); + } + } + else if(48 <= c){ + /*<>*/ var + /*<>*/ width$2 = store_char(width$0, ib, c), + _at_ = 0 === width$2 ? 1 : 0, + _au_ = _at_ || end_of_input(ib); + /*<>*/ if(_au_) /*<>*/ bad_float(0); + /*<>*/ /*<>*/ var + c$0 = peek_char(ib); + if(88 !== c$0 && 120 !== c$0) + /*<>*/ return scan_caml_float_rest + (width$2, precision, ib); + /*<>*/ var + /*<>*/ width$3 = store_char(width$2, ib, c$0), + _av_ = 0 === width$3 ? 1 : 0, + _aw_ = _av_ || end_of_input(ib); + /*<>*/ if(_aw_) /*<>*/ bad_float(0); + /*<>*/ var + /*<>*/ width$4 = scan_hexadecimal_int(width$3, ib), + _ax_ = 0 === width$4 ? 1 : 0, + _ay_ = _ax_ || end_of_input(ib); + /*<>*/ if(_ay_) /*<>*/ bad_float(0); + /*<>*/ var + /*<>*/ c$1 = peek_char(ib), + /*<>*/ switcher = c$1 - 80 | 0; + a: + { + b: + { + if(32 < switcher >>> 0){ + if(-34 === switcher){ + /*<>*/ /*<>*/ var + width$5 = store_char(width$4, ib, c$1); + c: + { + /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ + /*<>*/ /*<>*/ var + match = peek_char(ib); + d: + { + if(80 !== match && 112 !== match){ + /*<>*/ var + /*<>*/ precision$0 = + /*<>*/ caml_call2 + (Stdlib_Int[10], width$5, precision), + width$10 = + width$5 + - (precision$0 - scan_hexadecimal_int(precision$0, ib) | 0) + | 0; + break d; + } + var width$10 = width$5; + } + var width$6 = width$10; + break c; + } + var width$6 = width$5; + } + var width$7 = width$6; + break b; + } + } + else if(30 < switcher - 1 >>> 0){var width$7 = width$4; break b;} + var width$8 = bad_float(0); + break a; + } + var width$8 = width$7; + } + /*<>*/ if(0 !== width$8 && ! end_of_input(ib)){ + /*<>*/ /*<>*/ var + c$2 = peek_char(ib); + if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$8; + /*<>*/ var + /*<>*/ width$9 = store_char(width$8, ib, c$2), + _az_ = 0 === width$9 ? 1 : 0, + _aA_ = _az_ || end_of_input(ib); + /*<>*/ if(_aA_) + /*<>*/ bad_hex_float(0); + /*<>*/ return scan_optionally_signed_decimal + (width$9, ib); + } + /*<>*/ return width$8; + } + /*<>*/ return bad_float(0); + /*<>*/ } + function scan_string(stp, width, ib){ + /*<>*/ var width$0 = width; + /*<>*/ for(;;){ + if(0 === width$0) /*<>*/ return width$0; + /*<>*/ /*<>*/ var c = peek_char(ib); + /*<>*/ if(ib[1]) + /*<>*/ return width$0; + if(! stp){ + /*<>*/ /*<>*/ var _am_ = c - 9 | 0; + a: + { + if(4 < _am_ >>> 0){ + if(23 === _am_) break a; + } + else if(1 < _am_ - 2 >>> 0) break a; + /*<>*/ var + /*<>*/ width$2 = store_char(width$0, ib, c), + width$0 = width$2; + continue; + } + /*<>*/ return width$0; + } + var c$0 = stp[1]; + if(c === c$0) /*<>*/ return skip_char(width$0, ib); + /*<>*/ var + /*<>*/ width$1 = store_char(width$0, ib, c), + width$0 = width$1; + } + /*<>*/ } + function hexadecimal_value_of_char(c){ + /*<>*/ return 97 <= c + ? c - 87 | 0 + : 65 <= c ? c - 55 | 0 : c - 48 | 0; + /*<>*/ } + function check_next_char(message, width, ib){ + /*<>*/ if(0 === width) + /*<>*/ return bad_token_length(message); + /*<>*/ /*<>*/ var c = peek_char(ib); + /*<>*/ return ib[1] + ? bad_input + ( /*<>*/ caml_call2 + (Stdlib_Printf[4], _f_, message)) + : c; + /*<>*/ } + /*<>*/ function check_next_char_for_char(_ak_, _al_){ + /*<>*/ return check_next_char(cst_a_Char, _ak_, _al_); + } + /*<>*/ function check_next_char_for_string(_ai_, _aj_){ + /*<>*/ return check_next_char(cst_a_String, _ai_, _aj_); + } + function scan_backslash_char(width, ib){ + /*<>*/ /*<>*/ var + c0 = check_next_char_for_char(width, ib); + a: + { + if(40 <= c0){ + if(58 > c0){ + if(48 > c0) break a; + /*<>*/ var + get_digit$0 = + function(param){ + /*<>*/ /*<>*/ var + c = next_char(ib); + return 9 < c - 48 >>> 0 ? bad_input_escape(c) : c; + /*<>*/ }, + /*<>*/ c1$0 = get_digit$0(0), + /*<>*/ c2$0 = get_digit$0(0), + c = + ((100 * (c0 - 48 | 0) | 0) + (10 * (c1$0 - 48 | 0) | 0) | 0) + + (c2$0 - 48 | 0) + | 0; + b: + { + if(0 <= c && 255 >= c){ + var _ag_ = /*<>*/ caml_call1(Stdlib[29], c); + break b; + } + var + _ag_ = + bad_input + ( /*<>*/ caml_call4 + (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); + } + /*<>*/ return store_char(width - 2 | 0, ib, _ag_); + } + /*<>*/ /*<>*/ var + switcher = c0 - 92 | 0; + if(28 < switcher >>> 0) break a; + switch(switcher){ + case 28: + /*<>*/ var + get_digit = + function(param){ + /*<>*/ var + /*<>*/ c = next_char(ib), + /*<>*/ _ah_ = c - 48 | 0; + a: + { + if(22 < _ah_ >>> 0){ + if(5 < _ah_ - 49 >>> 0) break a; + } + else if(6 >= _ah_ - 10 >>> 0) break a; + /*<>*/ return c; + } + /*<>*/ return bad_input_escape(c); + /*<>*/ }, + /*<>*/ c1 = get_digit(0), + /*<>*/ c2 = get_digit(0), + /*<>*/ _ad_ = hexadecimal_value_of_char(c2), + c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ad_ | 0; + b: + { + if(0 <= c$0 && 255 >= c$0){ + var _af_ = /*<>*/ caml_call1(Stdlib[29], c$0); + break b; + } + var + _af_ = + bad_input + ( /*<>*/ caml_call3 + (Stdlib_Printf[4], _m_, c1, c2)); + } + /*<>*/ return store_char(width - 2 | 0, ib, _af_); + case 0: + case 6: + case 18: + case 22: + case 24: break; + default: break a; + } + } + else if(34 !== c0 && 39 > c0) break a; + b: + { + if(110 <= c0){ + if(117 > c0) + switch(c0 - 110 | 0){ + case 0: + var _ae_ = 10; break b; + case 4: + var _ae_ = 13; break b; + case 6: + var _ae_ = 9; break b; + } + } + else if(98 === c0){var _ae_ = 8; break b;} + var _ae_ = c0; + } + /*<>*/ return store_char(width, ib, _ae_); + } + /*<>*/ return bad_input_escape(c0); + /*<>*/ } + function scan_caml_string(width, ib){ + function find_stop$0(counter, width){ + /*<>*/ var width$0 = width; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + c = check_next_char_for_string(width$0, ib); + if(34 === c) /*<>*/ return ignore_char(width$0, ib); + if(92 === c){ + /*<>*/ var + /*<>*/ width$1 = ignore_char(width$0, ib), + /*<>*/ match = + check_next_char_for_string(width$1, ib); + if(10 === match){ + /*<>*/ /*<>*/ var + _ab_ = ignore_char(width$1, ib); + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (skip_spaces, [0, _ab_]); + var counter$0 = counter + 1 | 0; + /*<>*/ return skip_spaces(counter$0, _ab_); + } + if(13 === match){ + /*<>*/ /*<>*/ var + width$3 = ignore_char(width$1, ib); + if(10 === check_next_char_for_string(width$3, ib)){ + /*<>*/ /*<>*/ var + _ac_ = ignore_char(width$3, ib); + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (skip_spaces, [0, _ac_]); + var counter$1 = counter + 1 | 0; + /*<>*/ return skip_spaces(counter$1, _ac_); + } + /*<>*/ var + /*<>*/ width$5 = store_char(width$3, ib, 13), + width$0 = width$5; + } + else + /*<>*/ var + /*<>*/ width$4 = scan_backslash_char(width$1, ib), + width$0 = width$4; + } + else + /*<>*/ var + /*<>*/ width$2 = store_char(width$0, ib, c), + width$0 = width$2; + } + /*<>*/ } + function skip_spaces(counter, width){ + /*<>*/ var width$0 = width; + /*<>*/ for(;;){ + if(32 !== check_next_char_for_string(width$0, ib)){ + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (find_stop$0, [0, width$0]); + var counter$0 = counter + 1 | 0; + /*<>*/ return find_stop$0(counter$0, width$0); + } + /*<>*/ var + /*<>*/ width$1 = ignore_char(width$0, ib), + width$0 = width$1; + } + /*<>*/ } + function find_stop(width){ + /*<>*/ return caml_trampoline(find_stop$0(0, width)); + } + /*<>*/ /*<>*/ var + c = checked_peek_char(ib); + return 34 === c + ? find_stop(ignore_char(width, ib)) + : character_mismatch(34, c); + /*<>*/ } + function scan_chars_in_char_set(char_set, scan_indic, width, ib){ + function scan_chars(i, stp){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ c = peek_char(ib), + _Z_ = 0 < i$0 ? 1 : 0; + if(_Z_){ + /*<>*/ /*<>*/ var + ___ = 1 - ib[1]; + if(___) + /*<>*/ var + /*<>*/ _$_ = + /*<>*/ caml_call2 + (CamlinternalFormat[1], char_set, c), + /*<>*/ _aa_ = _$_ ? c !== stp ? 1 : 0 : _$_; + else + var _aa_ = ___; + } + else + var _aa_ = _Z_; + if(! _aa_) return _aa_; + /*<>*/ store_char(Stdlib[19], ib, c); + var i$1 = i$0 - 1 | 0, i$0 = i$1; + } + /*<>*/ } + if(! scan_indic) /*<>*/ return scan_chars(width, -1); + var c = scan_indic[1]; + /*<>*/ scan_chars(width, c); + /*<>*/ /*<>*/ var _Y_ = 1 - ib[1]; + if(! _Y_) /*<>*/ return _Y_; + /*<>*/ /*<>*/ var + ci = peek_char(ib); + return c === ci ? invalidate_current_char(ib) : character_mismatch(c, ci); + /*<>*/ } + function scanf_bad_input(ib, x){ + /*<>*/ if(x[1] === Scan_failure) + var s = x[2]; + else{ + if(x[1] !== Stdlib[7]) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (x, 1); + var s = x[2]; + } + /*<>*/ /*<>*/ var + i = char_count(ib); + /*<>*/ return bad_input + ( /*<>*/ caml_call3(Stdlib_Printf[4], _o_, i, s)); + } + function width_of_pad_opt(pad_opt){ + /*<>*/ if(! pad_opt) + /*<>*/ return Stdlib[19]; + var width = pad_opt[1]; + /*<>*/ return width; + /*<>*/ } + function stopper_of_formatting_lit(fmting){ + /*<>*/ if(6 === fmting) + /*<>*/ return _p_; + /*<>*/ var + /*<>*/ str = + /*<>*/ caml_call1(CamlinternalFormat[17], fmting), + /*<>*/ stp = + /*<>*/ caml_string_get(str, 1), + /*<>*/ sub_str = + /*<>*/ caml_call3 + (Stdlib_String[15], + str, + 2, + /*<>*/ caml_ml_string_length(str) - 2 | 0); + /*<>*/ return [0, stp, sub_str]; + /*<>*/ } + function take_format_readers$0(counter, k, fmt){ + /*<>*/ var fmt$0 = fmt; + /*<>*/ for(;;){ + if(typeof fmt$0 === "number") + /*<>*/ return /*<>*/ caml_call1 + (k, 0); + switch(fmt$0[0]){ + case 0: + var rest = fmt$0[1], fmt$0 = rest; break; + case 1: + var rest$0 = fmt$0[1], fmt$0 = rest$0; break; + case 2: + var rest$1 = fmt$0[2], fmt$0 = rest$1; break; + case 3: + var rest$2 = fmt$0[2], fmt$0 = rest$2; break; + case 4: + var rest$3 = fmt$0[4], fmt$0 = rest$3; break; + case 5: + var rest$4 = fmt$0[4], fmt$0 = rest$4; break; + case 6: + var rest$5 = fmt$0[4], fmt$0 = rest$5; break; + case 7: + var rest$6 = fmt$0[4], fmt$0 = rest$6; break; + case 8: + var rest$7 = fmt$0[4], fmt$0 = rest$7; break; + case 9: + var rest$8 = fmt$0[2], fmt$0 = rest$8; break; + case 10: + var rest$9 = fmt$0[1], fmt$0 = rest$9; break; + case 11: + var rest$10 = fmt$0[2], fmt$0 = rest$10; break; + case 12: + var rest$11 = fmt$0[2], fmt$0 = rest$11; break; + case 13: + var rest$12 = fmt$0[3], fmt$0 = rest$12; break; + case 14: + /*<>*/ var + rest$13 = fmt$0[3], + fmtty = fmt$0[2], + /*<>*/ _V_ = + /*<>*/ caml_call1(CamlinternalFormat[21], fmtty), + /*<>*/ _W_ = + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], _V_); + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (take_fmtty_format_readers$0, [0, k, _W_, rest$13]); + var counter$0 = counter + 1 | 0; + /*<>*/ return take_fmtty_format_readers$0 + (counter$0, k, _W_, rest$13); + case 15: + var rest$14 = fmt$0[1], fmt$0 = rest$14; break; + case 16: + var rest$15 = fmt$0[1], fmt$0 = rest$15; break; + case 17: + var rest$16 = fmt$0[2], fmt$0 = rest$16; break; + case 18: + var _X_ = fmt$0[1]; + if(0 === _X_[0]) + /*<>*/ var + rest$17 = fmt$0[2], + fmt$1 = _X_[1][1], + /*<>*/ fmt$2 = + /*<>*/ caml_call2 + (CamlinternalFormatBasics[3], fmt$1, rest$17), + fmt$0 = fmt$2; + else + /*<>*/ var + rest$18 = fmt$0[2], + fmt$3 = _X_[1][1], + /*<>*/ fmt$4 = + /*<>*/ caml_call2 + (CamlinternalFormatBasics[3], fmt$3, rest$18), + fmt$0 = fmt$4; + break; + case 19: + var fmt_rest = fmt$0[1]; + /*<>*/ return function(reader){ + function new_k(readers_rest){ + /*<>*/ return /*<>*/ caml_call1 + (k, [0, reader, readers_rest]); + /*<>*/ } + /*<>*/ return take_format_readers(new_k, fmt_rest); /*<>*/ }; + case 20: + var rest$19 = fmt$0[3], fmt$0 = rest$19; break; + case 21: + var rest$20 = fmt$0[2], fmt$0 = rest$20; break; + case 22: + var rest$21 = fmt$0[1], fmt$0 = rest$21; break; + case 23: + var rest$22 = fmt$0[2], ign = fmt$0[1]; + if(typeof ign === "number") + switch(ign){ + case 0: + var fmt$0 = rest$22; break; + case 1: + var fmt$0 = rest$22; break; + case 2: + /*<>*/ return function(reader){ + function new_k(readers_rest){ + /*<>*/ return /*<>*/ caml_call1 + (k, [0, reader, readers_rest]); + /*<>*/ } + /*<>*/ return take_format_readers + (new_k, rest$22); /*<>*/ }; + default: var fmt$0 = rest$22; + } + else + switch(ign[0]){ + case 0: + var fmt$0 = rest$22; break; + case 1: + var fmt$0 = rest$22; break; + case 2: + var fmt$0 = rest$22; break; + case 3: + var fmt$0 = rest$22; break; + case 4: + var fmt$0 = rest$22; break; + case 5: + var fmt$0 = rest$22; break; + case 6: + var fmt$0 = rest$22; break; + case 7: + var fmt$0 = rest$22; break; + case 8: + var fmt$0 = rest$22; break; + case 9: + var fmtty$0 = ign[2]; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (take_fmtty_format_readers$0, [0, k, fmtty$0, rest$22]); + var counter$1 = counter + 1 | 0; + /*<>*/ return take_fmtty_format_readers$0 + (counter$1, k, fmtty$0, rest$22); + case 10: + var fmt$0 = rest$22; break; + default: var fmt$0 = rest$22; + } + break; + default: var rest$23 = fmt$0[3], fmt$0 = rest$23; + } + } + /*<>*/ } + function take_fmtty_format_readers$0(counter, k, fmtty, fmt){ + /*<>*/ var fmtty$0 = fmtty; + /*<>*/ for(;;){ + if(typeof fmtty$0 === "number"){ + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (take_format_readers$0, [0, k, fmt]); + var counter$0 = counter + 1 | 0; + /*<>*/ return take_format_readers$0 + (counter$0, k, fmt); + } + switch(fmtty$0[0]){ + case 0: + var fmtty$1 = fmtty$0[1], fmtty$0 = fmtty$1; break; + case 1: + var fmtty$2 = fmtty$0[1], fmtty$0 = fmtty$2; break; + case 2: + var fmtty$3 = fmtty$0[1], fmtty$0 = fmtty$3; break; + case 3: + var fmtty$4 = fmtty$0[1], fmtty$0 = fmtty$4; break; + case 4: + var fmtty$5 = fmtty$0[1], fmtty$0 = fmtty$5; break; + case 5: + var fmtty$6 = fmtty$0[1], fmtty$0 = fmtty$6; break; + case 6: + var fmtty$7 = fmtty$0[1], fmtty$0 = fmtty$7; break; + case 7: + var fmtty$8 = fmtty$0[1], fmtty$0 = fmtty$8; break; + case 8: + var fmtty$9 = fmtty$0[2], fmtty$0 = fmtty$9; break; + case 9: + /*<>*/ var + rest = fmtty$0[3], + ty2 = fmtty$0[2], + ty1 = fmtty$0[1], + /*<>*/ _U_ = + /*<>*/ caml_call1(CamlinternalFormat[21], ty1), + /*<>*/ ty = + /*<>*/ caml_call2 + (CamlinternalFormat[22], _U_, ty2), + /*<>*/ fmtty$10 = + /*<>*/ caml_call2 + (CamlinternalFormatBasics[1], ty, rest), + fmtty$0 = fmtty$10; + break; + case 10: + var fmtty$11 = fmtty$0[1], fmtty$0 = fmtty$11; break; + case 11: + var fmtty$12 = fmtty$0[1], fmtty$0 = fmtty$12; break; + case 12: + var fmtty$13 = fmtty$0[1], fmtty$0 = fmtty$13; break; + case 13: + var fmt_rest = fmtty$0[1]; + /*<>*/ return function(reader){ + function new_k(readers_rest){ + /*<>*/ return /*<>*/ caml_call1 + (k, [0, reader, readers_rest]); + /*<>*/ } + /*<>*/ return take_fmtty_format_readers + (new_k, fmt_rest, fmt); /*<>*/ }; + default: + var fmt_rest$0 = fmtty$0[1]; + /*<>*/ return function(reader){ + function new_k(readers_rest){ + /*<>*/ return /*<>*/ caml_call1 + (k, [0, reader, readers_rest]); + /*<>*/ } + /*<>*/ return take_fmtty_format_readers + (new_k, fmt_rest$0, fmt); /*<>*/ }; + } + } + /*<>*/ } + function take_format_readers(k, fmt){ + /*<>*/ return caml_trampoline(take_format_readers$0(0, k, fmt)); + } + function take_fmtty_format_readers(k, fmtty, fmt){ + /*<>*/ return caml_trampoline + (take_fmtty_format_readers$0(0, k, fmtty, fmt)); + } + function pad_prec_scanf(ib, fmt, readers, pad, prec, scan, token){ + /*<>*/ if(typeof pad === "number"){ + if(typeof prec !== "number"){ + var p = prec[1]; + /*<>*/ /*<>*/ caml_call3 + (scan, Stdlib[19], p, ib); + /*<>*/ /*<>*/ var + x$0 = /*<>*/ caml_call1(token, ib); + /*<>*/ return [0, x$0, make_scanf(ib, fmt, readers)]; + } + if(prec) + /*<>*/ return /*<>*/ caml_call1 + (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); + if(! pad[1]) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_scanf_bad_conversion$1); + var w = pad[2]; + if(typeof prec !== "number"){ + var p$0 = prec[1]; + /*<>*/ /*<>*/ caml_call3 + (scan, w, p$0, ib); + /*<>*/ /*<>*/ var + x$2 = /*<>*/ caml_call1(token, ib); + /*<>*/ return [0, x$2, make_scanf(ib, fmt, readers)]; + } + if(prec) + /*<>*/ return /*<>*/ caml_call1 + (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)]; + /*<>*/ } + function make_scanf(ib, fmt, readers){ + /*<>*/ var fmt$0 = fmt; + /*<>*/ for(;;){ + if(typeof fmt$0 === "number") /*<>*/ return 0; + switch(fmt$0[0]){ + case 0: + var rest = fmt$0[1]; + /*<>*/ store_char(0, ib, checked_peek_char(ib)); + /*<>*/ /*<>*/ var + c$1 = token_char(ib); + /*<>*/ return [0, + c$1, + make_scanf(ib, rest, readers)]; + case 1: + /*<>*/ var + rest$0 = fmt$0[1], + /*<>*/ width$0 = 0, + find_stop = + function(width){ + /*<>*/ /*<>*/ var + c = check_next_char_for_char(width, ib); + return 39 === c + ? ignore_char(width, ib) + : character_mismatch(39, c); + /*<>*/ }, + /*<>*/ c = checked_peek_char(ib); + if(39 === c){ + /*<>*/ var + /*<>*/ width = ignore_char(width$0, ib), + /*<>*/ c$0 = check_next_char_for_char(width, ib); + if(92 === c$0) + /*<>*/ find_stop + (scan_backslash_char(ignore_char(width, ib), ib)); + else + /*<>*/ find_stop(store_char(width, ib, c$0)); + } + else + /*<>*/ character_mismatch(39, c); + /*<>*/ /*<>*/ var + c$2 = token_char(ib); + /*<>*/ return [0, + c$2, + make_scanf(ib, rest$0, readers)]; + case 2: + var pad = fmt$0[1], match = fmt$0[2]; + if(typeof match !== "number") + switch(match[0]){ + case 17: + /*<>*/ var + rest$2 = match[2], + fmting_lit = match[1], + /*<>*/ match$0 = + stopper_of_formatting_lit(fmting_lit), + str = match$0[2], + stp = match$0[1], + scan$0 = + function(width, param, ib){ + /*<>*/ return scan_string + ([0, stp], width, ib); + /*<>*/ }, + /*<>*/ str_rest = [11, str, rest$2]; + /*<>*/ return pad_prec_scanf + (ib, str_rest, readers, pad, 0, scan$0, token_string); + case 18: + var _G_ = match[1]; + if(0 === _G_[0]){ + /*<>*/ var + rest$3 = match[2], + fmt$1 = _G_[1][1], + /*<>*/ scan$1 = + function(width, param, ib){ + /*<>*/ return scan_string(_q_, width, ib); + /*<>*/ }; + /*<>*/ return pad_prec_scanf + (ib, + /*<>*/ caml_call2 + (CamlinternalFormatBasics[3], fmt$1, rest$3), + readers, + pad, + 0, + scan$1, + token_string); + } + /*<>*/ var + rest$4 = match[2], + fmt$2 = _G_[1][1], + /*<>*/ scan$2 = + function(width, param, ib){ + /*<>*/ return scan_string(_r_, width, ib); + /*<>*/ }; + /*<>*/ return pad_prec_scanf + (ib, + /*<>*/ caml_call2 + (CamlinternalFormatBasics[3], fmt$2, rest$4), + readers, + pad, + 0, + scan$2, + token_string); + } + /*<>*/ var + rest$1 = fmt$0[2], + /*<>*/ scan = + function(width, param, ib){ + /*<>*/ return scan_string(0, width, ib); + /*<>*/ }; + /*<>*/ return pad_prec_scanf + (ib, rest$1, readers, pad, 0, scan, token_string); + case 3: + /*<>*/ var + rest$5 = fmt$0[2], + pad$0 = fmt$0[1], + /*<>*/ scan$3 = + function(width, param, ib){ + /*<>*/ return scan_caml_string(width, ib); + /*<>*/ }; + /*<>*/ return pad_prec_scanf + (ib, rest$5, readers, pad$0, 0, scan$3, token_string); + case 4: + /*<>*/ var + rest$6 = fmt$0[4], + prec = fmt$0[3], + pad$1 = fmt$0[2], + iconv = fmt$0[1], + /*<>*/ conv = + integer_conversion_of_char + ( /*<>*/ caml_call1 + (CamlinternalFormat[16], iconv)), + scan$4 = + function(width, param, ib){ + /*<>*/ return scan_int_conversion + (conv, width, ib); + /*<>*/ }; + /*<>*/ return pad_prec_scanf + (ib, + rest$6, + readers, + pad$1, + prec, + scan$4, + function(ib){ + /*<>*/ return /*<>*/ caml_int_of_string + (token_int_literal(conv, ib)); + }); + case 5: + /*<>*/ var + rest$7 = fmt$0[4], + prec$0 = fmt$0[3], + pad$2 = fmt$0[2], + iconv$0 = fmt$0[1], + /*<>*/ conv$0 = + integer_conversion_of_char + ( /*<>*/ caml_call1 + (CamlinternalFormat[16], iconv$0)), + scan$5 = + function(width, param, ib){ + /*<>*/ return scan_int_conversion + (conv$0, width, ib); + /*<>*/ }; + /*<>*/ return pad_prec_scanf + (ib, + rest$7, + readers, + pad$2, + prec$0, + scan$5, + function(ib){ + /*<>*/ return /*<>*/ caml_int_of_string + (token_int_literal(conv$0, ib)); + }); + case 6: + /*<>*/ var + rest$8 = fmt$0[4], + prec$1 = fmt$0[3], + pad$3 = fmt$0[2], + iconv$1 = fmt$0[1], + /*<>*/ conv$1 = + integer_conversion_of_char + ( /*<>*/ caml_call1 + (CamlinternalFormat[16], iconv$1)), + scan$6 = + function(width, param, ib){ + /*<>*/ return scan_int_conversion + (conv$1, width, ib); + /*<>*/ }; + /*<>*/ return pad_prec_scanf + (ib, + rest$8, + readers, + pad$3, + prec$1, + scan$6, + function(ib){ + /*<>*/ return /*<>*/ caml_int_of_string + (token_int_literal(conv$1, ib)); + }); + case 7: + /*<>*/ var + rest$9 = fmt$0[4], + prec$2 = fmt$0[3], + pad$4 = fmt$0[2], + iconv$2 = fmt$0[1], + /*<>*/ conv$2 = + integer_conversion_of_char + ( /*<>*/ caml_call1 + (CamlinternalFormat[16], iconv$2)), + scan$7 = + function(width, param, ib){ + /*<>*/ return scan_int_conversion + (conv$2, width, ib); + /*<>*/ }; + /*<>*/ return pad_prec_scanf + (ib, + rest$9, + readers, + pad$4, + prec$2, + scan$7, + function(ib){ + /*<>*/ return /*<>*/ runtime.caml_int64_of_string + (token_int_literal(conv$2, ib)); + }); + case 8: + switch(fmt$0[1][2]){ + case 5: + case 8: + var rest$11 = fmt$0[4], prec$4 = fmt$0[3], pad$6 = fmt$0[2]; + /*<>*/ return pad_prec_scanf + (ib, + rest$11, + readers, + pad$6, + prec$4, + scan_caml_float, + token_float); + case 6: + case 7: + var rest$12 = fmt$0[4], prec$5 = fmt$0[3], pad$7 = fmt$0[2]; + /*<>*/ return pad_prec_scanf + (ib, + rest$12, + readers, + pad$7, + prec$5, + scan_hex_float, + token_float); + default: + var rest$10 = fmt$0[4], prec$3 = fmt$0[3], pad$5 = fmt$0[2]; + /*<>*/ return pad_prec_scanf + (ib, + rest$10, + readers, + pad$5, + prec$3, + scan_float, + token_float); + } + case 9: + /*<>*/ var + rest$13 = fmt$0[2], + pad$8 = fmt$0[1], + /*<>*/ scan$8 = + function(param, _T_, ib){ + /*<>*/ var + /*<>*/ c = checked_peek_char(ib), + /*<>*/ m = + 102 === c + ? 5 + : 116 + === c + ? 4 + : bad_input + ( /*<>*/ caml_call2 + (Stdlib_Printf[4], _n_, c)); + /*<>*/ return scan_string(0, m, ib); + /*<>*/ }; + /*<>*/ return pad_prec_scanf + (ib, rest$13, readers, pad$8, 0, scan$8, token_bool); + case 10: + var rest$14 = fmt$0[1]; + /*<>*/ if(! end_of_input(ib)) + /*<>*/ return bad_input(cst_end_of_input_not_found); + var fmt$0 = rest$14; + break; + case 11: + /*<>*/ var + rest$15 = fmt$0[2], + str$0 = fmt$0[1], + /*<>*/ _H_ = + function(_S_){ /*<>*/ return check_char(ib, _S_);}; + /*<>*/ /*<>*/ caml_call2 + (Stdlib_String[29], _H_, str$0); + var fmt$0 = rest$15; + break; + case 12: + var rest$16 = fmt$0[2], chr = fmt$0[1]; + /*<>*/ check_char(ib, chr); + var fmt$0 = rest$16; + break; + case 13: + var rest$17 = fmt$0[3], fmtty = fmt$0[2], pad_opt = fmt$0[1]; + /*<>*/ scan_caml_string + (width_of_pad_opt(pad_opt), ib); + /*<>*/ /*<>*/ var + s = token_string(ib); + /*<>*/ try{ + /*<>*/ var + /*<>*/ _I_ = + /*<>*/ caml_call2 + (CamlinternalFormat[14], s, fmtty), + fmt$3 = _I_; + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(exn, 0); + var msg = exn[2], fmt$3 = bad_input(msg); + } + /*<>*/ return [0, + fmt$3, + make_scanf(ib, rest$17, readers)]; + case 14: + var rest$18 = fmt$0[3], fmtty$0 = fmt$0[2], pad_opt$0 = fmt$0[1]; + /*<>*/ scan_caml_string + (width_of_pad_opt(pad_opt$0), ib); + /*<>*/ /*<>*/ var + s$0 = token_string(ib); + try{ + /*<>*/ var + fmt$6 = + /*<>*/ caml_call2 + (CamlinternalFormat[13], 0, s$0) + [1], + fmt$7 = + /*<>*/ caml_call2 + (CamlinternalFormat[13], 0, s$0) + [1], + /*<>*/ _K_ = + /*<>*/ caml_call1 + (CamlinternalFormat[21], fmtty$0), + /*<>*/ _L_ = + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], _K_), + /*<>*/ fmt$8 = + /*<>*/ caml_call2 + (CamlinternalFormat[12], fmt$7, _L_), + /*<>*/ _M_ = + /*<>*/ caml_call1 + (CamlinternalFormatBasics[2], fmtty$0), + /*<>*/ _N_ = + /*<>*/ caml_call2 + (CamlinternalFormat[12], fmt$6, _M_), + fmt$5 = fmt$8, + fmt$4 = _N_; + } + catch(exn){ + var exn$0 = caml_wrap_exception(exn); + if(exn$0[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(exn$0, 0); + var + msg$0 = exn$0[2], + _J_ = bad_input(msg$0), + fmt$5 = _J_[2], + fmt$4 = _J_[1]; + } + /*<>*/ return [0, + [0, fmt$4, s$0], + make_scanf + (ib, + /*<>*/ caml_call2 + (CamlinternalFormatBasics[3], fmt$5, rest$18), + readers)]; + case 15: + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_scanf_bad_conversion_a); + case 16: + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_scanf_bad_conversion_t); + case 17: + /*<>*/ var + rest$19 = fmt$0[2], + formatting_lit = fmt$0[1], + /*<>*/ _O_ = + /*<>*/ caml_call1 + (CamlinternalFormat[17], formatting_lit), + /*<>*/ _P_ = + function(_R_){ /*<>*/ return check_char(ib, _R_);}; + /*<>*/ /*<>*/ caml_call2 + (Stdlib_String[29], _P_, _O_); + var fmt$0 = rest$19; + break; + case 18: + var _Q_ = fmt$0[1]; + if(0 === _Q_[0]){ + var rest$20 = fmt$0[2], fmt$9 = _Q_[1][1]; + /*<>*/ check_char(ib, 64); + /*<>*/ check_char(ib, 123); + /*<>*/ var + /*<>*/ fmt$10 = + /*<>*/ caml_call2 + (CamlinternalFormatBasics[3], fmt$9, rest$20), + fmt$0 = fmt$10; + } + else{ + var rest$21 = fmt$0[2], fmt$11 = _Q_[1][1]; + /*<>*/ check_char(ib, 64); + /*<>*/ check_char(ib, 91); + /*<>*/ var + /*<>*/ fmt$12 = + /*<>*/ caml_call2 + (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); + /*<>*/ var + readers_rest = readers[2], + reader = readers[1], + /*<>*/ x = + /*<>*/ caml_call1(reader, ib); + /*<>*/ return [0, + x, + make_scanf(ib, fmt_rest, readers_rest)]; + case 20: + var width_opt = fmt$0[1], match$1 = fmt$0[3]; + if(typeof match$1 !== "number" && 17 === match$1[0]){ + /*<>*/ var + rest$23 = match$1[2], + fmting_lit$0 = match$1[1], + char_set$0 = fmt$0[2], + /*<>*/ match$2 = + stopper_of_formatting_lit(fmting_lit$0), + str$1 = match$2[2], + stp$0 = match$2[1], + /*<>*/ width$2 = width_of_pad_opt(width_opt); + /*<>*/ scan_chars_in_char_set + (char_set$0, [0, stp$0], width$2, ib); + /*<>*/ var + /*<>*/ s$2 = token_string(ib), + /*<>*/ str_rest$0 = [11, str$1, rest$23]; + /*<>*/ return [0, + s$2, + make_scanf(ib, str_rest$0, readers)]; + } + /*<>*/ var + rest$22 = fmt$0[3], + char_set = fmt$0[2], + /*<>*/ width$1 = width_of_pad_opt(width_opt); + /*<>*/ scan_chars_in_char_set + (char_set, 0, width$1, ib); + /*<>*/ /*<>*/ var + s$1 = token_string(ib); + /*<>*/ return [0, + s$1, + make_scanf(ib, rest$22, readers)]; + case 21: + var rest$24 = fmt$0[2], counter = fmt$0[1]; + switch(counter){ + case 0: + var count = ib[5]; break; + case 1: + var count = char_count(ib); break; + default: var count = ib[6]; + } + /*<>*/ return [0, + count, + make_scanf(ib, rest$24, readers)]; + case 22: + /*<>*/ var + rest$25 = fmt$0[1], + /*<>*/ c$3 = checked_peek_char(ib); + /*<>*/ return [0, + c$3, + make_scanf(ib, rest$25, readers)]; + case 23: + /*<>*/ var + rest$26 = fmt$0[2], + ign = fmt$0[1], + fmt$13 = + /*<>*/ caml_call2 + (CamlinternalFormat[6], ign, rest$26) + [1], + /*<>*/ match$3 = make_scanf(ib, fmt$13, readers); + if(! match$3) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _s_], 1); + var arg_rest = match$3[2]; + /*<>*/ return arg_rest; + default: + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_scanf_bad_conversion_custo); + } + } + /*<>*/ } + 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]); + /*<>*/ try{ + /*<>*/ /*<>*/ var + args$1 = make_scanf(ib, fmt, readers); + } + catch(exc$0){ + var exc = caml_wrap_exception(exc$0); + if + (exc[1] !== Scan_failure && exc[1] !== Stdlib[7] && exc !== Stdlib[12]){ + if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); + /*<>*/ var + msg = exc[2], + /*<>*/ _C_ = + /*<>*/ caml_call1(Stdlib_String[24], str), + /*<>*/ _D_ = + /*<>*/ caml_call2(Stdlib[28], _C_, cst$0), + /*<>*/ _E_ = + /*<>*/ caml_call2(Stdlib[28], cst_in_format, _D_), + /*<>*/ _F_ = + /*<>*/ caml_call2(Stdlib[28], msg, _E_); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], _F_); + } + /*<>*/ return /*<>*/ caml_call2 + (ef, ib, exc); + } + var f = f$1, args = args$1; + /*<>*/ for(;;){ + if(! args) + /*<>*/ return /*<>*/ caml_call1 + (af, f); + /*<>*/ var + args$0 = args[2], + x = args[1], + /*<>*/ f$0 = + /*<>*/ caml_call1(f, x), + f = f$0, + args = args$0; + } + /*<>*/ } + /*<>*/ return take_format_readers(k, fmt); + } + function kscanf(ib, ef, fmt){ + /*<>*/ return kscanf_gen + (ib, + ef, + function(x){ + /*<>*/ return x; + /*<>*/ }, + fmt); + /*<>*/ } + function kscanf_opt(ib, fmt){ + function _A_(x){ + /*<>*/ return [0, x]; + /*<>*/ } + /*<>*/ return kscanf_gen + (ib, + function(param, _B_){ + /*<>*/ return 0; + /*<>*/ }, + _A_, + fmt); + /*<>*/ } + function bscanf(ib, fmt){ + /*<>*/ return kscanf(ib, scanf_bad_input, fmt); + /*<>*/ } + function bscanf_opt(ib, fmt){ + /*<>*/ return kscanf_opt(ib, fmt); + /*<>*/ } + function ksscanf(s, ef, fmt){ + /*<>*/ return kscanf(from_string(s), ef, fmt); + /*<>*/ } + function sscanf(s, fmt){ + /*<>*/ return kscanf + (from_string(s), scanf_bad_input, fmt); + /*<>*/ } + function sscanf_opt(s, fmt){ + /*<>*/ return kscanf_opt(from_string(s), fmt); + /*<>*/ } + function scanf(fmt){ + /*<>*/ return kscanf(stdin, scanf_bad_input, fmt); + /*<>*/ } + function scanf_opt(fmt){ + /*<>*/ return kscanf_opt(stdin, fmt); + /*<>*/ } + function bscanf_format(ib, format, f){ + /*<>*/ scan_caml_string(Stdlib[19], ib); + /*<>*/ /*<>*/ var + str = token_string(ib); + /*<>*/ try{ + /*<>*/ var + /*<>*/ _z_ = + /*<>*/ caml_call2 + (CamlinternalFormat[15], str, format), + fmt = _z_; + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(exn, 0); + var msg = exn[2], fmt = bad_input(msg); + } + /*<>*/ return /*<>*/ caml_call1 + (f, fmt); + /*<>*/ } + function sscanf_format(s, format, f){ + /*<>*/ return bscanf_format(from_string(s), format, f); + /*<>*/ } + function format_from_string(s, fmt){ + /*<>*/ function _w_(x){ + /*<>*/ return x; + /*<>*/ } + /*<>*/ var + /*<>*/ _x_ = + /*<>*/ caml_call1(Stdlib_String[24], s), + /*<>*/ _y_ = + /*<>*/ caml_call2(Stdlib[28], _x_, cst$1); + /*<>*/ return sscanf_format + ( /*<>*/ caml_call2(Stdlib[28], cst$2, _y_), + fmt, + _w_); + /*<>*/ } + function unescaped(s){ + /*<>*/ function _u_(x){ + /*<>*/ return x; + /*<>*/ } + /*<>*/ /*<>*/ var + _v_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); + /*<>*/ return /*<>*/ caml_call1 + (sscanf + ( /*<>*/ caml_call2(Stdlib[28], cst$4, _v_), + _t_), + _u_); + /*<>*/ } + var + Stdlib_Scanf = + [0, + [0, + stdin, + open_in, + open_in_bin, + close_in, + open_in, + open_in_bin, + from_string, + from_function, + from_channel, + end_of_input, + beginning_of_input, + name_of_input], + Scan_failure, + bscanf, + bscanf_opt, + sscanf, + sscanf_opt, + scanf, + scanf_opt, + kscanf, + ksscanf, + bscanf_format, + sscanf_format, + format_from_string, + unescaped]; + runtime.caml_register_global(64, Stdlib_Scanf, "Stdlib__Scanf"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Callback +//# unitInfo: Requires: Stdlib, Stdlib__Obj +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_register_named_value = runtime.caml_register_named_value, + global_data = runtime.caml_get_global_data(), + Stdlib_Obj = global_data.Stdlib__Obj, + register = caml_register_named_value; + function register_exception(name, exn){ + /*<>*/ var + _a_ = Stdlib_Obj[10], + slot = + /*<>*/ runtime.caml_obj_tag(exn) === _a_ + ? exn + : exn[1]; + /*<>*/ return /*<>*/ caml_register_named_value + (name, slot); + /*<>*/ } + var Stdlib_Callback = [0, register, register_exception]; + runtime.caml_register_global(1, Stdlib_Callback, "Stdlib__Callback"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: CamlinternalOO +//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Map, Stdlib__Obj, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_camlinternalOO_ml = "camlinternalOO.ml", + caml_check_bound = runtime.caml_check_bound, + caml_div = runtime.caml_div, + caml_get_public_method = runtime.caml_get_public_method, + caml_make_vect = runtime.caml_make_vect, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_obj_block = runtime.caml_obj_block, + caml_set_oo_id = runtime.caml_set_oo_id, + caml_string_compare = runtime.caml_string_compare, + 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) + : 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 + global_data = runtime.caml_get_global_data(), + Assert_failure = global_data.Assert_failure, + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib_Obj = global_data.Stdlib__Obj, + Stdlib = global_data.Stdlib, + Stdlib_Array = global_data.Stdlib__Array, + Stdlib_List = global_data.Stdlib__List, + Stdlib_Map = global_data.Stdlib__Map, + _g_ = [0, cst_camlinternalOO_ml, 439, 17], + _f_ = [0, cst_camlinternalOO_ml, 421, 13], + _e_ = [0, cst_camlinternalOO_ml, 418, 13], + _d_ = [0, cst_camlinternalOO_ml, 415, 13], + _c_ = [0, cst_camlinternalOO_ml, 412, 13], + _b_ = [0, cst_camlinternalOO_ml, 409, 13], + _a_ = [0, cst_camlinternalOO_ml, 281, 50]; + function copy(o){ + /*<>*/ /*<>*/ var + o$0 = /*<>*/ o.slice(); + /*<>*/ return /*<>*/ caml_set_oo_id + (o$0); + /*<>*/ } + /*<>*/ var + /*<>*/ params = [0, 1, 1, 1, 3, 16], + /*<>*/ initial_object_size = 2, + dummy_item = 0; + function public_method_label(s){ + /*<>*/ var + /*<>*/ accu = [0, 0], + _aE_ = runtime.caml_ml_string_length(s) - 1 | 0, + /*<>*/ _aD_ = 0; + if(_aE_ >= 0){ + var i = _aD_; + for(;;){ + /*<>*/ /*<>*/ var + _aF_ = /*<>*/ runtime.caml_string_get(s, i); + accu[1] = (223 * accu[1] | 0) + _aF_ | 0; + /*<>*/ /*<>*/ var + _aG_ = i + 1 | 0; + if(_aE_ === i) break; + var i = _aG_; + } + } + accu[1] = accu[1] & 2147483647; + var tag = 1073741823 < accu[1] ? accu[1] + 2147483648 | 0 : accu[1]; + /*<>*/ return tag; + /*<>*/ } + /*<>*/ var + compare = caml_string_compare, + Vars = caml_call1(Stdlib_Map[1], [0, compare]), + compare$0 = caml_string_compare, + Meths = caml_call1(Stdlib_Map[1], [0, compare$0]), + compare$1 = runtime.caml_int_compare, + Labs = caml_call1(Stdlib_Map[1], [0, compare$1]), + /*<>*/ dummy_table = + [0, 0, [0, dummy_item], Meths[1], Labs[1], 0, 0, Vars[1], 0], + /*<>*/ table_count = [0, 0], + /*<>*/ dummy_met = + /*<>*/ caml_obj_block(0, 0); + function fit_size(n){ + /*<>*/ return 2 < n + ? fit_size((n + 1 | 0) / 2 | 0) * 2 | 0 + : n; + /*<>*/ } + function new_table(pub_labels){ + /*<>*/ table_count[1]++; + /*<>*/ var + len = pub_labels.length - 1, + /*<>*/ methods = + /*<>*/ caml_make_vect + ((len * 2 | 0) + 2 | 0, dummy_met); + /*<>*/ caml_check_bound(methods, 0)[1] = len; + var + _aw_ = Stdlib_Sys[9], + _ax_ = + ( /*<>*/ runtime.caml_mul + (fit_size(len), _aw_) + / 8 + | 0) + - 1 + | 0; + /*<>*/ caml_check_bound(methods, 1)[2] = _ax_; + /*<>*/ var + _az_ = len - 1 | 0, + /*<>*/ _ay_ = 0; + if(_az_ >= 0){ + var i = _ay_; + for(;;){ + /*<>*/ var + _aB_ = (i * 2 | 0) + 3 | 0, + /*<>*/ _aA_ = + caml_check_bound(pub_labels, i)[1 + i]; + /*<>*/ caml_check_bound(methods, _aB_) + [1 + _aB_] + = _aA_; + /*<>*/ /*<>*/ var + _aC_ = i + 1 | 0; + if(_az_ === i) break; + var i = _aC_; + } + } + /*<>*/ return [0, + initial_object_size, + methods, + Meths[1], + Labs[1], + 0, + 0, + Vars[1], + 0]; + /*<>*/ } + function resize(array, new_size){ + /*<>*/ var + old_size = array[2].length - 1, + _au_ = old_size < new_size ? 1 : 0; + if(_au_){ + /*<>*/ /*<>*/ var + new_buck = + /*<>*/ caml_make_vect(new_size, dummy_met); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Array[8], array[2], 0, new_buck, 0, old_size); + array[2] = new_buck; + var _av_ = 0; + } + else + var _av_ = _au_; + return _av_; + /*<>*/ } + /*<>*/ var + /*<>*/ method_count = [0, 0], + /*<>*/ inst_var_count = [0, 0]; + function new_method(table){ + /*<>*/ var index = table[2].length - 1; + /*<>*/ resize(table, index + 1 | 0); + /*<>*/ return index; + /*<>*/ } + function get_method_label(table, name){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _as_ = + /*<>*/ caml_call2(Meths[28], name, table[3]); + /*<>*/ return _as_; + } + catch(_at_){ + var _ar_ = caml_wrap_exception(_at_); + if(_ar_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ar_, 0); + /*<>*/ /*<>*/ var + label = new_method(table); + table[3] = + /*<>*/ caml_call3 + (Meths[4], name, label, table[3]); + table[4] = + /*<>*/ caml_call3 + (Labs[4], label, 1, table[4]); + /*<>*/ return label; + } + /*<>*/ } + function get_method_labels(table, names){ + /*<>*/ function _ap_(_aq_){ + /*<>*/ return get_method_label(table, _aq_); + } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Array[13], _ap_, names); + /*<>*/ } + function set_method(table, label, element){ + /*<>*/ method_count[1]++; + /*<>*/ return /*<>*/ caml_call2 + (Labs[28], label, table[4]) + ? (resize + (table, label + 1 | 0), + caml_check_bound(table[2], label)[1 + label] = element, + 0) + : (table[6] = [0, [0, label, element], table[6]], 0); + /*<>*/ } + function get_method(table, label){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _an_ = + /*<>*/ caml_call2 + (Stdlib_List[46], label, table[6]); + /*<>*/ return _an_; + } + catch(_ao_){ + var _am_ = caml_wrap_exception(_ao_); + if(_am_ === Stdlib[8]) + /*<>*/ return caml_check_bound + (table[2], label) + [1 + label]; + throw caml_maybe_attach_backtrace(_am_, 0); + } + /*<>*/ } + function to_list(arr){ + /*<>*/ return 0 === arr + ? 0 + : /*<>*/ caml_call1 + (Stdlib_Array[9], arr); + /*<>*/ } + function narrow(table, vars, virt_meths, concr_meths){ + /*<>*/ var + /*<>*/ vars$0 = to_list(vars), + /*<>*/ virt_meths$0 = to_list(virt_meths), + /*<>*/ concr_meths$0 = to_list(concr_meths); + /*<>*/ function _X_(_al_){ + /*<>*/ return get_method_label(table, _al_); + } + /*<>*/ /*<>*/ var + virt_meth_labs = + /*<>*/ caml_call2 + (Stdlib_List[19], _X_, virt_meths$0); + /*<>*/ function _Y_(_ak_){ + /*<>*/ return get_method_label(table, _ak_); + } + /*<>*/ /*<>*/ var + concr_meth_labs = + /*<>*/ caml_call2 + (Stdlib_List[19], _Y_, concr_meths$0); + table[5] = + [0, + [0, table[3], table[4], table[6], table[7], virt_meth_labs, vars$0], + table[5]]; + var _Z_ = Vars[1], ___ = table[7]; + function _$_(lab, info, tvars){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[36], lab, vars$0) + ? /*<>*/ caml_call3 + (Vars[4], lab, info, tvars) + : tvars; + /*<>*/ } + table[7] = + /*<>*/ caml_call3(Vars[13], _$_, ___, _Z_); + /*<>*/ var + /*<>*/ by_name = [0, Meths[1]], + /*<>*/ by_label = [0, Labs[1]]; + function _aa_(met, label){ + /*<>*/ by_name[1] = + /*<>*/ caml_call3 + (Meths[4], met, label, by_name[1]); + var _af_ = by_label[1]; + try{ + /*<>*/ var + /*<>*/ _ai_ = + /*<>*/ caml_call2 + (Labs[28], label, table[4]), + _ah_ = _ai_; + } + catch(_aj_){ + var _ag_ = caml_wrap_exception(_aj_); + if(_ag_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ag_, 0); + var _ah_ = 1; + } + by_label[1] = + /*<>*/ caml_call3(Labs[4], label, _ah_, _af_); + return 0; + /*<>*/ } + /*<>*/ /*<>*/ caml_call3 + (Stdlib_List[27], _aa_, concr_meths$0, concr_meth_labs); + function _ab_(met, label){ + /*<>*/ by_name[1] = + /*<>*/ caml_call3 + (Meths[4], met, label, by_name[1]); + by_label[1] = + /*<>*/ caml_call3 + (Labs[4], label, 0, by_label[1]); + return 0; + /*<>*/ } + /*<>*/ /*<>*/ caml_call3 + (Stdlib_List[27], _ab_, virt_meths$0, virt_meth_labs); + table[3] = by_name[1]; + table[4] = by_label[1]; + /*<>*/ var + /*<>*/ _ac_ = 0, + _ad_ = table[6]; + function _ae_(met, hm){ + /*<>*/ var lab = met[1]; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[36], lab, virt_meth_labs) + ? hm + : [0, met, hm]; + /*<>*/ } + table[6] = + /*<>*/ caml_call3 + (Stdlib_List[26], _ae_, _ad_, _ac_); + return 0; + /*<>*/ } + function widen(table){ + /*<>*/ var + /*<>*/ match = + /*<>*/ caml_call1(Stdlib_List[5], 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[6], table[5]); + function _T_(s, v){ + /*<>*/ /*<>*/ var + _W_ = + /*<>*/ caml_call2(Vars[28], v, table[7]); + /*<>*/ return /*<>*/ caml_call3 + (Vars[4], v, _W_, s); + /*<>*/ } + table[7] = + /*<>*/ caml_call3 + (Stdlib_List[25], _T_, saved_vars, vars); + table[3] = by_name; + table[4] = by_label; + var _U_ = table[6]; + function _V_(met, hm){ + /*<>*/ var lab = met[1]; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[36], lab, virt_meths) + ? hm + : [0, met, hm]; + /*<>*/ } + table[6] = + /*<>*/ caml_call3 + (Stdlib_List[26], _V_, _U_, saved_hidden_meths); + return 0; + /*<>*/ } + function new_variable(table, name){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _R_ = + /*<>*/ caml_call2(Vars[28], name, table[7]); + /*<>*/ return _R_; + } + catch(_S_){ + var _Q_ = caml_wrap_exception(_S_); + if(_Q_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Q_, 0); + var index = table[1]; + table[1] = index + 1 | 0; + /*<>*/ if + ( /*<>*/ runtime.caml_string_notequal(name, "")) + table[7] = + /*<>*/ caml_call3 + (Vars[4], name, index, table[7]); + /*<>*/ return index; + } + /*<>*/ } + function to_array(arr){ + /*<>*/ return /*<>*/ runtime.caml_equal + (arr, 0) + ? [0] + : arr; + /*<>*/ } + function new_methods_variables(table, meths, vals){ + /*<>*/ var + /*<>*/ meths$0 = to_array(meths), + /*<>*/ nmeths = meths$0.length - 1, + nvals = vals.length - 1, + /*<>*/ res = + /*<>*/ caml_make_vect(nmeths + nvals | 0, 0), + /*<>*/ _I_ = nmeths - 1 | 0, + /*<>*/ _H_ = 0; + if(_I_ >= 0){ + var i$0 = _H_; + for(;;){ + /*<>*/ /*<>*/ var + _O_ = get_method_label(table, caml_check_bound(meths$0, i$0)[1 + i$0]); + /*<>*/ caml_check_bound(res, i$0)[1 + i$0] = _O_; + /*<>*/ /*<>*/ var + _P_ = i$0 + 1 | 0; + if(_I_ === i$0) break; + var i$0 = _P_; + } + } + /*<>*/ var + _K_ = nvals - 1 | 0, + /*<>*/ _J_ = 0; + if(_K_ >= 0){ + var i = _J_; + for(;;){ + /*<>*/ var + _M_ = i + nmeths | 0, + /*<>*/ _L_ = + new_variable(table, caml_check_bound(vals, i)[1 + i]); + /*<>*/ caml_check_bound(res, _M_)[1 + _M_] = _L_; + /*<>*/ /*<>*/ var + _N_ = i + 1 | 0; + if(_K_ === i) break; + var i = _N_; + } + } + /*<>*/ return res; + /*<>*/ } + function get_variable(table, name){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + _F_ = + /*<>*/ caml_call2(Vars[28], name, table[7]); + /*<>*/ return _F_; + } + catch(_G_){ + var _E_ = caml_wrap_exception(_G_); + if(_E_ === Stdlib[8]) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); + throw caml_maybe_attach_backtrace(_E_, 0); + } + /*<>*/ } + function get_variables(table, names){ + /*<>*/ function _C_(_D_){ + /*<>*/ return get_variable(table, _D_); + } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Array[13], _C_, names); + /*<>*/ } + function add_initializer(table, f){ + /*<>*/ table[8] = [0, f, table[8]]; + return 0; + /*<>*/ } + function create_table(public_methods){ + /*<>*/ if(0 === public_methods) + /*<>*/ return new_table([0]); + /*<>*/ var + /*<>*/ tags = + /*<>*/ caml_call2 + (Stdlib_Array[13], public_method_label, public_methods), + /*<>*/ table = new_table(tags); + function _B_(i, met){ + /*<>*/ var lab = (i * 2 | 0) + 2 | 0; + table[3] = + /*<>*/ caml_call3 + (Meths[4], met, lab, table[3]); + table[4] = + /*<>*/ caml_call3(Labs[4], lab, 1, table[4]); + return 0; + /*<>*/ } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Array[12], _B_, public_methods); + /*<>*/ return table; + /*<>*/ } + function init_class(table){ + /*<>*/ inst_var_count[1] = + (inst_var_count[1] + table[1] | 0) - 1 | 0; + table[8] = + /*<>*/ caml_call1(Stdlib_List[9], table[8]); + /*<>*/ /*<>*/ var + _A_ = Stdlib_Sys[9]; + return resize + (table, + 3 + caml_div(caml_check_bound(table[2], 1)[2] * 16 | 0, _A_) | 0); + /*<>*/ } + function inherits(cla, vals, virt_meths, concr_meths, param, top){ + var env = param[4], super$0 = param[2]; + /*<>*/ narrow + (cla, vals, virt_meths, concr_meths); + var + init = + top + ? /*<>*/ caml_call2(super$0, cla, env) + : /*<>*/ caml_call1(super$0, cla); + /*<>*/ widen(cla); + /*<>*/ var + /*<>*/ _s_ = 0, + /*<>*/ _t_ = to_array(concr_meths); + function _u_(nm){ + /*<>*/ return get_method + (cla, get_method_label(cla, nm)); + /*<>*/ } + /*<>*/ var + _v_ = + [0, + /*<>*/ caml_call2 + (Stdlib_Array[13], _u_, _t_), + _s_], + /*<>*/ _w_ = to_array(vals); + /*<>*/ function _x_(_z_){ + /*<>*/ return get_variable(cla, _z_); + } + /*<>*/ /*<>*/ var + _y_ = + [0, + [0, init], + [0, + /*<>*/ caml_call2 + (Stdlib_Array[13], _x_, _w_), + _v_]]; + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Array[4], _y_); + } + function make_class(pub_meths, class_init){ + /*<>*/ var + /*<>*/ table = create_table(pub_meths), + /*<>*/ env_init = + /*<>*/ caml_call1(class_init, table); + /*<>*/ init_class(table); + /*<>*/ return [0, + /*<>*/ caml_call1(env_init, 0), + class_init, + env_init, + 0]; + /*<>*/ } + function make_class_store(pub_meths, class_init, init_table){ + /*<>*/ var + /*<>*/ table = create_table(pub_meths), + /*<>*/ env_init = + /*<>*/ caml_call1(class_init, table); + /*<>*/ init_class(table); + init_table[2] = class_init; + init_table[1] = env_init; + return 0; + /*<>*/ } + function dummy_class(loc){ + function undef(param){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stdlib[15], loc], 1); + /*<>*/ } + /*<>*/ return [0, undef, undef, undef, 0]; + /*<>*/ } + function create_object(table){ + /*<>*/ /*<>*/ var + obj = + /*<>*/ caml_obj_block + (Stdlib_Obj[10], table[1]); + /*<>*/ obj[1] = table[2]; + /*<>*/ return /*<>*/ caml_set_oo_id + (obj); + /*<>*/ } + function create_object_opt(obj_0, table){ + /*<>*/ if(obj_0) + /*<>*/ return obj_0; + /*<>*/ /*<>*/ var + obj = + /*<>*/ caml_obj_block + (Stdlib_Obj[10], table[1]); + /*<>*/ obj[1] = table[2]; + /*<>*/ return /*<>*/ caml_set_oo_id + (obj); + /*<>*/ } + function iter_f(obj, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + var l = param$0[2], f = param$0[1]; + /*<>*/ /*<>*/ caml_call1 + (f, obj); + var param$0 = l; + } + } + function run_initializers(obj, table){ + /*<>*/ var + inits = table[8], + _r_ = 0 !== inits ? 1 : 0; + return _r_ ? iter_f(obj, inits) : _r_; + /*<>*/ } + function run_initializers_opt(obj_0, obj, table){ + /*<>*/ if(obj_0) + /*<>*/ return obj; + var inits = table[8]; + if(0 !== inits) /*<>*/ iter_f(obj, inits); + /*<>*/ return obj; + /*<>*/ } + function create_object_and_run_initiali(obj_0, table){ + /*<>*/ if(obj_0) + /*<>*/ return obj_0; + /*<>*/ /*<>*/ var + obj = create_object(table); + /*<>*/ run_initializers(obj, table); + /*<>*/ return obj; + /*<>*/ } + function get_data(param){ + /*<>*/ if(param) + /*<>*/ return param[2]; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _e_], 1); + /*<>*/ } + function build_path(n, keys, tables){ + /*<>*/ var + /*<>*/ res = [0, 0, 0, 0], + /*<>*/ r = [0, res], + /*<>*/ _o_ = 0; + if(n >= 0){ + var i = _o_; + for(;;){ + var _p_ = r[1]; + r[1] = [0, caml_check_bound(keys, i)[1 + i], _p_, 0]; + /*<>*/ /*<>*/ var + _q_ = i + 1 | 0; + if(n === i) break; + var i = _q_; + } + } + var v = r[1]; + if(! tables) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + tables[2] = v; + /*<>*/ return res; + /*<>*/ } + function lookup_tables(root, keys){ + /*<>*/ /*<>*/ var + root_data = get_data(root); + if(! root_data) + /*<>*/ return build_path + (keys.length - 1 - 1 | 0, keys, root); + var i$1 = keys.length - 1 - 1 | 0, i = i$1, tables$0 = root_data; + /*<>*/ for(;;){ + if(0 > i) /*<>*/ return tables$0; + /*<>*/ var + /*<>*/ key = caml_check_bound(keys, i)[1 + i], + tables$1 = tables$0; + /*<>*/ for(;;){ + if(! tables$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _d_], 1); + if(tables$1[1] === key){ + /*<>*/ /*<>*/ var + tables_data = get_data(tables$1); + if(! tables_data) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _g_], 1); + var i$0 = i - 1 | 0, i = i$0, tables$0 = tables_data; + break; + } + if(! tables$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _f_], 1); + /*<>*/ /*<>*/ var + tables = tables$1[3]; + if(! tables){ + /*<>*/ /*<>*/ var + next = [0, key, 0, 0]; + if(! tables$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _c_], 1); + tables$1[3] = next; + /*<>*/ return build_path + (i - 1 | 0, keys, next); + } + var tables$1 = tables; + } + } + /*<>*/ } + function new_cache(table){ + /*<>*/ /*<>*/ var + n = new_method(table); + a: + { + if(0 !== (n % 2 | 0)){ + var _n_ = Stdlib_Sys[9]; + if + ((2 + caml_div(caml_check_bound(table[2], 1)[2] * 16 | 0, _n_) | 0) + >= n){ + var n$0 = new_method(table); + break a; + } + } + var n$0 = n; + } + /*<>*/ caml_check_bound(table[2], n$0)[1 + n$0] + = 0; + /*<>*/ return n$0; + /*<>*/ } + function set_methods(table, methods){ + /*<>*/ var + len = methods.length - 1, + /*<>*/ i = [0, 0]; + for(;;){ + if(i[1] >= len) return 0; + /*<>*/ var + _h_ = i[1], + /*<>*/ label = + caml_check_bound(methods, _h_)[1 + _h_], + next = + function(param){ + /*<>*/ i[1]++; + var _m_ = i[1]; + /*<>*/ return caml_check_bound + (methods, _m_) + [1 + _m_]; + /*<>*/ }, + /*<>*/ clo = next(0); + if(typeof clo === "number") + switch(clo){ + case 0: + /*<>*/ var + /*<>*/ x = next(0), + clo$0 = + function(x){ + /*<>*/ return function(obj){ + /*<>*/ return x; /*<>*/ }; + } + (x); + break; + case 1: + /*<>*/ var + /*<>*/ n = next(0), + clo$0 = + function(n){ + /*<>*/ return function(obj){ + /*<>*/ return obj[1 + n]; /*<>*/ }; + } + (n); + break; + case 2: + /*<>*/ var + /*<>*/ e = next(0), + /*<>*/ n$0 = next(0), + clo$0 = + function(e, n){ + /*<>*/ return function(obj){ + /*<>*/ return obj[1 + e][1 + n]; /*<>*/ }; + } + (e, n$0); + break; + case 3: + /*<>*/ var + /*<>*/ n$1 = next(0), + clo$0 = + function(n){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call1 + (obj[1][1 + n], obj); /*<>*/ }; + } + (n$1); + break; + case 4: + /*<>*/ var + /*<>*/ n$2 = next(0), + clo$0 = + function(n){ + /*<>*/ return function(obj, x){ + /*<>*/ obj[1 + n] = x; + return 0; /*<>*/ }; + } + (n$2); + break; + case 5: + /*<>*/ var + /*<>*/ f = next(0), + /*<>*/ x$0 = next(0), + clo$0 = + function(f, x){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call1 + (f, x); /*<>*/ }; + } + (f, x$0); + break; + case 6: + /*<>*/ var + /*<>*/ f$0 = next(0), + /*<>*/ n$3 = next(0), + clo$0 = + function(f, n){ + /*<>*/ return function(obj){ + /*<>*/ return caml_call1 + (f, obj[1 + n]); /*<>*/ }; + } + (f$0, n$3); + break; + case 7: + /*<>*/ var + /*<>*/ f$1 = next(0), + /*<>*/ e$0 = next(0), + /*<>*/ n$4 = next(0), + clo$0 = + function(f, e, n){ + /*<>*/ return function(obj){ + /*<>*/ return caml_call1 + (f, obj[1 + e][1 + n]); /*<>*/ }; + } + (f$1, e$0, n$4); + break; + case 8: + /*<>*/ var + /*<>*/ f$2 = next(0), + /*<>*/ n$5 = next(0), + clo$0 = + function(f, n){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call1 + (f, + /*<>*/ caml_call1 + (obj[1][1 + n], obj)); /*<>*/ }; + } + (f$2, n$5); + break; + case 9: + /*<>*/ var + /*<>*/ f$3 = next(0), + /*<>*/ x$1 = next(0), + /*<>*/ y = next(0), + clo$0 = + function(f, x, y){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call2 + (f, x, y); /*<>*/ }; + } + (f$3, x$1, y); + break; + case 10: + /*<>*/ var + /*<>*/ f$4 = next(0), + /*<>*/ x$2 = next(0), + /*<>*/ n$6 = next(0), + clo$0 = + function(f, x, n){ + /*<>*/ return function(obj){ + /*<>*/ return caml_call2 + (f, x, obj[1 + n]); /*<>*/ }; + } + (f$4, x$2, n$6); + break; + case 11: + /*<>*/ var + /*<>*/ f$5 = next(0), + /*<>*/ x$3 = next(0), + /*<>*/ e$1 = next(0), + /*<>*/ n$7 = next(0), + clo$0 = + function(f, x, e, n){ + /*<>*/ return function(obj){ + /*<>*/ return caml_call2 + (f, x, obj[1 + e][1 + n]); /*<>*/ }; + } + (f$5, x$3, e$1, n$7); + break; + case 12: + /*<>*/ var + /*<>*/ f$6 = next(0), + /*<>*/ x$4 = next(0), + /*<>*/ n$8 = next(0), + clo$0 = + function(f, x, n){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call2 + (f, + x, + /*<>*/ caml_call1 + (obj[1][1 + n], obj)); /*<>*/ }; + } + (f$6, x$4, n$8); + break; + case 13: + /*<>*/ var + /*<>*/ f$7 = next(0), + /*<>*/ n$9 = next(0), + /*<>*/ x$5 = next(0), + clo$0 = + function(f, n, x){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call2 + (f, obj[1 + n], x); /*<>*/ }; + } + (f$7, n$9, x$5); + break; + case 14: + /*<>*/ var + /*<>*/ f$8 = next(0), + /*<>*/ e$2 = next(0), + /*<>*/ n$10 = next(0), + /*<>*/ x$6 = next(0), + clo$0 = + function(f, e, n, x){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call2 + (f, obj[1 + e][1 + n], x); /*<>*/ }; + } + (f$8, e$2, n$10, x$6); + break; + case 15: + /*<>*/ var + /*<>*/ f$9 = next(0), + /*<>*/ n$11 = next(0), + /*<>*/ x$7 = next(0), + clo$0 = + function(f, n, x){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call2 + (f, + /*<>*/ caml_call1 + (obj[1][1 + n], obj), + x); /*<>*/ }; + } + (f$9, n$11, x$7); + break; + case 16: + /*<>*/ var + /*<>*/ n$12 = next(0), + /*<>*/ x$8 = next(0), + clo$0 = + function(n, x){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call2 + (obj[1][1 + n], obj, x); /*<>*/ }; + } + (n$12, x$8); + break; + case 17: + /*<>*/ var + /*<>*/ n$13 = next(0), + /*<>*/ m = next(0), + clo$0 = + function(n, m){ + /*<>*/ return function(obj){ + /*<>*/ return caml_call2 + (obj[1][1 + n], obj, obj[1 + m]); /*<>*/ }; + } + (n$13, m); + break; + case 18: + /*<>*/ var + /*<>*/ n$14 = next(0), + /*<>*/ e$3 = next(0), + /*<>*/ m$0 = next(0), + clo$0 = + function(n, e, m){ + /*<>*/ return function(obj){ + /*<>*/ return caml_call2 + (obj[1][1 + n], obj, obj[1 + e][1 + m]); /*<>*/ }; + } + (n$14, e$3, m$0); + break; + case 19: + /*<>*/ var + /*<>*/ n$15 = next(0), + /*<>*/ m$1 = next(0), + clo$0 = + function(n, m){ + /*<>*/ return function(obj){ + /*<>*/ /*<>*/ var + _k_ = + /*<>*/ caml_call1 + (obj[1][1 + m], obj); + /*<>*/ return /*<>*/ caml_call2 + (obj[1][1 + n], obj, _k_); /*<>*/ }; + } + (n$15, m$1); + break; + case 20: + /*<>*/ var + /*<>*/ m$2 = next(0), + /*<>*/ x$9 = next(0); + /*<>*/ new_cache(table); + var + clo$0 = + function(m, x){ + /*<>*/ return function(obj){ + /*<>*/ return /*<>*/ caml_call1 + (caml_get_public_method(x, m, 0), x); /*<>*/ }; + } + (m$2, x$9); + break; + case 21: + /*<>*/ var + /*<>*/ m$3 = next(0), + /*<>*/ n$16 = next(0); + /*<>*/ new_cache(table); + var + clo$0 = + function(m, n){ + /*<>*/ return function(obj){ + /*<>*/ var _j_ = obj[1 + n]; + return caml_call1(caml_get_public_method(_j_, m, 0), _j_); /*<>*/ }; + } + (m$3, n$16); + break; + case 22: + /*<>*/ var + /*<>*/ m$4 = next(0), + /*<>*/ e$4 = next(0), + /*<>*/ n$17 = next(0); + /*<>*/ new_cache(table); + var + clo$0 = + function(m, e, n){ + /*<>*/ return function(obj){ + /*<>*/ var _i_ = obj[1 + e][1 + n]; + return caml_call1(caml_get_public_method(_i_, m, 0), _i_); /*<>*/ }; + } + (m$4, e$4, n$17); + break; + default: + /*<>*/ var + /*<>*/ m$5 = next(0), + /*<>*/ n$18 = next(0); + /*<>*/ new_cache(table); + var + clo$0 = + function(m, n){ + /*<>*/ return function(obj){ + /*<>*/ /*<>*/ var + _l_ = + /*<>*/ caml_call1 + (obj[1][1 + n], obj); + /*<>*/ return /*<>*/ caml_call1 + (caml_get_public_method(_l_, m, 0), _l_); /*<>*/ }; + } + (m$5, n$18); + } + else + var clo$0 = clo; + /*<>*/ set_method(table, label, clo$0); + i[1]++; + } + /*<>*/ } + function stats(param){ + /*<>*/ return [0, + table_count[1], + method_count[1], + inst_var_count[1]]; + /*<>*/ } + var + CamlinternalOO = + [0, + public_method_label, + new_method, + new_variable, + new_methods_variables, + get_variable, + get_variables, + get_method_label, + get_method_labels, + get_method, + set_method, + set_methods, + narrow, + widen, + add_initializer, + dummy_table, + create_table, + init_class, + inherits, + make_class, + make_class_store, + dummy_class, + copy, + create_object, + create_object_opt, + run_initializers, + run_initializers_opt, + create_object_and_run_initiali, + lookup_tables, + params, + stats]; + runtime.caml_register_global(17, CamlinternalOO, "CamlinternalOO"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Oo +//# unitInfo: Requires: CamlinternalOO +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(), + CamlinternalOO = global_data.CamlinternalOO, + copy = CamlinternalOO[22], + new_method = CamlinternalOO[1], + public_method_label = CamlinternalOO[1], + Stdlib_Oo = [0, copy, new_method, public_method_label]; + runtime.caml_register_global(1, Stdlib_Oo, "Stdlib__Oo"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: CamlinternalMod +//# unitInfo: Requires: Assert_failure, CamlinternalLazy, CamlinternalOO, Stdlib, Stdlib__Obj +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst_camlinternalMod_ml = "camlinternalMod.ml", + caml_check_bound = runtime.caml_check_bound, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + 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 + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + CamlinternalLazy = global_data.CamlinternalLazy, + CamlinternalOO = global_data.CamlinternalOO, + Assert_failure = global_data.Assert_failure, + _a_ = [0, cst_camlinternalMod_ml, 72, 5], + _b_ = [0, cst_camlinternalMod_ml, 81, 2], + cst_CamlinternalMod_update_mod = + "CamlinternalMod.update_mod: not a module", + cst_CamlinternalMod_init_mod_n = "CamlinternalMod.init_mod: not a module"; + function init_mod_block(loc, comps$0){ + /*<>*/ var + length = comps$0.length - 1, + /*<>*/ modu = + /*<>*/ runtime.caml_obj_block(0, length), + /*<>*/ _h_ = length - 1 | 0, + /*<>*/ _g_ = 0; + if(_h_ >= 0){ + var i = _g_; + for(;;){ + /*<>*/ /*<>*/ var + shape = caml_check_bound(comps$0, i)[1 + i]; + if(typeof shape === "number") + switch(shape){ + case 0: + var + fn$0 = + function(i){ + function fn(x){ + /*<>*/ /*<>*/ var + fn$0 = modu[1 + i]; + if(fn === fn$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stdlib[15], loc], 1); + /*<>*/ return /*<>*/ caml_call1 + (fn$0, x); + /*<>*/ } + return fn; + }, + fn = fn$0(i), + init = fn; + break; + case 1: + var l = []; + runtime.caml_update_dummy + (l, + [246, + function(l, i){ + /*<>*/ return function(param){ + /*<>*/ /*<>*/ var + l$0 = modu[1 + i]; + if(l === l$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stdlib[15], loc], 1); + var _j_ = caml_obj_tag(l$0); + if(250 === _j_) return l$0[1]; + if(246 !== _j_ && 244 !== _j_) + /*<>*/ return l$0; + /*<>*/ return /*<>*/ caml_call1 + (CamlinternalLazy[2], l$0);}; + } + (l, i)]); + var init = l; + break; + default: + var + init = + /*<>*/ caml_call1 + (CamlinternalOO[21], loc); + } + else if(0 === shape[0]) + var comps = shape[1], init = init_mod_block(loc, comps); + else + var v = shape[1], init = v; + /*<>*/ modu[1 + i] = init; + /*<>*/ /*<>*/ var + _i_ = i + 1 | 0; + if(_h_ === i) break; + var i = _i_; + } + } + /*<>*/ return modu; + /*<>*/ } + function init_mod(loc, shape){ + /*<>*/ if + (typeof shape !== "number" && 0 === shape[0]){ + var comps = shape[1]; + /*<>*/ return init_mod_block(loc, comps); + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[2], cst_CamlinternalMod_init_mod_n); + /*<>*/ } + function update_mod_block(comps$0, modu, n){ + /*<>*/ if + (0 === /*<>*/ caml_obj_tag(n) + && comps$0.length - 1 <= n.length - 1){ + /*<>*/ var + _e_ = comps$0.length - 1 - 1 | 0, + /*<>*/ _d_ = 0; + if(_e_ >= 0){ + var i = _d_; + for(;;){ + /*<>*/ var + /*<>*/ n$0 = n[1 + i], + /*<>*/ shape = + caml_check_bound(comps$0, i)[1 + i]; + a: + if(typeof shape === "number"){ + if(2 === shape){ + if + (0 === /*<>*/ caml_obj_tag(n$0) + && 4 === n$0.length - 1){ + /*<>*/ var + /*<>*/ cl = modu[1 + i], + j = 0; + for(;;){ + /*<>*/ cl[1 + j] = n$0[1 + j]; + /*<>*/ /*<>*/ var + _c_ = j + 1 | 0; + if(3 === j) break a; + var j = _c_; + } + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); + } + /*<>*/ modu[1 + i] = n$0; + } + else if(0 === shape[0]){ + var comps = shape[1]; + /*<>*/ update_mod_block + (comps, modu[1 + i], n$0); + } + /*<>*/ /*<>*/ var + _f_ = i + 1 | 0; + if(_e_ === i) break; + var i = _f_; + } + } + return 0; + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + /*<>*/ } + function update_mod(shape, o, n){ + /*<>*/ if + (typeof shape !== "number" && 0 === shape[0]){ + var comps = shape[1]; + /*<>*/ return update_mod_block(comps, o, n); + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[2], cst_CamlinternalMod_update_mod); + /*<>*/ } + var CamlinternalMod = [0, init_mod, update_mod]; + runtime.caml_register_global(8, CamlinternalMod, "CamlinternalMod"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Ephemeron +//# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Array, Stdlib__Hashtbl, Stdlib__Int, Stdlib__List, Stdlib__Obj, Stdlib__Random, Stdlib__Seq, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_check_bound = runtime.caml_check_bound, + caml_make_vect = runtime.caml_make_vect, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + 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) + : 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_List = global_data.Stdlib__List, + Stdlib = global_data.Stdlib, + Stdlib_Obj = global_data.Stdlib__Obj, + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_Int = global_data.Stdlib__Int, + Stdlib_Array = global_data.Stdlib__Array, + Stdlib_Hashtbl = global_data.Stdlib__Hashtbl, + CamlinternalLazy = global_data.CamlinternalLazy, + Stdlib_Random = global_data.Stdlib__Random, + _c_ = [0, 0], + _b_ = [0, 0], + _a_ = [0, 0]; + function MakeSeeded(H){ + /*<>*/ /*<>*/ var + prng = + [246, + function(_aM_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; + function create(opt, initial_size){ + /*<>*/ if(opt) + var sth = opt[1], random = sth; + else + var + random = /*<>*/ caml_call1(Stdlib_Hashtbl[17], 0); + var x = 16; + /*<>*/ for(;;){ + if(initial_size > x && Stdlib_Sys[13] >= (x * 2 | 0)){var x$0 = x * 2 | 0, x = x$0; continue;} + /*<>*/ if(random){ + var _aK_ = runtime.caml_obj_tag(prng); + a: + if(250 === _aK_) + var _aL_ = prng[1]; + else{ + if(246 !== _aK_ && 244 !== _aK_){var _aL_ = prng; break a;} + var _aL_ = caml_call1(CamlinternalLazy[2], prng); + } + var + seed = + /*<>*/ caml_call1(Stdlib_Random[15][4], _aL_); + } + else + var seed = 0; + /*<>*/ return [0, + 0, + /*<>*/ caml_make_vect(x, 0), + seed, + x]; + } + /*<>*/ } + function clear(h){ + /*<>*/ h[1] = 0; + /*<>*/ var + len = h[2].length - 1, + /*<>*/ _aI_ = len - 1 | 0, + _aH_ = 0; + if(_aI_ >= 0){ + var i = _aH_; + for(;;){ + /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; + /*<>*/ /*<>*/ var + _aJ_ = i + 1 | 0; + if(_aI_ === i) break; + var i = _aJ_; + } + } + return 0; + /*<>*/ } + function reset(h){ + /*<>*/ var len = h[2].length - 1; + return len === h[4] + ? clear(h) + : (h + [1] + = 0, + h[2] = /*<>*/ caml_make_vect(h[4], 0), + 0); + /*<>*/ } + function copy(h){ + /*<>*/ var + _aE_ = h[4], + _aF_ = h[3], + /*<>*/ _aG_ = + /*<>*/ caml_call1(Stdlib_Array[6], h[2]); + /*<>*/ return [0, h[1], _aG_, _aF_, _aE_]; + /*<>*/ } + function key_index(h, hkey){ + /*<>*/ return hkey & (h[2].length - 1 - 1 | 0); + /*<>*/ } + function clean(h){ + function do_bucket(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + var hkey = param$0[1], rest = param$0[3], c = param$0[2]; + /*<>*/ if + ( /*<>*/ caml_call1(H[6], c)){ + var rest$0 = param$0[3], c$0 = param$0[2]; + /*<>*/ return [0, hkey, c$0, do_bucket(rest$0)]; + } + h[1] = h[1] - 1 | 0; + var param$0 = rest; + } + /*<>*/ } + var d = h[2], _aC_ = d.length - 1 - 1 | 0, _aB_ = 0; + if(_aC_ >= 0){ + var i = _aB_; + for(;;){ + /*<>*/ d[1 + i] = + do_bucket(caml_check_bound(d, i)[1 + i]); + /*<>*/ /*<>*/ var + _aD_ = i + 1 | 0; + if(_aC_ === i) break; + var i = _aD_; + } + } + return 0; + /*<>*/ } + function resize(h){ + /*<>*/ var + odata = h[2], + /*<>*/ osize = odata.length - 1, + nsize = osize * 2 | 0; + /*<>*/ clean(h); + var + _av_ = nsize < Stdlib_Sys[13] ? 1 : 0, + _aw_ = _av_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _av_; + if(_aw_){ + /*<>*/ /*<>*/ var + ndata = /*<>*/ caml_make_vect(nsize, 0); + h[2] = ndata; + /*<>*/ var + insert_bucket = + function(param){ + /*<>*/ if(! param) + /*<>*/ return 0; + var rest = param[3], data = param[2], hkey = param[1]; + /*<>*/ insert_bucket(rest); + /*<>*/ /*<>*/ var + nidx = key_index(h, hkey); + /*<>*/ ndata[1 + nidx] = + [0, hkey, data, caml_check_bound(ndata, nidx)[1 + nidx]]; + /*<>*/ return 0; + /*<>*/ }, + /*<>*/ _ay_ = osize - 1 | 0, + /*<>*/ _ax_ = 0; + if(_ay_ >= 0){ + var i = _ax_; + for(;;){ + /*<>*/ insert_bucket + (caml_check_bound(odata, i)[1 + i]); + /*<>*/ /*<>*/ var + _aA_ = i + 1 | 0; + if(_ay_ === i) break; + var i = _aA_; + } + } + var _az_ = 0; + } + else + var _az_ = _aw_; + return _az_; + /*<>*/ } + function add(h, key, info){ + /*<>*/ var + /*<>*/ hkey = + /*<>*/ caml_call2(H[2], h[3], key), + /*<>*/ i = key_index(h, hkey), + /*<>*/ container = + /*<>*/ caml_call2(H[1], key, info), + /*<>*/ bucket = + [0, hkey, container, caml_check_bound(h[2], i)[1 + i]]; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; + h[1] = h[1] + 1 | 0; + var _au_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _au_ ? resize(h) : _au_; + /*<>*/ } + function remove(h, key){ + /*<>*/ /*<>*/ var + hkey = /*<>*/ caml_call2(H[2], h[3], key); + function remove_bucket(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + var hk = param$0[1], next = param$0[3], c = param$0[2]; + if(hkey !== hk){ + var next$0 = param$0[3], c$0 = param$0[2]; + /*<>*/ return [0, + hk, + c$0, + remove_bucket(next$0)]; + } + switch( /*<>*/ caml_call2(H[3], c, key)){ + case 0: + h[1] = h[1] - 1 | 0; /*<>*/ return next; + case 1: + /*<>*/ return [0, hk, c, remove_bucket(next)]; + default: h[1] = h[1] - 1 | 0; var param$0 = next; + } + } + /*<>*/ } + /*<>*/ var + /*<>*/ i = key_index(h, hkey), + /*<>*/ _at_ = + remove_bucket(caml_check_bound(h[2], i)[1 + i]); + /*<>*/ caml_check_bound(h[2], i)[1 + i] = _at_; + /*<>*/ return 0; + /*<>*/ } + function find(h, key){ + /*<>*/ var + /*<>*/ hkey = + /*<>*/ caml_call2(H[2], h[3], key), + /*<>*/ _as_ = key_index(h, hkey), + param = caml_check_bound(h[2], _as_)[1 + _as_]; + for(;;){ + if(! param) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var hk = param[1], rest = param[3], c = param[2]; + if(hkey === hk) + switch( /*<>*/ caml_call2(H[3], c, key)){ + case 0: + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(H[4], c); + if(match){var d = match[1]; /*<>*/ return d;} + var param = rest; + break; + case 1: + var param = rest; break; + default: var param = rest; + } + else + var rest$0 = param[3], param = rest$0; + } + /*<>*/ } + function find_opt(h, key){ + /*<>*/ var + /*<>*/ hkey = + /*<>*/ caml_call2(H[2], h[3], key), + /*<>*/ _ar_ = key_index(h, hkey), + param = caml_check_bound(h[2], _ar_)[1 + _ar_]; + for(;;){ + if(! param) /*<>*/ return 0; + var hk = param[1], rest = param[3], c = param[2]; + if(hkey === hk) + switch( /*<>*/ caml_call2(H[3], c, key)){ + case 0: + /*<>*/ /*<>*/ var + d = /*<>*/ caml_call1(H[4], c); + if(d) /*<>*/ return d; + var param = rest; + break; + case 1: + var param = rest; break; + default: var param = rest; + } + else + var rest$0 = param[3], param = rest$0; + } + /*<>*/ } + function find_all(h, key){ + /*<>*/ /*<>*/ var + hkey = /*<>*/ caml_call2(H[2], h[3], key); + function find_in_bucket(param){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; + var hk = param$0[1], rest = param$0[3], c = param$0[2]; + if(hkey === hk) + switch( /*<>*/ caml_call2(H[3], c, key)){ + case 0: + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(H[4], c); + if(match){ + var d = match[1]; + /*<>*/ return [0, d, find_in_bucket(rest)]; + } + var param$0 = rest; + break; + case 1: + var param$0 = rest; break; + default: var param$0 = rest; + } + else + var rest$0 = param$0[3], param$0 = rest$0; + } + /*<>*/ } + /*<>*/ /*<>*/ var + _aq_ = key_index(h, hkey); + /*<>*/ return find_in_bucket + (caml_check_bound(h[2], _aq_)[1 + _aq_]); + /*<>*/ } + function replace(h, key, info){ + /*<>*/ var + /*<>*/ hkey = + /*<>*/ caml_call2(H[2], h[3], key), + /*<>*/ i = key_index(h, hkey), + /*<>*/ l = caml_check_bound(h[2], i)[1 + i]; + /*<>*/ try{ + var param = l; + /*<>*/ for(;;){ + if(! param) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + var hk = param[1], next = param[3], c = param[2]; + if(hkey === hk){ + if(! /*<>*/ caml_call2(H[3], c, key)){ + /*<>*/ /*<>*/ var + _am_ = /*<>*/ caml_call3(H[5], c, key, info); + /*<>*/ return _am_; + } + var param = next; + } + else + var next$0 = param[3], param = next$0; + } + } + catch(_ap_){ + var _an_ = caml_wrap_exception(_ap_); + if(_an_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_an_, 0); + /*<>*/ /*<>*/ var + container = /*<>*/ caml_call2(H[1], key, info); + /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, hkey, container, l]; + h[1] = h[1] + 1 | 0; + var _ao_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _ao_ ? resize(h) : _ao_; + } + /*<>*/ } + function mem(h, key){ + /*<>*/ var + /*<>*/ hkey = + /*<>*/ caml_call2(H[2], h[3], key), + /*<>*/ _al_ = key_index(h, hkey), + param = caml_check_bound(h[2], _al_)[1 + _al_]; + /*<>*/ for(;;){ + if(! param) /*<>*/ return 0; + var hk = param[1], rest = param[3], c = param[2]; + if(hk === hkey){ + if(! /*<>*/ caml_call2(H[3], c, key)) + /*<>*/ return 1; + var param = rest; + } + else + var rest$0 = param[3], param = rest$0; + } + /*<>*/ } + function length(h){ + /*<>*/ return h[1]; + /*<>*/ } + function bucket_length(accu, param){ + var accu$0 = accu, param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return accu$0; + /*<>*/ var + rest = param$0[3], + /*<>*/ accu$1 = accu$0 + 1 | 0, + accu$0 = accu$1, + param$0 = rest; + } + } + function stats(h){ + /*<>*/ var _af_ = h[2], _ag_ = 0; + function _ah_(m, b){ + /*<>*/ /*<>*/ var + _ak_ = bucket_length(0, b); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Int[11], m, _ak_); + /*<>*/ } + /*<>*/ var + /*<>*/ mbl = + /*<>*/ caml_call3 + (Stdlib_Array[15], _ah_, _ag_, _af_), + /*<>*/ histo = + /*<>*/ caml_make_vect(mbl + 1 | 0, 0), + /*<>*/ _ai_ = h[2]; + function _aj_(b){ + /*<>*/ /*<>*/ var + l = bucket_length(0, b); + /*<>*/ histo[1 + l] = + caml_check_bound(histo, l)[1 + l] + 1 | 0; + /*<>*/ return 0; + /*<>*/ } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Array[11], _aj_, _ai_); + /*<>*/ return [0, h[1], h[2].length - 1, mbl, histo]; + /*<>*/ } + function bucket_length_alive(accu, param){ + var accu$0 = accu, param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return accu$0; + var rest = param$0[3], c = param$0[2]; + /*<>*/ if + ( /*<>*/ caml_call1(H[6], c)) + var accu$1 = accu$0 + 1 | 0, accu$0 = accu$1, param$0 = rest; + else + var rest$0 = param$0[3], param$0 = rest$0; + } + } + function stats_alive(h){ + /*<>*/ var + /*<>*/ size = [0, 0], + /*<>*/ _$_ = h[2], + _aa_ = 0; + function _ab_(m, b){ + /*<>*/ /*<>*/ var + _ae_ = bucket_length_alive(0, b); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Int[11], m, _ae_); + /*<>*/ } + /*<>*/ var + /*<>*/ mbl = + /*<>*/ caml_call3 + (Stdlib_Array[15], _ab_, _aa_, _$_), + /*<>*/ histo = + /*<>*/ caml_make_vect(mbl + 1 | 0, 0), + /*<>*/ _ac_ = h[2]; + function _ad_(b){ + /*<>*/ /*<>*/ var + l = bucket_length_alive(0, b); + size[1] = size[1] + l | 0; + /*<>*/ histo[1 + l] = + caml_check_bound(histo, l)[1 + l] + 1 | 0; + /*<>*/ return 0; + /*<>*/ } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Array[11], _ad_, _ac_); + /*<>*/ return [0, + size[1], + h[2].length - 1, + mbl, + histo]; + /*<>*/ } + function add_seq(tbl, i){ + function ___(param){ + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return add(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[4], ___, i); + /*<>*/ } + function replace_seq(tbl, i){ + function _Z_(param){ + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return replace(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Seq[4], _Z_, i); + /*<>*/ } + function of_seq(i){ + /*<>*/ /*<>*/ var + tbl = create(0, 16); + /*<>*/ replace_seq(tbl, i); + /*<>*/ return tbl; + /*<>*/ } + /*<>*/ return [0, + create, + clear, + reset, + copy, + add, + remove, + find, + find_opt, + find_all, + replace, + mem, + length, + stats, + add_seq, + replace_seq, + of_seq, + clean, + stats_alive]; + } + function create(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Obj[24][1], 1); + /*<>*/ } + function get_key(t){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Obj[24][3], t, 0); + /*<>*/ } + function set_key(t, k){ + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ } + function check_key(t){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Obj[24][7], t, 0); + /*<>*/ } + function get_data(t){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Obj[24][9], t); + /*<>*/ } + function set_data(t, d){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Obj[24][11], t, d); + /*<>*/ } + function make(key, data){ + /*<>*/ /*<>*/ var + eph = create(0); + /*<>*/ set_data(eph, data); + /*<>*/ set_key(eph, key); + /*<>*/ return eph; + /*<>*/ } + function query(eph, key){ + /*<>*/ /*<>*/ var + match = get_key(eph); + if(! match) /*<>*/ return 0; + var k = match[1]; + return k === key ? get_data(eph) : 0; + /*<>*/ } + function MakeSeeded$0(H){ + function create$0(k, d){ + /*<>*/ /*<>*/ var + c = create(0); + /*<>*/ set_data(c, d); + /*<>*/ set_key(c, k); + /*<>*/ return c; + /*<>*/ } + var seeded_hash = H[2]; + function equal(c, k){ + /*<>*/ /*<>*/ var + match = get_key(c); + if(! match) /*<>*/ return 2; + var k$0 = match[1]; + /*<>*/ return /*<>*/ caml_call2 + (H[1], k, k$0) + ? 0 + : 1; + /*<>*/ } + function set_key_data(c, k, d){ + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Obj[24][12], c); + /*<>*/ set_key(c, k); + /*<>*/ return set_data(c, d); + /*<>*/ } + /*<>*/ return MakeSeeded + ([0, + create$0, + seeded_hash, + equal, + get_data, + set_key_data, + check_key]); + } + function Make(H){ + var equal = H[1]; + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_call1 + (H[2], x); + /*<>*/ } + var + include = MakeSeeded$0([0, equal, seeded_hash]), + clear = include[2], + reset = include[3], + copy = include[4], + add = include[5], + remove = include[6], + find = include[7], + find_opt = include[8], + find_all = include[9], + replace = include[10], + mem = include[11], + length = include[12], + stats = include[13], + add_seq = include[14], + replace_seq = include[15], + clean = include[17], + stats_alive = include[18], + _Y_ = include[1]; + function create(sz){ + /*<>*/ return /*<>*/ caml_call2 + (_Y_, _a_, sz); + /*<>*/ } + function of_seq(i){ + /*<>*/ /*<>*/ var + tbl = create(16); + /*<>*/ /*<>*/ caml_call2 + (replace_seq, tbl, i); + /*<>*/ return tbl; + /*<>*/ } + /*<>*/ return [0, + create, + clear, + reset, + copy, + add, + remove, + find, + find_opt, + find_all, + replace, + mem, + length, + stats, + add_seq, + replace_seq, + of_seq, + clean, + stats_alive]; + } + function make$0(param){ + /*<>*/ return [0, 0]; + /*<>*/ } + function add(b, k, d){ + /*<>*/ var _X_ = b[1]; + b[1] = [0, make(k, d), _X_]; + return 0; + /*<>*/ } + function test_key(k, e){ + /*<>*/ /*<>*/ var + match = get_key(e); + if(match){ + var x = match[1]; + if(x === k) /*<>*/ return 1; + } + /*<>*/ return 0; + /*<>*/ } + function remove(b, k){ + /*<>*/ var l$0 = b[1], l = l$0, acc = 0; + /*<>*/ for(;;){ + if(! l) /*<>*/ return 0; + var h = l[1], t = l[2]; + /*<>*/ if(test_key(k, h)){ + b[1] = /*<>*/ caml_call2(Stdlib_List[12], acc, t); + return 0; + } + /*<>*/ var + t$0 = l[2], + /*<>*/ acc$0 = [0, h, acc], + l = t$0, + acc = acc$0; + } + /*<>*/ } + function find(b, k){ + /*<>*/ var _U_ = b[1]; + /*<>*/ function _V_(_W_){ + /*<>*/ return test_key(k, _W_); + } + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_call2(Stdlib_List[39], _V_, _U_); + if(! match) /*<>*/ return 0; + var e = match[1]; + /*<>*/ return get_data(e); + /*<>*/ } + function length(b){ + /*<>*/ return caml_call1(Stdlib_List[1], b[1]); + /*<>*/ } + function clear(b){ + /*<>*/ b[1] = 0; + return 0; + /*<>*/ } + function create$0(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Obj[24][1], 2); + /*<>*/ } + function get_key1(t){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Obj[24][3], t, 0); + /*<>*/ } + function set_key1(t, k){ + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ } + function get_key2(t){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Obj[24][3], t, 1); + /*<>*/ } + function set_key2(t, k){ + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 1, k); + /*<>*/ } + function get_data$0(t){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Obj[24][9], t); + /*<>*/ } + function set_data$0(t, d){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Obj[24][11], t, d); + /*<>*/ } + function make$1(key1, key2, data){ + /*<>*/ /*<>*/ var + eph = create$0(0); + /*<>*/ set_data$0(eph, data); + /*<>*/ set_key1(eph, key1); + /*<>*/ set_key2(eph, key2); + /*<>*/ return eph; + /*<>*/ } + function query$0(eph, key1, key2){ + /*<>*/ /*<>*/ var + match = get_key1(eph); + if(! match) /*<>*/ return 0; + var k = match[1]; + if(k !== key1) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match$0 = get_key2(eph); + if(! match$0) /*<>*/ return 0; + var k$0 = match$0[1]; + return k$0 === key2 ? get_data$0(eph) : 0; + /*<>*/ } + function MakeSeeded$1(H1, H2){ + function create(param, d){ + /*<>*/ var + k2 = param[2], + k1 = param[1], + /*<>*/ c = create$0(0); + /*<>*/ set_data$0(c, d); + /*<>*/ set_key1(c, k1); + /*<>*/ set_key2(c, k2); + /*<>*/ return c; + } + function seeded_hash(seed, param){ + /*<>*/ var + k2 = param[2], + k1 = param[1], + /*<>*/ _T_ = + /*<>*/ caml_call2(H2[2], seed, k2) * 65599 | 0; + /*<>*/ return /*<>*/ caml_call2 + (H1[2], seed, k1) + + _T_ + | 0; + } + function equal(c, param){ + /*<>*/ var + k2 = param[2], + k1 = param[1], + /*<>*/ match = get_key1(c), + /*<>*/ match$0 = get_key2(c); + if(match && match$0){ + var k2$0 = match$0[1], k1$0 = match[1]; + /*<>*/ if + ( /*<>*/ caml_call2(H1[1], k1, k1$0) + && /*<>*/ caml_call2(H2[1], k2, k2$0)) + /*<>*/ return 0; + /*<>*/ return 1; + } + /*<>*/ return 2; + } + function set_key_data(c, param, d){ + var k2 = param[2], k1 = param[1]; + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Obj[24][12], c); + /*<>*/ set_key1(c, k1); + /*<>*/ set_key2(c, k2); + /*<>*/ return set_data$0(c, d); + } + function check_key(c){ + /*<>*/ /*<>*/ var + _S_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); + /*<>*/ return _S_ + ? /*<>*/ caml_call2 + (Stdlib_Obj[24][7], c, 1) + : _S_; + /*<>*/ } + /*<>*/ return MakeSeeded + ([0, + create, + seeded_hash, + equal, + get_data$0, + set_key_data, + check_key]); + } + function Make$0(H1, H2){ + var equal = H2[1]; + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_call1 + (H2[2], x); + /*<>*/ } + /*<>*/ var + equal$0 = H1[1], + /*<>*/ _Q_ = [0, equal, seeded_hash]; + function seeded_hash$0(seed, x){ + /*<>*/ return /*<>*/ caml_call1 + (H1[2], x); + /*<>*/ } + var + include = MakeSeeded$1([0, equal$0, seeded_hash$0], _Q_), + clear = include[2], + reset = include[3], + copy = include[4], + add = include[5], + remove = include[6], + find = include[7], + find_opt = include[8], + find_all = include[9], + replace = include[10], + mem = include[11], + length = include[12], + stats = include[13], + add_seq = include[14], + replace_seq = include[15], + clean = include[17], + stats_alive = include[18], + _R_ = include[1]; + function create(sz){ + /*<>*/ return /*<>*/ caml_call2 + (_R_, _b_, sz); + /*<>*/ } + function of_seq(i){ + /*<>*/ /*<>*/ var + tbl = create(16); + /*<>*/ /*<>*/ caml_call2 + (replace_seq, tbl, i); + /*<>*/ return tbl; + /*<>*/ } + /*<>*/ return [0, + create, + clear, + reset, + copy, + add, + remove, + find, + find_opt, + find_all, + replace, + mem, + length, + stats, + add_seq, + replace_seq, + of_seq, + clean, + stats_alive]; + } + function make$2(param){ + /*<>*/ return [0, 0]; + /*<>*/ } + function add$0(b, k1, k2, d){ + /*<>*/ var _P_ = b[1]; + b[1] = [0, make$1(k1, k2, d), _P_]; + return 0; + /*<>*/ } + function test_keys(k1, k2, e){ + /*<>*/ var + /*<>*/ match = get_key1(e), + /*<>*/ match$0 = get_key2(e); + if(match && match$0){ + var x2 = match$0[1], x1 = match[1]; + if(x1 === k1 && x2 === k2) /*<>*/ return 1; + } + /*<>*/ return 0; + /*<>*/ } + function remove$0(b, k1, k2){ + /*<>*/ var l$0 = b[1], l = l$0, acc = 0; + /*<>*/ for(;;){ + if(! l) /*<>*/ return 0; + var h = l[1], t = l[2]; + /*<>*/ if(test_keys(k1, k2, h)){ + b[1] = /*<>*/ caml_call2(Stdlib_List[12], acc, t); + return 0; + } + /*<>*/ var + t$0 = l[2], + /*<>*/ acc$0 = [0, h, acc], + l = t$0, + acc = acc$0; + } + /*<>*/ } + function find$0(b, k1, k2){ + /*<>*/ var _M_ = b[1]; + /*<>*/ function _N_(_O_){ + /*<>*/ return test_keys(k1, k2, _O_); + } + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_call2(Stdlib_List[39], _N_, _M_); + if(! match) /*<>*/ return 0; + var e = match[1]; + /*<>*/ return get_data$0(e); + /*<>*/ } + function length$0(b){ + /*<>*/ return caml_call1(Stdlib_List[1], b[1]); + /*<>*/ } + function clear$0(b){ + /*<>*/ b[1] = 0; + return 0; + /*<>*/ } + function create$1(n){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Obj[24][1], n); + /*<>*/ } + function length$1(k){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Obj[24][2], k); + /*<>*/ } + function get_key$0(t, n){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Obj[24][3], t, n); + /*<>*/ } + function set_key$0(t, n, k){ + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, n, k); + /*<>*/ } + function get_data$1(t){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Obj[24][9], t); + /*<>*/ } + function set_data$1(t, d){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Obj[24][11], t, d); + /*<>*/ } + function make$3(keys, data){ + /*<>*/ var + l = keys.length - 1, + /*<>*/ eph = create$1(l); + /*<>*/ set_data$1(eph, data); + /*<>*/ var + _K_ = l - 1 | 0, + /*<>*/ _J_ = 0; + if(_K_ >= 0){ + var i = _J_; + for(;;){ + /*<>*/ set_key$0 + (eph, i, caml_check_bound(keys, i)[1 + i]); + /*<>*/ /*<>*/ var + _L_ = i + 1 | 0; + if(_K_ === i) break; + var i = _L_; + } + } + /*<>*/ return eph; + /*<>*/ } + function query$1(eph, keys){ + /*<>*/ /*<>*/ var + l = length$1(eph); + /*<>*/ try{ + if(l !== keys.length - 1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[3], 1); + /*<>*/ var + /*<>*/ _F_ = l - 1 | 0, + /*<>*/ _E_ = 0; + if(_F_ >= 0){ + var i = _E_; + for(;;){ + /*<>*/ /*<>*/ var + match = get_key$0(eph, i); + if(! match) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[3], 1); + var k = match[1]; + if(k !== caml_check_bound(keys, i)[1 + i]) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[3], 1); + /*<>*/ /*<>*/ var + _H_ = i + 1 | 0; + if(_F_ === i) break; + var i = _H_; + } + } + /*<>*/ /*<>*/ var + _G_ = get_data$1(eph); + /*<>*/ return _G_; + } + catch(_I_){ + var _D_ = caml_wrap_exception(_I_); + if(_D_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_D_, 0); + } + /*<>*/ } + function MakeSeeded$2(H){ + function create(k, d){ + /*<>*/ /*<>*/ var + c = create$1(k.length - 1); + /*<>*/ set_data$1(c, d); + /*<>*/ var + _B_ = k.length - 1 - 1 | 0, + /*<>*/ _A_ = 0; + if(_B_ >= 0){ + var i = _A_; + for(;;){ + /*<>*/ set_key$0 + (c, i, caml_check_bound(k, i)[1 + i]); + /*<>*/ /*<>*/ var + _C_ = i + 1 | 0; + if(_B_ === i) break; + var i = _C_; + } + } + /*<>*/ return c; + /*<>*/ } + function seeded_hash(seed, k){ + /*<>*/ var + /*<>*/ h = [0, 0], + _w_ = k.length - 1 - 1 | 0, + /*<>*/ _v_ = 0; + if(_w_ >= 0){ + var i = _v_; + for(;;){ + /*<>*/ var + _x_ = h[1], + /*<>*/ _y_ = caml_check_bound(k, i)[1 + i]; + h[1] = + ( /*<>*/ caml_call2(H[2], seed, _y_) * 65599 | 0) + + _x_ + | 0; + /*<>*/ /*<>*/ var + _z_ = i + 1 | 0; + if(_w_ === i) break; + var i = _z_; + } + } + return h[1]; + /*<>*/ } + function equal(c, k){ + /*<>*/ var + len = k.length - 1, + /*<>*/ len$0 = length$1(c); + if(len !== len$0) /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$1 = len - 1 | 0, + i = i$1; + /*<>*/ for(;;){ + if(0 > i) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = get_key$0(c, i); + if(! match) /*<>*/ return 2; + /*<>*/ var + ki = match[1], + /*<>*/ _u_ = caml_check_bound(k, i)[1 + i]; + /*<>*/ if + (! /*<>*/ caml_call2(H[1], _u_, ki)) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i - 1 | 0, + i = i$0; + } + /*<>*/ } + function set_key_data(c, k, d){ + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Obj[24][12], c); + /*<>*/ var + _s_ = k.length - 1 - 1 | 0, + /*<>*/ _r_ = 0; + if(_s_ >= 0){ + var i = _r_; + for(;;){ + /*<>*/ set_key$0 + (c, i, caml_check_bound(k, i)[1 + i]); + /*<>*/ /*<>*/ var + _t_ = i + 1 | 0; + if(_s_ === i) break; + var i = _t_; + } + } + /*<>*/ return set_data$1(c, d); + /*<>*/ } + function check_key(c){ + /*<>*/ var + /*<>*/ i$1 = length$1(c) - 1 | 0, + i = i$1; + /*<>*/ for(;;){ + var _p_ = i < 0 ? 1 : 0; + if(_p_) + var _q_ = _p_; + else{ + /*<>*/ /*<>*/ var + _o_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); + /*<>*/ if(_o_){ + var i$0 = i - 1 | 0, i = i$0; + continue; + } + var _q_ = _o_; + } + return _q_; + } + /*<>*/ } + /*<>*/ return MakeSeeded + ([0, + create, + seeded_hash, + equal, + get_data$1, + set_key_data, + check_key]); + } + function Make$1(H){ + var equal = H[1]; + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_call1 + (H[2], x); + /*<>*/ } + var + include = MakeSeeded$2([0, equal, seeded_hash]), + clear = include[2], + reset = include[3], + copy = include[4], + add = include[5], + remove = include[6], + find = include[7], + find_opt = include[8], + find_all = include[9], + replace = include[10], + mem = include[11], + length = include[12], + stats = include[13], + add_seq = include[14], + replace_seq = include[15], + clean = include[17], + stats_alive = include[18], + _n_ = include[1]; + function create(sz){ + /*<>*/ return /*<>*/ caml_call2 + (_n_, _c_, sz); + /*<>*/ } + function of_seq(i){ + /*<>*/ /*<>*/ var + tbl = create(16); + /*<>*/ /*<>*/ caml_call2 + (replace_seq, tbl, i); + /*<>*/ return tbl; + /*<>*/ } + /*<>*/ return [0, + create, + clear, + reset, + copy, + add, + remove, + find, + find_opt, + find_all, + replace, + mem, + length, + stats, + add_seq, + replace_seq, + of_seq, + clean, + stats_alive]; + } + function make$4(param){ + /*<>*/ return [0, 0]; + /*<>*/ } + function add$1(b, k, d){ + /*<>*/ var _m_ = b[1]; + b[1] = [0, make$3(k, d), _m_]; + return 0; + /*<>*/ } + function test_keys$0(k, e){ + /*<>*/ try{ + if(length$1(e) !== k.length - 1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[3], 1); + /*<>*/ var + _i_ = k.length - 1 - 1 | 0, + /*<>*/ _h_ = 0; + if(_i_ >= 0){ + var i = _h_; + for(;;){ + /*<>*/ /*<>*/ var + match = get_key$0(e, i); + if(match){ + var x = match[1]; + if(x === caml_check_bound(k, i)[1 + i]){ + /*<>*/ /*<>*/ var + _k_ = i + 1 | 0; + if(_i_ === i) break; + var i = _k_; + continue; + } + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[3], 1); + } + } + /*<>*/ /*<>*/ var _j_ = 1; + /*<>*/ return _j_; + } + catch(_l_){ + var _g_ = caml_wrap_exception(_l_); + if(_g_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_g_, 0); + } + /*<>*/ } + function remove$1(b, k){ + /*<>*/ var l$0 = b[1], l = l$0, acc = 0; + /*<>*/ for(;;){ + if(! l) /*<>*/ return 0; + var h = l[1], t = l[2]; + /*<>*/ if(test_keys$0(k, h)){ + b[1] = /*<>*/ caml_call2(Stdlib_List[12], acc, t); + return 0; + } + /*<>*/ var + t$0 = l[2], + /*<>*/ acc$0 = [0, h, acc], + l = t$0, + acc = acc$0; + } + /*<>*/ } + function find$1(b, k){ + /*<>*/ var _d_ = b[1]; + /*<>*/ function _e_(_f_){ + /*<>*/ return test_keys$0(k, _f_); + } + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_call2(Stdlib_List[39], _e_, _d_); + if(! match) /*<>*/ return 0; + var e = match[1]; + /*<>*/ return get_data$1(e); + /*<>*/ } + function length$2(b){ + /*<>*/ return caml_call1(Stdlib_List[1], b[1]); + /*<>*/ } + function clear$1(b){ + /*<>*/ b[1] = 0; + return 0; + /*<>*/ } + var + Stdlib_Ephemeron = + [0, + [0, + make, + query, + Make, + MakeSeeded$0, + [0, make$0, add, remove, find, length, clear]], + [0, + make$1, + query$0, + Make$0, + MakeSeeded$1, + [0, make$2, add$0, remove$0, find$0, length$0, clear$0]], + [0, + make$3, + query$1, + Make$1, + MakeSeeded$2, + [0, make$4, add$1, remove$1, find$1, length$2, clear$1]]]; + runtime.caml_register_global(13, Stdlib_Ephemeron, "Stdlib__Ephemeron"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Filename +//# unitInfo: Requires: Stdlib, Stdlib__Buffer, Stdlib__Domain, Stdlib__List, Stdlib__Printf, Stdlib__Random, Stdlib__String, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + cst$19 = "", + cst$23 = " ", + cst_2$1 = " 2>", + cst_2_1$1 = " 2>&1", + cst$22 = " <", + cst$21 = " >", + cst$20 = '"', + cst$24 = ".", + cst$25 = "..", + cst$28 = "../", + cst$27 = "./", + cst$26 = "/", + cst_dev_null = "/dev/null", + caml_equal = runtime.caml_equal, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_equal = runtime.caml_string_equal, + caml_string_get = runtime.caml_string_get, + caml_string_notequal = runtime.caml_string_notequal, + caml_sys_getenv = runtime.caml_sys_getenv, + 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) + : 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(), + cst$18 = cst$19, + cst$17 = cst$19, + cst$16 = cst$19, + cst$8 = cst$21, + cst$15 = cst$19, + cst$9 = cst$22, + cst$14 = cst$19, + cst$10 = cst$23, + cst$11 = cst$23, + cst$12 = cst$20, + cst$13 = cst$19, + cst$6 = cst$20, + cst$7 = cst$20, + cst$4 = cst$19, + cst = cst$21, + cst$3 = cst$19, + cst$0 = cst$22, + cst$2 = cst$19, + cst$1 = cst$23, + null$0 = cst_dev_null, + current_dir_name = cst$24, + parent_dir_name = cst$25, + dir_sep = cst$26, + quotequote = "'\\''", + null$1 = "NUL", + current_dir_name$0 = cst$24, + parent_dir_name$0 = cst$25, + dir_sep$0 = "\\", + cst$5 = cst$24, + null$2 = cst_dev_null, + current_dir_name$1 = cst$24, + parent_dir_name$1 = cst$25, + dir_sep$1 = cst$26, + Stdlib = global_data.Stdlib, + Stdlib_Domain = global_data.Stdlib__Domain, + Stdlib_Random = global_data.Stdlib__Random, + Stdlib_Printf = global_data.Stdlib__Printf, + Stdlib_String = global_data.Stdlib__String, + Stdlib_List = global_data.Stdlib__List, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_Sys = global_data.Stdlib__Sys, + _i_ = [0, 7, 0], + _h_ = [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", + _c_ = [0, cst$20, 0], + cst_2_1$0 = cst_2_1$1, + cst_2$0 = cst_2$1, + cst_Filename_quote_command_bad = "Filename.quote_command: bad file name ", + cst_2_1 = cst_2_1$1, + cst_2 = cst_2$1, + cst_tmp = "/tmp"; + function generic_basename(is_dir_sep, current_dir_name, name){ + /*<>*/ if + ( /*<>*/ caml_string_equal(name, cst$19)) + /*<>*/ return current_dir_name; + var n$3 = caml_ml_string_length(name) - 1 | 0, n = n$3; + /*<>*/ for(;;){ + if(0 > n) + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_String[15], name, 0, 1); + /*<>*/ if + ( /*<>*/ caml_call2(is_dir_sep, name, n)) + /*<>*/ var + /*<>*/ n$0 = n - 1 | 0, + n = n$0; + else{ + /*<>*/ var + /*<>*/ p = n + 1 | 0, + n$1 = n; + /*<>*/ for(;;){ + if(0 > n$1) + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_String[15], name, 0, p); + /*<>*/ if + ( /*<>*/ caml_call2(is_dir_sep, name, n$1)) + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_String[15], name, n$1 + 1 | 0, (p - n$1 | 0) - 1 | 0); + var n$2 = n$1 - 1 | 0, n$1 = n$2; + } + } + } + /*<>*/ } + function generic_dirname(is_dir_sep, current_dir_name, name){ + /*<>*/ if + ( /*<>*/ caml_string_equal(name, cst$19)) + /*<>*/ return current_dir_name; + var n$5 = caml_ml_string_length(name) - 1 | 0, n = n$5; + /*<>*/ for(;;){ + if(0 > n) + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_String[15], name, 0, 1); + /*<>*/ if + ( /*<>*/ caml_call2(is_dir_sep, name, n)) + /*<>*/ var + /*<>*/ n$0 = n - 1 | 0, + n = n$0; + else{ + var n$1 = n; + /*<>*/ for(;;){ + if(0 > n$1) return current_dir_name; + /*<>*/ if + ( /*<>*/ caml_call2(is_dir_sep, name, n$1)){ + var n$3 = n$1; + /*<>*/ for(;;){ + if(0 > n$3) + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_String[15], name, 0, 1); + /*<>*/ if + (! /*<>*/ caml_call2(is_dir_sep, name, n$3)) + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_String[15], name, 0, n$3 + 1 | 0); + /*<>*/ var + /*<>*/ n$4 = n$3 - 1 | 0, + n$3 = n$4; + } + } + else + /*<>*/ var + /*<>*/ n$2 = n$1 - 1 | 0, + n$1 = n$2; + } + } + } + /*<>*/ } + function is_dir_sep(s, i){ + /*<>*/ return 47 + === /*<>*/ caml_string_get(s, i) + ? 1 + : 0; + /*<>*/ } + function is_relative(n){ + /*<>*/ var + _aK_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _aL_ = + _aK_ + || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + return _aL_; + /*<>*/ } + function is_implicit(n){ + /*<>*/ /*<>*/ var + _aF_ = is_relative(n); + /*<>*/ if(_aF_){ + var + _aG_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aH_ = + _aG_ + || + /*<>*/ caml_string_notequal + ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), + cst$27); + /*<>*/ if(_aH_) + var + _aI_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aJ_ = + _aI_ + || + /*<>*/ caml_string_notequal + ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 3), + cst$28); + else + var _aJ_ = _aH_; + } + else + var _aJ_ = _aF_; + /*<>*/ return _aJ_; + /*<>*/ } + function check_suffix(name, suff){ + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_String[11], suff, name); + /*<>*/ } + function chop_suffix_opt(suffix, filename){ + /*<>*/ var + len_s = caml_ml_string_length(suffix), + len_f = caml_ml_string_length(filename); + if(len_s > len_f) /*<>*/ return 0; + /*<>*/ /*<>*/ var + r = + /*<>*/ caml_call3 + (Stdlib_String[15], filename, len_f - len_s | 0, len_s); + /*<>*/ return /*<>*/ caml_string_equal + (r, suffix) + ? [0, + /*<>*/ caml_call3 + (Stdlib_String[15], filename, 0, len_f - len_s | 0)] + : 0; + /*<>*/ } + try{ + /*<>*/ var + /*<>*/ _k_ = + /*<>*/ caml_sys_getenv("TMPDIR"), + temp_dir_name = _k_; + } + catch(_aE_){ + var _a_ = caml_wrap_exception(_aE_); + 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 + _aB_ = l - 1 | 0, + /*<>*/ _aA_ = 0; + if(_aB_ >= 0){ + var i = _aA_; + for(;;){ + /*<>*/ if + (39 === /*<>*/ caml_string_get(s, i)) + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[16], b, quotequote); + else{ + /*<>*/ /*<>*/ var + _aD_ = /*<>*/ caml_string_get(s, i); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, _aD_); + } + /*<>*/ /*<>*/ var + _aC_ = i + 1 | 0; + if(_aB_ === i) break; + var i = _aC_; + } + } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 39); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Buffer[2], b); + } + function quote_command(cmd, stdin, stdout, stderr, args){ + /*<>*/ if(stderr){ + var f = stderr[1]; + /*<>*/ if + ( /*<>*/ caml_equal(stderr, stdout)) + var _ap_ = cst_2_1; + else + /*<>*/ var + /*<>*/ _az_ = quote(f), + _ap_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _az_); + var _aq_ = _ap_; + } + else + var _aq_ = cst$4; + if(stdout) + /*<>*/ var + f$0 = stdout[1], + /*<>*/ _ar_ = quote(f$0), + _as_ = /*<>*/ caml_call2(Stdlib[28], cst, _ar_); + else + var _as_ = cst$3; + /*<>*/ /*<>*/ var + _at_ = /*<>*/ caml_call2(Stdlib[28], _as_, _aq_); + if(stdin) + /*<>*/ var + f$1 = stdin[1], + /*<>*/ _au_ = quote(f$1), + _av_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _au_); + else + var _av_ = cst$2; + /*<>*/ var + /*<>*/ _aw_ = + /*<>*/ caml_call2(Stdlib[28], _av_, _at_), + /*<>*/ _ax_ = + /*<>*/ caml_call2 + (Stdlib_List[19], quote, [0, cmd, args]), + /*<>*/ _ay_ = + /*<>*/ caml_call2(Stdlib_String[6], cst$1, _ax_); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], _ay_, _aw_); + /*<>*/ } + /*<>*/ function basename(_ao_){ + /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _ao_); + } + /*<>*/ function dirname(_an_){ + /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _an_); + } + /*<>*/ /*<>*/ var + Unix = + [0, + null$0, + current_dir_name, + parent_dir_name, + dir_sep, + is_dir_sep, + is_relative, + is_implicit, + check_suffix, + chop_suffix_opt, + temp_dir_name, + quote, + quote_command, + basename, + dirname]; + function is_dir_sep$0(s, i){ + /*<>*/ var + /*<>*/ c = + /*<>*/ caml_string_get(s, i), + _ak_ = 47 === c ? 1 : 0; + if(_ak_) + var _al_ = _ak_; + else + var _am_ = 92 === c ? 1 : 0, _al_ = _am_ || (58 === c ? 1 : 0); + return _al_; + /*<>*/ } + function is_relative$0(n){ + /*<>*/ var + _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _af_ = + _ae_ + || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + if(_af_){ + var + _ag_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ah_ = + _ag_ + || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + if(_ah_) + var + _ai_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aj_ = + _ai_ + || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); + else + var _aj_ = _ah_; + } + else + var _aj_ = _af_; + return _aj_; + /*<>*/ } + function is_implicit$0(n){ + /*<>*/ /*<>*/ var + _X_ = is_relative$0(n); + /*<>*/ if(_X_){ + var + _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _Z_ = + _Y_ + || + /*<>*/ caml_string_notequal + ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), + cst$27); + /*<>*/ if(_Z_){ + var + ___ = caml_ml_string_length(n) < 2 ? 1 : 0, + _$_ = + ___ + || + /*<>*/ caml_string_notequal + ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), + ".\\"); + /*<>*/ if(_$_){ + var + _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _ab_ = + _aa_ + || + /*<>*/ caml_string_notequal + ( /*<>*/ caml_call3 + (Stdlib_String[15], n, 0, 3), + cst$28); + /*<>*/ if(_ab_) + var + _ac_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _ad_ = + _ac_ + || + /*<>*/ caml_string_notequal + ( /*<>*/ caml_call3 + (Stdlib_String[15], n, 0, 3), + "..\\"); + else + var _ad_ = _ab_; + } + else + var _ad_ = _$_; + } + else + var _ad_ = _Z_; + } + else + var _ad_ = _X_; + /*<>*/ return _ad_; + /*<>*/ } + function check_suffix$0(name, suff){ + /*<>*/ var + _U_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; + if(_U_) + /*<>*/ var + /*<>*/ s = + /*<>*/ caml_call3 + (Stdlib_String[15], + name, + caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, + caml_ml_string_length(suff)), + /*<>*/ _V_ = + /*<>*/ caml_call1(Stdlib_String[26], suff), + _W_ = + /*<>*/ caml_string_equal + ( /*<>*/ caml_call1(Stdlib_String[26], s), _V_); + else + var _W_ = _U_; + /*<>*/ return _W_; + /*<>*/ } + function chop_suffix_opt$0(suffix, filename){ + /*<>*/ var + len_s = caml_ml_string_length(suffix), + len_f = caml_ml_string_length(filename); + if(len_s > len_f) /*<>*/ return 0; + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_call3 + (Stdlib_String[15], filename, len_f - len_s | 0, len_s), + /*<>*/ _T_ = + /*<>*/ caml_call1(Stdlib_String[26], suffix); + /*<>*/ return /*<>*/ caml_string_equal + ( /*<>*/ caml_call1(Stdlib_String[26], r), + _T_) + ? [0, + /*<>*/ caml_call3 + (Stdlib_String[15], filename, 0, len_f - len_s | 0)] + : 0; + /*<>*/ } + try{ + /*<>*/ var + /*<>*/ _j_ = + /*<>*/ caml_sys_getenv("TEMP"), + temp_dir_name$0 = _j_; + } + catch(_S_){ + var _b_ = caml_wrap_exception(_S_); + 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); + function add_bs(n){ + /*<>*/ /*<>*/ var _Q_ = 1; + if(n >= 1){ + var j = _Q_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 92); + /*<>*/ /*<>*/ var + _R_ = j + 1 | 0; + if(n === j) break; + var j = _R_; + } + } + return 0; + /*<>*/ } + function loop$0(counter, i){ + /*<>*/ var i$0 = i; + /*<>*/ for(;;){ + if(i$0 === l) + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 34); + /*<>*/ /*<>*/ var + c = /*<>*/ caml_string_get(s, i$0); + if(34 === c){ + var _O_ = 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (loop_bs, [0, _O_, i$0]); + var counter$1 = counter + 1 | 0; + /*<>*/ return loop_bs(counter$1, _O_, i$0); + } + if(92 === c){ + var _P_ = 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (loop_bs, [0, _P_, i$0]); + var counter$0 = counter + 1 | 0; + /*<>*/ return loop_bs(counter$0, _P_, i$0); + } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, c); + /*<>*/ var + /*<>*/ i$1 = i$0 + 1 | 0, + i$0 = i$1; + } + /*<>*/ } + function loop_bs(counter, n, i){ + /*<>*/ var n$0 = n, i$0 = i; + /*<>*/ for(;;){ + if(i$0 === l){ + /*<>*/ /*<>*/ caml_call2 + (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 + _N_ = i$0 + 1 | 0; + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (loop$0, [0, _N_]); + var counter$1 = counter + 1 | 0; + /*<>*/ return loop$0(counter$1, _N_); + } + if(92 !== match){ + /*<>*/ add_bs(n$0); + /*<>*/ if(counter >= 50) + /*<>*/ return /*<>*/ caml_trampoline_return + (loop$0, [0, i$0]); + var counter$0 = counter + 1 | 0; + /*<>*/ return loop$0(counter$0, i$0); + } + /*<>*/ var + /*<>*/ i$1 = i$0 + 1 | 0, + n$1 = n$0 + 1 | 0, + n$0 = n$1, + i$0 = i$1; + } + /*<>*/ } + function loop(i){ /*<>*/ return caml_trampoline(loop$0(0, i));} + /*<>*/ loop(0); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Buffer[2], b); + /*<>*/ } + function quote_cmd_filename(f){ + /*<>*/ if + (! + /*<>*/ caml_call2(Stdlib_String[14], f, 34) + && ! /*<>*/ caml_call2(Stdlib_String[14], f, 37)){ + /*<>*/ if + (! /*<>*/ caml_call2(Stdlib_String[14], f, 32)) + /*<>*/ return f; + /*<>*/ /*<>*/ var + _M_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], cst$7, _M_); + } + /*<>*/ /*<>*/ var + _L_ = + /*<>*/ caml_call2 + (Stdlib[28], cst_Filename_quote_command_bad, f); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[2], _L_); + /*<>*/ } + function quote_command$0(cmd, stdin, stdout, stderr, args){ + /*<>*/ if(stderr){ + var f = stderr[1]; + /*<>*/ if + ( /*<>*/ caml_equal(stderr, stdout)) + var _x_ = cst_2_1$0; + else + /*<>*/ var + /*<>*/ _J_ = quote_cmd_filename(f), + _x_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _J_); + var _y_ = _x_; + } + else + var _y_ = cst$16; + var _z_ = [0, _y_, _c_]; + if(stdout) + /*<>*/ var + f$0 = stdout[1], + /*<>*/ _A_ = quote_cmd_filename(f$0), + _B_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _A_); + else + var _B_ = cst$15; + var _C_ = [0, _B_, _z_]; + if(stdin) + /*<>*/ var + f$1 = stdin[1], + /*<>*/ _D_ = quote_cmd_filename(f$1), + _E_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _D_); + else + var _E_ = cst$14; + /*<>*/ var + /*<>*/ _G_ = + /*<>*/ caml_call2(Stdlib_List[19], quote$0, args), + /*<>*/ s = + /*<>*/ caml_call2(Stdlib_String[6], cst$10, _G_), + /*<>*/ b = + /*<>*/ caml_call1 + (Stdlib_Buffer[1], caml_ml_string_length(s) + 20 | 0), + _F_ = [0, _E_, _C_]; + function _w_(c){ + /*<>*/ a: + { + if(62 <= c){ + var _K_ = c - 63 | 0; + if(60 < _K_ >>> 0){if(62 <= _K_) break a;} else if(31 !== _K_) break a; + } + else + if(42 <= c){ + if(60 !== c) break a; + } + else{ + if(33 > c) break a; + 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); + } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, c); + /*<>*/ } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_String[29], _w_, s); + /*<>*/ var + _H_ = + [0, + cst$11, + [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _F_]], + /*<>*/ _I_ = + [0, cst$12, [0, quote_cmd_filename(cmd), _H_]]; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_String[6], cst$13, _I_); + /*<>*/ } + function drive_and_path(s){ + /*<>*/ var + _s_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; + if(_s_){ + /*<>*/ /*<>*/ var + param = /*<>*/ caml_string_get(s, 0); + a: + { + b: + { + if(91 <= param){ + if(25 < param - 97 >>> 0) break b; + } + else if(65 > param) break b; + var _t_ = 1; + break a; + } + var _t_ = 0; + } + /*<>*/ /*<>*/ var + _u_ = + _t_ + ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 + : _t_; + } + else + var _u_ = _s_; + /*<>*/ if(! _u_) + /*<>*/ return [0, cst$17, s]; + /*<>*/ /*<>*/ var + _v_ = + /*<>*/ caml_call3 + (Stdlib_String[15], s, 2, caml_ml_string_length(s) - 2 | 0); + /*<>*/ return [0, + /*<>*/ caml_call3(Stdlib_String[15], s, 0, 2), + _v_]; + /*<>*/ } + function dirname$0(s){ + /*<>*/ var + /*<>*/ match = drive_and_path(s), + path = match[2], + drive = match[1], + /*<>*/ dir = + generic_dirname(is_dir_sep$0, current_dir_name$0, path); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], drive, dir); + /*<>*/ } + function basename$0(s){ + /*<>*/ var path = drive_and_path(s)[2]; + /*<>*/ return generic_basename + (is_dir_sep$0, current_dir_name$0, path); + /*<>*/ } + /*<>*/ /*<>*/ var + Win32 = + [0, + null$1, + current_dir_name$0, + parent_dir_name$0, + dir_sep$0, + is_dir_sep$0, + is_relative$0, + is_implicit$0, + check_suffix$0, + chop_suffix_opt$0, + temp_dir_name$0, + quote$0, + quote_command$0, + basename$0, + dirname$0]; + /*<>*/ function basename$1(_r_){ + /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _r_); + } + /*<>*/ function dirname$1(_q_){ + /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _q_); + } + /*<>*/ var + /*<>*/ Cygwin = + [0, + null$2, + current_dir_name$1, + parent_dir_name$1, + dir_sep$1, + is_dir_sep$0, + is_relative$0, + is_implicit$0, + check_suffix$0, + chop_suffix_opt$0, + temp_dir_name, + quote, + quote_command, + basename$1, + dirname$1], + _d_ = Stdlib_Sys[4], + Sysdeps = + caml_string_notequal(_d_, "Cygwin") + ? caml_string_notequal(_d_, "Win32") ? Unix : Win32 + : Cygwin, + null$3 = Sysdeps[1], + current_dir_name$2 = Sysdeps[2], + parent_dir_name$2 = Sysdeps[3], + dir_sep$2 = Sysdeps[4], + is_dir_sep$1 = Sysdeps[5], + is_relative$1 = Sysdeps[6], + is_implicit$1 = Sysdeps[7], + check_suffix$1 = Sysdeps[8], + chop_suffix_opt$1 = Sysdeps[9], + temp_dir_name$1 = Sysdeps[10], + quote$1 = Sysdeps[11], + quote_command$1 = Sysdeps[12], + basename$2 = Sysdeps[13], + dirname$2 = Sysdeps[14]; + function concat(dirname, filename){ + /*<>*/ var l = caml_ml_string_length(dirname); + /*<>*/ if + (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_); + } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[28], dirname, filename); + /*<>*/ } + function chop_suffix(name, suff){ + /*<>*/ return check_suffix$1(name, suff) + ? caml_call3 + (Stdlib_String[15], + name, + 0, + caml_ml_string_length(name) - caml_ml_string_length(suff) | 0) + : /*<>*/ caml_call1 + (Stdlib[1], cst_Filename_chop_suffix); + /*<>*/ } + function extension_len(name){ + /*<>*/ var + i$3 = caml_ml_string_length(name) - 1 | 0, + i0 = i$3; + /*<>*/ for(;;){ + /*<>*/ if(0 <= i0 && ! is_dir_sep$1(name, i0)){ + /*<>*/ if + (46 !== /*<>*/ caml_string_get(name, i0)){ + /*<>*/ var + /*<>*/ i$2 = i0 - 1 | 0, + i0 = i$2; + continue; + } + /*<>*/ var + /*<>*/ i$1 = i0 - 1 | 0, + i = i$1; + /*<>*/ for(;;){ + /*<>*/ if(0 <= i && ! is_dir_sep$1(name, i)){ + /*<>*/ if + (46 !== /*<>*/ caml_string_get(name, i)) + return caml_ml_string_length(name) - i0 | 0; + /*<>*/ var + /*<>*/ i$0 = i - 1 | 0, + i = i$0; + continue; + } + /*<>*/ return 0; + } + } + /*<>*/ return 0; + } + /*<>*/ } + function extension(name){ + /*<>*/ /*<>*/ var + l = extension_len(name); + /*<>*/ return 0 === l + ? cst$18 + : /*<>*/ caml_call3 + (Stdlib_String[15], + 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[15], + 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[15], + name, + 0, + caml_ml_string_length(name) - l | 0); + /*<>*/ } + /*<>*/ /*<>*/ var + prng_key = + /*<>*/ caml_call2 + (Stdlib_Domain[10][1], 0, Stdlib_Random[15][2]); + function temp_file_name(temp_dir, prefix, suffix){ + /*<>*/ var + /*<>*/ random_state = + /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), + /*<>*/ rnd = + /*<>*/ caml_call1 + (Stdlib_Random[15][4], random_state) + & 16777215; + /*<>*/ return concat + (temp_dir, + /*<>*/ caml_call4 + (Stdlib_Printf[4], _e_, prefix, rnd, suffix)); + /*<>*/ } + function _f_(param){ + /*<>*/ return temp_dir_name$1; + /*<>*/ } + /*<>*/ var + /*<>*/ _g_ = + [0, function(_o_){ /*<>*/ return _o_;}], + /*<>*/ current_temp_dir_name = + /*<>*/ caml_call2(Stdlib_Domain[10][1], _g_, _f_); + function set_temp_dir_name(s){ + /*<>*/ return /*<>*/ caml_call2 + (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); + /*<>*/ } + function temp_file(opt, prefix, suffix){ + /*<>*/ if(opt) + var sth = opt[1], temp_dir = sth; + else + var + temp_dir = + /*<>*/ caml_call1 + (Stdlib_Domain[10][2], current_temp_dir_name); + var counter = 0; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + name = temp_file_name(temp_dir, prefix, suffix); + /*<>*/ try{ + /*<>*/ /*<>*/ runtime.caml_sys_close + ( /*<>*/ runtime.caml_sys_open(name, _h_, 384)); + /*<>*/ return name; + } + catch(e$0){ + var e = caml_wrap_exception(e$0); + if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); + if(1000 <= counter) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 0); + /*<>*/ var + /*<>*/ counter$0 = counter + 1 | 0, + counter = counter$0; + } + } + /*<>*/ } + function open_temp_file(opt, _m_, _l_, prefix, suffix){ + /*<>*/ if(opt) + var sth = opt[1], mode = sth; + else + var mode = _i_; + /*<>*/ if(_m_) + var sth$0 = _m_[1], perms = sth$0; + else + var perms = 384; + /*<>*/ if(_l_) + var sth$1 = _l_[1], temp_dir = sth$1; + else + var + temp_dir = + /*<>*/ caml_call1 + (Stdlib_Domain[10][2], current_temp_dir_name); + var counter = 0; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + name = temp_file_name(temp_dir, prefix, suffix); + /*<>*/ try{ + /*<>*/ /*<>*/ var + _n_ = + [0, + name, + /*<>*/ caml_call3 + (Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; + /*<>*/ return _n_; + } + catch(e$0){ + var e = caml_wrap_exception(e$0); + if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); + if(1000 <= counter) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 0); + /*<>*/ var + /*<>*/ counter$0 = counter + 1 | 0, + counter = counter$0; + } + } + /*<>*/ } + var + Stdlib_Filename = + [0, + current_dir_name$2, + parent_dir_name$2, + dir_sep$2, + concat, + is_relative$1, + is_implicit$1, + check_suffix$1, + chop_suffix, + chop_suffix_opt$1, + extension, + remove_extension, + chop_extension, + basename$2, + dirname$2, + null$3, + temp_file, + open_temp_file, + get_temp_dir_name, + set_temp_dir_name, + quote$1, + quote_command$1]; + runtime.caml_register_global(65, Stdlib_Filename, "Stdlib__Filename"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Complex +//# unitInfo: Requires: Stdlib, Stdlib__Float +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + zero = [254, 0., 0.], + one = [254, 1., 0.], + i = [254, 0., 1.], + _a_ = [254, 0., 0.]; + function add(x, y){ + /*<>*/ return [254, x[1] + y[1], x[2] + y[2]]; + /*<>*/ } + function sub(x, y){ + /*<>*/ return [254, x[1] - y[1], x[2] - y[2]]; + /*<>*/ } + function neg(x){ + /*<>*/ return [254, - x[1], - x[2]]; + /*<>*/ } + function conj(x){ + /*<>*/ return [254, x[1], - x[2]]; + /*<>*/ } + function mul(x, y){ + /*<>*/ return [254, + x[1] * y[1] - x[2] * y[2], + x[1] * y[2] + x[2] * y[1]]; + /*<>*/ } + function div(x, y){ + /*<>*/ if + ( /*<>*/ Math.abs(y[2]) + <= /*<>*/ Math.abs(y[1])){ + /*<>*/ var + /*<>*/ r = y[2] / y[1], + /*<>*/ d = y[1] + r * y[2]; + /*<>*/ return [254, + (x[1] + r * x[2]) / d, + (x[2] - r * x[1]) / d]; + } + /*<>*/ var + /*<>*/ r$0 = y[1] / y[2], + /*<>*/ d$0 = y[2] + r$0 * y[1]; + /*<>*/ return [254, + (r$0 * x[1] + x[2]) / d$0, + (r$0 * x[2] - x[1]) / d$0]; + /*<>*/ } + function inv(x){ + /*<>*/ return div(one, x); + /*<>*/ } + function norm2(x){ + /*<>*/ return x[1] * x[1] + x[2] * x[2]; + /*<>*/ } + function norm(x){ + /*<>*/ return /*<>*/ runtime.caml_hypot_float + (x[1], x[2]); + /*<>*/ } + function arg(x){ + /*<>*/ return /*<>*/ Math.atan2 + (x[2], x[1]); + /*<>*/ } + function polar(n, a){ + /*<>*/ return [254, + /*<>*/ Math.cos(a) * n, + /*<>*/ Math.sin(a) * n]; + /*<>*/ } + function sqrt(x){ + /*<>*/ if(x[1] == 0. && x[2] == 0.) + /*<>*/ return _a_; + /*<>*/ var + /*<>*/ r = /*<>*/ Math.abs(x[1]), + /*<>*/ i = /*<>*/ Math.abs(x[2]); + if(i <= r) + /*<>*/ var + /*<>*/ q = i / r, + w = + /*<>*/ Math.sqrt(r) + * + /*<>*/ Math.sqrt + (0.5 * (1. + /*<>*/ Math.sqrt(1. + q * q))); + else + /*<>*/ var + /*<>*/ q$0 = r / i, + w = + /*<>*/ Math.sqrt(i) + * + /*<>*/ Math.sqrt + (0.5 * (q$0 + /*<>*/ Math.sqrt(1. + q$0 * q$0))); + if(0. <= x[1]) /*<>*/ return [254, w, 0.5 * x[2] / w]; + var w$0 = 0. <= x[2] ? w : - w; + /*<>*/ return [254, 0.5 * i / w, w$0]; + /*<>*/ } + function exp(x){ + /*<>*/ /*<>*/ var + e = /*<>*/ Math.exp(x[1]); + /*<>*/ return [254, + e * /*<>*/ Math.cos(x[2]), + e * /*<>*/ Math.sin(x[2])]; + /*<>*/ } + function log(x){ + /*<>*/ /*<>*/ var + _b_ = /*<>*/ Math.atan2(x[2], x[1]); + /*<>*/ return [254, + /*<>*/ Math.log(norm(x)), + _b_]; + /*<>*/ } + function pow(x, y){ + /*<>*/ return exp(mul(y, log(x))); + /*<>*/ } + var + Stdlib_Complex = + [0, + zero, + one, + i, + neg, + conj, + add, + sub, + mul, + inv, + div, + sqrt, + norm2, + norm, + arg, + polar, + exp, + log, + pow]; + runtime.caml_register_global(15, Stdlib_Complex, "Stdlib__Complex"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__ArrayLabels +//# unitInfo: Requires: Stdlib__Array +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(), + Stdlib_Array = global_data.Stdlib__Array, + init = Stdlib_Array[1], + make_matrix = Stdlib_Array[2], + append = Stdlib_Array[3], + concat = Stdlib_Array[4], + sub = Stdlib_Array[5], + copy = Stdlib_Array[6], + fill = Stdlib_Array[7], + blit = Stdlib_Array[8], + to_list = Stdlib_Array[9], + of_list = Stdlib_Array[10], + iter = Stdlib_Array[11], + iteri = Stdlib_Array[12], + map = Stdlib_Array[13], + mapi = Stdlib_Array[14], + fold_left = Stdlib_Array[15], + fold_left_map = Stdlib_Array[16], + fold_right = Stdlib_Array[17], + iter2 = Stdlib_Array[18], + map2 = Stdlib_Array[19], + for_all = Stdlib_Array[20], + exists = Stdlib_Array[21], + for_all2 = Stdlib_Array[22], + exists2 = Stdlib_Array[23], + mem = Stdlib_Array[24], + memq = Stdlib_Array[25], + find_opt = Stdlib_Array[26], + find_map = Stdlib_Array[27], + split = Stdlib_Array[28], + combine = Stdlib_Array[29], + sort = Stdlib_Array[30], + stable_sort = Stdlib_Array[31], + fast_sort = Stdlib_Array[32], + to_seq = Stdlib_Array[33], + to_seqi = Stdlib_Array[34], + of_seq = Stdlib_Array[35], + Floatarray = Stdlib_Array[36], + Stdlib_ArrayLabels = + [0, + init, + make_matrix, + append, + concat, + sub, + copy, + fill, + blit, + to_list, + of_list, + iter, + iteri, + map, + mapi, + fold_left, + fold_left_map, + fold_right, + iter2, + map2, + for_all, + exists, + for_all2, + exists2, + mem, + memq, + find_opt, + find_map, + split, + combine, + sort, + stable_sort, + fast_sort, + to_seq, + to_seqi, + of_seq, + Floatarray]; + runtime.caml_register_global(1, Stdlib_ArrayLabels, "Stdlib__ArrayLabels"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__ListLabels +//# unitInfo: Requires: Stdlib__List +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(), + Stdlib_List = global_data.Stdlib__List, + length = Stdlib_List[1], + compare_lengths = Stdlib_List[2], + compare_length_with = Stdlib_List[3], + cons = Stdlib_List[4], + hd = Stdlib_List[5], + tl = Stdlib_List[6], + nth = Stdlib_List[7], + nth_opt = Stdlib_List[8], + rev = Stdlib_List[9], + init = Stdlib_List[10], + append = Stdlib_List[11], + rev_append = Stdlib_List[12], + concat = Stdlib_List[13], + flatten = Stdlib_List[14], + equal = Stdlib_List[15], + compare = Stdlib_List[16], + iter = Stdlib_List[17], + iteri = Stdlib_List[18], + map = Stdlib_List[19], + mapi = Stdlib_List[20], + rev_map = Stdlib_List[21], + filter_map = Stdlib_List[22], + concat_map = Stdlib_List[23], + fold_left_map = Stdlib_List[24], + fold_left = Stdlib_List[25], + fold_right = Stdlib_List[26], + iter2 = Stdlib_List[27], + map2 = Stdlib_List[28], + rev_map2 = Stdlib_List[29], + fold_left2 = Stdlib_List[30], + fold_right2 = Stdlib_List[31], + for_all = Stdlib_List[32], + exists = Stdlib_List[33], + for_all2 = Stdlib_List[34], + exists2 = Stdlib_List[35], + mem = Stdlib_List[36], + memq = Stdlib_List[37], + find = Stdlib_List[38], + find_opt = Stdlib_List[39], + find_map = Stdlib_List[40], + filter = Stdlib_List[41], + find_all = Stdlib_List[42], + filteri = Stdlib_List[43], + partition = Stdlib_List[44], + partition_map = Stdlib_List[45], + assoc = Stdlib_List[46], + assoc_opt = Stdlib_List[47], + assq = Stdlib_List[48], + assq_opt = Stdlib_List[49], + mem_assoc = Stdlib_List[50], + mem_assq = Stdlib_List[51], + remove_assoc = Stdlib_List[52], + remove_assq = Stdlib_List[53], + split = Stdlib_List[54], + combine = Stdlib_List[55], + sort = Stdlib_List[56], + stable_sort = Stdlib_List[57], + fast_sort = Stdlib_List[58], + sort_uniq = Stdlib_List[59], + merge = Stdlib_List[60], + to_seq = Stdlib_List[61], + of_seq = Stdlib_List[62], + Stdlib_ListLabels = + [0, + length, + compare_lengths, + compare_length_with, + cons, + hd, + tl, + nth, + nth_opt, + rev, + init, + append, + rev_append, + concat, + flatten, + equal, + compare, + iter, + iteri, + map, + mapi, + rev_map, + filter_map, + concat_map, + fold_left_map, + fold_left, + fold_right, + iter2, + map2, + rev_map2, + fold_left2, + fold_right2, + for_all, + exists, + for_all2, + exists2, + mem, + memq, + find, + find_opt, + find_map, + filter, + find_all, + filteri, + partition, + partition_map, + assoc, + assoc_opt, + assq, + assq_opt, + mem_assoc, + mem_assq, + remove_assoc, + remove_assq, + split, + combine, + sort, + stable_sort, + fast_sort, + sort_uniq, + merge, + to_seq, + of_seq]; + runtime.caml_register_global(1, Stdlib_ListLabels, "Stdlib__ListLabels"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__BytesLabels +//# unitInfo: Requires: Stdlib__Bytes +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(), + Stdlib_Bytes = global_data.Stdlib__Bytes, + make = Stdlib_Bytes[1], + init = Stdlib_Bytes[2], + empty = Stdlib_Bytes[3], + copy = Stdlib_Bytes[4], + of_string = Stdlib_Bytes[5], + to_string = Stdlib_Bytes[6], + sub = Stdlib_Bytes[7], + sub_string = Stdlib_Bytes[8], + extend = Stdlib_Bytes[9], + fill = Stdlib_Bytes[10], + blit = Stdlib_Bytes[11], + blit_string = Stdlib_Bytes[12], + concat = Stdlib_Bytes[13], + cat = Stdlib_Bytes[14], + iter = Stdlib_Bytes[15], + iteri = Stdlib_Bytes[16], + map = Stdlib_Bytes[17], + mapi = Stdlib_Bytes[18], + fold_left = Stdlib_Bytes[19], + fold_right = Stdlib_Bytes[20], + for_all = Stdlib_Bytes[21], + exists = Stdlib_Bytes[22], + trim = Stdlib_Bytes[23], + escaped = Stdlib_Bytes[24], + index = Stdlib_Bytes[25], + index_opt = Stdlib_Bytes[26], + rindex = Stdlib_Bytes[27], + rindex_opt = Stdlib_Bytes[28], + index_from = Stdlib_Bytes[29], + index_from_opt = Stdlib_Bytes[30], + rindex_from = Stdlib_Bytes[31], + rindex_from_opt = Stdlib_Bytes[32], + contains = Stdlib_Bytes[33], + contains_from = Stdlib_Bytes[34], + rcontains_from = Stdlib_Bytes[35], + uppercase_ascii = Stdlib_Bytes[36], + lowercase_ascii = Stdlib_Bytes[37], + capitalize_ascii = Stdlib_Bytes[38], + uncapitalize_ascii = Stdlib_Bytes[39], + compare = Stdlib_Bytes[40], + equal = Stdlib_Bytes[41], + starts_with = Stdlib_Bytes[42], + ends_with = Stdlib_Bytes[43], + unsafe_to_string = Stdlib_Bytes[44], + unsafe_of_string = Stdlib_Bytes[45], + split_on_char = Stdlib_Bytes[46], + to_seq = Stdlib_Bytes[47], + to_seqi = Stdlib_Bytes[48], + of_seq = Stdlib_Bytes[49], + get_utf_8_uchar = Stdlib_Bytes[50], + set_utf_8_uchar = Stdlib_Bytes[51], + is_valid_utf_8 = Stdlib_Bytes[52], + get_utf_16be_uchar = Stdlib_Bytes[53], + set_utf_16be_uchar = Stdlib_Bytes[54], + is_valid_utf_16be = Stdlib_Bytes[55], + get_utf_16le_uchar = Stdlib_Bytes[56], + set_utf_16le_uchar = Stdlib_Bytes[57], + is_valid_utf_16le = Stdlib_Bytes[58], + get_uint8 = Stdlib_Bytes[59], + get_int8 = Stdlib_Bytes[60], + get_uint16_ne = Stdlib_Bytes[61], + get_uint16_be = Stdlib_Bytes[62], + get_uint16_le = Stdlib_Bytes[63], + get_int16_ne = Stdlib_Bytes[64], + get_int16_be = Stdlib_Bytes[65], + get_int16_le = Stdlib_Bytes[66], + get_int32_ne = Stdlib_Bytes[67], + get_int32_be = Stdlib_Bytes[68], + get_int32_le = Stdlib_Bytes[69], + get_int64_ne = Stdlib_Bytes[70], + get_int64_be = Stdlib_Bytes[71], + get_int64_le = Stdlib_Bytes[72], + set_uint8 = Stdlib_Bytes[73], + set_int8 = Stdlib_Bytes[74], + set_uint16_ne = Stdlib_Bytes[75], + set_uint16_be = Stdlib_Bytes[76], + set_uint16_le = Stdlib_Bytes[77], + set_int16_ne = Stdlib_Bytes[78], + set_int16_be = Stdlib_Bytes[79], + set_int16_le = Stdlib_Bytes[80], + set_int32_ne = Stdlib_Bytes[81], + set_int32_be = Stdlib_Bytes[82], + set_int32_le = Stdlib_Bytes[83], + set_int64_ne = Stdlib_Bytes[84], + set_int64_be = Stdlib_Bytes[85], + set_int64_le = Stdlib_Bytes[86], + unsafe_escape = Stdlib_Bytes[87], + Stdlib_BytesLabels = + [0, + make, + init, + empty, + copy, + of_string, + to_string, + sub, + sub_string, + extend, + fill, + blit, + blit_string, + concat, + cat, + iter, + iteri, + map, + mapi, + fold_left, + fold_right, + for_all, + exists, + trim, + escaped, + index, + index_opt, + rindex, + rindex_opt, + index_from, + index_from_opt, + rindex_from, + rindex_from_opt, + contains, + contains_from, + rcontains_from, + uppercase_ascii, + lowercase_ascii, + capitalize_ascii, + uncapitalize_ascii, + compare, + equal, + starts_with, + ends_with, + unsafe_to_string, + unsafe_of_string, + split_on_char, + to_seq, + to_seqi, + of_seq, + get_utf_8_uchar, + set_utf_8_uchar, + is_valid_utf_8, + get_utf_16be_uchar, + set_utf_16be_uchar, + is_valid_utf_16be, + get_utf_16le_uchar, + set_utf_16le_uchar, + is_valid_utf_16le, + get_uint8, + get_int8, + get_uint16_ne, + get_uint16_be, + get_uint16_le, + get_int16_ne, + get_int16_be, + get_int16_le, + get_int32_ne, + get_int32_be, + get_int32_le, + get_int64_ne, + get_int64_be, + get_int64_le, + set_uint8, + set_int8, + set_uint16_ne, + set_uint16_be, + set_uint16_le, + set_int16_ne, + set_int16_be, + set_int16_le, + set_int32_ne, + set_int32_be, + set_int32_le, + set_int64_ne, + set_int64_be, + set_int64_le, + unsafe_escape]; + runtime.caml_register_global(1, Stdlib_BytesLabels, "Stdlib__BytesLabels"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__StringLabels +//# unitInfo: Requires: Stdlib__String +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(), + Stdlib_String = global_data.Stdlib__String, + make = Stdlib_String[1], + init = Stdlib_String[2], + empty = Stdlib_String[3], + of_bytes = Stdlib_String[4], + to_bytes = Stdlib_String[5], + concat = Stdlib_String[6], + cat = Stdlib_String[7], + equal = Stdlib_String[8], + compare = Stdlib_String[9], + starts_with = Stdlib_String[10], + ends_with = Stdlib_String[11], + contains_from = Stdlib_String[12], + rcontains_from = Stdlib_String[13], + contains = Stdlib_String[14], + sub = Stdlib_String[15], + split_on_char = Stdlib_String[16], + map = Stdlib_String[17], + mapi = Stdlib_String[18], + fold_left = Stdlib_String[19], + fold_right = Stdlib_String[20], + for_all = Stdlib_String[21], + exists = Stdlib_String[22], + trim = Stdlib_String[23], + escaped = Stdlib_String[24], + uppercase_ascii = Stdlib_String[25], + lowercase_ascii = Stdlib_String[26], + capitalize_ascii = Stdlib_String[27], + uncapitalize_ascii = Stdlib_String[28], + iter = Stdlib_String[29], + iteri = Stdlib_String[30], + index_from = Stdlib_String[31], + index_from_opt = Stdlib_String[32], + rindex_from = Stdlib_String[33], + rindex_from_opt = Stdlib_String[34], + index = Stdlib_String[35], + index_opt = Stdlib_String[36], + rindex = Stdlib_String[37], + rindex_opt = Stdlib_String[38], + to_seq = Stdlib_String[39], + to_seqi = Stdlib_String[40], + of_seq = Stdlib_String[41], + get_utf_8_uchar = Stdlib_String[42], + is_valid_utf_8 = Stdlib_String[43], + get_utf_16be_uchar = Stdlib_String[44], + is_valid_utf_16be = Stdlib_String[45], + get_utf_16le_uchar = Stdlib_String[46], + is_valid_utf_16le = Stdlib_String[47], + blit = Stdlib_String[48], + get_uint8 = Stdlib_String[49], + get_int8 = Stdlib_String[50], + get_uint16_ne = Stdlib_String[51], + get_uint16_be = Stdlib_String[52], + get_uint16_le = Stdlib_String[53], + get_int16_ne = Stdlib_String[54], + get_int16_be = Stdlib_String[55], + get_int16_le = Stdlib_String[56], + get_int32_ne = Stdlib_String[57], + hash = Stdlib_String[58], + seeded_hash = Stdlib_String[59], + get_int32_be = Stdlib_String[60], + get_int32_le = Stdlib_String[61], + get_int64_ne = Stdlib_String[62], + get_int64_be = Stdlib_String[63], + get_int64_le = Stdlib_String[64], + Stdlib_StringLabels = + [0, + make, + init, + empty, + of_bytes, + to_bytes, + concat, + cat, + equal, + compare, + starts_with, + ends_with, + contains_from, + rcontains_from, + contains, + sub, + split_on_char, + map, + mapi, + fold_left, + fold_right, + for_all, + exists, + trim, + escaped, + uppercase_ascii, + lowercase_ascii, + capitalize_ascii, + uncapitalize_ascii, + iter, + iteri, + index_from, + index_from_opt, + rindex_from, + rindex_from_opt, + index, + index_opt, + rindex, + rindex_opt, + to_seq, + to_seqi, + of_seq, + get_utf_8_uchar, + is_valid_utf_8, + get_utf_16be_uchar, + is_valid_utf_16be, + get_utf_16le_uchar, + is_valid_utf_16le, + blit, + get_uint8, + get_int8, + get_uint16_ne, + get_uint16_be, + get_uint16_le, + get_int16_ne, + get_int16_be, + get_int16_le, + get_int32_ne, + hash, + seeded_hash, + get_int32_be, + get_int32_le, + get_int64_ne, + get_int64_be, + get_int64_le]; + runtime.caml_register_global + (1, Stdlib_StringLabels, "Stdlib__StringLabels"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__MoreLabels +//# unitInfo: Requires: Stdlib__Hashtbl, Stdlib__Map, Stdlib__Set +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(), + Stdlib_Set = global_data.Stdlib__Set, + Stdlib_Map = global_data.Stdlib__Map, + Stdlib_Hashtbl = global_data.Stdlib__Hashtbl, + Stdlib_MoreLabels = [0, Stdlib_Hashtbl, Stdlib_Map, Stdlib_Set]; + runtime.caml_register_global(3, Stdlib_MoreLabels, "Stdlib__MoreLabels"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__StdLabels +(function(globalThis){ + "use strict"; + var runtime = globalThis.jsoo_runtime, Stdlib_StdLabels = [0]; + runtime.caml_register_global(0, Stdlib_StdLabels, "Stdlib__StdLabels"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__In_channel +//# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Fun, Stdlib__Sys +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_create_bytes = runtime.caml_create_bytes, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_bytes_length = runtime.caml_ml_bytes_length, + 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) + : 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, + Stdlib = global_data.Stdlib, + Stdlib_Sys = global_data.Stdlib__Sys, + Stdlib_Fun = global_data.Stdlib__Fun, + stdin = Stdlib[38], + open_bin = Stdlib[80], + open_text = Stdlib[79], + open_gen = Stdlib[81], + cst_In_channel_input_all_chann = + "In_channel.input_all: channel content is larger than maximum string length", + _a_ = [0, 0]; + function with_open(openfun, s, f){ + /*<>*/ /*<>*/ var + ic = /*<>*/ caml_call1(openfun, s); + function _r_(param){ + /*<>*/ return /*<>*/ caml_call1 + (f, ic); + /*<>*/ } + function _s_(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[94], ic); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Fun[4], _s_, _r_); + /*<>*/ } + function with_open_bin(s, f){ + /*<>*/ return with_open(Stdlib[80], s, f); + /*<>*/ } + function with_open_text(s, f){ + /*<>*/ return with_open(Stdlib[79], s, f); + /*<>*/ } + function with_open_gen(flags, perm, s, f){ + /*<>*/ return with_open + ( /*<>*/ caml_call2(Stdlib[81], flags, perm), + s, + f); + /*<>*/ } + var + seek = Stdlib[96][4], + pos = Stdlib[96][5], + length = Stdlib[96][6], + close = Stdlib[93], + close_noerr = Stdlib[94]; + function input_char(ic){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + c = /*<>*/ caml_call1(Stdlib[82], ic); + } + catch(_q_){ + var _p_ = caml_wrap_exception(_q_); + if(_p_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_p_, 0); + } + /*<>*/ return [0, c]; + /*<>*/ } + function input_byte(ic){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + n = /*<>*/ caml_call1(Stdlib[87], ic); + } + catch(_o_){ + var _n_ = caml_wrap_exception(_o_); + if(_n_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_n_, 0); + } + /*<>*/ return [0, n]; + /*<>*/ } + function input_line(ic){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + s = /*<>*/ caml_call1(Stdlib[83], ic); + } + catch(_m_){ + var _l_ = caml_wrap_exception(_m_); + if(_l_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_l_, 0); + } + /*<>*/ return [0, s]; + /*<>*/ } + var input = Stdlib[84]; + function really_input(ic, buf, pos, len){ + /*<>*/ try{ + /*<>*/ /*<>*/ caml_call4 + (Stdlib[85], ic, buf, pos, len); + /*<>*/ return _a_; + } + catch(_k_){ + var _j_ = caml_wrap_exception(_k_); + if(_j_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_j_, 0); + } + /*<>*/ } + function really_input_string(ic, len){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + s = /*<>*/ caml_call2(Stdlib[86], ic, len); + } + catch(_i_){ + var _h_ = caml_wrap_exception(_i_); + if(_h_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_h_, 0); + } + /*<>*/ return [0, s]; + /*<>*/ } + function read_upto(ic, buf, ofs, len){ + /*<>*/ var ofs$0 = ofs, len$0 = len; + /*<>*/ for(;;){ + if(0 !== len$0){ + /*<>*/ /*<>*/ var + r = + /*<>*/ caml_call4 + (Stdlib[84], ic, buf, ofs$0, len$0); + /*<>*/ if(0 !== r){ + var + len$1 = len$0 - r | 0, + ofs$1 = ofs$0 + r | 0, + ofs$0 = ofs$1, + len$0 = len$1; + continue; + } + } + /*<>*/ return ofs$0 - ofs | 0; + } + /*<>*/ } + function ensure(buf, ofs, n){ + /*<>*/ var len = caml_ml_bytes_length(buf); + if((ofs + n | 0) <= len) /*<>*/ return buf; + /*<>*/ /*<>*/ var + new_len = [0, len]; + for(;;){ + if(new_len[1] >= (ofs + n | 0)){ + /*<>*/ var + new_len$0 = new_len[1], + new_len$1 = + new_len$0 <= Stdlib_Sys[12] + ? new_len$0 + : ofs + < Stdlib_Sys[12] + ? Stdlib_Sys[12] + : /*<>*/ caml_call1 + (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); + /*<>*/ return new_buf; + } + new_len[1] = (2 * new_len[1] | 0) + 1 | 0; + } + /*<>*/ } + function input_all(ic){ + /*<>*/ /*<>*/ var + chunk_size = 65536; + /*<>*/ try{ + /*<>*/ var + /*<>*/ _d_ = + /*<>*/ caml_call1(Stdlib[91], ic), + /*<>*/ _e_ = + /*<>*/ caml_call1(Stdlib[92], ic) - _d_ | 0, + initial_size = _e_; + } + catch(_g_){ + var _b_ = caml_wrap_exception(_g_); + if(_b_[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(_b_, 0); + var initial_size = -1; + } + /*<>*/ var + /*<>*/ initial_size$0 = + 0 <= initial_size ? initial_size : chunk_size, + initial_size$1 = + initial_size$0 <= Stdlib_Sys[12] ? initial_size$0 : Stdlib_Sys[12], + /*<>*/ buf = + /*<>*/ caml_create_bytes(initial_size$1), + /*<>*/ nread = + read_upto(ic, buf, 0, initial_size$1); + if(nread < initial_size$1) + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_Bytes[8], buf, 0, nread); + /*<>*/ try{ + /*<>*/ /*<>*/ var + c = /*<>*/ caml_call1(Stdlib[82], ic); + } + catch(_f_){ + var _c_ = caml_wrap_exception(_f_); + if(_c_ === Stdlib[12]) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], buf); + throw caml_maybe_attach_backtrace(_c_, 0); + } + /*<>*/ /*<>*/ var + buf$2 = ensure(buf, nread, 65537); + /*<>*/ /*<>*/ runtime.caml_bytes_set + (buf$2, nread, c); + /*<>*/ var + /*<>*/ ofs$1 = nread + 1 | 0, + buf$0 = buf$2, + ofs = ofs$1; + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ buf$1 = ensure(buf$0, ofs, chunk_size), + rem = 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); + var ofs$0 = ofs + rem | 0, buf$0 = buf$1, ofs = ofs$0; + } + /*<>*/ } + var + set_binary_mode = Stdlib[95], + Stdlib_In_channel = + [0, + stdin, + open_bin, + open_text, + open_gen, + with_open_bin, + with_open_text, + with_open_gen, + seek, + pos, + length, + close, + close_noerr, + input_char, + input_byte, + input_line, + input, + really_input, + really_input_string, + input_all, + set_binary_mode]; + runtime.caml_register_global(6, Stdlib_In_channel, "Stdlib__In_channel"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Out_channel +//# unitInfo: Requires: Stdlib, Stdlib__Fun +(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]); + } + /*<>*/ 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, + Stdlib_Fun = global_data.Stdlib__Fun, + stdout = Stdlib[39], + stderr = Stdlib[40], + open_bin = Stdlib[61], + open_text = Stdlib[60], + open_gen = Stdlib[62]; + function with_open(openfun, s, f){ + /*<>*/ /*<>*/ var + oc = /*<>*/ caml_call1(openfun, s); + function _a_(param){ + /*<>*/ return /*<>*/ caml_call1 + (f, oc); + /*<>*/ } + function _b_(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[77], oc); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Fun[4], _b_, _a_); + /*<>*/ } + function with_open_bin(s, f){ + /*<>*/ return with_open(Stdlib[61], s, f); + /*<>*/ } + function with_open_text(s, f){ + /*<>*/ return with_open(Stdlib[60], s, f); + /*<>*/ } + function with_open_gen(flags, perm, s, f){ + /*<>*/ return with_open + ( /*<>*/ caml_call2(Stdlib[62], flags, perm), + s, + f); + /*<>*/ } + var + seek = Stdlib[96][1], + pos = Stdlib[96][2], + length = Stdlib[96][3], + close = Stdlib[76], + close_noerr = Stdlib[77], + flush = Stdlib[63], + flush_all = Stdlib[64], + output_char = Stdlib[65], + output_byte = Stdlib[70], + output_string = Stdlib[66], + output_bytes = Stdlib[67], + output = Stdlib[68], + output_substring = Stdlib[69], + set_binary_mode = Stdlib[78], + Stdlib_Out_channel = + [0, + stdout, + stderr, + open_bin, + open_text, + open_gen, + with_open_bin, + with_open_text, + with_open_gen, + seek, + pos, + length, + close, + close_noerr, + flush, + flush_all, + output_char, + output_byte, + output_string, + output_bytes, + output, + output_substring, + set_binary_mode, + runtime.caml_ml_set_buffered, + runtime.caml_ml_is_buffered]; + runtime.caml_register_global(2, Stdlib_Out_channel, "Stdlib__Out_channel"); + return; + /*<>*/ } + (globalThis)); + +//# unitInfo: Provides: Stdlib__Effect +//# unitInfo: Requires: Stdlib, Stdlib__Callback, Stdlib__Printexc, Stdlib__Printf +//# unitInfo: Effects_without_cps: true +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_alloc_stack = runtime.caml_alloc_stack, + caml_continuation_use_noexc = runtime.caml_continuation_use_noexc, + caml_fresh_oo_id = runtime.caml_fresh_oo_id, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_restore_raw_backtrace = runtime.caml_restore_raw_backtrace, + caml_wrap_exception = runtime.caml_wrap_exception, + jsoo_effect_not_supported = runtime.jsoo_effect_not_supported; + /*<>*/ 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 + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Stdlib_Printexc = global_data.Stdlib__Printexc, + Stdlib_Printf = global_data.Stdlib__Printf, + Stdlib_Callback = global_data.Stdlib__Callback, + /*<>*/ Unhandled = + [248, "Stdlib.Effect.Unhandled", caml_fresh_oo_id(0)], + /*<>*/ Continuation_already_resumed = + [248, "Stdlib.Effect.Continuation_already_resumed", caml_fresh_oo_id(0)], + cst_impossible = "impossible", + cst_Initial_setup = "Initial_setup__", + cst_E = "E", + _a_ = + [0, + [11, "Stdlib.Effect.Unhandled(", [2, 0, [12, 41, 0]]], + "Stdlib.Effect.Unhandled(%s)"], + cst_Stdlib_Effect_Should_not_s = "Stdlib.Effect.Should_not_see_this__", + cst_Effect_Unhandled = "Effect.Unhandled", + cst_Effect_Continuation_alread = "Effect.Continuation_already_resumed"; + function printer(param){ + /*<>*/ if(param[1] !== Unhandled) + /*<>*/ return 0; + /*<>*/ var + x = param[2], + /*<>*/ _j_ = + /*<>*/ caml_call1(Stdlib_Printexc[26], x), + /*<>*/ msg = + /*<>*/ caml_call2(Stdlib_Printf[4], _a_, _j_); + /*<>*/ return [0, msg]; + /*<>*/ } + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Printexc[9], printer); + /*<>*/ /*<>*/ var + Should_not_see_this = + [248, cst_Stdlib_Effect_Should_not_s, caml_fresh_oo_id(0)]; + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Callback[2], + cst_Effect_Unhandled, + [0, Unhandled, Should_not_see_this]); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Callback[2], + cst_Effect_Continuation_alread, + Continuation_already_resumed); + /*<>*/ function continue$0(k, v){ + function _h_(x){ + /*<>*/ return x; + /*<>*/ } + /*<>*/ /*<>*/ var + _i_ = /*<>*/ caml_continuation_use_noexc(k); + /*<>*/ return /*<>*/ jsoo_effect_not_supported + (); + /*<>*/ } + function discontinue(k, e){ + function _f_(e){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 1); + /*<>*/ } + /*<>*/ /*<>*/ var + _g_ = /*<>*/ caml_continuation_use_noexc(k); + /*<>*/ return /*<>*/ jsoo_effect_not_supported + (); + /*<>*/ } + function discontinue_with_backtrace(k, e, bt){ + function _d_(e){ + /*<>*/ caml_restore_raw_backtrace(e, bt); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 0); + /*<>*/ } + /*<>*/ /*<>*/ var + _e_ = /*<>*/ caml_continuation_use_noexc(k); + /*<>*/ return /*<>*/ jsoo_effect_not_supported + (); + /*<>*/ } + function match_with(comp, arg, handler){ + function effc(eff, k, last_fiber){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(handler[3], eff); + if(! match) + /*<>*/ return /*<>*/ jsoo_effect_not_supported + (); + var f = match[1]; + /*<>*/ return /*<>*/ caml_call1(f, k); + /*<>*/ } + /*<>*/ /*<>*/ var + s = + /*<>*/ caml_alloc_stack(handler[1], handler[2], effc); + /*<>*/ return /*<>*/ jsoo_effect_not_supported + (); + /*<>*/ } + function try_with(comp, arg, handler){ + function effc(eff, k, last_fiber){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(handler[1], eff); + if(! match) + /*<>*/ return /*<>*/ jsoo_effect_not_supported + (); + var f = match[1]; + /*<>*/ return /*<>*/ caml_call1(f, k); + /*<>*/ } + function _c_(e){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 1); + /*<>*/ } + /*<>*/ /*<>*/ var + s = + /*<>*/ caml_alloc_stack + (function(x){ + /*<>*/ return x; + /*<>*/ }, + _c_, + effc); + /*<>*/ return /*<>*/ jsoo_effect_not_supported + (); + /*<>*/ } + /*<>*/ /*<>*/ var + Deep = + [0, + continue$0, + discontinue, + discontinue_with_backtrace, + match_with, + try_with]; + function fiber(f){ + /*<>*/ var + /*<>*/ Initial_setup = + [248, cst_Initial_setup, caml_fresh_oo_id(0)], + /*<>*/ E = [248, cst_E, caml_fresh_oo_id(0)]; + function f$0(param){ + /*<>*/ return /*<>*/ caml_call1 + (f, /*<>*/ jsoo_effect_not_supported()); + /*<>*/ } + /*<>*/ function error(param){ + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[2], cst_impossible); + /*<>*/ } + function effc(eff, k, last_fiber){ + /*<>*/ if(eff === Initial_setup) + /*<>*/ throw [0, E, k]; + /*<>*/ return error(0); + /*<>*/ } + /*<>*/ /*<>*/ var + s = /*<>*/ caml_alloc_stack(error, error, effc); + /*<>*/ try{ + /*<>*/ /*<>*/ jsoo_effect_not_supported + (); + var _b_ = 0; + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn[1] !== E) throw caml_maybe_attach_backtrace(exn, 0); + var k = exn[2]; + /*<>*/ return k; + } + /*<>*/ return error(0); + /*<>*/ } + function continue_gen(k, resume_fun, v, handler){ + function effc(eff, k, last_fiber){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(handler[3], eff); + if(! match) + /*<>*/ return /*<>*/ jsoo_effect_not_supported + (); + var f = match[1]; + /*<>*/ return /*<>*/ caml_call1 + (f, k); + /*<>*/ } + /*<>*/ /*<>*/ var + stack = + /*<>*/ runtime.caml_continuation_use_and_update_handler_noexc + (k, handler[1], handler[2], effc); + /*<>*/ return /*<>*/ jsoo_effect_not_supported + (); + /*<>*/ } + function continue_with(k, v, handler){ + /*<>*/ return continue_gen + (k, + function(x){ + /*<>*/ return x; + /*<>*/ }, + v, + handler); + /*<>*/ } + function discontinue_with(k, v, handler){ + /*<>*/ return continue_gen + (k, + function(e){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 1); + /*<>*/ }, + v, + handler); + /*<>*/ } + function discontinue_with_backtrace$0(k, v, bt, handler){ + /*<>*/ return continue_gen + (k, + function(e){ + /*<>*/ caml_restore_raw_backtrace(e, bt); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 0); + /*<>*/ }, + v, + handler); + /*<>*/ } + var + Stdlib_Effect = + [0, + Unhandled, + Continuation_already_resumed, + Deep, + [0, + fiber, + continue_with, + discontinue_with, + discontinue_with_backtrace$0]]; + runtime.caml_register_global(13, Stdlib_Effect, "Stdlib__Effect"); + return; + /*<>*/ } + (globalThis)); diff --git a/testing/dead_field.js b/testing/dead_field.js new file mode 100644 index 0000000000..c9c740a5b2 --- /dev/null +++ b/testing/dead_field.js @@ -0,0 +1,29 @@ +// Generated by js_of_ocaml +//# buildInfo:effects=false, kind=cmo, use-js-string=true, version=5.4.0+git-5.2.0-99-g50bcd077-dirty + +//# unitInfo: Provides: Dead_field +//# unitInfo: Requires: Stdlib +(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 + _d_ = undefined, + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib; + function _a_(_f_, _e_){ + var _g_ = _f_ ? [0, 1, _d_, _e_] : [0, 3, _d_, 4]; + return [0, _g_[1], _g_[3]]; + } + var _b_ = _a_(0, 2)[2], _c_ = _a_(1, 1)[1] + _b_ | 0; + caml_call1(Stdlib[44], _c_); + var Dead_field = [0]; + runtime.caml_register_global(1, Dead_field, "Dead_field"); + return; + } + (globalThis)); From bbc3932060959168bebdca882c765631e384fed5 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 2 Oct 2023 15:44:41 -0500 Subject: [PATCH 082/112] fix live_instruction --- compiler/lib/global_deadcode.ml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index f40a3981c5..2022864a8d 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -220,19 +220,18 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = in let live_instruction i = match i with - | Let (_x, e) -> + | Let (_x, e) -> ( if not (pure_expr pure_funs e) - then ( - let vars = expr_vars e in - Var.Set.iter add_top vars; + then match e with | Apply { f; args; _ } -> add_top f; List.iter ~f:(fun x -> if variable_may_escape x global_info then add_top x) args - | _ -> ()) - else () + | _ -> + let vars = expr_vars e in + Var.Set.iter add_top vars) | Assign (_, _) -> () | Set_field (x, i, y) -> add_live x i; From 09d353ed0db28f5d8ff099eb9253920fb2ec5daa Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 2 Oct 2023 15:44:41 -0500 Subject: [PATCH 083/112] fix live_instruction --- compiler/lib/global_deadcode.ml | 11 +- compiler/tests-full/stdlib.cma.js | 34020 ---------------------------- testing/dead_field.js | 29 - 3 files changed, 5 insertions(+), 34055 deletions(-) delete mode 100644 compiler/tests-full/stdlib.cma.js delete mode 100644 testing/dead_field.js diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index f40a3981c5..2022864a8d 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -220,19 +220,18 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = in let live_instruction i = match i with - | Let (_x, e) -> + | Let (_x, e) -> ( if not (pure_expr pure_funs e) - then ( - let vars = expr_vars e in - Var.Set.iter add_top vars; + then match e with | Apply { f; args; _ } -> add_top f; List.iter ~f:(fun x -> if variable_may_escape x global_info then add_top x) args - | _ -> ()) - else () + | _ -> + let vars = expr_vars e in + Var.Set.iter add_top vars) | Assign (_, _) -> () | Set_field (x, i, y) -> add_live x i; diff --git a/compiler/tests-full/stdlib.cma.js b/compiler/tests-full/stdlib.cma.js deleted file mode 100644 index e3d09981e8..0000000000 --- a/compiler/tests-full/stdlib.cma.js +++ /dev/null @@ -1,34020 +0,0 @@ -// Generated by js_of_ocaml -//# buildInfo:effects=false, kind=cma, use-js-string=true, version=5.4.0+git-5.3.0-128-g266221e88f-dirty - -//# unitInfo: Provides: CamlinternalFormatBasics -(function - (globalThis){ - "use strict"; - var runtime = globalThis.jsoo_runtime; - function erase_rel(param){ - /*<>*/ if(typeof param === "number") - /*<>*/ return 0; - switch(param[0]){ - case 0: - var rest = param[1]; - /*<>*/ return [0, erase_rel(rest)]; - case 1: - var rest$0 = param[1]; - /*<>*/ return [1, - erase_rel(rest$0)]; - case 2: - var rest$1 = param[1]; - /*<>*/ return [2, - erase_rel(rest$1)]; - case 3: - var rest$2 = param[1]; - /*<>*/ return [3, - erase_rel(rest$2)]; - case 4: - var rest$3 = param[1]; - /*<>*/ return [4, - erase_rel(rest$3)]; - case 5: - var rest$4 = param[1]; - /*<>*/ return [5, - erase_rel(rest$4)]; - case 6: - var rest$5 = param[1]; - /*<>*/ return [6, - erase_rel(rest$5)]; - case 7: - var rest$6 = param[1]; - /*<>*/ return [7, - erase_rel(rest$6)]; - case 8: - var rest$7 = param[2], ty = param[1]; - /*<>*/ return [8, - ty, - erase_rel(rest$7)]; - case 9: - var rest$8 = param[3], ty1 = param[1]; - /*<>*/ return [9, - ty1, - ty1, - erase_rel(rest$8)]; - case 10: - var rest$9 = param[1]; - /*<>*/ return [10, - erase_rel(rest$9)]; - case 11: - var rest$10 = param[1]; - /*<>*/ return [11, - erase_rel(rest$10)]; - case 12: - var rest$11 = param[1]; - /*<>*/ return [12, - erase_rel(rest$11)]; - case 13: - var rest$12 = param[1]; - /*<>*/ return [13, - erase_rel(rest$12)]; - default: - var rest$13 = param[1]; - /*<>*/ return [14, - erase_rel(rest$13)]; - } - /*<>*/ } - function concat_fmtty(fmtty1, fmtty2){ - /*<>*/ if(typeof fmtty1 === "number") - /*<>*/ return fmtty2; - switch(fmtty1[0]){ - case 0: - var rest = fmtty1[1]; - /*<>*/ return [0, - concat_fmtty(rest, fmtty2)]; - case 1: - var rest$0 = fmtty1[1]; - /*<>*/ return [1, - concat_fmtty(rest$0, fmtty2)]; - case 2: - var rest$1 = fmtty1[1]; - /*<>*/ return [2, - concat_fmtty(rest$1, fmtty2)]; - case 3: - var rest$2 = fmtty1[1]; - /*<>*/ return [3, - concat_fmtty(rest$2, fmtty2)]; - case 4: - var rest$3 = fmtty1[1]; - /*<>*/ return [4, - concat_fmtty(rest$3, fmtty2)]; - case 5: - var rest$4 = fmtty1[1]; - /*<>*/ return [5, - concat_fmtty(rest$4, fmtty2)]; - case 6: - var rest$5 = fmtty1[1]; - /*<>*/ return [6, - concat_fmtty(rest$5, fmtty2)]; - case 7: - var rest$6 = fmtty1[1]; - /*<>*/ return [7, - concat_fmtty(rest$6, fmtty2)]; - case 8: - var rest$7 = fmtty1[2], ty = fmtty1[1]; - /*<>*/ return [8, - ty, - concat_fmtty(rest$7, fmtty2)]; - case 9: - var rest$8 = fmtty1[3], ty2 = fmtty1[2], ty1 = fmtty1[1]; - /*<>*/ return [9, - ty1, - ty2, - concat_fmtty(rest$8, fmtty2)]; - case 10: - var rest$9 = fmtty1[1]; - /*<>*/ return [10, - concat_fmtty(rest$9, fmtty2)]; - case 11: - var rest$10 = fmtty1[1]; - /*<>*/ return [11, - concat_fmtty(rest$10, fmtty2)]; - case 12: - var rest$11 = fmtty1[1]; - /*<>*/ return [12, - concat_fmtty(rest$11, fmtty2)]; - case 13: - var rest$12 = fmtty1[1]; - /*<>*/ return [13, - concat_fmtty(rest$12, fmtty2)]; - default: - var rest$13 = fmtty1[1]; - /*<>*/ return [14, - concat_fmtty(rest$13, fmtty2)]; - } - /*<>*/ } - function concat_fmt(fmt1, fmt2){ - /*<>*/ if(typeof fmt1 === "number") - /*<>*/ return fmt2; - switch(fmt1[0]){ - case 0: - var rest = fmt1[1]; - /*<>*/ return [0, - concat_fmt(rest, fmt2)]; - case 1: - var rest$0 = fmt1[1]; - /*<>*/ return [1, - concat_fmt(rest$0, fmt2)]; - case 2: - var rest$1 = fmt1[2], pad = fmt1[1]; - /*<>*/ return [2, - pad, - concat_fmt(rest$1, fmt2)]; - case 3: - var rest$2 = fmt1[2], pad$0 = fmt1[1]; - /*<>*/ return [3, - pad$0, - concat_fmt(rest$2, fmt2)]; - case 4: - var rest$3 = fmt1[4], prec = fmt1[3], pad$1 = fmt1[2], iconv = fmt1[1]; - /*<>*/ return [4, - iconv, - pad$1, - prec, - concat_fmt(rest$3, fmt2)]; - case 5: - var - rest$4 = fmt1[4], - prec$0 = fmt1[3], - pad$2 = fmt1[2], - iconv$0 = fmt1[1]; - /*<>*/ return [5, - iconv$0, - pad$2, - prec$0, - concat_fmt(rest$4, fmt2)]; - case 6: - var - rest$5 = fmt1[4], - prec$1 = fmt1[3], - pad$3 = fmt1[2], - iconv$1 = fmt1[1]; - /*<>*/ return [6, - iconv$1, - pad$3, - prec$1, - concat_fmt(rest$5, fmt2)]; - case 7: - var - rest$6 = fmt1[4], - prec$2 = fmt1[3], - pad$4 = fmt1[2], - iconv$2 = fmt1[1]; - /*<>*/ return [7, - iconv$2, - pad$4, - prec$2, - concat_fmt(rest$6, fmt2)]; - case 8: - var - rest$7 = fmt1[4], - prec$3 = fmt1[3], - pad$5 = fmt1[2], - fconv = fmt1[1]; - /*<>*/ return [8, - fconv, - pad$5, - prec$3, - concat_fmt(rest$7, fmt2)]; - case 9: - var rest$8 = fmt1[2], pad$6 = fmt1[1]; - /*<>*/ return [9, - pad$6, - concat_fmt(rest$8, fmt2)]; - case 10: - var rest$9 = fmt1[1]; - /*<>*/ return [10, - concat_fmt(rest$9, fmt2)]; - case 11: - var rest$10 = fmt1[2], str = fmt1[1]; - /*<>*/ return [11, - str, - concat_fmt(rest$10, fmt2)]; - case 12: - var rest$11 = fmt1[2], chr = fmt1[1]; - /*<>*/ return [12, - chr, - concat_fmt(rest$11, fmt2)]; - case 13: - var rest$12 = fmt1[3], fmtty = fmt1[2], pad$7 = fmt1[1]; - /*<>*/ return [13, - pad$7, - fmtty, - concat_fmt(rest$12, fmt2)]; - case 14: - var rest$13 = fmt1[3], fmtty$0 = fmt1[2], pad$8 = fmt1[1]; - /*<>*/ return [14, - pad$8, - fmtty$0, - concat_fmt(rest$13, fmt2)]; - case 15: - var rest$14 = fmt1[1]; - /*<>*/ return [15, - concat_fmt(rest$14, fmt2)]; - case 16: - var rest$15 = fmt1[1]; - /*<>*/ return [16, - concat_fmt(rest$15, fmt2)]; - case 17: - var rest$16 = fmt1[2], fmting_lit = fmt1[1]; - /*<>*/ return [17, - fmting_lit, - concat_fmt(rest$16, fmt2)]; - case 18: - var rest$17 = fmt1[2], fmting_gen = fmt1[1]; - /*<>*/ return [18, - fmting_gen, - concat_fmt(rest$17, fmt2)]; - case 19: - var rest$18 = fmt1[1]; - /*<>*/ return [19, - concat_fmt(rest$18, fmt2)]; - case 20: - var rest$19 = fmt1[3], char_set = fmt1[2], width_opt = fmt1[1]; - /*<>*/ return [20, - width_opt, - char_set, - concat_fmt(rest$19, fmt2)]; - case 21: - var rest$20 = fmt1[2], counter = fmt1[1]; - /*<>*/ return [21, - counter, - concat_fmt(rest$20, fmt2)]; - case 22: - var rest$21 = fmt1[1]; - /*<>*/ return [22, - concat_fmt(rest$21, fmt2)]; - case 23: - var rest$22 = fmt1[2], ign = fmt1[1]; - /*<>*/ return [23, - ign, - concat_fmt(rest$22, fmt2)]; - default: - var rest$23 = fmt1[3], f = fmt1[2], arity = fmt1[1]; - /*<>*/ return [24, - arity, - f, - concat_fmt(rest$23, fmt2)]; - } - /*<>*/ } - var CamlinternalFormatBasics = [0, concat_fmtty, erase_rel, concat_fmt]; - runtime.caml_register_global - (0, CamlinternalFormatBasics, "CamlinternalFormatBasics"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib -//# unitInfo: Requires: Assert_failure, CamlinternalFormatBasics, Division_by_zero, End_of_file, Failure, Invalid_argument, Match_failure, Not_found, Out_of_memory, Stack_overflow, Sys_blocked_io, Sys_error, Undefined_recursive_module -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_false$0 = "false", - cst_true$0 = "true", - caml_atomic_cas = runtime.caml_atomic_cas, - caml_atomic_load = runtime.caml_atomic_load, - caml_blit_string = runtime.caml_blit_string, - caml_create_bytes = runtime.caml_create_bytes, - caml_float_of_string = runtime.caml_float_of_string, - caml_int64_float_of_bits = runtime.caml_int64_float_of_bits, - caml_int_of_string = runtime.caml_int_of_string, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_bytes_length = runtime.caml_ml_bytes_length, - caml_ml_channel_size = runtime.caml_ml_channel_size, - caml_ml_channel_size_64 = runtime.caml_ml_channel_size_64, - caml_ml_close_channel = runtime.caml_ml_close_channel, - caml_ml_flush = runtime.caml_ml_flush, - caml_ml_input = runtime.caml_ml_input, - caml_ml_input_char = runtime.caml_ml_input_char, - caml_ml_open_descriptor_in = runtime.caml_ml_open_descriptor_in, - caml_ml_open_descriptor_out = runtime.caml_ml_open_descriptor_out, - caml_ml_output = runtime.caml_ml_output, - caml_ml_output_bytes = runtime.caml_ml_output_bytes, - caml_ml_output_char = runtime.caml_ml_output_char, - caml_ml_set_binary_mode = runtime.caml_ml_set_binary_mode, - caml_ml_set_channel_name = runtime.caml_ml_set_channel_name, - caml_ml_string_length = runtime.caml_ml_string_length, - caml_string_notequal = runtime.caml_string_notequal, - caml_string_of_bytes = runtime.caml_string_of_bytes, - caml_sys_open = runtime.caml_sys_open, - 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) - : runtime.caml_call_gen(f, [a0, a1]); - } - var - global_data = runtime.caml_get_global_data(), - cst$0 = "%,", - cst = ".", - CamlinternalFormatBasics = global_data.CamlinternalFormatBasics, - Invalid_argument = global_data.Invalid_argument, - Failure = global_data.Failure, - Match_failure = global_data.Match_failure, - Assert_failure = global_data.Assert_failure, - Not_found = global_data.Not_found, - Out_of_memory = global_data.Out_of_memory, - Stack_overflow = global_data.Stack_overflow, - Sys_error = global_data.Sys_error, - End_of_file = global_data.End_of_file, - Division_by_zero = global_data.Division_by_zero, - Sys_blocked_io = global_data.Sys_blocked_io, - Undefined_recursive_module = global_data.Undefined_recursive_module, - cst_really_input = "really_input", - cst_input = "input", - _l_ = [0, 0, [0, 6, 0]], - _k_ = [0, 0, [0, 7, 0]], - cst_output_substring = "output_substring", - cst_output = "output", - _j_ = [0, 1, [0, 3, [0, 4, [0, 6, 0]]]], - _i_ = [0, 1, [0, 3, [0, 4, [0, 7, 0]]]], - _g_ = [0, 1], - _h_ = [0, 0], - cst_bool_of_string = "bool_of_string", - cst_true = cst_true$0, - cst_false = cst_false$0, - cst_char_of_int = "char_of_int", - cst_Stdlib_Exit = "Stdlib.Exit", - _a_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 32752), - _b_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 65520), - _c_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 32752), - _d_ = runtime.caml_int64_create_lo_mi_hi(16777215, 16777215, 32751), - _e_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 16), - _f_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 15536); - function failwith(s){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Failure, s], 1); - /*<>*/ } - function invalid_arg(s){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Invalid_argument, s], 1); - /*<>*/ } - /*<>*/ /*<>*/ var - Exit = [248, cst_Stdlib_Exit, runtime.caml_fresh_oo_id(0)]; - function min(x, y){ - /*<>*/ return /*<>*/ runtime.caml_lessequal - (x, y) - ? x - : y; - /*<>*/ } - function max(x, y){ - /*<>*/ return /*<>*/ runtime.caml_greaterequal - (x, y) - ? x - : y; - /*<>*/ } - function abs(x){ - /*<>*/ return 0 <= x ? x : - x | 0; - /*<>*/ } - function lnot(x){ - /*<>*/ return x ^ -1; - /*<>*/ } - /*<>*/ var - /*<>*/ infinity = - /*<>*/ caml_int64_float_of_bits(_a_), - /*<>*/ neg_infinity = - /*<>*/ caml_int64_float_of_bits(_b_), - /*<>*/ nan = - /*<>*/ caml_int64_float_of_bits(_c_), - /*<>*/ max_float = - /*<>*/ caml_int64_float_of_bits(_d_), - /*<>*/ min_float = - /*<>*/ caml_int64_float_of_bits(_e_), - /*<>*/ epsilon_float = - /*<>*/ caml_int64_float_of_bits(_f_), - max_int = 2147483647, - min_int = -2147483648; - function symbol(s1, s2){ - /*<>*/ var - l1 = caml_ml_string_length(s1), - l2 = caml_ml_string_length(s2), - /*<>*/ s = - /*<>*/ caml_create_bytes(l1 + l2 | 0); - /*<>*/ /*<>*/ caml_blit_string - (s1, 0, s, 0, l1); - /*<>*/ /*<>*/ caml_blit_string - (s2, 0, s, l1, l2); - return caml_string_of_bytes(s); - /*<>*/ } - function char_of_int(n){ - /*<>*/ if(0 <= n && 255 >= n) - /*<>*/ return n; - /*<>*/ return invalid_arg(cst_char_of_int); - /*<>*/ } - function string_of_bool(b){ - /*<>*/ return b ? cst_true : cst_false; - /*<>*/ } - function bool_of_string(param){ - /*<>*/ return caml_string_notequal(param, cst_false$0) - ? caml_string_notequal - (param, cst_true$0) - ? invalid_arg(cst_bool_of_string) - : 1 - : 0; - /*<>*/ } - function bool_of_string_opt(param){ - /*<>*/ return caml_string_notequal(param, cst_false$0) - ? caml_string_notequal(param, cst_true$0) ? 0 : _g_ - : _h_; - /*<>*/ } - function string_of_int(n){ - /*<>*/ return "" + n; - /*<>*/ } - function int_of_string_opt(s){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _B_ = [0, /*<>*/ caml_int_of_string(s)]; - /*<>*/ return _B_; - } - catch(_C_){ - var _A_ = caml_wrap_exception(_C_); - if(_A_[1] === Failure) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_A_, 0); - } - /*<>*/ } - function valid_float_lexem(s){ - /*<>*/ var l = caml_ml_string_length(s), i = 0; - /*<>*/ for(;;){ - if(l <= i) /*<>*/ return symbol(s, cst); - /*<>*/ /*<>*/ var - match = /*<>*/ runtime.caml_string_get(s, i); - a: - { - if(48 <= match){if(58 > match) break a;} else if(45 === match) break a; - /*<>*/ return s; - } - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function string_of_float(f){ - /*<>*/ return valid_float_lexem - ( /*<>*/ runtime.caml_format_float("%.12g", f)); - /*<>*/ } - function float_of_string_opt(s){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _y_ = [0, /*<>*/ caml_float_of_string(s)]; - /*<>*/ return _y_; - } - catch(_z_){ - var _x_ = caml_wrap_exception(_z_); - if(_x_[1] === Failure) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_x_, 0); - } - /*<>*/ } - function symbol$0(l1, l2){ - /*<>*/ if(! l1) /*<>*/ return l2; - var tl = l1[2], hd = l1[1]; - /*<>*/ return [0, hd, symbol$0(tl, l2)]; - /*<>*/ } - /*<>*/ var - /*<>*/ stdin = - /*<>*/ caml_ml_open_descriptor_in(0), - /*<>*/ stdout = - /*<>*/ caml_ml_open_descriptor_out(1), - /*<>*/ stderr = - /*<>*/ caml_ml_open_descriptor_out(2); - function open_out_gen(mode, perm, name){ - /*<>*/ /*<>*/ var - c = - /*<>*/ caml_ml_open_descriptor_out - ( /*<>*/ caml_sys_open(name, mode, perm)); - /*<>*/ /*<>*/ caml_ml_set_channel_name - (c, name); - /*<>*/ return c; - /*<>*/ } - function open_out(name){ - /*<>*/ return open_out_gen(_i_, 438, name); - /*<>*/ } - function open_out_bin(name){ - /*<>*/ return open_out_gen(_j_, 438, name); - /*<>*/ } - function flush_all(param){ - /*<>*/ var - param$0 = /*<>*/ runtime.caml_ml_out_channels_list(0); - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], a = param$0[1]; - /*<>*/ try{ - /*<>*/ /*<>*/ caml_ml_flush(a); - } - catch(_w_){ - var _v_ = caml_wrap_exception(_w_); - if(_v_[1] !== Sys_error) throw caml_maybe_attach_backtrace(_v_, 0); - } - var param$0 = l; - } - /*<>*/ } - function output_bytes(oc, s){ - /*<>*/ return /*<>*/ caml_ml_output_bytes - (oc, s, 0, caml_ml_bytes_length(s)); - /*<>*/ } - function output_string(oc, s){ - /*<>*/ return /*<>*/ caml_ml_output - (oc, s, 0, caml_ml_string_length(s)); - /*<>*/ } - function output(oc, s, ofs, len){ - /*<>*/ if - (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) - /*<>*/ return /*<>*/ caml_ml_output_bytes - (oc, s, ofs, len); - /*<>*/ return invalid_arg(cst_output); - /*<>*/ } - function output_substring(oc, s, ofs, len){ - /*<>*/ if - (0 <= ofs && 0 <= len && (caml_ml_string_length(s) - len | 0) >= ofs) - /*<>*/ return /*<>*/ caml_ml_output - (oc, s, ofs, len); - /*<>*/ return invalid_arg(cst_output_substring); - /*<>*/ } - function output_value(chan, v){ - /*<>*/ return /*<>*/ runtime.caml_output_value - (chan, v, 0); - /*<>*/ } - function close_out(oc){ - /*<>*/ /*<>*/ caml_ml_flush(oc); - /*<>*/ return /*<>*/ caml_ml_close_channel - (oc); - /*<>*/ } - function close_out_noerr(oc){ - /*<>*/ try{ - /*<>*/ /*<>*/ caml_ml_flush(oc); - } - catch(_u_){} - /*<>*/ try{ - /*<>*/ /*<>*/ var - _s_ = /*<>*/ caml_ml_close_channel(oc); - /*<>*/ return _s_; - } - catch(_t_){ /*<>*/ return 0;} - /*<>*/ } - function open_in_gen(mode, perm, name){ - /*<>*/ /*<>*/ var - c = - /*<>*/ caml_ml_open_descriptor_in - ( /*<>*/ caml_sys_open(name, mode, perm)); - /*<>*/ /*<>*/ caml_ml_set_channel_name - (c, name); - /*<>*/ return c; - /*<>*/ } - function open_in(name){ - /*<>*/ return open_in_gen(_k_, 0, name); - /*<>*/ } - function open_in_bin(name){ - /*<>*/ return open_in_gen(_l_, 0, name); - /*<>*/ } - function input(ic, s, ofs, len){ - /*<>*/ if - (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) - /*<>*/ return /*<>*/ caml_ml_input - (ic, s, ofs, len); - /*<>*/ return invalid_arg(cst_input); - /*<>*/ } - function unsafe_really_input(ic, s, ofs, len){ - /*<>*/ var ofs$0 = ofs, len$0 = len; - /*<>*/ for(;;){ - if(0 >= len$0) /*<>*/ return 0; - /*<>*/ /*<>*/ var - r = /*<>*/ caml_ml_input(ic, s, ofs$0, len$0); - /*<>*/ if(0 === r) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (End_of_file, 1); - var - len$1 = len$0 - r | 0, - ofs$1 = ofs$0 + r | 0, - ofs$0 = ofs$1, - len$0 = len$1; - } - /*<>*/ } - function really_input(ic, s, ofs, len){ - /*<>*/ if - (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) - /*<>*/ return unsafe_really_input(ic, s, ofs, len); - /*<>*/ return invalid_arg(cst_really_input); - /*<>*/ } - function really_input_string(ic, len){ - /*<>*/ /*<>*/ var - s = /*<>*/ caml_create_bytes(len); - /*<>*/ really_input(ic, s, 0, len); - return caml_string_of_bytes(s); - /*<>*/ } - function input_line(chan){ - /*<>*/ function build_result(buf, pos, param){ - var pos$0 = pos, param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return buf; - /*<>*/ var - tl = param$0[2], - hd = param$0[1], - /*<>*/ len = - /*<>*/ caml_ml_bytes_length(hd); - /*<>*/ /*<>*/ runtime.caml_blit_bytes - (hd, 0, buf, pos$0 - len | 0, len); - var pos$1 = pos$0 - len | 0, pos$0 = pos$1, param$0 = tl; - } - } - var accu = 0, len = 0; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - n = /*<>*/ runtime.caml_ml_input_scan_line(chan); - /*<>*/ if(0 === n){ - if(! accu) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (End_of_file, 1); - var - _r_ = - build_result - ( /*<>*/ caml_create_bytes(len), len, accu); - } - else{ - if(0 >= n){ - /*<>*/ /*<>*/ var - beg = /*<>*/ caml_create_bytes(- n | 0); - /*<>*/ /*<>*/ caml_ml_input - (chan, beg, 0, - n | 0); - /*<>*/ var - len$1 = len - n | 0, - /*<>*/ accu$0 = [0, beg, accu], - accu = accu$0, - len = len$1; - continue; - } - /*<>*/ /*<>*/ var - res = /*<>*/ caml_create_bytes(n - 1 | 0); - /*<>*/ /*<>*/ caml_ml_input - (chan, res, 0, n - 1 | 0); - /*<>*/ /*<>*/ caml_ml_input_char - (chan); - if(accu) - var - len$0 = (len + n | 0) - 1 | 0, - _r_ = - build_result - ( /*<>*/ caml_create_bytes(len$0), - len$0, - [0, res, accu]); - else - var _r_ = res; - } - /*<>*/ return /*<>*/ caml_string_of_bytes - (_r_); - } - /*<>*/ } - function close_in_noerr(ic){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _p_ = /*<>*/ caml_ml_close_channel(ic); - /*<>*/ return _p_; - } - catch(_q_){ /*<>*/ return 0;} - /*<>*/ } - function print_char(c){ - /*<>*/ return /*<>*/ caml_ml_output_char - (stdout, c); - /*<>*/ } - function print_string(s){ - /*<>*/ return output_string(stdout, s); - /*<>*/ } - function print_bytes(s){ - /*<>*/ return output_bytes(stdout, s); - /*<>*/ } - function print_int(i){ - /*<>*/ return output_string(stdout, "" + i); - /*<>*/ } - function print_float(f){ - /*<>*/ return output_string(stdout, string_of_float(f)); - /*<>*/ } - function print_endline(s){ - /*<>*/ output_string(stdout, s); - /*<>*/ /*<>*/ caml_ml_output_char - (stdout, 10); - /*<>*/ return /*<>*/ caml_ml_flush - (stdout); - /*<>*/ } - function print_newline(param){ - /*<>*/ /*<>*/ caml_ml_output_char - (stdout, 10); - /*<>*/ return /*<>*/ caml_ml_flush - (stdout); - /*<>*/ } - function prerr_char(c){ - /*<>*/ return /*<>*/ caml_ml_output_char - (stderr, c); - /*<>*/ } - function prerr_string(s){ - /*<>*/ return output_string(stderr, s); - /*<>*/ } - function prerr_bytes(s){ - /*<>*/ return output_bytes(stderr, s); - /*<>*/ } - function prerr_int(i){ - /*<>*/ return output_string(stderr, "" + i); - /*<>*/ } - function prerr_float(f){ - /*<>*/ return output_string(stderr, string_of_float(f)); - /*<>*/ } - function prerr_endline(s){ - /*<>*/ output_string(stderr, s); - /*<>*/ /*<>*/ caml_ml_output_char - (stderr, 10); - /*<>*/ return /*<>*/ caml_ml_flush - (stderr); - /*<>*/ } - function prerr_newline(param){ - /*<>*/ /*<>*/ caml_ml_output_char - (stderr, 10); - /*<>*/ return /*<>*/ caml_ml_flush - (stderr); - /*<>*/ } - function read_line(param){ - /*<>*/ /*<>*/ caml_ml_flush(stdout); - /*<>*/ return input_line(stdin); - /*<>*/ } - function read_int(param){ - /*<>*/ return /*<>*/ caml_int_of_string - (read_line(0)); - /*<>*/ } - function read_int_opt(param){ - /*<>*/ return int_of_string_opt(read_line(0)); - /*<>*/ } - function read_float(param){ - /*<>*/ return /*<>*/ caml_float_of_string - (read_line(0)); - /*<>*/ } - function read_float_opt(param){ - /*<>*/ return float_of_string_opt(read_line(0)); - /*<>*/ } - function string_of_format(param){ - var str = param[2]; - /*<>*/ return str; - } - function symbol$1(param, _n_){ - /*<>*/ var - str2 = _n_[2], - fmt2 = _n_[1], - str1 = param[2], - fmt1 = param[1], - /*<>*/ _o_ = symbol(str1, symbol(cst$0, str2)); - /*<>*/ return [0, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt1, fmt2), - _o_]; - } - /*<>*/ /*<>*/ var - exit_function = [0, flush_all]; - function at_exit(f){ - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ f_yet_to_run = [0, 1], - /*<>*/ old_exit = - /*<>*/ caml_atomic_load(exit_function), - new_exit$0 = - function(f_yet_to_run, old_exit){ - function new_exit(param){ - /*<>*/ if(caml_atomic_cas(f_yet_to_run, 1, 0)) - /*<>*/ /*<>*/ caml_call1 - (f, 0); - /*<>*/ return /*<>*/ caml_call1 - (old_exit, 0); - /*<>*/ } - return new_exit; - }, - new_exit = new_exit$0(f_yet_to_run, old_exit), - success = caml_atomic_cas(exit_function, old_exit, new_exit), - /*<>*/ _m_ = 1 - success; - if(! _m_) /*<>*/ return _m_; - } - /*<>*/ } - /*<>*/ /*<>*/ var - do_domain_local_at_exit = - [0, - function(param){ - /*<>*/ return 0; - /*<>*/ }]; - function do_at_exit(param){ - /*<>*/ /*<>*/ caml_call1 - (do_domain_local_at_exit[1], 0); - /*<>*/ return /*<>*/ caml_call1 - (caml_atomic_load(exit_function), 0); - /*<>*/ } - function exit(retcode){ - /*<>*/ do_at_exit(0); - /*<>*/ return /*<>*/ runtime.caml_sys_exit - (retcode); - /*<>*/ } - /*<>*/ /*<>*/ runtime.caml_register_named_value - ("Pervasives.do_at_exit", do_at_exit); - var - Stdlib = - [0, - invalid_arg, - failwith, - Exit, - Match_failure, - Assert_failure, - Invalid_argument, - Failure, - Not_found, - Out_of_memory, - Stack_overflow, - Sys_error, - End_of_file, - Division_by_zero, - Sys_blocked_io, - Undefined_recursive_module, - min, - max, - abs, - max_int, - min_int, - lnot, - infinity, - neg_infinity, - nan, - max_float, - min_float, - epsilon_float, - symbol, - char_of_int, - string_of_bool, - bool_of_string_opt, - bool_of_string, - string_of_int, - int_of_string_opt, - string_of_float, - float_of_string_opt, - symbol$0, - stdin, - stdout, - stderr, - print_char, - print_string, - print_bytes, - print_int, - print_float, - print_endline, - print_newline, - prerr_char, - prerr_string, - prerr_bytes, - prerr_int, - prerr_float, - prerr_endline, - prerr_newline, - read_line, - read_int_opt, - read_int, - read_float_opt, - read_float, - open_out, - open_out_bin, - open_out_gen, - caml_ml_flush, - flush_all, - caml_ml_output_char, - output_string, - output_bytes, - output, - output_substring, - caml_ml_output_char, - runtime.caml_ml_output_int, - output_value, - runtime.caml_ml_seek_out, - runtime.caml_ml_pos_out, - caml_ml_channel_size, - close_out, - close_out_noerr, - caml_ml_set_binary_mode, - open_in, - open_in_bin, - open_in_gen, - caml_ml_input_char, - input_line, - input, - really_input, - really_input_string, - caml_ml_input_char, - runtime.caml_ml_input_int, - runtime.caml_input_value, - runtime.caml_ml_seek_in, - runtime.caml_ml_pos_in, - caml_ml_channel_size, - caml_ml_close_channel, - close_in_noerr, - caml_ml_set_binary_mode, - [0, - runtime.caml_ml_seek_out_64, - runtime.caml_ml_pos_out_64, - caml_ml_channel_size_64, - runtime.caml_ml_seek_in_64, - runtime.caml_ml_pos_in_64, - caml_ml_channel_size_64], - string_of_format, - symbol$1, - exit, - at_exit, - valid_float_lexem, - unsafe_really_input, - do_at_exit, - do_domain_local_at_exit]; - runtime.caml_register_global(45, Stdlib, "Stdlib"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Either -(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]); - } - /*<>*/ 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 left(v){ - /*<>*/ return [0, v]; - /*<>*/ } - function right(v){ - /*<>*/ return [1, v]; - /*<>*/ } - function is_left(param){ - /*<>*/ return 0 === param[0] ? 1 : 0; - /*<>*/ } - function is_right(param){ - /*<>*/ return 0 === param[0] ? 0 : 1; - /*<>*/ } - function find_left(param){ - /*<>*/ if(0 !== param[0]) - /*<>*/ return 0; - var v = param[1]; - /*<>*/ return [0, v]; - /*<>*/ } - function find_right(param){ - /*<>*/ if(0 === param[0]) - /*<>*/ return 0; - var v = param[1]; - /*<>*/ return [0, v]; - /*<>*/ } - function map_left(f, e){ - /*<>*/ if(0 !== e[0]) /*<>*/ return e; - var v = e[1]; - /*<>*/ return [0, - /*<>*/ caml_call1(f, v)]; - } - function map_right(f, e){ - /*<>*/ if(0 === e[0]) /*<>*/ return e; - var v = e[1]; - /*<>*/ return [1, - /*<>*/ caml_call1(f, v)]; - } - function map(left, right, param){ - /*<>*/ if(0 === param[0]){ - var v = param[1]; - /*<>*/ return [0, - /*<>*/ caml_call1(left, v)]; - } - var v$0 = param[1]; - /*<>*/ return [1, - /*<>*/ caml_call1(right, v$0)]; - } - function fold(left, right, param){ - /*<>*/ if(0 === param[0]){ - var v = param[1]; - /*<>*/ return /*<>*/ caml_call1 - (left, v); - } - var v$0 = param[1]; - /*<>*/ return /*<>*/ caml_call1 - (right, v$0); - } - function equal(left, right, e1, e2){ - /*<>*/ if(0 === e1[0]){ - var v1 = e1[1]; - if(0 === e2[0]){ - var v2 = e2[1]; - /*<>*/ return /*<>*/ caml_call2 - (left, v1, v2); - } - } - else{ - var v1$0 = e1[1]; - if(0 !== e2[0]){ - var v2$0 = e2[1]; - /*<>*/ return /*<>*/ caml_call2 - (right, v1$0, v2$0); - } - } - /*<>*/ return 0; - /*<>*/ } - function compare(left, right, e1, e2){ - /*<>*/ if(0 === e1[0]){ - var v1 = e1[1]; - if(0 !== e2[0]) /*<>*/ return -1; - var v2 = e2[1]; - /*<>*/ return /*<>*/ caml_call2 - (left, v1, v2); - } - var v1$0 = e1[1]; - if(0 === e2[0]) /*<>*/ return 1; - var v2$0 = e2[1]; - /*<>*/ return /*<>*/ caml_call2 - (right, v1$0, v2$0); - /*<>*/ } - var - Stdlib_Either = - [0, - left, - right, - is_left, - is_right, - find_left, - find_right, - map_left, - map_right, - map, - fold, - fold, - fold, - equal, - compare]; - runtime.caml_register_global(0, Stdlib_Either, "Stdlib__Either"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Sys -//# unitInfo: Requires: Stdlib -(function - (globalThis){ - "use strict"; - /*<>*/ var - runtime = globalThis.jsoo_runtime, - 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.0.0", - ocaml_release = [0, 5, 0, 0, 0], - Stdlib = global_data.Stdlib, - /*<>*/ executable_name = - /*<>*/ runtime.caml_sys_executable_name(0), - os_type = /*<>*/ runtime.caml_sys_get_config(0)[1], - backend_type = [0, "js_of_ocaml"], - unix = runtime.caml_sys_const_ostype_unix(0), - win32 = runtime.caml_sys_const_ostype_win32(0), - cygwin = runtime.caml_sys_const_ostype_cygwin(0), - max_array_length = runtime.caml_sys_const_max_wosize(0), - max_floatarray_length = max_array_length / 2 | 0, - max_string_length = (4 * max_array_length | 0) - 1 | 0, - cst_Stdlib_Sys_Break = "Stdlib.Sys.Break", - big_endian = 0, - word_size = 32, - int_size = 32; - function getenv_opt(s){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _d_ = [0, /*<>*/ runtime.caml_sys_getenv(s)]; - /*<>*/ return _d_; - } - catch(_e_){ - var _c_ = caml_wrap_exception(_e_); - if(_c_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_c_, 0); - } - /*<>*/ } - /*<>*/ /*<>*/ var interactive = [0, 0]; - function set_signal(sig_num, sig_beh){ /*<>*/ return 0; - /*<>*/ } - /*<>*/ var - /*<>*/ Break = - [248, cst_Stdlib_Sys_Break, runtime.caml_fresh_oo_id(0)], - sigabrt = -1, - sigalrm = -2, - sigfpe = -3, - sighup = -4, - sigill = -5, - sigint = -6, - sigkill = -7, - sigpipe = -8, - sigquit = -9, - sigsegv = -10, - sigterm = -11, - sigusr1 = -12, - sigusr2 = -13, - sigchld = -14, - sigcont = -15, - sigstop = -16, - sigtstp = -17, - sigttin = -18, - sigttou = -19, - sigvtalrm = -20, - sigprof = -21, - sigbus = -22, - sigpoll = -23, - sigsys = -24, - sigtrap = -25, - sigurg = -26, - sigxcpu = -27, - sigxfsz = -28; - function catch_break(on){ - /*<>*/ return on ? 0 : 0; - /*<>*/ } - var development_version = 0; - function Make(_b_, _a_){ /*<>*/ return [0, 1];} - /*<>*/ var - /*<>*/ Immediate64 = [0, Make], - Stdlib_Sys = - [0, - executable_name, - getenv_opt, - interactive, - os_type, - backend_type, - unix, - win32, - cygwin, - word_size, - int_size, - big_endian, - max_string_length, - max_array_length, - max_floatarray_length, - set_signal, - sigabrt, - sigalrm, - sigfpe, - sighup, - sigill, - sigint, - sigkill, - sigpipe, - sigquit, - sigsegv, - sigterm, - sigusr1, - sigusr2, - sigchld, - sigcont, - sigstop, - sigtstp, - sigttin, - sigttou, - sigvtalrm, - sigprof, - sigbus, - sigpoll, - sigsys, - sigtrap, - sigurg, - sigxcpu, - sigxfsz, - Break, - catch_break, - ocaml_version, - development_version, - ocaml_release, - runtime.caml_ml_enable_runtime_warnings, - runtime.caml_ml_runtime_warnings_enabled, - Immediate64]; - runtime.caml_register_global(4, Stdlib_Sys, "Stdlib__Sys"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Obj -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_Obj_extension_constructor$1 = "Obj.extension_constructor", - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - 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 - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Assert_failure = global_data.Assert_failure, - Stdlib_Sys = global_data.Stdlib__Sys, - cst_Obj_Ephemeron_blit_key = "Obj.Ephemeron.blit_key", - cst_Obj_Ephemeron_check_key = "Obj.Ephemeron.check_key", - cst_Obj_Ephemeron_unset_key = "Obj.Ephemeron.unset_key", - cst_Obj_Ephemeron_set_key = "Obj.Ephemeron.set_key", - cst_Obj_Ephemeron_get_key_copy = "Obj.Ephemeron.get_key_copy", - cst_Obj_Ephemeron_get_key = "Obj.Ephemeron.get_key", - cst_Obj_Ephemeron_create = "Obj.Ephemeron.create", - cst_Obj_extension_constructor$0 = cst_Obj_extension_constructor$1, - cst_Obj_extension_constructor = cst_Obj_extension_constructor$1, - _a_ = [0, "obj.ml", 97, 4]; - function is_block(a){ - /*<>*/ return 1 - (typeof a === "number" ? 1 : 0); - /*<>*/ } - var - double_field = runtime.caml_array_get, - set_double_field = runtime.caml_array_set, - first_non_constant_constructor = 0, - last_non_constant_constructor_ = 243, - forcing_tag = 244, - cont_tag = 245, - lazy_tag = 246, - closure_tag = 247, - object_tag = 248, - infix_tag = 249, - forward_tag = 250, - no_scan_tag = 251, - abstract_tag = 251, - string_tag = 252, - double_tag = 253, - double_array_tag = 254, - custom_tag = 255, - int_tag = 1000, - out_of_heap_tag = 1001, - unaligned_tag = 1002; - function info(obj){ - /*<>*/ if( /*<>*/ caml_obj_tag(obj) !== 247) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - /*<>*/ var - /*<>*/ info = - /*<>*/ runtime.caml_obj_raw_field(obj, 1), - arity = 64 === Stdlib_Sys[9] ? info >> 56 : info >> 24, - /*<>*/ start_env = info << 8 >>> 9 | 0; - /*<>*/ return [0, arity, start_env]; - /*<>*/ } - function of_val(x){ - /*<>*/ a: - { - if - (is_block(x) - && /*<>*/ caml_obj_tag(x) !== 248 && 1 <= x.length - 1){var slot = x[1]; break a;} - var slot = x; - } - a: - { - if(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); - } - return /*<>*/ caml_obj_tag(name) === 252 - ? slot - : /*<>*/ caml_call1 - (Stdlib[1], cst_Obj_extension_constructor); - /*<>*/ } - function name(slot){ - /*<>*/ return slot[1]; - /*<>*/ } - function id(slot){ - /*<>*/ return slot[2]; - /*<>*/ } - /*<>*/ var - /*<>*/ Extension_constructor = [0, of_val, name, id], - max_ephe_length = Stdlib_Sys[13] - 2 | 0; - function create(l){ - /*<>*/ var - _g_ = 0 <= l ? 1 : 0, - _h_ = _g_ ? l <= max_ephe_length ? 1 : 0 : _g_; - if(1 - _h_) - /*<>*/ /*<>*/ caml_call1 - (Stdlib[1], cst_Obj_Ephemeron_create); - /*<>*/ return /*<>*/ runtime.caml_ephe_create - (l); - /*<>*/ } - function length(x){ - /*<>*/ return x.length - 1 - 2 | 0; - /*<>*/ } - function raise_if_invalid_offset(e, o, msg){ - /*<>*/ var - _d_ = 0 <= o ? 1 : 0, - _e_ = _d_ ? o < length(e) ? 1 : 0 : _d_, - _f_ = 1 - _e_; - return _f_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _f_; - /*<>*/ } - function get_key(e, o){ - /*<>*/ raise_if_invalid_offset - (e, o, cst_Obj_Ephemeron_get_key); - /*<>*/ return /*<>*/ runtime.caml_ephe_get_key - (e, o); - /*<>*/ } - function get_key_copy(e, o){ - /*<>*/ raise_if_invalid_offset - (e, o, cst_Obj_Ephemeron_get_key_copy); - /*<>*/ return /*<>*/ runtime.caml_ephe_get_key_copy - (e, o); - /*<>*/ } - function set_key(e, o, x){ - /*<>*/ raise_if_invalid_offset - (e, o, cst_Obj_Ephemeron_set_key); - /*<>*/ return /*<>*/ runtime.caml_ephe_set_key - (e, o, x); - /*<>*/ } - function unset_key(e, o){ - /*<>*/ raise_if_invalid_offset - (e, o, cst_Obj_Ephemeron_unset_key); - /*<>*/ return /*<>*/ runtime.caml_ephe_unset_key - (e, o); - /*<>*/ } - function check_key(e, o){ - /*<>*/ raise_if_invalid_offset - (e, o, cst_Obj_Ephemeron_check_key); - /*<>*/ return /*<>*/ runtime.caml_ephe_check_key - (e, o); - /*<>*/ } - function blit_key(e1, o1, e2, o2, l){ - /*<>*/ if - (0 <= l - && - 0 <= o1 - && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ - var - _b_ = 0 !== l ? 1 : 0, - _c_ = - _b_ - ? /*<>*/ runtime.caml_ephe_blit_key - (e1, o1, e2, o2, l) - : _b_; - /*<>*/ return _c_; - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Obj_Ephemeron_blit_key); - /*<>*/ } - var - Stdlib_Obj = - [0, - is_block, - double_field, - set_double_field, - first_non_constant_constructor, - last_non_constant_constructor_, - forcing_tag, - cont_tag, - lazy_tag, - closure_tag, - object_tag, - infix_tag, - forward_tag, - no_scan_tag, - abstract_tag, - string_tag, - double_tag, - double_array_tag, - custom_tag, - int_tag, - out_of_heap_tag, - unaligned_tag, - [0, info], - Extension_constructor, - [0, - create, - length, - get_key, - get_key_copy, - set_key, - unset_key, - check_key, - blit_key, - runtime.caml_ephe_get_data, - runtime.caml_ephe_get_data_copy, - runtime.caml_ephe_set_data, - runtime.caml_ephe_unset_data, - runtime.caml_ephe_check_data, - runtime.caml_ephe_blit_data, - max_ephe_length]]; - runtime.caml_register_global(13, Stdlib_Obj, "Stdlib__Obj"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Atomic -(function(globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_atomic_exchange = runtime.caml_atomic_exchange, - caml_atomic_fetch_add = runtime.caml_atomic_fetch_add; - function set(r, x){ - /*<>*/ caml_atomic_exchange(r, x); - return 0; - /*<>*/ } - function incr(r){ - /*<>*/ caml_atomic_fetch_add(r, 1); - return 0; - /*<>*/ } - function decr(r){ - /*<>*/ caml_atomic_fetch_add(r, -1); - return 0; - /*<>*/ } - var - _a_ = caml_atomic_fetch_add, - _b_ = runtime.caml_atomic_cas, - _c_ = caml_atomic_exchange, - _d_ = runtime.caml_atomic_load, - Stdlib_Atomic = - [0, - function(_e_){ /*<>*/ return [0, _e_];}, - _d_, - set, - _c_, - _b_, - _a_, - incr, - decr]; - runtime.caml_register_global(0, Stdlib_Atomic, "Stdlib__Atomic"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: CamlinternalLazy -//# unitInfo: Requires: Stdlib, Stdlib__Obj -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_lazy_update_to_forward = runtime.caml_lazy_update_to_forward, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - 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]); - } - /*<>*/ var - global_data = runtime.caml_get_global_data(), - Stdlib_Obj = global_data.Stdlib__Obj, - /*<>*/ Undefined = - [248, "CamlinternalLazy.Undefined", runtime.caml_fresh_oo_id(0)]; - function force_gen_lazy_block(only_val, blk){ - /*<>*/ if - (0 - !== - /*<>*/ runtime.caml_lazy_update_to_forcing - (blk)) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Undefined, 1); - if(only_val){ - /*<>*/ /*<>*/ var - closure$0 = blk[1]; - /*<>*/ blk[1] = 0; - /*<>*/ /*<>*/ var - result$0 = /*<>*/ caml_call1(closure$0, 0); - /*<>*/ blk[1] = result$0; - /*<>*/ /*<>*/ caml_lazy_update_to_forward - (blk); - /*<>*/ return result$0; - } - /*<>*/ /*<>*/ var - closure = blk[1]; - /*<>*/ blk[1] = 0; - /*<>*/ try{ - /*<>*/ /*<>*/ var - result = /*<>*/ caml_call1(closure, 0); - /*<>*/ blk[1] = result; - /*<>*/ /*<>*/ caml_lazy_update_to_forward - (blk); - /*<>*/ return result; - } - catch(e$0){ - var e = caml_wrap_exception(e$0); - /*<>*/ blk[1] = - function(param){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 0); - /*<>*/ }; - /*<>*/ /*<>*/ runtime.caml_lazy_reset_to_lazy - (blk); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 0); - } - /*<>*/ } - function force_lazy_block(blk){ - /*<>*/ return force_gen_lazy_block(0, blk); - /*<>*/ } - function force_gen(only_val, lzv){ - /*<>*/ /*<>*/ var - t = /*<>*/ runtime.caml_obj_tag(lzv); - if(t === Stdlib_Obj[12]) - /*<>*/ return lzv[1]; - if(t === Stdlib_Obj[6]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Undefined, 1); - return t !== Stdlib_Obj[8] ? lzv : force_gen_lazy_block(only_val, lzv); - /*<>*/ } - var CamlinternalLazy = [0, Undefined, force_lazy_block, force_gen]; - runtime.caml_register_global(2, CamlinternalLazy, "CamlinternalLazy"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Lazy -//# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Obj -(function - (globalThis){ - "use strict"; - var runtime = globalThis.jsoo_runtime, 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]); - } - /*<>*/ 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); - /*<>*/ } - function from_fun(f){ - /*<>*/ /*<>*/ var - x = /*<>*/ runtime.caml_obj_block(Stdlib_Obj[8], 1); - /*<>*/ x[1] = f; - /*<>*/ return x; - /*<>*/ } - function from_val(v){ - /*<>*/ /*<>*/ var - t = /*<>*/ caml_obj_tag(v); - if - (t !== Stdlib_Obj[12] - && t !== Stdlib_Obj[8] && t !== Stdlib_Obj[6] && t !== Stdlib_Obj[16]) - /*<>*/ return v; - /*<>*/ return /*<>*/ runtime.caml_lazy_make_forward - (v); - /*<>*/ } - function is_val(l){ - /*<>*/ /*<>*/ var _i_ = Stdlib_Obj[8]; - /*<>*/ return /*<>*/ caml_obj_tag(l) - !== _i_ - ? 1 - : 0; - /*<>*/ } - function map(f, x){ - /*<>*/ return [246, - function(_f_){ - var _g_ = caml_obj_tag(x); - a: - if(250 === _g_) - var _h_ = x[1]; - else{ - if(246 !== _g_ && 244 !== _g_){var _h_ = x; break a;} - var _h_ = caml_call1(CamlinternalLazy[2], x); - } - /*<>*/ return /*<>*/ caml_call1 - (f, _h_); - }]; - /*<>*/ } - function map_val(f, x){ - /*<>*/ if(! is_val(x)) - /*<>*/ return [246, - function(_c_){ - var _d_ = caml_obj_tag(x); - a: - if(250 === _d_) - var _e_ = x[1]; - else{ - if(246 !== _d_ && 244 !== _d_){var _e_ = x; break a;} - var _e_ = caml_call1(CamlinternalLazy[2], x); - } - /*<>*/ return /*<>*/ caml_call1 - (f, _e_); - }]; - var _a_ = caml_obj_tag(x); - a: - if(250 === _a_) - var _b_ = x[1]; - else{ - if(246 !== _a_ && 244 !== _a_){var _b_ = x; break a;} - var _b_ = caml_call1(CamlinternalLazy[2], x); - } - /*<>*/ return from_val - ( /*<>*/ caml_call1(f, _b_)); - /*<>*/ } - var - Stdlib_Lazy = - [0, Undefined, map, is_val, from_val, map_val, from_fun, force_val]; - runtime.caml_register_global(2, Stdlib_Lazy, "Stdlib__Lazy"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Seq -//# unitInfo: Requires: Assert_failure, CamlinternalLazy, Stdlib, Stdlib__Atomic, Stdlib__Lazy -(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 - global_data = runtime.caml_get_global_data(), - Assert_failure = global_data.Assert_failure, - Stdlib_Atomic = global_data.Stdlib__Atomic, - CamlinternalLazy = global_data.CamlinternalLazy, - Stdlib = global_data.Stdlib, - Stdlib_Lazy = global_data.Stdlib__Lazy, - _a_ = [0, "seq.ml", 596, 4], - cst_Seq_drop = "Seq.drop", - cst_Seq_take = "Seq.take", - cst_Seq_init = "Seq.init", - cst_Stdlib_Seq_Forced_twice = "Stdlib.Seq.Forced_twice"; - function empty(param){ - /*<>*/ return 0; - /*<>*/ } - function return$0(x, param){ - /*<>*/ return [0, x, empty]; - /*<>*/ } - function cons(x, next, param){ - /*<>*/ return [0, x, next]; - /*<>*/ } - function append(seq1, seq2, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq1, 0); - if(! match) - /*<>*/ return /*<>*/ caml_call1(seq2, 0); - var next = match[2], x = match[1]; - /*<>*/ return [0, - x, - function(_aM_){ /*<>*/ return append(next, seq2, _aM_);}]; - /*<>*/ } - function map(f, seq, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq, 0); - if(! match) /*<>*/ return 0; - var next = match[2], x = match[1]; - /*<>*/ function _aK_(_aL_){ - /*<>*/ return map(f, next, _aL_); - } - /*<>*/ return [0, - /*<>*/ caml_call1(f, x), - _aK_]; - /*<>*/ } - function filter_map(f, seq, param){ - /*<>*/ var seq$0 = seq; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - next = match[2], - x = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(f, x); - if(match$0){ - var y = match$0[1]; - /*<>*/ return [0, - y, - function(_aJ_){ /*<>*/ return filter_map(f, next, _aJ_);}]; - } - var seq$0 = next; - } - /*<>*/ } - function filter(f, seq, param){ - /*<>*/ var seq$0 = seq; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq$0, 0); - if(! match) /*<>*/ return 0; - var next = match[2], x = match[1]; - /*<>*/ if( /*<>*/ caml_call1(f, x)) - /*<>*/ return [0, - x, - function(_aI_){ /*<>*/ return filter(f, next, _aI_);}]; - var seq$0 = next; - } - /*<>*/ } - function concat(seq, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq, 0); - if(! match) /*<>*/ return 0; - var next = match[2], x = match[1], _aG_ = 0; - /*<>*/ return append - (x, function(_aH_){ /*<>*/ return concat(next, _aH_);}, _aG_); - /*<>*/ } - function flat_map(f, seq, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq, 0); - if(! match) /*<>*/ return 0; - var next = match[2], x = match[1], _aD_ = 0; - /*<>*/ function _aE_(_aF_){ - /*<>*/ return flat_map(f, next, _aF_); - } - /*<>*/ return append - ( /*<>*/ caml_call1(f, x), _aE_, _aD_); - /*<>*/ } - function fold_left(f, acc, seq){ - /*<>*/ var acc$0 = acc, seq$0 = seq; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq$0, 0); - if(! match) /*<>*/ return acc$0; - /*<>*/ var - next = match[2], - x = match[1], - /*<>*/ acc$1 = - /*<>*/ caml_call2(f, acc$0, x), - acc$0 = acc$1, - seq$0 = next; - } - /*<>*/ } - function iter(f, seq){ - /*<>*/ var seq$0 = seq; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq$0, 0); - if(! match) /*<>*/ return 0; - var next = match[2], x = match[1]; - /*<>*/ /*<>*/ caml_call1(f, x); - var seq$0 = next; - } - /*<>*/ } - function unfold(f, u, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(f, u); - if(! match) /*<>*/ return 0; - var match$0 = match[1], u$0 = match$0[2], x = match$0[1]; - /*<>*/ return [0, - x, - function(_aC_){ /*<>*/ return unfold(f, u$0, _aC_);}]; - /*<>*/ } - function is_empty(xs){ - /*<>*/ return /*<>*/ caml_call1(xs, 0) ? 0 : 1; - /*<>*/ } - function uncons(xs){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - var xs$0 = match[2], x = match[1]; - /*<>*/ return [0, [0, x, xs$0]]; - /*<>*/ } - function length(xs$1){ - /*<>*/ var accu = 0, xs = xs$1; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return accu; - /*<>*/ var - xs$0 = match[2], - /*<>*/ accu$0 = accu + 1 | 0, - accu = accu$0, - xs = xs$0; - } - /*<>*/ } - function iteri(f, xs$1){ - /*<>*/ var i = 0, xs = xs$1; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - var xs$0 = match[2], x = match[1]; - /*<>*/ /*<>*/ caml_call2(f, i, x); - var i$0 = i + 1 | 0, i = i$0, xs = xs$0; - } - /*<>*/ } - function fold_lefti(f, accu$1, xs$1){ - /*<>*/ var accu = accu$1, i = 0, xs = xs$1; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return accu; - /*<>*/ var - xs$0 = match[2], - x = match[1], - /*<>*/ accu$0 = - /*<>*/ caml_call3(f, accu, i, x), - /*<>*/ i$0 = i + 1 | 0, - accu = accu$0, - i = i$0, - xs = xs$0; - } - /*<>*/ } - function for_all(p, xs){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 1; - /*<>*/ var - xs$1 = match[2], - x = match[1], - /*<>*/ _aB_ = /*<>*/ caml_call1(p, x); - /*<>*/ if(! _aB_) /*<>*/ return _aB_; - var xs$0 = xs$1; - } - /*<>*/ } - function exists(p, xs){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$1 = match[2], - x = match[1], - /*<>*/ _aA_ = /*<>*/ caml_call1(p, x); - /*<>*/ if(_aA_) /*<>*/ return _aA_; - var xs$0 = xs$1; - } - /*<>*/ } - function find(p, xs){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - var xs$1 = match[2], x = match[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ return [0, x]; - var xs$0 = xs$1; - } - /*<>*/ } - function find_map(f, xs){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$1 = match[2], - x = match[1], - /*<>*/ result = /*<>*/ caml_call1(f, x); - if(result) /*<>*/ return result; - var xs$0 = xs$1; - } - /*<>*/ } - function iter2(f, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$1 = match[2], - x = match[1], - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(! match$0) /*<>*/ return 0; - var ys$1 = match$0[2], y = match$0[1]; - /*<>*/ /*<>*/ caml_call2(f, x, y); - var xs$0 = xs$1, ys$0 = ys$1; - } - /*<>*/ } - function fold_left2(f, accu, xs, ys){ - /*<>*/ var accu$0 = accu, xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return accu$0; - /*<>*/ var - xs$1 = match[2], - x = match[1], - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(! match$0) /*<>*/ return accu$0; - /*<>*/ var - ys$1 = match$0[2], - y = match$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call3(f, accu$0, x, y), - accu$0 = accu$1, - xs$0 = xs$1, - ys$0 = ys$1; - } - /*<>*/ } - function for_all2(f, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 1; - /*<>*/ var - xs$1 = match[2], - x = match[1], - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(! match$0) /*<>*/ return 1; - /*<>*/ var - ys$1 = match$0[2], - y = match$0[1], - /*<>*/ _az_ = /*<>*/ caml_call2(f, x, y); - /*<>*/ if(! _az_) /*<>*/ return _az_; - var xs$0 = xs$1, ys$0 = ys$1; - } - /*<>*/ } - function exists2(f, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$1 = match[2], - x = match[1], - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(! match$0) /*<>*/ return 0; - /*<>*/ var - ys$1 = match$0[2], - y = match$0[1], - /*<>*/ _ay_ = /*<>*/ caml_call2(f, x, y); - /*<>*/ if(_ay_) /*<>*/ return _ay_; - var xs$0 = xs$1, ys$0 = ys$1; - } - /*<>*/ } - function equal(eq, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ match = /*<>*/ caml_call1(xs$0, 0), - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(match){ - if(match$0){ - /*<>*/ var - ys$1 = match$0[2], - y = match$0[1], - xs$1 = match[2], - x = match[1], - /*<>*/ _ax_ = - /*<>*/ caml_call2(eq, x, y); - /*<>*/ if(! _ax_) /*<>*/ return _ax_; - var xs$0 = xs$1, ys$0 = ys$1; - continue; - } - } - else if(! match$0) /*<>*/ return 1; - /*<>*/ return 0; - } - /*<>*/ } - function compare(cmp, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ match = /*<>*/ caml_call1(xs$0, 0), - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(! match) return match$0 ? -1 : 0; - var xs$1 = match[2], x = match[1]; - if(! match$0) /*<>*/ return 1; - /*<>*/ var - ys$1 = match$0[2], - y = match$0[1], - /*<>*/ c = /*<>*/ caml_call2(cmp, x, y); - /*<>*/ if(0 !== c) /*<>*/ return c; - var xs$0 = xs$1, ys$0 = ys$1; - } - /*<>*/ } - function init_aux(f, i, j, param){ - /*<>*/ if(i >= j) /*<>*/ return 0; - var _au_ = i + 1 | 0; - /*<>*/ function _av_(_aw_){ - /*<>*/ return init_aux(f, _au_, j, _aw_); - } - /*<>*/ return [0, - /*<>*/ caml_call1(f, i), - _av_]; - /*<>*/ } - function init(n, f){ - /*<>*/ if(0 > n) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Seq_init); - var _as_ = 0; - /*<>*/ return function(_at_){ - /*<>*/ return init_aux(f, _as_, n, _at_);}; - /*<>*/ } - function repeat(x, param){ - /*<>*/ return [0, - x, - function(_ar_){ /*<>*/ return repeat(x, _ar_);}]; - /*<>*/ } - function forever(f, param){ - /*<>*/ function _ap_(_aq_){ - /*<>*/ return forever(f, _aq_); - } - /*<>*/ return [0, - /*<>*/ caml_call1(f, 0), - _ap_]; - /*<>*/ } - function cycle_nonempty(xs, param){ - /*<>*/ /*<>*/ var _an_ = 0; - /*<>*/ return append - (xs, - function(_ao_){ /*<>*/ return cycle_nonempty(xs, _ao_);}, - _an_); - /*<>*/ } - function cycle(xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - var xs$0 = match[2], x = match[1]; - /*<>*/ function _ak_(_am_){ - /*<>*/ return cycle_nonempty(xs, _am_); - } - /*<>*/ return [0, - x, - function(_al_){ /*<>*/ return append(xs$0, _ak_, _al_);}]; - /*<>*/ } - function iterate1(f, x, param){ - /*<>*/ /*<>*/ var - y = /*<>*/ caml_call1(f, x); - /*<>*/ return [0, - y, - function(_aj_){ /*<>*/ return iterate1(f, y, _aj_);}]; - /*<>*/ } - function iterate(f, x){ - /*<>*/ function _ag_(_ai_){ - /*<>*/ return iterate1(f, x, _ai_); - } - /*<>*/ return function(_ah_){ - /*<>*/ return [0, x, _ag_];}; - /*<>*/ } - function mapi_aux(f, i, xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$0 = match[2], - x = match[1], - /*<>*/ _ad_ = i + 1 | 0; - /*<>*/ function _ae_(_af_){ - /*<>*/ return mapi_aux(f, _ad_, xs$0, _af_); - } - /*<>*/ return [0, - /*<>*/ caml_call2(f, i, x), - _ae_]; - /*<>*/ } - function mapi(f, xs){ - /*<>*/ var _ab_ = 0; - /*<>*/ return function(_ac_){ - /*<>*/ return mapi_aux(f, _ab_, xs, _ac_);}; - /*<>*/ } - function tail_scan(f, s, xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$0 = match[2], - x = match[1], - /*<>*/ s$0 = /*<>*/ caml_call2(f, s, x); - /*<>*/ return [0, - s$0, - function(_aa_){ /*<>*/ return tail_scan(f, s$0, xs$0, _aa_);}]; - /*<>*/ } - function scan(f, s, xs){ - /*<>*/ function _Z_(_$_){ - /*<>*/ return tail_scan(f, s, xs, _$_); - } - /*<>*/ return function(___){ - /*<>*/ return [0, s, _Z_];}; - /*<>*/ } - function take_aux(n, xs){ - /*<>*/ return 0 === n - ? empty - : function - (param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - var xs$0 = match[2], x = match[1]; - /*<>*/ return [0, x, take_aux(n - 1 | 0, xs$0)]; - /*<>*/ }; - /*<>*/ } - function take(n, xs){ - /*<>*/ if(n < 0) - /*<>*/ /*<>*/ caml_call1 - (Stdlib[1], cst_Seq_take); - /*<>*/ return take_aux(n, xs); - /*<>*/ } - function drop(n, xs){ - /*<>*/ return 0 <= n - ? 0 - === n - ? xs - : function - (param){ - /*<>*/ var n$0 = n, xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$1 = match[2], - /*<>*/ n$1 = n$0 - 1 | 0; - /*<>*/ if(0 === n$1) - /*<>*/ return /*<>*/ caml_call1 - (xs$1, 0); - var n$0 = n$1, xs$0 = xs$1; - } - /*<>*/ } - : /*<>*/ caml_call1(Stdlib[1], cst_Seq_drop); - /*<>*/ } - function take_while(p, xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - var xs$0 = match[2], x = match[1]; - /*<>*/ return /*<>*/ caml_call1(p, x) - ? [0, - x, - function(_Y_){ /*<>*/ return take_while(p, xs$0, _Y_);}] - : 0; - /*<>*/ } - function drop_while(p, xs, param){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - node = /*<>*/ caml_call1(xs$0, 0); - if(! node) /*<>*/ return 0; - var xs$1 = node[2], x = node[1]; - /*<>*/ if(! /*<>*/ caml_call1(p, x)) - /*<>*/ return node; - var xs$0 = xs$1; - } - /*<>*/ } - function group(eq, xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$0 = match[2], - x = match[1], - /*<>*/ _P_ = /*<>*/ caml_call1(eq, x); - /*<>*/ function _Q_(_X_){ - /*<>*/ return drop_while(_P_, xs$0, _X_); - } - /*<>*/ function _R_(_W_){ - /*<>*/ return group(eq, _Q_, _W_); - } - /*<>*/ /*<>*/ var - _S_ = /*<>*/ caml_call1(eq, x); - /*<>*/ function _T_(_V_){ - /*<>*/ return take_while(_S_, xs$0, _V_); - } - /*<>*/ return [0, - function(_U_){ /*<>*/ return [0, x, _T_];}, - _R_]; - /*<>*/ } - /*<>*/ var - /*<>*/ Forced_twice = - [248, cst_Stdlib_Seq_Forced_twice, runtime.caml_fresh_oo_id(0)], - /*<>*/ to_lazy = Stdlib_Lazy[6]; - function failure(param){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Forced_twice, 1); - /*<>*/ } - function memoize(xs){ - function s$0(param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - var xs$0 = match[2], x = match[1]; - /*<>*/ return [0, x, memoize(xs$0)]; - /*<>*/ } - /*<>*/ /*<>*/ var - s = /*<>*/ caml_call1(to_lazy, s$0); - /*<>*/ return function(_O_){ - var _N_ = runtime.caml_obj_tag(s); - if(250 === _N_) return s[1]; - if(246 !== _N_ && 244 !== _N_) /*<>*/ return s; - /*<>*/ return /*<>*/ caml_call1 - (CamlinternalLazy[2], s);}; - /*<>*/ } - function once(xs){ - function f(param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - var xs$0 = match[2], x = match[1]; - /*<>*/ return [0, x, once(xs$0)]; - /*<>*/ } - /*<>*/ /*<>*/ var - action = /*<>*/ caml_call1(Stdlib_Atomic[1], f); - /*<>*/ return function(param){ - /*<>*/ /*<>*/ var - f = /*<>*/ caml_call2(Stdlib_Atomic[4], action, failure); - /*<>*/ return /*<>*/ caml_call1(f, 0); /*<>*/ }; - /*<>*/ } - function zip(xs, ys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$0 = match[2], - x = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); - if(! match$0) /*<>*/ return 0; - var ys$0 = match$0[2], y = match$0[1]; - /*<>*/ return [0, - [0, x, y], - function(_M_){ /*<>*/ return zip(xs$0, ys$0, _M_);}]; - /*<>*/ } - function map2(f, xs, ys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$0 = match[2], - x = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); - if(! match$0) /*<>*/ return 0; - var ys$0 = match$0[2], y = match$0[1]; - /*<>*/ function _K_(_L_){ - /*<>*/ return map2(f, xs$0, ys$0, _L_); - } - /*<>*/ return [0, - /*<>*/ caml_call2(f, x, y), - _K_]; - /*<>*/ } - function interleave(xs, ys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) - /*<>*/ return /*<>*/ caml_call1(ys, 0); - var xs$0 = match[2], x = match[1]; - /*<>*/ return [0, - x, - function(_J_){ /*<>*/ return interleave(ys, xs$0, _J_);}]; - /*<>*/ } - function sorted_merge1(cmp, x, xs, y, ys){ - /*<>*/ return 0 - < /*<>*/ caml_call2(cmp, x, y) - ? [0, - y, - function(_H_){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(ys, 0); - if(! match) /*<>*/ return [0, x, xs]; - var ys$0 = match[2], y = match[1]; - /*<>*/ return sorted_merge1(cmp, x, xs, y, ys$0); - }] - : [0, - x, - function(_I_){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return [0, y, ys]; - var xs$0 = match[2], x = match[1]; - /*<>*/ return sorted_merge1(cmp, x, xs$0, y, ys); - }]; - /*<>*/ } - function sorted_merge(cmp, xs, ys, param){ - /*<>*/ var - /*<>*/ match = /*<>*/ caml_call1(xs, 0), - /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); - if(match){ - if(match$0){ - var ys$0 = match$0[2], y = match$0[1], xs$0 = match[2], x = match[1]; - /*<>*/ return sorted_merge1(cmp, x, xs$0, y, ys$0); - } - var c = match; - } - else{if(! match$0) /*<>*/ return 0; var c = match$0;} - /*<>*/ return c; - /*<>*/ } - function map_fst(xys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xys, 0); - if(! match) /*<>*/ return 0; - var xys$0 = match[2], x = match[1][1]; - /*<>*/ return [0, - x, - function(_G_){ /*<>*/ return map_fst(xys$0, _G_);}]; - /*<>*/ } - function map_snd(xys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xys, 0); - if(! match) /*<>*/ return 0; - var xys$0 = match[2], y = match[1][2]; - /*<>*/ return [0, - y, - function(_F_){ /*<>*/ return map_snd(xys$0, _F_);}]; - /*<>*/ } - function unzip(xys){ - /*<>*/ function _C_(_E_){ - /*<>*/ return map_snd(xys, _E_); - } - /*<>*/ return [0, - function(_D_){ /*<>*/ return map_fst(xys, _D_);}, - _C_]; - /*<>*/ } - function filter_map_find_left_map(f, xs, param){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$1 = match[2], - x = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(f, x); - if(0 === match$0[0]){ - var y = match$0[1]; - /*<>*/ return [0, - y, - function(_B_){ - /*<>*/ return filter_map_find_left_map(f, xs$1, _B_); - }]; - } - var xs$0 = xs$1; - } - /*<>*/ } - function filter_map_find_right_map(f, xs, param){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var - xs$1 = match[2], - x = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(f, x); - if(0 !== match$0[0]){ - var z = match$0[1]; - /*<>*/ return [0, - z, - function(_A_){ - /*<>*/ return filter_map_find_right_map(f, xs$1, _A_); - }]; - } - var xs$0 = xs$1; - } - /*<>*/ } - function partition_map(f, xs){ - /*<>*/ function _x_(_z_){ - /*<>*/ return filter_map_find_right_map(f, xs, _z_); - } - /*<>*/ return [0, - function(_y_){ - /*<>*/ return filter_map_find_left_map(f, xs, _y_); - }, - _x_]; - /*<>*/ } - function partition(p, xs){ - function _t_(x){ - /*<>*/ return 1 - /*<>*/ caml_call1(p, x); - /*<>*/ } - /*<>*/ function _u_(_w_){ - /*<>*/ return filter(_t_, xs, _w_); - } - /*<>*/ return [0, - function(_v_){ /*<>*/ return filter(p, xs, _v_);}, - _u_]; - /*<>*/ } - function peel(xss){ - /*<>*/ return unzip - (function(_s_){ /*<>*/ return filter_map(uncons, xss, _s_);}); - /*<>*/ } - function transpose(xss, param){ - /*<>*/ var - /*<>*/ match = peel(xss), - tails = match[2], - heads = match[1]; - /*<>*/ if(! is_empty(heads)) - /*<>*/ return [0, - heads, - function(_r_){ /*<>*/ return transpose(tails, _r_);}]; - /*<>*/ if(is_empty(tails)) /*<>*/ return 0; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - /*<>*/ } - function _b_(remainders, xss, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xss, 0); - if(! match) /*<>*/ return transpose(remainders, 0); - /*<>*/ var - xss$0 = match[2], - xs = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(xs, 0); - if(match$0){ - /*<>*/ var - xs$0 = match$0[2], - x = match$0[1], - /*<>*/ match$1 = peel(remainders), - tails = match$1[2], - heads = match$1[1], - /*<>*/ _l_ = - function(_q_){ /*<>*/ return [0, xs$0, tails];}, - /*<>*/ _m_ = - function(_p_){ /*<>*/ return _b_(_l_, xss$0, _p_);}; - /*<>*/ return [0, - function(_o_){ /*<>*/ return [0, x, heads];}, - _m_]; - } - /*<>*/ var - /*<>*/ match$2 = peel(remainders), - tails$0 = match$2[2], - heads$0 = match$2[1]; - /*<>*/ return [0, - heads$0, - function(_n_){ /*<>*/ return _b_(tails$0, xss$0, _n_);}]; - /*<>*/ } - function map_product(f, xs, ys){ - function _f_(x){ - function _j_(y){ - /*<>*/ return /*<>*/ caml_call2(f, x, y); - /*<>*/ } - /*<>*/ return function(_k_){ - /*<>*/ return map(_j_, ys, _k_);}; - /*<>*/ } - /*<>*/ function xss(_i_){ - /*<>*/ return map(_f_, xs, _i_); - } - /*<>*/ function _e_(_h_){ - /*<>*/ return _b_(empty, xss, _h_); - } - /*<>*/ return function(_g_){ - /*<>*/ return concat(_e_, _g_);}; - /*<>*/ } - function product(xs, ys){ - /*<>*/ return map_product - (function(x, y){ - /*<>*/ return [0, x, y]; - /*<>*/ }, - xs, - ys); - /*<>*/ } - function of_dispenser(it){ - function c(param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(it, 0); - if(! match) /*<>*/ return 0; - var x = match[1]; - /*<>*/ return [0, x, c]; - /*<>*/ } - /*<>*/ return c; - /*<>*/ } - function to_dispenser(xs){ - /*<>*/ /*<>*/ var s = [0, xs]; - /*<>*/ return function(param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(s[1], 0); - if(! match) /*<>*/ return 0; - var xs = match[2], x = match[1]; - s[1] = xs; - /*<>*/ return [0, x]; /*<>*/ }; - /*<>*/ } - function ints(i, param){ - /*<>*/ /*<>*/ var _c_ = i + 1 | 0; - /*<>*/ return [0, - i, - function(_d_){ /*<>*/ return ints(_c_, _d_);}]; - /*<>*/ } - var - Stdlib_Seq = - [0, - is_empty, - uncons, - length, - iter, - fold_left, - iteri, - fold_lefti, - for_all, - exists, - find, - find_map, - iter2, - fold_left2, - for_all2, - exists2, - equal, - compare, - empty, - return$0, - cons, - init, - unfold, - repeat, - forever, - cycle, - iterate, - map, - mapi, - filter, - filter_map, - scan, - take, - drop, - take_while, - drop_while, - group, - memoize, - Forced_twice, - once, - transpose, - append, - concat, - flat_map, - flat_map, - zip, - map2, - interleave, - sorted_merge, - product, - map_product, - unzip, - unzip, - partition_map, - partition, - of_dispenser, - to_dispenser, - ints]; - runtime.caml_register_global(10, Stdlib_Seq, "Stdlib__Seq"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Option -//# unitInfo: Requires: Stdlib, Stdlib__Seq -(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]); - } - /*<>*/ 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_Seq = global_data.Stdlib__Seq, - Stdlib = global_data.Stdlib, - cst_option_is_None = "option is None", - none = 0; - function some(v){ - /*<>*/ return [0, v]; - /*<>*/ } - function value(o, default$0){ - /*<>*/ if(! o) - /*<>*/ return default$0; - var v = o[1]; - /*<>*/ return v; - /*<>*/ } - function get(param){ - /*<>*/ if(! param) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_option_is_None); - var v = param[1]; - /*<>*/ return v; - /*<>*/ } - function bind(o, f){ - /*<>*/ if(! o) /*<>*/ return 0; - var v = o[1]; - /*<>*/ return /*<>*/ caml_call1(f, v); - /*<>*/ } - function join(param){ - /*<>*/ if(! param) /*<>*/ return 0; - var o = param[1]; - /*<>*/ return o; - /*<>*/ } - function map(f, o){ - /*<>*/ if(! o) /*<>*/ return 0; - var v = o[1]; - /*<>*/ return [0, - /*<>*/ caml_call1(f, v)]; - /*<>*/ } - function fold(none, some, param){ - /*<>*/ if(! param) /*<>*/ return none; - var v = param[1]; - /*<>*/ return /*<>*/ caml_call1 - (some, v); - } - function iter(f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - var v = param[1]; - /*<>*/ return /*<>*/ caml_call1(f, v); - } - function is_none(param){ - /*<>*/ return param ? 0 : 1; - /*<>*/ } - function is_some(param){ - /*<>*/ return param ? 1 : 0; - /*<>*/ } - function equal(eq, o0, o1){ - /*<>*/ if(o0){ - if(o1){ - var v1 = o1[1], v0 = o0[1]; - /*<>*/ return /*<>*/ caml_call2 - (eq, v0, v1); - } - } - else if(! o1) /*<>*/ return 1; - /*<>*/ return 0; - /*<>*/ } - function compare(cmp, o0, o1){ - /*<>*/ if(! o0) return o1 ? -1 : 0; - var v0 = o0[1]; - if(! o1) /*<>*/ return 1; - var v1 = o1[1]; - /*<>*/ return /*<>*/ caml_call2 - (cmp, v0, v1); - /*<>*/ } - function to_result(none, param){ - /*<>*/ if(! param) /*<>*/ return [1, none]; - var v = param[1]; - /*<>*/ return [0, v]; - } - function to_list(param){ - /*<>*/ if(! param) /*<>*/ return 0; - var v = param[1]; - /*<>*/ return [0, v, 0]; - /*<>*/ } - function to_seq(param){ - /*<>*/ if(! param) - /*<>*/ return Stdlib_Seq[18]; - var v = param[1]; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Seq[19], v); - /*<>*/ } - var - Stdlib_Option = - [0, - none, - some, - value, - get, - bind, - join, - map, - fold, - iter, - is_none, - is_some, - equal, - compare, - to_result, - to_list, - to_seq]; - runtime.caml_register_global(3, Stdlib_Option, "Stdlib__Option"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Result -//# unitInfo: Requires: Stdlib, Stdlib__Seq -(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]); - } - /*<>*/ 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_Seq = global_data.Stdlib__Seq, - Stdlib = global_data.Stdlib, - cst_result_is_Ok = "result is Ok _", - cst_result_is_Error = "result is Error _"; - function ok(v){ - /*<>*/ return [0, v]; - /*<>*/ } - function error(e){ - /*<>*/ return [1, e]; - /*<>*/ } - function value(r, default$0){ - /*<>*/ if(0 !== r[0]) - /*<>*/ return default$0; - var v = r[1]; - /*<>*/ return v; - /*<>*/ } - function get_ok(param){ - /*<>*/ if(0 !== param[0]) - /*<>*/ return /*<>*/ caml_call1 - (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); - var e = param[1]; - /*<>*/ return e; - /*<>*/ } - function bind(r, f){ - /*<>*/ if(0 !== r[0]) /*<>*/ return r; - var v = r[1]; - /*<>*/ return /*<>*/ caml_call1(f, v); - /*<>*/ } - function join(e){ - /*<>*/ if(0 !== e[0]) /*<>*/ return e; - var r = e[1]; - /*<>*/ return r; - /*<>*/ } - function map(f, e){ - /*<>*/ if(0 !== e[0]) /*<>*/ return e; - var v = e[1]; - /*<>*/ return [0, - /*<>*/ caml_call1(f, v)]; - } - function map_error(f, v){ - /*<>*/ if(0 === v[0]) /*<>*/ return v; - var e = v[1]; - /*<>*/ return [1, - /*<>*/ caml_call1(f, e)]; - } - function fold(ok, error, param){ - /*<>*/ if(0 === param[0]){ - var v = param[1]; - /*<>*/ return /*<>*/ caml_call1 - (ok, v); - } - var e = param[1]; - /*<>*/ return /*<>*/ caml_call1 - (error, e); - } - function iter(f, param){ - /*<>*/ if(0 !== param[0]) /*<>*/ return 0; - var v = param[1]; - /*<>*/ return /*<>*/ caml_call1(f, v); - } - function iter_error(f, param){ - /*<>*/ if(0 === param[0]) /*<>*/ return 0; - var e = param[1]; - /*<>*/ return /*<>*/ caml_call1(f, e); - } - function is_ok(param){ - /*<>*/ return 0 === param[0] ? 1 : 0; - /*<>*/ } - function is_error(param){ - /*<>*/ return 0 === param[0] ? 0 : 1; - /*<>*/ } - function equal(ok, error, r0, r1){ - /*<>*/ if(0 === r0[0]){ - var v0 = r0[1]; - if(0 === r1[0]){ - var v1 = r1[1]; - /*<>*/ return /*<>*/ caml_call2 - (ok, v0, v1); - } - } - else{ - var e0 = r0[1]; - if(0 !== r1[0]){ - var e1 = r1[1]; - /*<>*/ return /*<>*/ caml_call2 - (error, e0, e1); - } - } - /*<>*/ return 0; - /*<>*/ } - function compare(ok, error, r0, r1){ - /*<>*/ if(0 === r0[0]){ - var v0 = r0[1]; - if(0 !== r1[0]) /*<>*/ return -1; - var v1 = r1[1]; - /*<>*/ return /*<>*/ caml_call2 - (ok, v0, v1); - } - var e0 = r0[1]; - if(0 === r1[0]) /*<>*/ return 1; - var e1 = r1[1]; - /*<>*/ return /*<>*/ caml_call2 - (error, e0, e1); - /*<>*/ } - function to_option(param){ - /*<>*/ if(0 !== param[0]) - /*<>*/ return 0; - var v = param[1]; - /*<>*/ return [0, v]; - /*<>*/ } - function to_list(param){ - /*<>*/ if(0 !== param[0]) - /*<>*/ return 0; - var v = param[1]; - /*<>*/ return [0, v, 0]; - /*<>*/ } - function to_seq(param){ - /*<>*/ if(0 !== param[0]) - /*<>*/ return Stdlib_Seq[18]; - var v = param[1]; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Seq[19], v); - /*<>*/ } - var - Stdlib_Result = - [0, - ok, - error, - value, - get_ok, - get_error, - bind, - join, - map, - map_error, - fold, - iter, - iter_error, - is_ok, - is_error, - equal, - compare, - to_option, - to_list, - to_seq]; - runtime.caml_register_global(4, Stdlib_Result, "Stdlib__Result"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Bool -(function(globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_true = "true", - cst_false = "false"; - function equal(_e_, _d_){ /*<>*/ return _e_ === _d_ ? 1 : 0;} - var compare = runtime.caml_int_compare; - function to_float(param){ - /*<>*/ return param ? 1. : 0.; - /*<>*/ } - function to_string(param){ - /*<>*/ return param ? cst_true : cst_false; - /*<>*/ } - function _a_(_c_){ /*<>*/ return _c_;} - var - Stdlib_Bool = - [0, - function(_b_){ /*<>*/ return 1 - _b_;}, - equal, - compare, - _a_, - to_float, - to_string]; - runtime.caml_register_global(4, Stdlib_Bool, "Stdlib__Bool"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Char -//# unitInfo: Requires: Stdlib -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, - caml_create_bytes = runtime.caml_create_bytes, - 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 - global_data = runtime.caml_get_global_data(), - cst = "\\\\", - cst$0 = "\\'", - Stdlib = global_data.Stdlib, - cst_b = "\\b", - cst_t = "\\t", - cst_n = "\\n", - cst_r = "\\r", - cst_Char_chr = "Char.chr"; - function chr(n){ - /*<>*/ if(0 <= n && 255 >= n) - /*<>*/ return n; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Char_chr); - /*<>*/ } - function escaped(c){ - /*<>*/ a: - { - if(40 <= c){ - if(92 === c) /*<>*/ return cst; - if(127 > c) break a; - } - else{ - if(32 <= c){if(39 <= c) /*<>*/ return cst$0; break a;} - if(14 > c) - switch(c){ - case 8: - /*<>*/ return cst_b; - case 9: - /*<>*/ return cst_t; - case 10: - /*<>*/ return cst_n; - case 13: - /*<>*/ return cst_r; - } - } - /*<>*/ /*<>*/ var - s = /*<>*/ caml_create_bytes(4); - caml_bytes_unsafe_set(s, 0, 92); - caml_bytes_unsafe_set(s, 1, 48 + (c / 100 | 0) | 0); - caml_bytes_unsafe_set(s, 2, 48 + ((c / 10 | 0) % 10 | 0) | 0); - caml_bytes_unsafe_set(s, 3, 48 + (c % 10 | 0) | 0); - return caml_string_of_bytes(s); - } - /*<>*/ /*<>*/ var - s$0 = /*<>*/ caml_create_bytes(1); - caml_bytes_unsafe_set(s$0, 0, c); - return caml_string_of_bytes(s$0); - /*<>*/ } - function lowercase_ascii(c){ - /*<>*/ return 25 < c - 65 >>> 0 ? c : c + 32 | 0; - /*<>*/ } - function uppercase_ascii(c){ - /*<>*/ return 25 < c - 97 >>> 0 ? c : c - 32 | 0; - /*<>*/ } - function compare(c1, c2){ - /*<>*/ return c1 - c2 | 0; - /*<>*/ } - function equal(c1, c2){ - /*<>*/ return 0 === (c1 - c2 | 0) ? 1 : 0; - /*<>*/ } - var - Stdlib_Char = - [0, chr, escaped, lowercase_ascii, uppercase_ascii, compare, equal]; - runtime.caml_register_global(8, Stdlib_Char, "Stdlib__Char"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Uchar -//# unitInfo: Requires: Assert_failure, Stdlib -(function - (globalThis){ - "use strict"; - var - 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 - global_data = runtime.caml_get_global_data(), - err_no_pred = "U+0000 has no predecessor", - err_no_succ = "U+10FFFF has no successor", - Assert_failure = global_data.Assert_failure, - Stdlib = global_data.Stdlib, - _d_ = [0, cst_uchar_ml, 88, 18], - _c_ = [0, cst_uchar_ml, 91, 7], - _b_ = [0, cst_uchar_ml, 80, 18], - _a_ = [0, cst_uchar_ml, 85, 7], - cst_is_not_a_latin1_character = " is not a latin1 character", - cst_U = "U+", - cst_is_not_an_Unicode_scalar_v = " is not an Unicode scalar value", - min = 0, - max = 1114111, - lo_bound = 55295, - hi_bound = 57344, - bom = 65279, - rep = 65533; - function succ(u){ - /*<>*/ return u === 55295 - ? hi_bound - : u === 1114111 ? caml_call1(Stdlib[1], err_no_succ) : u + 1 | 0; - /*<>*/ } - function pred(u){ - /*<>*/ return u === 57344 - ? lo_bound - : u === 0 ? caml_call1(Stdlib[1], err_no_pred) : u - 1 | 0; - /*<>*/ } - function is_valid(i){ - /*<>*/ var - _o_ = 0 <= i ? 1 : 0, - _p_ = _o_ ? i <= 55295 ? 1 : 0 : _o_; - if(_p_) - var _q_ = _p_; - else - var _r_ = 57344 <= i ? 1 : 0, _q_ = _r_ ? i <= 1114111 ? 1 : 0 : _r_; - return _q_; - /*<>*/ } - function of_int(i){ - /*<>*/ if(is_valid(i)) /*<>*/ return i; - /*<>*/ /*<>*/ var - _n_ = - /*<>*/ caml_call2 - (Stdlib[28], - /*<>*/ caml_format_int("%X", i), - cst_is_not_an_Unicode_scalar_v); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], _n_); - /*<>*/ } - function is_char(u){ - /*<>*/ return u < 256 ? 1 : 0; - /*<>*/ } - function of_char(c){ - /*<>*/ return c; - /*<>*/ } - function to_char(u){ - /*<>*/ if(255 >= u) /*<>*/ return u; - /*<>*/ var - /*<>*/ _l_ = - /*<>*/ caml_call2 - (Stdlib[28], - /*<>*/ caml_format_int("%04X", u), - cst_is_not_a_latin1_character), - /*<>*/ _m_ = - /*<>*/ caml_call2(Stdlib[28], cst_U, _l_); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], _m_); - /*<>*/ } - function unsafe_to_char(_k_){ /*<>*/ return _k_;} - function equal(_j_, _i_){ /*<>*/ return _j_ === _i_ ? 1 : 0;} - var compare = runtime.caml_int_compare; - function hash(_h_){ /*<>*/ return _h_;} - function utf_decode_is_valid(d){ - /*<>*/ return 1 === (d >>> 27 | 0) ? 1 : 0; - /*<>*/ } - function utf_decode_length(d){ - /*<>*/ return (d >>> 24 | 0) & 7; - /*<>*/ } - function utf_decode_uchar(d){ - /*<>*/ return d & 16777215; - /*<>*/ } - function utf_decode(n, u){ - /*<>*/ return (8 | n) << 24 | u; - /*<>*/ } - function utf_decode_invalid(n){ - /*<>*/ return n << 24 | 65533; - /*<>*/ } - function utf_8_byte_length(u){ - /*<>*/ if(0 > u) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); - /*<>*/ if(127 >= u) /*<>*/ return 1; - /*<>*/ if(2047 >= u) /*<>*/ return 2; - /*<>*/ if(65535 >= u) /*<>*/ return 3; - /*<>*/ if(1114111 < u) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - /*<>*/ return 4; - /*<>*/ } - function utf_16_byte_length(u){ - /*<>*/ if(0 > u) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); - /*<>*/ if(65535 >= u) /*<>*/ return 2; - /*<>*/ if(1114111 < u) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); - /*<>*/ return 4; - /*<>*/ } - function _e_(_g_){ /*<>*/ return _g_;} - var - Stdlib_Uchar = - [0, - min, - max, - bom, - rep, - succ, - pred, - is_valid, - of_int, - function(_f_){ /*<>*/ return _f_;}, - _e_, - is_char, - of_char, - to_char, - unsafe_to_char, - equal, - compare, - hash, - utf_decode_is_valid, - utf_decode_uchar, - utf_decode_length, - utf_decode, - utf_decode_invalid, - utf_8_byte_length, - utf_16_byte_length]; - runtime.caml_register_global(13, Stdlib_Uchar, "Stdlib__Uchar"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__List -//# unitInfo: Requires: Stdlib, Stdlib__Seq, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_List_nth$1 = "List.nth", - caml_compare = runtime.caml_compare, - 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 - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Stdlib_Seq = global_data.Stdlib__Seq, - Stdlib_Sys = global_data.Stdlib__Sys, - cst_List_map2 = "List.map2", - cst_List_iter2 = "List.iter2", - cst_List_fold_left2 = "List.fold_left2", - cst_List_fold_right2 = "List.fold_right2", - cst_List_for_all2 = "List.for_all2", - cst_List_exists2 = "List.exists2", - _b_ = [0, 0, 0], - cst_List_combine = "List.combine", - cst_List_rev_map2 = "List.rev_map2", - cst_List_init = "List.init", - cst_List_nth$0 = cst_List_nth$1, - cst_nth = "nth", - cst_List_nth = cst_List_nth$1, - cst_tl = "tl", - cst_hd = "hd"; - function length(l$0){ - /*<>*/ var len = 0, param = l$0; - for(;;){ - if(! param) /*<>*/ return len; - /*<>*/ var - l = param[2], - /*<>*/ len$0 = len + 1 | 0, - len = len$0, - param = l; - } - /*<>*/ } - function cons(a, l){ - /*<>*/ return [0, a, l]; - /*<>*/ } - function hd(param){ - /*<>*/ if(! param) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], cst_hd); - var a = param[1]; - /*<>*/ return a; - /*<>*/ } - function tl(param){ - /*<>*/ if(! param) - /*<>*/ return /*<>*/ caml_call1 - (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); - var l$0 = l, n$0 = n; - /*<>*/ for(;;){ - if(! l$0) - /*<>*/ return /*<>*/ caml_call1 - (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, - l$0 = l$1, - n$0 = n$1; - } - /*<>*/ } - function nth_opt(l, n){ - /*<>*/ if(0 > n) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_nth$0); - var l$0 = l, n$0 = n; - /*<>*/ for(;;){ - if(! l$0) /*<>*/ return 0; - var l$1 = l$0[2], a = l$0[1]; - /*<>*/ if(0 === n$0) - /*<>*/ return [0, a]; - /*<>*/ var - /*<>*/ n$1 = n$0 - 1 | 0, - l$0 = l$1, - n$0 = n$1; - } - /*<>*/ } - var append = Stdlib[37]; - function rev_append(l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ - if(! l1$0) /*<>*/ return l2$0; - /*<>*/ var - l1$1 = l1$0[2], - a = l1$0[1], - /*<>*/ l2$1 = [0, a, l2$0], - l1$0 = l1$1, - l2$0 = l2$1; - } - /*<>*/ } - function rev(l){ - /*<>*/ return rev_append(l, 0); - /*<>*/ } - function init_aux(i, n, f){ - /*<>*/ if(n <= i) /*<>*/ return 0; - /*<>*/ /*<>*/ var - r = /*<>*/ caml_call1(f, i); - /*<>*/ return [0, r, init_aux(i + 1 | 0, n, f)]; - /*<>*/ } - var rev_init_threshold = typeof Stdlib_Sys[5] === "number" ? 10000 : 50; - function init(len, f){ - /*<>*/ if(0 > len) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_init); - if(rev_init_threshold >= len) - /*<>*/ return init_aux(0, len, f); - var acc = 0, i = 0; - /*<>*/ for(;;){ - if(len <= i) /*<>*/ return rev(acc); - /*<>*/ var - i$0 = i + 1 | 0, - /*<>*/ acc$0 = - [0, /*<>*/ caml_call1(f, i), acc], - acc = acc$0, - i = i$0; - } - /*<>*/ } - function flatten(param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - r = param[2], - l = param[1], - /*<>*/ _J_ = flatten(r); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[37], l, _J_); - /*<>*/ } - function map(f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - l = param[2], - a = param[1], - /*<>*/ r = /*<>*/ caml_call1(f, a); - /*<>*/ return [0, r, map(f, l)]; - } - function _a_(i, f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - l = param[2], - a = param[1], - /*<>*/ r = /*<>*/ caml_call2(f, i, a); - /*<>*/ return [0, r, _a_(i + 1 | 0, f, l)]; - } - function mapi(f, l){ - /*<>*/ return _a_(0, f, l); - /*<>*/ } - function rev_map(f, l){ - /*<>*/ var accu = 0, param = l; - for(;;){ - if(! param) /*<>*/ return accu; - /*<>*/ var - l$0 = param[2], - a = param[1], - /*<>*/ accu$0 = - [0, /*<>*/ caml_call1(f, a), accu], - accu = accu$0, - param = l$0; - } - /*<>*/ } - function iter(f, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], a = param$0[1]; - /*<>*/ /*<>*/ caml_call1(f, a); - var param$0 = l; - } - } - function iteri(f, l$0){ - /*<>*/ var i = 0, param = l$0; - for(;;){ - if(! param) /*<>*/ return 0; - var l = param[2], a = param[1]; - /*<>*/ /*<>*/ caml_call2(f, i, a); - var i$0 = i + 1 | 0, i = i$0, param = l; - } - /*<>*/ } - function fold_left(f, accu, l){ - /*<>*/ var accu$0 = accu, l$0 = l; - /*<>*/ for(;;){ - if(! l$0) /*<>*/ return accu$0; - /*<>*/ var - l$1 = l$0[2], - a = l$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call2(f, accu$0, a), - accu$0 = accu$1, - l$0 = l$1; - } - /*<>*/ } - function fold_right(f, l, accu){ - /*<>*/ if(! l) /*<>*/ return accu; - var l$0 = l[2], a = l[1]; - /*<>*/ return /*<>*/ caml_call2 - (f, a, fold_right(f, l$0, accu)); - /*<>*/ } - function map2(f, l1, l2){ - /*<>*/ if(l1){ - if(l2){ - /*<>*/ var - l2$0 = l2[2], - a2 = l2[1], - l1$0 = l1[2], - a1 = l1[1], - /*<>*/ r = - /*<>*/ caml_call2(f, a1, a2); - /*<>*/ return [0, r, map2(f, l1$0, l2$0)]; - } - } - else if(! l2) /*<>*/ return 0; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_map2); - /*<>*/ } - function rev_map2(f, l1, l2){ - /*<>*/ var accu = 0, l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ - if(l1$0){ - if(l2$0){ - /*<>*/ var - l2$1 = l2$0[2], - a2 = l2$0[1], - l1$1 = l1$0[2], - a1 = l1$0[1], - /*<>*/ accu$0 = - [0, /*<>*/ caml_call2(f, a1, a2), accu], - accu = accu$0, - l1$0 = l1$1, - l2$0 = l2$1; - continue; - } - } - else if(! l2$0) /*<>*/ return accu; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_rev_map2); - } - /*<>*/ } - function iter2(f, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ - if(l1$0){ - if(l2$0){ - var l2$1 = l2$0[2], a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1]; - /*<>*/ /*<>*/ caml_call2(f, a1, a2); - var l1$0 = l1$1, l2$0 = l2$1; - continue; - } - } - else if(! l2$0) /*<>*/ return 0; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_iter2); - } - /*<>*/ } - function fold_left2(f, accu, l1, l2){ - /*<>*/ var accu$0 = accu, l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ - if(l1$0){ - if(l2$0){ - /*<>*/ var - l2$1 = l2$0[2], - a2 = l2$0[1], - l1$1 = l1$0[2], - a1 = l1$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call3(f, accu$0, a1, a2), - accu$0 = accu$1, - l1$0 = l1$1, - l2$0 = l2$1; - continue; - } - } - else if(! l2$0) /*<>*/ return accu$0; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_fold_left2); - } - /*<>*/ } - function fold_right2(f, l1, l2, accu){ - /*<>*/ if(l1){ - if(l2){ - var l2$0 = l2[2], a2 = l2[1], l1$0 = l1[2], a1 = l1[1]; - /*<>*/ return /*<>*/ caml_call3 - (f, a1, a2, fold_right2(f, l1$0, l2$0, accu)); - } - } - else if(! l2) /*<>*/ return accu; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_fold_right2); - /*<>*/ } - function for_all(p, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 1; - /*<>*/ var - l = param$0[2], - a = param$0[1], - /*<>*/ _I_ = /*<>*/ caml_call1(p, a); - /*<>*/ if(! _I_) /*<>*/ return _I_; - var param$0 = l; - } - } - function exists(p, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var - l = param$0[2], - a = param$0[1], - /*<>*/ _H_ = /*<>*/ caml_call1(p, a); - /*<>*/ if(_H_) /*<>*/ return _H_; - var param$0 = l; - } - } - function for_all2(p, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ - if(l1$0){ - if(l2$0){ - /*<>*/ var - l2$1 = l2$0[2], - a2 = l2$0[1], - l1$1 = l1$0[2], - a1 = l1$0[1], - /*<>*/ _G_ = - /*<>*/ caml_call2(p, a1, a2); - /*<>*/ if(! _G_) /*<>*/ return _G_; - var l1$0 = l1$1, l2$0 = l2$1; - continue; - } - } - else if(! l2$0) /*<>*/ return 1; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_for_all2); - } - /*<>*/ } - function exists2(p, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ - if(l1$0){ - if(l2$0){ - /*<>*/ var - l2$1 = l2$0[2], - a2 = l2$0[1], - l1$1 = l1$0[2], - a1 = l1$0[1], - /*<>*/ _F_ = - /*<>*/ caml_call2(p, a1, a2); - /*<>*/ if(_F_) /*<>*/ return _F_; - var l1$0 = l1$1, l2$0 = l2$1; - continue; - } - } - else if(! l2$0) /*<>*/ return 0; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_exists2); - } - /*<>*/ } - function mem(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var - l = param$0[2], - a = param$0[1], - _E_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; - if(_E_) return _E_; - var param$0 = l; - } - } - function memq(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], a = param$0[1], _D_ = a === x ? 1 : 0; - if(_D_) return _D_; - var param$0 = l; - } - } - function assoc(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - /*<>*/ if - (0 === /*<>*/ caml_compare(a, x)) - /*<>*/ return b; - var param$0 = l; - } - } - function assoc_opt(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - /*<>*/ if - (0 === /*<>*/ caml_compare(a, x)) - /*<>*/ return [0, b]; - var param$0 = l; - } - } - function assq(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - if(a === x) /*<>*/ return b; - var param$0 = l; - } - } - function assq_opt(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - if(a === x) /*<>*/ return [0, b]; - var param$0 = l; - } - } - function mem_assoc(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var - l = param$0[2], - a = param$0[1][1], - _C_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; - if(_C_) return _C_; - var param$0 = l; - } - } - function mem_assq(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], a = param$0[1][1], _B_ = a === x ? 1 : 0; - if(_B_) return _B_; - var param$0 = l; - } - } - function remove_assoc(x, param){ - /*<>*/ if(! param) /*<>*/ return 0; - var l = param[2], pair = param[1], a = pair[1]; - /*<>*/ return 0 - === /*<>*/ caml_compare(a, x) - ? l - : [0, pair, remove_assoc(x, l)]; - } - function remove_assq(x, param){ - /*<>*/ if(! param) /*<>*/ return 0; - var l = param[2], pair = param[1], a = pair[1]; - return a === x ? l : [0, pair, remove_assq(x, l)]; - } - function find(p, param){ - var param$0 = param; - for(;;){ - if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var l = param$0[2], x = param$0[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ return x; - var param$0 = l; - } - } - function find_opt(p, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], x = param$0[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ return [0, x]; - var param$0 = l; - } - } - function find_map(f, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var - l = param$0[2], - x = param$0[1], - /*<>*/ result = - /*<>*/ caml_call1(f, x); - if(result) /*<>*/ return result; - var param$0 = l; - } - } - function find_all(p){ - /*<>*/ /*<>*/ var accu = 0; - /*<>*/ return function(param$0){ - var accu$0 = accu, param = param$0; - for(;;){ - if(! param) /*<>*/ return rev(accu$0); - var l = param[2], x = param[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ var - /*<>*/ accu$1 = [0, x, accu$0], - accu$0 = accu$1, - param = l; - else - var param = l; - }}; - /*<>*/ } - function filteri(p, l){ - /*<>*/ var i = 0, acc = 0, param = l; - for(;;){ - if(! param) /*<>*/ return rev(acc); - /*<>*/ var - l$0 = param[2], - x = param[1], - /*<>*/ acc$0 = - /*<>*/ caml_call2(p, i, x) ? [0, x, acc] : acc, - i$0 = i + 1 | 0, - i = i$0, - acc = acc$0, - param = l$0; - } - /*<>*/ } - function filter_map(f){ - /*<>*/ /*<>*/ var accu = 0; - /*<>*/ return function(param$0){ - var accu$0 = accu, param = param$0; - for(;;){ - if(! param) /*<>*/ return rev(accu$0); - /*<>*/ var - l = param[2], - x = param[1], - /*<>*/ match = - /*<>*/ caml_call1(f, x); - if(match) - /*<>*/ var - v = match[1], - /*<>*/ accu$1 = [0, v, accu$0], - accu$0 = accu$1, - param = l; - else - var param = l; - }}; - /*<>*/ } - function concat_map(f, l){ - /*<>*/ var acc = 0, param = l; - for(;;){ - if(! param) /*<>*/ return rev(acc); - /*<>*/ var - l$0 = param[2], - x = param[1], - /*<>*/ xs = /*<>*/ caml_call1(f, x), - /*<>*/ acc$0 = rev_append(xs, acc), - acc = acc$0, - param = l$0; - } - /*<>*/ } - function fold_left_map(f, accu, l){ - /*<>*/ var accu$0 = accu, l_accu = 0, param = l; - for(;;){ - if(! param) /*<>*/ return [0, accu$0, rev(l_accu)]; - /*<>*/ var - l$0 = param[2], - x = param[1], - /*<>*/ match = - /*<>*/ caml_call2(f, accu$0, x), - x$0 = match[2], - accu$1 = match[1], - /*<>*/ l_accu$0 = [0, x$0, l_accu], - accu$0 = accu$1, - l_accu = l_accu$0, - param = l$0; - } - /*<>*/ } - function partition(p, l){ - /*<>*/ var yes = 0, no = 0, param = l; - for(;;){ - if(! param){ - /*<>*/ /*<>*/ var _A_ = rev(no); - /*<>*/ return [0, rev(yes), _A_]; - } - var l$0 = param[2], x = param[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ var - /*<>*/ yes$0 = [0, x, yes], - yes = yes$0, - param = l$0; - else - /*<>*/ var - /*<>*/ no$0 = [0, x, no], - no = no$0, - param = l$0; - } - /*<>*/ } - function partition_map(p, l){ - /*<>*/ var left = 0, right = 0, param = l; - for(;;){ - if(! param){ - /*<>*/ /*<>*/ var _z_ = rev(right); - /*<>*/ return [0, rev(left), _z_]; - } - /*<>*/ var - l$0 = param[2], - x = param[1], - /*<>*/ match = /*<>*/ caml_call1(p, x); - if(0 === match[0]) - /*<>*/ var - v = match[1], - /*<>*/ left$0 = [0, v, left], - left = left$0, - param = l$0; - else - /*<>*/ var - v$0 = match[1], - /*<>*/ right$0 = [0, v$0, right], - right = right$0, - param = l$0; - } - /*<>*/ } - function split(param){ - /*<>*/ if(! param) /*<>*/ return _b_; - /*<>*/ var - l = param[2], - match = param[1], - y = match[2], - x = match[1], - /*<>*/ match$0 = split(l), - ry = match$0[2], - rx = match$0[1]; - /*<>*/ return [0, [0, x, rx], [0, y, ry]]; - /*<>*/ } - function combine(l1, l2){ - /*<>*/ if(l1){ - if(l2){ - var l2$0 = l2[2], a2 = l2[1], l1$0 = l1[2], a1 = l1[1]; - /*<>*/ return [0, [0, a1, a2], combine(l1$0, l2$0)]; - } - } - else if(! l2) /*<>*/ return 0; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_List_combine); - /*<>*/ } - function merge(cmp, l1, l2){ - /*<>*/ if(! l1) /*<>*/ return l2; - if(! l2) /*<>*/ return l1; - var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1]; - /*<>*/ return 0 - < /*<>*/ caml_call2(cmp, h1, h2) - ? [0, h2, merge(cmp, l1, t2)] - : [0, h1, merge(cmp, t1, l2)]; - /*<>*/ } - function stable_sort(cmp, l){ - function sort(n, l){ - /*<>*/ if(2 === n){ - if(l){ - var match = l[2]; - if(match){ - /*<>*/ var - tl = match[2], - x2 = match[1], - x1 = l[1], - /*<>*/ s = - 0 < /*<>*/ caml_call2(cmp, x1, x2) - ? [0, x2, [0, x1, 0]] - : [0, x1, [0, x2, 0]]; - /*<>*/ return [0, s, tl]; - } - } - } - else if(3 === n && l){ - var _y_ = l[2]; - if(_y_){ - var match$2 = _y_[2]; - if(match$2){ - /*<>*/ var - tl$1 = match$2[2], - x3 = match$2[1], - x2$0 = _y_[1], - x1$0 = l[1], - /*<>*/ s$0 = - 0 < /*<>*/ caml_call2(cmp, x1$0, x2$0) - ? 0 - < /*<>*/ caml_call2(cmp, x1$0, x3) - ? 0 - < /*<>*/ caml_call2(cmp, x2$0, x3) - ? [0, x3, [0, x2$0, [0, x1$0, 0]]] - : [0, x2$0, [0, x3, [0, x1$0, 0]]] - : [0, x2$0, [0, x1$0, [0, x3, 0]]] - : 0 - < /*<>*/ caml_call2(cmp, x2$0, x3) - ? 0 - < /*<>*/ caml_call2(cmp, x1$0, x3) - ? [0, x3, [0, x1$0, [0, x2$0, 0]]] - : [0, x1$0, [0, x3, [0, x2$0, 0]]] - : [0, x1$0, [0, x2$0, [0, x3, 0]]]; - /*<>*/ return [0, s$0, tl$1]; - } - } - } - /*<>*/ var - n1 = n >> 1, - n2 = n - n1 | 0, - /*<>*/ match$0 = rev_sort(n1, l), - l2$0 = match$0[2], - s1 = match$0[1], - /*<>*/ match$1 = rev_sort(n2, l2$0), - tl$0 = match$1[2], - s2 = match$1[1], - l1 = s1, - l2 = s2, - accu = 0; - /*<>*/ for(;;){ - if(l1){ - if(l2){ - var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1]; - /*<>*/ if - (0 < /*<>*/ caml_call2(cmp, h1, h2)){ - /*<>*/ var - /*<>*/ accu$0 = [0, h1, accu], - l1 = t1, - accu = accu$0; - continue; - } - /*<>*/ var - /*<>*/ accu$1 = [0, h2, accu], - l2 = t2, - accu = accu$1; - continue; - } - var _x_ = rev_append(l1, accu); - } - else - var _x_ = rev_append(l2, accu); - /*<>*/ return [0, _x_, tl$0]; - } - /*<>*/ } - function rev_sort(n, l){ - /*<>*/ if(2 === n){ - if(l){ - var match = l[2]; - if(match){ - /*<>*/ var - tl = match[2], - x2 = match[1], - x1 = l[1], - /*<>*/ s = - 0 < /*<>*/ caml_call2(cmp, x1, x2) - ? [0, x1, [0, x2, 0]] - : [0, x2, [0, x1, 0]]; - /*<>*/ return [0, s, tl]; - } - } - } - else if(3 === n && l){ - var _w_ = l[2]; - if(_w_){ - var match$2 = _w_[2]; - if(match$2){ - /*<>*/ var - tl$1 = match$2[2], - x3 = match$2[1], - x2$0 = _w_[1], - x1$0 = l[1], - /*<>*/ s$0 = - 0 < /*<>*/ caml_call2(cmp, x1$0, x2$0) - ? 0 - < /*<>*/ caml_call2(cmp, x2$0, x3) - ? [0, x1$0, [0, x2$0, [0, x3, 0]]] - : 0 - < /*<>*/ caml_call2(cmp, x1$0, x3) - ? [0, x1$0, [0, x3, [0, x2$0, 0]]] - : [0, x3, [0, x1$0, [0, x2$0, 0]]] - : 0 - < /*<>*/ caml_call2(cmp, x1$0, x3) - ? [0, x2$0, [0, x1$0, [0, x3, 0]]] - : 0 - < /*<>*/ caml_call2(cmp, x2$0, x3) - ? [0, x2$0, [0, x3, [0, x1$0, 0]]] - : [0, x3, [0, x2$0, [0, x1$0, 0]]]; - /*<>*/ return [0, s$0, tl$1]; - } - } - } - /*<>*/ var - n1 = n >> 1, - n2 = n - n1 | 0, - /*<>*/ match$0 = sort(n1, l), - l2$0 = match$0[2], - s1 = match$0[1], - /*<>*/ match$1 = sort(n2, l2$0), - tl$0 = match$1[2], - s2 = match$1[1], - l1 = s1, - l2 = s2, - accu = 0; - /*<>*/ for(;;){ - if(l1){ - if(l2){ - var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1]; - /*<>*/ if - (0 < /*<>*/ caml_call2(cmp, h1, h2)){ - /*<>*/ var - /*<>*/ accu$0 = [0, h2, accu], - l2 = t2, - accu = accu$0; - continue; - } - /*<>*/ var - /*<>*/ accu$1 = [0, h1, accu], - l1 = t1, - accu = accu$1; - continue; - } - var _v_ = rev_append(l1, accu); - } - else - var _v_ = rev_append(l2, accu); - /*<>*/ return [0, _v_, tl$0]; - } - /*<>*/ } - /*<>*/ /*<>*/ var len = length(l); - /*<>*/ return 2 <= len ? sort(len, l)[1] : l; - /*<>*/ } - function sort_uniq(cmp, l){ - function sort(n, l){ - /*<>*/ if(2 === n){ - if(l){ - var match = l[2]; - if(match){ - /*<>*/ var - tl = match[2], - x2 = match[1], - x1 = l[1], - /*<>*/ c$0 = - /*<>*/ caml_call2(cmp, x1, x2), - /*<>*/ s = - 0 === c$0 - ? [0, x1, 0] - : 0 <= c$0 ? [0, x2, [0, x1, 0]] : [0, x1, [0, x2, 0]]; - /*<>*/ return [0, s, tl]; - } - } - } - else if(3 === n && l){ - var _p_ = l[2]; - if(_p_){ - var match$2 = _p_[2]; - if(match$2){ - /*<>*/ var - tl$1 = match$2[2], - x3 = match$2[1], - x2$0 = _p_[1], - x1$0 = l[1], - /*<>*/ c$1 = - /*<>*/ caml_call2(cmp, x1$0, x2$0); - /*<>*/ if(0 === c$1) - /*<>*/ var - /*<>*/ c$2 = - /*<>*/ caml_call2(cmp, x2$0, x3), - /*<>*/ _q_ = - 0 === c$2 - ? [0, x2$0, 0] - : 0 <= c$2 ? [0, x3, [0, x2$0, 0]] : [0, x2$0, [0, x3, 0]], - s$0 = _q_; - else if(0 <= c$1){ - /*<>*/ /*<>*/ var - c$3 = /*<>*/ caml_call2(cmp, x1$0, x3); - /*<>*/ if(0 === c$3) - var _r_ = [0, x2$0, [0, x1$0, 0]]; - else if(0 <= c$3) - /*<>*/ var - /*<>*/ c$4 = - /*<>*/ caml_call2(cmp, x2$0, x3), - /*<>*/ _s_ = - 0 === c$4 - ? [0, x2$0, [0, x1$0, 0]] - : 0 - <= c$4 - ? [0, x3, [0, x2$0, [0, x1$0, 0]]] - : [0, x2$0, [0, x3, [0, x1$0, 0]]], - _r_ = _s_; - else - var _r_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; - var s$0 = _r_; - } - else{ - /*<>*/ /*<>*/ var - c$5 = /*<>*/ caml_call2(cmp, x2$0, x3); - /*<>*/ if(0 === c$5) - var _t_ = [0, x1$0, [0, x2$0, 0]]; - else if(0 <= c$5) - /*<>*/ var - /*<>*/ c$6 = - /*<>*/ caml_call2(cmp, x1$0, x3), - /*<>*/ _u_ = - 0 === c$6 - ? [0, x1$0, [0, x2$0, 0]] - : 0 - <= c$6 - ? [0, x3, [0, x1$0, [0, x2$0, 0]]] - : [0, x1$0, [0, x3, [0, x2$0, 0]]], - _t_ = _u_; - else - var _t_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; - var s$0 = _t_; - } - /*<>*/ return [0, s$0, tl$1]; - } - } - } - /*<>*/ var - n1 = n >> 1, - n2 = n - n1 | 0, - /*<>*/ match$0 = rev_sort(n1, l), - l2$0 = match$0[2], - s1 = match$0[1], - /*<>*/ match$1 = rev_sort(n2, l2$0), - tl$0 = match$1[2], - s2 = match$1[1], - l1 = s1, - l2 = s2, - accu = 0; - /*<>*/ for(;;){ - if(l1){ - if(l2){ - /*<>*/ var - t2 = l2[2], - h2 = l2[1], - t1 = l1[2], - h1 = l1[1], - /*<>*/ c = - /*<>*/ caml_call2(cmp, h1, h2); - /*<>*/ if(0 === c){ - /*<>*/ var - /*<>*/ accu$0 = [0, h1, accu], - l1 = t1, - l2 = t2, - accu = accu$0; - continue; - } - if(0 < c){ - /*<>*/ var - /*<>*/ accu$1 = [0, h1, accu], - l1 = t1, - accu = accu$1; - continue; - } - /*<>*/ var - /*<>*/ accu$2 = [0, h2, accu], - l2 = t2, - accu = accu$2; - continue; - } - var _o_ = rev_append(l1, accu); - } - else - var _o_ = rev_append(l2, accu); - /*<>*/ return [0, _o_, tl$0]; - } - /*<>*/ } - function rev_sort(n, l){ - /*<>*/ if(2 === n){ - if(l){ - var match = l[2]; - if(match){ - /*<>*/ var - tl = match[2], - x2 = match[1], - x1 = l[1], - /*<>*/ c$0 = - /*<>*/ caml_call2(cmp, x1, x2), - /*<>*/ s = - 0 === c$0 - ? [0, x1, 0] - : 0 < c$0 ? [0, x1, [0, x2, 0]] : [0, x2, [0, x1, 0]]; - /*<>*/ return [0, s, tl]; - } - } - } - else if(3 === n && l){ - var _i_ = l[2]; - if(_i_){ - var match$2 = _i_[2]; - if(match$2){ - /*<>*/ var - tl$1 = match$2[2], - x3 = match$2[1], - x2$0 = _i_[1], - x1$0 = l[1], - /*<>*/ c$1 = - /*<>*/ caml_call2(cmp, x1$0, x2$0); - /*<>*/ if(0 === c$1) - /*<>*/ var - /*<>*/ c$2 = - /*<>*/ caml_call2(cmp, x2$0, x3), - /*<>*/ _j_ = - 0 === c$2 - ? [0, x2$0, 0] - : 0 < c$2 ? [0, x2$0, [0, x3, 0]] : [0, x3, [0, x2$0, 0]], - s$0 = _j_; - else if(0 < c$1){ - /*<>*/ /*<>*/ var - c$3 = /*<>*/ caml_call2(cmp, x2$0, x3); - /*<>*/ if(0 === c$3) - var _k_ = [0, x1$0, [0, x2$0, 0]]; - else if(0 < c$3) - var _k_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; - else - /*<>*/ var - /*<>*/ c$4 = - /*<>*/ caml_call2(cmp, x1$0, x3), - /*<>*/ _l_ = - 0 === c$4 - ? [0, x1$0, [0, x2$0, 0]] - : 0 - < c$4 - ? [0, x1$0, [0, x3, [0, x2$0, 0]]] - : [0, x3, [0, x1$0, [0, x2$0, 0]]], - _k_ = _l_; - var s$0 = _k_; - } - else{ - /*<>*/ /*<>*/ var - c$5 = /*<>*/ caml_call2(cmp, x1$0, x3); - /*<>*/ if(0 === c$5) - var _m_ = [0, x2$0, [0, x1$0, 0]]; - else if(0 < c$5) - var _m_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; - else - /*<>*/ var - /*<>*/ c$6 = - /*<>*/ caml_call2(cmp, x2$0, x3), - /*<>*/ _n_ = - 0 === c$6 - ? [0, x2$0, [0, x1$0, 0]] - : 0 - < c$6 - ? [0, x2$0, [0, x3, [0, x1$0, 0]]] - : [0, x3, [0, x2$0, [0, x1$0, 0]]], - _m_ = _n_; - var s$0 = _m_; - } - /*<>*/ return [0, s$0, tl$1]; - } - } - } - /*<>*/ var - n1 = n >> 1, - n2 = n - n1 | 0, - /*<>*/ match$0 = sort(n1, l), - l2$0 = match$0[2], - s1 = match$0[1], - /*<>*/ match$1 = sort(n2, l2$0), - tl$0 = match$1[2], - s2 = match$1[1], - l1 = s1, - l2 = s2, - accu = 0; - /*<>*/ for(;;){ - if(l1){ - if(l2){ - /*<>*/ var - t2 = l2[2], - h2 = l2[1], - t1 = l1[2], - h1 = l1[1], - /*<>*/ c = - /*<>*/ caml_call2(cmp, h1, h2); - /*<>*/ if(0 === c){ - /*<>*/ var - /*<>*/ accu$0 = [0, h1, accu], - l1 = t1, - l2 = t2, - accu = accu$0; - continue; - } - if(0 <= c){ - /*<>*/ var - /*<>*/ accu$1 = [0, h2, accu], - l2 = t2, - accu = accu$1; - continue; - } - /*<>*/ var - /*<>*/ accu$2 = [0, h1, accu], - l1 = t1, - accu = accu$2; - continue; - } - var _h_ = rev_append(l1, accu); - } - else - var _h_ = rev_append(l2, accu); - /*<>*/ return [0, _h_, tl$0]; - } - /*<>*/ } - /*<>*/ /*<>*/ var len = length(l); - /*<>*/ return 2 <= len ? sort(len, l)[1] : l; - /*<>*/ } - function compare_lengths(l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ - if(! l1$0) return l2$0 ? -1 : 0; - if(! l2$0) /*<>*/ return 1; - var l2$1 = l2$0[2], l1$1 = l1$0[2], l1$0 = l1$1, l2$0 = l2$1; - } - /*<>*/ } - function compare_length_with(l, n){ - /*<>*/ var l$0 = l, n$0 = n; - /*<>*/ for(;;){ - if(! l$0) return 0 === n$0 ? 0 : 0 < n$0 ? -1 : 1; - var l$1 = l$0[2]; - /*<>*/ if(0 >= n$0) /*<>*/ return 1; - /*<>*/ var - /*<>*/ n$1 = n$0 - 1 | 0, - l$0 = l$1, - n$0 = n$1; - } - /*<>*/ } - function equal(eq, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ - if(l1$0){ - if(l2$0){ - /*<>*/ var - l2$1 = l2$0[2], - a2 = l2$0[1], - l1$1 = l1$0[2], - a1 = l1$0[1], - /*<>*/ _g_ = - /*<>*/ caml_call2(eq, a1, a2); - /*<>*/ if(! _g_) /*<>*/ return _g_; - var l1$0 = l1$1, l2$0 = l2$1; - continue; - } - } - else if(! l2$0) /*<>*/ return 1; - /*<>*/ return 0; - } - /*<>*/ } - function compare(cmp, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ - if(! l1$0) return l2$0 ? -1 : 0; - var l1$1 = l1$0[2], a1 = l1$0[1]; - if(! l2$0) /*<>*/ return 1; - /*<>*/ var - l2$1 = l2$0[2], - a2 = l2$0[1], - /*<>*/ c = - /*<>*/ caml_call2(cmp, a1, a2); - /*<>*/ if(0 !== c) /*<>*/ return c; - var l1$0 = l1$1, l2$0 = l2$1; - } - /*<>*/ } - function to_seq(l){ - /*<>*/ function aux(l, param){ - /*<>*/ if(! l) /*<>*/ return 0; - var tail = l[2], x = l[1]; - /*<>*/ return [0, - x, - function(_f_){ /*<>*/ return aux(tail, _f_);}]; - /*<>*/ } - /*<>*/ return function(_e_){ - /*<>*/ return aux(l, _e_);}; - /*<>*/ } - function of_seq(seq){ - function direct(depth, seq){ - /*<>*/ if(0 === depth){ - var - _c_ = 0, - _d_ = - function(acc, x){ - /*<>*/ return [0, x, acc]; - /*<>*/ }; - /*<>*/ return rev - ( /*<>*/ caml_call3(Stdlib_Seq[5], _d_, _c_, seq)); - } - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq, 0); - if(! match) /*<>*/ return 0; - var next = match[2], x = match[1]; - /*<>*/ return [0, x, direct(depth - 1 | 0, next)]; - /*<>*/ } - /*<>*/ return direct(500, seq); - /*<>*/ } - var - Stdlib_List = - [0, - length, - compare_lengths, - compare_length_with, - cons, - hd, - tl, - nth, - nth_opt, - rev, - init, - append, - rev_append, - flatten, - flatten, - equal, - compare, - iter, - iteri, - map, - mapi, - rev_map, - filter_map, - concat_map, - fold_left_map, - fold_left, - fold_right, - iter2, - map2, - rev_map2, - fold_left2, - fold_right2, - for_all, - exists, - for_all2, - exists2, - mem, - memq, - find, - find_opt, - find_map, - find_all, - find_all, - filteri, - partition, - partition_map, - assoc, - assoc_opt, - assq, - assq_opt, - mem_assoc, - mem_assq, - remove_assoc, - remove_assq, - split, - combine, - stable_sort, - stable_sort, - stable_sort, - sort_uniq, - merge, - to_seq, - of_seq]; - runtime.caml_register_global(18, Stdlib_List, "Stdlib__List"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Int -(function(globalThis){ - "use strict"; - var runtime = globalThis.jsoo_runtime, zero = 0, one = 1, minus_one = -1; - function abs(x){ - /*<>*/ return 0 <= x ? x : - x | 0; - /*<>*/ } - var max_int = 2147483647, min_int = -2147483648; - function lognot(x){ - /*<>*/ return x ^ -1; - /*<>*/ } - function equal(_b_, _a_){ /*<>*/ return _b_ === _a_ ? 1 : 0;} - var compare = runtime.caml_int_compare; - function min(x, y){ - /*<>*/ return x <= y ? x : y; - /*<>*/ } - function max(x, y){ - /*<>*/ return y <= x ? x : y; - /*<>*/ } - function to_string(x){ - /*<>*/ return "" + x; - /*<>*/ } - var - Stdlib_Int = - [0, - zero, - one, - minus_one, - abs, - max_int, - min_int, - lognot, - equal, - compare, - min, - max, - to_string]; - runtime.caml_register_global(1, Stdlib_Int, "Stdlib__Int"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Bytes -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Char, Stdlib__Int, Stdlib__Seq, Stdlib__Sys, Stdlib__Uchar -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_bytes_ml = "bytes.ml", - cst_index_out_of_bounds$3 = "index out of bounds", - caml_blit_bytes = runtime.caml_blit_bytes, - caml_bswap16 = runtime.caml_bswap16, - caml_bytes_get = runtime.caml_bytes_get, - caml_bytes_get16 = runtime.caml_bytes_get16, - 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_set32 = runtime.caml_bytes_set32, - caml_bytes_set64 = runtime.caml_bytes_set64, - caml_bytes_unsafe_get = runtime.caml_bytes_unsafe_get, - caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, - caml_create_bytes = runtime.caml_create_bytes, - caml_fill_bytes = runtime.caml_fill_bytes, - caml_int32_bswap = runtime.caml_int32_bswap, - caml_int64_bswap = runtime.caml_int64_bswap, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_bytes_length = runtime.caml_ml_bytes_length, - caml_string_of_bytes = runtime.caml_string_of_bytes, - 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) - : runtime.caml_call_gen(f, [a0, a1]); - } - var - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Stdlib_Uchar = global_data.Stdlib__Uchar, - Assert_failure = global_data.Assert_failure, - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib_Int = global_data.Stdlib__Int, - Stdlib_Seq = global_data.Stdlib__Seq, - Stdlib_Char = global_data.Stdlib__Char, - cst_index_out_of_bounds$2 = cst_index_out_of_bounds$3, - _f_ = [0, cst_bytes_ml, 820, 20], - _e_ = [0, cst_bytes_ml, 831, 9], - cst_index_out_of_bounds$1 = cst_index_out_of_bounds$3, - cst_index_out_of_bounds$0 = cst_index_out_of_bounds$3, - _d_ = [0, cst_bytes_ml, 766, 20], - _c_ = [0, cst_bytes_ml, 777, 9], - cst_index_out_of_bounds = cst_index_out_of_bounds$3, - _b_ = [0, cst_bytes_ml, 654, 20], - _a_ = [0, cst_bytes_ml, 679, 9], - cst_Bytes_of_seq_cannot_grow_b = "Bytes.of_seq: cannot grow bytes", - cst_String_rcontains_from_Byte = - "String.rcontains_from / Bytes.rcontains_from", - cst_String_contains_from_Bytes = - "String.contains_from / Bytes.contains_from", - cst_String_rindex_from_opt_Byt = - "String.rindex_from_opt / Bytes.rindex_from_opt", - cst_String_rindex_from_Bytes_r = "String.rindex_from / Bytes.rindex_from", - cst_String_index_from_opt_Byte = - "String.index_from_opt / Bytes.index_from_opt", - cst_String_index_from_Bytes_in = "String.index_from / Bytes.index_from", - cst_Bytes_concat = "Bytes.concat", - cst_String_blit_Bytes_blit_str = "String.blit / Bytes.blit_string", - cst_Bytes_blit = "Bytes.blit", - cst_String_fill_Bytes_fill = "String.fill / Bytes.fill", - cst_Bytes_extend = "Bytes.extend", - cst_String_sub_Bytes_sub = "String.sub / Bytes.sub"; - function make(n, c){ - /*<>*/ /*<>*/ var - s = /*<>*/ caml_create_bytes(n); - /*<>*/ /*<>*/ caml_fill_bytes(s, 0, n, c); - /*<>*/ return s; - /*<>*/ } - function init(n, f){ - /*<>*/ var - /*<>*/ s = /*<>*/ caml_create_bytes(n), - /*<>*/ _aq_ = n - 1 | 0, - /*<>*/ _ap_ = 0; - if(_aq_ >= 0){ - var i = _ap_; - for(;;){ - caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); - /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; - if(_aq_ === i) break; - var i = _ar_; - } - } - /*<>*/ return s; - /*<>*/ } - /*<>*/ /*<>*/ var - empty = /*<>*/ caml_create_bytes(0); - function copy(s){ - /*<>*/ var - len = caml_ml_bytes_length(s), - /*<>*/ r = - /*<>*/ caml_create_bytes(len); - /*<>*/ /*<>*/ caml_blit_bytes - (s, 0, r, 0, len); - /*<>*/ return r; - /*<>*/ } - function to_string(b){ - /*<>*/ return /*<>*/ caml_string_of_bytes - (copy(b)); - /*<>*/ } - function of_string(s){ - /*<>*/ return copy(caml_bytes_of_string(s)); - /*<>*/ } - function sub(s, ofs, len){ - /*<>*/ if - (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs){ - /*<>*/ /*<>*/ var - r = /*<>*/ caml_create_bytes(len); - /*<>*/ /*<>*/ caml_blit_bytes - (s, ofs, r, 0, len); - /*<>*/ return r; - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_String_sub_Bytes_sub); - /*<>*/ } - function sub_string(b, ofs, len){ - /*<>*/ return /*<>*/ caml_string_of_bytes - (sub(b, ofs, len)); - /*<>*/ } - function symbol(a, b){ - /*<>*/ var - c = a + b | 0, - _ao_ = b < 0 ? 1 : 0, - match = c < 0 ? 1 : 0; - a: - { - if(a < 0){if(_ao_ && ! match) break a;} else if(! _ao_ && match) break a; - /*<>*/ return c; - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Bytes_extend); - /*<>*/ } - function extend(s, left, right){ - /*<>*/ var - /*<>*/ len = - symbol(symbol(caml_ml_bytes_length(s), left), right), - /*<>*/ r = - /*<>*/ caml_create_bytes(len); - if(0 <= left) - var dstoff = left, srcoff = 0; - else - var dstoff = 0, srcoff = - left | 0; - /*<>*/ /*<>*/ var - cpylen = - /*<>*/ caml_call2 - (Stdlib_Int[10], - caml_ml_bytes_length(s) - srcoff | 0, - len - dstoff | 0); - if(0 < cpylen) - /*<>*/ /*<>*/ caml_blit_bytes - (s, srcoff, r, dstoff, cpylen); - /*<>*/ return r; - /*<>*/ } - function fill(s, ofs, len, c){ - /*<>*/ 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); - /*<>*/ } - function blit(s1, ofs1, s2, ofs2, len){ - /*<>*/ if - (0 <= len - && - 0 <= ofs1 - && - (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); - /*<>*/ } - function blit_string(s1, ofs1, s2, ofs2, len){ - /*<>*/ if - (0 <= len - && - 0 <= ofs1 - && - (runtime.caml_ml_string_length(s1) - len | 0) >= ofs1 - && 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); - /*<>*/ } - function iter(f, a){ - /*<>*/ var - _am_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var i = _al_; - for(;;){ - /*<>*/ /*<>*/ caml_call1 - (f, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ === i) break; - var i = _an_; - } - } - return 0; - /*<>*/ } - function iteri(f, a){ - /*<>*/ var - _aj_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (f, i, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; - } - } - return 0; - /*<>*/ } - function concat(sep, l){ - /*<>*/ if(! l) /*<>*/ return empty; - var seplen = caml_ml_bytes_length(sep), acc = 0, param = l, pos$1 = 0; - for(;;){ - if(param){ - var hd = param[1]; - if(param[2]){ - var - tl = param[2], - x = (caml_ml_bytes_length(hd) + seplen | 0) + acc | 0, - acc$0 = - acc <= x - ? x - : /*<>*/ caml_call1(Stdlib[1], cst_Bytes_concat), - acc = acc$0, - param = tl; - continue; - } - var _ah_ = caml_ml_bytes_length(hd) + acc | 0; - } - else - var _ah_ = acc; - /*<>*/ var - /*<>*/ dst = - /*<>*/ caml_create_bytes(_ah_), - pos = pos$1, - param$0 = l; - for(;;){ - if(! param$0) /*<>*/ return dst; - var hd$0 = param$0[1]; - if(! param$0[2]){ - /*<>*/ /*<>*/ caml_blit_bytes - (hd$0, 0, dst, pos, caml_ml_bytes_length(hd$0)); - /*<>*/ return dst; - } - var tl$0 = param$0[2]; - /*<>*/ /*<>*/ caml_blit_bytes - (hd$0, 0, dst, pos, /*<>*/ caml_ml_bytes_length(hd$0)); - /*<>*/ /*<>*/ caml_blit_bytes - (sep, 0, dst, pos + caml_ml_bytes_length(hd$0) | 0, seplen); - var - pos$0 = (pos + caml_ml_bytes_length(hd$0) | 0) + seplen | 0, - pos = pos$0, - param$0 = tl$0; - } - } - } - function cat(s1, s2){ - /*<>*/ var - l1 = caml_ml_bytes_length(s1), - /*<>*/ l2 = - /*<>*/ caml_ml_bytes_length(s2), - /*<>*/ r = - /*<>*/ caml_create_bytes(l1 + l2 | 0); - /*<>*/ /*<>*/ caml_blit_bytes - (s1, 0, r, 0, l1); - /*<>*/ /*<>*/ caml_blit_bytes - (s2, 0, r, l1, l2); - /*<>*/ return r; - /*<>*/ } - function is_space(param){ - /*<>*/ /*<>*/ var - _ag_ = param - 9 | 0; - a: - { - if(4 < _ag_ >>> 0){if(23 !== _ag_) break a;} else if(2 === _ag_) break a; - /*<>*/ return 1; - } - /*<>*/ return 0; - /*<>*/ } - function trim(s){ - /*<>*/ var - len = caml_ml_bytes_length(s), - /*<>*/ i = [0, 0]; - for(;;){ - /*<>*/ if - (i[1] < len && is_space(caml_bytes_unsafe_get(s, i[1]))){i[1]++; continue;} - /*<>*/ /*<>*/ var - j = [0, len - 1 | 0]; - for(;;){ - /*<>*/ if - (i[1] <= j[1] && is_space(caml_bytes_unsafe_get(s, j[1]))){j[1] += -1; continue;} - return i[1] <= j[1] ? sub(s, i[1], (j[1] - i[1] | 0) + 1 | 0) : empty; - } - } - /*<>*/ } - function unsafe_escape(s){ - /*<>*/ var - /*<>*/ n = [0, 0], - _$_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ ___ = 0; - if(_$_ >= 0){ - var i$0 = ___; - for(;;){ - var match = caml_bytes_unsafe_get(s, i$0); - a: - { - b: - { - c: - { - if(32 <= match){ - var _ad_ = match - 34 | 0; - if(58 < _ad_ >>> 0){ - if(93 <= _ad_) break c; - } - else if(56 < _ad_ - 1 >>> 0) break b; - var _ae_ = 1; - break a; - } - if(11 <= match){ - if(13 === match) break b; - } - else if(8 <= match) break b; - } - var _ae_ = 4; - break a; - } - var _ae_ = 2; - } - n[1] = n[1] + _ae_ | 0; - /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; - if(_$_ === i$0) break; - var i$0 = _af_; - } - } - if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; - /*<>*/ /*<>*/ var - s$0 = /*<>*/ caml_create_bytes(n[1]); - n[1] = 0; - /*<>*/ var - _ab_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ _aa_ = 0; - if(_ab_ >= 0){ - var i = _aa_; - for(;;){ - var c = caml_bytes_unsafe_get(s, i); - a: - { - b: - { - c: - { - if(35 <= c){ - if(92 !== c){if(127 <= c) break c; break b;} - } - else{ - if(32 > c){ - if(14 <= c) break c; - switch(c){ - case 8: - caml_bytes_unsafe_set(s$0, n[1], 92); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 98); - break a; - case 9: - caml_bytes_unsafe_set(s$0, n[1], 92); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 116); - break a; - case 10: - caml_bytes_unsafe_set(s$0, n[1], 92); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 110); - break a; - case 13: - caml_bytes_unsafe_set(s$0, n[1], 92); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 114); - break a; - default: break c; - } - } - if(34 > c) break b; - } - caml_bytes_unsafe_set(s$0, n[1], 92); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], c); - break a; - } - caml_bytes_unsafe_set(s$0, n[1], 92); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 48 + (c / 100 | 0) | 0); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 48 + ((c / 10 | 0) % 10 | 0) | 0); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 48 + (c % 10 | 0) | 0); - break a; - } - caml_bytes_unsafe_set(s$0, n[1], c); - } - n[1]++; - /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; - if(_ab_ === i) break; - var i = _ac_; - } - } - /*<>*/ return s$0; - /*<>*/ } - function escaped(b){ - /*<>*/ /*<>*/ var b$0 = copy(b); - /*<>*/ return unsafe_escape(b$0); - /*<>*/ } - function map(f, s){ - /*<>*/ var l = caml_ml_bytes_length(s); - /*<>*/ if(0 === l) /*<>*/ return s; - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_create_bytes(l), - /*<>*/ _Y_ = l - 1 | 0, - /*<>*/ _X_ = 0; - if(_Y_ >= 0){ - var i = _X_; - for(;;){ - caml_bytes_unsafe_set - (r, - i, - /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; - if(_Y_ === i) break; - var i = _Z_; - } - } - /*<>*/ return r; - /*<>*/ } - function mapi(f, s){ - /*<>*/ var l = caml_ml_bytes_length(s); - /*<>*/ if(0 === l) /*<>*/ return s; - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_create_bytes(l), - /*<>*/ _V_ = l - 1 | 0, - /*<>*/ _U_ = 0; - if(_V_ >= 0){ - var i = _U_; - for(;;){ - caml_bytes_unsafe_set - (r, - i, - /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _W_ = i + 1 | 0; - if(_V_ === i) break; - var i = _W_; - } - } - /*<>*/ return r; - /*<>*/ } - function fold_left(f, x, a){ - /*<>*/ var - /*<>*/ r = [0, x], - _S_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _R_ = 0; - if(_S_ >= 0){ - var i = _R_; - for(;;){ - r[1] = - /*<>*/ caml_call2 - (f, r[1], caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _T_ = i + 1 | 0; - if(_S_ === i) break; - var i = _T_; - } - } - return r[1]; - /*<>*/ } - function fold_right(f, a, x){ - /*<>*/ var - /*<>*/ r = [0, x], - /*<>*/ _P_ = - /*<>*/ caml_ml_bytes_length(a) - 1 | 0; - if(_P_ >= 0){ - var i = _P_; - for(;;){ - r[1] = - /*<>*/ caml_call2 - (f, caml_bytes_unsafe_get(a, i), r[1]); - /*<>*/ /*<>*/ var _Q_ = i - 1 | 0; - if(0 === i) break; - var i = _Q_; - } - } - return r[1]; - /*<>*/ } - function exists(p, s){ - /*<>*/ var n = caml_ml_bytes_length(s), i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ if - ( /*<>*/ caml_call1(p, caml_bytes_unsafe_get(s, i))) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function for_all(p, s){ - /*<>*/ var n = caml_ml_bytes_length(s), i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 1; - /*<>*/ if - (! /*<>*/ caml_call1(p, caml_bytes_unsafe_get(s, i))) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function uppercase_ascii(s){ - /*<>*/ return map(Stdlib_Char[4], s); - /*<>*/ } - function lowercase_ascii(s){ - /*<>*/ return map(Stdlib_Char[3], s); - /*<>*/ } - function apply1(f, s){ - /*<>*/ if(0 === caml_ml_bytes_length(s)) - /*<>*/ return s; - /*<>*/ /*<>*/ var r = copy(s); - caml_bytes_unsafe_set - (r, - 0, - /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, 0))); - /*<>*/ return r; - /*<>*/ } - function capitalize_ascii(s){ - /*<>*/ return apply1(Stdlib_Char[4], s); - /*<>*/ } - function uncapitalize_ascii(s){ - /*<>*/ return apply1(Stdlib_Char[3], s); - /*<>*/ } - function starts_with(prefix, s){ - /*<>*/ var - len_s = caml_ml_bytes_length(s), - len_pre = caml_ml_bytes_length(prefix), - _O_ = len_pre <= len_s ? 1 : 0; - if(! _O_) return _O_; - var i = 0; - /*<>*/ for(;;){ - if(i === len_pre) /*<>*/ return 1; - if(caml_bytes_unsafe_get(s, i) !== caml_bytes_unsafe_get(prefix, i)) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function ends_with(suffix, s){ - /*<>*/ var - len_s = caml_ml_bytes_length(s), - len_suf = caml_ml_bytes_length(suffix), - diff = len_s - len_suf | 0, - _N_ = 0 <= diff ? 1 : 0; - if(! _N_) return _N_; - var i = 0; - /*<>*/ for(;;){ - if(i === len_suf) /*<>*/ return 1; - if - (caml_bytes_unsafe_get(s, diff + i | 0) - !== caml_bytes_unsafe_get(suffix, i)) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function index_rec(s, lim, i, c){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(lim <= i$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - if(caml_bytes_unsafe_get(s, i$0) === c) - /*<>*/ return i$0; - var i$1 = i$0 + 1 | 0, i$0 = i$1; - } - /*<>*/ } - function index(s, c){ - /*<>*/ return index_rec - (s, caml_ml_bytes_length(s), 0, c); - /*<>*/ } - function index_rec_opt(s, lim, i, c){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(lim <= i$0) /*<>*/ return 0; - if(caml_bytes_unsafe_get(s, i$0) === c) - /*<>*/ return [0, i$0]; - var i$1 = i$0 + 1 | 0, i$0 = i$1; - } - /*<>*/ } - function index_opt(s, c){ - /*<>*/ return index_rec_opt - (s, caml_ml_bytes_length(s), 0, c); - /*<>*/ } - function index_from(s, i, c){ - /*<>*/ 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); - /*<>*/ } - 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); - /*<>*/ } - function rindex_rec(s, i, c){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(0 > i$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - if(caml_bytes_unsafe_get(s, i$0) === c) - /*<>*/ return i$0; - var i$1 = i$0 - 1 | 0, i$0 = i$1; - } - /*<>*/ } - function rindex(s, c){ - /*<>*/ return rindex_rec - (s, caml_ml_bytes_length(s) - 1 | 0, c); - /*<>*/ } - 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); - /*<>*/ } - function rindex_rec_opt(s, i, c){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(0 > i$0) /*<>*/ return 0; - if(caml_bytes_unsafe_get(s, i$0) === c) - /*<>*/ return [0, i$0]; - var i$1 = i$0 - 1 | 0, i$0 = i$1; - } - /*<>*/ } - function rindex_opt(s, c){ - /*<>*/ return rindex_rec_opt - (s, caml_ml_bytes_length(s) - 1 | 0, c); - /*<>*/ } - 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); - /*<>*/ } - function contains_from(s, i, c){ - /*<>*/ var l = caml_ml_bytes_length(s); - if(0 <= i && l >= i) - /*<>*/ try{ - /*<>*/ index_rec(s, l, i, c); - /*<>*/ /*<>*/ var _L_ = 1; - /*<>*/ return _L_; - } - catch(_M_){ - var _K_ = caml_wrap_exception(_M_); - if(_K_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_K_, 0); - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_String_contains_from_Bytes); - /*<>*/ } - function contains(s, c){ - /*<>*/ return contains_from(s, 0, c); - /*<>*/ } - function rcontains_from(s, i, c){ - /*<>*/ if(0 <= i && caml_ml_bytes_length(s) > i) - /*<>*/ try{ - /*<>*/ rindex_rec(s, i, c); - /*<>*/ /*<>*/ var _I_ = 1; - /*<>*/ return _I_; - } - catch(_J_){ - var _H_ = caml_wrap_exception(_J_); - if(_H_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_H_, 0); - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_String_rcontains_from_Byte); - /*<>*/ } - var compare = runtime.caml_bytes_compare; - function split_on_char(sep, s){ - /*<>*/ var - /*<>*/ r = [0, 0], - /*<>*/ j = - [0, /*<>*/ caml_ml_bytes_length(s)], - /*<>*/ _D_ = - /*<>*/ caml_ml_bytes_length(s) - 1 | 0; - if(_D_ >= 0){ - var i = _D_; - for(;;){ - if(caml_bytes_unsafe_get(s, i) === sep){ - var _F_ = r[1]; - r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _F_]; - j[1] = i; - } - /*<>*/ /*<>*/ var _G_ = i - 1 | 0; - if(0 === i) break; - var i = _G_; - } - } - var _E_ = r[1]; - /*<>*/ return [0, sub(s, 0, j[1]), _E_]; - /*<>*/ } - function to_seq(s){ - function aux(i, param){ - /*<>*/ if(i === caml_ml_bytes_length(s)) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = - /*<>*/ caml_bytes_get(s, i), - /*<>*/ _B_ = i + 1 | 0; - /*<>*/ return [0, - x, - function(_C_){ /*<>*/ return aux(_B_, _C_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _z_ = 0; - /*<>*/ return function(_A_){ - /*<>*/ return aux(_z_, _A_);}; - /*<>*/ } - function to_seqi(s){ - function aux(i, param){ - /*<>*/ if(i === caml_ml_bytes_length(s)) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = - /*<>*/ caml_bytes_get(s, i), - /*<>*/ _x_ = i + 1 | 0; - /*<>*/ return [0, - [0, i, x], - function(_y_){ /*<>*/ return aux(_x_, _y_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _v_ = 0; - /*<>*/ return function(_w_){ - /*<>*/ return aux(_v_, _w_);}; - /*<>*/ } - function of_seq(i){ - /*<>*/ var - /*<>*/ n = [0, 0], - /*<>*/ buf = [0, make(256, 0)]; - function _u_(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, - Stdlib_Sys[12]); - if(caml_ml_bytes_length(buf[1]) === new_len) - /*<>*/ /*<>*/ caml_call1 - (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; - } - /*<>*/ /*<>*/ caml_bytes_set - (buf[1], n[1], c); - n[1]++; - return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Seq[4], _u_, i); - return sub(buf[1], 0, n[1]); - /*<>*/ } - function unsafe_get_uint16_le(b, i){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bswap16 - ( /*<>*/ caml_bytes_get16(b, i)) - : /*<>*/ caml_bytes_get16(b, i); - /*<>*/ } - function unsafe_get_uint16_be(b, i){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_get16(b, i) - : /*<>*/ caml_bswap16 - ( /*<>*/ caml_bytes_get16(b, i)); - /*<>*/ } - function get_int8(b, i){ - /*<>*/ var - /*<>*/ _s_ = Stdlib_Sys[10] - 8 | 0, - _t_ = Stdlib_Sys[10] - 8 | 0; - return /*<>*/ caml_bytes_get(b, i) << _t_ >> _s_; - /*<>*/ } - function get_uint16_le(b, i){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bswap16 - ( /*<>*/ caml_bytes_get16(b, i)) - : /*<>*/ caml_bytes_get16(b, i); - /*<>*/ } - function get_uint16_be(b, i){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_get16(b, i) - : /*<>*/ caml_bswap16 - ( /*<>*/ caml_bytes_get16(b, i)); - /*<>*/ } - function get_int16_ne(b, i){ - /*<>*/ var - /*<>*/ _q_ = Stdlib_Sys[10] - 16 | 0, - _r_ = Stdlib_Sys[10] - 16 | 0; - return /*<>*/ caml_bytes_get16(b, i) << _r_ >> _q_; - /*<>*/ } - function get_int16_le(b, i){ - /*<>*/ var - /*<>*/ _o_ = Stdlib_Sys[10] - 16 | 0, - _p_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_le(b, i) << _p_ >> _o_; - /*<>*/ } - function get_int16_be(b, i){ - /*<>*/ var - /*<>*/ _m_ = Stdlib_Sys[10] - 16 | 0, - _n_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_be(b, i) << _n_ >> _m_; - /*<>*/ } - function get_int32_le(b, i){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_int32_bswap - ( /*<>*/ caml_bytes_get32(b, i)) - : /*<>*/ caml_bytes_get32(b, i); - /*<>*/ } - function get_int32_be(b, i){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_get32(b, i) - : /*<>*/ caml_int32_bswap - ( /*<>*/ caml_bytes_get32(b, i)); - /*<>*/ } - function get_int64_le(b, i){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_int64_bswap - ( /*<>*/ caml_bytes_get64(b, i)) - : /*<>*/ caml_bytes_get64(b, i); - /*<>*/ } - function get_int64_be(b, i){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_get64(b, i) - : /*<>*/ caml_int64_bswap - ( /*<>*/ caml_bytes_get64(b, i)); - /*<>*/ } - function unsafe_set_uint16_le(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)) - : /*<>*/ caml_bytes_set16(b, i, x); - /*<>*/ } - function unsafe_set_uint16_be(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set16(b, i, x) - : /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)); - /*<>*/ } - function set_int16_le(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)) - : /*<>*/ caml_bytes_set16(b, i, x); - /*<>*/ } - function set_int16_be(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set16(b, i, x) - : /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)); - /*<>*/ } - function set_int32_le(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set32 - (b, i, /*<>*/ caml_int32_bswap(x)) - : /*<>*/ caml_bytes_set32(b, i, x); - /*<>*/ } - function set_int32_be(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set32(b, i, x) - : /*<>*/ caml_bytes_set32 - (b, i, /*<>*/ caml_int32_bswap(x)); - /*<>*/ } - function set_int64_le(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set64 - (b, i, /*<>*/ caml_int64_bswap(x)) - : /*<>*/ caml_bytes_set64(b, i, x); - /*<>*/ } - function set_int64_be(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set64(b, i, x) - : /*<>*/ caml_bytes_set64 - (b, i, /*<>*/ caml_int64_bswap(x)); - /*<>*/ } - var - set_uint8 = caml_bytes_set, - set_uint16_ne = caml_bytes_set16, - dec_invalid = Stdlib_Uchar[22]; - function dec_ret(n, u){ - /*<>*/ /*<>*/ var - _l_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Uchar[21], n, _l_); - /*<>*/ } - function not_in_x80_to_xBF(b){ - /*<>*/ return 2 !== (b >>> 6 | 0) ? 1 : 0; - /*<>*/ } - function not_in_xA0_to_xBF(b){ - /*<>*/ return 5 !== (b >>> 5 | 0) ? 1 : 0; - /*<>*/ } - function not_in_x80_to_x9F(b){ - /*<>*/ return 4 !== (b >>> 5 | 0) ? 1 : 0; - /*<>*/ } - function not_in_x90_to_xBF(b){ - /*<>*/ var - _j_ = b < 144 ? 1 : 0, - _k_ = _j_ || (191 < b ? 1 : 0); - return _k_; - /*<>*/ } - function not_in_x80_to_x8F(b){ - /*<>*/ return 8 !== (b >>> 4 | 0) ? 1 : 0; - /*<>*/ } - function utf_8_uchar_3(b0, b1, b2){ - /*<>*/ return (b0 & 15) << 12 | (b1 & 63) << 6 | b2 & 63; - /*<>*/ } - function utf_8_uchar_4(b0, b1, b2, b3){ - /*<>*/ return (b0 & 7) << 18 | (b1 & 63) << 12 - | (b2 & 63) << 6 - | b3 & 63; - /*<>*/ } - function get_utf_8_uchar(b, i){ - /*<>*/ var - /*<>*/ b0 = - /*<>*/ caml_bytes_get(b, i), - /*<>*/ max = - /*<>*/ caml_ml_bytes_length(b) - 1 | 0; - a: - { - /*<>*/ if(224 <= b0){ - if(237 <= b0){ - if(245 <= b0) break a; - switch(b0 - 237 | 0){ - case 0: - /*<>*/ /*<>*/ var i$0 = i + 1 | 0; - if(max < i$0) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - b1 = /*<>*/ caml_bytes_unsafe_get(b, i$0); - /*<>*/ if(not_in_x80_to_x9F(b1)) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - i$1 = i$0 + 1 | 0; - if(max < i$1) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 2); - /*<>*/ /*<>*/ var - b2 = /*<>*/ caml_bytes_unsafe_get(b, i$1); - /*<>*/ return not_in_x80_to_xBF(b2) - ? /*<>*/ caml_call1(dec_invalid, 2) - : dec_ret(3, utf_8_uchar_3(b0, b1, b2)); - case 3: - /*<>*/ /*<>*/ var i$4 = i + 1 | 0; - if(max < i$4) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - b1$1 = /*<>*/ caml_bytes_unsafe_get(b, i$4); - /*<>*/ if(not_in_x90_to_xBF(b1$1)) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - i$5 = i$4 + 1 | 0; - if(max < i$5) - /*<>*/ return /*<>*/ caml_call1 - (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); - /*<>*/ /*<>*/ var - i$6 = i$5 + 1 | 0; - if(max < i$6) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 3); - /*<>*/ /*<>*/ var - b3 = /*<>*/ caml_bytes_unsafe_get(b, i$6); - /*<>*/ return not_in_x80_to_xBF(b3) - ? /*<>*/ caml_call1(dec_invalid, 3) - : dec_ret(4, utf_8_uchar_4(b0, b1$1, b2$1, b3)); - case 7: - /*<>*/ /*<>*/ var - i$10 = i + 1 | 0; - if(max < i$10) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - b1$3 = /*<>*/ caml_bytes_unsafe_get(b, i$10); - /*<>*/ if(not_in_x80_to_x8F(b1$3)) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - i$11 = i$10 + 1 | 0; - if(max < i$11) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 2); - /*<>*/ /*<>*/ var - b2$3 = /*<>*/ caml_bytes_unsafe_get(b, i$11); - /*<>*/ if(not_in_x80_to_xBF(b2$3)) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 2); - /*<>*/ /*<>*/ var - i$12 = i$11 + 1 | 0; - if(max < i$12) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 3); - /*<>*/ /*<>*/ var - b3$1 = /*<>*/ caml_bytes_unsafe_get(b, i$12); - /*<>*/ return not_in_x80_to_xBF(b3$1) - ? /*<>*/ caml_call1(dec_invalid, 3) - : dec_ret(4, utf_8_uchar_4(b0, b1$3, b2$3, b3$1)); - case 1: - case 2: break; - default: - /*<>*/ /*<>*/ var i$7 = i + 1 | 0; - if(max < i$7) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - b1$2 = /*<>*/ caml_bytes_unsafe_get(b, i$7); - /*<>*/ if(not_in_x80_to_xBF(b1$2)) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - i$8 = i$7 + 1 | 0; - if(max < i$8) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 2); - /*<>*/ /*<>*/ var - b2$2 = /*<>*/ caml_bytes_unsafe_get(b, i$8); - /*<>*/ if(not_in_x80_to_xBF(b2$2)) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 2); - /*<>*/ /*<>*/ var - i$9 = i$8 + 1 | 0; - if(max < i$9) - /*<>*/ return /*<>*/ caml_call1 - (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_ret(4, utf_8_uchar_4(b0, b1$2, b2$2, b3$0)); - } - } - else if(225 > b0){ - /*<>*/ /*<>*/ var i$13 = i + 1 | 0; - if(max < i$13) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - b1$4 = /*<>*/ caml_bytes_unsafe_get(b, i$13); - /*<>*/ if(not_in_xA0_to_xBF(b1$4)) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - i$14 = i$13 + 1 | 0; - if(max < i$14) - /*<>*/ return /*<>*/ caml_call1 - (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_ret(3, utf_8_uchar_3(b0, b1$4, b2$4)); - } - /*<>*/ /*<>*/ var i$2 = i + 1 | 0; - if(max < i$2) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - b1$0 = /*<>*/ caml_bytes_unsafe_get(b, i$2); - /*<>*/ if(not_in_x80_to_xBF(b1$0)) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var i$3 = i$2 + 1 | 0; - if(max < i$3) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 2); - /*<>*/ /*<>*/ var - b2$0 = /*<>*/ caml_bytes_unsafe_get(b, i$3); - /*<>*/ return not_in_x80_to_xBF(b2$0) - ? /*<>*/ caml_call1(dec_invalid, 2) - : dec_ret(3, utf_8_uchar_3(b0, b1$0, b2$0)); - } - if(128 > b0) /*<>*/ return dec_ret(1, b0); - if(194 <= b0){ - /*<>*/ /*<>*/ var i$15 = i + 1 | 0; - if(max < i$15) - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ /*<>*/ var - b1$5 = /*<>*/ caml_bytes_unsafe_get(b, i$15); - /*<>*/ return not_in_x80_to_xBF(b1$5) - ? /*<>*/ caml_call1(dec_invalid, 1) - : dec_ret(2, (b0 & 31) << 6 | b1$5 & 63); - } - } - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 1); - /*<>*/ } - function set_utf_8_uchar(b, i, u){ - /*<>*/ function set(_i_, _h_, _g_){ - /*<>*/ caml_bytes_unsafe_set(_i_, _h_, _g_); - return 0; - } - /*<>*/ var - /*<>*/ max = - /*<>*/ caml_ml_bytes_length(b) - 1 | 0, - /*<>*/ u$0 = - /*<>*/ caml_call1(Stdlib_Uchar[10], u); - /*<>*/ if(0 > u$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); - /*<>*/ if(127 >= u$0){ - /*<>*/ /*<>*/ caml_bytes_set(b, i, u$0); - /*<>*/ return 1; - } - /*<>*/ if(2047 >= u$0){ - /*<>*/ /*<>*/ var last$1 = i + 1 | 0; - return max < last$1 - ? 0 - : ( /*<>*/ caml_bytes_set - (b, i, 192 | u$0 >>> 6 | 0), - set(b, last$1, 128 | u$0 & 63), - 2); - } - /*<>*/ if(65535 >= u$0){ - /*<>*/ /*<>*/ var last$0 = i + 2 | 0; - return max < last$0 - ? 0 - : ( /*<>*/ caml_bytes_set - (b, i, 224 | u$0 >>> 12 | 0), - set(b, i + 1 | 0, 128 | (u$0 >>> 6 | 0) & 63), - set(b, last$0, 128 | u$0 & 63), - 3); - } - /*<>*/ if(1114111 < u$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - /*<>*/ /*<>*/ var last = i + 3 | 0; - return max < last - ? 0 - : ( /*<>*/ caml_bytes_set - (b, i, 240 | u$0 >>> 18 | 0), - set(b, i + 1 | 0, 128 | (u$0 >>> 12 | 0) & 63), - set(b, i + 2 | 0, 128 | (u$0 >>> 6 | 0) & 63), - set(b, last, 128 | u$0 & 63), - 4); - /*<>*/ } - function is_valid_utf_8(b){ - /*<>*/ var max = caml_ml_bytes_length(b) - 1 | 0, i = 0; - /*<>*/ for(;;){ - if(max < i) /*<>*/ return 1; - /*<>*/ /*<>*/ var - match = /*<>*/ caml_bytes_unsafe_get(b, i); - a: - { - if(224 <= match){ - if(237 <= match){ - if(245 <= match) break a; - switch(match - 237 | 0){ - case 0: - /*<>*/ /*<>*/ var - last = i + 2 | 0; - /*<>*/ if - (max >= last - && - ! - not_in_x80_to_x9F - ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, last))){ - /*<>*/ var - /*<>*/ i$0 = last + 1 | 0, - i = i$0; - continue; - } - /*<>*/ return 0; - case 3: - /*<>*/ /*<>*/ var - last$1 = i + 3 | 0; - /*<>*/ if - (max >= last$1 - && - ! - not_in_x90_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, i + 2 | 0)) - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, last$1))){ - /*<>*/ var - /*<>*/ i$2 = last$1 + 1 | 0, - i = i$2; - continue; - } - /*<>*/ return 0; - case 7: - /*<>*/ /*<>*/ var - last$3 = i + 3 | 0; - /*<>*/ if - (max >= last$3 - && - ! - not_in_x80_to_x8F - ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, i + 2 | 0)) - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, last$3))){ - /*<>*/ var - /*<>*/ i$4 = last$3 + 1 | 0, - i = i$4; - continue; - } - /*<>*/ return 0; - case 1: - case 2: break; - default: - /*<>*/ /*<>*/ var - last$2 = i + 3 | 0; - /*<>*/ if - (max >= last$2 - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, i + 2 | 0)) - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, last$2))){ - /*<>*/ var - /*<>*/ i$3 = last$2 + 1 | 0, - i = i$3; - continue; - } - /*<>*/ return 0; - } - } - else if(225 > match){ - /*<>*/ /*<>*/ var - last$4 = i + 2 | 0; - /*<>*/ if - (max >= last$4 - && - ! - not_in_xA0_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, last$4))){ - /*<>*/ var - /*<>*/ i$5 = last$4 + 1 | 0, - i = i$5; - continue; - } - /*<>*/ return 0; - } - /*<>*/ /*<>*/ var last$0 = i + 2 | 0; - /*<>*/ if - (max >= last$0 - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, i + 1 | 0)) - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, last$0))){ - /*<>*/ var - /*<>*/ i$1 = last$0 + 1 | 0, - i = i$1; - continue; - } - /*<>*/ return 0; - } - if(128 > match){ - /*<>*/ var - /*<>*/ i$7 = i + 1 | 0, - i = i$7; - continue; - } - if(194 <= match){ - /*<>*/ /*<>*/ var last$5 = i + 1 | 0; - /*<>*/ if - (max >= last$5 - && - ! - not_in_x80_to_xBF - ( /*<>*/ caml_bytes_unsafe_get(b, last$5))){ - /*<>*/ var - /*<>*/ i$6 = last$5 + 1 | 0, - i = i$6; - continue; - } - /*<>*/ return 0; - } - } - /*<>*/ return 0; - } - /*<>*/ } - function get_utf_16be_uchar(b, i){ - /*<>*/ /*<>*/ var - max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; - if(0 <= i && max >= i){ - if(i === max) - /*<>*/ return /*<>*/ caml_call1 - (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); - /*<>*/ /*<>*/ var last = i + 3 | 0; - if(max < last) return caml_call1(dec_invalid, (max - i | 0) + 1 | 0); - /*<>*/ /*<>*/ var - lo = unsafe_get_uint16_be(b, i + 2 | 0); - if(56320 <= lo && 57343 >= lo){ - var u = ((hi & 1023) << 10 | lo & 1023) + 65536 | 0; - /*<>*/ return dec_ret(4, u); - } - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 2); - } - /*<>*/ return dec_ret(2, hi); - } - /*<>*/ return /*<>*/ caml_call1 - (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); - /*<>*/ if(0 > u$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); - /*<>*/ if(65535 >= u$0){ - /*<>*/ /*<>*/ var last$0 = i + 1 | 0; - return max < last$0 ? 0 : (unsafe_set_uint16_be(b, i, u$0), 2); - } - /*<>*/ if(1114111 < u$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); - /*<>*/ /*<>*/ var last = i + 3 | 0; - if(max < last) /*<>*/ return 0; - /*<>*/ var - /*<>*/ u$1 = u$0 - 65536 | 0, - hi = 55296 | u$1 >>> 10 | 0, - lo = 56320 | u$1 & 1023; - /*<>*/ unsafe_set_uint16_be(b, i, hi); - /*<>*/ unsafe_set_uint16_be(b, i + 2 | 0, lo); - /*<>*/ return 4; - } - /*<>*/ return /*<>*/ caml_call1 - (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; - /*<>*/ for(;;){ - if(max < i) /*<>*/ return 1; - if(i === max) /*<>*/ return 0; - /*<>*/ /*<>*/ var - u = unsafe_get_uint16_be(b, i); - if(55296 <= u && 57343 >= u){ - /*<>*/ if(56319 < u) - /*<>*/ return 0; - /*<>*/ /*<>*/ var last = i + 3 | 0; - if(max < last) /*<>*/ return 0; - /*<>*/ /*<>*/ var - u$0 = unsafe_get_uint16_be(b, i + 2 | 0); - if(56320 <= u$0 && 57343 >= u$0){ - /*<>*/ var - /*<>*/ i$1 = i + 4 | 0, - i = i$1; - continue; - } - /*<>*/ return 0; - } - /*<>*/ var - /*<>*/ i$0 = i + 2 | 0, - i = i$0; - } - /*<>*/ } - function get_utf_16le_uchar(b, i){ - /*<>*/ /*<>*/ var - max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; - if(0 <= i && max >= i){ - if(i === max) - /*<>*/ return /*<>*/ caml_call1 - (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); - /*<>*/ /*<>*/ var last = i + 3 | 0; - if(max < last) return caml_call1(dec_invalid, (max - i | 0) + 1 | 0); - /*<>*/ /*<>*/ var - lo = unsafe_get_uint16_le(b, i + 2 | 0); - if(56320 <= lo && 57343 >= lo){ - var u = ((hi & 1023) << 10 | lo & 1023) + 65536 | 0; - /*<>*/ return dec_ret(4, u); - } - /*<>*/ return /*<>*/ caml_call1 - (dec_invalid, 2); - } - /*<>*/ return dec_ret(2, hi); - } - /*<>*/ return /*<>*/ caml_call1 - (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); - /*<>*/ if(0 > u$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _f_], 1); - /*<>*/ if(65535 >= u$0){ - /*<>*/ /*<>*/ var last$0 = i + 1 | 0; - return max < last$0 ? 0 : (unsafe_set_uint16_le(b, i, u$0), 2); - } - /*<>*/ if(1114111 < u$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _e_], 1); - /*<>*/ /*<>*/ var last = i + 3 | 0; - if(max < last) /*<>*/ return 0; - /*<>*/ var - /*<>*/ u$1 = u$0 - 65536 | 0, - hi = 55296 | u$1 >>> 10 | 0, - lo = 56320 | u$1 & 1023; - /*<>*/ unsafe_set_uint16_le(b, i, hi); - /*<>*/ unsafe_set_uint16_le(b, i + 2 | 0, lo); - /*<>*/ return 4; - } - /*<>*/ return /*<>*/ caml_call1 - (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; - /*<>*/ for(;;){ - if(max < i) /*<>*/ return 1; - if(i === max) /*<>*/ return 0; - /*<>*/ /*<>*/ var - u = unsafe_get_uint16_le(b, i); - if(55296 <= u && 57343 >= u){ - /*<>*/ if(56319 < u) - /*<>*/ return 0; - /*<>*/ /*<>*/ var last = i + 3 | 0; - if(max < last) /*<>*/ return 0; - /*<>*/ /*<>*/ var - u$0 = unsafe_get_uint16_le(b, i + 2 | 0); - if(56320 <= u$0 && 57343 >= u$0){ - /*<>*/ var - /*<>*/ i$1 = i + 4 | 0, - i = i$1; - continue; - } - /*<>*/ return 0; - } - /*<>*/ var - /*<>*/ i$0 = i + 2 | 0, - i = i$0; - } - /*<>*/ } - var - Stdlib_Bytes = - [0, - make, - init, - empty, - copy, - of_string, - to_string, - sub, - sub_string, - extend, - fill, - blit, - blit_string, - concat, - cat, - iter, - iteri, - map, - mapi, - fold_left, - fold_right, - for_all, - exists, - trim, - escaped, - index, - index_opt, - rindex, - rindex_opt, - index_from, - index_from_opt, - rindex_from, - rindex_from_opt, - contains, - contains_from, - rcontains_from, - uppercase_ascii, - lowercase_ascii, - capitalize_ascii, - uncapitalize_ascii, - compare, - runtime.caml_bytes_equal, - starts_with, - ends_with, - caml_string_of_bytes, - caml_bytes_of_string, - split_on_char, - to_seq, - to_seqi, - of_seq, - get_utf_8_uchar, - set_utf_8_uchar, - is_valid_utf_8, - get_utf_16be_uchar, - set_utf_16be_uchar, - is_valid_utf_16be, - get_utf_16le_uchar, - set_utf_16le_uchar, - is_valid_utf_16le, - caml_bytes_get, - get_int8, - caml_bytes_get16, - get_uint16_be, - get_uint16_le, - get_int16_ne, - get_int16_be, - get_int16_le, - caml_bytes_get32, - get_int32_be, - get_int32_le, - caml_bytes_get64, - get_int64_be, - get_int64_le, - set_uint8, - caml_bytes_set, - set_uint16_ne, - set_int16_be, - set_int16_le, - caml_bytes_set16, - set_int16_be, - set_int16_le, - caml_bytes_set32, - set_int32_be, - set_int32_le, - caml_bytes_set64, - set_int64_be, - set_int64_le, - unsafe_escape]; - runtime.caml_register_global(30, Stdlib_Bytes, "Stdlib__Bytes"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__String -//# unitInfo: Requires: Stdlib, Stdlib__Bytes -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst$0 = "", - caml_blit_string = runtime.caml_blit_string, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_string_length = runtime.caml_ml_string_length, - caml_string_equal = runtime.caml_string_equal, - caml_string_hash = runtime.caml_string_hash, - caml_string_unsafe_get = runtime.caml_string_unsafe_get, - 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) - : 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, - empty = cst$0, - Stdlib = global_data.Stdlib, - Stdlib_Bytes = global_data.Stdlib__Bytes, - bts = Stdlib_Bytes[44], - bos = Stdlib_Bytes[45], - cst_String_rcontains_from_Byte = - "String.rcontains_from / Bytes.rcontains_from", - cst_String_contains_from_Bytes = - "String.contains_from / Bytes.contains_from", - cst_String_rindex_from_opt_Byt = - "String.rindex_from_opt / Bytes.rindex_from_opt", - cst_String_rindex_from_Bytes_r = "String.rindex_from / Bytes.rindex_from", - cst_String_index_from_opt_Byte = - "String.index_from_opt / Bytes.index_from_opt", - cst_String_index_from_Bytes_in = "String.index_from / Bytes.index_from", - cst_String_concat = "String.concat"; - function make(n, c){ - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call2(Stdlib_Bytes[1], n, c)); - /*<>*/ } - function init(n, f){ - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call2(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 blit = Stdlib_Bytes[12]; - function concat(sep, l){ - /*<>*/ if(! l) /*<>*/ return cst; - var seplen = caml_ml_string_length(sep), acc = 0, param = l, pos$1 = 0; - for(;;){ - if(param){ - var hd = param[1]; - if(param[2]){ - var - tl = param[2], - x = (caml_ml_string_length(hd) + seplen | 0) + acc | 0, - acc$0 = - acc <= x - ? x - : /*<>*/ caml_call1(Stdlib[1], cst_String_concat), - acc = acc$0, - param = tl; - continue; - } - var _W_ = caml_ml_string_length(hd) + acc | 0; - } - else - var _W_ = acc; - /*<>*/ var - /*<>*/ dst = - /*<>*/ runtime.caml_create_bytes(_W_), - pos = pos$1, - param$0 = l; - for(;;){ - if(param$0){ - var hd$0 = param$0[1]; - if(param$0[2]){ - var tl$0 = param$0[2]; - /*<>*/ /*<>*/ caml_blit_string - (hd$0, - 0, - dst, - pos, - /*<>*/ caml_ml_string_length(hd$0)); - /*<>*/ /*<>*/ caml_blit_string - (sep, 0, dst, pos + caml_ml_string_length(hd$0) | 0, seplen); - var - pos$0 = (pos + caml_ml_string_length(hd$0) | 0) + seplen | 0, - pos = pos$0, - param$0 = tl$0; - continue; - } - /*<>*/ /*<>*/ caml_blit_string - (hd$0, 0, dst, pos, caml_ml_string_length(hd$0)); - } - /*<>*/ return /*<>*/ caml_call1 - (bts, dst); - } - } - } - var cat = Stdlib[28]; - function iter(f, s){ - /*<>*/ var - _U_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _T_ = 0; - if(_U_ >= 0){ - var i = _T_; - for(;;){ - /*<>*/ /*<>*/ caml_call1 - (f, caml_string_unsafe_get(s, i)); - /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ === i) break; - var i = _V_; - } - } - return 0; - /*<>*/ } - function iteri(f, s){ - /*<>*/ var - _R_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _Q_ = 0; - if(_R_ >= 0){ - var i = _Q_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (f, i, caml_string_unsafe_get(s, i)); - /*<>*/ /*<>*/ var _S_ = i + 1 | 0; - if(_R_ === i) break; - var i = _S_; - } - } - return 0; - /*<>*/ } - function map(f, s){ - /*<>*/ /*<>*/ var - _P_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, - /*<>*/ caml_call2(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_)); - /*<>*/ } - function fold_right(f, x, a){ - /*<>*/ /*<>*/ var - _N_ = /*<>*/ caml_call1(bos, x); - /*<>*/ return /*<>*/ caml_call3 - (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_); - /*<>*/ } - function exists(f, s){ - /*<>*/ /*<>*/ var - _L_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Bytes[22], f, _L_); - /*<>*/ } - function for_all(f, s){ - /*<>*/ /*<>*/ var - _K_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Bytes[21], f, _K_); - /*<>*/ } - function is_space(param){ - /*<>*/ /*<>*/ var _J_ = param - 9 | 0; - a: - { - if(4 < _J_ >>> 0){if(23 !== _J_) break a;} else if(2 === _J_) break a; - /*<>*/ return 1; - } - /*<>*/ return 0; - /*<>*/ } - function trim(s){ - /*<>*/ if - ( /*<>*/ caml_string_equal(s, cst$0)) - /*<>*/ return s; - /*<>*/ if - (! - is_space(caml_string_unsafe_get(s, 0)) - && - ! - is_space(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_)); - /*<>*/ } - function escaped(s){ - /*<>*/ /*<>*/ var - b = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[87], b)); - /*<>*/ } - function index_rec(s, lim, i, c){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(lim <= i$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - if(caml_string_unsafe_get(s, i$0) === c) - /*<>*/ return i$0; - var i$1 = i$0 + 1 | 0, i$0 = i$1; - } - /*<>*/ } - function index(s, c){ - /*<>*/ return index_rec - (s, caml_ml_string_length(s), 0, c); - /*<>*/ } - function index_rec_opt(s, lim, i, c){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(lim <= i$0) /*<>*/ return 0; - if(caml_string_unsafe_get(s, i$0) === c) - /*<>*/ return [0, i$0]; - var i$1 = i$0 + 1 | 0, i$0 = i$1; - } - /*<>*/ } - function index_opt(s, c){ - /*<>*/ return index_rec_opt - (s, caml_ml_string_length(s), 0, c); - /*<>*/ } - function index_from(s, i, c){ - /*<>*/ 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); - /*<>*/ } - 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); - /*<>*/ } - function rindex_rec(s, i, c){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(0 > i$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - if(caml_string_unsafe_get(s, i$0) === c) - /*<>*/ return i$0; - var i$1 = i$0 - 1 | 0, i$0 = i$1; - } - /*<>*/ } - function rindex(s, c){ - /*<>*/ return rindex_rec - (s, caml_ml_string_length(s) - 1 | 0, c); - /*<>*/ } - 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); - /*<>*/ } - function rindex_rec_opt(s, i, c){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(0 > i$0) /*<>*/ return 0; - if(caml_string_unsafe_get(s, i$0) === c) - /*<>*/ return [0, i$0]; - var i$1 = i$0 - 1 | 0, i$0 = i$1; - } - /*<>*/ } - function rindex_opt(s, c){ - /*<>*/ return rindex_rec_opt - (s, caml_ml_string_length(s) - 1 | 0, c); - /*<>*/ } - 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); - /*<>*/ } - function contains_from(s, i, c){ - /*<>*/ var l = caml_ml_string_length(s); - if(0 <= i && l >= i) - /*<>*/ try{ - /*<>*/ index_rec(s, l, i, c); - /*<>*/ /*<>*/ var _G_ = 1; - /*<>*/ return _G_; - } - catch(_H_){ - var _F_ = caml_wrap_exception(_H_); - if(_F_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_F_, 0); - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_String_contains_from_Bytes); - /*<>*/ } - function contains(s, c){ - /*<>*/ return contains_from(s, 0, c); - /*<>*/ } - function rcontains_from(s, i, c){ - /*<>*/ if(0 <= i && caml_ml_string_length(s) > i) - /*<>*/ try{ - /*<>*/ rindex_rec(s, i, c); - /*<>*/ /*<>*/ var _D_ = 1; - /*<>*/ return _D_; - } - catch(_E_){ - var _C_ = caml_wrap_exception(_E_); - if(_C_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_C_, 0); - } - /*<>*/ return /*<>*/ caml_call1 - (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_)); - /*<>*/ } - function lowercase_ascii(s){ - /*<>*/ /*<>*/ var - _A_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[37], _A_)); - /*<>*/ } - function capitalize_ascii(s){ - /*<>*/ /*<>*/ var - _z_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[38], _z_)); - /*<>*/ } - function uncapitalize_ascii(s){ - /*<>*/ /*<>*/ var - _y_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[39], _y_)); - /*<>*/ } - function starts_with(prefix, s){ - /*<>*/ var - len_s = caml_ml_string_length(s), - len_pre = caml_ml_string_length(prefix), - _x_ = len_pre <= len_s ? 1 : 0; - if(! _x_) return _x_; - var i = 0; - /*<>*/ for(;;){ - if(i === len_pre) /*<>*/ return 1; - if(caml_string_unsafe_get(s, i) !== caml_string_unsafe_get(prefix, i)) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function ends_with(suffix, s){ - /*<>*/ var - len_s = caml_ml_string_length(s), - len_suf = caml_ml_string_length(suffix), - diff = len_s - len_suf | 0, - _w_ = 0 <= diff ? 1 : 0; - if(! _w_) return _w_; - var i = 0; - /*<>*/ for(;;){ - if(i === len_suf) /*<>*/ return 1; - if - (caml_string_unsafe_get(s, diff + i | 0) - !== caml_string_unsafe_get(suffix, i)) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function hash(x){ - /*<>*/ return /*<>*/ caml_string_hash - (0, x); - /*<>*/ } - function split_on_char(sep, s){ - /*<>*/ var - /*<>*/ r = [0, 0], - /*<>*/ j = - [0, /*<>*/ caml_ml_string_length(s)], - /*<>*/ _s_ = - /*<>*/ caml_ml_string_length(s) - 1 | 0; - if(_s_ >= 0){ - var i = _s_; - for(;;){ - if(caml_string_unsafe_get(s, i) === sep){ - var _u_ = r[1]; - r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _u_]; - j[1] = i; - } - /*<>*/ /*<>*/ var _v_ = i - 1 | 0; - if(0 === i) break; - var i = _v_; - } - } - var _t_ = r[1]; - /*<>*/ return [0, sub(s, 0, j[1]), _t_]; - /*<>*/ } - var compare = runtime.caml_string_compare; - function to_seq(s){ - /*<>*/ /*<>*/ var - _r_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[47], _r_); - /*<>*/ } - function to_seqi(s){ - /*<>*/ /*<>*/ var - _q_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[48], _q_); - /*<>*/ } - function of_seq(g){ - /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(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); - /*<>*/ } - function is_valid_utf_8(s){ - /*<>*/ /*<>*/ var - _o_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (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); - /*<>*/ } - function is_valid_utf_16be(s){ - /*<>*/ /*<>*/ var - _m_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (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); - /*<>*/ } - function is_valid_utf_16le(s){ - /*<>*/ /*<>*/ var - _k_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[58], _k_); - /*<>*/ } - function get_int8(s, i){ - /*<>*/ /*<>*/ var - _j_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call2 - (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); - /*<>*/ } - function get_uint16_be(s, i){ - /*<>*/ /*<>*/ var - _h_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call2 - (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); - /*<>*/ } - function get_int16_le(s, i){ - /*<>*/ /*<>*/ var - _f_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call2 - (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); - /*<>*/ } - function get_int32_le(s, i){ - /*<>*/ /*<>*/ var - _d_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call2 - (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); - /*<>*/ } - function get_int64_le(s, i){ - /*<>*/ /*<>*/ var - _b_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return /*<>*/ caml_call2 - (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 - Stdlib_String = - [0, - make, - init, - empty, - of_bytes, - to_bytes, - concat, - cat, - caml_string_equal, - compare, - starts_with, - ends_with, - contains_from, - rcontains_from, - contains, - sub, - split_on_char, - map, - mapi, - fold_left, - fold_right, - for_all, - exists, - trim, - escaped, - uppercase_ascii, - lowercase_ascii, - capitalize_ascii, - uncapitalize_ascii, - iter, - iteri, - index_from, - index_from_opt, - rindex_from, - rindex_from_opt, - index, - index_opt, - rindex, - rindex_opt, - to_seq, - to_seqi, - of_seq, - get_utf_8_uchar, - is_valid_utf_8, - get_utf_16be_uchar, - is_valid_utf_16be, - get_utf_16le_uchar, - is_valid_utf_16le, - blit, - runtime.caml_string_get, - get_int8, - runtime.caml_string_get16, - get_uint16_be, - get_uint16_le, - get_int16_ne, - get_int16_be, - get_int16_le, - runtime.caml_string_get32, - hash, - caml_string_hash, - get_int32_be, - get_int32_le, - runtime.caml_string_get64, - get_int64_be, - get_int64_le]; - runtime.caml_register_global(12, Stdlib_String, "Stdlib__String"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Unit -(function(globalThis){ - "use strict"; - var runtime = globalThis.jsoo_runtime, cst = "()"; - function equal(param, _b_){ - /*<>*/ return 1; - /*<>*/ } - function compare(param, _a_){ - /*<>*/ return 0; - /*<>*/ } - function to_string(param){ - /*<>*/ return cst; - /*<>*/ } - var Stdlib_Unit = [0, equal, compare, to_string]; - runtime.caml_register_global(1, Stdlib_Unit, "Stdlib__Unit"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Marshal -//# unitInfo: Requires: Stdlib, Stdlib__Bytes -(function - (globalThis){ - "use strict"; - var - 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 - global_data = runtime.caml_get_global_data(), - Stdlib_Bytes = global_data.Stdlib__Bytes, - Stdlib = global_data.Stdlib, - cst_Marshal_from_bytes = cst_Marshal_from_bytes$1, - cst_Marshal_from_bytes$0 = cst_Marshal_from_bytes$1, - cst_Marshal_data_size = "Marshal.data_size", - cst_Marshal_to_buffer_substrin = - "Marshal.to_buffer: substring out of bounds"; - function to_buffer(buff, ofs, len, v, flags){ - /*<>*/ if - (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); - /*<>*/ } - var header_size = 20; - function data_size(buff, ofs){ - /*<>*/ if - (0 <= ofs && (caml_ml_bytes_length(buff) - 20 | 0) >= ofs) - /*<>*/ return /*<>*/ caml_marshal_data_size - (buff, ofs); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Marshal_data_size); - /*<>*/ } - function total_size(buff, ofs){ - /*<>*/ return 20 + data_size(buff, ofs) | 0; - /*<>*/ } - function from_bytes(buff, ofs){ - /*<>*/ if - (0 <= ofs && (caml_ml_bytes_length(buff) - 20 | 0) >= ofs){ - /*<>*/ /*<>*/ var - len = /*<>*/ caml_marshal_data_size(buff, ofs); - return (caml_ml_bytes_length(buff) - (20 + len | 0) | 0) < ofs - ? /*<>*/ caml_call1 - (Stdlib[1], cst_Marshal_from_bytes$0) - : /*<>*/ runtime.caml_input_value_from_bytes - (buff, ofs); - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Marshal_from_bytes); - /*<>*/ } - function from_string(buff, ofs){ - /*<>*/ return from_bytes - ( /*<>*/ caml_call1(Stdlib_Bytes[45], buff), - ofs); - /*<>*/ } - var - Stdlib_Marshal = - [0, - runtime.caml_output_value, - to_buffer, - runtime.caml_input_value, - from_bytes, - from_string, - header_size, - data_size, - total_size]; - runtime.caml_register_global(6, Stdlib_Marshal, "Stdlib__Marshal"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Array -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Seq -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_array_sub = runtime.caml_array_sub, - caml_check_bound = runtime.caml_check_bound, - caml_make_vect = runtime.caml_make_vect, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - 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) - : 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, - Assert_failure = global_data.Assert_failure, - Stdlib = global_data.Stdlib, - /*<>*/ Floatarray = [0], - _a_ = [0, "array.ml", 319, 4], - cst_Array_combine = "Array.combine", - cst_Array_exists2 = "Array.exists2", - cst_Array_for_all2 = "Array.for_all2", - cst_Array_map2_arrays_must_hav = - "Array.map2: arrays must have the same length", - cst_Array_iter2_arrays_must_ha = - "Array.iter2: arrays must have the same length", - cst_Array_blit = "Array.blit", - cst_Array_fill = "Array.fill", - cst_Array_sub = "Array.sub", - cst_Array_init = "Array.init", - cst_Stdlib_Array_Bottom = "Stdlib.Array.Bottom"; - function init(l, f){ - /*<>*/ if(0 === l) /*<>*/ return [0]; - if(0 > l) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Array_init); - /*<>*/ var - /*<>*/ res = - /*<>*/ caml_make_vect - (l, /*<>*/ caml_call1(f, 0)), - /*<>*/ _as_ = l - 1 | 0, - /*<>*/ _ar_ = 1; - if(_as_ >= 1){ - var i = _ar_; - for(;;){ - /*<>*/ res[1 + i] = - /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _at_ = i + 1 | 0; - if(_as_ === i) break; - var i = _at_; - } - } - /*<>*/ return res; - /*<>*/ } - function make_matrix(sx, sy, init){ - /*<>*/ var - /*<>*/ res = - /*<>*/ caml_make_vect(sx, [0]), - /*<>*/ _ap_ = sx - 1 | 0, - /*<>*/ _ao_ = 0; - if(_ap_ >= 0){ - var x = _ao_; - for(;;){ - res[1 + x] = /*<>*/ caml_make_vect(sy, init); - /*<>*/ /*<>*/ var _aq_ = x + 1 | 0; - if(_ap_ === x) break; - var x = _aq_; - } - } - /*<>*/ return res; - /*<>*/ } - function copy(a){ - /*<>*/ var l = a.length - 1; - /*<>*/ return 0 === l - ? [0] - : /*<>*/ caml_array_sub(a, 0, l); - /*<>*/ } - function append(a1, a2){ - /*<>*/ var l1 = a1.length - 1; - /*<>*/ return 0 === l1 - ? copy(a2) - : 0 - === a2.length - 1 - ? /*<>*/ caml_array_sub(a1, 0, l1) - : /*<>*/ runtime.caml_array_append(a1, a2); - /*<>*/ } - function sub(a, ofs, len){ - /*<>*/ 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); - /*<>*/ } - 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); - /*<>*/ } - function blit(a1, ofs1, a2, ofs2, len){ - /*<>*/ if - (0 <= len - && - 0 <= ofs1 - && - (a1.length - 1 - len | 0) >= ofs1 - && 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); - /*<>*/ } - function iter(f, a){ - /*<>*/ var - _am_ = a.length - 1 - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var i = _al_; - for(;;){ - /*<>*/ /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ === i) break; - var i = _an_; - } - } - return 0; - /*<>*/ } - function iter2(f, a, b){ - /*<>*/ if(a.length - 1 !== b.length - 1) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Array_iter2_arrays_must_ha); - /*<>*/ var - _aj_ = a.length - 1 - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; - } - } - return 0; - /*<>*/ } - function map(f, a){ - /*<>*/ var l = a.length - 1; - /*<>*/ if(0 === l) /*<>*/ return [0]; - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_make_vect - (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _ag_ = l - 1 | 0, - /*<>*/ _af_ = 1; - if(_ag_ >= 1){ - var i = _af_; - for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_ag_ === i) break; - var i = _ah_; - } - } - /*<>*/ return r; - /*<>*/ } - function map2(f, a, b){ - /*<>*/ var - la = a.length - 1, - /*<>*/ lb = b.length - 1; - if(la !== lb) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Array_map2_arrays_must_hav); - if(0 === la) /*<>*/ return [0]; - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_make_vect - (la, /*<>*/ caml_call2(f, a[1], b[1])), - /*<>*/ _ad_ = la - 1 | 0, - /*<>*/ _ac_ = 1; - if(_ad_ >= 1){ - var i = _ac_; - for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ === i) break; - var i = _ae_; - } - } - /*<>*/ return r; - /*<>*/ } - function iteri(f, a){ - /*<>*/ var - _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i = _$_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ === i) break; - var i = _ab_; - } - } - return 0; - /*<>*/ } - function mapi(f, a){ - /*<>*/ var l = a.length - 1; - /*<>*/ if(0 === l) /*<>*/ return [0]; - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_make_vect - (l, /*<>*/ caml_call2(f, 0, a[1])), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 1; - if(_Z_ >= 1){ - var i = _Y_; - for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ === i) break; - var i = ___; - } - } - /*<>*/ return r; - /*<>*/ } - function to_list(a){ - /*<>*/ var i$1 = a.length - 1 - 1 | 0, i = i$1, res = 0; - /*<>*/ for(;;){ - if(0 > i) /*<>*/ return res; - /*<>*/ var - /*<>*/ res$0 = [0, a[1 + i], res], - /*<>*/ i$0 = i - 1 | 0, - i = i$0, - res = res$0; - } - /*<>*/ } - function list_length(accu, param){ - var accu$0 = accu, param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return accu$0; - /*<>*/ var - t = param$0[2], - /*<>*/ accu$1 = accu$0 + 1 | 0, - accu$0 = accu$1, - param$0 = t; - } - } - function of_list(l){ - /*<>*/ if(! l) /*<>*/ return [0]; - /*<>*/ var - tl = l[2], - hd = l[1], - /*<>*/ a = - /*<>*/ caml_make_vect(list_length(0, l), hd), - i = 1, - param = tl; - for(;;){ - if(! param) /*<>*/ return a; - var tl$0 = param[2], hd$0 = param[1]; - /*<>*/ a[1 + i] = hd$0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0, - param = tl$0; - } - /*<>*/ } - function fold_left(f, x, a){ - /*<>*/ var - /*<>*/ r = [0, x], - _W_ = a.length - 1 - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; - for(;;){ - r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ === i) break; - var i = _X_; - } - } - return r[1]; - /*<>*/ } - function fold_left_map(f, acc, input_array){ - /*<>*/ var len = input_array.length - 1; - /*<>*/ if(0 === len) - /*<>*/ return [0, acc, [0]]; - /*<>*/ var - /*<>*/ match = - /*<>*/ caml_call2(f, acc, input_array[1]), - elt = match[2], - acc$0 = match[1], - /*<>*/ output_array = - /*<>*/ caml_make_vect(len, elt), - /*<>*/ acc$1 = [0, acc$0], - /*<>*/ _T_ = len - 1 | 0, - /*<>*/ _S_ = 1; - if(_T_ >= 1){ - var i = _S_; - for(;;){ - /*<>*/ var - /*<>*/ match$0 = - /*<>*/ caml_call2(f, acc$1[1], input_array[1 + i]), - elt$0 = match$0[2], - acc$2 = match$0[1]; - acc$1[1] = acc$2; - /*<>*/ output_array[1 + i] = elt$0; - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ === i) break; - var i = _U_; - } - } - /*<>*/ return [0, acc$1[1], output_array]; - /*<>*/ } - function fold_right(f, a, x){ - /*<>*/ var - /*<>*/ r = [0, x], - /*<>*/ _Q_ = a.length - 1 - 1 | 0; - if(_Q_ >= 0){ - var i = _Q_; - for(;;){ - r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _R_ = i - 1 | 0; - if(0 === i) break; - var i = _R_; - } - } - return r[1]; - /*<>*/ } - function exists(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ if - ( /*<>*/ caml_call1(p, a[1 + i])) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function for_all(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 1; - /*<>*/ if - (! /*<>*/ caml_call1(p, a[1 + i])) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - 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); - var i = 0; - /*<>*/ for(;;){ - if(i === n1) /*<>*/ return 1; - /*<>*/ if - (! /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - 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); - var i = 0; - /*<>*/ for(;;){ - if(i === n1) /*<>*/ return 0; - /*<>*/ if - ( /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function mem(x, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ if - (0 === /*<>*/ runtime.caml_compare(a[1 + i], x)) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function memq(x, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - if(x === a[1 + i]) /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function find_opt(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ /*<>*/ var x = a[1 + i]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ return [0, x]; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function find_map(f, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ /*<>*/ var - r = /*<>*/ caml_call1(f, a[1 + i]); - if(r) /*<>*/ return r; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function split(x){ - /*<>*/ if - ( /*<>*/ runtime.caml_equal(x, [0])) - /*<>*/ return [0, [0], [0]]; - /*<>*/ var - match = x[1], - b0 = match[2], - a0 = match[1], - /*<>*/ n = x.length - 1, - /*<>*/ a = - /*<>*/ caml_make_vect(n, a0), - /*<>*/ b = - /*<>*/ caml_make_vect(n, b0), - /*<>*/ _O_ = n - 1 | 0, - /*<>*/ _N_ = 1; - if(_O_ >= 1){ - var i = _N_; - for(;;){ - var match$0 = x[1 + i], bi = match$0[2], ai = match$0[1]; - /*<>*/ a[1 + i] = ai; - /*<>*/ b[1 + i] = bi; - /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ === i) break; - var i = _P_; - } - } - /*<>*/ return [0, a, b]; - /*<>*/ } - function combine(a, b){ - /*<>*/ var - na = a.length - 1, - /*<>*/ nb = b.length - 1; - if(na !== nb) - /*<>*/ /*<>*/ caml_call1 - (Stdlib[1], cst_Array_combine); - if(0 === na) /*<>*/ return [0]; - /*<>*/ var - /*<>*/ x = - /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), - /*<>*/ _L_ = na - 1 | 0, - /*<>*/ _K_ = 1; - if(_L_ >= 1){ - var i = _K_; - for(;;){ - x[1 + i] = [0, a[1 + i], b[1 + i]]; - /*<>*/ /*<>*/ var _M_ = i + 1 | 0; - if(_L_ === i) break; - var i = _M_; - } - } - /*<>*/ return x; - /*<>*/ } - /*<>*/ /*<>*/ var - Bottom = [248, cst_Stdlib_Array_Bottom, runtime.caml_fresh_oo_id(0)]; - function sort(cmp, a){ - function maxson(l, i){ - /*<>*/ var - i31 = ((i + i | 0) + i | 0) + 1 | 0, - /*<>*/ x = [0, i31]; - if((i31 + 2 | 0) < l){ - /*<>*/ var - /*<>*/ _D_ = i31 + 1 | 0, - /*<>*/ _E_ = caml_check_bound(a, _D_)[1 + _D_]; - if - ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _E_) - < 0) - x[1] = i31 + 1 | 0; - /*<>*/ var - /*<>*/ _F_ = i31 + 2 | 0, - /*<>*/ _G_ = caml_check_bound(a, _F_)[1 + _F_], - _H_ = x[1]; - if - ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, _H_)[1 + _H_], _G_) - < 0) - x[1] = i31 + 2 | 0; - return x[1]; - } - if((i31 + 1 | 0) < l){ - /*<>*/ var - _I_ = i31 + 1 | 0, - /*<>*/ _J_ = caml_check_bound(a, _I_)[1 + _I_]; - /*<>*/ if - (0 - > - /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _J_)) - /*<>*/ return i31 + 1 | 0; - } - if(i31 < l) /*<>*/ return i31; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Bottom, i], 1); - /*<>*/ } - var l = a.length - 1, _x_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_x_ >= 0){ - var i$6 = _x_; - for(;;){ - /*<>*/ /*<>*/ var - e$1 = caml_check_bound(a, i$6)[1 + i$6]; - /*<>*/ try{ - var i = i$6; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - j = maxson(l, i); - /*<>*/ if - (0 - >= - /*<>*/ caml_call2 - (cmp, caml_check_bound(a, j)[1 + j], e$1)){ - /*<>*/ caml_check_bound(a, i)[1 + i] = e$1; - break; - } - /*<>*/ /*<>*/ var - _u_ = caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; - var i = j; - } - } - catch(exn$0){ - var exn = caml_wrap_exception(exn$0); - if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); - var i$0 = exn[2]; - /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; - } - /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; - if(0 === i$6) break; - var i$6 = _C_; - } - } - /*<>*/ /*<>*/ var _y_ = l - 1 | 0; - if(_y_ >= 2){ - var i$4 = _y_; - a: - for(;;){ - /*<>*/ /*<>*/ var - e$0 = caml_check_bound(a, i$4)[1 + i$4]; - /*<>*/ a[1 + i$4] = caml_check_bound(a, 0)[1]; - var i$5 = 0; - /*<>*/ try{ - var i$1 = i$5; - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ j$0 = maxson(i$4, i$1), - /*<>*/ _v_ = caml_check_bound(a, j$0)[1 + j$0]; - /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _v_; - var i$1 = j$0; - } - } - catch(exn){ - var exn$0 = caml_wrap_exception(exn); - if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); - var i$2 = exn$0[2], i$3 = i$2; - /*<>*/ for(;;){ - var father = (i$3 - 1 | 0) / 3 | 0; - if(i$3 === father) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - /*<>*/ if - (0 - <= - /*<>*/ caml_call2 - (cmp, caml_check_bound(a, father)[1 + father], e$0)) - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; - else{ - /*<>*/ /*<>*/ var - _w_ = caml_check_bound(a, father)[1 + father]; - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _w_; - if(0 < father){var i$3 = father; continue;} - /*<>*/ caml_check_bound(a, 0)[1] = e$0; - } - /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; - if(2 === i$4) break a; - var i$4 = _B_; - break; - } - } - } - } - var _z_ = 1 < l ? 1 : 0; - if(_z_){ - /*<>*/ /*<>*/ var - e = caml_check_bound(a, 1)[2]; - /*<>*/ a[2] = caml_check_bound(a, 0)[1]; - /*<>*/ a[1] = e; - var _A_ = 0; - } - else - var _A_ = _z_; - /*<>*/ return _A_; - /*<>*/ } - function stable_sort(cmp, a){ - function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ - /*<>*/ var - src1r = src1ofs + src1len | 0, - src2r = src2ofs + src2len | 0, - /*<>*/ s2$1 = - caml_check_bound(src2, src2ofs)[1 + src2ofs], - /*<>*/ s1$1 = - caml_check_bound(a, src1ofs)[1 + src1ofs], - i1 = src1ofs, - s1 = s1$1, - i2 = src2ofs, - s2 = s2$1, - d = dstofs; - /*<>*/ for(;;) - /*<>*/ if - (0 < /*<>*/ caml_call2(cmp, s1, s2)){ - /*<>*/ caml_check_bound(dst, d)[1 + d] = s2; - /*<>*/ /*<>*/ var i2$0 = i2 + 1 | 0; - if(i2$0 >= src2r) return blit(a, i1, dst, d + 1 | 0, src1r - i1 | 0); - /*<>*/ var - /*<>*/ d$0 = d + 1 | 0, - /*<>*/ s2$0 = caml_check_bound(src2, i2$0)[1 + i2$0], - i2 = i2$0, - s2 = s2$0, - d = d$0; - } - else{ - /*<>*/ caml_check_bound(dst, d)[1 + d] = s1; - /*<>*/ /*<>*/ var i1$0 = i1 + 1 | 0; - if(i1$0 >= src1r) - return blit(src2, i2, dst, d + 1 | 0, src2r - i2 | 0); - /*<>*/ var - /*<>*/ d$1 = d + 1 | 0, - /*<>*/ s1$0 = caml_check_bound(a, i1$0)[1 + i1$0], - i1 = i1$0, - s1 = s1$0, - d = d$1; - } - /*<>*/ } - function isortto(srcofs, dst, dstofs, len){ - /*<>*/ var - _m_ = len - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var i = _l_; - a: - for(;;){ - /*<>*/ var - _n_ = srcofs + i | 0, - /*<>*/ e = caml_check_bound(a, _n_)[1 + _n_], - /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; - for(;;){ - if(dstofs <= j[1]){ - var _o_ = j[1]; - /*<>*/ if - (0 - < - /*<>*/ caml_call2 - (cmp, caml_check_bound(dst, _o_)[1 + _o_], e)){ - /*<>*/ var - _p_ = j[1], - /*<>*/ _q_ = caml_check_bound(dst, _p_)[1 + _p_], - _r_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _r_)[1 + _r_] = _q_; - j[1] += -1; - continue; - } - } - var _s_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; - /*<>*/ /*<>*/ var _t_ = i + 1 | 0; - if(_m_ === i) break a; - var i = _t_; - break; - } - } - } - return 0; - /*<>*/ } - function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5) - /*<>*/ return isortto(srcofs, dst, dstofs, len); - var l1 = len / 2 | 0, l2 = len - l1 | 0; - /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); - /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ return merge - (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ } - var l = a.length - 1; - if(l <= 5) /*<>*/ return isortto(0, a, 0, l); - /*<>*/ var - l1 = l / 2 | 0, - l2 = l - l1 | 0, - /*<>*/ t = - /*<>*/ caml_make_vect(l2, caml_check_bound(a, 0)[1]); - /*<>*/ sortto(l1, t, 0, l2); - /*<>*/ sortto(0, a, l2, l1); - /*<>*/ return merge(l2, l1, t, 0, l2, a, 0); - /*<>*/ } - function to_seq(a){ - function aux(i, param){ - /*<>*/ if(i >= a.length - 1) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = a[1 + i], - /*<>*/ _j_ = i + 1 | 0; - /*<>*/ return [0, - x, - function(_k_){ /*<>*/ return aux(_j_, _k_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _h_ = 0; - /*<>*/ return function(_i_){ - /*<>*/ return aux(_h_, _i_);}; - /*<>*/ } - function to_seqi(a){ - function aux(i, param){ - /*<>*/ if(i >= a.length - 1) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = a[1 + i], - /*<>*/ _f_ = i + 1 | 0; - /*<>*/ return [0, - [0, i, x], - function(_g_){ /*<>*/ return aux(_f_, _g_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _d_ = 0; - /*<>*/ return function(_e_){ - /*<>*/ return aux(_d_, _e_);}; - /*<>*/ } - function of_seq(i$2){ - /*<>*/ var _b_ = 0; - function _c_(acc, x){ - /*<>*/ return [0, x, acc]; - /*<>*/ } - /*<>*/ /*<>*/ var - l = /*<>*/ caml_call3(Stdlib_Seq[5], _c_, _b_, i$2); - if(! l) /*<>*/ return [0]; - /*<>*/ var - tl = l[2], - hd = l[1], - /*<>*/ len = list_length(0, l), - /*<>*/ a = - /*<>*/ caml_make_vect(len, hd), - /*<>*/ i$1 = len - 2 | 0, - i = i$1, - param = tl; - for(;;){ - if(! param) /*<>*/ return a; - var tl$0 = param[2], hd$0 = param[1]; - /*<>*/ a[1 + i] = hd$0; - /*<>*/ var - /*<>*/ i$0 = i - 1 | 0, - i = i$0, - param = tl$0; - } - /*<>*/ } - var - Stdlib_Array = - [0, - init, - make_matrix, - append, - runtime.caml_array_concat, - sub, - copy, - fill, - blit, - to_list, - of_list, - iter, - iteri, - map, - mapi, - fold_left, - fold_left_map, - fold_right, - iter2, - map2, - for_all, - exists, - for_all2, - exists2, - mem, - memq, - find_opt, - find_map, - split, - combine, - sort, - stable_sort, - stable_sort, - to_seq, - to_seqi, - of_seq, - Floatarray]; - runtime.caml_register_global(14, Stdlib_Array, "Stdlib__Array"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Float -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Seq -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_Float_array_blit$1 = "Float.array.blit", - cst_float_ml = "float.ml", - caml_array_get = runtime.caml_array_get, - caml_array_set = runtime.caml_array_set, - caml_float_compare = runtime.caml_float_compare, - caml_floatarray_blit = runtime.caml_floatarray_blit, - caml_floatarray_create = runtime.caml_floatarray_create, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_nextafter_float = runtime.caml_nextafter_float, - caml_signbit_float = runtime.caml_signbit_float, - 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) - : 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, - Stdlib_List = global_data.Stdlib__List, - Assert_failure = global_data.Assert_failure, - Stdlib = global_data.Stdlib, - infinity = Stdlib[22], - neg_infinity = Stdlib[23], - nan = Stdlib[24], - _b_ = [0, cst_float_ml, 395, 6], - cst_Float_Array_map2_arrays_mu = - "Float.Array.map2: arrays must have the same length", - cst_Float_Array_iter2_arrays_m = - "Float.Array.iter2: arrays must have the same length", - cst_Float_array_blit = cst_Float_array_blit$1, - cst_Float_array_blit$0 = cst_Float_array_blit$1, - cst_Float_Array_fill = "Float.Array.fill", - cst_Float_Array_sub = "Float.Array.sub", - _a_ = [0, cst_float_ml, 222, 14], - cst_Float_Array_concat = "Float.Array.concat", - cst_Float_Array_init = "Float.Array.init", - cst_Stdlib_Float_Array_Bottom = "Stdlib.Float.Array.Bottom", - zero = 0., - one = 1., - minus_one = -1.; - function is_finite(x){ - /*<>*/ return x - x == 0. ? 1 : 0; - /*<>*/ } - function is_infinite(x){ - /*<>*/ return 1. / x == 0. ? 1 : 0; - /*<>*/ } - function is_nan(x){ - /*<>*/ return x != x ? 1 : 0; - /*<>*/ } - var - max_float = Stdlib[25], - min_float = Stdlib[26], - epsilon = Stdlib[27], - of_string_opt = Stdlib[36], - to_string = Stdlib[35], - pi = 3.141592653589793; - function is_integer(x){ - /*<>*/ var - _aq_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; - return _aq_ ? is_finite(x) : _aq_; - /*<>*/ } - function succ(x){ - /*<>*/ return /*<>*/ caml_nextafter_float - (x, infinity); - /*<>*/ } - function pred(x){ - /*<>*/ return /*<>*/ caml_nextafter_float - (x, neg_infinity); - /*<>*/ } - function equal(x, y){ - /*<>*/ return 0 === caml_float_compare(x, y) ? 1 : 0; - /*<>*/ } - function min(x, y){ - /*<>*/ a: - if(! (x < y)){ - /*<>*/ if - (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) - break a; - /*<>*/ return x != x ? x : y; - } - /*<>*/ return y != y ? y : x; - /*<>*/ } - function max(x, y){ - /*<>*/ a: - if(! (x < y)){ - /*<>*/ if - (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) - break a; - /*<>*/ return y != y ? y : x; - } - /*<>*/ return x != x ? x : y; - /*<>*/ } - function min_max(x, y){ - /*<>*/ if(x == x && y == y){ - a: - if(! (x < y)){ - /*<>*/ if - (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) - break a; - /*<>*/ return [0, y, x]; - } - /*<>*/ return [0, x, y]; - } - /*<>*/ return [0, nan, nan]; - /*<>*/ } - function min_num(x, y){ - /*<>*/ a: - if(! (x < y)){ - /*<>*/ if - (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) - break a; - /*<>*/ return y != y ? x : y; - } - /*<>*/ return x != x ? y : x; - /*<>*/ } - function max_num(x, y){ - /*<>*/ a: - if(! (x < y)){ - /*<>*/ if - (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) - break a; - /*<>*/ return x != x ? y : x; - } - /*<>*/ return y != y ? x : y; - /*<>*/ } - function min_max_num(x, y){ - /*<>*/ if(x != x) - /*<>*/ return [0, y, y]; - /*<>*/ if(y != y) - /*<>*/ return [0, x, x]; - a: - if(! (x < y)){ - /*<>*/ if - (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) - break a; - /*<>*/ return [0, y, x]; - } - /*<>*/ return [0, x, y]; - /*<>*/ } - function hash(x){ - /*<>*/ return /*<>*/ runtime.caml_hash - (10, 100, 0, x); - /*<>*/ } - function unsafe_fill(a, ofs, len, v){ - /*<>*/ var _ao_ = (ofs + len | 0) - 1 | 0; - if(_ao_ >= ofs){ - var i = ofs; - for(;;){ - /*<>*/ a[1 + i] = v; - /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; - if(_ao_ === i) break; - var i = _ap_; - } - } - return 0; - /*<>*/ } - function check(a, ofs, len, msg){ - /*<>*/ var _ak_ = ofs < 0 ? 1 : 0; - if(_ak_) - var _al_ = _ak_; - else{ - var _am_ = len < 0 ? 1 : 0; - if(_am_) - var _al_ = _am_; - else - var - _an_ = (ofs + len | 0) < 0 ? 1 : 0, - _al_ = _an_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); - } - return _al_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _al_; - /*<>*/ } - function make(n, v){ - /*<>*/ /*<>*/ var - result = /*<>*/ caml_floatarray_create(n); - /*<>*/ unsafe_fill(result, 0, n, v); - /*<>*/ return result; - /*<>*/ } - function init(l, f){ - /*<>*/ if(0 > l) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Float_Array_init); - /*<>*/ var - /*<>*/ res = - /*<>*/ caml_floatarray_create(l), - /*<>*/ _ai_ = l - 1 | 0, - /*<>*/ _ah_ = 0; - if(_ai_ >= 0){ - var i = _ah_; - for(;;){ - /*<>*/ res[1 + i] = - /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; - if(_ai_ === i) break; - var i = _aj_; - } - } - /*<>*/ return res; - /*<>*/ } - function append(a1, a2){ - /*<>*/ var - l1 = a1.length - 1, - /*<>*/ l2 = a2.length - 1, - /*<>*/ result = - /*<>*/ caml_floatarray_create(l1 + l2 | 0); - /*<>*/ /*<>*/ caml_floatarray_blit - (a1, 0, result, 0, l1); - /*<>*/ /*<>*/ caml_floatarray_blit - (a2, 0, result, l1, l2); - /*<>*/ return result; - /*<>*/ } - function concat(l){ - /*<>*/ var acc = 0, param = l; - for(;;) - if(param) - var - tl = param[2], - hd = param[1], - x = hd.length - 1 + acc | 0, - acc$0 = - acc <= x - ? x - : /*<>*/ caml_call1 - (Stdlib[1], cst_Float_Array_concat), - acc = acc$0, - param = tl; - else{ - /*<>*/ var - /*<>*/ result = - /*<>*/ caml_floatarray_create(acc), - l$0 = l, - i = 0; - /*<>*/ for(;;){ - if(! l$0){ - if(i === acc) /*<>*/ return result; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - } - /*<>*/ var - tl$0 = l$0[2], - hd$0 = l$0[1], - /*<>*/ hlen = hd$0.length - 1; - /*<>*/ /*<>*/ caml_floatarray_blit - (hd$0, 0, result, i, hlen); - var i$0 = i + hlen | 0, l$0 = tl$0, i = i$0; - } - } - /*<>*/ } - function sub(a, ofs, len){ - /*<>*/ check(a, ofs, len, cst_Float_Array_sub); - /*<>*/ /*<>*/ var - result = /*<>*/ caml_floatarray_create(len); - /*<>*/ /*<>*/ caml_floatarray_blit - (a, ofs, result, 0, len); - /*<>*/ return result; - /*<>*/ } - function copy(a){ - /*<>*/ var - l = a.length - 1, - /*<>*/ result = - /*<>*/ caml_floatarray_create(l); - /*<>*/ /*<>*/ caml_floatarray_blit - (a, 0, result, 0, l); - /*<>*/ return result; - /*<>*/ } - function fill(a, ofs, len, v){ - /*<>*/ check(a, ofs, len, cst_Float_Array_fill); - /*<>*/ return unsafe_fill(a, ofs, len, v); - /*<>*/ } - function blit(src, sofs, dst, dofs, len){ - /*<>*/ check(src, sofs, len, cst_Float_array_blit); - /*<>*/ check(dst, dofs, len, cst_Float_array_blit$0); - /*<>*/ return /*<>*/ caml_floatarray_blit - (src, sofs, dst, dofs, len); - /*<>*/ } - function to_list(a){ - /*<>*/ function _af_(_ag_){ - /*<>*/ return a[1 + _ag_]; - } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[10], a.length - 1, _af_); - /*<>*/ } - function of_list(l){ - /*<>*/ var - /*<>*/ result = - /*<>*/ caml_floatarray_create - ( /*<>*/ caml_call1(Stdlib_List[1], l)), - i = 0, - l$0 = l; - /*<>*/ for(;;){ - if(! l$0) /*<>*/ return result; - var t = l$0[2], h = l$0[1]; - /*<>*/ result[1 + i] = h; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0, - l$0 = t; - } - /*<>*/ } - function iter(f, a){ - /*<>*/ var - _ad_ = a.length - 1 - 1 | 0, - /*<>*/ _ac_ = 0; - if(_ad_ >= 0){ - var i = _ac_; - for(;;){ - /*<>*/ /*<>*/ caml_call1 - (f, a[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ === i) break; - var i = _ae_; - } - } - return 0; - /*<>*/ } - function iter2(f, a, b){ - /*<>*/ if(a.length - 1 !== b.length - 1) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Float_Array_iter2_arrays_m); - /*<>*/ var - _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i = _$_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ === i) break; - var i = _ab_; - } - } - return 0; - /*<>*/ } - function map(f, a){ - /*<>*/ var - l = a.length - 1, - /*<>*/ r = - /*<>*/ caml_floatarray_create(l), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 0; - if(_Z_ >= 0){ - var i = _Y_; - for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ === i) break; - var i = ___; - } - } - /*<>*/ return r; - /*<>*/ } - function map2(f, a, b){ - /*<>*/ var - la = a.length - 1, - /*<>*/ lb = b.length - 1; - if(la !== lb) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Float_Array_map2_arrays_mu); - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_floatarray_create(la), - /*<>*/ _W_ = la - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; - for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ === i) break; - var i = _X_; - } - } - /*<>*/ return r; - /*<>*/ } - function iteri(f, a){ - /*<>*/ var - _T_ = a.length - 1 - 1 | 0, - /*<>*/ _S_ = 0; - if(_T_ >= 0){ - var i = _S_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ === i) break; - var i = _U_; - } - } - return 0; - /*<>*/ } - function mapi(f, a){ - /*<>*/ var - l = a.length - 1, - /*<>*/ r = - /*<>*/ caml_floatarray_create(l), - /*<>*/ _Q_ = l - 1 | 0, - /*<>*/ _P_ = 0; - if(_Q_ >= 0){ - var i = _P_; - for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _R_ = i + 1 | 0; - if(_Q_ === i) break; - var i = _R_; - } - } - /*<>*/ return r; - /*<>*/ } - function fold_left(f, x, a){ - /*<>*/ var - /*<>*/ r = [0, x], - _N_ = a.length - 1 - 1 | 0, - /*<>*/ _M_ = 0; - if(_N_ >= 0){ - var i = _M_; - for(;;){ - r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _O_ = i + 1 | 0; - if(_N_ === i) break; - var i = _O_; - } - } - return r[1]; - /*<>*/ } - function fold_right(f, a, x){ - /*<>*/ var - /*<>*/ r = [0, x], - /*<>*/ _K_ = a.length - 1 - 1 | 0; - if(_K_ >= 0){ - var i = _K_; - for(;;){ - r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _L_ = i - 1 | 0; - if(0 === i) break; - var i = _L_; - } - } - return r[1]; - /*<>*/ } - function exists(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ if - ( /*<>*/ caml_call1(p, a[1 + i])) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function for_all(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 1; - /*<>*/ if - (! /*<>*/ caml_call1(p, a[1 + i])) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function mem(x, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - if(0 === /*<>*/ caml_float_compare(a[1 + i], x)) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function mem_ieee(x, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - if(x == a[1 + i]) /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - /*<>*/ /*<>*/ var - Bottom = [248, cst_Stdlib_Float_Array_Bottom, runtime.caml_fresh_oo_id(0)]; - function sort(cmp, a){ - function maxson(l, i){ - /*<>*/ var - i31 = ((i + i | 0) + i | 0) + 1 | 0, - /*<>*/ x = [0, i31]; - if((i31 + 2 | 0) < l){ - if - ( /*<>*/ caml_call2 - (cmp, - /*<>*/ caml_array_get(a, i31), - /*<>*/ caml_array_get(a, i31 + 1 | 0)) - < 0) - x[1] = i31 + 1 | 0; - if - ( /*<>*/ caml_call2 - (cmp, - /*<>*/ caml_array_get(a, x[1]), - /*<>*/ caml_array_get(a, i31 + 2 | 0)) - < 0) - x[1] = i31 + 2 | 0; - return x[1]; - } - /*<>*/ if - ((i31 + 1 | 0) < l - && - 0 - > - /*<>*/ caml_call2 - (cmp, - /*<>*/ caml_array_get(a, i31), - /*<>*/ caml_array_get(a, i31 + 1 | 0))) - /*<>*/ return i31 + 1 | 0; - if(i31 < l) /*<>*/ return i31; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Bottom, i], 1); - /*<>*/ } - var l = a.length - 1, _E_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_E_ >= 0){ - var i$6 = _E_; - for(;;){ - /*<>*/ /*<>*/ var - e$1 = /*<>*/ caml_array_get(a, i$6); - /*<>*/ try{ - var i = i$6; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - j = maxson(l, i); - /*<>*/ if - (0 - >= - /*<>*/ caml_call2 - (cmp, /*<>*/ caml_array_get(a, j), e$1)){ - /*<>*/ /*<>*/ caml_array_set - (a, i, e$1); - break; - } - /*<>*/ /*<>*/ caml_array_set - (a, i, /*<>*/ caml_array_get(a, j)); - var i = j; - } - } - catch(exn$0){ - var exn = caml_wrap_exception(exn$0); - if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); - var i$0 = exn[2]; - /*<>*/ /*<>*/ caml_array_set - (a, i$0, e$1); - } - /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; - if(0 === i$6) break; - var i$6 = _J_; - } - } - /*<>*/ /*<>*/ var _F_ = l - 1 | 0; - if(_F_ >= 2){ - var i$4 = _F_; - a: - for(;;){ - /*<>*/ /*<>*/ var - e$0 = /*<>*/ caml_array_get(a, i$4); - /*<>*/ /*<>*/ caml_array_set - (a, i$4, /*<>*/ caml_array_get(a, 0)); - var i$5 = 0; - /*<>*/ try{ - var i$1 = i$5; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - j$0 = maxson(i$4, i$1); - /*<>*/ /*<>*/ caml_array_set - (a, i$1, /*<>*/ caml_array_get(a, j$0)); - var i$1 = j$0; - } - } - catch(exn){ - var exn$0 = caml_wrap_exception(exn); - if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); - var i$2 = exn$0[2], i$3 = i$2; - /*<>*/ for(;;){ - var father = (i$3 - 1 | 0) / 3 | 0; - if(i$3 === father) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); - /*<>*/ if - (0 - <= - /*<>*/ caml_call2 - (cmp, /*<>*/ caml_array_get(a, father), e$0)) - /*<>*/ /*<>*/ caml_array_set - (a, i$3, e$0); - else{ - /*<>*/ /*<>*/ caml_array_set - (a, i$3, /*<>*/ caml_array_get(a, father)); - if(0 < father){var i$3 = father; continue;} - /*<>*/ /*<>*/ caml_array_set - (a, 0, e$0); - } - /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; - if(2 === i$4) break a; - var i$4 = _I_; - break; - } - } - } - } - var _G_ = 1 < l ? 1 : 0; - if(_G_){ - /*<>*/ /*<>*/ var - e = /*<>*/ caml_array_get(a, 1); - /*<>*/ /*<>*/ caml_array_set - (a, 1, /*<>*/ caml_array_get(a, 0)); - var _H_ = /*<>*/ caml_array_set(a, 0, e); - } - else - var _H_ = _G_; - /*<>*/ return _H_; - /*<>*/ } - function stable_sort(cmp, a){ - function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ - /*<>*/ var - src1r = src1ofs + src1len | 0, - src2r = src2ofs + src2len | 0, - /*<>*/ s2$1 = - /*<>*/ caml_array_get(src2, src2ofs), - /*<>*/ s1$1 = - /*<>*/ caml_array_get(a, src1ofs), - i1 = src1ofs, - s1 = s1$1, - i2 = src2ofs, - s2 = s2$1, - d = dstofs; - /*<>*/ for(;;) - /*<>*/ if - (0 < /*<>*/ caml_call2(cmp, s1, s2)){ - /*<>*/ /*<>*/ caml_array_set - (dst, d, s2); - /*<>*/ /*<>*/ var - i2$0 = i2 + 1 | 0; - if(i2$0 >= src2r) return blit(a, i1, dst, d + 1 | 0, src1r - i1 | 0); - /*<>*/ var - /*<>*/ d$0 = d + 1 | 0, - /*<>*/ s2$0 = - /*<>*/ caml_array_get(src2, i2$0), - i2 = i2$0, - s2 = s2$0, - d = d$0; - } - else{ - /*<>*/ /*<>*/ caml_array_set - (dst, d, s1); - /*<>*/ /*<>*/ var - i1$0 = i1 + 1 | 0; - if(i1$0 >= src1r) - return blit(src2, i2, dst, d + 1 | 0, src2r - i2 | 0); - /*<>*/ var - /*<>*/ d$1 = d + 1 | 0, - /*<>*/ s1$0 = - /*<>*/ caml_array_get(a, i1$0), - i1 = i1$0, - s1 = s1$0, - d = d$1; - } - /*<>*/ } - function isortto(srcofs, dst, dstofs, len){ - /*<>*/ var - _C_ = len - 1 | 0, - /*<>*/ _B_ = 0; - if(_C_ >= 0){ - var i = _B_; - a: - for(;;){ - /*<>*/ var - /*<>*/ e = - /*<>*/ caml_array_get(a, srcofs + i | 0), - /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; - for(;;){ - /*<>*/ if - (dstofs <= j[1] - && - 0 - < - /*<>*/ caml_call2 - (cmp, /*<>*/ caml_array_get(dst, j[1]), e)){ - /*<>*/ /*<>*/ caml_array_set - (dst, - j[1] + 1 | 0, - /*<>*/ caml_array_get(dst, j[1])); - j[1] += -1; - continue; - } - /*<>*/ /*<>*/ caml_array_set - (dst, j[1] + 1 | 0, e); - /*<>*/ /*<>*/ var _D_ = i + 1 | 0; - if(_C_ === i) break a; - var i = _D_; - break; - } - } - } - return 0; - /*<>*/ } - function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5) - /*<>*/ return isortto(srcofs, dst, dstofs, len); - var l1 = len / 2 | 0, l2 = len - l1 | 0; - /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); - /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ return merge - (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ } - var l = a.length - 1; - if(l <= 5) /*<>*/ return isortto(0, a, 0, l); - /*<>*/ var - l1 = l / 2 | 0, - l2 = l - l1 | 0, - /*<>*/ t = - /*<>*/ caml_floatarray_create(l2); - /*<>*/ sortto(l1, t, 0, l2); - /*<>*/ sortto(0, a, l2, l1); - /*<>*/ return merge(l2, l1, t, 0, l2, a, 0); - /*<>*/ } - function to_seq(a){ - function aux(i, param){ - /*<>*/ if(i >= a.length - 1) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = a[1 + i], - /*<>*/ _z_ = i + 1 | 0; - /*<>*/ return [0, - x, - function(_A_){ /*<>*/ return aux(_z_, _A_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ return function(_y_){ - /*<>*/ return aux(_x_, _y_);}; - /*<>*/ } - function to_seqi(a){ - function aux(i, param){ - /*<>*/ if(i >= a.length - 1) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = a[1 + i], - /*<>*/ _v_ = i + 1 | 0; - /*<>*/ return [0, - [0, i, x], - function(_w_){ /*<>*/ return aux(_v_, _w_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _t_ = 0; - /*<>*/ return function(_u_){ - /*<>*/ return aux(_t_, _u_);}; - /*<>*/ } - function of_seq(i$2){ - /*<>*/ var _r_ = 0; - function _s_(acc, x){ - /*<>*/ return [0, x, acc]; - /*<>*/ } - /*<>*/ var - /*<>*/ l = - /*<>*/ caml_call3(Stdlib_Seq[5], _s_, _r_, i$2), - /*<>*/ len = - /*<>*/ caml_call1(Stdlib_List[1], l), - /*<>*/ a = - /*<>*/ caml_floatarray_create(len), - /*<>*/ i$1 = len - 1 | 0, - i = i$1, - param = l; - for(;;){ - if(! param) /*<>*/ return a; - var tl = param[2], hd = param[1]; - /*<>*/ a[1 + i] = hd; - /*<>*/ var - /*<>*/ i$0 = i - 1 | 0, - i = i$0, - param = tl; - } - /*<>*/ } - function map_to_array(f, a){ - /*<>*/ var l = a.length - 1; - /*<>*/ if(0 === l) /*<>*/ return [0]; - /*<>*/ var - /*<>*/ r = - /*<>*/ runtime.caml_make_vect - (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _p_ = l - 1 | 0, - /*<>*/ _o_ = 1; - if(_p_ >= 1){ - var i = _o_; - for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(_p_ === i) break; - var i = _q_; - } - } - /*<>*/ return r; - /*<>*/ } - function map_from_array(f, a){ - /*<>*/ var - l = a.length - 1, - /*<>*/ r = - /*<>*/ caml_floatarray_create(l), - /*<>*/ _m_ = l - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var i = _l_; - for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _n_ = i + 1 | 0; - if(_m_ === i) break; - var i = _n_; - } - } - /*<>*/ return r; - /*<>*/ } - var - _c_ = caml_floatarray_create, - _d_ = caml_array_set, - _e_ = caml_array_get, - _f_ = - [0, - function(_k_){ /*<>*/ return _k_.length - 1;}, - _e_, - _d_, - make, - _c_, - init, - append, - concat, - sub, - copy, - fill, - blit, - to_list, - of_list, - iter, - iteri, - map, - mapi, - fold_left, - fold_right, - iter2, - map2, - for_all, - exists, - mem, - mem_ieee, - sort, - stable_sort, - stable_sort, - to_seq, - to_seqi, - of_seq, - map_to_array, - map_from_array], - _g_ = caml_floatarray_create, - _h_ = caml_array_set, - _i_ = caml_array_get, - Stdlib_Float = - [0, - zero, - one, - minus_one, - succ, - pred, - infinity, - neg_infinity, - nan, - pi, - max_float, - min_float, - epsilon, - is_finite, - is_infinite, - is_nan, - is_integer, - of_string_opt, - to_string, - caml_float_compare, - equal, - min, - max, - min_max, - min_num, - max_num, - min_max_num, - hash, - [0, - function(_j_){ /*<>*/ return _j_.length - 1;}, - _i_, - _h_, - make, - _g_, - init, - append, - concat, - sub, - copy, - fill, - blit, - to_list, - of_list, - iter, - iteri, - map, - mapi, - fold_left, - fold_right, - iter2, - map2, - for_all, - exists, - mem, - mem_ieee, - sort, - stable_sort, - stable_sort, - to_seq, - to_seqi, - of_seq, - map_to_array, - map_from_array], - _f_]; - runtime.caml_register_global(22, Stdlib_Float, "Stdlib__Float"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Int32 -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_greaterequal = runtime.caml_greaterequal, - caml_int_compare = runtime.caml_int_compare, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_mul = runtime.caml_mul, - caml_wrap_exception = runtime.caml_wrap_exception, - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Stdlib_Sys = global_data.Stdlib__Sys, - Assert_failure = global_data.Assert_failure, - _b_ = [0, "int32.ml", 69, 6], - zero = 0, - one = 1, - minus_one = -1; - 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; - /*<>*/ } - var min_int = -2147483648, max_int = 2147483647; - function lognot(n){ - /*<>*/ return n ^ -1; - /*<>*/ } - var _a_ = Stdlib_Sys[9]; - if(32 === _a_) - /*<>*/ var - /*<>*/ max_int$0 = Stdlib[19], - unsigned_to_int = - function(n){ - /*<>*/ if - (0 >= /*<>*/ caml_int_compare(0, n) - && 0 >= /*<>*/ caml_int_compare(n, max_int$0)) - /*<>*/ return [0, n]; - /*<>*/ return 0; - /*<>*/ }; - else{ - if(64 !== _a_) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); - var - unsigned_to_int = - function(n){ - /*<>*/ return [0, n & -1]; - /*<>*/ }; - } - function to_string(n){ - /*<>*/ return /*<>*/ runtime.caml_format_int - ("%d", n); - /*<>*/ } - function of_string_opt(s){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _d_ = [0, /*<>*/ runtime.caml_int_of_string(s)]; - /*<>*/ return _d_; - } - catch(_e_){ - var _c_ = caml_wrap_exception(_e_); - if(_c_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_c_, 0); - } - /*<>*/ } - var compare = caml_int_compare; - function equal(x, y){ - /*<>*/ return 0 - === /*<>*/ caml_int_compare(x, y) - ? 1 - : 0; - /*<>*/ } - function unsigned_compare(n, m){ - /*<>*/ return /*<>*/ caml_int_compare - (n + 2147483648 | 0, m + 2147483648 | 0); - /*<>*/ } - function min(x, y){ - /*<>*/ return /*<>*/ runtime.caml_lessequal - (x, y) - ? x - : y; - /*<>*/ } - function max(x, y){ - /*<>*/ return /*<>*/ caml_greaterequal - (x, y) - ? x - : y; - /*<>*/ } - function unsigned_div(n, d){ - /*<>*/ if - ( /*<>*/ runtime.caml_lessthan(d, 0)) - /*<>*/ return 0 <= unsigned_compare(n, d) ? one : zero; - /*<>*/ var - /*<>*/ q = - /*<>*/ runtime.caml_div(n >>> 1 | 0, d) << 1, - /*<>*/ r = - n - /*<>*/ caml_mul(q, d) | 0; - /*<>*/ return 0 <= unsigned_compare(r, d) ? q + 1 | 0 : q; - /*<>*/ } - function unsigned_rem(n, d){ - /*<>*/ return n - - /*<>*/ caml_mul(unsigned_div(n, d), d) - | 0; - /*<>*/ } - var - Stdlib_Int32 = - [0, - zero, - one, - minus_one, - unsigned_div, - unsigned_rem, - succ, - pred, - abs, - max_int, - min_int, - lognot, - unsigned_to_int, - of_string_opt, - to_string, - compare, - unsigned_compare, - equal, - min, - max]; - runtime.caml_register_global(14, Stdlib_Int32, "Stdlib__Int32"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Int64 -//# unitInfo: Requires: Stdlib -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_greaterequal = runtime.caml_greaterequal, - caml_int64_compare = runtime.caml_int64_compare, - caml_int64_mul = runtime.caml_int64_mul, - caml_int64_sub = runtime.caml_int64_sub, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_wrap_exception = runtime.caml_wrap_exception, - global_data = runtime.caml_get_global_data(), - zero = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), - one = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), - minus_one = runtime.caml_int64_create_lo_mi_hi(16777215, 16777215, 65535), - min_int = runtime.caml_int64_create_lo_mi_hi(0, 0, 32768), - max_int = runtime.caml_int64_create_lo_mi_hi(16777215, 16777215, 32767), - Stdlib = global_data.Stdlib, - _d_ = runtime.caml_int64_create_lo_mi_hi(16777215, 16777215, 65535), - _c_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), - _b_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), - _a_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0); - function succ(n){ - /*<>*/ return /*<>*/ runtime.caml_int64_add - (n, _a_); - /*<>*/ } - function pred(n){ - /*<>*/ return /*<>*/ caml_int64_sub - (n, _b_); - /*<>*/ } - function abs(n){ - /*<>*/ return /*<>*/ caml_greaterequal - (n, _c_) - ? n - : /*<>*/ runtime.caml_int64_neg(n); - /*<>*/ } - function lognot(n){ - /*<>*/ return /*<>*/ runtime.caml_int64_xor - (n, _d_); - /*<>*/ } - /*<>*/ /*<>*/ var - max_int$0 = - /*<>*/ runtime.caml_int64_of_int32(Stdlib[19]); - function unsigned_to_int(n){ - /*<>*/ if - (0 >= /*<>*/ caml_int64_compare(zero, n) - && 0 >= /*<>*/ caml_int64_compare(n, max_int$0)) - /*<>*/ return [0, runtime.caml_int64_to_int32(n)]; - /*<>*/ return 0; - /*<>*/ } - function to_string(n){ - /*<>*/ return /*<>*/ runtime.caml_int64_format - ("%d", n); - /*<>*/ } - function of_string_opt(s){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _f_ = [0, /*<>*/ runtime.caml_int64_of_string(s)]; - /*<>*/ return _f_; - } - catch(_g_){ - var _e_ = caml_wrap_exception(_g_); - if(_e_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_e_, 0); - } - /*<>*/ } - function compare(x, y){ - /*<>*/ return /*<>*/ caml_int64_compare - (x, y); - /*<>*/ } - function equal(x, y){ - /*<>*/ return 0 - === /*<>*/ caml_int64_compare(x, y) - ? 1 - : 0; - /*<>*/ } - function unsigned_compare(n, m){ - /*<>*/ return /*<>*/ caml_int64_compare - ( /*<>*/ caml_int64_sub(n, min_int), - /*<>*/ caml_int64_sub(m, min_int)); - /*<>*/ } - function min(x, y){ - /*<>*/ return /*<>*/ runtime.caml_lessequal - (x, y) - ? x - : y; - /*<>*/ } - function max(x, y){ - /*<>*/ return /*<>*/ caml_greaterequal - (x, y) - ? x - : y; - /*<>*/ } - function unsigned_div(n, d){ - /*<>*/ if - ( /*<>*/ runtime.caml_lessthan(d, zero)) - /*<>*/ return 0 <= unsigned_compare(n, d) ? one : zero; - /*<>*/ var - /*<>*/ q = - /*<>*/ runtime.caml_int64_shift_left - ( /*<>*/ runtime.caml_int64_div - ( /*<>*/ runtime.caml_int64_shift_right_unsigned - (n, 1), - d), - 1), - /*<>*/ r = - /*<>*/ caml_int64_sub - (n, /*<>*/ caml_int64_mul(q, d)); - /*<>*/ return 0 <= unsigned_compare(r, d) ? succ(q) : q; - /*<>*/ } - function unsigned_rem(n, d){ - /*<>*/ return /*<>*/ caml_int64_sub - (n, /*<>*/ caml_int64_mul(unsigned_div(n, d), d)); - /*<>*/ } - var - Stdlib_Int64 = - [0, - zero, - one, - minus_one, - unsigned_div, - unsigned_rem, - succ, - pred, - abs, - max_int, - min_int, - lognot, - unsigned_to_int, - of_string_opt, - to_string, - compare, - unsigned_compare, - equal, - min, - max]; - runtime.caml_register_global(11, Stdlib_Int64, "Stdlib__Int64"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Nativeint -//# unitInfo: Requires: Stdlib, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_greaterequal = runtime.caml_greaterequal, - caml_int_compare = runtime.caml_int_compare, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_mul = runtime.caml_mul, - caml_wrap_exception = runtime.caml_wrap_exception, - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Stdlib_Sys = global_data.Stdlib__Sys, - zero = 0, - one = 1, - minus_one = -1; - 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; - /*<>*/ } - /*<>*/ var - size = Stdlib_Sys[9], - /*<>*/ min_int = 1 << (size - 1 | 0), - /*<>*/ max_int = min_int - 1 | 0; - function lognot(n){ - /*<>*/ return n ^ -1; - /*<>*/ } - var max_int$0 = Stdlib[19]; - function unsigned_to_int(n){ - /*<>*/ if - (0 >= /*<>*/ caml_int_compare(0, n) - && 0 >= /*<>*/ caml_int_compare(n, max_int$0)) - /*<>*/ return [0, n]; - /*<>*/ return 0; - /*<>*/ } - function to_string(n){ - /*<>*/ return /*<>*/ runtime.caml_format_int - ("%d", n); - /*<>*/ } - function of_string_opt(s){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _b_ = [0, /*<>*/ runtime.caml_int_of_string(s)]; - /*<>*/ return _b_; - } - catch(_c_){ - var _a_ = caml_wrap_exception(_c_); - if(_a_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_a_, 0); - } - /*<>*/ } - var compare = caml_int_compare; - function equal(x, y){ - /*<>*/ return 0 - === /*<>*/ caml_int_compare(x, y) - ? 1 - : 0; - /*<>*/ } - function unsigned_compare(n, m){ - /*<>*/ return /*<>*/ caml_int_compare - (n - min_int | 0, m - min_int | 0); - /*<>*/ } - function min(x, y){ - /*<>*/ return /*<>*/ runtime.caml_lessequal - (x, y) - ? x - : y; - /*<>*/ } - function max(x, y){ - /*<>*/ return /*<>*/ caml_greaterequal - (x, y) - ? x - : y; - /*<>*/ } - function unsigned_div(n, d){ - /*<>*/ if - ( /*<>*/ runtime.caml_lessthan(d, 0)) - /*<>*/ return 0 <= unsigned_compare(n, d) - ? one - : zero; - /*<>*/ var - /*<>*/ q = - /*<>*/ runtime.caml_div(n >>> 1 | 0, d) << 1, - /*<>*/ r = - n - /*<>*/ caml_mul(q, d) | 0; - /*<>*/ return 0 <= unsigned_compare(r, d) - ? q + 1 | 0 - : q; - /*<>*/ } - function unsigned_rem(n, d){ - /*<>*/ return n - - /*<>*/ caml_mul(unsigned_div(n, d), d) - | 0; - /*<>*/ } - var - Stdlib_Nativeint = - [0, - zero, - one, - minus_one, - unsigned_div, - unsigned_rem, - succ, - pred, - abs, - size, - max_int, - min_int, - lognot, - unsigned_to_int, - of_string_opt, - to_string, - compare, - unsigned_compare, - equal, - min, - max]; - runtime.caml_register_global(12, Stdlib_Nativeint, "Stdlib__Nativeint"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Lexing -//# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Int, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst = "", - caml_bytes_get = runtime.caml_bytes_get, - 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], - zero_pos = [0, cst, 1, 0, 0], - Stdlib_Bytes = global_data.Stdlib__Bytes, - Stdlib = global_data.Stdlib, - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib_Int = global_data.Stdlib__Int, - cst_Lexing_lex_refill_cannot_g = "Lexing.lex_refill: cannot grow buffer"; - function engine(tbl, state, buf){ - /*<>*/ var - /*<>*/ result = - /*<>*/ runtime.caml_lex_engine(tbl, state, buf), - _F_ = 0 <= result ? 1 : 0, - _G_ = _F_ ? buf[12] !== dummy_pos ? 1 : 0 : _F_; - if(_G_){ - buf[11] = buf[12]; - var _H_ = buf[12]; - buf[12] = [0, _H_[1], _H_[2], _H_[3], buf[4] + buf[6] | 0]; - } - /*<>*/ return result; - /*<>*/ } - function new_engine(tbl, state, buf){ - /*<>*/ var - /*<>*/ result = - /*<>*/ runtime.caml_new_lex_engine(tbl, state, buf), - _C_ = 0 <= result ? 1 : 0, - _D_ = _C_ ? buf[12] !== dummy_pos ? 1 : 0 : _C_; - if(_D_){ - buf[11] = buf[12]; - var _E_ = buf[12]; - buf[12] = [0, _E_[1], _E_[2], _E_[3], buf[4] + buf[6] | 0]; - } - /*<>*/ return result; - /*<>*/ } - function from_function(opt, read_fun){ - /*<>*/ if(opt) - var sth = opt[1], with_positions = sth; - else - var with_positions = 1; - /*<>*/ var - /*<>*/ _o_ = with_positions ? zero_pos : dummy_pos, - _p_ = with_positions ? zero_pos : dummy_pos, - /*<>*/ aux_buffer = - /*<>*/ caml_create_bytes(512), - _q_ = [0], - /*<>*/ _r_ = 0, - _s_ = 0, - _t_ = 0, - _u_ = 0, - _v_ = 0, - _w_ = 0, - _x_ = 0, - /*<>*/ _y_ = - /*<>*/ caml_create_bytes(1024); - /*<>*/ return [0, - function(lexbuf){ - /*<>*/ var - /*<>*/ read = - /*<>*/ caml_call2 - (read_fun, aux_buffer, caml_ml_bytes_length(aux_buffer)), - /*<>*/ n = 0 < read ? read : (lexbuf[9] = 1, 0); - if(caml_ml_bytes_length(lexbuf[2]) < (lexbuf[3] + n | 0)){ - if - (((lexbuf[3] - lexbuf[5] | 0) + n | 0) - <= caml_ml_bytes_length(lexbuf[2])) - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Bytes[11], - lexbuf[2], - lexbuf[5], - lexbuf[2], - 0, - lexbuf[3] - lexbuf[5] | 0); - else{ - /*<>*/ /*<>*/ var - newlen = - /*<>*/ caml_call2 - (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); - /*<>*/ /*<>*/ var - newbuf = /*<>*/ caml_create_bytes(newlen); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Bytes[11], - lexbuf[2], - lexbuf[5], - newbuf, - 0, - lexbuf[3] - lexbuf[5] | 0); - lexbuf[2] = newbuf; - } - var s = lexbuf[5]; - lexbuf[4] = lexbuf[4] + s | 0; - lexbuf[6] = lexbuf[6] - s | 0; - lexbuf[5] = 0; - lexbuf[7] = lexbuf[7] - s | 0; - lexbuf[3] = lexbuf[3] - s | 0; - var t = lexbuf[10], _A_ = t.length - 1 - 1 | 0, _z_ = 0; - if(_A_ >= 0){ - var i = _z_; - for(;;){ - /*<>*/ /*<>*/ var - v = caml_check_bound(t, i)[1 + i]; - if(0 <= v) - /*<>*/ caml_check_bound(t, i)[1 + i] = v - s | 0; - /*<>*/ /*<>*/ var - _B_ = i + 1 | 0; - if(_A_ === i) break; - var i = _B_; - } - } - } - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Bytes[11], aux_buffer, 0, lexbuf[2], lexbuf[3], n); - lexbuf[3] = lexbuf[3] + n | 0; - return 0; - }, - _y_, - _x_, - _w_, - _v_, - _u_, - _t_, - _s_, - _r_, - _q_, - _p_, - _o_]; - /*<>*/ } - function from_channel(with_positions, ic){ - /*<>*/ return from_function - (with_positions, - function(buf, n){ - /*<>*/ return /*<>*/ caml_call4 - (Stdlib[84], ic, buf, 0, n); - /*<>*/ }); - /*<>*/ } - function from_string(opt, s){ - /*<>*/ if(opt) - var sth = opt[1], with_positions = sth; - else - var with_positions = 1; - /*<>*/ var - /*<>*/ _d_ = with_positions ? zero_pos : dummy_pos, - _e_ = with_positions ? zero_pos : dummy_pos, - _f_ = [0], - /*<>*/ _g_ = 1, - _h_ = 0, - _i_ = 0, - _j_ = 0, - _k_ = 0, - _l_ = 0, - _m_ = runtime.caml_ml_string_length(s), - /*<>*/ _n_ = - /*<>*/ caml_call1(Stdlib_Bytes[5], s); - /*<>*/ return [0, - function(lexbuf){ - /*<>*/ lexbuf[9] = 1; - return 0; - /*<>*/ }, - _n_, - _m_, - _l_, - _k_, - _j_, - _i_, - _h_, - _g_, - _f_, - _e_, - _d_]; - /*<>*/ } - function set_position(lexbuf, position){ - /*<>*/ lexbuf[12] = - [0, lexbuf[12][1], position[2], position[3], position[4]]; - lexbuf[4] = position[4]; - return 0; - /*<>*/ } - function set_filename(lexbuf, fname){ - /*<>*/ var _c_ = lexbuf[12]; - lexbuf[12] = [0, fname, _c_[2], _c_[3], _c_[4]]; - return 0; - /*<>*/ } - function with_positions(lexbuf){ - /*<>*/ return lexbuf[12] !== dummy_pos ? 1 : 0; - /*<>*/ } - function lexeme(lexbuf){ - /*<>*/ var len = lexbuf[6] - lexbuf[5] | 0; - /*<>*/ return /*<>*/ caml_call3 - (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); - /*<>*/ } - 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)]; - /*<>*/ } - function sub_lexeme_char(lexbuf, i){ - /*<>*/ return /*<>*/ caml_bytes_get - (lexbuf[2], i); - /*<>*/ } - function sub_lexeme_char_opt(lexbuf, i){ - /*<>*/ return 0 <= i - ? [0, /*<>*/ caml_bytes_get(lexbuf[2], i)] - : 0; - /*<>*/ } - function lexeme_char(lexbuf, i){ - /*<>*/ return /*<>*/ caml_bytes_get - (lexbuf[2], lexbuf[5] + i | 0); - /*<>*/ } - function lexeme_start(lexbuf){ - /*<>*/ return lexbuf[11][4]; - /*<>*/ } - function lexeme_end(lexbuf){ - /*<>*/ return lexbuf[12][4]; - /*<>*/ } - function lexeme_start_p(lexbuf){ - /*<>*/ return lexbuf[11]; - /*<>*/ } - function lexeme_end_p(lexbuf){ - /*<>*/ return lexbuf[12]; - /*<>*/ } - function new_line(lexbuf){ - /*<>*/ var - lcp = lexbuf[12], - _a_ = lcp !== dummy_pos ? 1 : 0, - _b_ = - _a_ - ? (lexbuf[12] = [0, lcp[1], lcp[2] + 1 | 0, lcp[4], lcp[4]], 0) - : _a_; - return _b_; - /*<>*/ } - function flush_input(lb){ - /*<>*/ lb[6] = 0; - lb[4] = 0; - var lcp = lb[12]; - if(lcp !== dummy_pos) - lb[12] = [0, lcp[1], zero_pos[2], zero_pos[3], zero_pos[4]]; - lb[3] = 0; - return 0; - /*<>*/ } - var - Stdlib_Lexing = - [0, - dummy_pos, - from_channel, - from_string, - from_function, - set_position, - set_filename, - with_positions, - lexeme, - lexeme_char, - lexeme_start, - lexeme_end, - lexeme_start_p, - lexeme_end_p, - new_line, - flush_input, - sub_lexeme, - sub_lexeme_opt, - sub_lexeme_char, - sub_lexeme_char_opt, - engine, - new_engine]; - runtime.caml_register_global(7, Stdlib_Lexing, "Stdlib__Lexing"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Parsing -//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Lexing, Stdlib__Obj -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_check_bound = runtime.caml_check_bound, - caml_fresh_oo_id = runtime.caml_fresh_oo_id, - caml_make_vect = runtime.caml_make_vect, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - 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_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, - Stdlib_Array = global_data.Stdlib__Array, - Stdlib_Lexing = global_data.Stdlib__Lexing, - /*<>*/ YYexit = - [248, "Stdlib.Parsing.YYexit", caml_fresh_oo_id(0)], - /*<>*/ Parse_error = - [248, "Stdlib.Parsing.Parse_error", caml_fresh_oo_id(0)], - /*<>*/ env = - [0, - /*<>*/ caml_make_vect(100, 0), - /*<>*/ caml_make_vect(100, 0), - /*<>*/ caml_make_vect(100, Stdlib_Lexing[1]), - /*<>*/ caml_make_vect(100, Stdlib_Lexing[1]), - 100, - 0, - 0, - 0, - Stdlib_Lexing[1], - Stdlib_Lexing[1], - 0, - 0, - 0, - 0, - 0, - 0], - cst_syntax_error = "syntax error"; - function grow_stacks(param){ - /*<>*/ var - oldsize = env[5], - newsize = oldsize * 2 | 0, - /*<>*/ new_s = - /*<>*/ caml_make_vect(newsize, 0), - /*<>*/ new_v = - /*<>*/ caml_make_vect(newsize, 0), - /*<>*/ new_start = - /*<>*/ caml_make_vect(newsize, Stdlib_Lexing[1]), - /*<>*/ new_end = - /*<>*/ caml_make_vect(newsize, Stdlib_Lexing[1]); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Array[8], env[1], 0, new_s, 0, oldsize); - env[1] = new_s; - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Array[8], env[2], 0, new_v, 0, oldsize); - env[2] = new_v; - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Array[8], env[3], 0, new_start, 0, oldsize); - env[3] = new_start; - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Array[8], env[4], 0, new_end, 0, oldsize); - env[4] = new_end; - env[5] = newsize; - return 0; - /*<>*/ } - function clear_parser(param){ - /*<>*/ /*<>*/ caml_call4 - (Stdlib_Array[7], env[2], 0, env[5], 0); - env[8] = 0; - return 0; - /*<>*/ } - /*<>*/ /*<>*/ var - current_lookahead_fun = - [0, - function(param){ - /*<>*/ return 0; - /*<>*/ }]; - function yyparse(tables, start, lexer, lexbuf){ - /*<>*/ var - init_asp = env[11], - init_sp = env[14], - init_stackbase = env[6], - init_state = env[15], - init_curr_char = env[7], - init_lval = env[8], - init_errflag = env[16]; - env[6] = env[14] + 1 | 0; - env[7] = start; - env[10] = lexbuf[12]; - /*<>*/ try{ - var cmd = 0, arg = 0; - /*<>*/ for(;;) - switch - ( /*<>*/ runtime.caml_parse_engine - (tables, env, cmd, arg)){ - case 0: - /*<>*/ /*<>*/ var - arg$0 = /*<>*/ caml_call1(lexer, lexbuf); - env[9] = lexbuf[11]; - env[10] = lexbuf[12]; - var cmd = 1, arg = arg$0; - break; - case 1: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Parse_error, 1); - case 2: - /*<>*/ grow_stacks(0); - var cmd = 2, arg = 0; - break; - case 3: - /*<>*/ grow_stacks(0); - var cmd = 3, arg = 0; - break; - case 4: - try{ - /*<>*/ var - _i_ = env[13], - /*<>*/ _j_ = - /*<>*/ caml_call1 - (caml_check_bound(tables[1], _i_)[1 + _i_], env), - /*<>*/ _k_ = 4, - value = _j_, - action = _k_; - } - catch(_m_){ - var _h_ = caml_wrap_exception(_m_); - if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); - var value = 0, action = 5; - } - var cmd = action, arg = value; - break; - default: - /*<>*/ /*<>*/ caml_call1 - (tables[14], cst_syntax_error); - var cmd = 5, arg = 0; - } - } - catch(exn$0){ - /*<>*/ var - exn = caml_wrap_exception(exn$0), - /*<>*/ curr_char = env[7]; - env[11] = init_asp; - env[14] = init_sp; - env[6] = init_stackbase; - env[15] = init_state; - env[7] = init_curr_char; - env[8] = init_lval; - env[16] = init_errflag; - if(exn[1] === YYexit){ - var v = exn[2]; - /*<>*/ return v; - } - current_lookahead_fun[1] = - function(tok){ - /*<>*/ if - (! /*<>*/ caml_call1(Stdlib_Obj[1], tok)) - /*<>*/ return caml_check_bound(tables[2], tok) - [1 + tok] - === curr_char - ? 1 - : 0; - /*<>*/ /*<>*/ var - _l_ = /*<>*/ runtime.caml_obj_tag(tok); - /*<>*/ return caml_check_bound(tables[3], _l_) - [1 + _l_] - === curr_char - ? 1 - : 0; - /*<>*/ }; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (exn, 0); - } - /*<>*/ } - function peek_val(env, n){ - /*<>*/ var _g_ = env[11] - n | 0; - /*<>*/ return caml_check_bound(env[2], _g_)[1 + _g_]; - /*<>*/ } - function symbol_start_pos(param){ - /*<>*/ var i$1 = env[12], i = i$1; - /*<>*/ for(;;){ - if(0 >= i){ - var _f_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _f_)[1 + _f_]; - } - /*<>*/ var - _d_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ st = caml_check_bound(env[3], _d_)[1 + _d_], - _e_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ en = caml_check_bound(env[4], _e_)[1 + _e_]; - /*<>*/ if - ( /*<>*/ runtime.caml_notequal(st, en)) - /*<>*/ return st; - /*<>*/ var - /*<>*/ i$0 = i - 1 | 0, - i = i$0; - } - /*<>*/ } - function symbol_end_pos(param){ - /*<>*/ var _c_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _c_)[1 + _c_]; - /*<>*/ } - function rhs_start_pos(n){ - /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[3], _b_)[1 + _b_]; - /*<>*/ } - function rhs_end_pos(n){ - /*<>*/ var _a_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[4], _a_)[1 + _a_]; - /*<>*/ } - function symbol_start(param){ - /*<>*/ return symbol_start_pos(0)[4]; - /*<>*/ } - function symbol_end(param){ - /*<>*/ return symbol_end_pos(0)[4]; - /*<>*/ } - function rhs_start(n){ - /*<>*/ return rhs_start_pos(n)[4]; - /*<>*/ } - function rhs_end(n){ - /*<>*/ return rhs_end_pos(n)[4]; - /*<>*/ } - function is_current_lookahead(tok){ - /*<>*/ return /*<>*/ caml_call1 - (current_lookahead_fun[1], tok); - /*<>*/ } - function parse_error(param){ - /*<>*/ return 0; - /*<>*/ } - var - Stdlib_Parsing = - [0, - symbol_start, - symbol_end, - rhs_start, - rhs_end, - symbol_start_pos, - symbol_end_pos, - rhs_start_pos, - rhs_end_pos, - clear_parser, - Parse_error, - runtime.caml_set_parser_trace, - YYexit, - yyparse, - peek_val, - is_current_lookahead, - parse_error]; - runtime.caml_register_global(7, Stdlib_Parsing, "Stdlib__Parsing"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Set -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__List, Stdlib__Seq -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_Set_bal$3 = "Set.bal", - 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 - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Stdlib_Seq = global_data.Stdlib__Seq, - Stdlib_List = global_data.Stdlib__List, - Assert_failure = global_data.Assert_failure, - cst_Set_remove_min_elt = "Set.remove_min_elt", - _a_ = [0, 0, 0, 0], - _b_ = [0, 0, 0], - _c_ = [0, "set.ml", 570, 18], - cst_Set_bal = cst_Set_bal$3, - cst_Set_bal$0 = cst_Set_bal$3, - cst_Set_bal$1 = cst_Set_bal$3, - cst_Set_bal$2 = cst_Set_bal$3, - Stdlib_Set = - [0, - function(Ord){ - function height(param){ - /*<>*/ if(! param) /*<>*/ return 0; - var h = param[4]; - /*<>*/ return h; - /*<>*/ } - function create(l, v, r){ - /*<>*/ if(l) var h = l[4], hl = h; else var hl = 0; - /*<>*/ if(r) var h$0 = r[4], hr = h$0; else var hr = 0; - var _Z_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - /*<>*/ return [0, l, v, r, _Z_]; - /*<>*/ } - function bal(l, v, r){ - /*<>*/ if(l) var h = l[4], hl = h; else var hl = 0; - /*<>*/ if(r) - var h$0 = r[4], hr = h$0; - else - var hr = 0; - if((hr + 2 | 0) < hl){ - if(! l) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Set_bal$0); - /*<>*/ var - lr = l[3], - lv = l[2], - ll = l[1], - /*<>*/ _U_ = height(lr); - if(_U_ <= height(ll)) - /*<>*/ return create(ll, lv, create(lr, v, r)); - if(! lr) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Set_bal); - /*<>*/ var - lrr = lr[3], - lrv = lr[2], - lrl = lr[1], - /*<>*/ _V_ = create(lrr, v, r); - /*<>*/ return create(create(ll, lv, lrl), lrv, _V_); - } - if((hl + 2 | 0) >= hr){ - var _Y_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - /*<>*/ return [0, l, v, r, _Y_]; - } - if(! r) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Set_bal$2); - /*<>*/ var - rr = r[3], - rv = r[2], - rl = r[1], - /*<>*/ _W_ = height(rl); - if(_W_ <= height(rr)) - /*<>*/ return create(create(l, v, rl), rv, rr); - if(! rl) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Set_bal$1); - /*<>*/ var - rlr = rl[3], - rlv = rl[2], - rll = rl[1], - /*<>*/ _X_ = create(rlr, rv, rr); - /*<>*/ return create(create(l, v, rll), rlv, _X_); - /*<>*/ } - function add(x, t){ - /*<>*/ if(! t) /*<>*/ return [0, 0, x, 0, 1]; - /*<>*/ var - r = t[3], - v = t[2], - l = t[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return t; - if(0 <= c){ - /*<>*/ /*<>*/ var rr = add(x, r); - return r === rr ? t : bal(l, v, rr); - } - /*<>*/ /*<>*/ var ll = add(x, l); - return l === ll ? t : bal(ll, v, r); - } - function singleton(x){ - /*<>*/ return [0, 0, x, 0, 1]; - /*<>*/ } - function add_min_element(x, param){ - /*<>*/ if(! param) /*<>*/ return singleton(x); - var r = param[3], v = param[2], l = param[1]; - /*<>*/ return bal(add_min_element(x, l), v, r); - } - function add_max_element(x, param){ - /*<>*/ if(! param) /*<>*/ return singleton(x); - var r = param[3], v = param[2], l = param[1]; - /*<>*/ return bal(l, v, add_max_element(x, r)); - } - function join(l, v, r){ - /*<>*/ if(! l) - /*<>*/ return add_min_element(v, r); - if(! r) /*<>*/ return add_max_element(v, l); - var - rh = r[4], - rr = r[3], - rv = r[2], - rl = r[1], - lh = l[4], - lr = l[3], - lv = l[2], - ll = l[1]; - return (rh + 2 | 0) < lh - ? bal(ll, lv, join(lr, v, r)) - : (lh - + 2 - | 0) - < rh - ? bal(join(l, v, rl), rv, rr) - : create(l, v, r); - /*<>*/ } - function min_elt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var l = param$0[1]; - if(! l){var v = param$0[2]; /*<>*/ return v;} - var param$0 = l; - } - /*<>*/ } - function min_elt_opt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[1]; - if(! l){var v = param$0[2]; /*<>*/ return [0, v];} - var param$0 = l; - } - /*<>*/ } - function max_elt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - if(! param$0[3]){ - var v = param$0[2]; - /*<>*/ return v; - } - var r = param$0[3], param$0 = r; - } - /*<>*/ } - function max_elt_opt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - if(! param$0[3]){ - var v = param$0[2]; - /*<>*/ return [0, v]; - } - var r = param$0[3], param$0 = r; - } - /*<>*/ } - function remove_min_elt(param){ - /*<>*/ if(! param) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Set_remove_min_elt); - var l = param[1]; - if(l){ - var r = param[3], v = param[2]; - /*<>*/ return bal(remove_min_elt(l), v, r); - } - var r$0 = param[3]; - /*<>*/ return r$0; - /*<>*/ } - function concat(t1, t2){ - /*<>*/ if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ /*<>*/ var - _T_ = remove_min_elt(t2); - /*<>*/ return join(t1, min_elt(t2), _T_); - /*<>*/ } - function split(x, param){ - /*<>*/ if(! param) /*<>*/ return _a_; - /*<>*/ var - r = param[3], - v = param[2], - l = param[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return [0, l, 1, r]; - if(0 <= c){ - /*<>*/ var - /*<>*/ match = split(x, r), - rr = match[3], - pres = match[2], - lr = match[1]; - /*<>*/ return [0, join(l, v, lr), pres, rr]; - } - /*<>*/ var - /*<>*/ match$0 = split(x, l), - rl = match$0[3], - pres$0 = match$0[2], - ll = match$0[1]; - /*<>*/ return [0, ll, pres$0, join(rl, v, r)]; - } - var empty = 0; - function is_empty(param){ - /*<>*/ return param ? 0 : 1; - /*<>*/ } - function mem(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var - r = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v), - _S_ = 0 === c ? 1 : 0; - if(_S_) return _S_; - var r$0 = 0 <= c ? r : l, param$0 = r$0; - } - } - function remove(x, t){ - /*<>*/ if(! t) /*<>*/ return 0; - /*<>*/ var - t2 = t[3], - v = t[2], - t1 = t[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c){ - if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ /*<>*/ var - _R_ = remove_min_elt(t2); - /*<>*/ return bal(t1, min_elt(t2), _R_); - } - if(0 <= c){ - /*<>*/ /*<>*/ var - rr = remove(x, t2); - return t2 === rr ? t : bal(t1, v, rr); - } - /*<>*/ /*<>*/ var ll = remove(x, t1); - return t1 === ll ? t : bal(ll, v, t2); - } - function union(s1, s2){ - /*<>*/ if(! s1) /*<>*/ return s2; - if(! s2) /*<>*/ return s1; - var - h2 = s2[4], - r2 = s2[3], - v2 = s2[2], - l2 = s2[1], - h1 = s1[4], - r1 = s1[3], - v1 = s1[2], - l1 = s1[1]; - if(h2 <= h1){ - if(1 === h2) /*<>*/ return add(v2, s1); - /*<>*/ var - /*<>*/ match = split(v1, s2), - r2$0 = match[3], - l2$0 = match[1], - /*<>*/ _P_ = union(r1, r2$0); - /*<>*/ return join(union(l1, l2$0), v1, _P_); - } - if(1 === h1) /*<>*/ return add(v1, s2); - /*<>*/ var - /*<>*/ match$0 = split(v2, s1), - r1$0 = match$0[3], - l1$0 = match$0[1], - /*<>*/ _Q_ = union(r1$0, r2); - /*<>*/ return join(union(l1$0, l2), v2, _Q_); - /*<>*/ } - function inter(s1, s2){ - /*<>*/ if(! s1) /*<>*/ return 0; - if(! s2) /*<>*/ return 0; - /*<>*/ var - r1 = s1[3], - v1 = s1[2], - l1 = s1[1], - /*<>*/ _M_ = split(v1, s2), - l2 = _M_[1]; - if(_M_[2]){ - /*<>*/ var - r2 = _M_[3], - /*<>*/ _N_ = inter(r1, r2); - /*<>*/ return join(inter(l1, l2), v1, _N_); - } - /*<>*/ var - r2$0 = _M_[3], - /*<>*/ _O_ = inter(r1, r2$0); - /*<>*/ return concat(inter(l1, l2), _O_); - /*<>*/ } - function split_bis(x, param){ - /*<>*/ if(! param) - /*<>*/ return [0, - 0, - function(param){ - /*<>*/ return 0; - /*<>*/ }]; - /*<>*/ var - r = param[3], - v = param[2], - l = param[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return 0; - if(0 <= c){ - /*<>*/ /*<>*/ var - match = split_bis(x, r); - if(! match) /*<>*/ return 0; - var rr = match[2], lr = match[1]; - /*<>*/ return [0, join(l, v, lr), rr]; - } - /*<>*/ /*<>*/ var - match$0 = split_bis(x, l); - if(! match$0) /*<>*/ return 0; - var rl = match$0[2], ll = match$0[1]; - /*<>*/ return [0, - ll, - function(param){ - /*<>*/ return join(rl(0), v, r); - /*<>*/ }]; - } - function disjoint(s1, s2){ - /*<>*/ var s1$0 = s1, s2$0 = s2; - /*<>*/ for(;;){ - if(s1$0 && s2$0){ - var r1 = s1$0[3], v1 = s1$0[2], l1 = s1$0[1]; - if(s1$0 === s2$0) /*<>*/ return 0; - /*<>*/ /*<>*/ var - match = split_bis(v1, s2$0); - if(! match) /*<>*/ return 0; - /*<>*/ var - r2 = match[2], - l2 = match[1], - /*<>*/ _L_ = disjoint(l1, l2); - /*<>*/ if(! _L_) /*<>*/ return _L_; - /*<>*/ var - /*<>*/ s2$1 = r2(0), - s1$0 = r1, - s2$0 = s2$1; - continue; - } - /*<>*/ return 1; - } - /*<>*/ } - function diff(s1, s2){ - /*<>*/ if(! s1) /*<>*/ return 0; - if(! s2) /*<>*/ return s1; - /*<>*/ var - r1 = s1[3], - v1 = s1[2], - l1 = s1[1], - /*<>*/ _I_ = split(v1, s2), - l2 = _I_[1]; - if(_I_[2]){ - /*<>*/ var - r2 = _I_[3], - /*<>*/ _J_ = diff(r1, r2); - /*<>*/ return concat(diff(l1, l2), _J_); - } - /*<>*/ var - r2$0 = _I_[3], - /*<>*/ _K_ = diff(r1, r2$0); - /*<>*/ return join(diff(l1, l2), v1, _K_); - /*<>*/ } - function cons_enum(s, e){ - /*<>*/ var s$0 = s, e$0 = e; - /*<>*/ for(;;){ - if(! s$0) /*<>*/ return e$0; - /*<>*/ var - r = s$0[3], - v = s$0[2], - l = s$0[1], - /*<>*/ e$1 = [0, v, r, e$0], - s$0 = l, - e$0 = e$1; - } - /*<>*/ } - function compare(s1, s2){ - /*<>*/ var - /*<>*/ e2$2 = cons_enum(s2, 0), - /*<>*/ e1$2 = cons_enum(s1, 0), - e1 = e1$2, - e2 = e2$2; - /*<>*/ for(;;){ - if(! e1) return e2 ? -1 : 0; - if(! e2) /*<>*/ return 1; - /*<>*/ var - e2$0 = e2[3], - r2 = e2[2], - v2 = e2[1], - e1$0 = e1[3], - r1 = e1[2], - v1 = e1[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 !== c) /*<>*/ return c; - /*<>*/ var - /*<>*/ e2$1 = cons_enum(r2, e2$0), - /*<>*/ e1$1 = cons_enum(r1, e1$0), - e1 = e1$1, - e2 = e2$1; - } - /*<>*/ } - function equal(s1, s2){ - /*<>*/ return 0 === compare(s1, s2) ? 1 : 0; - /*<>*/ } - function subset(s1, s2){ - /*<>*/ var s1$0 = s1, s2$0 = s2; - /*<>*/ for(;;){ - if(! s1$0) /*<>*/ return 1; - if(! s2$0) /*<>*/ return 0; - /*<>*/ var - r2 = s2$0[3], - v2 = s2$0[2], - l2 = s2$0[1], - r1 = s1$0[3], - v1 = s1$0[2], - l1 = s1$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 === c){ - /*<>*/ /*<>*/ var - _F_ = subset(l1, l2); - /*<>*/ if(! _F_) /*<>*/ return _F_; - var s1$0 = r1, s2$0 = r2; - } - else if(0 <= c){ - /*<>*/ /*<>*/ var - _G_ = subset([0, 0, v1, r1, 0], r2); - /*<>*/ if(! _G_) /*<>*/ return _G_; - var s1$0 = l1; - } - else{ - /*<>*/ /*<>*/ var - _H_ = subset([0, l1, v1, 0, 0], l2); - /*<>*/ if(! _H_) /*<>*/ return _H_; - var s1$0 = r1; - } - } - /*<>*/ } - function iter(f, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var r = param$0[3], v = param$0[2], l = param$0[1]; - /*<>*/ iter(f, l); - /*<>*/ /*<>*/ caml_call1(f, v); - var param$0 = r; - } - } - function fold(f, s, accu){ - /*<>*/ var s$0 = s, accu$0 = accu; - /*<>*/ for(;;){ - if(! s$0) /*<>*/ return accu$0; - /*<>*/ var - r = s$0[3], - v = s$0[2], - l = s$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call2(f, v, fold(f, l, accu$0)), - s$0 = r, - accu$0 = accu$1; - } - /*<>*/ } - function for_all(p, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 1; - /*<>*/ var - r = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ _C_ = - /*<>*/ caml_call1(p, v); - /*<>*/ if(_C_){ - /*<>*/ /*<>*/ var - _D_ = for_all(p, l); - /*<>*/ if(_D_){var param$0 = r; continue;} - var _E_ = _D_; - } - else - var _E_ = _C_; - /*<>*/ return _E_; - } - } - function exists(p, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var - r = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ _z_ = - /*<>*/ caml_call1(p, v); - /*<>*/ if(_z_) - var _A_ = _z_; - else{ - /*<>*/ /*<>*/ var - _B_ = exists(p, l); - /*<>*/ if(! _B_){var param$0 = r; continue;} - var _A_ = _B_; - } - /*<>*/ return _A_; - } - } - function filter(p, t){ - /*<>*/ if(! t) /*<>*/ return 0; - /*<>*/ var - r = t[3], - v = t[2], - l = t[1], - /*<>*/ l$0 = filter(p, l), - /*<>*/ pv = /*<>*/ caml_call1(p, v), - /*<>*/ r$0 = filter(p, r); - /*<>*/ if(! pv) - /*<>*/ return concat(l$0, r$0); - if(l === l$0 && r === r$0) /*<>*/ return t; - /*<>*/ return join(l$0, v, r$0); - } - function partition(p, param){ - /*<>*/ if(! param) /*<>*/ return _b_; - /*<>*/ var - r = param[3], - v = param[2], - l = param[1], - /*<>*/ match = partition(p, l), - lf = match[2], - lt = match[1], - /*<>*/ pv = /*<>*/ caml_call1(p, v), - /*<>*/ match$0 = partition(p, r), - rf = match$0[2], - rt = match$0[1]; - /*<>*/ if(pv){ - /*<>*/ /*<>*/ var - _x_ = concat(lf, rf); - /*<>*/ return [0, join(lt, v, rt), _x_]; - } - /*<>*/ /*<>*/ var - _y_ = join(lf, v, rf); - /*<>*/ return [0, concat(lt, rt), _y_]; - } - function cardinal(param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - r = param[3], - l = param[1], - /*<>*/ _w_ = cardinal(r); - return (cardinal(l) + 1 | 0) + _w_ | 0; - /*<>*/ } - function elements_aux(accu, param){ - var accu$0 = accu, param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return accu$0; - /*<>*/ var - r = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ accu$1 = [0, v, elements_aux(accu$0, r)], - accu$0 = accu$1, - param$0 = l; - } - } - function elements(s){ - /*<>*/ return elements_aux(0, s); - /*<>*/ } - function find(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - /*<>*/ var - r = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return v; - var r$0 = 0 <= c ? r : l, param$0 = r$0; - } - } - function find_first(f, param$0){ - var param$1 = param$0; - for(;;){ - if(! param$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ - var v0 = v0$1, param = l$0; - for(;;){ - if(! param) /*<>*/ return v0; - var r = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) - var v0 = v0$0, param = l; - else - var param = r; - } - } - else - var param$1 = r$0; - } - } - function find_first_opt(f, param$0){ - var param$1 = param$0; - for(;;){ - if(! param$1) /*<>*/ return 0; - var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ - var v0 = v0$1, param = l$0; - for(;;){ - if(! param) /*<>*/ return [0, v0]; - var r = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) - var v0 = v0$0, param = l; - else - var param = r; - } - } - else - var param$1 = r$0; - } - } - function find_last(f, param$0){ - var param$1 = param$0; - for(;;){ - if(! param$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ - var v0 = v0$1, param = r$0; - for(;;){ - if(! param) /*<>*/ return v0; - var r = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) - var v0 = v0$0, param = r; - else - var param = l; - } - } - else - var param$1 = l$0; - } - } - function find_last_opt(f, param$0){ - var param$1 = param$0; - for(;;){ - if(! param$1) /*<>*/ return 0; - var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ - var v0 = v0$1, param = r$0; - for(;;){ - if(! param) /*<>*/ return [0, v0]; - var r = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) - var v0 = v0$0, param = r; - else - var param = l; - } - } - else - var param$1 = l$0; - } - } - function find_opt(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var - r = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return [0, v]; - var r$0 = 0 <= c ? r : l, param$0 = r$0; - } - } - function try_join(l, v, r){ - /*<>*/ a: - { - if(0 !== l){ - /*<>*/ /*<>*/ var _v_ = max_elt(l); - /*<>*/ if - (0 <= /*<>*/ caml_call2(Ord[1], _v_, v)) - break a; - } - if(0 !== r){ - /*<>*/ /*<>*/ var _u_ = min_elt(r); - /*<>*/ if - (0 <= /*<>*/ caml_call2(Ord[1], v, _u_)) - break a; - } - /*<>*/ return join(l, v, r); - } - /*<>*/ return union(l, add(v, r)); - /*<>*/ } - function map(f, t){ - /*<>*/ if(! t) /*<>*/ return 0; - /*<>*/ var - r = t[3], - v = t[2], - l = t[1], - /*<>*/ l$0 = map(f, l), - /*<>*/ v$0 = /*<>*/ caml_call1(f, v), - /*<>*/ r$0 = map(f, r); - if(l === l$0 && v === v$0 && r === r$0) - /*<>*/ return t; - /*<>*/ return try_join(l$0, v$0, r$0); - } - function filter_map(f, t){ - /*<>*/ if(! t) /*<>*/ return 0; - /*<>*/ var - r = t[3], - v = t[2], - l = t[1], - /*<>*/ t1 = filter_map(f, l), - /*<>*/ v$0 = /*<>*/ caml_call1(f, v), - /*<>*/ t2 = filter_map(f, r); - /*<>*/ if(v$0){ - var v$1 = v$0[1]; - if(l === t1 && v === v$1 && r === t2) - /*<>*/ return t; - /*<>*/ return try_join(t1, v$1, t2); - } - if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ /*<>*/ var - _t_ = remove_min_elt(t2); - /*<>*/ return try_join(t1, min_elt(t2), _t_); - } - function of_list(l){ - /*<>*/ if(! l) return empty; - var _o_ = l[2], x0 = l[1]; - if(! _o_) /*<>*/ return singleton(x0); - var _p_ = _o_[2], x1 = _o_[1]; - if(! _p_) /*<>*/ return add(x1, singleton(x0)); - var _q_ = _p_[2], x2 = _p_[1]; - if(! _q_) - /*<>*/ return add(x2, add(x1, singleton(x0))); - var _r_ = _q_[2], x3 = _q_[1]; - if(! _r_) - /*<>*/ return add - (x3, add(x2, add(x1, singleton(x0)))); - if(_r_[2]){ - /*<>*/ var - /*<>*/ l$0 = - /*<>*/ caml_call2(Stdlib_List[59], Ord[1], l), - sub = - function(n, l){ - /*<>*/ if(3 >= n >>> 0) - switch(n){ - case 0: - /*<>*/ return [0, 0, l]; - case 1: - if(l){ - var l$3 = l[2], x0 = l[1]; - /*<>*/ return [0, [0, 0, x0, 0, 1], l$3]; - } - break; - case 2: - if(l){ - var match$1 = l[2]; - if(match$1){ - var l$4 = match$1[2], x1 = match$1[1], x0$0 = l[1]; - /*<>*/ return [0, - [0, [0, 0, x0$0, 0, 1], x1, 0, 2], - l$4]; - } - } - break; - default: - if(l){ - var _s_ = l[2]; - if(_s_){ - var match$2 = _s_[2]; - if(match$2){ - var - l$5 = match$2[2], - x2 = match$2[1], - x1$0 = _s_[1], - x0$1 = l[1]; - /*<>*/ return [0, - [0, [0, 0, x0$1, 0, 1], x1$0, [0, 0, x2, 0, 1], 2], - l$5]; - } - } - } - } - /*<>*/ var - nl = n / 2 | 0, - /*<>*/ match = sub(nl, l), - l$0 = match[2], - left = match[1]; - /*<>*/ if(! l$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); - /*<>*/ var - l$1 = l$0[2], - mid = l$0[1], - /*<>*/ match$0 = sub((n - nl | 0) - 1 | 0, l$1), - l$2 = match$0[2], - right = match$0[1]; - /*<>*/ return [0, create(left, mid, right), l$2]; - /*<>*/ }; - /*<>*/ return sub - ( /*<>*/ caml_call1(Stdlib_List[1], l$0), - l$0) - [1]; - } - var x4 = _r_[1]; - /*<>*/ return add - (x4, add(x3, add(x2, add(x1, singleton(x0))))); - /*<>*/ } - function add_seq(i, m){ - function _n_(s, x){ - /*<>*/ return add(x, s); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Seq[5], _n_, m, i); - /*<>*/ } - function of_seq(i){ - /*<>*/ return add_seq(i, empty); - /*<>*/ } - function seq_of_enum(c, param){ - /*<>*/ if(! c) /*<>*/ return 0; - /*<>*/ var - rest = c[3], - t = c[2], - x = c[1], - /*<>*/ _l_ = cons_enum(t, rest); - /*<>*/ return [0, - x, - function(_m_){ /*<>*/ return seq_of_enum(_l_, _m_);}]; - /*<>*/ } - function to_seq(c){ - /*<>*/ /*<>*/ var - _j_ = cons_enum(c, 0); - /*<>*/ return function(_k_){ - /*<>*/ return seq_of_enum(_j_, _k_);}; - /*<>*/ } - function snoc_enum(s, e){ - /*<>*/ var s$0 = s, e$0 = e; - /*<>*/ for(;;){ - if(! s$0) /*<>*/ return e$0; - /*<>*/ var - r = s$0[3], - v = s$0[2], - l = s$0[1], - /*<>*/ e$1 = [0, v, l, e$0], - s$0 = r, - e$0 = e$1; - } - /*<>*/ } - function rev_seq_of_enum(c, param){ - /*<>*/ if(! c) /*<>*/ return 0; - /*<>*/ var - rest = c[3], - t = c[2], - x = c[1], - /*<>*/ _h_ = snoc_enum(t, rest); - /*<>*/ return [0, - x, - function(_i_){ /*<>*/ return rev_seq_of_enum(_h_, _i_);}]; - /*<>*/ } - function to_rev_seq(c){ - /*<>*/ /*<>*/ var - _f_ = snoc_enum(c, 0); - /*<>*/ return function(_g_){ - /*<>*/ return rev_seq_of_enum(_f_, _g_);}; - /*<>*/ } - function to_seq_from(low, s){ - /*<>*/ var s$0 = s, c = 0; - /*<>*/ for(;;){ - if(s$0){ - /*<>*/ var - r = s$0[3], - v = s$0[2], - l = s$0[1], - /*<>*/ n = - /*<>*/ caml_call2(Ord[1], v, low); - if(0 !== n){ - if(0 <= n){ - /*<>*/ var - /*<>*/ c$0 = [0, v, r, c], - s$0 = l, - c = c$0; - continue; - } - var s$0 = r; - continue; - } - var _d_ = [0, v, r, c]; - } - else - var _d_ = c; - /*<>*/ return function(_e_){ - /*<>*/ return seq_of_enum(_d_, _e_);}; - } - /*<>*/ } - return [0, - empty, - is_empty, - mem, - add, - singleton, - remove, - union, - inter, - disjoint, - diff, - compare, - equal, - subset, - iter, - map, - fold, - for_all, - exists, - filter, - filter_map, - partition, - cardinal, - elements, - min_elt, - min_elt_opt, - max_elt, - max_elt_opt, - min_elt, - min_elt_opt, - split, - find, - find_opt, - find_first, - find_first_opt, - find_last, - find_last_opt, - of_list, - to_seq_from, - to_seq, - to_rev_seq, - add_seq, - of_seq]; - }]; - runtime.caml_register_global(12, Stdlib_Set, "Stdlib__Set"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Map -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Seq -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_Map_bal$3 = "Map.bal", - 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 - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Assert_failure = global_data.Assert_failure, - Stdlib_Seq = global_data.Stdlib__Seq, - cst_Map_remove_min_elt = "Map.remove_min_elt", - _a_ = [0, 0, 0, 0], - _b_ = [0, "map.ml", 400, 10], - _c_ = [0, 0, 0], - cst_Map_bal = cst_Map_bal$3, - cst_Map_bal$0 = cst_Map_bal$3, - cst_Map_bal$1 = cst_Map_bal$3, - cst_Map_bal$2 = cst_Map_bal$3, - Stdlib_Map = - [0, - function(Ord){ - function height(param){ - /*<>*/ if(! param) /*<>*/ return 0; - var h = param[5]; - /*<>*/ return h; - /*<>*/ } - function create(l, x, d, r){ - /*<>*/ var - /*<>*/ hl = height(l), - /*<>*/ hr = height(r), - _L_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - /*<>*/ return [0, l, x, d, r, _L_]; - /*<>*/ } - function singleton(x, d){ - /*<>*/ return [0, 0, x, d, 0, 1]; - /*<>*/ } - function bal(l, x, d, r){ - /*<>*/ if(l) var h = l[5], hl = h; else var hl = 0; - /*<>*/ if(r) var h$0 = r[5], hr = h$0; else var hr = 0; - if((hr + 2 | 0) < hl){ - if(! l) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Map_bal$0); - /*<>*/ var - lr = l[4], - ld = l[3], - lv = l[2], - ll = l[1], - /*<>*/ _G_ = height(lr); - if(_G_ <= height(ll)) - /*<>*/ return create - (ll, lv, ld, create(lr, x, d, r)); - if(! lr) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Map_bal); - /*<>*/ var - lrr = lr[4], - lrd = lr[3], - lrv = lr[2], - lrl = lr[1], - /*<>*/ _H_ = create(lrr, x, d, r); - /*<>*/ return create - (create(ll, lv, ld, lrl), lrv, lrd, _H_); - } - if((hl + 2 | 0) >= hr){ - var _K_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - /*<>*/ return [0, l, x, d, r, _K_]; - } - if(! r) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Map_bal$2); - /*<>*/ var - rr = r[4], - rd = r[3], - rv = r[2], - rl = r[1], - /*<>*/ _I_ = height(rl); - if(_I_ <= height(rr)) - /*<>*/ return create - (create(l, x, d, rl), rv, rd, rr); - if(! rl) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Map_bal$1); - /*<>*/ var - rlr = rl[4], - rld = rl[3], - rlv = rl[2], - rll = rl[1], - /*<>*/ _J_ = create(rlr, rv, rd, rr); - /*<>*/ return create - (create(l, x, d, rll), rlv, rld, _J_); - /*<>*/ } - var empty = 0; - function is_empty(param){ - /*<>*/ return param ? 0 : 1; - /*<>*/ } - function add(x, data, m){ - /*<>*/ if(! m) - /*<>*/ return [0, 0, x, data, 0, 1]; - /*<>*/ var - h = m[5], - r = m[4], - d = m[3], - v = m[2], - l = m[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - return d === data ? m : [0, l, x, data, r, h]; - if(0 <= c){ - /*<>*/ /*<>*/ var - rr = add(x, data, r); - return r === rr ? m : bal(l, v, d, rr); - } - /*<>*/ /*<>*/ var - ll = add(x, data, l); - return l === ll ? m : bal(ll, v, d, r); - } - function find(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - /*<>*/ var - r = param$0[4], - d = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return d; - var r$0 = 0 <= c ? r : l, param$0 = r$0; - } - } - function find_first(f, param$0){ - var param$1 = param$0; - for(;;){ - if(! param$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var - r$0 = param$1[4], - d0$1 = param$1[3], - v0$1 = param$1[2], - l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ - var v0 = v0$1, d0 = d0$1, param = l$0; - for(;;){ - if(! param) /*<>*/ return [0, v0, d0]; - var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) - var v0 = v0$0, d0 = d0$0, param = l; - else - var param = r; - } - } - else - var param$1 = r$0; - } - } - function find_first_opt(f, param$0){ - var param$1 = param$0; - for(;;){ - if(! param$1) /*<>*/ return 0; - var - r$0 = param$1[4], - d0$1 = param$1[3], - v0$1 = param$1[2], - l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ - var v0 = v0$1, d0 = d0$1, param = l$0; - for(;;){ - if(! param) /*<>*/ return [0, [0, v0, d0]]; - var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) - var v0 = v0$0, d0 = d0$0, param = l; - else - var param = r; - } - } - else - var param$1 = r$0; - } - } - function find_last(f, param$0){ - var param$1 = param$0; - for(;;){ - if(! param$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var - r$0 = param$1[4], - d0$1 = param$1[3], - v0$1 = param$1[2], - l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ - var v0 = v0$1, d0 = d0$1, param = r$0; - for(;;){ - if(! param) /*<>*/ return [0, v0, d0]; - var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) - var v0 = v0$0, d0 = d0$0, param = r; - else - var param = l; - } - } - else - var param$1 = l$0; - } - } - function find_last_opt(f, param$0){ - var param$1 = param$0; - for(;;){ - if(! param$1) /*<>*/ return 0; - var - r$0 = param$1[4], - d0$1 = param$1[3], - v0$1 = param$1[2], - l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ - var v0 = v0$1, d0 = d0$1, param = r$0; - for(;;){ - if(! param) /*<>*/ return [0, [0, v0, d0]]; - var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) - var v0 = v0$0, d0 = d0$0, param = r; - else - var param = l; - } - } - else - var param$1 = l$0; - } - } - function find_opt(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var - r = param$0[4], - d = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return [0, d]; - var r$0 = 0 <= c ? r : l, param$0 = r$0; - } - } - function mem(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var - r = param$0[4], - v = param$0[2], - l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v), - _F_ = 0 === c ? 1 : 0; - if(_F_) return _F_; - var r$0 = 0 <= c ? r : l, param$0 = r$0; - } - } - function min_binding(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var l = param$0[1]; - if(! l){ - var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, v, d]; - } - var param$0 = l; - } - /*<>*/ } - function min_binding_opt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[1]; - if(! l){ - var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, [0, v, d]]; - } - var param$0 = l; - } - /*<>*/ } - function max_binding(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - if(! param$0[4]){ - var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, v, d]; - } - var r = param$0[4], param$0 = r; - } - /*<>*/ } - function max_binding_opt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - if(! param$0[4]){ - var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, [0, v, d]]; - } - var r = param$0[4], param$0 = r; - } - /*<>*/ } - function remove_min_binding(param){ - /*<>*/ if(! param) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Map_remove_min_elt); - var l = param[1]; - if(l){ - var r = param[4], d = param[3], v = param[2]; - /*<>*/ return bal(remove_min_binding(l), v, d, r); - } - var r$0 = param[4]; - /*<>*/ return r$0; - /*<>*/ } - function _d_(t1, t2){ - /*<>*/ if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ var - /*<>*/ match = min_binding(t2), - d = match[2], - x = match[1]; - /*<>*/ return bal(t1, x, d, remove_min_binding(t2)); - /*<>*/ } - function remove(x, m){ - /*<>*/ if(! m) /*<>*/ return 0; - /*<>*/ var - r = m[4], - d = m[3], - v = m[2], - l = m[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return _d_(l, r); - if(0 <= c){ - /*<>*/ /*<>*/ var rr = remove(x, r); - return r === rr ? m : bal(l, v, d, rr); - } - /*<>*/ /*<>*/ var ll = remove(x, l); - return l === ll ? m : bal(ll, v, d, r); - } - function update(x, f, m){ - /*<>*/ if(! m){ - /*<>*/ /*<>*/ var - match$0 = /*<>*/ caml_call1(f, 0); - if(! match$0) /*<>*/ return 0; - var data$0 = match$0[1]; - /*<>*/ return [0, 0, x, data$0, 0, 1]; - } - /*<>*/ var - h = m[5], - r = m[4], - d = m[3], - v = m[2], - l = m[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(f, [0, d]); - if(! match) /*<>*/ return _d_(l, r); - var data = match[1]; - return d === data ? m : [0, l, x, data, r, h]; - } - if(0 <= c){ - /*<>*/ /*<>*/ var - rr = update(x, f, r); - return r === rr ? m : bal(l, v, d, rr); - } - /*<>*/ /*<>*/ var - ll = update(x, f, l); - return l === ll ? m : bal(ll, v, d, r); - } - function iter(f, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var r = param$0[4], d = param$0[3], v = param$0[2], l = param$0[1]; - /*<>*/ iter(f, l); - /*<>*/ /*<>*/ caml_call2(f, v, d); - var param$0 = r; - } - } - function map(f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - h = param[5], - r = param[4], - d = param[3], - v = param[2], - l = param[1], - /*<>*/ l$0 = map(f, l), - /*<>*/ d$0 = /*<>*/ caml_call1(f, d), - /*<>*/ r$0 = map(f, r); - /*<>*/ return [0, l$0, v, d$0, r$0, h]; - } - function mapi(f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - h = param[5], - r = param[4], - d = param[3], - v = param[2], - l = param[1], - /*<>*/ l$0 = mapi(f, l), - /*<>*/ d$0 = - /*<>*/ caml_call2(f, v, d), - /*<>*/ r$0 = mapi(f, r); - /*<>*/ return [0, l$0, v, d$0, r$0, h]; - } - function fold(f, m, accu){ - /*<>*/ var m$0 = m, accu$0 = accu; - /*<>*/ for(;;){ - if(! m$0) /*<>*/ return accu$0; - /*<>*/ var - r = m$0[4], - d = m$0[3], - v = m$0[2], - l = m$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call3(f, v, d, fold(f, l, accu$0)), - m$0 = r, - accu$0 = accu$1; - } - /*<>*/ } - function for_all(p, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 1; - /*<>*/ var - r = param$0[4], - d = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ _C_ = - /*<>*/ caml_call2(p, v, d); - /*<>*/ if(_C_){ - /*<>*/ /*<>*/ var - _D_ = for_all(p, l); - /*<>*/ if(_D_){var param$0 = r; continue;} - var _E_ = _D_; - } - else - var _E_ = _C_; - /*<>*/ return _E_; - } - } - function exists(p, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var - r = param$0[4], - d = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ _z_ = - /*<>*/ caml_call2(p, v, d); - /*<>*/ if(_z_) - var _A_ = _z_; - else{ - /*<>*/ /*<>*/ var - _B_ = exists(p, l); - /*<>*/ if(! _B_){var param$0 = r; continue;} - var _A_ = _B_; - } - /*<>*/ return _A_; - } - } - function add_min_binding(k, x, param){ - /*<>*/ if(! param) /*<>*/ return singleton(k, x); - var r = param[4], d = param[3], v = param[2], l = param[1]; - /*<>*/ return bal(add_min_binding(k, x, l), v, d, r); - } - function add_max_binding(k, x, param){ - /*<>*/ if(! param) /*<>*/ return singleton(k, x); - var r = param[4], d = param[3], v = param[2], l = param[1]; - /*<>*/ return bal(l, v, d, add_max_binding(k, x, r)); - } - function join(l, v, d, r){ - /*<>*/ if(! l) - /*<>*/ return add_min_binding(v, d, r); - if(! r) /*<>*/ return add_max_binding(v, d, l); - var - rh = r[5], - rr = r[4], - rd = r[3], - rv = r[2], - rl = r[1], - lh = l[5], - lr = l[4], - ld = l[3], - lv = l[2], - ll = l[1]; - return (rh + 2 | 0) < lh - ? bal(ll, lv, ld, join(lr, v, d, r)) - : (lh - + 2 - | 0) - < rh - ? bal(join(l, v, d, rl), rv, rd, rr) - : create(l, v, d, r); - /*<>*/ } - function concat(t1, t2){ - /*<>*/ if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ var - /*<>*/ match = min_binding(t2), - d = match[2], - x = match[1]; - /*<>*/ return join(t1, x, d, remove_min_binding(t2)); - /*<>*/ } - function concat_or_join(t1, v, d, t2){ - /*<>*/ if(! d) - /*<>*/ return concat(t1, t2); - var d$0 = d[1]; - /*<>*/ return join(t1, v, d$0, t2); - /*<>*/ } - function split(x, param){ - /*<>*/ if(! param) /*<>*/ return _a_; - /*<>*/ var - r = param[4], - d = param[3], - v = param[2], - l = param[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return [0, l, [0, d], r]; - if(0 <= c){ - /*<>*/ var - /*<>*/ match = split(x, r), - rr = match[3], - pres = match[2], - lr = match[1]; - /*<>*/ return [0, join(l, v, d, lr), pres, rr]; - } - /*<>*/ var - /*<>*/ match$0 = split(x, l), - rl = match$0[3], - pres$0 = match$0[2], - ll = match$0[1]; - /*<>*/ return [0, ll, pres$0, join(rl, v, d, r)]; - } - function merge(f, s1, s2){ - /*<>*/ if(s1){ - var h1 = s1[5], r1 = s1[4], d1 = s1[3], v1 = s1[2], l1 = s1[1]; - if(height(s2) <= h1){ - /*<>*/ var - /*<>*/ match = split(v1, s2), - r2 = match[3], - d2 = match[2], - l2 = match[1], - /*<>*/ _v_ = merge(f, r1, r2), - /*<>*/ _w_ = - /*<>*/ caml_call3(f, v1, [0, d1], d2); - /*<>*/ return concat_or_join - (merge(f, l1, l2), v1, _w_, _v_); - } - } - else if(! s2) /*<>*/ return 0; - if(! s2) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); - /*<>*/ var - r2$0 = s2[4], - d2$0 = s2[3], - v2 = s2[2], - l2$0 = s2[1], - /*<>*/ match$0 = split(v2, s1), - r1$0 = match$0[3], - d1$0 = match$0[2], - l1$0 = match$0[1], - /*<>*/ _x_ = merge(f, r1$0, r2$0), - /*<>*/ _y_ = - /*<>*/ caml_call3(f, v2, d1$0, [0, d2$0]); - /*<>*/ return concat_or_join - (merge(f, l1$0, l2$0), v2, _y_, _x_); - /*<>*/ } - function union(f, s1, s2){ - /*<>*/ if(s1){ - if(s2){ - var - h2 = s2[5], - r2 = s2[4], - d2 = s2[3], - v2 = s2[2], - l2 = s2[1], - h1 = s1[5], - r1 = s1[4], - d1 = s1[3], - v1 = s1[2], - l1 = s1[1]; - if(h2 <= h1){ - /*<>*/ var - /*<>*/ match = split(v1, s2), - r2$0 = match[3], - d2$0 = match[2], - l2$0 = match[1], - /*<>*/ l = union(f, l1, l2$0), - /*<>*/ r = union(f, r1, r2$0); - /*<>*/ if(! d2$0) - /*<>*/ return join(l, v1, d1, r); - var d2$1 = d2$0[1]; - /*<>*/ return concat_or_join - (l, - v1, - /*<>*/ caml_call3(f, v1, d1, d2$1), - r); - } - /*<>*/ var - /*<>*/ match$0 = split(v2, s1), - r1$0 = match$0[3], - d1$0 = match$0[2], - l1$0 = match$0[1], - /*<>*/ l$0 = union(f, l1$0, l2), - /*<>*/ r$0 = union(f, r1$0, r2); - /*<>*/ if(! d1$0) - /*<>*/ return join(l$0, v2, d2, r$0); - var d1$1 = d1$0[1]; - /*<>*/ return concat_or_join - (l$0, - v2, - /*<>*/ caml_call3(f, v2, d1$1, d2), - r$0); - } - var s = s1; - } - else - var s = s2; - /*<>*/ return s; - /*<>*/ } - function filter(p, m){ - /*<>*/ if(! m) /*<>*/ return 0; - /*<>*/ var - r = m[4], - d = m[3], - v = m[2], - l = m[1], - /*<>*/ l$0 = filter(p, l), - /*<>*/ pvd = - /*<>*/ caml_call2(p, v, d), - /*<>*/ r$0 = filter(p, r); - /*<>*/ if(! pvd) - /*<>*/ return concat(l$0, r$0); - if(l === l$0 && r === r$0) /*<>*/ return m; - /*<>*/ return join(l$0, v, d, r$0); - } - function filter_map(f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - r = param[4], - d = param[3], - v = param[2], - l = param[1], - /*<>*/ l$0 = filter_map(f, l), - /*<>*/ fvd = - /*<>*/ caml_call2(f, v, d), - /*<>*/ r$0 = filter_map(f, r); - /*<>*/ if(! fvd) - /*<>*/ return concat(l$0, r$0); - var d$0 = fvd[1]; - /*<>*/ return join(l$0, v, d$0, r$0); - } - function partition(p, param){ - /*<>*/ if(! param) /*<>*/ return _c_; - /*<>*/ var - r = param[4], - d = param[3], - v = param[2], - l = param[1], - /*<>*/ match = partition(p, l), - lf = match[2], - lt = match[1], - /*<>*/ pvd = - /*<>*/ caml_call2(p, v, d), - /*<>*/ match$0 = partition(p, r), - rf = match$0[2], - rt = match$0[1]; - /*<>*/ if(pvd){ - /*<>*/ /*<>*/ var - _t_ = concat(lf, rf); - /*<>*/ return [0, join(lt, v, d, rt), _t_]; - } - /*<>*/ /*<>*/ var - _u_ = join(lf, v, d, rf); - /*<>*/ return [0, concat(lt, rt), _u_]; - } - function cons_enum(m, e){ - /*<>*/ var m$0 = m, e$0 = e; - /*<>*/ for(;;){ - if(! m$0) /*<>*/ return e$0; - /*<>*/ var - r = m$0[4], - d = m$0[3], - v = m$0[2], - l = m$0[1], - /*<>*/ e$1 = [0, v, d, r, e$0], - m$0 = l, - e$0 = e$1; - } - /*<>*/ } - function compare(cmp, m1, m2){ - /*<>*/ var - /*<>*/ e2$2 = cons_enum(m2, 0), - /*<>*/ e1$2 = cons_enum(m1, 0), - e1 = e1$2, - e2 = e2$2; - /*<>*/ for(;;){ - if(! e1) return e2 ? -1 : 0; - if(! e2) /*<>*/ return 1; - /*<>*/ var - e2$0 = e2[4], - r2 = e2[3], - d2 = e2[2], - v2 = e2[1], - e1$0 = e1[4], - r1 = e1[3], - d1 = e1[2], - v1 = e1[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 !== c) /*<>*/ return c; - /*<>*/ /*<>*/ var - c$0 = /*<>*/ caml_call2(cmp, d1, d2); - /*<>*/ if(0 !== c$0) - /*<>*/ return c$0; - /*<>*/ var - /*<>*/ e2$1 = cons_enum(r2, e2$0), - /*<>*/ e1$1 = cons_enum(r1, e1$0), - e1 = e1$1, - e2 = e2$1; - } - /*<>*/ } - function equal(cmp, m1, m2){ - /*<>*/ var - /*<>*/ e2$2 = cons_enum(m2, 0), - /*<>*/ e1$2 = cons_enum(m1, 0), - e1 = e1$2, - e2 = e2$2; - /*<>*/ for(;;){ - if(! e1) return e2 ? 0 : 1; - if(! e2) /*<>*/ return 0; - var - e2$0 = e2[4], - r2 = e2[3], - d2 = e2[2], - v2 = e2[1], - e1$0 = e1[4], - r1 = e1[3], - d1 = e1[2], - v1 = e1[1], - _q_ = - 0 === /*<>*/ caml_call2(Ord[1], v1, v2) ? 1 : 0; - if(_q_){ - /*<>*/ /*<>*/ var - _r_ = /*<>*/ caml_call2(cmp, d1, d2); - /*<>*/ if(_r_){ - /*<>*/ var - /*<>*/ e2$1 = cons_enum(r2, e2$0), - /*<>*/ e1$1 = cons_enum(r1, e1$0), - e1 = e1$1, - e2 = e2$1; - continue; - } - var _s_ = _r_; - } - else - var _s_ = _q_; - /*<>*/ return _s_; - } - /*<>*/ } - function cardinal(param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - r = param[4], - l = param[1], - /*<>*/ _p_ = cardinal(r); - return (cardinal(l) + 1 | 0) + _p_ | 0; - /*<>*/ } - function bindings_aux(accu, param){ - var accu$0 = accu, param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return accu$0; - /*<>*/ var - r = param$0[4], - d = param$0[3], - v = param$0[2], - l = param$0[1], - /*<>*/ accu$1 = - [0, [0, v, d], bindings_aux(accu$0, r)], - accu$0 = accu$1, - param$0 = l; - } - } - function bindings(s){ - /*<>*/ return bindings_aux(0, s); - /*<>*/ } - function add_seq(i, m){ - function _o_(m, param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return add(k, v, m); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Seq[5], _o_, m, i); - /*<>*/ } - function of_seq(i){ - /*<>*/ return add_seq(i, empty); - /*<>*/ } - function seq_of_enum(c, param){ - /*<>*/ if(! c) /*<>*/ return 0; - /*<>*/ var - rest = c[4], - t = c[3], - v = c[2], - k = c[1], - /*<>*/ _m_ = cons_enum(t, rest); - /*<>*/ return [0, - [0, k, v], - function(_n_){ /*<>*/ return seq_of_enum(_m_, _n_);}]; - /*<>*/ } - function to_seq(m){ - /*<>*/ /*<>*/ var - _k_ = cons_enum(m, 0); - /*<>*/ return function(_l_){ - /*<>*/ return seq_of_enum(_k_, _l_);}; - /*<>*/ } - function snoc_enum(s, e){ - /*<>*/ var s$0 = s, e$0 = e; - /*<>*/ for(;;){ - if(! s$0) /*<>*/ return e$0; - /*<>*/ var - r = s$0[4], - d = s$0[3], - v = s$0[2], - l = s$0[1], - /*<>*/ e$1 = [0, v, d, l, e$0], - s$0 = r, - e$0 = e$1; - } - /*<>*/ } - function rev_seq_of_enum(c, param){ - /*<>*/ if(! c) /*<>*/ return 0; - /*<>*/ var - rest = c[4], - t = c[3], - v = c[2], - k = c[1], - /*<>*/ _i_ = snoc_enum(t, rest); - /*<>*/ return [0, - [0, k, v], - function(_j_){ /*<>*/ return rev_seq_of_enum(_i_, _j_);}]; - /*<>*/ } - function to_rev_seq(c){ - /*<>*/ /*<>*/ var - _g_ = snoc_enum(c, 0); - /*<>*/ return function(_h_){ - /*<>*/ return rev_seq_of_enum(_g_, _h_);}; - /*<>*/ } - function to_seq_from(low, m){ - /*<>*/ var m$0 = m, c = 0; - /*<>*/ for(;;){ - if(m$0){ - /*<>*/ var - r = m$0[4], - d = m$0[3], - v = m$0[2], - l = m$0[1], - /*<>*/ n = - /*<>*/ caml_call2(Ord[1], v, low); - if(0 !== n){ - if(0 <= n){ - /*<>*/ var - /*<>*/ c$0 = [0, v, d, r, c], - m$0 = l, - c = c$0; - continue; - } - var m$0 = r; - continue; - } - var _e_ = [0, v, d, r, c]; - } - else - var _e_ = c; - /*<>*/ return function(_f_){ - /*<>*/ return seq_of_enum(_e_, _f_);}; - } - /*<>*/ } - return [0, - empty, - is_empty, - mem, - add, - update, - singleton, - remove, - merge, - union, - compare, - equal, - iter, - fold, - for_all, - exists, - filter, - filter_map, - partition, - cardinal, - bindings, - min_binding, - min_binding_opt, - max_binding, - max_binding_opt, - min_binding, - min_binding_opt, - split, - find, - find_opt, - find_first, - find_first_opt, - find_last, - find_last_opt, - map, - mapi, - to_seq, - to_rev_seq, - to_seq_from, - add_seq, - of_seq]; - }]; - runtime.caml_register_global(11, Stdlib_Map, "Stdlib__Map"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Stack -//# unitInfo: Requires: Stdlib__List, Stdlib__Seq -(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 - global_data = runtime.caml_get_global_data(), - Stdlib_Seq = global_data.Stdlib__Seq, - Stdlib_List = global_data.Stdlib__List, - /*<>*/ Empty = - [248, "Stdlib.Stack.Empty", runtime.caml_fresh_oo_id(0)]; - function create(param){ - /*<>*/ return [0, 0, 0]; - /*<>*/ } - function clear(s){ - /*<>*/ s[1] = 0; - s[2] = 0; - return 0; - /*<>*/ } - function copy(s){ - /*<>*/ return [0, s[1], s[2]]; - /*<>*/ } - function push(x, s){ - /*<>*/ s[1] = [0, x, s[1]]; - s[2] = s[2] + 1 | 0; - return 0; - /*<>*/ } - function pop(s){ - /*<>*/ var match = s[1]; - if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Empty, 1); - var tl = match[2], hd = match[1]; - s[1] = tl; - s[2] = s[2] - 1 | 0; - /*<>*/ return hd; - /*<>*/ } - function pop_opt(s){ - /*<>*/ var match = s[1]; - if(! match) /*<>*/ return 0; - var tl = match[2], hd = match[1]; - s[1] = tl; - s[2] = s[2] - 1 | 0; - /*<>*/ return [0, hd]; - /*<>*/ } - function top(s){ - /*<>*/ var match = s[1]; - if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Empty, 1); - var hd = match[1]; - /*<>*/ return hd; - /*<>*/ } - function top_opt(s){ - /*<>*/ var match = s[1]; - if(! match) /*<>*/ return 0; - var hd = match[1]; - /*<>*/ return [0, hd]; - /*<>*/ } - function is_empty(s){ - /*<>*/ return 0 === s[1] ? 1 : 0; - /*<>*/ } - function length(s){ - /*<>*/ return s[2]; - /*<>*/ } - function iter(f, s){ - /*<>*/ return caml_call2(Stdlib_List[17], f, s[1]); - /*<>*/ } - function fold(f, acc, s){ - /*<>*/ return caml_call3(Stdlib_List[25], f, acc, s[1]); - /*<>*/ } - function to_seq(s){ - /*<>*/ return caml_call1(Stdlib_List[61], s[1]); - /*<>*/ } - function add_seq(q, i){ - function _a_(x){ - /*<>*/ return push(x, q); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _a_, i); - /*<>*/ } - function of_seq(g){ - /*<>*/ /*<>*/ var s = create(0); - /*<>*/ add_seq(s, g); - /*<>*/ return s; - /*<>*/ } - var - Stdlib_Stack = - [0, - Empty, - create, - push, - pop, - pop_opt, - top, - top_opt, - clear, - copy, - is_empty, - length, - iter, - fold, - to_seq, - add_seq, - of_seq]; - runtime.caml_register_global(3, Stdlib_Stack, "Stdlib__Stack"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Queue -//# unitInfo: Requires: Stdlib__Seq -(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 - global_data = runtime.caml_get_global_data(), - Stdlib_Seq = global_data.Stdlib__Seq, - /*<>*/ Empty = - [248, "Stdlib.Queue.Empty", runtime.caml_fresh_oo_id(0)]; - function create(param){ - /*<>*/ return [0, 0, 0, 0]; - /*<>*/ } - function clear(q){ - /*<>*/ q[1] = 0; - q[2] = 0; - q[3] = 0; - return 0; - /*<>*/ } - function add(x, q){ - /*<>*/ var - /*<>*/ cell = [0, x, 0], - /*<>*/ match = q[3]; - return match - ? (q[1] = q[1] + 1 | 0, match[2] = cell, q[3] = cell, 0) - : (q[1] = 1, q[2] = cell, q[3] = cell, 0); - /*<>*/ } - function peek(q){ - /*<>*/ var match = q[2]; - if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Empty, 1); - var content = match[1]; - /*<>*/ return content; - /*<>*/ } - function peek_opt(q){ - /*<>*/ var match = q[2]; - if(! match) /*<>*/ return 0; - var content = match[1]; - /*<>*/ return [0, content]; - /*<>*/ } - function take(q){ - /*<>*/ var _g_ = q[2]; - if(! _g_) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Empty, 1); - var content = _g_[1]; - if(_g_[2]){ - var next = _g_[2]; - q[1] = q[1] - 1 | 0; - q[2] = next; - /*<>*/ return content; - } - /*<>*/ clear(q); - /*<>*/ return content; - /*<>*/ } - function take_opt(q){ - /*<>*/ var _f_ = q[2]; - if(! _f_) /*<>*/ return 0; - var content = _f_[1]; - if(_f_[2]){ - var next = _f_[2]; - q[1] = q[1] - 1 | 0; - q[2] = next; - /*<>*/ return [0, content]; - } - /*<>*/ clear(q); - /*<>*/ return [0, content]; - /*<>*/ } - function copy(q){ - /*<>*/ var - cell$0 = q[2], - /*<>*/ q_res = [0, q[1], 0, 0], - prev = 0, - cell = cell$0; - /*<>*/ for(;;){ - if(! cell){q_res[3] = prev; /*<>*/ return q_res;} - /*<>*/ var - content = cell[1], - next = cell[2], - /*<>*/ prev$0 = [0, content, 0]; - /*<>*/ if(prev) - prev[2] = prev$0; - else - q_res[2] = prev$0; - var prev = prev$0, cell = next; - } - /*<>*/ } - function is_empty(q){ - /*<>*/ return 0 === q[1] ? 1 : 0; - /*<>*/ } - function length(q){ - /*<>*/ return q[1]; - /*<>*/ } - function iter(f, q){ - /*<>*/ var cell$0 = q[2], cell = cell$0; - /*<>*/ for(;;){ - if(! cell) /*<>*/ return 0; - var content = cell[1], next = cell[2]; - /*<>*/ /*<>*/ caml_call1(f, content); - var cell = next; - } - /*<>*/ } - function fold(f, accu$1, q){ - /*<>*/ var cell$0 = q[2], accu = accu$1, cell = cell$0; - /*<>*/ for(;;){ - if(! cell) /*<>*/ return accu; - /*<>*/ var - content = cell[1], - next = cell[2], - /*<>*/ accu$0 = - /*<>*/ caml_call2(f, accu, content), - accu = accu$0, - cell = next; - } - /*<>*/ } - function transfer(q1, q2){ - /*<>*/ var _e_ = 0 < q1[1] ? 1 : 0; - if(! _e_) return _e_; - var match = q2[3]; - return match - ? (q2 - [1] - = q2[1] + q1[1] | 0, - match[2] = q1[2], - q2[3] = q1[3], - clear(q1)) - : (q2[1] = q1[1], q2[2] = q1[2], q2[3] = q1[3], clear(q1)); - /*<>*/ } - function to_seq(q){ - /*<>*/ function aux(c, param){ - /*<>*/ if(! c) /*<>*/ return 0; - var x = c[1], next = c[2]; - /*<>*/ return [0, - x, - function(_d_){ /*<>*/ return aux(next, _d_);}]; - /*<>*/ } - var _b_ = q[2]; - /*<>*/ return function(_c_){ - /*<>*/ return aux(_b_, _c_);}; - /*<>*/ } - function add_seq(q, i){ - function _a_(x){ - /*<>*/ return add(x, q); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _a_, i); - /*<>*/ } - function of_seq(g){ - /*<>*/ /*<>*/ var q = create(0); - /*<>*/ add_seq(q, g); - /*<>*/ return q; - /*<>*/ } - var - Stdlib_Queue = - [0, - Empty, - create, - add, - add, - take, - take_opt, - take, - peek, - peek_opt, - peek, - clear, - copy, - is_empty, - length, - iter, - fold, - transfer, - to_seq, - add_seq, - of_seq]; - runtime.caml_register_global(2, Stdlib_Queue, "Stdlib__Queue"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Buffer -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Bytes, Stdlib__Seq, Stdlib__String, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_blit_string = runtime.caml_blit_string, - 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, - caml_int64_bswap = runtime.caml_int64_bswap, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_bytes_length = runtime.caml_ml_bytes_length, - 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_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, - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib_Seq = global_data.Stdlib__Seq, - Stdlib = global_data.Stdlib, - Stdlib_String = global_data.Stdlib__String, - Assert_failure = global_data.Assert_failure, - cst_Buffer_truncate = "Buffer.truncate", - _a_ = [0, "buffer.ml", 220, 9], - cst_Buffer_add_channel = "Buffer.add_channel", - cst_Buffer_add_substring_add_s = "Buffer.add_substring/add_subbytes", - cst_Buffer_add_cannot_grow_buf = "Buffer.add: cannot grow buffer", - cst_Buffer_nth = "Buffer.nth", - cst_Buffer_blit = "Buffer.blit", - cst_Buffer_sub = "Buffer.sub"; - function create(n){ - /*<>*/ var - n$0 = 1 <= n ? n : 1, - n$1 = Stdlib_Sys[12] < n$0 ? Stdlib_Sys[12] : n$0, - /*<>*/ s = - /*<>*/ caml_create_bytes(n$1); - /*<>*/ return [0, [0, s, n$1], 0, s]; - /*<>*/ } - function contents(b){ - /*<>*/ return caml_call3 - (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]); - /*<>*/ } - 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); - /*<>*/ } - function blit(src, srcoff, dst, dstoff, len){ - /*<>*/ if - (0 <= len - && - 0 <= srcoff - && - (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); - /*<>*/ } - function nth(b, ofs){ - /*<>*/ var - position = b[2], - /*<>*/ match = b[1], - length = match[2], - buffer = match[1]; - if(0 <= ofs && position > ofs && length >= position) - return runtime.caml_bytes_unsafe_get(buffer, ofs); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Buffer_nth); - /*<>*/ } - function length(b){ - /*<>*/ return b[2]; - /*<>*/ } - function clear(b){ - /*<>*/ b[2] = 0; - return 0; - /*<>*/ } - function reset(b){ - /*<>*/ b[2] = 0; - /*<>*/ /*<>*/ var - inner = [0, b[3], caml_ml_bytes_length(b[3])]; - b[1] = inner; - return 0; - /*<>*/ } - function resize(b, more){ - /*<>*/ var - old_pos = b[2], - old_len = b[1][2], - /*<>*/ new_len = [0, old_len]; - for(;;){ - if(new_len[1] >= (old_pos + more | 0)){ - if(Stdlib_Sys[12] < new_len[1]) - 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); - /*<>*/ /*<>*/ var - new_buffer = /*<>*/ caml_create_bytes(new_len[1]); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Bytes[11], b[1][1], 0, new_buffer, 0, b[2]); - b[1] = [0, new_buffer, new_len[1]]; - return 0; - } - new_len[1] = 2 * new_len[1] | 0; - } - /*<>*/ } - function add_char(b, c){ - /*<>*/ var - pos = b[2], - /*<>*/ match = b[1], - length = match[2], - buffer = match[1]; - if(length <= pos){ - /*<>*/ resize(b, 1); - /*<>*/ /*<>*/ caml_bytes_set - (b[1][1], b[2], c); - } - else - caml_bytes_unsafe_set(buffer, pos, c); - b[2] = pos + 1 | 0; - return 0; - /*<>*/ } - var uchar_utf_8_byte_length_max = 4, uchar_utf_16_byte_length_max = 4; - function add_utf_8_uchar(b, u){ - /*<>*/ for(;;){ - 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); - /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} - /*<>*/ resize(b, uchar_utf_8_byte_length_max); - } - /*<>*/ } - function add_utf_16be_uchar(b, u){ - /*<>*/ for(;;){ - 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); - /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} - /*<>*/ resize(b, uchar_utf_16_byte_length_max); - } - /*<>*/ } - function add_utf_16le_uchar(b, u){ - /*<>*/ for(;;){ - 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); - /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} - /*<>*/ resize(b, uchar_utf_16_byte_length_max); - } - /*<>*/ } - function add_substring(b, s, offset, len){ - /*<>*/ var _r_ = offset < 0 ? 1 : 0; - if(_r_) - var _s_ = _r_; - else - var - _t_ = len < 0 ? 1 : 0, - _s_ = _t_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); - if(_s_) - /*<>*/ /*<>*/ caml_call1 - (Stdlib[1], cst_Buffer_add_substring_add_s); - /*<>*/ var - position = b[2], - /*<>*/ match = b[1], - length = match[2], - buffer = match[1], - 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); - } - else - /*<>*/ /*<>*/ caml_blit_string - (s, offset, buffer, position, len); - b[2] = new_position; - return 0; - /*<>*/ } - function add_subbytes(b, s, offset, len){ - /*<>*/ return add_substring - (b, - /*<>*/ caml_call1(Stdlib_Bytes[44], s), - offset, - len); - /*<>*/ } - function add_string(b, s){ - /*<>*/ var - len = caml_ml_string_length(s), - /*<>*/ position = b[2], - /*<>*/ match = b[1], - length = match[2], - buffer = match[1], - new_position = b[2] + len | 0; - if(length < new_position){ - /*<>*/ resize(b, len); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Bytes[12], s, 0, b[1][1], b[2], len); - } - else - /*<>*/ /*<>*/ caml_blit_string - (s, 0, buffer, position, len); - b[2] = new_position; - return 0; - /*<>*/ } - function add_bytes(b, s){ - /*<>*/ return add_string - (b, /*<>*/ caml_call1(Stdlib_Bytes[44], s)); - /*<>*/ } - function add_buffer(b, bs){ - /*<>*/ return add_subbytes(b, bs[1][1], 0, bs[2]); - /*<>*/ } - function add_channel(b, ic, to_read$1){ - /*<>*/ var - _p_ = to_read$1 < 0 ? 1 : 0, - _q_ = _p_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); - if(_q_) - /*<>*/ /*<>*/ caml_call1 - (Stdlib[1], cst_Buffer_add_channel); - if(b[1][2] < (b[2] + to_read$1 | 0)) - /*<>*/ resize(b, to_read$1); - var - ofs$1 = b[2], - buf = b[1][1], - already_read = 0, - ofs = ofs$1, - to_read = to_read$1; - /*<>*/ for(;;){ - if(0 !== to_read){ - /*<>*/ /*<>*/ var - r = - /*<>*/ caml_call4 - (Stdlib[84], ic, buf, ofs, to_read); - /*<>*/ if(0 !== r){ - var - already_read$0 = already_read + r | 0, - ofs$0 = ofs + r | 0, - to_read$0 = to_read - r | 0, - already_read = already_read$0, - ofs = ofs$0, - to_read = to_read$0; - continue; - } - } - b[2] = b[2] + already_read | 0; - if(already_read < to_read$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[12], 1); - /*<>*/ return 0; - } - /*<>*/ } - function output_buffer(oc, b){ - /*<>*/ return caml_call4 - (Stdlib[68], oc, b[1][1], 0, b[2]); - /*<>*/ } - function add_substitute(b, f, s){ - /*<>*/ var - lim$1 = caml_ml_string_length(s), - previous = 32, - i$4 = 0; - /*<>*/ for(;;){ - if(i$4 >= lim$1){ - var _o_ = 92 === previous ? 1 : 0; - return _o_ ? add_char(b, previous) : _o_; - } - /*<>*/ /*<>*/ var - previous$0 = /*<>*/ caml_string_get(s, i$4); - if(36 === previous$0) - if(92 === previous){ - /*<>*/ add_char(b, previous$0); - /*<>*/ var - /*<>*/ i$5 = i$4 + 1 | 0, - previous = 32, - i$4 = i$5; - } - else{ - /*<>*/ /*<>*/ var - start$0 = i$4 + 1 | 0; - if(lim$1 <= start$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - /*<>*/ /*<>*/ var - opening = /*<>*/ caml_string_get(s, start$0); - a: - { - if(40 !== opening && 123 !== opening){ - /*<>*/ var - /*<>*/ start = start$0 + 1 | 0, - lim$0 = caml_ml_string_length(s), - i$2 = start; - /*<>*/ for(;;){ - b: - { - if(lim$0 > i$2){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_string_get(s, i$2); - c: - { - if(91 <= match){ - if(97 <= match){ - if(123 > match) break c; - } - else if(95 === match) break c; - } - else - if(58 <= match){ - if(65 <= match) break c; - } - else if(48 <= match) break c; - var stop$0 = i$2; - break b; - } - var i$3 = i$2 + 1 | 0, i$2 = i$3; - continue; - } - var stop$0 = lim$0; - } - var - match$0 = - [0, - /*<>*/ caml_call3 - (Stdlib_String[15], s, start$0, stop$0 - start$0 | 0), - stop$0]; - break a; - } - } - /*<>*/ var - /*<>*/ new_start = start$0 + 1 | 0, - k$2 = 0; - if(40 === opening) - var closing = 41; - else{ - if(123 !== opening) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - var closing = 125; - } - var lim = caml_ml_string_length(s), k = k$2, stop = new_start; - /*<>*/ for(;;){ - if(lim <= stop) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - if( /*<>*/ caml_string_get(s, stop) === opening) - var i = stop + 1 | 0, k$0 = k + 1 | 0, k = k$0, stop = i; - else if - ( /*<>*/ caml_string_get(s, stop) === closing){ - if(0 === k){ - var - match$0 = - [0, - /*<>*/ caml_call3 - (Stdlib_String[15], - s, - new_start, - (stop - start$0 | 0) - 1 | 0), - stop + 1 | 0]; - break; - } - var i$0 = stop + 1 | 0, k$1 = k - 1 | 0, k = k$1, stop = i$0; - } - else - var i$1 = stop + 1 | 0, stop = i$1; - } - } - var next_i = match$0[2], ident = match$0[1]; - /*<>*/ add_string - (b, /*<>*/ caml_call1(f, ident)); - var previous = 32, i$4 = next_i; - } - else if(92 === previous){ - /*<>*/ add_char(b, 92); - /*<>*/ add_char(b, previous$0); - /*<>*/ var - /*<>*/ i$6 = i$4 + 1 | 0, - previous = 32, - i$4 = i$6; - } - else if(92 === previous$0) - /*<>*/ var - /*<>*/ i$7 = i$4 + 1 | 0, - previous = previous$0, - i$4 = i$7; - else{ - /*<>*/ add_char(b, previous$0); - /*<>*/ var - /*<>*/ i$8 = i$4 + 1 | 0, - previous = previous$0, - i$4 = i$8; - } - } - /*<>*/ } - function truncate(b, len){ - /*<>*/ if(0 <= len && b[2] >= len){b[2] = len; return 0;} - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Buffer_truncate); - /*<>*/ } - function to_seq(b){ - function aux(i, param){ - /*<>*/ if(b[2] <= i) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = - /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _m_ = i + 1 | 0; - /*<>*/ return [0, - x, - function(_n_){ /*<>*/ return aux(_m_, _n_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _k_ = 0; - /*<>*/ return function(_l_){ - /*<>*/ return aux(_k_, _l_);}; - /*<>*/ } - function to_seqi(b){ - function aux(i, param){ - /*<>*/ if(b[2] <= i) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = - /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _i_ = i + 1 | 0; - /*<>*/ return [0, - [0, i, x], - function(_j_){ /*<>*/ return aux(_i_, _j_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _g_ = 0; - /*<>*/ return function(_h_){ - /*<>*/ return aux(_g_, _h_);}; - /*<>*/ } - function add_seq(b, seq){ - /*<>*/ function _e_(_f_){ - /*<>*/ return add_char(b, _f_); - } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _e_, seq); - /*<>*/ } - function of_seq(i){ - /*<>*/ /*<>*/ var b = create(32); - /*<>*/ add_seq(b, i); - /*<>*/ return b; - /*<>*/ } - function add_int8(b, x){ - /*<>*/ var - position = b[2], - /*<>*/ match = b[1], - length = match[2], - buffer = match[1], - /*<>*/ new_position = position + 1 | 0; - if(length < new_position){ - /*<>*/ resize(b, 1); - /*<>*/ /*<>*/ caml_bytes_set - (b[1][1], b[2], x); - } - else - caml_bytes_unsafe_set(buffer, position, x); - b[2] = new_position; - return 0; - /*<>*/ } - function add_int16_ne(b, x){ - /*<>*/ var - position = b[2], - /*<>*/ match = b[1], - length = match[2], - buffer = match[1], - /*<>*/ new_position = position + 2 | 0; - if(length < new_position){ - /*<>*/ resize(b, 2); - /*<>*/ /*<>*/ caml_bytes_set16 - (b[1][1], b[2], x); - } - else - /*<>*/ /*<>*/ caml_bytes_set16 - (buffer, position, x); - b[2] = new_position; - return 0; - /*<>*/ } - function add_int32_ne(b, x){ - /*<>*/ var - position = b[2], - /*<>*/ match = b[1], - length = match[2], - buffer = match[1], - /*<>*/ new_position = position + 4 | 0; - if(length < new_position){ - /*<>*/ resize(b, 4); - /*<>*/ /*<>*/ caml_bytes_set32 - (b[1][1], b[2], x); - } - else - /*<>*/ /*<>*/ caml_bytes_set32 - (buffer, position, x); - b[2] = new_position; - return 0; - /*<>*/ } - function add_int64_ne(b, x){ - /*<>*/ var - position = b[2], - /*<>*/ match = b[1], - length = match[2], - buffer = match[1], - /*<>*/ new_position = position + 8 | 0; - if(length < new_position){ - /*<>*/ resize(b, 8); - /*<>*/ /*<>*/ caml_bytes_set64 - (b[1][1], b[2], x); - } - else - /*<>*/ /*<>*/ caml_bytes_set64 - (buffer, position, x); - b[2] = new_position; - return 0; - /*<>*/ } - function add_int16_le(b, x){ - /*<>*/ var _d_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; - return add_int16_ne(b, _d_); - /*<>*/ } - function add_int16_be(b, x){ - /*<>*/ var x$0 = Stdlib_Sys[11] ? x : caml_bswap16(x); - /*<>*/ return add_int16_ne(b, x$0); - /*<>*/ } - function add_int32_le(b, x){ - /*<>*/ var - _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; - /*<>*/ return add_int32_ne(b, _c_); - /*<>*/ } - function add_int32_be(b, x){ - /*<>*/ var - x$0 = Stdlib_Sys[11] ? x : /*<>*/ caml_int32_bswap(x); - /*<>*/ return add_int32_ne(b, x$0); - /*<>*/ } - function add_int64_le(b, x){ - /*<>*/ var - _b_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; - /*<>*/ return add_int64_ne(b, _b_); - /*<>*/ } - function add_int64_be(b, x){ - /*<>*/ var - x$0 = Stdlib_Sys[11] ? x : /*<>*/ caml_int64_bswap(x); - /*<>*/ return add_int64_ne(b, x$0); - /*<>*/ } - var - Stdlib_Buffer = - [0, - create, - contents, - to_bytes, - sub, - blit, - nth, - length, - clear, - reset, - output_buffer, - truncate, - add_char, - add_utf_8_uchar, - add_utf_16le_uchar, - add_utf_16be_uchar, - add_string, - add_bytes, - add_substring, - add_subbytes, - add_substitute, - add_buffer, - add_channel, - to_seq, - to_seqi, - add_seq, - of_seq, - add_int8, - add_int8, - add_int16_ne, - add_int16_be, - add_int16_le, - add_int16_ne, - add_int16_be, - add_int16_le, - add_int32_ne, - add_int32_be, - add_int32_le, - add_int64_ne, - add_int64_be, - add_int64_le]; - runtime.caml_register_global(14, Stdlib_Buffer, "Stdlib__Buffer"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Mutex -(function(globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - Stdlib_Mutex = - [0, - runtime.caml_ml_mutex_new, - runtime.caml_ml_mutex_lock, - runtime.caml_ml_mutex_try_lock, - runtime.caml_ml_mutex_unlock]; - runtime.caml_register_global(0, Stdlib_Mutex, "Stdlib__Mutex"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Condition -(function(globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - Stdlib_Condition = - [0, - runtime.caml_ml_condition_new, - runtime.caml_ml_condition_wait, - runtime.caml_ml_condition_signal, - runtime.caml_ml_condition_broadcast]; - runtime.caml_register_global(0, Stdlib_Condition, "Stdlib__Condition"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Semaphore -//# unitInfo: Requires: Stdlib, Stdlib__Condition, Stdlib__Mutex -(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 - global_data = runtime.caml_get_global_data(), - Stdlib_Mutex = global_data.Stdlib__Mutex, - Stdlib_Condition = global_data.Stdlib__Condition, - Stdlib = global_data.Stdlib, - cst_Semaphore_Counting_release = "Semaphore.Counting.release: overflow", - cst_Semaphore_Counting_init_wr = - "Semaphore.Counting.init: wrong initial value"; - 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_]; - /*<>*/ } - function release(s){ - /*<>*/ /*<>*/ caml_call1 - (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]); - } - /*<>*/ /*<>*/ caml_call1 - (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]); - /*<>*/ for(;;){ - if(0 !== s[2]){ - s[2] = s[2] - 1 | 0; - return caml_call1(Stdlib_Mutex[4], s[1]); - } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Condition[2], s[3], s[1]); - } - /*<>*/ } - function try_acquire(s){ - /*<>*/ /*<>*/ caml_call1 - (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]); - /*<>*/ return ret; - /*<>*/ } - function get_value(s){ - /*<>*/ return s[2]; - /*<>*/ } - /*<>*/ /*<>*/ var - Counting = [0, make, release, acquire, try_acquire, get_value]; - function make$0(b){ - /*<>*/ var - /*<>*/ _a_ = - /*<>*/ caml_call1(Stdlib_Condition[1], 0), - _b_ = b ? 1 : 0; - /*<>*/ return [0, - /*<>*/ caml_call1(Stdlib_Mutex[1], 0), - _b_, - _a_]; - /*<>*/ } - function release$0(s){ - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Mutex[2], s[1]); - s[2] = 1; - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Condition[3], s[3]); - return caml_call1(Stdlib_Mutex[4], s[1]); - /*<>*/ } - function acquire$0(s){ - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Mutex[2], s[1]); - /*<>*/ for(;;){ - if(0 !== s[2]){s[2] = 0; return caml_call1(Stdlib_Mutex[4], s[1]);} - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Condition[2], s[3], s[1]); - } - /*<>*/ } - function try_acquire$0(s){ - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Mutex[2], s[1]); - var ret = 0 === s[2] ? 0 : (s[2] = 0, 1); - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Mutex[4], s[1]); - /*<>*/ return ret; - /*<>*/ } - /*<>*/ var - /*<>*/ Binary = - [0, make$0, release$0, acquire$0, try_acquire$0], - Stdlib_Semaphore = [0, Counting, Binary]; - runtime.caml_register_global(5, Stdlib_Semaphore, "Stdlib__Semaphore"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Domain -//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Atomic, Stdlib__Condition, Stdlib__List, Stdlib__Mutex -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_check_bound = runtime.caml_check_bound, - caml_domain_dls_set = runtime.caml_domain_dls_set, - caml_make_vect = runtime.caml_make_vect, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_domain_id = runtime.caml_ml_domain_id, - 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) - : 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 - global_data = runtime.caml_get_global_data(), - Stdlib_Mutex = global_data.Stdlib__Mutex, - Stdlib_Condition = global_data.Stdlib__Condition, - Stdlib = global_data.Stdlib, - Stdlib_Atomic = global_data.Stdlib__Atomic, - Stdlib_List = global_data.Stdlib__List, - Stdlib_Array = global_data.Stdlib__Array, - cst_internal_error_Am_I_alread = "internal error: Am I already finished?", - cst_first_domain_already_spawn = "first domain already spawned"; - function cpu_relax(param){ - /*<>*/ return /*<>*/ runtime.caml_ml_domain_cpu_relax - (0); - /*<>*/ } - /*<>*/ /*<>*/ var - unique_value = [0, 0]; - function create_dls(param){ - /*<>*/ /*<>*/ var - st = /*<>*/ caml_make_vect(8, unique_value); - /*<>*/ return /*<>*/ caml_domain_dls_set - (st); - /*<>*/ } - /*<>*/ create_dls(0); - /*<>*/ var - /*<>*/ key_counter = - /*<>*/ caml_call1(Stdlib_Atomic[1], 0), - /*<>*/ parent_keys = - /*<>*/ caml_call1(Stdlib_Atomic[1], 0); - function new_key(split_from_parent, init_orphan){ - /*<>*/ var - /*<>*/ idx = - /*<>*/ caml_call2(Stdlib_Atomic[6], 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[2], parent_keys); - if - (! - (1 - - - /*<>*/ caml_call3 - (Stdlib_Atomic[5], parent_keys, l, [0, ki, l]))) - break; - } - } - /*<>*/ return k; - /*<>*/ } - function maybe_grow(idx){ - /*<>*/ var - st = runtime.caml_domain_dls_get(0), - /*<>*/ sz = st.length - 1; - if(idx < sz) /*<>*/ return st; - var new_sz = sz; - /*<>*/ for(;;){ - if(idx < new_sz){ - /*<>*/ /*<>*/ var - new_st = /*<>*/ caml_make_vect(new_sz, unique_value); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Array[8], st, 0, new_st, 0, sz); - /*<>*/ /*<>*/ caml_domain_dls_set - (new_st); - /*<>*/ return new_st; - } - var s = 2 * new_sz | 0, new_sz = s; - } - /*<>*/ } - function set(param, x){ - /*<>*/ var - idx = param[1], - /*<>*/ st = maybe_grow(idx); - /*<>*/ caml_check_bound(st, idx)[1 + idx] = x; - /*<>*/ return 0; - } - function get(param){ - /*<>*/ var - init = param[2], - idx = param[1], - /*<>*/ st = maybe_grow(idx), - /*<>*/ v = caml_check_bound(st, idx)[1 + idx]; - if(v !== unique_value) /*<>*/ return v; - /*<>*/ /*<>*/ var - v$0 = /*<>*/ caml_call1(init, 0); - /*<>*/ caml_check_bound(st, idx)[1 + idx] = v$0; - /*<>*/ return v$0; - } - function get_id(param){ - var domain = param[1]; - /*<>*/ return domain; - } - function self(param){ - /*<>*/ return /*<>*/ caml_ml_domain_id - (0); - /*<>*/ } - function is_main_domain(param){ - /*<>*/ return 0 - === /*<>*/ caml_ml_domain_id(0) - ? 1 - : 0; - /*<>*/ } - /*<>*/ var - /*<>*/ first_domain_spawned = - /*<>*/ caml_call1(Stdlib_Atomic[1], 0), - /*<>*/ first_spawn_function = - [0, - function(param){ - /*<>*/ return 0; - /*<>*/ }]; - function before_first_spawn(f){ - /*<>*/ if - ( /*<>*/ caml_call1 - (Stdlib_Atomic[2], first_domain_spawned)) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], cst_first_domain_already_spawn], 1); - var old_f = first_spawn_function[1]; - function new_f(param){ - /*<>*/ /*<>*/ caml_call1(old_f, 0); - /*<>*/ return /*<>*/ caml_call1 - (f, 0); - /*<>*/ } - first_spawn_function[1] = new_f; - return 0; - /*<>*/ } - /*<>*/ /*<>*/ var - at_exit_key = - new_key - (0, - function(param, _e_){ - /*<>*/ return 0; - /*<>*/ }); - function at_exit(f){ - /*<>*/ /*<>*/ var - old_exit = get(at_exit_key); - function new_exit(param){ - /*<>*/ /*<>*/ caml_call1(f, 0); - /*<>*/ return /*<>*/ caml_call1 - (old_exit, 0); - /*<>*/ } - /*<>*/ return set(at_exit_key, new_exit); - /*<>*/ } - function do_at_exit(param){ - /*<>*/ /*<>*/ var - f = get(at_exit_key); - /*<>*/ return /*<>*/ caml_call1(f, 0); - /*<>*/ } - Stdlib[104][1] = do_at_exit; - function spawn(f){ - /*<>*/ if - (1 - - - /*<>*/ caml_call1 - (Stdlib_Atomic[2], first_domain_spawned)){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Atomic[3], first_domain_spawned, 1); - /*<>*/ /*<>*/ caml_call1 - (first_spawn_function[1], 0); - first_spawn_function[1] = - function(param){ - /*<>*/ return 0; - /*<>*/ }; - } - /*<>*/ /*<>*/ var - _a_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); - function _b_(param){ - /*<>*/ var split = param[2], k = param[1], idx = k[1]; - /*<>*/ return [0, - idx, - /*<>*/ caml_call1(split, get(k))]; - /*<>*/ } - /*<>*/ var - /*<>*/ pk = - /*<>*/ caml_call2(Stdlib_List[19], _b_, _a_), - /*<>*/ term_mutex = - /*<>*/ caml_call1(Stdlib_Mutex[1], 0), - /*<>*/ term_condition = - /*<>*/ caml_call1(Stdlib_Condition[1], 0), - /*<>*/ term_state = [0, 0]; - function body(param){ - /*<>*/ a: - { - /*<>*/ try{ - /*<>*/ create_dls(0); - var - _c_ = - function(param){ - /*<>*/ var - v = param[2], - idx = param[1], - /*<>*/ st = maybe_grow(idx); - /*<>*/ caml_check_bound(st, idx)[1 + idx] = v; - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _c_, pk); - /*<>*/ /*<>*/ var - res = /*<>*/ caml_call1(f, 0); - } - catch(ex$0){ - var ex = caml_wrap_exception(ex$0), result = [1, ex]; - break a; - } - var result = [0, res]; - } - /*<>*/ try{ - /*<>*/ do_at_exit(0); - var result$0 = result; - } - catch(ex){ - /*<>*/ var - ex$0 = caml_wrap_exception(ex), - /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, - result$0 = _d_; - } - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Mutex[2], term_mutex); - return term_state[1] - ? /*<>*/ caml_call1 - (Stdlib[2], cst_internal_error_Am_I_alread) - : (term_state - [1] - = [0, result$0], - /*<>*/ caml_call1 - (Stdlib_Condition[4], term_condition)); - /*<>*/ } - /*<>*/ return [0, - /*<>*/ runtime.caml_domain_spawn - (body, term_mutex), - term_mutex, - term_condition, - term_state]; - /*<>*/ } - function join(param){ - var - term_state = param[4], - term_condition = param[3], - term_mutex = param[2]; - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Mutex[2], term_mutex); - /*<>*/ for(;;){ - var match = term_state[1]; - if(match){ - var res = match[1]; - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Mutex[4], term_mutex); - if(0 === res[0]){var x = res[1]; /*<>*/ return x;} - var ex = res[1]; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (ex, 1); - } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Condition[2], term_condition, term_mutex); - } - } - var - recommended_domain_count = runtime.caml_recommended_domain_count, - Stdlib_Domain = - [0, - spawn, - join, - get_id, - self, - before_first_spawn, - at_exit, - cpu_relax, - is_main_domain, - recommended_domain_count, - [0, new_key, get, set]]; - runtime.caml_register_global(8, Stdlib_Domain, "Stdlib__Domain"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: CamlinternalFormat -//# unitInfo: Requires: Assert_failure, CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Char, Stdlib__Int, Stdlib__String, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst$43 = "", - cst_and = " and ", - cst_Li$3 = "%Li", - cst_i$3 = "%i", - cst_li$3 = "%li", - cst_ni$3 = "%ni", - cst_u$0 = "%u", - cst$42 = "' '", - cst$41 = "'#'", - cst$39 = "'*'", - cst$40 = "'+'", - cst$44 = ", ", - cst_0$3 = "0", - cst_at_character_number = ": at character number ", - cst$38 = "@[", - cst$37 = "@{", - cst_bad_input_format_type_mism = - "bad input: format type mismatch between ", - cst_bad_input_format_type_mism$0 = - "bad input: format type mismatch between %S and %S", - cst_camlinternalFormat_ml = "camlinternalFormat.ml", - cst_invalid_format = "invalid format ", - cst_precision$3 = "precision", - caml_blit_string = runtime.caml_blit_string, - caml_bytes_set = runtime.caml_bytes_set, - caml_create_bytes = runtime.caml_create_bytes, - caml_format_float = runtime.caml_format_float, - caml_format_int = runtime.caml_format_int, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_string_length = runtime.caml_ml_string_length, - caml_notequal = runtime.caml_notequal, - caml_string_get = runtime.caml_string_get, - caml_string_notequal = runtime.caml_string_notequal, - caml_string_unsafe_get = runtime.caml_string_unsafe_get, - 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) - : 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(), - cst$9 = "%{", - cst$10 = "%}", - cst$11 = "%(", - cst$12 = "%)", - cst$13 = "%?", - cst$18 = cst$37, - cst$19 = cst$38, - cst$20 = cst$37, - cst$21 = cst$38, - cst$22 = cst$37, - cst$23 = cst$38, - cst$26 = cst$39, - cst$24 = "'-'", - cst$25 = cst$39, - cst$27 = cst$40, - cst$28 = cst$41, - cst$29 = cst$42, - cst$30 = cst$40, - cst$31 = "'_'", - sub_format = [0, 0, cst$43], - formatting_lit = [0, "@;", 1, 0], - cst$35 = cst$41, - cst$32 = cst$40, - cst$33 = cst$40, - cst$34 = cst$42, - cst$36 = cst$40, - cst$17 = ".", - cst$14 = "%!", - cst$15 = cst$37, - cst$16 = cst$38, - cst$8 = "%%", - cst$0 = "@]", - cst$1 = "@}", - cst$2 = "@?", - cst$3 = "@\n", - cst$4 = "@.", - cst$5 = "@@", - cst$6 = "@%", - cst$7 = "@", - cst = ".*", - Assert_failure = global_data.Assert_failure, - CamlinternalFormatBasics = global_data.CamlinternalFormatBasics, - Stdlib = global_data.Stdlib, - Stdlib_Buffer = global_data.Stdlib__Buffer, - Stdlib_String = global_data.Stdlib__String, - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib_Char = global_data.Stdlib__Char, - Stdlib_Bytes = global_data.Stdlib__Bytes, - Stdlib_Int = global_data.Stdlib__Int, - cst_c = "%c", - cst_s = "%s", - cst_i = cst_i$3, - cst_li = cst_li$3, - cst_ni = cst_ni$3, - cst_Li = cst_Li$3, - cst_f = "%f", - cst_B = "%B", - cst_a = "%a", - cst_t = "%t", - cst_r = "%r", - cst_r$0 = "%_r", - _b_ = [0, cst_camlinternalFormat_ml, 850, 23], - _m_ = [0, cst_camlinternalFormat_ml, 814, 21], - _e_ = [0, cst_camlinternalFormat_ml, 815, 21], - _n_ = [0, cst_camlinternalFormat_ml, 818, 21], - _f_ = [0, cst_camlinternalFormat_ml, 819, 21], - _o_ = [0, cst_camlinternalFormat_ml, 822, 19], - _g_ = [0, cst_camlinternalFormat_ml, 823, 19], - _p_ = [0, cst_camlinternalFormat_ml, 826, 22], - _h_ = [0, cst_camlinternalFormat_ml, 827, 22], - _q_ = [0, cst_camlinternalFormat_ml, 831, 30], - _i_ = [0, cst_camlinternalFormat_ml, 832, 30], - _k_ = [0, cst_camlinternalFormat_ml, 836, 26], - _c_ = [0, cst_camlinternalFormat_ml, 837, 26], - _l_ = [0, cst_camlinternalFormat_ml, 846, 28], - _d_ = [0, cst_camlinternalFormat_ml, 847, 28], - _j_ = [0, cst_camlinternalFormat_ml, 851, 23], - _s_ = [0, cst_camlinternalFormat_ml, 1558, 4], - cst_Printf_bad_conversion = "Printf: bad conversion %[", - _t_ = [0, cst_camlinternalFormat_ml, 1626, 39], - _u_ = [0, cst_camlinternalFormat_ml, 1649, 31], - _v_ = [0, cst_camlinternalFormat_ml, 1650, 31], - cst_Printf_bad_conversion$0 = "Printf: bad conversion %_", - _w_ = [0, cst_camlinternalFormat_ml, 1830, 8], - ___ = - [0, - [11, cst_bad_input_format_type_mism, [3, 0, [11, cst_and, [3, 0, 0]]]], - cst_bad_input_format_type_mism$0], - _Z_ = - [0, - [11, cst_bad_input_format_type_mism, [3, 0, [11, cst_and, [3, 0, 0]]]], - cst_bad_input_format_type_mism$0], - _C_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, - cst_at_character_number, - [4, 0, 0, 0, [11, ", duplicate flag ", [1, 0]]]]]], - "invalid format %S: at character number %d, duplicate flag %C"], - cst_0 = cst_0$3, - cst_padding = "padding", - _D_ = [0, 1, 0], - _E_ = [0, 0], - cst_precision = cst_precision$3, - _F_ = [1, 0], - _G_ = [1, 1], - cst_0$2 = "'0'", - cst_0$0 = cst_0$3, - _I_ = [1, 1], - cst_0$1 = cst_0$3, - cst_precision$0 = cst_precision$3, - _H_ = [1, 1], - cst_precision$1 = cst_precision$3, - _M_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, - cst_at_character_number, - [4, - 0, - 0, - 0, - [11, - ", flag ", - [1, - [11, - " is only allowed after the '", - [12, 37, [11, "', before padding and precision", 0]]]]]]]]], - "invalid format %S: at character number %d, flag %C is only allowed after the '%%', before padding and precision"], - _J_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, - cst_at_character_number, - [4, - 0, - 0, - 0, - [11, ', invalid conversion "', [12, 37, [0, [12, 34, 0]]]]]]]], - 'invalid format %S: at character number %d, invalid conversion "%%%c"'], - _K_ = [0, 0], - cst_padding$0 = "`padding'", - _L_ = [0, 0], - cst_precision$2 = "`precision'", - _N_ = [0, [12, 64, 0]], - _O_ = [0, "@ ", 1, 0], - _P_ = [0, "@,", 0, 0], - _Q_ = [2, 60], - _R_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, - ": '", - [12, - 37, - [11, - "' alone is not accepted in character sets, use ", - [12, - 37, - [12, - 37, - [11, " instead at position ", [4, 0, 0, 0, [12, 46, 0]]]]]]]]]], - "invalid format %S: '%%' alone is not accepted in character sets, use %%%% instead at position %d."], - _S_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, - ": integer ", - [4, 0, 0, 0, [11, " is greater than the limit ", [4, 0, 0, 0, 0]]]]]], - "invalid format %S: integer %d is greater than the limit %d"], - cst_digit = "digit", - _T_ = [0, cst_camlinternalFormat_ml, 2837, 11], - _U_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, - ': unclosed sub-format, expected "', - [12, 37, [0, [11, '" at character number ', [4, 0, 0, 0, 0]]]]]]], - 'invalid format %S: unclosed sub-format, expected "%%%c" at character number %d'], - cst_character = "character ')'", - cst_character$0 = "character '}'", - _V_ = [0, cst_camlinternalFormat_ml, 2899, 34], - _W_ = [0, cst_camlinternalFormat_ml, 2935, 28], - _X_ = [0, cst_camlinternalFormat_ml, 2957, 11], - _Y_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, - cst_at_character_number, - [4, - 0, - 0, - 0, - [11, - cst$44, - [2, - 0, - [11, - " is incompatible with '", - [0, [11, "' in sub-format ", [3, 0, 0]]]]]]]]]], - "invalid format %S: at character number %d, %s is incompatible with '%c' in sub-format %S"], - _B_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, - cst_at_character_number, - [4, 0, 0, 0, [11, cst$44, [2, 0, [11, " expected, read ", [1, 0]]]]]]]], - "invalid format %S: at character number %d, %s expected, read %C"], - _A_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, - cst_at_character_number, - [4, 0, 0, 0, [11, ", '", [0, [11, "' without ", [2, 0, 0]]]]]]]], - "invalid format %S: at character number %d, '%c' without %s"], - cst_non_zero_widths_are_unsupp = - "non-zero widths are unsupported for %c conversions", - cst_unexpected_end_of_format = "unexpected end of format", - _z_ = - [0, - [11, - cst_invalid_format, - [3, - 0, - [11, cst_at_character_number, [4, 0, 0, 0, [11, cst$44, [2, 0, 0]]]]]], - "invalid format %S: at character number %d, %s"], - _y_ = - [0, - [11, "invalid box description ", [3, 0, 0]], - "invalid box description %S"], - _x_ = [0, 0, 4], - cst_nan = "nan", - cst_neg_infinity = "neg_infinity", - cst_infinity = "infinity", - _r_ = [0, 103], - cst_nd$0 = "%+nd", - cst_nd$1 = "% nd", - cst_ni$1 = "%+ni", - cst_ni$2 = "% ni", - cst_nx = "%nx", - cst_nx$0 = "%#nx", - cst_nX = "%nX", - cst_nX$0 = "%#nX", - cst_no = "%no", - cst_no$0 = "%#no", - cst_nd = "%nd", - cst_ni$0 = cst_ni$3, - cst_nu = "%nu", - cst_ld$0 = "%+ld", - cst_ld$1 = "% ld", - cst_li$1 = "%+li", - cst_li$2 = "% li", - cst_lx = "%lx", - cst_lx$0 = "%#lx", - cst_lX = "%lX", - cst_lX$0 = "%#lX", - cst_lo = "%lo", - cst_lo$0 = "%#lo", - cst_ld = "%ld", - cst_li$0 = cst_li$3, - cst_lu = "%lu", - cst_Ld$0 = "%+Ld", - cst_Ld$1 = "% Ld", - cst_Li$1 = "%+Li", - cst_Li$2 = "% Li", - cst_Lx = "%Lx", - cst_Lx$0 = "%#Lx", - cst_LX = "%LX", - cst_LX$0 = "%#LX", - cst_Lo = "%Lo", - cst_Lo$0 = "%#Lo", - cst_Ld = "%Ld", - cst_Li$0 = cst_Li$3, - cst_Lu = "%Lu", - cst_d$0 = "%+d", - cst_d$1 = "% d", - cst_i$1 = "%+i", - cst_i$2 = "% i", - cst_x = "%x", - cst_x$0 = "%#x", - cst_X = "%X", - cst_X$0 = "%#X", - cst_o = "%o", - cst_o$0 = "%#o", - cst_d = "%d", - cst_i$0 = cst_i$3, - cst_u = cst_u$0, - cst_0c = "0c", - _a_ = [0, 0, 0], - cst_CamlinternalFormat_Type_mi = "CamlinternalFormat.Type_mismatch"; - function create_char_set(param){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Bytes[1], 32, 0); - /*<>*/ } - function add_in_char_set(char_set, c){ - /*<>*/ var - str_ind = c >>> 3 | 0, - mask = 1 << (c & 7), - /*<>*/ _dU_ = - /*<>*/ runtime.caml_bytes_get - (char_set, str_ind) - | mask; - /*<>*/ return /*<>*/ caml_bytes_set - (char_set, - str_ind, - /*<>*/ caml_call1(Stdlib[29], _dU_)); - /*<>*/ } - function freeze_char_set(char_set){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[6], char_set); - /*<>*/ } - function rev_char_set(char_set){ - /*<>*/ var - /*<>*/ char_set$0 = create_char_set(0), - i = 0; - for(;;){ - /*<>*/ /*<>*/ var - _dS_ = - /*<>*/ caml_string_get(char_set, i) - ^ 255; - /*<>*/ /*<>*/ caml_bytes_set - (char_set$0, - i, - /*<>*/ caml_call1(Stdlib[29], _dS_)); - /*<>*/ /*<>*/ var - _dT_ = i + 1 | 0; - if(31 === i) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], char_set$0); - var i = _dT_; - } - /*<>*/ } - function is_in_char_set(char_set, c){ - /*<>*/ var - str_ind = c >>> 3 | 0, - mask = 1 << (c & 7); - return 0 - !== - ( /*<>*/ caml_string_get - (char_set, str_ind) - & mask) - ? 1 - : 0; - /*<>*/ } - function pad_of_pad_opt(pad_opt){ - /*<>*/ if(! pad_opt) - /*<>*/ return 0; - var width = pad_opt[1]; - /*<>*/ return [0, 1, width]; - /*<>*/ } - function param_format_of_ignored_format(ign, fmt){ - /*<>*/ if(typeof ign === "number") - switch(ign){ - case 0: - /*<>*/ return [0, [0, fmt]]; - case 1: - /*<>*/ return [0, [1, fmt]]; - case 2: - /*<>*/ return [0, [19, fmt]]; - default: /*<>*/ return [0, [22, fmt]]; - } - switch(ign[0]){ - case 0: - var pad_opt = ign[1]; - /*<>*/ return [0, - [2, pad_of_pad_opt(pad_opt), fmt]]; - case 1: - var pad_opt$0 = ign[1]; - /*<>*/ return [0, - [3, pad_of_pad_opt(pad_opt$0), fmt]]; - case 2: - var pad_opt$1 = ign[2], iconv = ign[1]; - /*<>*/ return [0, - [4, iconv, pad_of_pad_opt(pad_opt$1), 0, fmt]]; - case 3: - var pad_opt$2 = ign[2], iconv$0 = ign[1]; - /*<>*/ return [0, - [5, iconv$0, pad_of_pad_opt(pad_opt$2), 0, fmt]]; - case 4: - var pad_opt$3 = ign[2], iconv$1 = ign[1]; - /*<>*/ return [0, - [6, iconv$1, pad_of_pad_opt(pad_opt$3), 0, fmt]]; - case 5: - var pad_opt$4 = ign[2], iconv$2 = ign[1]; - /*<>*/ return [0, - [7, iconv$2, pad_of_pad_opt(pad_opt$4), 0, fmt]]; - case 6: - var prec_opt = ign[2], pad_opt$5 = ign[1]; - if(prec_opt) - var ndec = prec_opt[1], _dR_ = [0, ndec]; - else - var _dR_ = 0; - /*<>*/ return [0, - [8, _a_, pad_of_pad_opt(pad_opt$5), _dR_, fmt]]; - case 7: - var pad_opt$6 = ign[1]; - /*<>*/ return [0, - [9, pad_of_pad_opt(pad_opt$6), fmt]]; - case 8: - var fmtty = ign[2], pad_opt$7 = ign[1]; - /*<>*/ return [0, - [13, pad_opt$7, fmtty, fmt]]; - case 9: - var fmtty$0 = ign[2], pad_opt$8 = ign[1]; - /*<>*/ return [0, - [14, pad_opt$8, fmtty$0, fmt]]; - case 10: - var char_set = ign[2], width_opt = ign[1]; - /*<>*/ return [0, - [20, width_opt, char_set, fmt]]; - default: - var counter = ign[1]; - /*<>*/ return [0, [21, counter, fmt]]; - } - /*<>*/ } - function default_float_precision(fconv){ - /*<>*/ return 5 === fconv[2] ? 12 : -6; - /*<>*/ } - function buffer_create(init_size){ - /*<>*/ return [0, - 0, - /*<>*/ caml_create_bytes(init_size)]; - /*<>*/ } - function buffer_check_size(buf, overhead){ - /*<>*/ var - len = runtime.caml_ml_bytes_length(buf[2]), - min_len = buf[1] + overhead | 0, - _dP_ = len < min_len ? 1 : 0; - if(_dP_){ - /*<>*/ var - /*<>*/ new_len = - /*<>*/ caml_call2 - (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); - buf[2] = new_str; - var _dQ_ = 0; - } - else - var _dQ_ = _dP_; - return _dQ_; - /*<>*/ } - function buffer_add_char(buf, c){ - /*<>*/ buffer_check_size(buf, 1); - /*<>*/ /*<>*/ caml_bytes_set - (buf[2], buf[1], c); - buf[1] = buf[1] + 1 | 0; - return 0; - /*<>*/ } - function buffer_add_string(buf, s){ - /*<>*/ var - str_len = caml_ml_string_length(s); - /*<>*/ buffer_check_size(buf, str_len); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], s, 0, buf[2], buf[1], str_len); - buf[1] = buf[1] + str_len | 0; - return 0; - /*<>*/ } - function buffer_contents(buf){ - /*<>*/ return caml_call3 - (Stdlib_Bytes[8], buf[2], 0, buf[1]); - /*<>*/ } - function char_of_iconv(iconv){ - /*<>*/ switch(iconv){ - case 6: - case 7: - /*<>*/ return 120; - case 8: - case 9: - /*<>*/ return 88; - case 10: - case 11: - /*<>*/ return 111; - case 12: - case 15: - /*<>*/ return 117; - case 0: - case 1: - case 2: - case 13: - /*<>*/ return 100; - default: /*<>*/ return 105; - } - /*<>*/ } - function char_of_fconv(opt, fconv){ - /*<>*/ if(opt) - var sth = opt[1], cF = sth; - else - var cF = 70; - switch(fconv[2]){ - case 0: - /*<>*/ return 102; - case 1: - /*<>*/ return 101; - case 2: - /*<>*/ return 69; - case 3: - /*<>*/ return 103; - case 4: - /*<>*/ return 71; - case 5: - /*<>*/ return cF; - case 6: - /*<>*/ return 104; - case 7: - /*<>*/ return 72; - default: /*<>*/ return 70; - } - /*<>*/ } - function bprint_padty(buf, padty){ - /*<>*/ switch(padty){ - case 0: - /*<>*/ return buffer_add_char(buf, 45); - case 1: - /*<>*/ return 0; - default: - /*<>*/ return buffer_add_char(buf, 48); - } - /*<>*/ } - function bprint_ignored_flag(buf, ign_flag){ - /*<>*/ return ign_flag - ? buffer_add_char(buf, 95) - : ign_flag; - /*<>*/ } - function bprint_pad_opt(buf, pad_opt){ - /*<>*/ if(! pad_opt) - /*<>*/ return 0; - var width = pad_opt[1]; - /*<>*/ return buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], width)); - /*<>*/ } - function bprint_padding(buf, pad){ - /*<>*/ if(typeof pad === "number") - /*<>*/ return 0; - if(0 === pad[0]){ - var n = pad[2], padty = pad[1]; - /*<>*/ bprint_padty(buf, padty); - /*<>*/ return buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], n)); - } - var padty$0 = pad[1]; - /*<>*/ bprint_padty(buf, padty$0); - /*<>*/ return buffer_add_char(buf, 42); - /*<>*/ } - function bprint_precision(buf, prec){ - /*<>*/ if(typeof prec === "number") - return prec ? buffer_add_string(buf, cst) : 0; - var n = prec[1]; - /*<>*/ buffer_add_char(buf, 46); - /*<>*/ return buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], n)); - /*<>*/ } - function bprint_iconv_flag(buf, iconv){ - /*<>*/ switch(iconv){ - case 1: - case 4: - /*<>*/ return buffer_add_char(buf, 43); - case 2: - case 5: - /*<>*/ return buffer_add_char(buf, 32); - case 7: - case 9: - case 11: - case 13: - case 14: - case 15: - /*<>*/ return buffer_add_char(buf, 35); - default: /*<>*/ return 0; - } - /*<>*/ } - function bprint_altint_fmt(buf, ign_flag, iconv, pad, prec, c){ - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag(buf, ign_flag); - /*<>*/ bprint_iconv_flag(buf, iconv); - /*<>*/ bprint_padding(buf, pad); - /*<>*/ bprint_precision(buf, prec); - /*<>*/ buffer_add_char(buf, c); - /*<>*/ return buffer_add_char - (buf, char_of_iconv(iconv)); - /*<>*/ } - function bprint_fconv_flag(buf, fconv){ - /*<>*/ switch(fconv[1]){ - case 0: break; - case 1: - /*<>*/ buffer_add_char(buf, 43); break; - default: /*<>*/ buffer_add_char(buf, 32); - } - return 8 <= fconv[2] ? buffer_add_char(buf, 35) : 0; - /*<>*/ } - function string_of_formatting_lit(formatting_lit){ - /*<>*/ if - (typeof formatting_lit === "number") - switch(formatting_lit){ - case 0: - /*<>*/ return cst$0; - case 1: - /*<>*/ return cst$1; - case 2: - /*<>*/ return cst$2; - case 3: - /*<>*/ return cst$3; - case 4: - /*<>*/ return cst$4; - case 5: - /*<>*/ return cst$5; - default: /*<>*/ return cst$6; - } - switch(formatting_lit[0]){ - case 0: - var str = formatting_lit[1]; - /*<>*/ return str; - case 1: - var str$0 = formatting_lit[1]; - /*<>*/ return str$0; - default: - /*<>*/ var - c = formatting_lit[1], - /*<>*/ _dO_ = - /*<>*/ caml_call2 - (Stdlib_String[1], 1, c); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _dO_); - } - /*<>*/ } - function bprint_char_literal(buf, chr){ - /*<>*/ return 37 === chr - ? buffer_add_string(buf, cst$8) - : buffer_add_char(buf, chr); - /*<>*/ } - function bprint_string_literal(buf, str){ - /*<>*/ var - _dM_ = caml_ml_string_length(str) - 1 | 0, - /*<>*/ _dL_ = 0; - if(_dM_ >= 0){ - var i = _dL_; - for(;;){ - /*<>*/ bprint_char_literal - (buf, /*<>*/ caml_string_get(str, i)); - /*<>*/ /*<>*/ var - _dN_ = i + 1 | 0; - if(_dM_ === i) break; - var i = _dN_; - } - } - return 0; - /*<>*/ } - function bprint_fmtty(buf, fmtty){ - /*<>*/ var fmtty$0 = fmtty; - /*<>*/ for(;;){ - if(typeof fmtty$0 === "number") - /*<>*/ return 0; - switch(fmtty$0[0]){ - case 0: - var fmtty$1 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_c); - var fmtty$0 = fmtty$1; - break; - case 1: - var fmtty$2 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_s); - var fmtty$0 = fmtty$2; - break; - case 2: - var fmtty$3 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_i); - var fmtty$0 = fmtty$3; - break; - case 3: - var fmtty$4 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_li); - var fmtty$0 = fmtty$4; - break; - case 4: - var fmtty$5 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_ni); - var fmtty$0 = fmtty$5; - break; - case 5: - var fmtty$6 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_Li); - var fmtty$0 = fmtty$6; - break; - case 6: - var fmtty$7 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_f); - var fmtty$0 = fmtty$7; - break; - case 7: - var fmtty$8 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_B); - var fmtty$0 = fmtty$8; - break; - case 8: - var fmtty$9 = fmtty$0[2], sub_fmtty = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst$9); - /*<>*/ bprint_fmtty(buf, sub_fmtty); - /*<>*/ buffer_add_string(buf, cst$10); - var fmtty$0 = fmtty$9; - break; - case 9: - var fmtty$10 = fmtty$0[3], sub_fmtty$0 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst$11); - /*<>*/ bprint_fmtty(buf, sub_fmtty$0); - /*<>*/ buffer_add_string(buf, cst$12); - var fmtty$0 = fmtty$10; - break; - case 10: - var fmtty$11 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_a); - var fmtty$0 = fmtty$11; - break; - case 11: - var fmtty$12 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_t); - var fmtty$0 = fmtty$12; - break; - case 12: - var fmtty$13 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst$13); - var fmtty$0 = fmtty$13; - break; - case 13: - var fmtty$14 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_r); - var fmtty$0 = fmtty$14; - break; - default: - var fmtty$15 = fmtty$0[1]; - /*<>*/ buffer_add_string(buf, cst_r$0); - var fmtty$0 = fmtty$15; - } - } - /*<>*/ } - function int_of_custom_arity(param){ - /*<>*/ if(! param) - /*<>*/ return 0; - var x = param[1]; - return 1 + int_of_custom_arity(x) | 0; - /*<>*/ } - function string_of_fmt(fmt){ - /*<>*/ /*<>*/ var - buf = buffer_create(16); - function fmtiter(fmt, ign_flag){ - /*<>*/ var - fmt$0 = fmt, - ign_flag$0 = ign_flag; - /*<>*/ for(;;){ - if(typeof fmt$0 === "number") - /*<>*/ return 0; - switch(fmt$0[0]){ - case 0: - var rest = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ buffer_add_char(buf, 99); - var fmt$0 = rest, ign_flag$0 = 0; - break; - case 1: - var rest$0 = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ buffer_add_char(buf, 67); - var fmt$0 = rest$0, ign_flag$0 = 0; - break; - case 2: - var rest$1 = fmt$0[2], pad = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ bprint_padding(buf, pad); - /*<>*/ buffer_add_char(buf, 115); - var fmt$0 = rest$1, ign_flag$0 = 0; - break; - case 3: - var rest$2 = fmt$0[2], pad$0 = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ bprint_padding(buf, pad$0); - /*<>*/ buffer_add_char(buf, 83); - var fmt$0 = rest$2, ign_flag$0 = 0; - break; - case 4: - var - rest$3 = fmt$0[4], - prec = fmt$0[3], - pad$1 = fmt$0[2], - iconv = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ bprint_iconv_flag(buf, iconv); - /*<>*/ bprint_padding(buf, pad$1); - /*<>*/ bprint_precision(buf, prec); - /*<>*/ buffer_add_char - (buf, char_of_iconv(iconv)); - var fmt$0 = rest$3, ign_flag$0 = 0; - break; - case 5: - var - rest$4 = fmt$0[4], - prec$0 = fmt$0[3], - pad$2 = fmt$0[2], - iconv$0 = fmt$0[1]; - /*<>*/ bprint_altint_fmt - (buf, ign_flag$0, iconv$0, pad$2, prec$0, 108); - var fmt$0 = rest$4, ign_flag$0 = 0; - break; - case 6: - var - rest$5 = fmt$0[4], - prec$1 = fmt$0[3], - pad$3 = fmt$0[2], - iconv$1 = fmt$0[1]; - /*<>*/ bprint_altint_fmt - (buf, ign_flag$0, iconv$1, pad$3, prec$1, 110); - var fmt$0 = rest$5, ign_flag$0 = 0; - break; - case 7: - var - rest$6 = fmt$0[4], - prec$2 = fmt$0[3], - pad$4 = fmt$0[2], - iconv$2 = fmt$0[1]; - /*<>*/ bprint_altint_fmt - (buf, ign_flag$0, iconv$2, pad$4, prec$2, 76); - var fmt$0 = rest$6, ign_flag$0 = 0; - break; - case 8: - var - rest$7 = fmt$0[4], - prec$3 = fmt$0[3], - pad$5 = fmt$0[2], - fconv = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ bprint_fconv_flag(buf, fconv); - /*<>*/ bprint_padding(buf, pad$5); - /*<>*/ bprint_precision(buf, prec$3); - /*<>*/ buffer_add_char - (buf, char_of_fconv(0, fconv)); - var fmt$0 = rest$7, ign_flag$0 = 0; - break; - case 9: - var rest$8 = fmt$0[2], pad$6 = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ bprint_padding(buf, pad$6); - /*<>*/ buffer_add_char(buf, 66); - var fmt$0 = rest$8, ign_flag$0 = 0; - break; - case 10: - var rest$9 = fmt$0[1]; - /*<>*/ buffer_add_string(buf, cst$14); - var fmt$0 = rest$9; - break; - case 11: - var rest$10 = fmt$0[2], str = fmt$0[1]; - /*<>*/ bprint_string_literal(buf, str); - var fmt$0 = rest$10; - break; - case 12: - var rest$11 = fmt$0[2], chr = fmt$0[1]; - /*<>*/ bprint_char_literal(buf, chr); - var fmt$0 = rest$11; - break; - case 13: - var rest$12 = fmt$0[3], fmtty = fmt$0[2], pad_opt = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ bprint_pad_opt(buf, pad_opt); - /*<>*/ buffer_add_char(buf, 123); - /*<>*/ bprint_fmtty(buf, fmtty); - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ buffer_add_char(buf, 125); - var fmt$0 = rest$12, ign_flag$0 = 0; - break; - case 14: - var rest$13 = fmt$0[3], fmtty$0 = fmt$0[2], pad_opt$0 = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ bprint_pad_opt(buf, pad_opt$0); - /*<>*/ buffer_add_char(buf, 40); - /*<>*/ bprint_fmtty(buf, fmtty$0); - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ buffer_add_char(buf, 41); - var fmt$0 = rest$13, ign_flag$0 = 0; - break; - case 15: - var rest$14 = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ buffer_add_char(buf, 97); - var fmt$0 = rest$14, ign_flag$0 = 0; - break; - case 16: - var rest$15 = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ buffer_add_char(buf, 116); - var fmt$0 = rest$15, ign_flag$0 = 0; - break; - case 17: - var rest$16 = fmt$0[2], fmting_lit = fmt$0[1]; - /*<>*/ bprint_string_literal - (buf, string_of_formatting_lit(fmting_lit)); - var fmt$0 = rest$16; - break; - case 18: - var rest$17 = fmt$0[2], fmting_gen = fmt$0[1]; - /*<>*/ if(0 === fmting_gen[0]){ - var str$0 = fmting_gen[1][2]; - /*<>*/ buffer_add_string(buf, cst$15); - /*<>*/ buffer_add_string(buf, str$0); - } - else{ - var str$1 = fmting_gen[1][2]; - /*<>*/ buffer_add_string(buf, cst$16); - /*<>*/ buffer_add_string(buf, str$1); - } - var fmt$0 = rest$17; - break; - case 19: - var rest$18 = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ buffer_add_char(buf, 114); - var fmt$0 = rest$18, ign_flag$0 = 0; - break; - case 20: - var rest$19 = fmt$0[3], char_set = fmt$0[2], width_opt = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ bprint_pad_opt(buf, width_opt); - var - print_char = - function(buf, i){ - /*<>*/ /*<>*/ var - c = - /*<>*/ caml_call1 - (Stdlib[29], i); - return 37 === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37)) - : 64 - === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64)) - : buffer_add_char(buf, c); - /*<>*/ }; - /*<>*/ buffer_add_char(buf, 91); - /*<>*/ var - /*<>*/ set = - is_in_char_set(char_set, 0) - ? (buffer_add_char(buf, 94), rev_char_set(char_set)) - : char_set, - is_alone$0 = - function(set){ - function is_alone(c){ - /*<>*/ var - /*<>*/ after = - /*<>*/ caml_call1 - (Stdlib_Char[1], c + 1 | 0), - /*<>*/ before = - /*<>*/ caml_call1 - (Stdlib_Char[1], c - 1 | 0), - /*<>*/ _dH_ = - is_in_char_set(set, c); - /*<>*/ if(_dH_) - /*<>*/ var - /*<>*/ _dI_ = - is_in_char_set(set, before), - /*<>*/ _dJ_ = - _dI_ ? is_in_char_set(set, after) : _dI_, - _dK_ = 1 - _dJ_; - else - var _dK_ = _dH_; - /*<>*/ return _dK_; - /*<>*/ } - return is_alone; - }, - is_alone = is_alone$0(set); - /*<>*/ if(is_alone(93)) - /*<>*/ buffer_add_char(buf, 93); - var i = 1; - a: - /*<>*/ for(;;){ - b: - if(i < 256){ - /*<>*/ if - (! - is_in_char_set - (set, - /*<>*/ caml_call1(Stdlib[29], i))){ - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - continue; - } - /*<>*/ /*<>*/ var - switcher = - /*<>*/ caml_call1(Stdlib[29], i) - - 45 - | 0; - if(48 < switcher >>> 0){ - if(210 <= switcher){ - /*<>*/ print_char(buf, 255); - break b; - } - } - else if(46 < switcher - 1 >>> 0){ - /*<>*/ var - /*<>*/ i$2 = i + 1 | 0, - i = i$2; - continue; - } - /*<>*/ /*<>*/ var - i$1 = i + 1 | 0; - /*<>*/ if - (! - is_in_char_set - (set, - /*<>*/ caml_call1 - (Stdlib[29], i$1))){ - /*<>*/ print_char(buf, i$1 - 1 | 0); - /*<>*/ var - /*<>*/ i$6 = i$1 + 1 | 0, - i = i$6; - continue; - } - /*<>*/ /*<>*/ var - switcher$0 = - /*<>*/ caml_call1 - (Stdlib[29], i$1) - - 45 - | 0; - if(48 < switcher$0 >>> 0){ - if(210 <= switcher$0){ - /*<>*/ print_char(buf, 254); - /*<>*/ print_char(buf, 255); - break b; - } - } - else if - (46 < switcher$0 - 1 >>> 0 - && - ! - is_in_char_set - (set, - /*<>*/ caml_call1 - (Stdlib[29], i$1 + 1 | 0))){ - /*<>*/ print_char(buf, i$1 - 1 | 0); - /*<>*/ var - /*<>*/ i$5 = i$1 + 1 | 0, - i = i$5; - continue; - } - /*<>*/ if - (! - is_in_char_set - (set, - /*<>*/ caml_call1 - (Stdlib[29], i$1 + 1 | 0))){ - /*<>*/ print_char(buf, i$1 - 1 | 0); - /*<>*/ print_char(buf, i$1); - /*<>*/ var - /*<>*/ i$4 = i$1 + 2 | 0, - i = i$4; - continue; - } - /*<>*/ var - /*<>*/ j = i$1 + 2 | 0, - i$3 = i$1 - 1 | 0, - j$0 = j; - /*<>*/ for(;;){ - /*<>*/ if - (256 !== j$0 - && - is_in_char_set - (set, - /*<>*/ caml_call1 - (Stdlib[29], j$0))){ - /*<>*/ var - /*<>*/ j$1 = j$0 + 1 | 0, - j$0 = j$1; - continue; - } - /*<>*/ print_char(buf, i$3); - /*<>*/ print_char(buf, 45); - /*<>*/ print_char(buf, j$0 - 1 | 0); - if(j$0 >= 256) break; - /*<>*/ var - /*<>*/ i$7 = j$0 + 1 | 0, - i = i$7; - continue a; - } - } - /*<>*/ if(is_alone(45)) - /*<>*/ buffer_add_char(buf, 45); - /*<>*/ buffer_add_char(buf, 93); - var fmt$0 = rest$19, ign_flag$0 = 0; - break; - } - break; - case 21: - var rest$20 = fmt$0[2], counter = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - switch(counter){ - case 0: - var _dD_ = 108; break; - case 1: - var _dD_ = 110; break; - default: var _dD_ = 78; - } - /*<>*/ buffer_add_char(buf, _dD_); - var fmt$0 = rest$20, ign_flag$0 = 0; - break; - case 22: - var rest$21 = fmt$0[1]; - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ bprint_string_literal - (buf, cst_0c); - var fmt$0 = rest$21, ign_flag$0 = 0; - break; - case 23: - var - rest$22 = fmt$0[2], - ign = fmt$0[1], - fmt$1 = param_format_of_ignored_format(ign, rest$22)[1], - fmt$0 = fmt$1, - ign_flag$0 = 1; - break; - default: - /*<>*/ var - rest$23 = fmt$0[3], - arity = fmt$0[1], - /*<>*/ _dF_ = - int_of_custom_arity(arity), - _dE_ = 1; - if(_dF_ >= 1){ - var i$8 = _dE_; - for(;;){ - /*<>*/ buffer_add_char(buf, 37); - /*<>*/ bprint_ignored_flag - (buf, ign_flag$0); - /*<>*/ buffer_add_char(buf, 63); - /*<>*/ /*<>*/ var - _dG_ = i$8 + 1 | 0; - if(_dF_ === i$8) break; - var i$8 = _dG_; - } - } - var fmt$0 = rest$23, ign_flag$0 = 0; - } - } - /*<>*/ } - /*<>*/ fmtiter(fmt, 0); - /*<>*/ return buffer_contents(buf); - /*<>*/ } - function symm(param){ - /*<>*/ if(typeof param === "number") - /*<>*/ return 0; - switch(param[0]){ - case 0: - var rest = param[1]; - /*<>*/ return [0, symm(rest)]; - case 1: - var rest$0 = param[1]; - /*<>*/ return [1, symm(rest$0)]; - case 2: - var rest$1 = param[1]; - /*<>*/ return [2, symm(rest$1)]; - case 3: - var rest$2 = param[1]; - /*<>*/ return [3, symm(rest$2)]; - case 4: - var rest$3 = param[1]; - /*<>*/ return [4, symm(rest$3)]; - case 5: - var rest$4 = param[1]; - /*<>*/ return [5, symm(rest$4)]; - case 6: - var rest$5 = param[1]; - /*<>*/ return [6, symm(rest$5)]; - case 7: - var rest$6 = param[1]; - /*<>*/ return [7, symm(rest$6)]; - case 8: - var rest$7 = param[2], ty = param[1]; - /*<>*/ return [8, ty, symm(rest$7)]; - case 9: - var rest$8 = param[3], ty2 = param[2], ty1 = param[1]; - /*<>*/ return [9, ty2, ty1, symm(rest$8)]; - case 10: - var rest$9 = param[1]; - /*<>*/ return [10, symm(rest$9)]; - case 11: - var rest$10 = param[1]; - /*<>*/ return [11, symm(rest$10)]; - case 12: - var rest$11 = param[1]; - /*<>*/ return [12, symm(rest$11)]; - case 13: - var rest$12 = param[1]; - /*<>*/ return [13, symm(rest$12)]; - default: - var rest$13 = param[1]; - /*<>*/ return [14, symm(rest$13)]; - } - /*<>*/ } - function fmtty_rel_det(param){ - /*<>*/ if(typeof param !== "number") - switch(param[0]){ - case 0: - /*<>*/ var - rest = param[1], - /*<>*/ match = fmtty_rel_det(rest), - de = match[4], - ed = match[3], - af = match[2], - fa = match[1], - _di_ = - function(param){ - /*<>*/ af(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa(0); - /*<>*/ return 0; - /*<>*/ }, - _di_, - ed, - de]; - case 1: - /*<>*/ var - rest$0 = param[1], - /*<>*/ match$0 = fmtty_rel_det(rest$0), - de$0 = match$0[4], - ed$0 = match$0[3], - af$0 = match$0[2], - fa$0 = match$0[1], - _dj_ = - function(param){ - /*<>*/ af$0(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$0(0); - /*<>*/ return 0; - /*<>*/ }, - _dj_, - ed$0, - de$0]; - case 2: - /*<>*/ var - rest$1 = param[1], - /*<>*/ match$1 = fmtty_rel_det(rest$1), - de$1 = match$1[4], - ed$1 = match$1[3], - af$1 = match$1[2], - fa$1 = match$1[1], - _dk_ = - function(param){ - /*<>*/ af$1(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$1(0); - /*<>*/ return 0; - /*<>*/ }, - _dk_, - ed$1, - de$1]; - case 3: - /*<>*/ var - rest$2 = param[1], - /*<>*/ match$2 = fmtty_rel_det(rest$2), - de$2 = match$2[4], - ed$2 = match$2[3], - af$2 = match$2[2], - fa$2 = match$2[1], - _dl_ = - function(param){ - /*<>*/ af$2(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$2(0); - /*<>*/ return 0; - /*<>*/ }, - _dl_, - ed$2, - de$2]; - case 4: - /*<>*/ var - rest$3 = param[1], - /*<>*/ match$3 = fmtty_rel_det(rest$3), - de$3 = match$3[4], - ed$3 = match$3[3], - af$3 = match$3[2], - fa$3 = match$3[1], - _dm_ = - function(param){ - /*<>*/ af$3(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$3(0); - /*<>*/ return 0; - /*<>*/ }, - _dm_, - ed$3, - de$3]; - case 5: - /*<>*/ var - rest$4 = param[1], - /*<>*/ match$4 = fmtty_rel_det(rest$4), - de$4 = match$4[4], - ed$4 = match$4[3], - af$4 = match$4[2], - fa$4 = match$4[1], - _dn_ = - function(param){ - /*<>*/ af$4(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$4(0); - /*<>*/ return 0; - /*<>*/ }, - _dn_, - ed$4, - de$4]; - case 6: - /*<>*/ var - rest$5 = param[1], - /*<>*/ match$5 = fmtty_rel_det(rest$5), - de$5 = match$5[4], - ed$5 = match$5[3], - af$5 = match$5[2], - fa$5 = match$5[1], - _do_ = - function(param){ - /*<>*/ af$5(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$5(0); - /*<>*/ return 0; - /*<>*/ }, - _do_, - ed$5, - de$5]; - case 7: - /*<>*/ var - rest$6 = param[1], - /*<>*/ match$6 = fmtty_rel_det(rest$6), - de$6 = match$6[4], - ed$6 = match$6[3], - af$6 = match$6[2], - fa$6 = match$6[1], - _dp_ = - function(param){ - /*<>*/ af$6(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$6(0); - /*<>*/ return 0; - /*<>*/ }, - _dp_, - ed$6, - de$6]; - case 8: - /*<>*/ var - rest$7 = param[2], - /*<>*/ match$7 = fmtty_rel_det(rest$7), - de$7 = match$7[4], - ed$7 = match$7[3], - af$7 = match$7[2], - fa$7 = match$7[1], - _dq_ = - function(param){ - /*<>*/ af$7(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$7(0); - /*<>*/ return 0; - /*<>*/ }, - _dq_, - ed$7, - de$7]; - case 9: - /*<>*/ var - rest$8 = param[3], - ty2 = param[2], - ty1 = param[1], - /*<>*/ match$8 = fmtty_rel_det(rest$8), - de$8 = match$8[4], - ed$8 = match$8[3], - af$8 = match$8[2], - fa$8 = match$8[1], - /*<>*/ ty = trans(symm(ty1), ty2), - /*<>*/ match$9 = fmtty_rel_det(ty), - jd = match$9[4], - dj = match$9[3], - ga = match$9[2], - ag = match$9[1], - _dr_ = - function(param){ - /*<>*/ jd(0); - /*<>*/ de$8(0); - /*<>*/ return 0; - /*<>*/ }, - _ds_ = - function(param){ - /*<>*/ ed$8(0); - /*<>*/ dj(0); - /*<>*/ return 0; - /*<>*/ }, - _dt_ = - function(param){ - /*<>*/ ga(0); - /*<>*/ af$8(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$8(0); - /*<>*/ ag(0); - /*<>*/ return 0; - /*<>*/ }, - _dt_, - _ds_, - _dr_]; - case 10: - /*<>*/ var - rest$9 = param[1], - /*<>*/ match$10 = - fmtty_rel_det(rest$9), - de$9 = match$10[4], - ed$9 = match$10[3], - af$9 = match$10[2], - fa$9 = match$10[1], - _du_ = - function(param){ - /*<>*/ af$9(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$9(0); - /*<>*/ return 0; - /*<>*/ }, - _du_, - ed$9, - de$9]; - case 11: - /*<>*/ var - rest$10 = param[1], - /*<>*/ match$11 = - fmtty_rel_det(rest$10), - de$10 = match$11[4], - ed$10 = match$11[3], - af$10 = match$11[2], - fa$10 = match$11[1], - _dv_ = - function(param){ - /*<>*/ af$10(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$10(0); - /*<>*/ return 0; - /*<>*/ }, - _dv_, - ed$10, - de$10]; - case 12: - /*<>*/ var - rest$11 = param[1], - /*<>*/ match$12 = - fmtty_rel_det(rest$11), - de$11 = match$12[4], - ed$11 = match$12[3], - af$11 = match$12[2], - fa$11 = match$12[1], - _dw_ = - function(param){ - /*<>*/ af$11(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$11(0); - /*<>*/ return 0; - /*<>*/ }, - _dw_, - ed$11, - de$11]; - case 13: - /*<>*/ var - rest$12 = param[1], - /*<>*/ match$13 = - fmtty_rel_det(rest$12), - de$12 = match$13[4], - ed$12 = match$13[3], - af$12 = match$13[2], - fa$12 = match$13[1], - /*<>*/ _dx_ = - function(param){ - /*<>*/ de$12(0); - /*<>*/ return 0; - /*<>*/ }, - _dy_ = - function(param){ - /*<>*/ ed$12(0); - /*<>*/ return 0; - /*<>*/ }, - _dz_ = - function(param){ - /*<>*/ af$12(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$12(0); - /*<>*/ return 0; - /*<>*/ }, - _dz_, - _dy_, - _dx_]; - default: - /*<>*/ var - rest$13 = param[1], - /*<>*/ match$14 = - fmtty_rel_det(rest$13), - de$13 = match$14[4], - ed$13 = match$14[3], - af$13 = match$14[2], - fa$13 = match$14[1], - /*<>*/ _dA_ = - function(param){ - /*<>*/ de$13(0); - /*<>*/ return 0; - /*<>*/ }, - _dB_ = - function(param){ - /*<>*/ ed$13(0); - /*<>*/ return 0; - /*<>*/ }, - _dC_ = - function(param){ - /*<>*/ af$13(0); - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ return [0, - function(param){ - /*<>*/ fa$13(0); - /*<>*/ return 0; - /*<>*/ }, - _dC_, - _dB_, - _dA_]; - } - /*<>*/ function _df_(param){ - /*<>*/ return 0; - /*<>*/ } - function _dg_(param){ - /*<>*/ return 0; - /*<>*/ } - function _dh_(param){ - /*<>*/ return 0; - /*<>*/ } - /*<>*/ return [0, - function(param){ - /*<>*/ return 0; - /*<>*/ }, - _dh_, - _dg_, - _df_]; - /*<>*/ } - function trans(ty1, ty2){ - /*<>*/ a: - { - b: - { - c: - { - d: - { - e: - { - f: - { - g: - { - if(typeof ty1 !== "number"){ - switch(ty1[0]){ - case 0: - var rest1 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 0: - var rest2 = ty2[1]; - /*<>*/ return [0, - trans(rest1, rest2)]; - case 8: - break f; - case 9: - break g; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - break; - case 1: - var rest1$0 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 1: - var rest2$0 = ty2[1]; - /*<>*/ return [1, - trans(rest1$0, rest2$0)]; - case 8: - break f; - case 9: - break g; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - break; - case 2: - var rest1$1 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 2: - var rest2$1 = ty2[1]; - /*<>*/ return [2, - trans(rest1$1, rest2$1)]; - case 8: - break f; - case 9: - break g; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - break; - case 3: - var rest1$2 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 3: - var rest2$2 = ty2[1]; - /*<>*/ return [3, - trans(rest1$2, rest2$2)]; - case 8: - break f; - case 9: - break g; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - break; - case 4: - var rest1$3 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 4: - var rest2$3 = ty2[1]; - /*<>*/ return [4, - trans(rest1$3, rest2$3)]; - case 8: - break f; - case 9: - break g; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - break; - case 5: - var rest1$4 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 5: - var rest2$4 = ty2[1]; - /*<>*/ return [5, - trans(rest1$4, rest2$4)]; - case 8: - break f; - case 9: - break g; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - break; - case 6: - var rest1$5 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 6: - var rest2$5 = ty2[1]; - /*<>*/ return [6, - trans(rest1$5, rest2$5)]; - case 8: - break f; - case 9: - break g; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - break; - case 7: - var rest1$6 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 7: - var rest2$6 = ty2[1]; - /*<>*/ return [7, - trans(rest1$6, rest2$6)]; - case 8: - break f; - case 9: - break g; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - break; - case 8: - var rest1$7 = ty1[2], ty1$0 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 8: - /*<>*/ var - rest2$7 = ty2[2], - ty2$0 = ty2[1], - /*<>*/ _de_ = - trans(rest1$7, rest2$7); - /*<>*/ return [8, - trans(ty1$0, ty2$0), - _de_]; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _k_], 1); - case 9: - var rest1$8 = ty1[3], ty12 = ty1[2], ty11 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 8: - break f; - case 9: - /*<>*/ var - rest2$8 = ty2[3], - ty22 = ty2[2], - ty21 = ty2[1], - /*<>*/ ty = - trans(symm(ty12), ty21), - /*<>*/ match = - fmtty_rel_det(ty), - f4 = match[4], - f2 = match[2]; - /*<>*/ f2(0); - /*<>*/ f4(0); - /*<>*/ return [9, - ty11, - ty22, - trans(rest1$8, rest2$8)]; - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _l_], 1); - case 10: - var rest1$9 = ty1[1]; - if(typeof ty2 !== "number" && 10 === ty2[0]){ - var rest2$9 = ty2[1]; - /*<>*/ return [10, - trans(rest1$9, rest2$9)]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _m_], 1); - case 11: - var rest1$10 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 10: - break a; - case 11: - var rest2$10 = ty2[1]; - /*<>*/ return [11, - trans(rest1$10, rest2$10)]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _n_], 1); - case 12: - var rest1$11 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 10: - break a; - case 11: - break b; - case 12: - var rest2$11 = ty2[1]; - /*<>*/ return [12, - trans(rest1$11, rest2$11)]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _o_], 1); - case 13: - var rest1$12 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - var rest2$12 = ty2[1]; - /*<>*/ return [13, - trans(rest1$12, rest2$12)]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _p_], 1); - default: - var rest1$13 = ty1[1]; - if(typeof ty2 !== "number") - switch(ty2[0]){ - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - var rest2$13 = ty2[1]; - /*<>*/ return [14, - trans(rest1$13, rest2$13)]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _q_], 1); - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _j_], 1); - } - if(typeof ty2 === "number") - /*<>*/ return 0; - switch(ty2[0]){ - case 10: - break a; - case 11: - break b; - case 12: - break c; - case 13: - break d; - case 14: - break e; - case 8: - break f; - case 9: break; - default: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); - } - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _i_], 1); - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _h_], 1); - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _g_], 1); - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _f_], 1); - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _e_], 1); - /*<>*/ } - function fmtty_of_padding_fmtty(pad, fmtty){ - /*<>*/ return typeof pad === "number" - ? fmtty - : 0 === pad[0] ? fmtty : [2, fmtty]; - /*<>*/ } - function fmtty_of_custom(arity, fmtty){ - /*<>*/ if(! arity) - /*<>*/ return fmtty; - var arity$0 = arity[1]; - /*<>*/ return [12, - fmtty_of_custom(arity$0, fmtty)]; - /*<>*/ } - function fmtty_of_fmt(fmtty){ - /*<>*/ var fmtty$0 = fmtty; - /*<>*/ for(;;){ - if(typeof fmtty$0 === "number") - /*<>*/ return 0; - switch(fmtty$0[0]){ - case 0: - var rest = fmtty$0[1]; - /*<>*/ return [0, fmtty_of_fmt(rest)]; - case 1: - var rest$0 = fmtty$0[1]; - /*<>*/ return [0, fmtty_of_fmt(rest$0)]; - case 2: - var rest$1 = fmtty$0[2], pad = fmtty$0[1]; - /*<>*/ return fmtty_of_padding_fmtty - (pad, [1, fmtty_of_fmt(rest$1)]); - case 3: - var rest$2 = fmtty$0[2], pad$0 = fmtty$0[1]; - /*<>*/ return fmtty_of_padding_fmtty - (pad$0, [1, fmtty_of_fmt(rest$2)]); - case 4: - /*<>*/ var - rest$3 = fmtty$0[4], - prec = fmtty$0[3], - pad$1 = fmtty$0[2], - /*<>*/ ty_rest = fmtty_of_fmt(rest$3), - /*<>*/ prec_ty = - fmtty_of_precision_fmtty(prec, [2, ty_rest]); - /*<>*/ return fmtty_of_padding_fmtty - (pad$1, prec_ty); - case 5: - /*<>*/ var - rest$4 = fmtty$0[4], - prec$0 = fmtty$0[3], - pad$2 = fmtty$0[2], - /*<>*/ ty_rest$0 = - fmtty_of_fmt(rest$4), - /*<>*/ prec_ty$0 = - fmtty_of_precision_fmtty(prec$0, [3, ty_rest$0]); - /*<>*/ return fmtty_of_padding_fmtty - (pad$2, prec_ty$0); - case 6: - /*<>*/ var - rest$5 = fmtty$0[4], - prec$1 = fmtty$0[3], - pad$3 = fmtty$0[2], - /*<>*/ ty_rest$1 = - fmtty_of_fmt(rest$5), - /*<>*/ prec_ty$1 = - fmtty_of_precision_fmtty(prec$1, [4, ty_rest$1]); - /*<>*/ return fmtty_of_padding_fmtty - (pad$3, prec_ty$1); - case 7: - /*<>*/ var - rest$6 = fmtty$0[4], - prec$2 = fmtty$0[3], - pad$4 = fmtty$0[2], - /*<>*/ ty_rest$2 = - fmtty_of_fmt(rest$6), - /*<>*/ prec_ty$2 = - fmtty_of_precision_fmtty(prec$2, [5, ty_rest$2]); - /*<>*/ return fmtty_of_padding_fmtty - (pad$4, prec_ty$2); - case 8: - /*<>*/ var - rest$7 = fmtty$0[4], - prec$3 = fmtty$0[3], - pad$5 = fmtty$0[2], - /*<>*/ ty_rest$3 = - fmtty_of_fmt(rest$7), - /*<>*/ prec_ty$3 = - fmtty_of_precision_fmtty(prec$3, [6, ty_rest$3]); - /*<>*/ return fmtty_of_padding_fmtty - (pad$5, prec_ty$3); - case 9: - var rest$8 = fmtty$0[2], pad$6 = fmtty$0[1]; - /*<>*/ return fmtty_of_padding_fmtty - (pad$6, [7, fmtty_of_fmt(rest$8)]); - case 10: - var fmtty$1 = fmtty$0[1], fmtty$0 = fmtty$1; break; - case 11: - var fmtty$2 = fmtty$0[2], fmtty$0 = fmtty$2; break; - case 12: - var fmtty$3 = fmtty$0[2], fmtty$0 = fmtty$3; break; - case 13: - var rest$9 = fmtty$0[3], ty = fmtty$0[2]; - /*<>*/ return [8, - ty, - fmtty_of_fmt(rest$9)]; - case 14: - var rest$10 = fmtty$0[3], ty$0 = fmtty$0[2]; - /*<>*/ return [9, - ty$0, - ty$0, - fmtty_of_fmt(rest$10)]; - case 15: - var rest$11 = fmtty$0[1]; - /*<>*/ return [10, - fmtty_of_fmt(rest$11)]; - case 16: - var rest$12 = fmtty$0[1]; - /*<>*/ return [11, - fmtty_of_fmt(rest$12)]; - case 17: - var fmtty$4 = fmtty$0[2], fmtty$0 = fmtty$4; break; - case 18: - /*<>*/ var - rest$13 = fmtty$0[2], - formatting_gen = fmtty$0[1], - /*<>*/ _db_ = fmtty_of_fmt(rest$13); - if(0 === formatting_gen[0]) - var fmt = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt); - else - var fmt$0 = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt$0); - /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], _dc_, _db_); - case 19: - var rest$14 = fmtty$0[1]; - /*<>*/ return [13, - fmtty_of_fmt(rest$14)]; - case 20: - var rest$15 = fmtty$0[3]; - /*<>*/ return [1, - fmtty_of_fmt(rest$15)]; - case 21: - var rest$16 = fmtty$0[2]; - /*<>*/ return [2, - fmtty_of_fmt(rest$16)]; - case 22: - var rest$17 = fmtty$0[1]; - /*<>*/ return [0, - fmtty_of_fmt(rest$17)]; - case 23: - var fmtty$5 = fmtty$0[2], ign = fmtty$0[1]; - if(typeof ign === "number") - switch(ign){ - case 0: - var fmtty$0 = fmtty$5; break; - case 1: - var fmtty$0 = fmtty$5; break; - case 2: - /*<>*/ return [14, - fmtty_of_fmt(fmtty$5)]; - default: var fmtty$0 = fmtty$5; - } - else - switch(ign[0]){ - case 0: - var fmtty$0 = fmtty$5; break; - case 1: - var fmtty$0 = fmtty$5; break; - case 2: - var fmtty$0 = fmtty$5; break; - case 3: - var fmtty$0 = fmtty$5; break; - case 4: - var fmtty$0 = fmtty$5; break; - case 5: - var fmtty$0 = fmtty$5; break; - case 6: - var fmtty$0 = fmtty$5; break; - case 7: - var fmtty$0 = fmtty$5; break; - case 8: - var fmtty$0 = fmtty$5; break; - case 9: - /*<>*/ var - fmtty$6 = ign[2], - /*<>*/ _dd_ = - fmtty_of_fmt(fmtty$5); - /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], fmtty$6, _dd_); - case 10: - var fmtty$0 = fmtty$5; break; - default: var fmtty$0 = fmtty$5; - } - break; - default: - var rest$18 = fmtty$0[3], arity = fmtty$0[1]; - /*<>*/ return fmtty_of_custom - (arity, fmtty_of_fmt(rest$18)); - } - } - /*<>*/ } - function fmtty_of_precision_fmtty(prec, fmtty){ - /*<>*/ return typeof prec === "number" - ? prec ? [2, fmtty] : fmtty - : fmtty; - /*<>*/ } - /*<>*/ /*<>*/ var - Type_mismatch = - [248, cst_CamlinternalFormat_Type_mi, runtime.caml_fresh_oo_id(0)]; - function type_padding(pad, fmtty){ - /*<>*/ if(typeof pad === "number") - /*<>*/ return [0, 0, fmtty]; - if(0 === pad[0]){ - var w = pad[2], padty = pad[1]; - /*<>*/ return [0, [0, padty, w], fmtty]; - } - if(typeof fmtty !== "number" && 2 === fmtty[0]){ - var rest = fmtty[1], padty$0 = pad[1]; - /*<>*/ return [0, [1, padty$0], rest]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - /*<>*/ } - function type_padprec(pad, prec, fmtty){ - /*<>*/ /*<>*/ var - match = type_padding(pad, fmtty); - if(typeof prec !== "number"){ - var rest$1 = match[2], pad$2 = match[1], p = prec[1]; - /*<>*/ return [0, pad$2, [0, p], rest$1]; - } - if(! prec){ - var rest$0 = match[2], pad$1 = match[1]; - /*<>*/ return [0, pad$1, 0, rest$0]; - } - var match$0 = match[2]; - if(typeof match$0 !== "number" && 2 === match$0[0]){ - var rest = match$0[1], pad$0 = match[1]; - /*<>*/ return [0, pad$0, 1, rest]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - /*<>*/ } - function type_format(fmt, fmtty){ - /*<>*/ /*<>*/ var - _da_ = type_format_gen(fmt, fmtty); - if(typeof _da_[2] !== "number") - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - var fmt$0 = _da_[1]; - /*<>*/ return fmt$0; - /*<>*/ } - function type_ignored_param_one(ign, fmt, fmtty){ - /*<>*/ var - /*<>*/ match = - type_format_gen(fmt, fmtty), - fmtty$0 = match[2], - fmt$0 = match[1]; - /*<>*/ return [0, - [23, ign, fmt$0], - fmtty$0]; - /*<>*/ } - function type_format_gen(fmt, fmtty0){ - /*<>*/ if(typeof fmt === "number") - /*<>*/ return [0, 0, fmtty0]; - switch(fmt[0]){ - case 0: - if(typeof fmtty0 !== "number" && 0 === fmtty0[0]){ - /*<>*/ var - fmtty_rest = fmtty0[1], - fmt_rest = fmt[1], - /*<>*/ match = - type_format_gen(fmt_rest, fmtty_rest), - fmtty = match[2], - fmt$0 = match[1]; - /*<>*/ return [0, [0, fmt$0], fmtty]; - } - break; - case 1: - if(typeof fmtty0 !== "number" && 0 === fmtty0[0]){ - /*<>*/ var - fmtty_rest$0 = fmtty0[1], - fmt_rest$0 = fmt[1], - /*<>*/ match$0 = - type_format_gen(fmt_rest$0, fmtty_rest$0), - fmtty$0 = match$0[2], - fmt$1 = match$0[1]; - /*<>*/ return [0, [1, fmt$1], fmtty$0]; - } - break; - case 2: - /*<>*/ var - fmt_rest$1 = fmt[2], - pad = fmt[1], - /*<>*/ match$1 = - type_padding(pad, fmtty0), - pad$0 = match$1[1], - match$2 = match$1[2]; - if(typeof match$2 !== "number" && 1 === match$2[0]){ - /*<>*/ var - fmtty_rest$1 = match$2[1], - /*<>*/ match$3 = - type_format_gen(fmt_rest$1, fmtty_rest$1), - fmtty$1 = match$3[2], - fmt$2 = match$3[1]; - /*<>*/ return [0, - [2, pad$0, fmt$2], - fmtty$1]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - case 3: - /*<>*/ var - fmt_rest$2 = fmt[2], - pad$1 = fmt[1], - /*<>*/ match$4 = - type_padding(pad$1, fmtty0), - pad$2 = match$4[1], - match$5 = match$4[2]; - if(typeof match$5 !== "number" && 1 === match$5[0]){ - /*<>*/ var - fmtty_rest$2 = match$5[1], - /*<>*/ match$6 = - type_format_gen(fmt_rest$2, fmtty_rest$2), - fmtty$2 = match$6[2], - fmt$3 = match$6[1]; - /*<>*/ return [0, - [3, pad$2, fmt$3], - fmtty$2]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - case 4: - /*<>*/ var - fmt_rest$3 = fmt[4], - prec = fmt[3], - pad$3 = fmt[2], - iconv = fmt[1], - /*<>*/ match$7 = - type_padprec(pad$3, prec, fmtty0), - pad$4 = match$7[1], - match$8 = match$7[3]; - if(typeof match$8 !== "number" && 2 === match$8[0]){ - /*<>*/ var - fmtty_rest$3 = match$8[1], - prec$0 = match$7[2], - /*<>*/ match$9 = - type_format_gen(fmt_rest$3, fmtty_rest$3), - fmtty$3 = match$9[2], - fmt$4 = match$9[1]; - /*<>*/ return [0, - [4, iconv, pad$4, prec$0, fmt$4], - fmtty$3]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - case 5: - /*<>*/ var - fmt_rest$4 = fmt[4], - prec$1 = fmt[3], - pad$5 = fmt[2], - iconv$0 = fmt[1], - /*<>*/ match$10 = - type_padprec(pad$5, prec$1, fmtty0), - pad$6 = match$10[1], - match$11 = match$10[3]; - if(typeof match$11 !== "number" && 3 === match$11[0]){ - /*<>*/ var - fmtty_rest$4 = match$11[1], - prec$2 = match$10[2], - /*<>*/ match$12 = - type_format_gen(fmt_rest$4, fmtty_rest$4), - fmtty$4 = match$12[2], - fmt$5 = match$12[1]; - /*<>*/ return [0, - [5, iconv$0, pad$6, prec$2, fmt$5], - fmtty$4]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - case 6: - /*<>*/ var - fmt_rest$5 = fmt[4], - prec$3 = fmt[3], - pad$7 = fmt[2], - iconv$1 = fmt[1], - /*<>*/ match$13 = - type_padprec(pad$7, prec$3, fmtty0), - pad$8 = match$13[1], - match$14 = match$13[3]; - if(typeof match$14 !== "number" && 4 === match$14[0]){ - /*<>*/ var - fmtty_rest$5 = match$14[1], - prec$4 = match$13[2], - /*<>*/ match$15 = - type_format_gen(fmt_rest$5, fmtty_rest$5), - fmtty$5 = match$15[2], - fmt$6 = match$15[1]; - /*<>*/ return [0, - [6, iconv$1, pad$8, prec$4, fmt$6], - fmtty$5]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - case 7: - /*<>*/ var - fmt_rest$6 = fmt[4], - prec$5 = fmt[3], - pad$9 = fmt[2], - iconv$2 = fmt[1], - /*<>*/ match$16 = - type_padprec(pad$9, prec$5, fmtty0), - pad$10 = match$16[1], - match$17 = match$16[3]; - if(typeof match$17 !== "number" && 5 === match$17[0]){ - /*<>*/ var - fmtty_rest$6 = match$17[1], - prec$6 = match$16[2], - /*<>*/ match$18 = - type_format_gen(fmt_rest$6, fmtty_rest$6), - fmtty$6 = match$18[2], - fmt$7 = match$18[1]; - /*<>*/ return [0, - [7, iconv$2, pad$10, prec$6, fmt$7], - fmtty$6]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - case 8: - /*<>*/ var - fmt_rest$7 = fmt[4], - prec$7 = fmt[3], - pad$11 = fmt[2], - fconv = fmt[1], - /*<>*/ match$19 = - type_padprec(pad$11, prec$7, fmtty0), - pad$12 = match$19[1], - match$20 = match$19[3]; - if(typeof match$20 !== "number" && 6 === match$20[0]){ - /*<>*/ var - fmtty_rest$7 = match$20[1], - prec$8 = match$19[2], - /*<>*/ match$21 = - type_format_gen(fmt_rest$7, fmtty_rest$7), - fmtty$7 = match$21[2], - fmt$8 = match$21[1]; - /*<>*/ return [0, - [8, fconv, pad$12, prec$8, fmt$8], - fmtty$7]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - case 9: - /*<>*/ var - fmt_rest$8 = fmt[2], - pad$13 = fmt[1], - /*<>*/ match$22 = - type_padding(pad$13, fmtty0), - pad$14 = match$22[1], - match$23 = match$22[2]; - if(typeof match$23 !== "number" && 7 === match$23[0]){ - /*<>*/ var - fmtty_rest$8 = match$23[1], - /*<>*/ match$24 = - type_format_gen(fmt_rest$8, fmtty_rest$8), - fmtty$8 = match$24[2], - fmt$9 = match$24[1]; - /*<>*/ return [0, - [9, pad$14, fmt$9], - fmtty$8]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - case 10: - /*<>*/ var - fmt_rest$9 = fmt[1], - /*<>*/ match$25 = - type_format_gen(fmt_rest$9, fmtty0), - fmtty$9 = match$25[2], - fmt$10 = match$25[1]; - /*<>*/ return [0, [10, fmt$10], fmtty$9]; - case 11: - /*<>*/ var - fmt_rest$10 = fmt[2], - str = fmt[1], - /*<>*/ match$26 = - type_format_gen(fmt_rest$10, fmtty0), - fmtty$10 = match$26[2], - fmt$11 = match$26[1]; - /*<>*/ return [0, - [11, str, fmt$11], - fmtty$10]; - case 12: - /*<>*/ var - fmt_rest$11 = fmt[2], - chr = fmt[1], - /*<>*/ match$27 = - type_format_gen(fmt_rest$11, fmtty0), - fmtty$11 = match$27[2], - fmt$12 = match$27[1]; - /*<>*/ return [0, - [12, chr, fmt$12], - fmtty$11]; - case 13: - if(typeof fmtty0 !== "number" && 8 === fmtty0[0]){ - var - fmtty_rest$9 = fmtty0[2], - sub_fmtty = fmtty0[1], - fmt_rest$12 = fmt[3], - sub_fmtty$0 = fmt[2], - pad_opt = fmt[1]; - /*<>*/ if - ( /*<>*/ caml_notequal - ([0, sub_fmtty$0], [0, sub_fmtty])) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - /*<>*/ var - /*<>*/ match$28 = - type_format_gen(fmt_rest$12, fmtty_rest$9), - fmtty$12 = match$28[2], - fmt$13 = match$28[1]; - /*<>*/ return [0, - [13, pad_opt, sub_fmtty, fmt$13], - fmtty$12]; - } - break; - case 14: - if(typeof fmtty0 !== "number" && 9 === fmtty0[0]){ - /*<>*/ var - fmtty_rest$10 = fmtty0[3], - sub_fmtty1 = fmtty0[1], - fmt_rest$13 = fmt[3], - sub_fmtty$1 = fmt[2], - pad_opt$0 = fmt[1], - /*<>*/ _c__ = - [0, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub_fmtty1)]; - /*<>*/ if - ( /*<>*/ caml_notequal - ([0, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub_fmtty$1)], - _c__)) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - /*<>*/ var - /*<>*/ match$29 = - type_format_gen - (fmt_rest$13, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], fmtty_rest$10)), - fmtty$13 = match$29[2], - fmt$14 = match$29[1]; - /*<>*/ return [0, - [14, pad_opt$0, sub_fmtty1, fmt$14], - fmtty$13]; - } - break; - case 15: - if(typeof fmtty0 !== "number" && 10 === fmtty0[0]){ - /*<>*/ var - fmtty_rest$11 = fmtty0[1], - fmt_rest$14 = fmt[1], - /*<>*/ match$30 = - type_format_gen(fmt_rest$14, fmtty_rest$11), - fmtty$14 = match$30[2], - fmt$15 = match$30[1]; - /*<>*/ return [0, - [15, fmt$15], - fmtty$14]; - } - break; - case 16: - if(typeof fmtty0 !== "number" && 11 === fmtty0[0]){ - /*<>*/ var - fmtty_rest$12 = fmtty0[1], - fmt_rest$15 = fmt[1], - /*<>*/ match$31 = - type_format_gen(fmt_rest$15, fmtty_rest$12), - fmtty$15 = match$31[2], - fmt$16 = match$31[1]; - /*<>*/ return [0, - [16, fmt$16], - fmtty$15]; - } - break; - case 17: - /*<>*/ var - fmt_rest$16 = fmt[2], - formatting_lit = fmt[1], - /*<>*/ match$32 = - type_format_gen(fmt_rest$16, fmtty0), - fmtty$16 = match$32[2], - fmt$17 = match$32[1]; - /*<>*/ return [0, - [17, formatting_lit, fmt$17], - fmtty$16]; - case 18: - var fmt_rest$17 = fmt[2], formatting_gen = fmt[1]; - if(0 === formatting_gen[0]){ - /*<>*/ var - match$36 = formatting_gen[1], - str$0 = match$36[2], - fmt1 = match$36[1], - /*<>*/ match$37 = - type_format_gen(fmt1, fmtty0), - fmtty2 = match$37[2], - fmt2 = match$37[1], - /*<>*/ match$38 = - type_format_gen(fmt_rest$17, fmtty2), - fmtty3 = match$38[2], - fmt3 = match$38[1]; - /*<>*/ return [0, - [18, [0, [0, fmt2, str$0]], fmt3], - fmtty3]; - } - /*<>*/ var - match$39 = formatting_gen[1], - str$1 = match$39[2], - fmt1$0 = match$39[1], - /*<>*/ match$40 = - type_format_gen(fmt1$0, fmtty0), - fmtty2$0 = match$40[2], - fmt2$0 = match$40[1], - /*<>*/ match$41 = - type_format_gen(fmt_rest$17, fmtty2$0), - fmtty3$0 = match$41[2], - fmt3$0 = match$41[1]; - /*<>*/ return [0, - [18, [1, [0, fmt2$0, str$1]], fmt3$0], - fmtty3$0]; - case 19: - if(typeof fmtty0 !== "number" && 13 === fmtty0[0]){ - /*<>*/ var - fmtty_rest$13 = fmtty0[1], - fmt_rest$18 = fmt[1], - /*<>*/ match$33 = - type_format_gen(fmt_rest$18, fmtty_rest$13), - fmtty$17 = match$33[2], - fmt$18 = match$33[1]; - /*<>*/ return [0, - [19, fmt$18], - fmtty$17]; - } - break; - case 20: - if(typeof fmtty0 !== "number" && 1 === fmtty0[0]){ - /*<>*/ var - fmtty_rest$14 = fmtty0[1], - fmt_rest$19 = fmt[3], - char_set = fmt[2], - width_opt = fmt[1], - /*<>*/ match$34 = - type_format_gen(fmt_rest$19, fmtty_rest$14), - fmtty$18 = match$34[2], - fmt$19 = match$34[1]; - /*<>*/ return [0, - [20, width_opt, char_set, fmt$19], - fmtty$18]; - } - break; - case 21: - if(typeof fmtty0 !== "number" && 2 === fmtty0[0]){ - /*<>*/ var - fmtty_rest$15 = fmtty0[1], - fmt_rest$20 = fmt[2], - counter = fmt[1], - /*<>*/ match$35 = - type_format_gen(fmt_rest$20, fmtty_rest$15), - fmtty$19 = match$35[2], - fmt$20 = match$35[1]; - /*<>*/ return [0, - [21, counter, fmt$20], - fmtty$19]; - } - break; - case 23: - var rest = fmt[2], ign = fmt[1]; - if(typeof ign !== "number") - switch(ign[0]){ - case 0: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 1: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 2: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 3: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 4: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 5: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 6: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 7: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 8: - var sub_fmtty$2 = ign[2], pad_opt$1 = ign[1]; - /*<>*/ return type_ignored_param_one - ([8, pad_opt$1, sub_fmtty$2], rest, fmtty0); - case 9: - /*<>*/ var - sub_fmtty$3 = ign[2], - pad_opt$2 = ign[1], - /*<>*/ _c$_ = - type_ignored_format_substituti(sub_fmtty$3, rest, fmtty0), - match$43 = _c$_[2], - fmtty$21 = match$43[2], - fmt$22 = match$43[1], - sub_fmtty$4 = _c$_[1]; - /*<>*/ return [0, - [23, [9, pad_opt$2, sub_fmtty$4], fmt$22], - fmtty$21]; - case 10: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - default: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - } - switch(ign){ - case 0: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 1: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - case 2: - if(typeof fmtty0 !== "number" && 14 === fmtty0[0]){ - /*<>*/ var - fmtty_rest$16 = fmtty0[1], - /*<>*/ match$42 = - type_format_gen(rest, fmtty_rest$16), - fmtty$20 = match$42[2], - fmt$21 = match$42[1]; - /*<>*/ return [0, - [23, 2, fmt$21], - fmtty$20]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - default: - /*<>*/ return type_ignored_param_one - (ign, rest, fmtty0); - } - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - /*<>*/ } - function type_ignored_format_substituti(sub_fmtty, fmt, fmtty){ - /*<>*/ if(typeof sub_fmtty === "number") - /*<>*/ return [0, - 0, - type_format_gen(fmt, fmtty)]; - switch(sub_fmtty[0]){ - case 0: - if(typeof fmtty !== "number" && 0 === fmtty[0]){ - /*<>*/ var - fmtty_rest = fmtty[1], - sub_fmtty_rest = sub_fmtty[1], - /*<>*/ match = - type_ignored_format_substituti(sub_fmtty_rest, fmt, fmtty_rest), - fmt$0 = match[2], - sub_fmtty_rest$0 = match[1]; - /*<>*/ return [0, - [0, sub_fmtty_rest$0], - fmt$0]; - } - break; - case 1: - if(typeof fmtty !== "number" && 1 === fmtty[0]){ - /*<>*/ var - fmtty_rest$0 = fmtty[1], - sub_fmtty_rest$1 = sub_fmtty[1], - /*<>*/ match$0 = - type_ignored_format_substituti(sub_fmtty_rest$1, fmt, fmtty_rest$0), - fmt$1 = match$0[2], - sub_fmtty_rest$2 = match$0[1]; - /*<>*/ return [0, - [1, sub_fmtty_rest$2], - fmt$1]; - } - break; - case 2: - if(typeof fmtty !== "number" && 2 === fmtty[0]){ - /*<>*/ var - fmtty_rest$1 = fmtty[1], - sub_fmtty_rest$3 = sub_fmtty[1], - /*<>*/ match$1 = - type_ignored_format_substituti(sub_fmtty_rest$3, fmt, fmtty_rest$1), - fmt$2 = match$1[2], - sub_fmtty_rest$4 = match$1[1]; - /*<>*/ return [0, - [2, sub_fmtty_rest$4], - fmt$2]; - } - break; - case 3: - if(typeof fmtty !== "number" && 3 === fmtty[0]){ - /*<>*/ var - fmtty_rest$2 = fmtty[1], - sub_fmtty_rest$5 = sub_fmtty[1], - /*<>*/ match$2 = - type_ignored_format_substituti(sub_fmtty_rest$5, fmt, fmtty_rest$2), - fmt$3 = match$2[2], - sub_fmtty_rest$6 = match$2[1]; - /*<>*/ return [0, - [3, sub_fmtty_rest$6], - fmt$3]; - } - break; - case 4: - if(typeof fmtty !== "number" && 4 === fmtty[0]){ - /*<>*/ var - fmtty_rest$3 = fmtty[1], - sub_fmtty_rest$7 = sub_fmtty[1], - /*<>*/ match$3 = - type_ignored_format_substituti(sub_fmtty_rest$7, fmt, fmtty_rest$3), - fmt$4 = match$3[2], - sub_fmtty_rest$8 = match$3[1]; - /*<>*/ return [0, - [4, sub_fmtty_rest$8], - fmt$4]; - } - break; - case 5: - if(typeof fmtty !== "number" && 5 === fmtty[0]){ - /*<>*/ var - fmtty_rest$4 = fmtty[1], - sub_fmtty_rest$9 = sub_fmtty[1], - /*<>*/ match$4 = - type_ignored_format_substituti(sub_fmtty_rest$9, fmt, fmtty_rest$4), - fmt$5 = match$4[2], - sub_fmtty_rest$10 = match$4[1]; - /*<>*/ return [0, - [5, sub_fmtty_rest$10], - fmt$5]; - } - break; - case 6: - if(typeof fmtty !== "number" && 6 === fmtty[0]){ - /*<>*/ var - fmtty_rest$5 = fmtty[1], - sub_fmtty_rest$11 = sub_fmtty[1], - /*<>*/ match$5 = - type_ignored_format_substituti - (sub_fmtty_rest$11, fmt, fmtty_rest$5), - fmt$6 = match$5[2], - sub_fmtty_rest$12 = match$5[1]; - /*<>*/ return [0, - [6, sub_fmtty_rest$12], - fmt$6]; - } - break; - case 7: - if(typeof fmtty !== "number" && 7 === fmtty[0]){ - /*<>*/ var - fmtty_rest$6 = fmtty[1], - sub_fmtty_rest$13 = sub_fmtty[1], - /*<>*/ match$6 = - type_ignored_format_substituti - (sub_fmtty_rest$13, fmt, fmtty_rest$6), - fmt$7 = match$6[2], - sub_fmtty_rest$14 = match$6[1]; - /*<>*/ return [0, - [7, sub_fmtty_rest$14], - fmt$7]; - } - break; - case 8: - if(typeof fmtty !== "number" && 8 === fmtty[0]){ - var - fmtty_rest$7 = fmtty[2], - sub2_fmtty = fmtty[1], - sub_fmtty_rest$15 = sub_fmtty[2], - sub2_fmtty$0 = sub_fmtty[1]; - /*<>*/ if - ( /*<>*/ caml_notequal - ([0, sub2_fmtty$0], [0, sub2_fmtty])) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - /*<>*/ var - /*<>*/ match$7 = - type_ignored_format_substituti - (sub_fmtty_rest$15, fmt, fmtty_rest$7), - fmt$8 = match$7[2], - sub_fmtty_rest$16 = match$7[1]; - /*<>*/ return [0, - [8, sub2_fmtty, sub_fmtty_rest$16], - fmt$8]; - } - break; - case 9: - if(typeof fmtty !== "number" && 9 === fmtty[0]){ - /*<>*/ var - fmtty_rest$8 = fmtty[3], - sub2_fmtty$1 = fmtty[2], - sub1_fmtty = fmtty[1], - sub_fmtty_rest$17 = sub_fmtty[3], - sub2_fmtty$2 = sub_fmtty[2], - sub1_fmtty$0 = sub_fmtty[1], - /*<>*/ _c8_ = - [0, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub1_fmtty)]; - /*<>*/ if - ( /*<>*/ caml_notequal - ([0, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub1_fmtty$0)], - _c8_)) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - /*<>*/ /*<>*/ var - _c9_ = - [0, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub2_fmtty$1)]; - /*<>*/ if - ( /*<>*/ caml_notequal - ([0, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub2_fmtty$2)], - _c9_)) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - /*<>*/ var - /*<>*/ sub_fmtty$0 = - trans(symm(sub1_fmtty), sub2_fmtty$1), - /*<>*/ match$8 = - fmtty_rel_det(sub_fmtty$0), - f4 = match$8[4], - f2 = match$8[2]; - /*<>*/ f2(0); - /*<>*/ f4(0); - /*<>*/ var - /*<>*/ match$9 = - type_ignored_format_substituti - ( /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], sub_fmtty_rest$17), - fmt, - fmtty_rest$8), - fmt$9 = match$9[2], - sub_fmtty_rest$18 = match$9[1]; - /*<>*/ return [0, - [9, sub1_fmtty, sub2_fmtty$1, symm(sub_fmtty_rest$18)], - fmt$9]; - } - break; - case 10: - if(typeof fmtty !== "number" && 10 === fmtty[0]){ - /*<>*/ var - fmtty_rest$9 = fmtty[1], - sub_fmtty_rest$19 = sub_fmtty[1], - /*<>*/ match$10 = - type_ignored_format_substituti - (sub_fmtty_rest$19, fmt, fmtty_rest$9), - fmt$10 = match$10[2], - sub_fmtty_rest$20 = match$10[1]; - /*<>*/ return [0, - [10, sub_fmtty_rest$20], - fmt$10]; - } - break; - case 11: - if(typeof fmtty !== "number" && 11 === fmtty[0]){ - /*<>*/ var - fmtty_rest$10 = fmtty[1], - sub_fmtty_rest$21 = sub_fmtty[1], - /*<>*/ match$11 = - type_ignored_format_substituti - (sub_fmtty_rest$21, fmt, fmtty_rest$10), - fmt$11 = match$11[2], - sub_fmtty_rest$22 = match$11[1]; - /*<>*/ return [0, - [11, sub_fmtty_rest$22], - fmt$11]; - } - break; - case 13: - if(typeof fmtty !== "number" && 13 === fmtty[0]){ - /*<>*/ var - fmtty_rest$11 = fmtty[1], - sub_fmtty_rest$23 = sub_fmtty[1], - /*<>*/ match$12 = - type_ignored_format_substituti - (sub_fmtty_rest$23, fmt, fmtty_rest$11), - fmt$12 = match$12[2], - sub_fmtty_rest$24 = match$12[1]; - /*<>*/ return [0, - [13, sub_fmtty_rest$24], - fmt$12]; - } - break; - case 14: - if(typeof fmtty !== "number" && 14 === fmtty[0]){ - /*<>*/ var - fmtty_rest$12 = fmtty[1], - sub_fmtty_rest$25 = sub_fmtty[1], - /*<>*/ match$13 = - type_ignored_format_substituti - (sub_fmtty_rest$25, fmt, fmtty_rest$12), - fmt$13 = match$13[2], - sub_fmtty_rest$26 = match$13[1]; - /*<>*/ return [0, - [14, sub_fmtty_rest$26], - fmt$13]; - } - break; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Type_mismatch, 1); - /*<>*/ } - function recast(fmt, fmtty){ - /*<>*/ /*<>*/ var - _c7_ = symm(fmtty); - /*<>*/ return type_format - (fmt, - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _c7_)); - /*<>*/ } - 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); - if(width$0 <= len) /*<>*/ return str; - /*<>*/ var - _c6_ = 2 === padty$0 ? 48 : 32, - /*<>*/ res = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], width$0, _c6_); - /*<>*/ switch(padty$0){ - case 0: - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], str, 0, res, 0, len); - break; - case 1: - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], str, 0, res, width$0 - len | 0, len); - break; - default: - a: - if(0 < len){ - /*<>*/ if - (43 - !== /*<>*/ caml_string_get(str, 0) - && - 45 - !== /*<>*/ caml_string_get(str, 0) - && - 32 - !== /*<>*/ caml_string_get(str, 0)) - break a; - /*<>*/ /*<>*/ caml_bytes_set - (res, - 0, - /*<>*/ caml_string_get(str, 0)); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], - str, - 1, - res, - (width$0 - len | 0) + 1 | 0, - len - 1 | 0); - break; - } - a: - if - (1 < len - && - 48 - === /*<>*/ caml_string_get(str, 0)){ - /*<>*/ if - (120 - !== /*<>*/ caml_string_get(str, 1) - && - 88 - !== /*<>*/ caml_string_get(str, 1)) - break a; - /*<>*/ /*<>*/ caml_bytes_set - (res, - 1, - /*<>*/ caml_string_get(str, 1)); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], - str, - 2, - res, - (width$0 - len | 0) + 2 | 0, - len - 2 | 0); - break; - } - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], str, 0, res, width$0 - len | 0, len); - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], res); - /*<>*/ } - function fix_int_precision(prec, str){ - /*<>*/ var - /*<>*/ prec$0 = - /*<>*/ caml_call1(Stdlib[18], prec), - /*<>*/ len = - /*<>*/ caml_ml_string_length(str), - /*<>*/ c = - /*<>*/ caml_string_get(str, 0); - a: - { - b: - { - if(58 > c){ - if(32 !== c){ - if(43 > c) break a; - switch(c - 43 | 0){ - case 5: - c: - if(len < (prec$0 + 2 | 0) && 1 < len){ - /*<>*/ if - (120 - !== - /*<>*/ caml_string_get(str, 1) - && - 88 - !== - /*<>*/ caml_string_get(str, 1)) - break c; - /*<>*/ /*<>*/ var - res$1 = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], prec$0 + 2 | 0, 48); - /*<>*/ /*<>*/ caml_bytes_set - (res$1, - 1, - /*<>*/ caml_string_get(str, 1)); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], - str, - 2, - res$1, - (prec$0 - len | 0) + 4 | 0, - len - 2 | 0); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], res$1); - } - break b; - case 0: - case 2: break; - case 1: - case 3: - case 4: - break a; - default: break b; - } - } - if(len >= (prec$0 + 1 | 0)) break a; - /*<>*/ /*<>*/ var - res$0 = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], prec$0 + 1 | 0, 48); - /*<>*/ /*<>*/ caml_bytes_set - (res$0, 0, c); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], - str, - 1, - res$0, - (prec$0 - len | 0) + 2 | 0, - len - 1 | 0); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], res$0); - } - if(71 <= c){if(5 < c - 97 >>> 0) break a;} else if(65 > c) break a; - } - if(len < prec$0){ - /*<>*/ /*<>*/ var - res = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], prec$0, 48); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], str, 0, res, prec$0 - len | 0, len); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], res); - } - } - /*<>*/ return str; - /*<>*/ } - function string_to_caml_string(str){ - /*<>*/ var - /*<>*/ str$0 = - /*<>*/ caml_call1 - (Stdlib_String[24], str), - /*<>*/ l = - /*<>*/ caml_ml_string_length(str$0), - /*<>*/ res = - /*<>*/ caml_call2 - (Stdlib_Bytes[1], l + 2 | 0, 34); - /*<>*/ /*<>*/ caml_blit_string - (str$0, 0, res, 1, l); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], res); - /*<>*/ } - function format_of_fconv(fconv, prec){ - /*<>*/ var - /*<>*/ prec$0 = - /*<>*/ caml_call1(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)); - /*<>*/ buffer_add_char(buf, symb); - /*<>*/ return buffer_contents(buf); - /*<>*/ } - function transform_int_alt(iconv, s){ - /*<>*/ if(13 > iconv) - /*<>*/ return s; - /*<>*/ var - /*<>*/ n = [0, 0], - _c1_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c0_ = 0; - if(_c1_ >= 0){ - var i$0 = _c0_; - for(;;){ - if(9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) n[1]++; - /*<>*/ /*<>*/ var - _c5_ = i$0 + 1 | 0; - if(_c1_ === i$0) break; - var i$0 = _c5_; - } - } - /*<>*/ var - digits = n[1], - /*<>*/ buf = - /*<>*/ caml_create_bytes - (caml_ml_string_length(s) + ((digits - 1 | 0) / 3 | 0) | 0), - /*<>*/ pos = [0, 0]; - function put(c){ - /*<>*/ /*<>*/ caml_bytes_set - (buf, pos[1], c); - pos[1]++; - return 0; - /*<>*/ } - /*<>*/ var - /*<>*/ left = - [0, ((digits - 1 | 0) % 3 | 0) + 1 | 0], - _c3_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c2_ = 0; - if(_c3_ >= 0){ - var i = _c2_; - for(;;){ - var c = caml_string_unsafe_get(s, i); - if(9 < c - 48 >>> 0) - /*<>*/ put(c); - else{ - if(0 === left[1]){ - /*<>*/ put(95); - left[1] = 3; - } - left[1] += -1; - /*<>*/ put(c); - } - /*<>*/ /*<>*/ var - _c4_ = i + 1 | 0; - if(_c3_ === i) break; - var i = _c4_; - } - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], buf); - /*<>*/ } - function convert_int(iconv, n){ - /*<>*/ switch(iconv){ - case 1: - var _cZ_ = cst_d$0; break; - case 2: - var _cZ_ = cst_d$1; break; - case 4: - var _cZ_ = cst_i$1; break; - case 5: - var _cZ_ = cst_i$2; break; - case 6: - var _cZ_ = cst_x; break; - case 7: - var _cZ_ = cst_x$0; break; - case 8: - var _cZ_ = cst_X; break; - case 9: - var _cZ_ = cst_X$0; break; - case 10: - var _cZ_ = cst_o; break; - case 11: - var _cZ_ = cst_o$0; break; - case 0: - case 13: - var _cZ_ = cst_d; break; - case 3: - case 14: - var _cZ_ = cst_i$0; break; - default: var _cZ_ = cst_u; - } - /*<>*/ return transform_int_alt - (iconv, - /*<>*/ caml_format_int(_cZ_, n)); - /*<>*/ } - function convert_int32(iconv, n){ - /*<>*/ switch(iconv){ - case 1: - var _cY_ = cst_ld$0; break; - case 2: - var _cY_ = cst_ld$1; break; - case 4: - var _cY_ = cst_li$1; break; - case 5: - var _cY_ = cst_li$2; break; - case 6: - var _cY_ = cst_lx; break; - case 7: - var _cY_ = cst_lx$0; break; - case 8: - var _cY_ = cst_lX; break; - case 9: - var _cY_ = cst_lX$0; break; - case 10: - var _cY_ = cst_lo; break; - case 11: - var _cY_ = cst_lo$0; break; - case 0: - case 13: - var _cY_ = cst_ld; break; - case 3: - case 14: - var _cY_ = cst_li$0; break; - default: var _cY_ = cst_lu; - } - /*<>*/ return transform_int_alt - (iconv, - /*<>*/ caml_format_int(_cY_, n)); - /*<>*/ } - function convert_nativeint(iconv, n){ - /*<>*/ switch(iconv){ - case 1: - var _cX_ = cst_nd$0; break; - case 2: - var _cX_ = cst_nd$1; break; - case 4: - var _cX_ = cst_ni$1; break; - case 5: - var _cX_ = cst_ni$2; break; - case 6: - var _cX_ = cst_nx; break; - case 7: - var _cX_ = cst_nx$0; break; - case 8: - var _cX_ = cst_nX; break; - case 9: - var _cX_ = cst_nX$0; break; - case 10: - var _cX_ = cst_no; break; - case 11: - var _cX_ = cst_no$0; break; - case 0: - case 13: - var _cX_ = cst_nd; break; - case 3: - case 14: - var _cX_ = cst_ni$0; break; - default: var _cX_ = cst_nu; - } - /*<>*/ return transform_int_alt - (iconv, - /*<>*/ caml_format_int(_cX_, n)); - /*<>*/ } - function convert_int64(iconv, n){ - /*<>*/ switch(iconv){ - case 1: - var _cW_ = cst_Ld$0; break; - case 2: - var _cW_ = cst_Ld$1; break; - case 4: - var _cW_ = cst_Li$1; break; - case 5: - var _cW_ = cst_Li$2; break; - case 6: - var _cW_ = cst_Lx; break; - case 7: - var _cW_ = cst_Lx$0; break; - case 8: - var _cW_ = cst_LX; break; - case 9: - var _cW_ = cst_LX$0; break; - case 10: - var _cW_ = cst_Lo; break; - case 11: - var _cW_ = cst_Lo$0; break; - case 0: - case 13: - var _cW_ = cst_Ld; break; - case 3: - case 14: - var _cW_ = cst_Li$0; break; - default: var _cW_ = cst_Lu; - } - /*<>*/ return transform_int_alt - (iconv, - /*<>*/ runtime.caml_int64_format - (_cW_, n)); - /*<>*/ } - function convert_float(fconv, prec, x){ - function hex(param){ - /*<>*/ switch(fconv[1]){ - case 0: - var sign = 45; break; - case 1: - var sign = 43; break; - default: var sign = 32; - } - /*<>*/ return /*<>*/ runtime.caml_hexstring_of_float - (x, prec, sign); - /*<>*/ } - /*<>*/ function caml_special_val(str){ - /*<>*/ /*<>*/ var - match = - /*<>*/ runtime.caml_classify_float(x); - return 3 === match - ? x < 0. ? cst_neg_infinity : cst_infinity - : 4 <= match ? cst_nan : str; - /*<>*/ } - switch(fconv[2]){ - case 5: - /*<>*/ var - /*<>*/ str = - /*<>*/ caml_format_float - (format_of_fconv(fconv, prec), x), - len = caml_ml_string_length(str), - i = 0; - /*<>*/ for(;;){ - if(i === len) - var _cT_ = 0; - else{ - /*<>*/ /*<>*/ var - _cS_ = - /*<>*/ caml_string_get(str, i) - - 46 - | 0; - a: - { - if(23 < _cS_ >>> 0){ - if(55 === _cS_) break a; - } - else if(21 < _cS_ - 1 >>> 0) break a; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - continue; - } - var _cT_ = 1; - } - /*<>*/ /*<>*/ var - _cU_ = - _cT_ - ? str - : /*<>*/ caml_call2 - (Stdlib[28], str, cst$17); - /*<>*/ return caml_special_val(_cU_); - } - case 6: - /*<>*/ return hex(0); - case 7: - /*<>*/ /*<>*/ var - _cV_ = hex(0); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_String[25], _cV_); - case 8: - /*<>*/ return caml_special_val(hex(0)); - default: - /*<>*/ return /*<>*/ caml_format_float - (format_of_fconv(fconv, prec), x); - } - /*<>*/ } - function string_of_fmtty(fmtty){ - /*<>*/ /*<>*/ var - buf = buffer_create(16); - /*<>*/ bprint_fmtty(buf, fmtty); - /*<>*/ return buffer_contents(buf); - /*<>*/ } - function make_int_padding_precision(k, acc, fmt, pad, prec, trans, iconv){ - /*<>*/ if(typeof pad === "number"){ - if(typeof prec === "number") - return prec - ? function - (p, x){ - /*<>*/ /*<>*/ var - str = - fix_int_precision - (p, - /*<>*/ caml_call2 - (trans, iconv, x)); - /*<>*/ return make_printf - (k, [4, acc, str], fmt); - /*<>*/ } - : function - (x){ - /*<>*/ /*<>*/ var - str = - /*<>*/ caml_call2 - (trans, iconv, x); - /*<>*/ return make_printf - (k, [4, acc, str], fmt); - /*<>*/ }; - var p = prec[1]; - /*<>*/ return function(x){ - /*<>*/ /*<>*/ var - str = - fix_int_precision - (p, - /*<>*/ caml_call2(trans, iconv, x)); - /*<>*/ return make_printf - (k, [4, acc, str], fmt); /*<>*/ }; - } - if(0 === pad[0]){ - var w = pad[2], padty = pad[1]; - if(typeof prec === "number") - return prec - ? function - (p, x){ - /*<>*/ /*<>*/ var - str = - fix_padding - (padty, - w, - fix_int_precision - (p, - /*<>*/ caml_call2 - (trans, iconv, x))); - /*<>*/ return make_printf - (k, [4, acc, str], fmt); - /*<>*/ } - : function - (x){ - /*<>*/ /*<>*/ var - str = - fix_padding - (padty, - w, - /*<>*/ caml_call2 - (trans, iconv, x)); - /*<>*/ return make_printf - (k, [4, acc, str], fmt); - /*<>*/ }; - var p$0 = prec[1]; - /*<>*/ return function(x){ - /*<>*/ /*<>*/ var - str = - fix_padding - (padty, - w, - fix_int_precision - (p$0, - /*<>*/ caml_call2 - (trans, iconv, x))); - /*<>*/ return make_printf - (k, [4, acc, str], fmt); /*<>*/ }; - } - var padty$0 = pad[1]; - if(typeof prec === "number") - return prec - ? function - (w, p, x){ - /*<>*/ /*<>*/ var - str = - fix_padding - (padty$0, - w, - fix_int_precision - (p, - /*<>*/ caml_call2 - (trans, iconv, x))); - /*<>*/ return make_printf - (k, [4, acc, str], fmt); - /*<>*/ } - : function - (w, x){ - /*<>*/ /*<>*/ var - str = - fix_padding - (padty$0, - w, - /*<>*/ caml_call2 - (trans, iconv, x)); - /*<>*/ return make_printf - (k, [4, acc, str], fmt); - /*<>*/ }; - var p$1 = prec[1]; - /*<>*/ return function(w, x){ - /*<>*/ /*<>*/ var - str = - fix_padding - (padty$0, - w, - fix_int_precision - (p$1, - /*<>*/ caml_call2(trans, iconv, x))); - /*<>*/ return make_printf - (k, [4, acc, str], fmt); /*<>*/ }; - /*<>*/ } - function make_padding(k, acc, fmt, pad, trans){ - /*<>*/ if(typeof pad === "number") - /*<>*/ return function(x){ - /*<>*/ /*<>*/ var - new_acc = - [4, acc, /*<>*/ caml_call1(trans, x)]; - /*<>*/ return make_printf - (k, new_acc, fmt); /*<>*/ }; - if(0 === pad[0]){ - var width = pad[2], padty = pad[1]; - /*<>*/ return function(x){ - /*<>*/ /*<>*/ var - new_acc = - [4, - acc, - fix_padding - (padty, - width, - /*<>*/ caml_call1(trans, x))]; - /*<>*/ return make_printf - (k, new_acc, fmt); /*<>*/ }; - } - var padty$0 = pad[1]; - /*<>*/ return function(w, x){ - /*<>*/ /*<>*/ var - new_acc = - [4, - acc, - fix_padding - (padty$0, - w, - /*<>*/ caml_call1(trans, x))]; - /*<>*/ return make_printf(k, new_acc, fmt); /*<>*/ }; - /*<>*/ } - function make_printf$0(counter, k, acc, fmt){ - /*<>*/ var - k$0 = k, - acc$0 = acc, - fmt$0 = fmt; - /*<>*/ for(;;){ - if(typeof fmt$0 === "number") - /*<>*/ return /*<>*/ caml_call1 - (k$0, acc$0); - switch(fmt$0[0]){ - case 0: - var rest = fmt$0[1]; - /*<>*/ return function(c){ - /*<>*/ /*<>*/ var - new_acc = [5, acc$0, c]; - /*<>*/ return make_printf - (k$0, new_acc, rest); /*<>*/ }; - case 1: - var rest$0 = fmt$0[1]; - /*<>*/ return function(c){ - /*<>*/ var - /*<>*/ str = - /*<>*/ caml_call1 - (Stdlib_Char[2], c), - /*<>*/ l = - /*<>*/ caml_ml_string_length(str), - /*<>*/ res = - /*<>*/ caml_call2 - (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)]; - /*<>*/ return make_printf - (k$0, new_acc, rest$0); /*<>*/ }; - case 2: - var rest$1 = fmt$0[2], pad = fmt$0[1]; - /*<>*/ return make_padding - (k$0, - acc$0, - rest$1, - pad, - function(str){ - /*<>*/ return str; - /*<>*/ }); - case 3: - var rest$2 = fmt$0[2], pad$0 = fmt$0[1]; - /*<>*/ return make_padding - (k$0, acc$0, rest$2, pad$0, string_to_caml_string); - case 4: - var - rest$3 = fmt$0[4], - prec = fmt$0[3], - pad$1 = fmt$0[2], - iconv = fmt$0[1]; - /*<>*/ return make_int_padding_precision - (k$0, acc$0, rest$3, pad$1, prec, convert_int, iconv); - case 5: - var - rest$4 = fmt$0[4], - prec$0 = fmt$0[3], - pad$2 = fmt$0[2], - iconv$0 = fmt$0[1]; - /*<>*/ return make_int_padding_precision - (k$0, acc$0, rest$4, pad$2, prec$0, convert_int32, iconv$0); - case 6: - var - rest$5 = fmt$0[4], - prec$1 = fmt$0[3], - pad$3 = fmt$0[2], - iconv$1 = fmt$0[1]; - /*<>*/ return make_int_padding_precision - (k$0, - acc$0, - rest$5, - pad$3, - prec$1, - convert_nativeint, - iconv$1); - case 7: - var - rest$6 = fmt$0[4], - prec$2 = fmt$0[3], - pad$4 = fmt$0[2], - iconv$2 = fmt$0[1]; - /*<>*/ return make_int_padding_precision - (k$0, acc$0, rest$6, pad$4, prec$2, convert_int64, iconv$2); - case 8: - var - rest$7 = fmt$0[4], - prec$3 = fmt$0[3], - pad$5 = fmt$0[2], - fconv = fmt$0[1]; - if(typeof pad$5 === "number"){ - if(typeof prec$3 === "number") - return prec$3 - ? function - (p, x){ - /*<>*/ /*<>*/ var - str = convert_float(fconv, p, x); - /*<>*/ return make_printf - (k$0, [4, acc$0, str], rest$7); - /*<>*/ } - : function - (x){ - /*<>*/ /*<>*/ var - str = - convert_float(fconv, default_float_precision(fconv), x); - /*<>*/ return make_printf - (k$0, [4, acc$0, str], rest$7); - /*<>*/ }; - var p = prec$3[1]; - /*<>*/ return function(x){ - /*<>*/ /*<>*/ var - str = convert_float(fconv, p, x); - /*<>*/ return make_printf - (k$0, [4, acc$0, str], rest$7); /*<>*/ }; - } - if(0 === pad$5[0]){ - var w = pad$5[2], padty = pad$5[1]; - if(typeof prec$3 === "number") - return prec$3 - ? function - (p, x){ - /*<>*/ /*<>*/ var - str = fix_padding(padty, w, convert_float(fconv, p, x)); - /*<>*/ return make_printf - (k$0, [4, acc$0, str], rest$7); - /*<>*/ } - : function - (x){ - /*<>*/ var - /*<>*/ str = - convert_float(fconv, default_float_precision(fconv), x), - /*<>*/ str$0 = - fix_padding(padty, w, str); - /*<>*/ return make_printf - (k$0, [4, acc$0, str$0], rest$7); - /*<>*/ }; - var p$0 = prec$3[1]; - /*<>*/ return function(x){ - /*<>*/ /*<>*/ var - str = fix_padding(padty, w, convert_float(fconv, p$0, x)); - /*<>*/ return make_printf - (k$0, [4, acc$0, str], rest$7); /*<>*/ }; - } - var padty$0 = pad$5[1]; - if(typeof prec$3 === "number") - return prec$3 - ? function - (w, p, x){ - /*<>*/ /*<>*/ var - str = fix_padding(padty$0, w, convert_float(fconv, p, x)); - /*<>*/ return make_printf - (k$0, [4, acc$0, str], rest$7); - /*<>*/ } - : function - (w, x){ - /*<>*/ var - /*<>*/ str = - convert_float(fconv, default_float_precision(fconv), x), - /*<>*/ str$0 = - fix_padding(padty$0, w, str); - /*<>*/ return make_printf - (k$0, [4, acc$0, str$0], rest$7); - /*<>*/ }; - var p$1 = prec$3[1]; - /*<>*/ return function(w, x){ - /*<>*/ /*<>*/ var - str = fix_padding(padty$0, w, convert_float(fconv, p$1, x)); - /*<>*/ return make_printf - (k$0, [4, acc$0, str], rest$7); /*<>*/ }; - case 9: - var rest$8 = fmt$0[2], pad$6 = fmt$0[1]; - /*<>*/ return make_padding - (k$0, acc$0, rest$8, pad$6, Stdlib[30]); - case 10: - /*<>*/ var - rest$9 = fmt$0[1], - /*<>*/ acc$1 = [7, acc$0], - acc$0 = acc$1, - fmt$0 = rest$9; - break; - case 11: - /*<>*/ var - rest$10 = fmt$0[2], - str = fmt$0[1], - /*<>*/ acc$2 = [2, acc$0, str], - acc$0 = acc$2, - fmt$0 = rest$10; - break; - case 12: - /*<>*/ var - rest$11 = fmt$0[2], - chr = fmt$0[1], - /*<>*/ acc$3 = [3, acc$0, chr], - acc$0 = acc$3, - fmt$0 = rest$11; - break; - case 13: - /*<>*/ var - rest$12 = fmt$0[3], - sub_fmtty = fmt$0[2], - /*<>*/ ty = - string_of_fmtty(sub_fmtty); - /*<>*/ return function(str){ - /*<>*/ return make_printf - (k$0, [4, acc$0, ty], rest$12); /*<>*/ }; - case 14: - var rest$13 = fmt$0[3], fmtty = fmt$0[2]; - /*<>*/ return function(param){ - /*<>*/ var - fmt = param[1], - /*<>*/ _cR_ = recast(fmt, fmtty); - /*<>*/ return make_printf - (k$0, - acc$0, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _cR_, rest$13)); /*<>*/ }; - case 15: - var rest$14 = fmt$0[1]; - /*<>*/ return function(f, x){ - /*<>*/ return make_printf - (k$0, - [6, - acc$0, - function(o){ - /*<>*/ return caml_call2 - (f, o, x); - /*<>*/ }], - rest$14); /*<>*/ }; - case 16: - var rest$15 = fmt$0[1]; - /*<>*/ return function(f){ - /*<>*/ return make_printf - (k$0, [6, acc$0, f], rest$15); /*<>*/ }; - case 17: - /*<>*/ var - rest$16 = fmt$0[2], - fmting_lit = fmt$0[1], - /*<>*/ acc$4 = [0, acc$0, fmting_lit], - acc$0 = acc$4, - fmt$0 = rest$16; - break; - case 18: - var _cP_ = fmt$0[1]; - if(0 === _cP_[0]) - var - rest$17 = fmt$0[2], - fmt$1 = _cP_[1][1], - k$3 = - function(acc, k, rest){ - function k$0(kacc){ - /*<>*/ return make_printf - (k, [1, acc, [0, kacc]], rest); - /*<>*/ } - return k$0; - }, - k$1 = k$3(acc$0, k$0, rest$17), - k$0 = k$1, - acc$0 = 0, - fmt$0 = fmt$1; - else - var - rest$18 = fmt$0[2], - fmt$2 = _cP_[1][1], - k$4 = - function(acc, k, rest){ - function k$0(kacc){ - /*<>*/ return make_printf - (k, [1, acc, [1, kacc]], rest); - /*<>*/ } - return k$0; - }, - k$2 = k$4(acc$0, k$0, rest$18), - k$0 = k$2, - acc$0 = 0, - fmt$0 = fmt$2; - break; - case 19: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _s_], 1); - case 20: - /*<>*/ var - rest$19 = fmt$0[3], - /*<>*/ new_acc = - [8, acc$0, cst_Printf_bad_conversion]; - /*<>*/ return function(param){ - /*<>*/ return make_printf - (k$0, new_acc, rest$19); /*<>*/ }; - case 21: - var rest$20 = fmt$0[2]; - /*<>*/ return function(n){ - /*<>*/ /*<>*/ var - new_acc = - [4, - acc$0, - /*<>*/ caml_format_int - (cst_u$0, n)]; - /*<>*/ return make_printf - (k$0, new_acc, rest$20); /*<>*/ }; - case 22: - var rest$21 = fmt$0[1]; - /*<>*/ return function(c){ - /*<>*/ /*<>*/ var - new_acc = [5, acc$0, c]; - /*<>*/ return make_printf - (k$0, new_acc, rest$21); /*<>*/ }; - case 23: - var rest$22 = fmt$0[2], ign = fmt$0[1]; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_ignored_param$0, [0, k$0, acc$0, ign, rest$22]); - var counter$1 = counter + 1 | 0; - /*<>*/ return make_ignored_param$0 - (counter$1, k$0, acc$0, ign, rest$22); - default: - /*<>*/ var - rest$23 = fmt$0[3], - f = fmt$0[2], - arity = fmt$0[1], - /*<>*/ _cQ_ = - /*<>*/ caml_call1(f, 0); - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cQ_]); - var counter$0 = counter + 1 | 0; - /*<>*/ return make_custom$0 - (counter$0, k$0, acc$0, rest$23, arity, _cQ_); - } - } - /*<>*/ } - function make_ignored_param$0(counter, k, acc, ign, fmt){ - /*<>*/ if(typeof ign === "number") - switch(ign){ - case 0: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$0 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$0, k, acc, fmt); - case 1: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$1 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$1, k, acc, fmt); - case 2: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _t_], 1); - default: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$2 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$2, k, acc, fmt); - } - switch(ign[0]){ - case 0: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$3 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$3, k, acc, fmt); - case 1: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$4 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$4, k, acc, fmt); - case 2: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$5 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$5, k, acc, fmt); - case 3: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$6 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$6, k, acc, fmt); - case 4: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$7 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$7, k, acc, fmt); - case 5: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$8 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$8, k, acc, fmt); - case 6: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$9 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$9, k, acc, fmt); - case 7: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$10 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$10, k, acc, fmt); - case 8: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$11 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$11, k, acc, fmt); - case 9: - var fmtty = ign[2]; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_from_fmtty$0, [0, k, acc, fmtty, fmt]); - var counter$14 = counter + 1 | 0; - /*<>*/ return make_from_fmtty$0 - (counter$14, k, acc, fmtty, fmt); - case 10: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$12 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$12, k, acc, fmt); - default: - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$13 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$13, k, acc, fmt); - } - /*<>*/ } - function make_from_fmtty$0(counter, k, acc, fmtty, fmt){ - /*<>*/ if(typeof fmtty !== "number") - switch(fmtty[0]){ - case 0: - var rest = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest, fmt); /*<>*/ }; - case 1: - var rest$0 = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$0, fmt); /*<>*/ }; - case 2: - var rest$1 = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$1, fmt); /*<>*/ }; - case 3: - var rest$2 = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$2, fmt); /*<>*/ }; - case 4: - var rest$3 = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$3, fmt); /*<>*/ }; - case 5: - var rest$4 = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$4, fmt); /*<>*/ }; - case 6: - var rest$5 = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$5, fmt); /*<>*/ }; - case 7: - var rest$6 = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$6, fmt); /*<>*/ }; - case 8: - var rest$7 = fmtty[2]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$7, fmt); /*<>*/ }; - case 9: - /*<>*/ var - rest$8 = fmtty[3], - ty2 = fmtty[2], - ty1 = fmtty[1], - /*<>*/ ty = trans(symm(ty1), ty2); - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, - acc, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], ty, rest$8), - fmt); /*<>*/ }; - case 10: - var rest$9 = fmtty[1]; - /*<>*/ return function(param, _cO_){ - /*<>*/ return make_from_fmtty - (k, acc, rest$9, fmt); /*<>*/ }; - case 11: - var rest$10 = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$10, fmt); /*<>*/ }; - case 12: - var rest$11 = fmtty[1]; - /*<>*/ return function(param){ - /*<>*/ return make_from_fmtty - (k, acc, rest$11, fmt); /*<>*/ }; - case 13: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _u_], 1); - default: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _v_], 1); - } - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_invalid_arg, [0, k, acc, fmt]); - var counter$0 = counter + 1 | 0; - /*<>*/ return make_invalid_arg - (counter$0, k, acc, fmt); - /*<>*/ } - function make_invalid_arg(counter, k, acc, fmt){ - /*<>*/ /*<>*/ var - _cN_ = [8, acc, cst_Printf_bad_conversion$0]; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cN_, fmt]); - var counter$0 = counter + 1 | 0; - /*<>*/ return make_printf$0 - (counter$0, k, _cN_, fmt); - /*<>*/ } - function make_custom$0(counter, k, acc, rest, arity, f){ - /*<>*/ if(arity){ - var arity$0 = arity[1]; - /*<>*/ return function(x){ - /*<>*/ return make_custom - (k, - acc, - rest, - arity$0, - /*<>*/ caml_call1(f, x)); /*<>*/ }; - } - /*<>*/ /*<>*/ var - _cM_ = [4, acc, f]; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cM_, rest]); - var counter$0 = counter + 1 | 0; - /*<>*/ return make_printf$0 - (counter$0, k, _cM_, rest); - /*<>*/ } - function make_printf(k, acc, fmt){ - /*<>*/ return caml_trampoline(make_printf$0(0, k, acc, fmt)); - } - function make_ignored_param(k, acc, ign, fmt){ - /*<>*/ return caml_trampoline - (make_ignored_param$0(0, k, acc, ign, fmt)); - } - function make_from_fmtty(k, acc, fmtty, fmt){ - /*<>*/ return caml_trampoline - (make_from_fmtty$0(0, k, acc, fmtty, fmt)); - } - function make_custom(k, acc, rest, arity, f){ - /*<>*/ return caml_trampoline - (make_custom$0(0, k, acc, rest, arity, f)); - } - function fn_of_padding_precision(k, o, fmt, pad, prec){ - /*<>*/ if(typeof pad === "number"){ - if(typeof prec !== "number"){ - /*<>*/ /*<>*/ var - _cl_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cL_){ - /*<>*/ return _cl_;}; - } - if(prec){ - /*<>*/ var - /*<>*/ _ci_ = make_iprintf(k, o, fmt), - /*<>*/ _cj_ = - function(_cK_){ /*<>*/ return _ci_;}; - /*<>*/ return function(_cJ_){ - /*<>*/ return _cj_;}; - } - /*<>*/ /*<>*/ var - _ck_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cI_){ - /*<>*/ return _ck_;}; - } - if(0 === pad[0]){ - if(typeof prec !== "number"){ - /*<>*/ /*<>*/ var - _cp_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cH_){ - /*<>*/ return _cp_;}; - } - if(prec){ - /*<>*/ var - /*<>*/ _cm_ = make_iprintf(k, o, fmt), - /*<>*/ _cn_ = - function(_cG_){ /*<>*/ return _cm_;}; - /*<>*/ return function(_cF_){ - /*<>*/ return _cn_;}; - } - /*<>*/ /*<>*/ var - _co_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cE_){ - /*<>*/ return _co_;}; - } - if(typeof prec !== "number"){ - /*<>*/ var - /*<>*/ _cv_ = make_iprintf(k, o, fmt), - /*<>*/ _cw_ = - function(_cD_){ /*<>*/ return _cv_;}; - /*<>*/ return function(_cC_){ - /*<>*/ return _cw_;}; - } - if(prec){ - /*<>*/ var - /*<>*/ _cq_ = make_iprintf(k, o, fmt), - /*<>*/ _cr_ = - function(_cB_){ /*<>*/ return _cq_;}, - /*<>*/ _cs_ = - function(_cA_){ /*<>*/ return _cr_;}; - /*<>*/ return function(_cz_){ - /*<>*/ return _cs_;}; - } - /*<>*/ /*<>*/ var - _ct_ = make_iprintf(k, o, fmt); - /*<>*/ function _cu_(_cy_){ - /*<>*/ return _ct_; - } - /*<>*/ return function(_cx_){ - /*<>*/ return _cu_;}; - /*<>*/ } - function make_iprintf$0(counter, k, o, fmt){ - /*<>*/ var k$0 = k, fmt$0 = fmt; - /*<>*/ for(;;){ - if(typeof fmt$0 === "number") - /*<>*/ return /*<>*/ caml_call1 - (k$0, o); - switch(fmt$0[0]){ - case 0: - /*<>*/ var - rest = fmt$0[1], - /*<>*/ _by_ = - make_iprintf(k$0, o, rest); - /*<>*/ return function(_ch_){ - /*<>*/ return _by_;}; - case 1: - /*<>*/ var - rest$0 = fmt$0[1], - /*<>*/ _bz_ = - make_iprintf(k$0, o, rest$0); - /*<>*/ return function(_cg_){ - /*<>*/ return _bz_;}; - case 2: - var _bA_ = fmt$0[1]; - if(typeof _bA_ === "number"){ - /*<>*/ var - rest$1 = fmt$0[2], - /*<>*/ _bB_ = - make_iprintf(k$0, o, rest$1); - /*<>*/ return function(_cf_){ - /*<>*/ return _bB_;}; - } - if(0 === _bA_[0]){ - /*<>*/ var - rest$2 = fmt$0[2], - /*<>*/ _bC_ = - make_iprintf(k$0, o, rest$2); - /*<>*/ return function(_ce_){ - /*<>*/ return _bC_;}; - } - /*<>*/ var - rest$3 = fmt$0[2], - /*<>*/ _bD_ = - make_iprintf(k$0, o, rest$3), - /*<>*/ _bE_ = - function(_cd_){ /*<>*/ return _bD_;}; - /*<>*/ return function(_cc_){ - /*<>*/ return _bE_;}; - case 3: - var _bF_ = fmt$0[1]; - if(typeof _bF_ === "number"){ - /*<>*/ var - rest$4 = fmt$0[2], - /*<>*/ _bG_ = - make_iprintf(k$0, o, rest$4); - /*<>*/ return function(_cb_){ - /*<>*/ return _bG_;}; - } - if(0 === _bF_[0]){ - /*<>*/ var - rest$5 = fmt$0[2], - /*<>*/ _bH_ = - make_iprintf(k$0, o, rest$5); - /*<>*/ return function(_ca_){ - /*<>*/ return _bH_;}; - } - /*<>*/ var - rest$6 = fmt$0[2], - /*<>*/ _bI_ = - make_iprintf(k$0, o, rest$6), - /*<>*/ _bJ_ = - function(_b$_){ /*<>*/ return _bI_;}; - /*<>*/ return function(_b__){ - /*<>*/ return _bJ_;}; - case 4: - var rest$7 = fmt$0[4], prec = fmt$0[3], pad = fmt$0[2]; - /*<>*/ return fn_of_padding_precision - (k$0, o, rest$7, pad, prec); - case 5: - var rest$8 = fmt$0[4], prec$0 = fmt$0[3], pad$0 = fmt$0[2]; - /*<>*/ return fn_of_padding_precision - (k$0, o, rest$8, pad$0, prec$0); - case 6: - var rest$9 = fmt$0[4], prec$1 = fmt$0[3], pad$1 = fmt$0[2]; - /*<>*/ return fn_of_padding_precision - (k$0, o, rest$9, pad$1, prec$1); - case 7: - var rest$10 = fmt$0[4], prec$2 = fmt$0[3], pad$2 = fmt$0[2]; - /*<>*/ return fn_of_padding_precision - (k$0, o, rest$10, pad$2, prec$2); - case 8: - var rest$11 = fmt$0[4], prec$3 = fmt$0[3], pad$3 = fmt$0[2]; - /*<>*/ return fn_of_padding_precision - (k$0, o, rest$11, pad$3, prec$3); - case 9: - var _bK_ = fmt$0[1]; - if(typeof _bK_ === "number"){ - /*<>*/ var - rest$12 = fmt$0[2], - /*<>*/ _bL_ = - make_iprintf(k$0, o, rest$12); - /*<>*/ return function(_b9_){ - /*<>*/ return _bL_;}; - } - if(0 === _bK_[0]){ - /*<>*/ var - rest$13 = fmt$0[2], - /*<>*/ _bM_ = - make_iprintf(k$0, o, rest$13); - /*<>*/ return function(_b8_){ - /*<>*/ return _bM_;}; - } - /*<>*/ var - rest$14 = fmt$0[2], - /*<>*/ _bN_ = - make_iprintf(k$0, o, rest$14), - /*<>*/ _bO_ = - function(_b7_){ /*<>*/ return _bN_;}; - /*<>*/ return function(_b6_){ - /*<>*/ return _bO_;}; - case 10: - var rest$15 = fmt$0[1], fmt$0 = rest$15; break; - case 11: - var rest$16 = fmt$0[2], fmt$0 = rest$16; break; - case 12: - var rest$17 = fmt$0[2], fmt$0 = rest$17; break; - case 13: - /*<>*/ var - rest$18 = fmt$0[3], - /*<>*/ _bP_ = - make_iprintf(k$0, o, rest$18); - /*<>*/ return function(_b5_){ - /*<>*/ return _bP_;}; - case 14: - var rest$19 = fmt$0[3], fmtty = fmt$0[2]; - /*<>*/ return function(param){ - /*<>*/ var - fmt = param[1], - /*<>*/ _b4_ = recast(fmt, fmtty); - /*<>*/ return make_iprintf - (k$0, - o, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _b4_, rest$19)); /*<>*/ }; - case 15: - /*<>*/ var - rest$20 = fmt$0[1], - /*<>*/ _bQ_ = - make_iprintf(k$0, o, rest$20), - /*<>*/ _bR_ = - function(_b3_){ /*<>*/ return _bQ_;}; - /*<>*/ return function(_b2_){ - /*<>*/ return _bR_;}; - case 16: - /*<>*/ var - rest$21 = fmt$0[1], - /*<>*/ _bS_ = - make_iprintf(k$0, o, rest$21); - /*<>*/ return function(_b1_){ - /*<>*/ return _bS_;}; - case 17: - var rest$22 = fmt$0[2], fmt$0 = rest$22; break; - case 18: - var _bT_ = fmt$0[1]; - if(0 === _bT_[0]) - var - rest$23 = fmt$0[2], - fmt$1 = _bT_[1][1], - k$3 = - function(k, rest){ - function k$0(koc){ - /*<>*/ return make_iprintf - (k, koc, rest); - /*<>*/ } - return k$0; - }, - k$1 = k$3(k$0, rest$23), - k$0 = k$1, - fmt$0 = fmt$1; - else - var - rest$24 = fmt$0[2], - fmt$2 = _bT_[1][1], - k$4 = - function(k, rest){ - function k$0(koc){ - /*<>*/ return make_iprintf - (k, koc, rest); - /*<>*/ } - return k$0; - }, - k$2 = k$4(k$0, rest$24), - k$0 = k$2, - fmt$0 = fmt$2; - break; - case 19: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _w_], 1); - case 20: - /*<>*/ var - rest$25 = fmt$0[3], - /*<>*/ _bU_ = - make_iprintf(k$0, o, rest$25); - /*<>*/ return function(_b0_){ - /*<>*/ return _bU_;}; - case 21: - /*<>*/ var - rest$26 = fmt$0[2], - /*<>*/ _bV_ = - make_iprintf(k$0, o, rest$26); - /*<>*/ return function(_bZ_){ - /*<>*/ return _bV_;}; - case 22: - /*<>*/ var - rest$27 = fmt$0[1], - /*<>*/ _bW_ = - make_iprintf(k$0, o, rest$27); - /*<>*/ return function(_bY_){ - /*<>*/ return _bW_;}; - case 23: - var rest$28 = fmt$0[2], ign = fmt$0[1], _bX_ = 0; - /*<>*/ return make_ignored_param - (function(param){ - /*<>*/ return caml_call1 - (k$0, o); - /*<>*/ }, - _bX_, - ign, - rest$28); - default: - var rest$29 = fmt$0[3], arity = fmt$0[1]; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (fn_of_custom_arity$0, [0, k$0, o, rest$29, arity]); - var counter$0 = counter + 1 | 0; - /*<>*/ return fn_of_custom_arity$0 - (counter$0, k$0, o, rest$29, arity); - } - } - /*<>*/ } - function fn_of_custom_arity$0(counter, k, o, fmt, param){ - /*<>*/ if(param){ - /*<>*/ var - arity = param[1], - /*<>*/ _bw_ = - fn_of_custom_arity(k, o, fmt, arity); - /*<>*/ return function(_bx_){ - /*<>*/ return _bw_;}; - } - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (make_iprintf$0, [0, k, o, fmt]); - var counter$0 = counter + 1 | 0; - /*<>*/ return make_iprintf$0 - (counter$0, k, o, fmt); - /*<>*/ } - function make_iprintf(k, o, fmt){ - /*<>*/ return caml_trampoline(make_iprintf$0(0, k, o, fmt)); - } - function fn_of_custom_arity(k, o, fmt, param){ - /*<>*/ return caml_trampoline - (fn_of_custom_arity$0(0, k, o, fmt, param)); - } - function output_acc(o, acc){ - /*<>*/ var acc$0 = acc; - /*<>*/ for(;;){ - if(typeof acc$0 === "number") - /*<>*/ return 0; - switch(acc$0[0]){ - case 0: - /*<>*/ var - fmting_lit = acc$0[2], - p = acc$0[1], - /*<>*/ s = - string_of_formatting_lit(fmting_lit); - /*<>*/ output_acc(o, p); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[66], o, s); - case 1: - var match = acc$0[2], p$0 = acc$0[1]; - if(0 === match[0]){ - var acc$1 = match[1]; - /*<>*/ output_acc(o, p$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib[66], o, cst$18); - var acc$0 = acc$1; - } - else{ - var acc$2 = match[1]; - /*<>*/ output_acc(o, p$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib[66], o, cst$19); - var acc$0 = acc$2; - } - break; - case 6: - var f = acc$0[2], p$3 = acc$0[1]; - /*<>*/ output_acc(o, p$3); - /*<>*/ return /*<>*/ caml_call1 - (f, o); - case 7: - var p$4 = acc$0[1]; - /*<>*/ output_acc(o, p$4); - /*<>*/ return /*<>*/ caml_call1 - (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); - 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); - default: - var c = acc$0[2], p$2 = acc$0[1]; - /*<>*/ output_acc(o, p$2); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[65], o, c); - } - } - /*<>*/ } - function bufput_acc(b, acc){ - /*<>*/ var acc$0 = acc; - /*<>*/ for(;;){ - if(typeof acc$0 === "number") - /*<>*/ return 0; - switch(acc$0[0]){ - case 0: - /*<>*/ var - fmting_lit = acc$0[2], - p = acc$0[1], - /*<>*/ s = - string_of_formatting_lit(fmting_lit); - /*<>*/ bufput_acc(b, p); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, s); - case 1: - var match = acc$0[2], p$0 = acc$0[1]; - if(0 === match[0]){ - var acc$1 = match[1]; - /*<>*/ bufput_acc(b, p$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$20); - var acc$0 = acc$1; - } - else{ - var acc$2 = match[1]; - /*<>*/ bufput_acc(b, p$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$21); - var acc$0 = acc$2; - } - break; - case 6: - var f = acc$0[2], p$3 = acc$0[1]; - /*<>*/ bufput_acc(b, p$3); - /*<>*/ return /*<>*/ caml_call1 - (f, b); - case 7: - var acc$3 = acc$0[1], acc$0 = acc$3; break; - case 8: - var msg = acc$0[2], p$4 = acc$0[1]; - /*<>*/ bufput_acc(b, p$4); - /*<>*/ return /*<>*/ caml_call1 - (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); - default: - var c = acc$0[2], p$2 = acc$0[1]; - /*<>*/ bufput_acc(b, p$2); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, c); - } - } - /*<>*/ } - function strput_acc(b, acc){ - /*<>*/ var acc$0 = acc; - /*<>*/ for(;;){ - if(typeof acc$0 === "number") - /*<>*/ return 0; - switch(acc$0[0]){ - case 0: - /*<>*/ var - fmting_lit = acc$0[2], - p = acc$0[1], - /*<>*/ s = - string_of_formatting_lit(fmting_lit); - /*<>*/ strput_acc(b, p); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, s); - case 1: - var match = acc$0[2], p$0 = acc$0[1]; - if(0 === match[0]){ - var acc$1 = match[1]; - /*<>*/ strput_acc(b, p$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$22); - var acc$0 = acc$1; - } - else{ - var acc$2 = match[1]; - /*<>*/ strput_acc(b, p$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$23); - var acc$0 = acc$2; - } - break; - case 6: - var f = acc$0[2], p$3 = acc$0[1]; - /*<>*/ strput_acc(b, p$3); - /*<>*/ /*<>*/ var - _bv_ = /*<>*/ caml_call1(f, 0); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, _bv_); - case 7: - var acc$3 = acc$0[1], acc$0 = acc$3; break; - case 8: - var msg = acc$0[2], p$4 = acc$0[1]; - /*<>*/ strput_acc(b, p$4); - /*<>*/ return /*<>*/ caml_call1 - (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); - default: - var c = acc$0[2], p$2 = acc$0[1]; - /*<>*/ strput_acc(b, p$2); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, c); - } - } - /*<>*/ } - function failwith_message(param){ - /*<>*/ var - fmt = param[1], - /*<>*/ buf = - /*<>*/ caml_call1 - (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_); - /*<>*/ } - /*<>*/ return make_printf(k, 0, fmt); - } - function open_box_of_string(str){ - /*<>*/ if - ( /*<>*/ runtime.caml_string_equal - (str, cst$43)) - /*<>*/ return _x_; - var len = caml_ml_string_length(str); - function invalid_box(param){ - /*<>*/ return /*<>*/ caml_call1 - (failwith_message(_y_), str); - /*<>*/ } - function parse_spaces(i){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(i$0 === len) /*<>*/ return i$0; - /*<>*/ /*<>*/ var - match = - /*<>*/ caml_string_get(str, i$0); - if(9 !== match && 32 !== match) - /*<>*/ return i$0; - /*<>*/ var - /*<>*/ i$1 = i$0 + 1 | 0, - i$0 = i$1; - } - /*<>*/ } - /*<>*/ var - /*<>*/ wstart = parse_spaces(0), - wend = wstart; - /*<>*/ for(;;){ - if - (wend !== len - && - 25 - >= - /*<>*/ caml_string_get(str, wend) - - 97 - >>> 0){ - /*<>*/ var - /*<>*/ j = wend + 1 | 0, - wend = j; - continue; - } - /*<>*/ var - /*<>*/ box_name = - /*<>*/ caml_call3 - (Stdlib_String[15], str, wstart, wend - wstart | 0), - /*<>*/ nstart = parse_spaces(wend), - nend = nstart; - /*<>*/ for(;;){ - a: - if(nend !== len){ - /*<>*/ /*<>*/ var - match = - /*<>*/ caml_string_get(str, nend); - b: - { - if(48 <= match){ - if(58 > match) break b; - } - else if(45 === match) break b; - break a; - } - /*<>*/ var - /*<>*/ j$0 = nend + 1 | 0, - nend = j$0; - continue; - } - if(nstart === nend) - var indent = 0; - else - /*<>*/ try{ - /*<>*/ var - /*<>*/ _bs_ = - /*<>*/ runtime.caml_int_of_string - ( /*<>*/ caml_call3 - (Stdlib_String[15], str, nstart, nend - nstart | 0)), - indent = _bs_; - } - catch(_bt_){ - var _br_ = caml_wrap_exception(_bt_); - if(_br_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_br_, 0); - var indent = invalid_box(0); - } - /*<>*/ /*<>*/ var - exp_end = parse_spaces(nend); - if(exp_end !== len) - /*<>*/ invalid_box(0); - a: - { - if - (caml_string_notequal(box_name, cst$43) - && caml_string_notequal(box_name, "b")){ - if(! caml_string_notequal(box_name, "h")){var box_type = 0; break a;} - if(! caml_string_notequal(box_name, "hov")){var box_type = 3; break a;} - if(! caml_string_notequal(box_name, "hv")){var box_type = 2; break a;} - if(caml_string_notequal(box_name, "v")){ - var box_type = invalid_box(0); - break a; - } - var box_type = 1; - break a; - } - var box_type = 4; - } - /*<>*/ return [0, indent, box_type]; - } - } - /*<>*/ } - function make_padding_fmt_ebb(pad, fmt){ - /*<>*/ if(typeof pad === "number") - /*<>*/ return [0, 0, fmt]; - if(0 === pad[0]){ - var w = pad[2], s = pad[1]; - /*<>*/ return [0, [0, s, w], fmt]; - } - var s$0 = pad[1]; - /*<>*/ return [0, [1, s$0], fmt]; - /*<>*/ } - function make_padprec_fmt_ebb(pad, prec, fmt){ - /*<>*/ if(typeof prec === "number") - var match = prec ? [0, 1, fmt] : [0, 0, fmt]; - else - var p = prec[1], match = [0, [0, p], fmt]; - var prec$0 = match[1]; - /*<>*/ if(typeof pad === "number") - /*<>*/ return [0, 0, prec$0, fmt]; - /*<>*/ if(0 === pad[0]){ - var w = pad[2], s = pad[1]; - /*<>*/ return [0, [0, s, w], prec$0, fmt]; - } - var s$0 = pad[1]; - /*<>*/ return [0, [1, s$0], prec$0, fmt]; - /*<>*/ } - function fmt_ebb_of_string(legacy_behavior, str){ - /*<>*/ if(legacy_behavior) - var flag = legacy_behavior[1], legacy_behavior$0 = flag; - else - var legacy_behavior$0 = 1; - function invalid_format_message(str_ind, msg){ - /*<>*/ return /*<>*/ caml_call3 - (failwith_message(_z_), str, str_ind, msg); - /*<>*/ } - /*<>*/ function unexpected_end_of_format - (end_ind){ - /*<>*/ return invalid_format_message - (end_ind, cst_unexpected_end_of_format); - /*<>*/ } - function invalid_format_without(str_ind, c, s){ - /*<>*/ return /*<>*/ caml_call4 - (failwith_message(_A_), str, str_ind, c, s); - /*<>*/ } - function expected_character(str_ind, expected, read){ - /*<>*/ return /*<>*/ caml_call4 - (failwith_message(_B_), str, str_ind, expected, read); - /*<>*/ } - function add_literal(lit_start, str_ind, fmt){ - /*<>*/ var - size = str_ind - lit_start | 0; - return 0 === size - ? [0, fmt] - : 1 - === size - ? [0, - [12, - /*<>*/ caml_string_get - (str, lit_start), - fmt]] - : [0, - [11, - /*<>*/ caml_call3 - (Stdlib_String[15], str, lit_start, size), - fmt]]; - /*<>*/ } - function parse(lit_start, end_ind){ - /*<>*/ var str_ind = lit_start; - /*<>*/ for(;;){ - if(str_ind === end_ind) - /*<>*/ return add_literal - (lit_start, str_ind, 0); - /*<>*/ /*<>*/ var - match = - /*<>*/ caml_string_get(str, str_ind); - if(37 === match){ - var str_ind$2 = str_ind + 1 | 0; - if(str_ind$2 === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - var - match$1 = - 95 - === - /*<>*/ caml_string_get - (str, str_ind$2) - ? parse_flags(str_ind, str_ind$2 + 1 | 0, end_ind, 1) - : parse_flags(str_ind, str_ind$2, end_ind, 0), - fmt_rest = match$1[1]; - /*<>*/ return add_literal - (lit_start, str_ind, fmt_rest); - } - if(64 === match){ - var str_ind$0 = str_ind + 1 | 0; - a: - if(str_ind$0 === end_ind) - var match$0 = _N_; - else{ - /*<>*/ /*<>*/ var - c = - /*<>*/ caml_string_get - (str, str_ind$0); - if(65 <= c){ - if(94 <= c){ - /*<>*/ /*<>*/ var - switcher = c - 123 | 0; - if(2 >= switcher >>> 0) - switch(switcher){ - case 0: - var match$0 = parse_tag(1, str_ind$0 + 1 | 0, end_ind); break a; - case 1: break; - default: - var - fmt_rest$2 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 1, fmt_rest$2]]; - break a; - } - } - else if(91 <= c) - switch(c - 91 | 0){ - case 0: - var match$0 = parse_tag(0, str_ind$0 + 1 | 0, end_ind); break a; - case 1: break; - default: - var - fmt_rest$3 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 0, fmt_rest$3]]; - break a; - } - } - else{ - if(10 === c){ - var - fmt_rest$4 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 3, fmt_rest$4]]; - break a; - } - if(32 <= c) - switch(c - 32 | 0){ - case 0: - var - fmt_rest$5 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, _O_, fmt_rest$5]]; - break a; - case 5: - /*<>*/ if - ((str_ind$0 + 1 | 0) < end_ind - && - 37 - === - /*<>*/ caml_string_get - (str, str_ind$0 + 1 | 0)){ - var - fmt_rest$6 = parse(str_ind$0 + 2 | 0, end_ind)[1], - match$0 = [0, [17, 6, fmt_rest$6]]; - break a; - } - var - fmt_rest$7 = parse(str_ind$0, end_ind)[1], - match$0 = [0, [12, 64, fmt_rest$7]]; - break a; - case 12: - var - fmt_rest$8 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, _P_, fmt_rest$8]]; - break a; - case 14: - var - fmt_rest$9 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 4, fmt_rest$9]]; - break a; - case 27: - var str_ind$3 = str_ind$0 + 1 | 0; - b: - try{ - var - _bg_ = str_ind$3 === end_ind ? 1 : 0, - _bh_ = - _bg_ - || - (60 - !== - /*<>*/ caml_string_get - (str, str_ind$3) - ? 1 - : 0); - if(_bh_) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - /*<>*/ var - /*<>*/ str_ind_1 = - parse_spaces(str_ind$3 + 1 | 0, end_ind), - /*<>*/ match$2 = - /*<>*/ caml_string_get - (str, str_ind_1); - c: - { - if(48 <= match$2){ - if(58 > match$2) break c; - } - else if(45 === match$2) break c; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - } - /*<>*/ var - /*<>*/ match$3 = - parse_integer(str_ind_1, end_ind), - width = match$3[2], - str_ind_2 = match$3[1], - /*<>*/ str_ind_3 = - parse_spaces(str_ind_2, end_ind), - /*<>*/ switcher$0 = - /*<>*/ caml_string_get - (str, str_ind_3) - - 45 - | 0; - if(12 < switcher$0 >>> 0){ - if(17 === switcher$0){ - /*<>*/ var - /*<>*/ s = - /*<>*/ caml_call3 - (Stdlib_String[15], - str, - str_ind$3 - 2 | 0, - (str_ind_3 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bi_ = - [0, s, width, 0], - /*<>*/ _bj_ = - str_ind_3 + 1 | 0, - formatting_lit$0 = _bi_, - next_ind = _bj_; - break b; - } - } - else if(1 < switcher$0 - 1 >>> 0){ - /*<>*/ var - /*<>*/ match$4 = - parse_integer(str_ind_3, end_ind), - offset = match$4[2], - str_ind_4 = match$4[1], - /*<>*/ str_ind_5 = - parse_spaces(str_ind_4, end_ind); - if - (62 - !== - /*<>*/ caml_string_get - (str, str_ind_5)) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - /*<>*/ var - /*<>*/ s$0 = - /*<>*/ caml_call3 - (Stdlib_String[15], - 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, - formatting_lit$0 = _bk_, - next_ind = _bl_; - break b; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - } - catch(_bq_){ - var _bf_ = caml_wrap_exception(_bq_); - if(_bf_ !== Stdlib[8] && _bf_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bf_, 0); - var formatting_lit$0 = formatting_lit, next_ind = str_ind$3; - } - var - fmt_rest$12 = parse(next_ind, end_ind)[1], - match$0 = [0, [17, formatting_lit$0, fmt_rest$12]]; - break a; - case 28: - var str_ind$4 = str_ind$0 + 1 | 0; - /*<>*/ try{ - /*<>*/ var - /*<>*/ str_ind_1$0 = - parse_spaces(str_ind$4, end_ind), - /*<>*/ match$6 = - /*<>*/ caml_string_get - (str, str_ind_1$0); - b: - { - c: - { - if(48 <= match$6){ - if(58 > match$6) break c; - } - else if(45 === match$6) break c; - var _bo_ = 0; - break b; - } - /*<>*/ var - /*<>*/ match$7 = - parse_integer(str_ind_1$0, end_ind), - size = match$7[2], - str_ind_2$0 = match$7[1], - /*<>*/ str_ind_3$0 = - parse_spaces(str_ind_2$0, end_ind); - if - (62 - !== - /*<>*/ caml_string_get - (str, str_ind_3$0)) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - /*<>*/ var - /*<>*/ s$1 = - /*<>*/ caml_call3 - (Stdlib_String[15], - str, - str_ind$4 - 2 | 0, - (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), - _bo_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; - } - var _bn_ = _bo_; - } - catch(_bp_){ - var _bm_ = caml_wrap_exception(_bp_); - if(_bm_ !== Stdlib[8] && _bm_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bm_, 0); - var _bn_ = 0; - } - if(_bn_) - var - match$5 = _bn_[1], - formatting_lit$1 = match$5[2], - next_ind$0 = match$5[1], - fmt_rest$13 = parse(next_ind$0, end_ind)[1], - _be_ = [0, [17, formatting_lit$1, fmt_rest$13]]; - else - var - fmt_rest$14 = parse(str_ind$4, end_ind)[1], - _be_ = [0, [17, _Q_, fmt_rest$14]]; - var match$0 = _be_; - break a; - case 31: - var - fmt_rest$10 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 2, fmt_rest$10]]; - break a; - case 32: - var - fmt_rest$11 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 5, fmt_rest$11]]; - break a; - } - } - var - fmt_rest$1 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, [2, c], fmt_rest$1]]; - } - var fmt_rest$0 = match$0[1]; - /*<>*/ return add_literal - (lit_start, str_ind, fmt_rest$0); - } - var str_ind$1 = str_ind + 1 | 0, str_ind = str_ind$1; - } - /*<>*/ } - function parse_conversion - (pct_ind, - str_ind, - end_ind, - plus, - hash, - space, - ign, - pad, - prec, - padprec, - symb){ - /*<>*/ var - /*<>*/ plus_used = [0, 0], - /*<>*/ hash_used = [0, 0], - /*<>*/ space_used = [0, 0], - /*<>*/ ign_used = [0, 0], - /*<>*/ pad_used = [0, 0], - /*<>*/ prec_used = [0, 0]; - function get_plus(param){ - /*<>*/ plus_used[1] = 1; - /*<>*/ return plus; - /*<>*/ } - function get_hash(param){ - /*<>*/ hash_used[1] = 1; - return hash; - /*<>*/ } - function get_space(param){ - /*<>*/ space_used[1] = 1; - return space; - /*<>*/ } - function get_ign(param){ - /*<>*/ ign_used[1] = 1; - return ign; - /*<>*/ } - function get_pad(param){ - /*<>*/ pad_used[1] = 1; - return pad; - /*<>*/ } - function get_prec(param){ - /*<>*/ prec_used[1] = 1; - return prec; - /*<>*/ } - function get_padprec(param){ - /*<>*/ pad_used[1] = 1; - return padprec; - /*<>*/ } - function get_int_pad(param){ - /*<>*/ var - /*<>*/ pad = get_pad(0), - /*<>*/ match = get_prec(0); - /*<>*/ if - (typeof match === "number" && ! match) - /*<>*/ return pad; - if(typeof pad === "number") - /*<>*/ return 0; - if(0 !== pad[0]) - return 2 <= pad[1] - ? legacy_behavior$0 - ? _H_ - : incompatible_flag(pct_ind, str_ind, 48, cst_precision$1) - : pad; - if(2 > pad[1]) /*<>*/ return pad; - var n = pad[2]; - /*<>*/ return legacy_behavior$0 - ? [0, 1, n] - : incompatible_flag(pct_ind, str_ind, 48, cst_precision$0); - /*<>*/ } - function check_no_0(symb, pad){ - /*<>*/ if(typeof pad === "number") - /*<>*/ return pad; - if(0 !== pad[0]) - return 2 <= pad[1] - ? legacy_behavior$0 - ? _I_ - : incompatible_flag(pct_ind, str_ind, symb, cst_0$1) - : pad; - if(2 > pad[1]) /*<>*/ return pad; - var width = pad[2]; - /*<>*/ return legacy_behavior$0 - ? [0, 1, width] - : incompatible_flag(pct_ind, str_ind, symb, cst_0$0); - /*<>*/ } - function opt_of_pad(c, pad){ - /*<>*/ if(typeof pad === "number") - /*<>*/ return 0; - if(0 === pad[0]) - switch(pad[1]){ - case 0: - var width = pad[2]; - /*<>*/ return legacy_behavior$0 - ? [0, width] - : incompatible_flag(pct_ind, str_ind, c, cst$24); - case 1: - var width$0 = pad[2]; - /*<>*/ return [0, width$0]; - default: - var width$1 = pad[2]; - /*<>*/ return legacy_behavior$0 - ? [0, width$1] - : incompatible_flag(pct_ind, str_ind, c, cst_0$2); - } - /*<>*/ return incompatible_flag - (pct_ind, str_ind, c, cst$25); - /*<>*/ } - function get_pad_opt(c){ - /*<>*/ return opt_of_pad(c, get_pad(0)); - /*<>*/ } - function get_padprec_opt(c){ - /*<>*/ return opt_of_pad - (c, get_padprec(0)); - /*<>*/ } - a: - { - /*<>*/ if(124 > symb) - switch(symb){ - case 33: - var - fmt_rest$5 = parse(str_ind, end_ind)[1], - fmt_result = [0, [10, fmt_rest$5]]; - break a; - case 40: - /*<>*/ var - /*<>*/ sub_end = - search_subformat_end(str_ind, end_ind, 41), - fmt_rest$7 = parse(sub_end + 2 | 0, end_ind)[1], - sub_fmt = parse(str_ind, sub_end)[1], - /*<>*/ sub_fmtty = - fmtty_of_fmt(sub_fmt); - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$2 = - [9, get_pad_opt(95), sub_fmtty], - _aN_ = [0, [23, ignored$2, fmt_rest$7]]; - else - var _aN_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; - var fmt_result = _aN_; - break a; - case 44: - var fmt_result = parse(str_ind, end_ind); break a; - case 67: - /*<>*/ var - fmt_rest$10 = parse(str_ind, end_ind)[1], - /*<>*/ _aP_ = - get_ign(0) ? [0, [23, 1, fmt_rest$10]] : [0, [1, fmt_rest$10]], - fmt_result = _aP_; - break a; - case 78: - var fmt_rest$14 = parse(str_ind, end_ind)[1], counter$0 = 2; - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$6 = [11, counter$0], - _aV_ = [0, [23, ignored$6, fmt_rest$14]]; - else - var _aV_ = [0, [21, counter$0, fmt_rest$14]]; - var fmt_result = _aV_; - break a; - case 83: - /*<>*/ var - /*<>*/ pad$6 = - check_no_0(symb, get_padprec(0)), - fmt_rest$15 = parse(str_ind, end_ind)[1]; - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$7 = - [1, get_padprec_opt(95)], - _aW_ = [0, [23, ignored$7, fmt_rest$15]]; - else - /*<>*/ var - /*<>*/ match$5 = - make_padding_fmt_ebb(pad$6, fmt_rest$15), - fmt_rest$16 = match$5[2], - pad$7 = match$5[1], - _aW_ = [0, [3, pad$7, fmt_rest$16]]; - var fmt_result = _aW_; - break a; - case 91: - if(str_ind === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ var - /*<>*/ char_set = - create_char_set(0), - add_char = - function(c){ - /*<>*/ return add_in_char_set - (char_set, c); - /*<>*/ }, - add_range = - function(c$0, c){ - /*<>*/ if(c >= c$0){ - var i = c$0; - for(;;){ - /*<>*/ add_in_char_set - (char_set, - /*<>*/ caml_call1 - (Stdlib[29], i)); - /*<>*/ /*<>*/ var - _bd_ = i + 1 | 0; - if(c === i) break; - var i = _bd_; - } - } - return 0; - /*<>*/ }, - fail_single_percent = - function(str_ind){ - /*<>*/ return /*<>*/ caml_call2 - (failwith_message(_R_), str, str_ind); - /*<>*/ }, - parse_char_set_content = - function(counter, str_ind, end_ind){ - /*<>*/ var str_ind$0 = str_ind; - /*<>*/ for(;;){ - if(str_ind$0 === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ /*<>*/ var - c = - /*<>*/ caml_string_get - (str, str_ind$0); - if(45 !== c){ - if(93 === c) - /*<>*/ return str_ind$0 + 1 - | 0; - var _bc_ = str_ind$0 + 1 | 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_after_char$0, [0, _bc_, end_ind, c]); - var counter$0 = counter + 1 | 0; - /*<>*/ return parse_char_set_after_char$0 - (counter$0, _bc_, end_ind, c); - } - /*<>*/ add_char(45); - var str_ind$1 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$1; - } - /*<>*/ }, - parse_char_set_after_char$0 = - function(counter, str_ind, end_ind, c){ - /*<>*/ var - str_ind$0 = str_ind, - c$0 = c; - /*<>*/ for(;;){ - if(str_ind$0 === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ /*<>*/ var - c$1 = - /*<>*/ caml_string_get - (str, str_ind$0); - a: - { - if(46 <= c$1){ - if(64 !== c$1){ - if(93 !== c$1) break a; - /*<>*/ add_char(c$0); - /*<>*/ return str_ind$0 + 1 - | 0; - } - } - else if(37 !== c$1){ - if(45 > c$1) break a; - var str_ind$2 = str_ind$0 + 1 | 0; - if(str_ind$2 === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ /*<>*/ var - c$2 = - /*<>*/ caml_string_get - (str, str_ind$2); - if(37 === c$2){ - if((str_ind$2 + 1 | 0) === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ /*<>*/ var - c$3 = - /*<>*/ caml_string_get - (str, str_ind$2 + 1 | 0); - if(37 !== c$3 && 64 !== c$3) - /*<>*/ return fail_single_percent - (str_ind$2); - /*<>*/ add_range(c$0, c$3); - var _ba_ = str_ind$2 + 2 | 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _ba_, end_ind]); - var counter$2 = counter + 1 | 0; - /*<>*/ return parse_char_set_content - (counter$2, _ba_, end_ind); - } - if(93 === c$2){ - /*<>*/ add_char(c$0); - /*<>*/ add_char(45); - /*<>*/ return str_ind$2 + 1 - | 0; - } - /*<>*/ add_range(c$0, c$2); - var _bb_ = str_ind$2 + 1 | 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _bb_, end_ind]); - var counter$1 = counter + 1 | 0; - /*<>*/ return parse_char_set_content - (counter$1, _bb_, end_ind); - } - if(37 === c$0){ - /*<>*/ add_char(c$1); - var _a$_ = str_ind$0 + 1 | 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _a$_, end_ind]); - var counter$0 = counter + 1 | 0; - /*<>*/ return parse_char_set_content - (counter$0, _a$_, end_ind); - } - } - if(37 === c$0) - /*<>*/ fail_single_percent - (str_ind$0); - /*<>*/ add_char(c$0); - var - str_ind$1 = str_ind$0 + 1 | 0, - str_ind$0 = str_ind$1, - c$0 = c$1; - } - /*<>*/ }, - parse_char_set_after_char = - function(str_ind, end_ind, c){ - /*<>*/ return caml_trampoline - (parse_char_set_after_char$0(0, str_ind, end_ind, c)); - }; - if(str_ind === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - if - (94 - === - /*<>*/ caml_string_get - (str, str_ind)) - var - str_ind$0 = str_ind + 1 | 0, - reverse = 1, - str_ind$1 = str_ind$0; - else - var reverse = 0, str_ind$1 = str_ind; - if(str_ind$1 === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ var - /*<>*/ c = - /*<>*/ caml_string_get - (str, str_ind$1), - /*<>*/ next_ind = - parse_char_set_after_char(str_ind$1 + 1 | 0, end_ind, c), - /*<>*/ char_set$0 = - freeze_char_set(char_set), - /*<>*/ char_set$1 = - reverse ? rev_char_set(char_set$0) : char_set$0, - fmt_rest$19 = parse(next_ind, end_ind)[1]; - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$9 = - [10, get_pad_opt(95), char_set$1], - _a1_ = [0, [23, ignored$9, fmt_rest$19]]; - else - var _a1_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; - var fmt_result = _a1_; - break a; - case 97: - var - fmt_rest$20 = parse(str_ind, end_ind)[1], - fmt_result = [0, [15, fmt_rest$20]]; - break a; - case 99: - /*<>*/ var - char_format = - function(fmt_rest){ - /*<>*/ return get_ign(0) - ? [0, [23, 0, fmt_rest]] - : [0, [0, fmt_rest]]; - /*<>*/ }, - fmt_rest$21 = parse(str_ind, end_ind)[1], - /*<>*/ match$7 = get_pad_opt(99); - if(match$7){ - if(0 === match$7[1]) - /*<>*/ var - /*<>*/ _a2_ = - get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], - _a3_ = _a2_; - else - var - _a3_ = - legacy_behavior$0 - ? char_format(fmt_rest$21) - : invalid_format_message - (str_ind, cst_non_zero_widths_are_unsupp); - var _a4_ = _a3_; - } - else - var _a4_ = char_format(fmt_rest$21); - var fmt_result = _a4_; - break a; - case 114: - /*<>*/ var - fmt_rest$22 = parse(str_ind, end_ind)[1], - /*<>*/ _a5_ = - get_ign(0) ? [0, [23, 2, fmt_rest$22]] : [0, [19, fmt_rest$22]], - fmt_result = _a5_; - break a; - case 115: - /*<>*/ var - /*<>*/ pad$9 = - check_no_0(symb, get_padprec(0)), - fmt_rest$23 = parse(str_ind, end_ind)[1]; - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$10 = - [0, get_padprec_opt(95)], - _a6_ = [0, [23, ignored$10, fmt_rest$23]]; - else - /*<>*/ var - /*<>*/ match$8 = - make_padding_fmt_ebb(pad$9, fmt_rest$23), - fmt_rest$24 = match$8[2], - pad$10 = match$8[1], - _a6_ = [0, [2, pad$10, fmt_rest$24]]; - var fmt_result = _a6_; - break a; - case 116: - var - fmt_rest$25 = parse(str_ind, end_ind)[1], - fmt_result = [0, [16, fmt_rest$25]]; - break a; - case 123: - /*<>*/ var - /*<>*/ sub_end$0 = - search_subformat_end(str_ind, end_ind, 125), - sub_fmt$0 = parse(str_ind, sub_end$0)[1], - fmt_rest$26 = parse(sub_end$0 + 2 | 0, end_ind)[1], - /*<>*/ sub_fmtty$0 = - fmtty_of_fmt(sub_fmt$0); - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$11 = - [8, get_pad_opt(95), sub_fmtty$0], - _a7_ = [0, [23, ignored$11, fmt_rest$26]]; - else - var _a7_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; - var fmt_result = _a7_; - break a; - case 66: - case 98: - /*<>*/ var - /*<>*/ pad$3 = - check_no_0(symb, get_padprec(0)), - fmt_rest$8 = parse(str_ind, end_ind)[1]; - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$3 = - [7, get_padprec_opt(95)], - _aO_ = [0, [23, ignored$3, fmt_rest$8]]; - else - /*<>*/ var - /*<>*/ match$3 = - make_padding_fmt_ebb(pad$3, fmt_rest$8), - fmt_rest$9 = match$3[2], - pad$4 = match$3[1], - _aO_ = [0, [9, pad$4, fmt_rest$9]]; - var fmt_result = _aO_; - break a; - case 37: - case 64: - var - fmt_rest$6 = parse(str_ind, end_ind)[1], - fmt_result = [0, [12, symb, fmt_rest$6]]; - break a; - case 76: - case 108: - case 110: - if(str_ind !== end_ind){ - /*<>*/ var - /*<>*/ symb$0 = - /*<>*/ caml_string_get - (str, str_ind), - /*<>*/ _a8_ = symb$0 - 88 | 0; - b: - { - if(32 >= _a8_ >>> 0) - switch(_a8_){ - case 0: - case 12: - case 17: - case 23: - case 29: - case 32: - var _aU_ = 1; break b; - } - var _aU_ = 0; - } - /*<>*/ if(_aU_) break; - } - var fmt_rest$13 = parse(str_ind, end_ind)[1]; - b: - { - if(108 <= symb){ - if(111 > symb) - switch(symb - 108 | 0){ - case 0: - var counter = 0; break b; - case 1: break; - default: var counter = 1; break b; - } - } - else if(76 === symb){var counter = 2; break b;} - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _V_], 1); - } - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$5 = [11, counter], - _aT_ = [0, [23, ignored$5, fmt_rest$13]]; - else - var _aT_ = [0, [21, counter, fmt_rest$13]]; - var fmt_result = _aT_; - break a; - case 32: - case 35: - case 43: - case 45: - case 95: - var - fmt_result = - /*<>*/ caml_call3 - (failwith_message(_M_), str, pct_ind, symb); - break a; - case 88: - case 100: - case 105: - case 111: - case 117: - case 120: - /*<>*/ var - /*<>*/ _aX_ = get_space(0), - /*<>*/ _aY_ = get_hash(0), - /*<>*/ iconv$2 = - compute_int_conv(pct_ind, str_ind, get_plus(0), _aY_, _aX_, symb), - fmt_rest$17 = parse(str_ind, end_ind)[1]; - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$8 = - [2, iconv$2, get_pad_opt(95)], - _aZ_ = [0, [23, ignored$8, fmt_rest$17]]; - else - /*<>*/ var - /*<>*/ _a0_ = get_prec(0), - /*<>*/ match$6 = - make_padprec_fmt_ebb(get_int_pad(0), _a0_, fmt_rest$17), - fmt_rest$18 = match$6[3], - prec$4 = match$6[2], - pad$8 = match$6[1], - _aZ_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; - var fmt_result = _aZ_; - break a; - case 69: - case 70: - case 71: - case 72: - case 101: - case 102: - case 103: - case 104: - /*<>*/ var - /*<>*/ space$1 = get_space(0), - /*<>*/ hash$1 = get_hash(0), - /*<>*/ plus$2 = get_plus(0), - flag = - plus$2 - ? space$1 - ? legacy_behavior$0 - ? 1 - : incompatible_flag(pct_ind, str_ind, 32, cst$36) - : 1 - : space$1 ? 2 : 0; - b: - { - c: - if(73 <= symb){ - var switcher = symb - 101 | 0; - if(3 >= switcher >>> 0){ - switch(switcher){ - case 0: - var _a9_ = 1; break; - case 1: - var _a9_ = 0; break; - case 2: - var _a9_ = 3; break; - default: var _a9_ = 6; - } - var kind = _a9_; - break b; - } - } - else if(69 <= symb){ - switch(symb - 69 | 0){ - case 0: - var _a__ = 2; break; - case 1: - break c; - case 2: - var _a__ = 4; break; - default: var _a__ = 7; - } - var kind = _a__; - break b; - } - if(hash$1){ - if(70 === symb){var kind = 8; break b;} - } - else if(70 === symb){var kind = 5; break b;} - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _X_], 1); - } - /*<>*/ var - /*<>*/ fconv = [0, flag, kind], - fmt_rest$11 = parse(str_ind, end_ind)[1]; - /*<>*/ if(get_ign(0)){ - /*<>*/ /*<>*/ var - match = get_prec(0); - if(typeof match === "number") - var - _aQ_ = - match ? incompatible_flag(pct_ind, str_ind, 95, cst$26) : 0; - else - var ndec = match[1], _aQ_ = [0, ndec]; - /*<>*/ var - /*<>*/ ignored$4 = - [6, get_pad_opt(95), _aQ_], - _aR_ = [0, [23, ignored$4, fmt_rest$11]]; - } - else - /*<>*/ var - /*<>*/ _aS_ = get_prec(0), - /*<>*/ match$4 = - make_padprec_fmt_ebb(get_pad(0), _aS_, fmt_rest$11), - fmt_rest$12 = match$4[3], - prec$3 = match$4[2], - pad$5 = match$4[1], - _aR_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; - var fmt_result = _aR_; - break a; - } - b: - if(108 <= symb){ - if(111 > symb){ - switch(symb - 108 | 0){ - case 0: - /*<>*/ var - /*<>*/ _ax_ = - /*<>*/ caml_string_get - (str, str_ind), - /*<>*/ _ay_ = get_space(0), - /*<>*/ _az_ = get_hash(0), - /*<>*/ iconv = - compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _az_, _ay_, _ax_), - fmt_rest = parse(str_ind + 1 | 0, end_ind)[1]; - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored = - [3, iconv, get_pad_opt(95)], - _aA_ = [0, [23, ignored, fmt_rest]]; - else - /*<>*/ var - /*<>*/ _aC_ = get_prec(0), - /*<>*/ match$0 = - make_padprec_fmt_ebb(get_int_pad(0), _aC_, fmt_rest), - fmt_rest$0 = match$0[3], - prec$0 = match$0[2], - pad$0 = match$0[1], - _aA_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; - var _aB_ = _aA_; - break; - case 1: - break b; - default: - /*<>*/ var - /*<>*/ _aD_ = - /*<>*/ caml_string_get - (str, str_ind), - /*<>*/ _aE_ = get_space(0), - /*<>*/ _aF_ = get_hash(0), - /*<>*/ iconv$0 = - compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aF_, _aE_, _aD_), - fmt_rest$1 = parse(str_ind + 1 | 0, end_ind)[1]; - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$0 = - [4, iconv$0, get_pad_opt(95)], - _aG_ = [0, [23, ignored$0, fmt_rest$1]]; - else - /*<>*/ var - /*<>*/ _aH_ = get_prec(0), - /*<>*/ match$1 = - make_padprec_fmt_ebb(get_int_pad(0), _aH_, fmt_rest$1), - fmt_rest$2 = match$1[3], - prec$1 = match$1[2], - pad$1 = match$1[1], - _aG_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; - var _aB_ = _aG_; - } - var fmt_result = _aB_; - break a; - } - } - else if(76 === symb){ - /*<>*/ var - /*<>*/ _aI_ = - /*<>*/ caml_string_get(str, str_ind), - /*<>*/ _aJ_ = get_space(0), - /*<>*/ _aK_ = get_hash(0), - /*<>*/ iconv$1 = - compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aK_, _aJ_, _aI_), - fmt_rest$3 = parse(str_ind + 1 | 0, end_ind)[1]; - /*<>*/ if(get_ign(0)) - /*<>*/ var - /*<>*/ ignored$1 = - [5, iconv$1, get_pad_opt(95)], - _aL_ = [0, [23, ignored$1, fmt_rest$3]]; - else - /*<>*/ var - /*<>*/ _aM_ = get_prec(0), - /*<>*/ match$2 = - make_padprec_fmt_ebb(get_int_pad(0), _aM_, fmt_rest$3), - fmt_rest$4 = match$2[3], - prec$2 = match$2[2], - pad$2 = match$2[1], - _aL_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; - var fmt_result = _aL_; - break a; - } - var - fmt_result = - /*<>*/ caml_call3 - (failwith_message(_J_), str, str_ind - 1 | 0, symb); - } - if(1 - legacy_behavior$0){ - var _ao_ = 1 - plus_used[1], plus$0 = _ao_ ? plus : _ao_; - if(plus$0) - /*<>*/ incompatible_flag - (pct_ind, str_ind, symb, cst$27); - var _ap_ = 1 - hash_used[1], hash$0 = _ap_ ? hash : _ap_; - if(hash$0) - /*<>*/ incompatible_flag - (pct_ind, str_ind, symb, cst$28); - var _aq_ = 1 - space_used[1], space$0 = _aq_ ? space : _aq_; - if(space$0) - /*<>*/ incompatible_flag - (pct_ind, str_ind, symb, cst$29); - var - _ar_ = 1 - pad_used[1], - _as_ = - _ar_ - ? /*<>*/ caml_notequal - ([0, pad], _K_) - : _ar_; - /*<>*/ if(_as_) - /*<>*/ incompatible_flag - (pct_ind, str_ind, symb, cst_padding$0); - var - _at_ = 1 - prec_used[1], - _au_ = - _at_ - ? /*<>*/ caml_notequal - ([0, prec], _L_) - : _at_; - /*<>*/ if(_au_){ - var _av_ = ign ? 95 : symb; - /*<>*/ incompatible_flag - (pct_ind, str_ind, _av_, cst_precision$2); - } - var plus$1 = ign ? plus : ign; - if(plus$1) - /*<>*/ incompatible_flag - (pct_ind, str_ind, 95, cst$30); - } - var _aw_ = 1 - ign_used[1], ign$0 = _aw_ ? ign : _aw_; - a: - if(ign$0){ - b: - { - if(38 <= symb){ - if(44 !== symb && 64 !== symb) break b; - } - else if(33 !== symb && 37 > symb) break b; - if(legacy_behavior$0) break a; - } - /*<>*/ incompatible_flag - (pct_ind, str_ind, symb, cst$31); - } - /*<>*/ return fmt_result; - } - function parse_after_precision - (pct_ind, str_ind, end_ind, minus, plus, hash, space, ign, pad, prec){ - /*<>*/ if(str_ind === end_ind) - /*<>*/ unexpected_end_of_format(end_ind); - function parse_conv(padprec){ - /*<>*/ return parse_conversion - (pct_ind, - str_ind + 1 | 0, - end_ind, - plus, - hash, - space, - ign, - pad, - prec, - padprec, - /*<>*/ caml_string_get - (str, str_ind)); - /*<>*/ } - if(typeof pad !== "number") - /*<>*/ return parse_conv(pad); - if(typeof prec === "number" && ! prec) - /*<>*/ return parse_conv(0); - if(minus){ - if(typeof prec === "number") - /*<>*/ return parse_conv(_F_); - var n = prec[1]; - /*<>*/ return parse_conv([0, 0, n]); - } - if(typeof prec === "number") - /*<>*/ return parse_conv(_G_); - var n$0 = prec[1]; - /*<>*/ return parse_conv([0, 1, n$0]); - /*<>*/ } - function parse_after_padding - (pct_ind, str_ind, end_ind, minus, plus, hash, space, ign, pad){ - /*<>*/ if(str_ind === end_ind) - /*<>*/ unexpected_end_of_format(end_ind); - /*<>*/ /*<>*/ var - symb = - /*<>*/ caml_string_get(str, str_ind); - if(46 !== symb) - /*<>*/ return parse_conversion - (pct_ind, - str_ind + 1 | 0, - end_ind, - plus, - hash, - space, - ign, - pad, - 0, - pad, - symb); - var str_ind$0 = str_ind + 1 | 0; - if(str_ind$0 === end_ind) - /*<>*/ unexpected_end_of_format(end_ind); - function parse_literal(minus, str_ind){ - /*<>*/ var - /*<>*/ match = - parse_positive(str_ind, end_ind, 0), - prec = match[2], - new_ind = match[1]; - /*<>*/ return parse_after_precision - (pct_ind, - new_ind, - end_ind, - minus, - plus, - hash, - space, - ign, - pad, - [0, prec]); - /*<>*/ } - /*<>*/ /*<>*/ var - symb$0 = - /*<>*/ caml_string_get(str, str_ind$0); - if(48 <= symb$0){ - if(58 > symb$0) - /*<>*/ return parse_literal - (minus, str_ind$0); - } - else if(42 <= symb$0) - switch(symb$0 - 42 | 0){ - case 0: - /*<>*/ return parse_after_precision - (pct_ind, - str_ind$0 + 1 | 0, - end_ind, - minus, - plus, - hash, - space, - ign, - pad, - 1); - case 1: - case 3: - if(legacy_behavior$0){ - /*<>*/ var - /*<>*/ _an_ = str_ind$0 + 1 | 0, - minus$0 = minus || (45 === symb$0 ? 1 : 0); - /*<>*/ return parse_literal - (minus$0, _an_); - } - break; - } - return legacy_behavior$0 - ? parse_after_precision - (pct_ind, - str_ind$0, - end_ind, - minus, - plus, - hash, - space, - ign, - pad, - _E_) - : invalid_format_without(str_ind$0 - 1 | 0, 46, cst_precision); - /*<>*/ } - function parse_flags(pct_ind, str_ind, end_ind, ign){ - /*<>*/ var - /*<>*/ zero = [0, 0], - /*<>*/ minus = [0, 0], - /*<>*/ plus = [0, 0], - /*<>*/ space = [0, 0], - /*<>*/ hash = [0, 0]; - function set_flag(str_ind, flag){ - /*<>*/ var - _ak_ = flag[1], - _al_ = _ak_ ? 1 - legacy_behavior$0 : _ak_; - if(_al_){ - /*<>*/ /*<>*/ var - _am_ = - /*<>*/ caml_string_get(str, str_ind); - /*<>*/ /*<>*/ caml_call3 - (failwith_message(_C_), str, str_ind, _am_); - } - flag[1] = 1; - return 0; - /*<>*/ } - var str_ind$0 = str_ind; - /*<>*/ for(;;){ - if(str_ind$0 === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ /*<>*/ var - switcher = - /*<>*/ caml_string_get - (str, str_ind$0) - - 32 - | 0; - if(16 >= switcher >>> 0) - switch(switcher){ - case 0: - /*<>*/ set_flag(str_ind$0, space); - /*<>*/ var - /*<>*/ str_ind$1 = - str_ind$0 + 1 | 0, - str_ind$0 = str_ind$1; - continue; - case 3: - /*<>*/ set_flag(str_ind$0, hash); - /*<>*/ var - /*<>*/ str_ind$2 = - str_ind$0 + 1 | 0, - str_ind$0 = str_ind$2; - continue; - case 11: - /*<>*/ set_flag(str_ind$0, plus); - /*<>*/ var - /*<>*/ str_ind$3 = - str_ind$0 + 1 | 0, - str_ind$0 = str_ind$3; - continue; - case 13: - /*<>*/ set_flag(str_ind$0, minus); - /*<>*/ var - /*<>*/ str_ind$4 = - str_ind$0 + 1 | 0, - str_ind$0 = str_ind$4; - continue; - case 16: - /*<>*/ set_flag(str_ind$0, zero); - /*<>*/ var - /*<>*/ str_ind$5 = - str_ind$0 + 1 | 0, - str_ind$0 = str_ind$5; - continue; - } - var - space$0 = space[1], - hash$0 = hash[1], - plus$0 = plus[1], - minus$0 = minus[1], - zero$0 = zero[1]; - if(str_ind$0 === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ var - padty = - zero$0 - ? minus$0 - ? legacy_behavior$0 - ? 0 - : incompatible_flag(pct_ind, str_ind$0, 45, cst_0) - : 2 - : minus$0 ? 0 : 1, - /*<>*/ match = - /*<>*/ caml_string_get - (str, str_ind$0); - if(48 <= match){ - if(58 > match){ - /*<>*/ var - /*<>*/ match$0 = - parse_positive(str_ind$0, end_ind, 0), - width = match$0[2], - new_ind = match$0[1]; - /*<>*/ return parse_after_padding - (pct_ind, - new_ind, - end_ind, - minus$0, - plus$0, - hash$0, - space$0, - ign, - [0, padty, width]); - } - } - else if(42 === match) - /*<>*/ return parse_after_padding - (pct_ind, - str_ind$0 + 1 | 0, - end_ind, - minus$0, - plus$0, - hash$0, - space$0, - ign, - [1, padty]); - switch(padty){ - case 0: - if(1 - legacy_behavior$0) - /*<>*/ invalid_format_without - (str_ind$0 - 1 | 0, 45, cst_padding); - /*<>*/ return parse_after_padding - (pct_ind, - str_ind$0, - end_ind, - minus$0, - plus$0, - hash$0, - space$0, - ign, - 0); - case 1: - /*<>*/ return parse_after_padding - (pct_ind, - str_ind$0, - end_ind, - minus$0, - plus$0, - hash$0, - space$0, - ign, - 0); - default: - /*<>*/ return parse_after_padding - (pct_ind, - str_ind$0, - end_ind, - minus$0, - plus$0, - hash$0, - space$0, - ign, - _D_); - } - } - /*<>*/ } - function parse_tag(is_open_tag, str_ind, end_ind){ - /*<>*/ try{ - if(str_ind === end_ind) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - if - (60 - !== - /*<>*/ caml_string_get(str, str_ind)) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - /*<>*/ /*<>*/ var - ind = - /*<>*/ caml_call3 - (Stdlib_String[31], 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[15], str, str_ind, (ind - str_ind | 0) + 1 | 0), - fmt_rest$0 = parse(ind + 1 | 0, end_ind)[1], - sub_fmt = parse(str_ind, ind + 1 | 0)[1], - /*<>*/ sub_format$0 = - [0, sub_fmt, sub_str], - /*<>*/ formatting$0 = - is_open_tag ? [0, sub_format$0] : [1, sub_format$0], - /*<>*/ _ai_ = - [0, [18, formatting$0, fmt_rest$0]]; - /*<>*/ return _ai_; - } - catch(_aj_){ - var _ah_ = caml_wrap_exception(_aj_); - if(_ah_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ah_, 0); - /*<>*/ var - fmt_rest = parse(str_ind, end_ind)[1], - /*<>*/ formatting = - is_open_tag ? [0, sub_format] : [1, sub_format]; - /*<>*/ return [0, - [18, formatting, fmt_rest]]; - } - /*<>*/ } - function parse_spaces(str_ind, end_ind){ - /*<>*/ var str_ind$0 = str_ind; - /*<>*/ for(;;){ - if(str_ind$0 === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ if - (32 - !== - /*<>*/ caml_string_get(str, str_ind$0)) - /*<>*/ return str_ind$0; - var str_ind$1 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$1; - } - /*<>*/ } - function parse_positive(str_ind, end_ind, acc){ - /*<>*/ var - str_ind$0 = str_ind, - acc$0 = acc; - /*<>*/ for(;;){ - if(str_ind$0 === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ /*<>*/ var - c = - /*<>*/ caml_string_get - (str, str_ind$0); - if(9 < c - 48 >>> 0) - /*<>*/ return [0, str_ind$0, acc$0]; - var new_acc = (acc$0 * 10 | 0) + (c - 48 | 0) | 0; - if(Stdlib_Sys[12] < new_acc){ - /*<>*/ /*<>*/ var - _ag_ = Stdlib_Sys[12]; - /*<>*/ return /*<>*/ caml_call3 - (failwith_message(_S_), str, new_acc, _ag_); - } - var - str_ind$1 = str_ind$0 + 1 | 0, - str_ind$0 = str_ind$1, - acc$0 = new_acc; - } - /*<>*/ } - function parse_integer(str_ind, end_ind){ - /*<>*/ if(str_ind === end_ind) - /*<>*/ unexpected_end_of_format(end_ind); - /*<>*/ /*<>*/ var - match = - /*<>*/ caml_string_get(str, str_ind); - if(48 <= match){ - if(58 > match) - /*<>*/ return parse_positive - (str_ind, end_ind, 0); - } - else if(45 === match){ - if((str_ind + 1 | 0) === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ /*<>*/ var - c = - /*<>*/ caml_string_get - (str, str_ind + 1 | 0); - if(9 < c - 48 >>> 0) - /*<>*/ return expected_character - (str_ind + 1 | 0, cst_digit, c); - /*<>*/ var - /*<>*/ match$0 = - parse_positive(str_ind + 1 | 0, end_ind, 0), - n = match$0[2], - next_ind = match$0[1]; - /*<>*/ return [0, next_ind, - n | 0]; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _T_], 1); - /*<>*/ } - function search_subformat_end(str_ind, end_ind, c){ - /*<>*/ var str_ind$0 = str_ind; - /*<>*/ for(;;){ - if(str_ind$0 === end_ind) - /*<>*/ /*<>*/ caml_call3 - (failwith_message(_U_), str, c, end_ind); - if - (37 - === - /*<>*/ caml_string_get - (str, str_ind$0)){ - if((str_ind$0 + 1 | 0) === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - if - ( /*<>*/ caml_string_get - (str, str_ind$0 + 1 | 0) - === c) - /*<>*/ return str_ind$0; - /*<>*/ /*<>*/ var - match = - /*<>*/ caml_string_get - (str, str_ind$0 + 1 | 0); - if(95 <= match){ - if(123 <= match){ - if(126 > match) - switch(match - 123 | 0){ - case 0: - /*<>*/ var - /*<>*/ sub_end = - search_subformat_end(str_ind$0 + 2 | 0, end_ind, 125), - /*<>*/ str_ind$2 = - sub_end + 2 | 0, - str_ind$0 = str_ind$2; - continue; - case 1: break; - default: - /*<>*/ return expected_character - (str_ind$0 + 1 | 0, cst_character, 125); - } - } - else if(96 > match){ - if((str_ind$0 + 2 | 0) === end_ind) - /*<>*/ unexpected_end_of_format - (end_ind); - /*<>*/ /*<>*/ var - match$0 = - /*<>*/ caml_string_get - (str, str_ind$0 + 2 | 0); - if(40 === match$0){ - /*<>*/ var - /*<>*/ sub_end$0 = - search_subformat_end(str_ind$0 + 3 | 0, end_ind, 41), - /*<>*/ str_ind$3 = - sub_end$0 + 2 | 0, - str_ind$0 = str_ind$3; - continue; - } - if(123 === match$0){ - /*<>*/ var - /*<>*/ sub_end$1 = - search_subformat_end(str_ind$0 + 3 | 0, end_ind, 125), - /*<>*/ str_ind$4 = - sub_end$1 + 2 | 0, - str_ind$0 = str_ind$4; - continue; - } - var str_ind$5 = str_ind$0 + 3 | 0, str_ind$0 = str_ind$5; - continue; - } - } - else{ - if(40 === match){ - /*<>*/ var - /*<>*/ sub_end$2 = - search_subformat_end(str_ind$0 + 2 | 0, end_ind, 41), - /*<>*/ str_ind$6 = sub_end$2 + 2 | 0, - str_ind$0 = str_ind$6; - continue; - } - if(41 === match) - /*<>*/ return expected_character - (str_ind$0 + 1 | 0, cst_character$0, 41); - } - var str_ind$1 = str_ind$0 + 2 | 0, str_ind$0 = str_ind$1; - } - else - var str_ind$7 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$7; - } - /*<>*/ } - function incompatible_flag(pct_ind, str_ind, symb, option){ - /*<>*/ /*<>*/ var - subfmt = - /*<>*/ caml_call3 - (Stdlib_String[15], str, pct_ind, str_ind - pct_ind | 0); - /*<>*/ return /*<>*/ caml_call5 - (failwith_message(_Y_), str, pct_ind, option, symb, subfmt); - /*<>*/ } - function compute_int_conv(pct_ind, str_ind, plus, hash, space, symb){ - /*<>*/ var - plus$0 = plus, - hash$0 = hash, - space$0 = space; - /*<>*/ for(;;){ - a: - { - if(plus$0){ - if(! hash$0){ - if(space$0) break a; - if(100 === symb) /*<>*/ return 1; - if(105 === symb) /*<>*/ return 4; - break a; - } - } - else{ - if(! hash$0){ - if(space$0){ - if(100 === symb) /*<>*/ return 2; - if(105 === symb) /*<>*/ return 5; - break a; - } - var switcher$1 = symb - 88 | 0; - if(32 < switcher$1 >>> 0) break a; - switch(switcher$1){ - case 0: - /*<>*/ return 8; - case 12: - /*<>*/ return 0; - case 17: - /*<>*/ return 3; - case 23: - /*<>*/ return 10; - case 29: - /*<>*/ return 12; - case 32: - /*<>*/ return 6; - default: break a; - } - } - if(! space$0){ - var switcher$0 = symb - 88 | 0; - if(32 >= switcher$0 >>> 0) - switch(switcher$0){ - case 0: - /*<>*/ return 9; - case 12: - /*<>*/ return 13; - case 17: - /*<>*/ return 14; - case 23: - /*<>*/ return 11; - case 29: - /*<>*/ return 15; - case 32: - /*<>*/ return 7; - } - } - } - var switcher = symb - 88 | 0; - if(32 >= switcher >>> 0) - switch(switcher){ - case 0: - if(legacy_behavior$0) - /*<>*/ return 9; - break; - case 23: - if(legacy_behavior$0) - /*<>*/ return 11; - break; - case 32: - if(legacy_behavior$0) - /*<>*/ return 7; - break; - case 12: - case 17: - case 29: - if(! legacy_behavior$0) - /*<>*/ return incompatible_flag - (pct_ind, str_ind, symb, cst$35); - var hash$0 = 0; - continue; - } - } - if(plus$0) - if(space$0){ - if(! legacy_behavior$0) - /*<>*/ return incompatible_flag - (pct_ind, str_ind, 32, cst$32); - var space$0 = 0; - } - else{ - if(! legacy_behavior$0) - /*<>*/ return incompatible_flag - (pct_ind, str_ind, symb, cst$33); - var plus$0 = 0; - } - else{ - if(! space$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _W_], 1); - if(! legacy_behavior$0) - /*<>*/ return incompatible_flag - (pct_ind, str_ind, symb, cst$34); - var space$0 = 0; - } - } - /*<>*/ } - return parse(0, caml_ml_string_length(str)); - } - function format_of_string_fmtty(str, fmtty){ - /*<>*/ var - fmt = fmt_ebb_of_string(0, str)[1]; - /*<>*/ try{ - /*<>*/ /*<>*/ var - _ae_ = [0, type_format(fmt, fmtty), str]; - /*<>*/ return _ae_; - } - catch(_af_){ - var _ac_ = caml_wrap_exception(_af_); - if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); - /*<>*/ /*<>*/ var - _ad_ = string_of_fmtty(fmtty); - /*<>*/ return /*<>*/ caml_call2 - (failwith_message(_Z_), str, _ad_); - } - /*<>*/ } - function format_of_string_format(str, param){ - var - str$0 = param[2], - fmt = param[1], - fmt$0 = fmt_ebb_of_string(0, str)[1]; - /*<>*/ try{ - /*<>*/ /*<>*/ var - _aa_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; - /*<>*/ return _aa_; - } - catch(_ab_){ - var _$_ = caml_wrap_exception(_ab_); - if(_$_ === Type_mismatch) - /*<>*/ return /*<>*/ caml_call2 - (failwith_message(___), str, str$0); - throw caml_maybe_attach_backtrace(_$_, 0); - } - } - var - CamlinternalFormat = - [0, - is_in_char_set, - rev_char_set, - create_char_set, - add_in_char_set, - freeze_char_set, - param_format_of_ignored_format, - make_printf, - make_iprintf, - output_acc, - bufput_acc, - strput_acc, - type_format, - fmt_ebb_of_string, - format_of_string_fmtty, - format_of_string_format, - char_of_iconv, - string_of_formatting_lit, - string_of_fmtty, - string_of_fmt, - open_box_of_string, - symm, - trans, - recast]; - runtime.caml_register_global(197, CamlinternalFormat, "CamlinternalFormat"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Printf -//# unitInfo: Requires: CamlinternalFormat, Stdlib, Stdlib__Buffer -(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]); - } - /*<>*/ 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, - CamlinternalFormat = global_data.CamlinternalFormat, - Stdlib = global_data.Stdlib; - function kfprintf(k, o, param){ - /*<>*/ var - fmt = param[1], - /*<>*/ _g_ = 0; - function _h_(acc){ - /*<>*/ /*<>*/ caml_call2 - (CamlinternalFormat[9], o, acc); - return caml_call1(k, o); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _h_, _g_, fmt); - } - function kbprintf(k, b, param){ - /*<>*/ var - fmt = param[1], - /*<>*/ _e_ = 0; - function _f_(acc){ - /*<>*/ /*<>*/ caml_call2 - (CamlinternalFormat[10], b, acc); - return caml_call1(k, b); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _f_, _e_, fmt); - } - function ikfprintf(k, oc, param){ - var fmt = param[1]; - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[8], k, oc, fmt); - } - function fprintf(oc, fmt){ - /*<>*/ return kfprintf - (function(_d_){ /*<>*/ return 0;}, oc, fmt); - /*<>*/ } - function bprintf(b, fmt){ - /*<>*/ return kbprintf - (function(_c_){ /*<>*/ return 0;}, b, fmt); - /*<>*/ } - function ifprintf(oc, fmt){ - /*<>*/ return ikfprintf - (function(_b_){ /*<>*/ return 0;}, oc, fmt); - /*<>*/ } - function ibprintf(b, fmt){ - /*<>*/ return ikfprintf - (function(_a_){ /*<>*/ return 0;}, b, fmt); - /*<>*/ } - function printf(fmt){ - /*<>*/ return fprintf(Stdlib[39], fmt); - /*<>*/ } - function eprintf(fmt){ - /*<>*/ return fprintf(Stdlib[40], fmt); - /*<>*/ } - 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); - /*<>*/ return /*<>*/ caml_call1 - (k, /*<>*/ caml_call1(Stdlib_Buffer[2], buf)); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], k$0, 0, fmt); - } - function sprintf(fmt){ - /*<>*/ return ksprintf - (function(s){ - /*<>*/ return s; - /*<>*/ }, - fmt); - /*<>*/ } - var - Stdlib_Printf = - [0, - fprintf, - printf, - eprintf, - sprintf, - bprintf, - ifprintf, - ibprintf, - kfprintf, - ikfprintf, - ksprintf, - kbprintf, - ikfprintf, - ksprintf]; - runtime.caml_register_global(3, Stdlib_Printf, "Stdlib__Printf"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Arg -//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Buffer, Stdlib__Int, Stdlib__List, Stdlib__Printf, Stdlib__String, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst$7 = "", - cst$9 = " ", - cst_Display_this_list_of_optio$1 = " Display this list of options", - cst_s = "%s", - cst_help$4 = "--help", - cst_help$3 = "-help", - cst$8 = ".\n", - cst_a_float$1 = "a float", - cst_an_integer$1 = "an integer", - caml_check_bound = runtime.caml_check_bound, - caml_equal = runtime.caml_equal, - caml_fresh_oo_id = runtime.caml_fresh_oo_id, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_string_length = runtime.caml_ml_string_length, - caml_string_get = runtime.caml_string_get, - caml_string_notequal = runtime.caml_string_notequal, - caml_sys_argv = runtime.caml_sys_argv, - 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) - : 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]); - } - /*<>*/ 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$6 = "\n", - cst$3 = cst$7, - cst$4 = " ", - cst$5 = cst$7, - cst$2 = "(?)", - cst = "}", - cst$0 = "|", - cst$1 = "{", - Stdlib = global_data.Stdlib, - Stdlib_Printf = global_data.Stdlib__Printf, - Stdlib_Array = global_data.Stdlib__Array, - Stdlib_Buffer = global_data.Stdlib__Buffer, - Stdlib_List = global_data.Stdlib__List, - Stdlib_String = global_data.Stdlib__String, - Stdlib_Int = global_data.Stdlib__Int, - /*<>*/ Bad = [248, "Stdlib.Arg.Bad", caml_fresh_oo_id(0)], - /*<>*/ Help = [248, "Stdlib.Arg.Help", caml_fresh_oo_id(0)], - /*<>*/ Stop = [248, "Stdlib.Arg.Stop", caml_fresh_oo_id(0)], - _v_ = [0, [2, 0, [0, 0]], "%s%c"], - _p_ = [0, [2, 0, 0], cst_s], - _q_ = [0, [2, 0, 0], cst_s], - _n_ = [0, [2, 0, 0], cst_s], - _o_ = [0, [2, 0, 0], cst_s], - _l_ = [0, [2, 0, 0], cst_s], - _m_ = [0, [2, 0, 0], cst_s], - cst_a_boolean = "a boolean", - cst_an_integer = cst_an_integer$1, - cst_an_integer$0 = cst_an_integer$1, - cst_a_float = cst_a_float$1, - cst_a_float$0 = cst_a_float$1, - cst_one_of = "one of: ", - cst_Arg_Expand_is_is_only_allo = - "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic", - cst_no_argument = "no argument", - _f_ = - [0, - [2, 0, [11, ": unknown option '", [2, 0, [11, "'.\n", 0]]]], - "%s: unknown option '%s'.\n"], - _i_ = - [0, - [2, - 0, - [11, - ": wrong argument '", - [2, - 0, - [11, - "'; option '", - [2, 0, [11, "' expects ", [2, 0, [11, cst$8, 0]]]]]]]], - "%s: wrong argument '%s'; option '%s' expects %s.\n"], - _j_ = - [0, - [2, 0, [11, ": option '", [2, 0, [11, "' needs an argument.\n", 0]]]], - "%s: option '%s' needs an argument.\n"], - _k_ = [0, [2, 0, [11, ": ", [2, 0, [11, cst$8, 0]]]], "%s: %s.\n"], - _g_ = [0, cst_help$3], - _h_ = [0, cst_help$4], - _e_ = [0, [2, 0, 0], cst_s], - _d_ = [0, [2, 0, [12, 10, 0]], "%s\n"], - cst_help$2 = cst_help$3, - cst_Display_this_list_of_optio = cst_Display_this_list_of_optio$1, - cst_help = cst_help$3, - cst_help$1 = cst_help$4, - cst_Display_this_list_of_optio$0 = cst_Display_this_list_of_optio$1, - cst_help$0 = cst_help$4, - _c_ = [0, cst_help$3], - _a_ = [0, [11, cst$9, [2, 0, [12, 32, [2, 0, [12, 10, 0]]]]], " %s %s\n"], - _b_ = - [0, - [11, cst$9, [2, 0, [12, 32, [2, 0, [2, 0, [12, 10, 0]]]]]], - " %s %s%s\n"], - cst_none = ""; - function assoc3(x, l){ - /*<>*/ var l$0 = l; - /*<>*/ for(;;){ - if(! l$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var match = l$0[1], y2 = match[2], y1 = match[1]; - /*<>*/ if( /*<>*/ caml_equal(y1, x)) - /*<>*/ return y2; - var t = l$0[2], l$0 = t; - } - /*<>*/ } - function make_symlist(prefix, sep, suffix, l){ - /*<>*/ if(! l) /*<>*/ return cst_none; - /*<>*/ var - t = l[2], - h = l[1], - /*<>*/ _aD_ = - /*<>*/ caml_call2(Stdlib[28], prefix, h); - function _aE_(x, y){ - /*<>*/ /*<>*/ var - _aG_ = /*<>*/ caml_call2(Stdlib[28], sep, y); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], x, _aG_); - /*<>*/ } - /*<>*/ /*<>*/ var - _aF_ = /*<>*/ caml_call3(Stdlib_List[25], _aE_, _aD_, t); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _aF_, suffix); - /*<>*/ } - function help_action(param){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, _c_], 1); - /*<>*/ } - function add_help(speclist){ - /*<>*/ try{ - /*<>*/ assoc3(cst_help$2, speclist); - /*<>*/ var /*<>*/ _aA_ = 0, add1 = _aA_; - } - catch(_aC_){ - var _aw_ = caml_wrap_exception(_aC_); - if(_aw_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_aw_, 0); - var - add1 = - [0, - [0, cst_help, [0, help_action], cst_Display_this_list_of_optio], - 0]; - } - try{ - /*<>*/ assoc3(cst_help$1, speclist); - /*<>*/ var /*<>*/ _az_ = 0, add2 = _az_; - } - catch(_aB_){ - var _ax_ = caml_wrap_exception(_aB_); - if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); - var - add2 = - [0, - [0, cst_help$0, [0, help_action], cst_Display_this_list_of_optio$0], - 0]; - } - /*<>*/ /*<>*/ var - _ay_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[37], speclist, _ay_); - /*<>*/ } - function usage_b(buf, speclist, errmsg){ - /*<>*/ /*<>*/ caml_call3 - (Stdlib_Printf[5], buf, _d_, errmsg); - /*<>*/ /*<>*/ var - _as_ = add_help(speclist); - /*<>*/ function _at_(param){ - var - doc = param[3], - spec = param[2], - key = param[1], - _au_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; - if(! _au_) return _au_; - if(11 !== spec[0]) - /*<>*/ return /*<>*/ caml_call4 - (Stdlib_Printf[5], buf, _a_, key, doc); - /*<>*/ var - l = spec[1], - /*<>*/ _av_ = make_symlist(cst$1, cst$0, cst, l); - /*<>*/ return /*<>*/ caml_call5 - (Stdlib_Printf[5], buf, _b_, key, _av_, doc); - } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[17], _at_, _as_); - /*<>*/ } - function usage_string(speclist, errmsg){ - /*<>*/ /*<>*/ var - b = /*<>*/ caml_call1(Stdlib_Buffer[1], 200); - /*<>*/ usage_b(b, speclist, errmsg); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Buffer[2], b); - /*<>*/ } - function usage(speclist, errmsg){ - /*<>*/ /*<>*/ var - _ar_ = usage_string(speclist, errmsg); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Printf[3], _e_, _ar_); - /*<>*/ } - /*<>*/ /*<>*/ var current = [0, 0]; - function int_of_string_opt(x){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _ap_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; - /*<>*/ return _ap_; - } - catch(_aq_){ - var _ao_ = caml_wrap_exception(_aq_); - if(_ao_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_ao_, 0); - } - /*<>*/ } - function float_of_string_opt(x){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _am_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; - /*<>*/ return _am_; - } - catch(_an_){ - var _al_ = caml_wrap_exception(_an_); - if(_al_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_al_, 0); - } - /*<>*/ } - function parse_and_expand_argv_dynamic_ - (allow_expand, current, argv, speclist, anonfun, errmsg){ - var initpos = current[1]; - function convert_error(error){ - /*<>*/ var - /*<>*/ b = - /*<>*/ caml_call1(Stdlib_Buffer[1], 200), - progname = - initpos < argv[1].length - 1 - ? caml_check_bound(argv[1], initpos)[1 + initpos] - : cst$2; - /*<>*/ switch(error[0]){ - case 0: - var s = error[1]; - if - (caml_string_notequal(s, cst_help$4) - && caml_string_notequal(s, cst_help$3)) - /*<>*/ /*<>*/ caml_call4 - (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); - break; - case 2: - var s$0 = error[1]; - /*<>*/ /*<>*/ caml_call4 - (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); - } - /*<>*/ 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)]; - /*<>*/ } - /*<>*/ current[1]++; - for(;;){ - if(current[1] >= argv[1].length - 1) return 0; - /*<>*/ try{ - /*<>*/ var - _Y_ = current[1], - /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_]; - a: - { - /*<>*/ if - (1 <= /*<>*/ caml_ml_string_length(s) - && 45 === /*<>*/ caml_string_get(s, 0)){ - try{ - /*<>*/ var - follow$1 = 0, - /*<>*/ _aa_ = assoc3(s, speclist[1]), - follow$0 = follow$1, - action = _aa_; - } - catch(_aj_){ - var _Z_ = caml_wrap_exception(_aj_); - if(_Z_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Z_, 0); - /*<>*/ try{ - /*<>*/ var - /*<>*/ i = - /*<>*/ caml_call2(Stdlib_String[35], s, 61), - /*<>*/ len = - /*<>*/ caml_ml_string_length(s), - /*<>*/ arg = - /*<>*/ caml_call3 - (Stdlib_String[15], s, i + 1 | 0, len - (i + 1 | 0) | 0), - /*<>*/ keyword = - /*<>*/ caml_call3(Stdlib_String[15], s, 0, i), - /*<>*/ follow = [0, arg], - /*<>*/ _$_ = assoc3(keyword, speclist[1]), - follow$0 = follow, - action = _$_; - } - catch(_ak_){ - var ___ = caml_wrap_exception(_ak_); - if(___ === Stdlib[8]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [0, s]], 1); - throw caml_maybe_attach_backtrace(___, 0); - } - } - var - no_arg$0 = - function(s, follow){ - function no_arg(param){ - /*<>*/ if(! follow) - /*<>*/ return 0; - var arg = follow[1]; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg, cst_no_argument]], 1); - /*<>*/ } - return no_arg; - }, - no_arg = no_arg$0(s, follow$0), - get_arg$0 = - function(s, follow){ - function get_arg(param){ - /*<>*/ if(follow){ - var arg = follow[1]; - /*<>*/ return arg; - } - if((current[1] + 1 | 0) >= argv[1].length - 1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [2, s]], 1); - var _ai_ = current[1] + 1 | 0; - /*<>*/ return caml_check_bound(argv[1], _ai_) - [1 + _ai_]; - /*<>*/ } - return get_arg; - }, - get_arg = get_arg$0(s, follow$0), - consume_arg$0 = - function(follow){ - function consume_arg(param){ - /*<>*/ return follow ? 0 : (current[1]++, 0); - /*<>*/ } - return consume_arg; - }, - consume_arg = consume_arg$0(follow$0), - treat_action$0 = - function(s, no_arg, get_arg, consume_arg){ - function treat_action(param){ - /*<>*/ switch(param[0]){ - case 0: - var f = param[1]; - /*<>*/ no_arg(0); - /*<>*/ return /*<>*/ caml_call1 - (f, 0); - case 1: - /*<>*/ var - f$0 = param[1], - /*<>*/ arg = get_arg(0); - /*<>*/ try{ - /*<>*/ var - /*<>*/ _ac_ = - [0, /*<>*/ caml_call1(Stdlib[32], arg)], - match = _ac_; - } - catch(_ah_){ - var _ab_ = caml_wrap_exception(_ah_); - if(_ab_[1] !== Stdlib[6]) - throw caml_maybe_attach_backtrace(_ab_, 0); - var match = 0; - } - if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg, cst_a_boolean]], 1); - var s$0 = match[1]; - /*<>*/ /*<>*/ caml_call1 - (f$0, s$0); - /*<>*/ return consume_arg(0); - case 2: - var r = param[1]; - /*<>*/ no_arg(0); - r[1] = 1; - return 0; - case 3: - var r$0 = param[1]; - /*<>*/ no_arg(0); - r$0[1] = 0; - return 0; - case 4: - /*<>*/ var - f$1 = param[1], - /*<>*/ arg$0 = get_arg(0); - /*<>*/ /*<>*/ caml_call1 - (f$1, arg$0); - /*<>*/ return consume_arg(0); - case 5: - var r$1 = param[1]; - r$1[1] = get_arg(0); - /*<>*/ return consume_arg(0); - case 6: - /*<>*/ var - f$2 = param[1], - /*<>*/ arg$1 = get_arg(0), - /*<>*/ match$0 = int_of_string_opt(arg$1); - if(! match$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg$1, cst_an_integer]], 1); - var x = match$0[1]; - /*<>*/ /*<>*/ caml_call1 - (f$2, x); - /*<>*/ return consume_arg(0); - case 7: - /*<>*/ var - r$2 = param[1], - /*<>*/ arg$2 = get_arg(0), - /*<>*/ match$1 = int_of_string_opt(arg$2); - if(! match$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg$2, cst_an_integer$0]], 1); - var x$0 = match$1[1]; - r$2[1] = x$0; - /*<>*/ return consume_arg(0); - case 8: - /*<>*/ var - f$3 = param[1], - /*<>*/ arg$3 = get_arg(0), - /*<>*/ match$2 = float_of_string_opt(arg$3); - if(! match$2) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg$3, cst_a_float]], 1); - var x$1 = match$2[1]; - /*<>*/ /*<>*/ caml_call1 - (f$3, x$1); - /*<>*/ return consume_arg(0); - case 9: - /*<>*/ var - r$3 = param[1], - /*<>*/ arg$4 = get_arg(0), - /*<>*/ match$3 = float_of_string_opt(arg$4); - if(! match$3) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg$4, cst_a_float$0]], 1); - var x$2 = match$3[1]; - r$3[1] = x$2; - /*<>*/ return consume_arg(0); - case 10: - var specs = param[1]; - /*<>*/ no_arg(0); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[17], treat_action, specs); - case 11: - /*<>*/ var - f$4 = param[2], - symb = param[1], - /*<>*/ arg$5 = get_arg(0); - /*<>*/ if - ( /*<>*/ caml_call2 - (Stdlib_List[36], arg$5, symb)){ - /*<>*/ /*<>*/ caml_call1 - (f$4, arg$5); - /*<>*/ return consume_arg(0); - } - /*<>*/ /*<>*/ var - _ad_ = make_symlist(cst$5, cst$4, cst$3, symb); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, - Stop, - [1, - s, - arg$5, - /*<>*/ caml_call2 - (Stdlib[28], cst_one_of, _ad_)]], - 1); - case 12: - var f$5 = param[1]; - /*<>*/ no_arg(0); - /*<>*/ for(;;){ - if(current[1] >= (argv[1].length - 1 - 1 | 0)) return 0; - var _ae_ = current[1] + 1 | 0; - /*<>*/ /*<>*/ caml_call1 - (f$5, caml_check_bound(argv[1], _ae_)[1 + _ae_]); - /*<>*/ consume_arg(0); - } - break; - case 13: - var f$6 = param[1]; - /*<>*/ no_arg(0); - /*<>*/ /*<>*/ var - acc = [0, 0]; - /*<>*/ for(;;){ - if(current[1] >= (argv[1].length - 1 - 1 | 0)) - /*<>*/ return /*<>*/ caml_call1 - (f$6, - /*<>*/ caml_call1(Stdlib_List[9], acc[1])); - var _ag_ = current[1] + 1 | 0, _af_ = acc[1]; - acc[1] = [0, caml_check_bound(argv[1], _ag_)[1 + _ag_], _af_]; - /*<>*/ consume_arg(0); - } - break; - default: - var f$7 = param[1]; - if(1 - allow_expand) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], cst_Arg_Expand_is_is_only_allo], 1); - /*<>*/ var - /*<>*/ arg$6 = get_arg(0), - /*<>*/ newarg = - /*<>*/ caml_call1(f$7, arg$6); - /*<>*/ consume_arg(0); - /*<>*/ var - /*<>*/ before = - /*<>*/ caml_call3 - (Stdlib_Array[5], argv[1], 0, current[1] + 1 | 0), - /*<>*/ after = - /*<>*/ caml_call3 - (Stdlib_Array[5], - argv[1], - current[1] + 1 | 0, - (argv[1].length - 1 - current[1] | 0) - 1 | 0); - argv[1] = - /*<>*/ caml_call1 - (Stdlib_Array[4], [0, before, [0, newarg, [0, after, 0]]]); - return 0; - } - /*<>*/ } - return treat_action; - }, - treat_action = treat_action$0(s, no_arg, get_arg, consume_arg); - /*<>*/ treat_action(action); - break a; - } - /*<>*/ /*<>*/ caml_call1(anonfun, s); - } - } - catch(exn$0){ - var exn = caml_wrap_exception(exn$0); - if(exn[1] === Bad){ - var m = exn[2]; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (convert_error([3, m]), 1); - } - if(exn[1] !== Stop) throw caml_maybe_attach_backtrace(exn, 0); - var e = exn[2]; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (convert_error(e), 1); - } - current[1]++; - } - } - function parse_and_expand_argv_dynamic - (current, argv, speclist, anonfun, errmsg){ - /*<>*/ return parse_and_expand_argv_dynamic_ - (1, current, argv, speclist, anonfun, errmsg); - /*<>*/ } - function parse_argv_dynamic(opt, argv, speclist, anonfun, errmsg){ - /*<>*/ if(opt) - var sth = opt[1], current$0 = sth; - else - var current$0 = current; - /*<>*/ return parse_and_expand_argv_dynamic_ - (0, current$0, [0, argv], speclist, anonfun, errmsg); - /*<>*/ } - function parse_argv(opt, argv, speclist, anonfun, errmsg){ - /*<>*/ if(opt) - var sth = opt[1], current$0 = sth; - else - var current$0 = current; - /*<>*/ return parse_argv_dynamic - ([0, current$0], argv, [0, speclist], anonfun, errmsg); - /*<>*/ } - function parse(l, f, msg){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _X_ = parse_argv(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _X_; - } - catch(exn$0){ - 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); - } - 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); - } - /*<>*/ } - function parse_dynamic(l, f, msg){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _W_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _W_; - } - catch(exn$0){ - 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); - } - 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); - } - /*<>*/ } - function parse_expand(l, f, msg){ - /*<>*/ try{ - /*<>*/ var - /*<>*/ argv = [0, caml_sys_argv(0)], - /*<>*/ spec = [0, l], - /*<>*/ current$0 = [0, current[1]], - /*<>*/ _V_ = - parse_and_expand_argv_dynamic(current$0, argv, spec, f, msg); - /*<>*/ return _V_; - } - catch(exn$0){ - 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); - } - 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); - } - /*<>*/ } - function second_word(s){ - /*<>*/ var len = caml_ml_string_length(s); - function loop(n){ - /*<>*/ var n$0 = n; - /*<>*/ for(;;){ - if(len <= n$0) /*<>*/ return len; - /*<>*/ if - (32 !== /*<>*/ caml_string_get(s, n$0)) - /*<>*/ return n$0; - /*<>*/ var - /*<>*/ n$1 = n$0 + 1 | 0, - n$0 = n$1; - } - /*<>*/ } - /*<>*/ try{ - /*<>*/ /*<>*/ var - n$0 = /*<>*/ caml_call2(Stdlib_String[35], s, 9); - } - catch(_T_){ - var _R_ = caml_wrap_exception(_T_); - if(_R_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_R_, 0); - /*<>*/ try{ - /*<>*/ /*<>*/ var - n = /*<>*/ caml_call2(Stdlib_String[35], s, 32); - } - catch(_U_){ - var _S_ = caml_wrap_exception(_U_); - if(_S_ === Stdlib[8]) /*<>*/ return len; - throw caml_maybe_attach_backtrace(_S_, 0); - } - /*<>*/ return loop(n + 1 | 0); - } - /*<>*/ return loop(n$0 + 1 | 0); - /*<>*/ } - function max_arg_len(cur, param){ - var doc = param[3], spec = param[2], kwd = param[1]; - /*<>*/ if(11 === spec[0]) - return caml_call2(Stdlib_Int[11], cur, caml_ml_string_length(kwd)); - var _Q_ = caml_ml_string_length(kwd) + second_word(doc) | 0; - return caml_call2(Stdlib_Int[11], cur, _Q_); - } - function replace_leading_tab(s){ - /*<>*/ /*<>*/ var seen = [0, 0]; - function _P_(c){ - /*<>*/ if(9 === c && ! seen[1]){ - seen[1] = 1; - /*<>*/ return 32; - } - /*<>*/ return c; - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[17], _P_, s); - /*<>*/ } - function align(opt, speclist){ - /*<>*/ if(opt) - var sth = opt[1], limit = sth; - else - var limit = Stdlib[19]; - /*<>*/ var - /*<>*/ completed = add_help(speclist), - /*<>*/ len = - /*<>*/ caml_call3 - (Stdlib_List[25], max_arg_len, 0, completed), - /*<>*/ len$0 = - /*<>*/ caml_call2(Stdlib_Int[10], len, limit); - /*<>*/ function _J_(ksd){ - var kwd = ksd[1], spec = ksd[2]; - if(! caml_string_notequal(ksd[3], cst$7)) - /*<>*/ return ksd; - if(11 === spec[0]){ - /*<>*/ var - msg$0 = ksd[3], - /*<>*/ cutcol$0 = second_word(msg$0), - /*<>*/ _M_ = - /*<>*/ caml_call2 - (Stdlib_Int[11], 0, len$0 - cutcol$0 | 0) - + 3 - | 0, - /*<>*/ spaces$0 = - /*<>*/ caml_call2(Stdlib_String[1], _M_, 32), - /*<>*/ _N_ = replace_leading_tab(msg$0), - /*<>*/ _O_ = - /*<>*/ caml_call2(Stdlib[28], spaces$0, _N_); - /*<>*/ return [0, - kwd, - spec, - /*<>*/ caml_call2(Stdlib[28], cst$6, _O_)]; - } - /*<>*/ var - msg = ksd[3], - spec$0 = ksd[2], - /*<>*/ cutcol = second_word(msg), - /*<>*/ kwd_len = - /*<>*/ caml_ml_string_length(kwd), - diff = (len$0 - kwd_len | 0) - cutcol | 0; - /*<>*/ if(0 >= diff) - /*<>*/ return [0, kwd, spec$0, replace_leading_tab(msg)]; - /*<>*/ var - /*<>*/ spaces = - /*<>*/ caml_call2(Stdlib_String[1], diff, 32), - /*<>*/ _K_ = replace_leading_tab(msg), - /*<>*/ prefix = - /*<>*/ caml_call3(Stdlib_String[15], _K_, 0, cutcol), - /*<>*/ suffix = - /*<>*/ caml_call3 - (Stdlib_String[15], - msg, - cutcol, - caml_ml_string_length(msg) - cutcol | 0), - /*<>*/ _L_ = - /*<>*/ caml_call2(Stdlib[28], spaces, suffix); - /*<>*/ return [0, - kwd, - spec$0, - /*<>*/ caml_call2(Stdlib[28], prefix, _L_)]; - } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[19], _J_, completed); - /*<>*/ } - function read_aux(trim, sep, file){ - /*<>*/ var - /*<>*/ ic = - /*<>*/ caml_call1(Stdlib[80], file), - /*<>*/ buf = - /*<>*/ caml_call1(Stdlib_Buffer[1], 200), - /*<>*/ words = [0, 0]; - function stash(param){ - /*<>*/ /*<>*/ var - word = /*<>*/ caml_call1(Stdlib_Buffer[2], buf); - /*<>*/ if(trim){ - var len = caml_ml_string_length(word); - a: - { - /*<>*/ if - (0 < len - && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ - var - _I_ = - /*<>*/ caml_call3 - (Stdlib_String[15], word, 0, len - 1 | 0); - break a; - } - var _I_ = word; - } - var word$0 = _I_; - } - else - var word$0 = word; - words[1] = [0, word$0, words[1]]; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Buffer[8], buf); - /*<>*/ } - /*<>*/ try{ - for(;;){ - /*<>*/ /*<>*/ var - c = /*<>*/ caml_call1(Stdlib[82], ic); - if(c === sep) - /*<>*/ stash(0); - else - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], buf, c); - } - } - catch(_H_){ - var _F_ = caml_wrap_exception(_H_); - if(_F_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_F_, 0); - if(0 < /*<>*/ caml_call1(Stdlib_Buffer[7], buf)) - /*<>*/ stash(0); - /*<>*/ /*<>*/ caml_call1(Stdlib[93], ic); - /*<>*/ /*<>*/ var - _G_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Array[10], _G_); - } - /*<>*/ } - var _r_ = 10, _s_ = 1; - /*<>*/ function read_arg(_E_){ - /*<>*/ return read_aux(_s_, _r_, _E_); - } - /*<>*/ var /*<>*/ _t_ = 0, _u_ = 0; - /*<>*/ function read_arg0(_D_){ - /*<>*/ return read_aux(_u_, _t_, _D_); - } - function write_aux(sep, file, args){ - /*<>*/ /*<>*/ var - oc = /*<>*/ caml_call1(Stdlib[61], file); - function _C_(s){ - /*<>*/ return caml_call4 - (Stdlib_Printf[1], oc, _v_, s, sep); - /*<>*/ } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _C_, args); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[76], oc); - /*<>*/ } - var _w_ = 10; - /*<>*/ function write_arg(_A_, _B_){ - /*<>*/ return write_aux(_w_, _A_, _B_); - } - /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ function write_arg0(_y_, _z_){ - /*<>*/ return write_aux(_x_, _y_, _z_); - } - var - Stdlib_Arg = - [0, - parse, - parse_dynamic, - parse_argv, - parse_argv_dynamic, - parse_and_expand_argv_dynamic, - parse_expand, - Help, - Bad, - usage, - usage_string, - align, - current, - read_arg, - read_arg0, - write_arg, - write_arg0]; - runtime.caml_register_global(54, Stdlib_Arg, "Stdlib__Arg"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Printexc -//# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Buffer, Stdlib__Obj, Stdlib__Printf -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst$4 = "", - cst_s = "%s\n", - cst_Program_not_linked_with_g_$0 = - "(Program not linked with -g, cannot print stack backtrace)\n", - cst_characters = ", characters ", - cst_Fatal_error_exception = "Fatal error: exception ", - cst_Fatal_error_exception_s = "Fatal error: exception %s\n", - cst_Uncaught_exception = "Uncaught exception: ", - cst_Uncaught_exception_s = "Uncaught exception: %s\n", - caml_check_bound = runtime.caml_check_bound, - caml_get_exception_raw_backtra = runtime.caml_get_exception_raw_backtrace, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_obj_tag = runtime.caml_obj_tag, - 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) - : 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_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]); - } - /*<>*/ var - global_data = runtime.caml_get_global_data(), - cst$0 = cst$4, - cst$3 = cst$4, - partial = [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, 0]]], - cst$1 = cst$4, - cst$2 = cst$4, - cst = "_", - locfmt = - [0, - [11, - 'File "', - [2, - 0, - [11, - '", line ', - [4, - 0, - 0, - 0, - [11, - cst_characters, - [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, [11, ": ", [2, 0, 0]]]]]]]]]], - 'File "%s", line %d, characters %d-%d: %s'], - Stdlib_Printf = global_data.Stdlib__Printf, - Stdlib_Atomic = global_data.Stdlib__Atomic, - Stdlib = global_data.Stdlib, - Stdlib_Buffer = global_data.Stdlib__Buffer, - Stdlib_Obj = global_data.Stdlib__Obj, - /*<>*/ printers = - /*<>*/ caml_call1(Stdlib_Atomic[1], 0), - _c_ = [0, [11, ", ", [2, 0, [2, 0, 0]]], ", %s%s"], - _o_ = - [0, - [11, cst_Fatal_error_exception, [2, 0, [12, 10, 0]]], - cst_Fatal_error_exception_s], - _p_ = - [0, - [11, - "Fatal error in uncaught exception handler: exception ", - [2, 0, [12, 10, 0]]], - "Fatal error in uncaught exception handler: exception %s\n"], - cst_Fatal_error_out_of_memory_ = - "Fatal error: out of memory in uncaught exception handler", - _n_ = - [0, - [11, cst_Fatal_error_exception, [2, 0, [12, 10, 0]]], - cst_Fatal_error_exception_s], - _l_ = [0, [2, 0, [12, 10, 0]], cst_s], - cst_Program_not_linked_with_g_ = cst_Program_not_linked_with_g_$0, - _j_ = [0, [2, 0, [12, 10, 0]], cst_s], - _k_ = - [0, - [11, cst_Program_not_linked_with_g_$0, 0], - cst_Program_not_linked_with_g_$0], - cst_Raised_at = "Raised at", - cst_Re_raised_at = "Re-raised at", - cst_Raised_by_primitive_operat = "Raised by primitive operation at", - cst_Called_from = "Called from", - cst_inlined = " (inlined)", - _h_ = - [0, - [2, - 0, - [12, - 32, - [2, - 0, - [11, - ' in file "', - [2, - 0, - [12, - 34, - [2, - 0, - [11, ", line ", [4, 0, 0, 0, [11, cst_characters, partial]]]]]]]]]], - '%s %s in file "%s"%s, line %d, characters %d-%d'], - _i_ = [0, [2, 0, [11, " unknown location", 0]], "%s unknown location"], - _g_ = - [0, - [11, cst_Uncaught_exception, [2, 0, [12, 10, 0]]], - cst_Uncaught_exception_s], - _f_ = - [0, - [11, cst_Uncaught_exception, [2, 0, [12, 10, 0]]], - cst_Uncaught_exception_s], - cst_Out_of_memory = "Out of memory", - cst_Stack_overflow = "Stack overflow", - cst_Pattern_matching_failed = "Pattern matching failed", - cst_Assertion_failed = "Assertion failed", - cst_Undefined_recursive_module = "Undefined recursive module", - _d_ = [0, [12, 40, [2, 0, [2, 0, [12, 41, 0]]]], "(%s%s)"], - _e_ = [0, [12, 40, [2, 0, [12, 41, 0]]], "(%s)"], - _b_ = [0, [4, 0, 0, 0, 0], "%d"], - _a_ = [0, [3, 0, 0], "%S"], - _m_ = - [0, - cst$4, - "(Cannot print locations:\n bytecode executable program file not found)", - "(Cannot print locations:\n bytecode executable program file appears to be corrupt)", - "(Cannot print locations:\n bytecode executable program file has wrong magic number)", - "(Cannot print locations:\n bytecode executable program file cannot be opened;\n -- too many open files. Try running with OCAMLRUNPARAM=b=2)"]; - 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 - _al_ = Stdlib_Obj[15]; - if( /*<>*/ caml_obj_tag(f) === _al_) - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Printf[4], _a_, f); - /*<>*/ /*<>*/ var - _am_ = Stdlib_Obj[16]; - return /*<>*/ caml_obj_tag(f) === _am_ - ? /*<>*/ caml_call1(Stdlib[35], f) - : cst; - /*<>*/ } - function other_fields(x, i){ - /*<>*/ if(x.length - 1 <= i) - /*<>*/ return cst$0; - /*<>*/ var - /*<>*/ _aj_ = other_fields(x, i + 1 | 0), - /*<>*/ _ak_ = field(x, i); - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Printf[4], _c_, _ak_, _aj_); - /*<>*/ } - function use_printers(x){ - /*<>*/ var - param = /*<>*/ caml_call1(Stdlib_Atomic[2], printers); - /*<>*/ for(;;){ - if(! param) /*<>*/ return 0; - var tl = param[2], hd = param[1]; - a: - { - /*<>*/ try{ - /*<>*/ /*<>*/ var - val = /*<>*/ caml_call1(hd, x); - } - catch(_ai_){break a;} - if(val){var s = val[1]; /*<>*/ return [0, s];} - } - var param = tl; - } - /*<>*/ } - function string_of_extension_constructo(t){ - /*<>*/ if - (0 === /*<>*/ caml_obj_tag(t)){ - /*<>*/ var - /*<>*/ constructor = t[1][1], - match = t.length - 1; - if(2 < match >>> 0) - /*<>*/ var - /*<>*/ _ae_ = other_fields(t, 2), - /*<>*/ _af_ = field(t, 1), - _ah_ = - /*<>*/ caml_call3 - (Stdlib_Printf[4], _d_, _af_, _ae_); - else - switch(match){ - case 0: - var _ah_ = cst$1; break; - case 1: - var _ah_ = cst$2; break; - default: - /*<>*/ var - /*<>*/ _ag_ = field(t, 1), - _ah_ = - /*<>*/ caml_call2(Stdlib_Printf[4], _e_, _ag_); - } - var match$0 = [0, constructor, [0, _ah_]]; - } - else - var match$0 = [0, t[1], 0]; - var fields_opt = match$0[2], constructor$0 = match$0[1]; - /*<>*/ if(! fields_opt) - /*<>*/ return constructor$0; - var f = fields_opt[1]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], constructor$0, f); - /*<>*/ } - function to_string_default(x){ - /*<>*/ if(x === Stdlib[9]) - /*<>*/ return cst_Out_of_memory; - if(x === Stdlib[10]) /*<>*/ 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, - file, - line, - char$0, - char$0 + 5 | 0, - cst_Pattern_matching_failed); - } - if(x[1] === Stdlib[5]){ - var - match$0 = x[2], - char$1 = match$0[3], - line$0 = match$0[2], - file$0 = match$0[1]; - /*<>*/ return /*<>*/ caml_call6 - (Stdlib_Printf[4], - locfmt, - file$0, - line$0, - char$1, - char$1 + 6 | 0, - cst_Assertion_failed); - } - if(x[1] !== Stdlib[15]) - /*<>*/ return string_of_extension_constructo(x); - var - match$1 = x[2], - char$2 = match$1[3], - line$1 = match$1[2], - file$1 = match$1[1]; - /*<>*/ return /*<>*/ caml_call6 - (Stdlib_Printf[4], - locfmt, - file$1, - line$1, - char$2, - char$2 + 6 | 0, - cst_Undefined_recursive_module); - /*<>*/ } - function to_string(e){ - /*<>*/ /*<>*/ var - match = use_printers(e); - if(! match) /*<>*/ return to_string_default(e); - var s = match[1]; - /*<>*/ return s; - /*<>*/ } - function print(fct, arg){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _ad_ = /*<>*/ caml_call1(fct, arg); - /*<>*/ return _ad_; - } - catch(x$0){ - /*<>*/ var - x = caml_wrap_exception(x$0), - /*<>*/ _ac_ = to_string(x); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Printf[3], _f_, _ac_); - /*<>*/ /*<>*/ caml_call1 - (Stdlib[63], Stdlib[40]); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (x, 0); - } - /*<>*/ } - function catch$0(fct, arg){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _ab_ = /*<>*/ caml_call1(fct, arg); - /*<>*/ return _ab_; - } - catch(x$0){ - var x = caml_wrap_exception(x$0); - /*<>*/ /*<>*/ caml_call1 - (Stdlib[63], Stdlib[39]); - /*<>*/ /*<>*/ var - _aa_ = to_string(x); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Printf[3], _g_, _aa_); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[99], 2); - } - /*<>*/ } - function raw_backtrace_entries(bt){ - /*<>*/ return bt; - /*<>*/ } - function convert_raw_backtrace(bt){ - /*<>*/ return [0, - /*<>*/ runtime.caml_convert_raw_backtrace(bt)]; - /*<>*/ } - function format_backtrace_slot(pos, slot){ - function info(is_raise){ - /*<>*/ return is_raise - ? 0 === pos ? cst_Raised_at : cst_Re_raised_at - : 0 === pos ? cst_Raised_by_primitive_operat : cst_Called_from; - /*<>*/ } - /*<>*/ if(0 === slot[0]){ - /*<>*/ var - _U_ = slot[5], - _V_ = slot[4], - _W_ = slot[3], - _X_ = slot[6] ? cst_inlined : cst$3, - _Y_ = slot[2], - _Z_ = slot[7], - /*<>*/ ___ = info(slot[1]); - /*<>*/ return [0, - /*<>*/ caml_call8 - (Stdlib_Printf[4], _h_, ___, _Z_, _Y_, _X_, _W_, _V_, _U_)]; - } - if(slot[1]) /*<>*/ return 0; - /*<>*/ /*<>*/ var _$_ = info(0); - /*<>*/ return [0, - /*<>*/ caml_call2(Stdlib_Printf[4], _i_, _$_)]; - /*<>*/ } - function print_raw_backtrace(outchan, raw_backtrace){ - /*<>*/ /*<>*/ var - backtrace = convert_raw_backtrace(raw_backtrace); - if(! backtrace) - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Printf[1], outchan, _k_); - var a = backtrace[1], _S_ = a.length - 1 - 1 | 0, _R_ = 0; - if(_S_ >= 0){ - var i = _R_; - for(;;){ - /*<>*/ /*<>*/ var - match = format_backtrace_slot(i, caml_check_bound(a, i)[1 + i]); - if(match){ - var str = match[1]; - /*<>*/ /*<>*/ caml_call3 - (Stdlib_Printf[1], outchan, _j_, str); - } - /*<>*/ /*<>*/ var - _T_ = i + 1 | 0; - if(_S_ === i) break; - var i = _T_; - } - } - return 0; - /*<>*/ } - function print_backtrace(outchan){ - /*<>*/ return print_raw_backtrace - (outchan, - /*<>*/ caml_get_exception_raw_backtra(0)); - /*<>*/ } - function raw_backtrace_to_string(raw_backtrace){ - /*<>*/ /*<>*/ var - backtrace = convert_raw_backtrace(raw_backtrace); - if(! backtrace) - /*<>*/ return cst_Program_not_linked_with_g_; - /*<>*/ var - a = backtrace[1], - /*<>*/ b = - /*<>*/ caml_call1(Stdlib_Buffer[1], 1024), - _P_ = a.length - 1 - 1 | 0, - /*<>*/ _O_ = 0; - if(_P_ >= 0){ - var i = _O_; - for(;;){ - /*<>*/ /*<>*/ var - match = format_backtrace_slot(i, caml_check_bound(a, i)[1 + i]); - if(match){ - var str = match[1]; - /*<>*/ /*<>*/ caml_call3 - (Stdlib_Printf[5], b, _l_, str); - } - /*<>*/ /*<>*/ var - _Q_ = i + 1 | 0; - if(_P_ === i) break; - var i = _Q_; - } - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Buffer[2], b); - /*<>*/ } - function backtrace_slot_is_raise(param){ - /*<>*/ return 0 === param[0] ? param[1] : param[1]; - /*<>*/ } - function backtrace_slot_is_inline(param){ - /*<>*/ return 0 === param[0] ? param[6] : 0; - /*<>*/ } - function backtrace_slot_location(param){ - /*<>*/ return 0 === param[0] - ? [0, [0, param[2], param[3], param[4], param[5]]] - : 0; - /*<>*/ } - function backtrace_slot_defname(param){ - /*<>*/ if - (0 === param[0] && runtime.caml_string_notequal(param[7], cst$4)) - /*<>*/ return [0, param[7]]; - /*<>*/ return 0; - /*<>*/ } - function backtrace_slots(raw_backtrace){ - /*<>*/ /*<>*/ var - match = convert_raw_backtrace(raw_backtrace); - if(! match) /*<>*/ return 0; - var backtrace = match[1], i$1 = backtrace.length - 1 - 1 | 0, i = i$1; - /*<>*/ for(;;){ - if(-1 === i) - var _N_ = 0; - else{ - var _M_ = 0 === caml_check_bound(backtrace, i)[1 + i][0] ? 1 : 0; - /*<>*/ if(! _M_){ - var i$0 = i - 1 | 0, i = i$0; - continue; - } - var _N_ = _M_; - } - /*<>*/ return _N_ ? [0, backtrace] : 0; - } - /*<>*/ } - function backtrace_slots_of_raw_entry(entry){ - /*<>*/ return backtrace_slots([0, entry]); - /*<>*/ } - function raw_backtrace_length(bt){ - /*<>*/ return bt.length - 1; - /*<>*/ } - function get_backtrace(param){ - /*<>*/ return raw_backtrace_to_string - ( /*<>*/ caml_get_exception_raw_backtra(0)); - /*<>*/ } - function register_printer(fn){ - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ old_printers = - /*<>*/ caml_call1(Stdlib_Atomic[2], printers), - /*<>*/ new_printers = [0, fn, old_printers], - /*<>*/ success = - /*<>*/ caml_call3 - (Stdlib_Atomic[5], printers, old_printers, new_printers), - /*<>*/ _L_ = 1 - success; - if(! _L_) /*<>*/ return _L_; - } - /*<>*/ } - function exn_slot(x){ - /*<>*/ return 0 - === /*<>*/ caml_obj_tag(x) - ? x[1] - : x; - /*<>*/ } - function exn_slot_id(x){ - /*<>*/ /*<>*/ var - slot = exn_slot(x); - /*<>*/ return slot[2]; - /*<>*/ } - function exn_slot_name(x){ - /*<>*/ /*<>*/ var - slot = exn_slot(x); - /*<>*/ return slot[1]; - /*<>*/ } - var errors = _m_.slice(); - function default_uncaught_exception_han(exn, raw_backtrace){ - /*<>*/ /*<>*/ var - _I_ = to_string(exn); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Printf[3], _n_, _I_); - /*<>*/ print_raw_backtrace(Stdlib[40], raw_backtrace); - /*<>*/ /*<>*/ var - status = /*<>*/ runtime.caml_ml_debug_info_status(0); - if(status < 0){ - /*<>*/ var - /*<>*/ _J_ = - /*<>*/ caml_call1(Stdlib[18], status), - /*<>*/ _K_ = caml_check_bound(errors, _J_)[1 + _J_]; - /*<>*/ /*<>*/ caml_call1 - (Stdlib[53], _K_); - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[63], Stdlib[40]); - /*<>*/ } - /*<>*/ /*<>*/ var - uncaught_exception_handler = [0, default_uncaught_exception_han]; - function set_uncaught_exception_handler(fn){ - /*<>*/ uncaught_exception_handler[1] = fn; - return 0; - /*<>*/ } - var empty_backtrace = [0]; - function handle_uncaught_exception(exn$0, debugger_in_use){ - /*<>*/ try{ - /*<>*/ try{ - var - raw_backtrace = - debugger_in_use - ? empty_backtrace - : /*<>*/ caml_get_exception_raw_backtra(0); - /*<>*/ try{ - /*<>*/ /*<>*/ caml_call1 - (Stdlib[103], 0); - } - catch(_H_){} - /*<>*/ try{ - /*<>*/ var - /*<>*/ _D_ = - /*<>*/ caml_call2 - (uncaught_exception_handler[1], exn$0, raw_backtrace), - _C_ = _D_; - } - catch(exn$1){ - /*<>*/ var - exn = caml_wrap_exception(exn$1), - /*<>*/ raw_backtrace$0 = - /*<>*/ caml_get_exception_raw_backtra(0), - /*<>*/ _A_ = to_string(exn$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Printf[3], _o_, _A_); - /*<>*/ print_raw_backtrace - (Stdlib[40], raw_backtrace); - /*<>*/ /*<>*/ var - _B_ = to_string(exn); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Printf[3], _p_, _B_); - /*<>*/ print_raw_backtrace - (Stdlib[40], raw_backtrace$0); - var - _C_ = /*<>*/ caml_call1(Stdlib[63], Stdlib[40]); - } - var _E_ = _C_; - } - catch(_G_){ - var _z_ = caml_wrap_exception(_G_); - if(_z_ !== Stdlib[9]) throw caml_maybe_attach_backtrace(_z_, 0); - var - _E_ = - /*<>*/ caml_call1 - (Stdlib[53], cst_Fatal_error_out_of_memory_); - } - /*<>*/ return _E_; - } - catch(_F_){ /*<>*/ return 0;} - /*<>*/ } - /*<>*/ /*<>*/ runtime.caml_register_named_value - ("Printexc.handle_uncaught_exception", handle_uncaught_exception); - function _q_(_y_){ - /*<>*/ return runtime.caml_raw_backtrace_next_slot(_y_); - } - function _r_(_x_){ - /*<>*/ return runtime.caml_convert_raw_backtrace_slot(_x_); - } - function _s_(_w_, _v_){ - /*<>*/ return runtime.caml_raw_backtrace_slot(_w_, _v_); - } - var - _t_ = - [0, - backtrace_slot_is_raise, - backtrace_slot_is_inline, - backtrace_slot_location, - backtrace_slot_defname, - format_backtrace_slot], - Stdlib_Printexc = - [0, - to_string, - to_string_default, - print, - catch$0, - print_backtrace, - get_backtrace, - runtime.caml_record_backtrace, - runtime.caml_backtrace_status, - register_printer, - use_printers, - raw_backtrace_entries, - function(_u_){ /*<>*/ return caml_get_exception_raw_backtra(_u_);}, - print_raw_backtrace, - raw_backtrace_to_string, - default_uncaught_exception_han, - set_uncaught_exception_handler, - backtrace_slots, - backtrace_slots_of_raw_entry, - _t_, - raw_backtrace_length, - _s_, - _r_, - _q_, - exn_slot_id, - exn_slot_name, - string_of_extension_constructo]; - runtime.caml_register_global(42, Stdlib_Printexc, "Stdlib__Printexc"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Fun -//# unitInfo: Requires: Stdlib, Stdlib__Printexc -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_restore_raw_backtrace = runtime.caml_restore_raw_backtrace, - 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) - : runtime.caml_call_gen(f, [a0, a1]); - } - var - global_data = runtime.caml_get_global_data(), - Stdlib_Printexc = global_data.Stdlib__Printexc, - Stdlib = global_data.Stdlib, - cst_Fun_Finally_raised = "Fun.Finally_raised: ", - cst_Stdlib_Fun_Finally_raised = "Stdlib.Fun.Finally_raised"; - function const$0(c, param){ - /*<>*/ return c; - /*<>*/ } - function flip(f, x, y){ - /*<>*/ return /*<>*/ caml_call2(f, y, x); - /*<>*/ } - function negate(p, v){ - /*<>*/ return 1 - /*<>*/ caml_call1(p, v); - /*<>*/ } - /*<>*/ /*<>*/ var - Finally_raised = - [248, cst_Stdlib_Fun_Finally_raised, runtime.caml_fresh_oo_id(0)]; - function _a_(param){ - /*<>*/ if(param[1] !== Finally_raised) - /*<>*/ return 0; - /*<>*/ var - exn = param[2], - /*<>*/ _c_ = - /*<>*/ caml_call1(Stdlib_Printexc[1], exn); - /*<>*/ return [0, - /*<>*/ caml_call2 - (Stdlib[28], cst_Fun_Finally_raised, _c_)]; - /*<>*/ } - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Printexc[9], _a_); - function protect(finally$0, work){ - function finally_no_exn(param){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _b_ = /*<>*/ caml_call1(finally$0, 0); - /*<>*/ return _b_; - } - catch(e$0){ - /*<>*/ var - e = caml_wrap_exception(e$0), - /*<>*/ bt = - /*<>*/ caml_call1(Stdlib_Printexc[12], 0), - /*<>*/ exn = [0, Finally_raised, e]; - caml_restore_raw_backtrace(exn, bt); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (exn, 0); - } - /*<>*/ } - /*<>*/ try{ - /*<>*/ /*<>*/ var - result = /*<>*/ caml_call1(work, 0); - } - catch(work_exn$0){ - /*<>*/ var - work_exn = caml_wrap_exception(work_exn$0), - /*<>*/ work_bt = - /*<>*/ caml_call1(Stdlib_Printexc[12], 0); - /*<>*/ finally_no_exn(0); - caml_restore_raw_backtrace(work_exn, work_bt); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (work_exn, 0); - } - /*<>*/ finally_no_exn(0); - /*<>*/ return result; - /*<>*/ } - var Stdlib_Fun = [0, const$0, flip, negate, protect, Finally_raised]; - runtime.caml_register_global(4, Stdlib_Fun, "Stdlib__Fun"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Gc -//# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Printf, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst = "\n", - caml_ml_string_length = runtime.caml_ml_string_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]); - } - var - global_data = runtime.caml_get_global_data(), - Stdlib_Atomic = global_data.Stdlib__Atomic, - Stdlib = global_data.Stdlib, - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib_Printf = global_data.Stdlib__Printf, - _a_ = - [0, - [11, "minor_collections: ", [4, 0, 0, 0, [12, 10, 0]]], - "minor_collections: %d\n"], - _b_ = - [0, - [11, "major_collections: ", [4, 0, 0, 0, [12, 10, 0]]], - "major_collections: %d\n"], - _c_ = - [0, - [11, "compactions: ", [4, 0, 0, 0, [12, 10, 0]]], - "compactions: %d\n"], - _d_ = - [0, - [11, "forced_major_collections: ", [4, 0, 0, 0, [12, 10, 0]]], - "forced_major_collections: %d\n"], - _e_ = [0, [12, 10, 0], cst], - _f_ = [0, [8, [0, 0, 0], 0, [0, 0], 0], "%.0f"], - _g_ = - [0, - [11, "minor_words: ", [8, [0, 0, 0], [1, 1], [0, 0], [12, 10, 0]]], - "minor_words: %*.0f\n"], - _h_ = - [0, - [11, "promoted_words: ", [8, [0, 0, 0], [1, 1], [0, 0], [12, 10, 0]]], - "promoted_words: %*.0f\n"], - _i_ = - [0, - [11, "major_words: ", [8, [0, 0, 0], [1, 1], [0, 0], [12, 10, 0]]], - "major_words: %*.0f\n"], - _j_ = [0, [12, 10, 0], cst], - _k_ = [0, [4, 0, 0, 0, 0], "%d"], - _l_ = - [0, - [11, "top_heap_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], - "top_heap_words: %*d\n"], - _m_ = - [0, - [11, "heap_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], - "heap_words: %*d\n"], - _n_ = - [0, - [11, "live_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], - "live_words: %*d\n"], - _o_ = - [0, - [11, "free_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], - "free_words: %*d\n"], - _p_ = - [0, - [11, "largest_free: ", [4, 0, [1, 1], 0, [12, 10, 0]]], - "largest_free: %*d\n"], - _q_ = - [0, - [11, "fragments: ", [4, 0, [1, 1], 0, [12, 10, 0]]], - "fragments: %*d\n"], - _r_ = [0, [12, 10, 0], cst], - _s_ = - [0, - [11, "live_blocks: ", [4, 0, 0, 0, [12, 10, 0]]], - "live_blocks: %d\n"], - _t_ = - [0, - [11, "free_blocks: ", [4, 0, 0, 0, [12, 10, 0]]], - "free_blocks: %d\n"], - _u_ = - [0, - [11, "heap_chunks: ", [4, 0, 0, 0, [12, 10, 0]]], - "heap_chunks: %d\n"]; - function eventlog_pause(param){ - /*<>*/ return 0; - /*<>*/ } - 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 - 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 - 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]); - /*<>*/ } - function allocated_bytes(param){ - /*<>*/ var - /*<>*/ match = - /*<>*/ runtime.caml_gc_counters(0), - ma = match[3], - pro = match[2], - mi = match[1]; - /*<>*/ return (mi + ma - pro) * (Stdlib_Sys[9] / 8 | 0); - /*<>*/ } - function create_alarm(f){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Atomic[1], 1); - /*<>*/ } - function delete_alarm(a){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Atomic[3], a, 0); - /*<>*/ } - function _v_(param){ /*<>*/ return 0; /*<>*/ } - function _w_(param){ /*<>*/ return 0; /*<>*/ } - function _x_(param){ /*<>*/ return 0; /*<>*/ } - function _y_(param){ /*<>*/ return 0; /*<>*/ } - /*<>*/ /*<>*/ var - null_tracker = - [0, - function(param){ /*<>*/ return 0; /*<>*/ }, - _y_, - _x_, - _w_, - _v_]; - function start(sampling_rate, opt, tracker){ - /*<>*/ if(opt) - var sth = opt[1], callstack_size = sth; - else - var callstack_size = Stdlib[19]; - /*<>*/ return /*<>*/ runtime.caml_memprof_start - (sampling_rate, callstack_size, tracker); - /*<>*/ } - var _z_ = [0, null_tracker, start, runtime.caml_memprof_stop]; - function _A_(_E_){ /*<>*/ return runtime.caml_final_release(_E_);} - var - _B_ = runtime.caml_final_register_called_without_value, - Stdlib_Gc = - [0, - print_stat, - allocated_bytes, - function(_D_, _C_){ - /*<>*/ return runtime.caml_final_register(_D_, _C_); - }, - _B_, - _A_, - create_alarm, - delete_alarm, - eventlog_pause, - eventlog_resume, - _z_]; - runtime.caml_register_global(25, Stdlib_Gc, "Stdlib__Gc"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Digest -//# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Char, Stdlib__String -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_Digest_from_hex$1 = "Digest.from_hex", - caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, - caml_create_bytes = runtime.caml_create_bytes, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_md5_string = runtime.caml_md5_string, - caml_ml_string_length = runtime.caml_ml_string_length, - caml_string_get = runtime.caml_string_get, - 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) - : runtime.caml_call_gen(f, [a0, a1]); - } - var - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Stdlib_Char = global_data.Stdlib__Char, - Stdlib_Bytes = global_data.Stdlib__Bytes, - Stdlib_String = global_data.Stdlib__String, - compare = Stdlib_String[9], - equal = Stdlib_String[8], - cst_Digest_from_hex$0 = cst_Digest_from_hex$1, - cst_Digest_from_hex = cst_Digest_from_hex$1, - cst_Digest_to_hex = "Digest.to_hex", - cst_Digest_substring = "Digest.substring"; - function string(str){ - /*<>*/ return /*<>*/ caml_md5_string - (str, 0, caml_ml_string_length(str)); - /*<>*/ } - function bytes(b){ - /*<>*/ return string - ( /*<>*/ caml_call1(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); - /*<>*/ } - function subbytes(b, ofs, len){ - /*<>*/ return substring - ( /*<>*/ caml_call1(Stdlib_Bytes[44], b), - ofs, - len); - /*<>*/ } - function file(filename){ - /*<>*/ /*<>*/ var - ic = /*<>*/ caml_call1(Stdlib[80], filename); - /*<>*/ try{ - /*<>*/ /*<>*/ var - d = /*<>*/ runtime.caml_md5_chan(ic, -1); - } - catch(e$0){ - var e = caml_wrap_exception(e$0); - /*<>*/ /*<>*/ caml_call1 - (Stdlib[93], ic); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 0); - } - /*<>*/ /*<>*/ caml_call1 - (Stdlib[93], ic); - /*<>*/ return d; - /*<>*/ } - function output(chan, digest){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[66], chan, digest); - /*<>*/ } - function input(chan){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[86], chan, 16); - /*<>*/ } - function char_hex(n){ - /*<>*/ var _e_ = 10 <= n ? 87 : 48; - return n + _e_ | 0; - /*<>*/ } - function to_hex(d){ - /*<>*/ if(16 !== caml_ml_string_length(d)) - /*<>*/ /*<>*/ caml_call1 - (Stdlib[1], cst_Digest_to_hex); - /*<>*/ var - /*<>*/ result = - /*<>*/ caml_create_bytes(32), - i = 0; - for(;;){ - /*<>*/ /*<>*/ var - x = /*<>*/ caml_string_get(d, i); - caml_bytes_unsafe_set(result, i * 2 | 0, char_hex(x >>> 4 | 0)); - caml_bytes_unsafe_set(result, (i * 2 | 0) + 1 | 0, char_hex(x & 15)); - /*<>*/ /*<>*/ var _d_ = i + 1 | 0; - if(15 === i) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], result); - var i = _d_; - } - /*<>*/ } - function from_hex(s){ - /*<>*/ if(32 !== caml_ml_string_length(s)) - /*<>*/ /*<>*/ caml_call1 - (Stdlib[1], cst_Digest_from_hex); - /*<>*/ function digit(c){ - /*<>*/ if(65 <= c){ - if(97 <= c){ - if(103 > c) return (c - 97 | 0) + 10 | 0; - } - else if(71 > c) return (c - 65 | 0) + 10 | 0; - } - else if(9 >= c - 48 >>> 0) return c - 48 | 0; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], cst_Digest_from_hex$0], 1); - /*<>*/ } - /*<>*/ var - /*<>*/ result = - /*<>*/ caml_create_bytes(16), - i = 0; - for(;;){ - /*<>*/ var - i$0 = 2 * i | 0, - /*<>*/ _a_ = - digit( /*<>*/ caml_string_get(s, i$0 + 1 | 0)), - _b_ = - (digit( /*<>*/ caml_string_get(s, i$0)) << 4) + _a_ - | 0; - /*<>*/ /*<>*/ runtime.caml_bytes_set - (result, i, /*<>*/ caml_call1(Stdlib_Char[1], _b_)); - /*<>*/ /*<>*/ var _c_ = i + 1 | 0; - if(15 === i) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], result); - var i = _c_; - } - /*<>*/ } - var - Stdlib_Digest = - [0, - compare, - equal, - string, - bytes, - substring, - subbytes, - file, - output, - input, - to_hex, - from_hex]; - runtime.caml_register_global(8, Stdlib_Digest, "Stdlib__Digest"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Bigarray -//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_Bigarray_Array3_of_array_n$1 = - "Bigarray.Array3.of_array: non-cubic data", - caml_ba_change_layout = runtime.caml_ba_change_layout, - caml_ba_create = runtime.caml_ba_create, - caml_ba_dim_1 = runtime.caml_ba_dim_1, - caml_ba_dim_2 = runtime.caml_ba_dim_2, - caml_ba_kind = runtime.caml_ba_kind, - caml_ba_num_dims = runtime.caml_ba_num_dims, - caml_ba_reshape = runtime.caml_ba_reshape, - caml_ba_set_1 = runtime.caml_ba_set_1, - caml_ba_set_2 = runtime.caml_ba_set_2, - caml_ba_set_3 = runtime.caml_ba_set_3, - caml_ba_set_generic = runtime.caml_ba_set_generic, - caml_ba_slice = runtime.caml_ba_slice, - caml_check_bound = runtime.caml_check_bound, - caml_make_vect = runtime.caml_make_vect, - caml_mul = runtime.caml_mul; - /*<>*/ 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 - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Stdlib_Array = global_data.Stdlib__Array, - Stdlib_Sys = global_data.Stdlib__Sys, - cst_Bigarray_array3_of_genarra = "Bigarray.array3_of_genarray", - cst_Bigarray_array2_of_genarra = "Bigarray.array2_of_genarray", - cst_Bigarray_array1_of_genarra = "Bigarray.array1_of_genarray", - cst_Bigarray_array0_of_genarra = "Bigarray.array0_of_genarray", - cst_Bigarray_Array3_of_array_n = cst_Bigarray_Array3_of_array_n$1, - cst_Bigarray_Array3_of_array_n$0 = cst_Bigarray_Array3_of_array_n$1, - cst_Bigarray_Array2_of_array_n = - "Bigarray.Array2.of_array: non-rectangular data", - float32 = 0, - float64 = 1, - int8_signed = 2, - int8_unsigned = 3, - int16_signed = 4, - int16_unsigned = 5, - int32 = 6, - int64 = 7, - int$0 = 8, - nativeint = 9, - complex32 = 10, - complex64 = 11, - char$0 = 12; - function kind_size_in_bytes(param){ - /*<>*/ switch(param){ - case 0: - /*<>*/ return 4; - case 1: - /*<>*/ return 8; - case 2: - /*<>*/ return 1; - case 3: - /*<>*/ return 1; - case 4: - /*<>*/ return 2; - case 5: - /*<>*/ return 2; - case 6: - /*<>*/ return 4; - case 7: - /*<>*/ return 8; - case 8: - return Stdlib_Sys[9] / 8 | 0; - case 9: - return Stdlib_Sys[9] / 8 | 0; - case 10: - /*<>*/ return 8; - case 11: - /*<>*/ return 16; - default: /*<>*/ return 1; - } - /*<>*/ } - /*<>*/ var - /*<>*/ c_layout = 0, - fortran_layout = 1; - function cloop(arr, idx, f, col, max){ - /*<>*/ if(col === idx.length - 1) - /*<>*/ return /*<>*/ caml_ba_set_generic - (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ var - /*<>*/ _am_ = - caml_check_bound(max, col)[1 + col] - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var j = _al_; - for(;;){ - /*<>*/ caml_check_bound(idx, col)[1 + col] = j; - /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); - /*<>*/ /*<>*/ var - _an_ = j + 1 | 0; - if(_am_ === j) break; - var j = _an_; - } - } - return 0; - /*<>*/ } - function floop(arr, idx, f, col, max){ - /*<>*/ if(0 > col) - /*<>*/ return /*<>*/ caml_ba_set_generic - (arr, idx, /*<>*/ caml_call1(f, idx)); - /*<>*/ var - /*<>*/ _aj_ = caml_check_bound(max, col)[1 + col], - /*<>*/ _ai_ = 1; - if(_aj_ >= 1){ - var j = _ai_; - for(;;){ - /*<>*/ caml_check_bound(idx, col)[1 + col] = j; - /*<>*/ floop(arr, idx, f, col - 1 | 0, max); - /*<>*/ /*<>*/ var - _ak_ = j + 1 | 0; - if(_aj_ === j) break; - var j = _ak_; - } - } - return 0; - /*<>*/ } - function init(kind, layout, dims, f){ - /*<>*/ var - /*<>*/ arr = - /*<>*/ caml_ba_create(kind, layout, dims), - /*<>*/ dlen = dims.length - 1; - /*<>*/ return layout - ? (floop - (arr, - /*<>*/ caml_make_vect(dlen, 1), - f, - dlen - 1 | 0, - dims), - arr) - : (cloop - (arr, - /*<>*/ caml_make_vect(dlen, 0), - f, - 0, - dims), - arr); - /*<>*/ } - function dims(a){ - /*<>*/ var - /*<>*/ n = - /*<>*/ caml_ba_num_dims(a), - /*<>*/ d = - /*<>*/ caml_make_vect(n, 0), - /*<>*/ _af_ = n - 1 | 0, - /*<>*/ _ae_ = 0; - if(_af_ >= 0){ - var i = _ae_; - for(;;){ - /*<>*/ /*<>*/ var - _ag_ = /*<>*/ runtime.caml_ba_dim(a, i); - /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; - /*<>*/ /*<>*/ var - _ah_ = i + 1 | 0; - if(_af_ === i) break; - var i = _ah_; - } - } - /*<>*/ return d; - /*<>*/ } - function size_in_bytes(arr){ - /*<>*/ var - /*<>*/ _ac_ = dims(arr), - /*<>*/ _ad_ = - /*<>*/ caml_call3 - (Stdlib_Array[15], caml_mul, 1, _ac_); - /*<>*/ return /*<>*/ caml_mul - (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _ad_); - /*<>*/ } - function create(kind, layout){ - /*<>*/ return /*<>*/ caml_ba_create - (kind, layout, [0]); - /*<>*/ } - function get(arr){ - /*<>*/ return /*<>*/ runtime.caml_ba_get_generic - (arr, [0]); - /*<>*/ } - function set(arr){ - /*<>*/ /*<>*/ var _aa_ = [0]; - /*<>*/ return function(_ab_){ - /*<>*/ return caml_ba_set_generic(arr, _aa_, _ab_);}; - /*<>*/ } - function size_in_bytes$0(arr){ - /*<>*/ return kind_size_in_bytes - ( /*<>*/ caml_ba_kind(arr)); - /*<>*/ } - function of_value(kind, layout, v){ - /*<>*/ /*<>*/ var - a = create(kind, layout); - /*<>*/ set(a)(v); - /*<>*/ return a; - /*<>*/ } - function create$0(kind, layout, dim){ - /*<>*/ return /*<>*/ caml_ba_create - (kind, layout, [0, dim]); - /*<>*/ } - function size_in_bytes$1(arr){ - /*<>*/ /*<>*/ var - _$_ = /*<>*/ caml_ba_dim_1(arr); - /*<>*/ return /*<>*/ caml_mul - (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _$_); - /*<>*/ } - function slice(a, n){ - /*<>*/ return /*<>*/ runtime.caml_ba_layout - (a) - ? /*<>*/ caml_ba_slice(a, [0, n]) - : /*<>*/ caml_ba_slice(a, [0, n]); - /*<>*/ } - function init$0(kind, layout, dim, f){ - /*<>*/ /*<>*/ var - arr = create$0(kind, layout, dim); - /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _Z_ = 1; - if(dim >= 1){ - var i$0 = _Z_; - for(;;){ - /*<>*/ /*<>*/ caml_ba_set_1 - (arr, i$0, /*<>*/ caml_call1(f, i$0)); - /*<>*/ /*<>*/ var - ___ = i$0 + 1 | 0; - if(dim === i$0) break; - var i$0 = ___; - } - } - /*<>*/ return arr; - } - /*<>*/ var - _X_ = dim - 1 | 0, - /*<>*/ _W_ = 0; - if(_X_ >= 0){ - var i = _W_; - for(;;){ - /*<>*/ /*<>*/ caml_ba_set_1 - (arr, i, /*<>*/ caml_call1(f, i)); - /*<>*/ /*<>*/ var - _Y_ = i + 1 | 0; - if(_X_ === i) break; - var i = _Y_; - } - } - /*<>*/ return arr; - /*<>*/ } - function of_array(kind, layout, data){ - /*<>*/ var - /*<>*/ ba = create$0(kind, layout, data.length - 1), - /*<>*/ ofs = layout ? 1 : 0, - _U_ = data.length - 1 - 1 | 0, - _T_ = 0; - if(_U_ >= 0){ - var i = _T_; - for(;;){ - /*<>*/ /*<>*/ caml_ba_set_1 - (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); - /*<>*/ /*<>*/ var - _V_ = i + 1 | 0; - if(_U_ === i) break; - var i = _V_; - } - } - /*<>*/ return ba; - /*<>*/ } - function create$1(kind, layout, dim1, dim2){ - /*<>*/ return /*<>*/ caml_ba_create - (kind, layout, [0, dim1, dim2]); - /*<>*/ } - function size_in_bytes$2(arr){ - /*<>*/ var - /*<>*/ _R_ = - /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _S_ = - /*<>*/ caml_ba_dim_1(arr); - return caml_mul - ( /*<>*/ caml_mul - (kind_size_in_bytes - ( /*<>*/ caml_ba_kind(arr)), - _S_), - _R_); - /*<>*/ } - function slice_left(a, n){ - /*<>*/ return /*<>*/ caml_ba_slice - (a, [0, n]); - /*<>*/ } - function slice_right(a, n){ - /*<>*/ return /*<>*/ caml_ba_slice - (a, [0, n]); - /*<>*/ } - function init$1(kind, layout, dim1, dim2, f){ - /*<>*/ /*<>*/ var - arr = create$1(kind, layout, dim1, dim2); - /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _N_ = 1; - if(dim2 >= 1){ - var j$0 = _N_; - for(;;){ - /*<>*/ /*<>*/ var _O_ = 1; - if(dim1 >= 1){ - var i$0 = _O_; - for(;;){ - /*<>*/ /*<>*/ caml_ba_set_2 - (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); - /*<>*/ /*<>*/ var - _Q_ = i$0 + 1 | 0; - if(dim1 === i$0) break; - var i$0 = _Q_; - } - } - /*<>*/ /*<>*/ var - _P_ = j$0 + 1 | 0; - if(dim2 === j$0) break; - var j$0 = _P_; - } - } - /*<>*/ return arr; - } - /*<>*/ var - _I_ = dim1 - 1 | 0, - /*<>*/ _H_ = 0; - if(_I_ >= 0){ - var i = _H_; - for(;;){ - /*<>*/ var - _K_ = dim2 - 1 | 0, - /*<>*/ _J_ = 0; - if(_K_ >= 0){ - var j = _J_; - for(;;){ - /*<>*/ /*<>*/ caml_ba_set_2 - (arr, i, j, /*<>*/ caml_call2(f, i, j)); - /*<>*/ /*<>*/ var - _M_ = j + 1 | 0; - if(_K_ === j) break; - var j = _M_; - } - } - /*<>*/ /*<>*/ var - _L_ = i + 1 | 0; - if(_I_ === i) break; - var i = _L_; - } - } - /*<>*/ return arr; - /*<>*/ } - function of_array$0(kind, layout, data){ - /*<>*/ var - dim1 = data.length - 1, - /*<>*/ dim2 = - 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, - /*<>*/ ba = create$1(kind, layout, dim1, dim2), - /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _C_ = dim1 - 1 | 0, - _B_ = 0; - if(_C_ >= 0){ - var i = _B_; - 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); - /*<>*/ var - /*<>*/ _E_ = dim2 - 1 | 0, - /*<>*/ _D_ = 0; - if(_E_ >= 0){ - var j = _D_; - for(;;){ - /*<>*/ /*<>*/ caml_ba_set_2 - (ba, i + ofs | 0, j + ofs | 0, caml_check_bound(row, j)[1 + j]); - /*<>*/ /*<>*/ var - _G_ = j + 1 | 0; - if(_E_ === j) break; - var j = _G_; - } - } - /*<>*/ /*<>*/ var - _F_ = i + 1 | 0; - if(_C_ === i) break; - var i = _F_; - } - } - /*<>*/ return ba; - /*<>*/ } - function create$2(kind, layout, dim1, dim2, dim3){ - /*<>*/ return /*<>*/ caml_ba_create - (kind, layout, [0, dim1, dim2, dim3]); - /*<>*/ } - function size_in_bytes$3(arr){ - /*<>*/ var - /*<>*/ _y_ = - /*<>*/ runtime.caml_ba_dim_3(arr), - /*<>*/ _z_ = - /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _A_ = - /*<>*/ caml_ba_dim_1(arr); - return caml_mul - (caml_mul - ( /*<>*/ caml_mul - (kind_size_in_bytes - ( /*<>*/ caml_ba_kind(arr)), - _A_), - _z_), - _y_); - /*<>*/ } - function slice_left_1(a, n, m){ - /*<>*/ return /*<>*/ caml_ba_slice - (a, [0, n, m]); - /*<>*/ } - function slice_right_1(a, n, m){ - /*<>*/ return /*<>*/ caml_ba_slice - (a, [0, n, m]); - /*<>*/ } - function slice_left_2(a, n){ - /*<>*/ return /*<>*/ caml_ba_slice - (a, [0, n]); - /*<>*/ } - function slice_right_2(a, n){ - /*<>*/ return /*<>*/ caml_ba_slice - (a, [0, n]); - /*<>*/ } - function init$2(kind, layout, dim1, dim2, dim3, f){ - /*<>*/ /*<>*/ var - arr = create$2(kind, layout, dim1, dim2, dim3); - /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _s_ = 1; - if(dim3 >= 1){ - var k$0 = _s_; - for(;;){ - /*<>*/ /*<>*/ var _t_ = 1; - if(dim2 >= 1){ - var j$0 = _t_; - for(;;){ - /*<>*/ /*<>*/ var _v_ = 1; - if(dim1 >= 1){ - var i$0 = _v_; - for(;;){ - /*<>*/ /*<>*/ caml_ba_set_3 - (arr, - i$0, - j$0, - k$0, - /*<>*/ caml_call3(f, i$0, j$0, k$0)); - /*<>*/ /*<>*/ var - _x_ = i$0 + 1 | 0; - if(dim1 === i$0) break; - var i$0 = _x_; - } - } - /*<>*/ /*<>*/ var - _w_ = j$0 + 1 | 0; - if(dim2 === j$0) break; - var j$0 = _w_; - } - } - /*<>*/ /*<>*/ var - _u_ = k$0 + 1 | 0; - if(dim3 === k$0) break; - var k$0 = _u_; - } - } - /*<>*/ return arr; - } - /*<>*/ var - _k_ = dim1 - 1 | 0, - /*<>*/ _j_ = 0; - if(_k_ >= 0){ - var i = _j_; - for(;;){ - /*<>*/ var - _m_ = dim2 - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var j = _l_; - for(;;){ - /*<>*/ var - _p_ = dim3 - 1 | 0, - /*<>*/ _o_ = 0; - if(_p_ >= 0){ - var k = _o_; - for(;;){ - /*<>*/ /*<>*/ caml_ba_set_3 - (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); - /*<>*/ /*<>*/ var - _r_ = k + 1 | 0; - if(_p_ === k) break; - var k = _r_; - } - } - /*<>*/ /*<>*/ var - _q_ = j + 1 | 0; - if(_m_ === j) break; - var j = _q_; - } - } - /*<>*/ /*<>*/ var - _n_ = i + 1 | 0; - if(_k_ === i) break; - var i = _n_; - } - } - /*<>*/ return arr; - /*<>*/ } - function of_array$1(kind, layout, data){ - /*<>*/ var - dim1 = data.length - 1, - /*<>*/ dim2 = - 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, - /*<>*/ dim3 = - 0 === dim2 - ? 0 - : caml_check_bound(caml_check_bound(data, 0)[1], 0)[1].length - 1, - /*<>*/ ba = create$2(kind, layout, dim1, dim2, dim3), - /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _b_ = dim1 - 1 | 0, - _a_ = 0; - if(_b_ >= 0){ - var i = _a_; - 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); - /*<>*/ 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); - /*<>*/ var - /*<>*/ _g_ = dim3 - 1 | 0, - /*<>*/ _f_ = 0; - if(_g_ >= 0){ - var k = _f_; - for(;;){ - /*<>*/ /*<>*/ caml_ba_set_3 - (ba, - i + ofs | 0, - j + ofs | 0, - k + ofs | 0, - caml_check_bound(col, k)[1 + k]); - /*<>*/ /*<>*/ var - _i_ = k + 1 | 0; - if(_g_ === k) break; - var k = _i_; - } - } - /*<>*/ /*<>*/ var - _h_ = j + 1 | 0; - if(_d_ === j) break; - var j = _h_; - } - } - /*<>*/ /*<>*/ var - _e_ = i + 1 | 0; - if(_b_ === i) break; - var i = _e_; - } - } - /*<>*/ return ba; - /*<>*/ } - function array0_of_genarray(a){ - /*<>*/ return 0 - === /*<>*/ caml_ba_num_dims(a) - ? a - : /*<>*/ caml_call1 - (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); - /*<>*/ } - function array2_of_genarray(a){ - /*<>*/ return 2 - === /*<>*/ caml_ba_num_dims(a) - ? a - : /*<>*/ caml_call1 - (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); - /*<>*/ } - function reshape_0(a){ - /*<>*/ return /*<>*/ caml_ba_reshape - (a, [0]); - /*<>*/ } - function reshape_1(a, dim1){ - /*<>*/ return /*<>*/ caml_ba_reshape - (a, [0, dim1]); - /*<>*/ } - function reshape_2(a, dim1, dim2){ - /*<>*/ return /*<>*/ caml_ba_reshape - (a, [0, dim1, dim2]); - /*<>*/ } - function reshape_3(a, dim1, dim2, dim3){ - /*<>*/ return /*<>*/ caml_ba_reshape - (a, [0, dim1, dim2, dim3]); - /*<>*/ } - var - Stdlib_Bigarray = - [0, - float32, - float64, - complex32, - complex64, - int8_signed, - int8_unsigned, - int16_signed, - int16_unsigned, - int$0, - int32, - int64, - nativeint, - char$0, - kind_size_in_bytes, - c_layout, - fortran_layout, - [0, init, dims, size_in_bytes], - [0, - create, - of_value, - caml_ba_change_layout, - size_in_bytes$0, - get, - set, - of_value], - [0, - create$0, - init$0, - caml_ba_change_layout, - size_in_bytes$1, - slice, - of_array], - [0, - create$1, - init$1, - caml_ba_change_layout, - size_in_bytes$2, - slice_left, - slice_right, - of_array$0], - [0, - create$2, - init$2, - caml_ba_change_layout, - size_in_bytes$3, - slice_left_1, - slice_right_1, - slice_left_2, - slice_right_2, - of_array$1], - array0_of_genarray, - array1_of_genarray, - array2_of_genarray, - array3_of_genarray, - caml_ba_reshape, - reshape_0, - reshape_1, - reshape_2, - reshape_3]; - runtime.caml_register_global(10, Stdlib_Bigarray, "Stdlib__Bigarray"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Random -//# unitInfo: Requires: Stdlib, Stdlib__Bigarray, Stdlib__Bytes, Stdlib__Digest, Stdlib__Domain, Stdlib__Int32, Stdlib__Int64, Stdlib__Nativeint, Stdlib__String -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_ba_blit = runtime.caml_ba_blit, - caml_ba_set_1 = runtime.caml_ba_set_1, - caml_bytes_set = runtime.caml_bytes_set, - caml_greaterthan = runtime.caml_greaterthan, - caml_int64_of_int32 = runtime.caml_int64_of_int32, - caml_int64_shift_right_unsigne = runtime.caml_int64_shift_right_unsigned, - caml_int64_sub = runtime.caml_int64_sub, - caml_int64_to_int32 = runtime.caml_int64_to_int32, - caml_lessequal = runtime.caml_lessequal, - 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 - global_data = runtime.caml_get_global_data(), - Stdlib_Domain = global_data.Stdlib__Domain, - Stdlib = global_data.Stdlib, - Stdlib_Int32 = global_data.Stdlib__Int32, - Stdlib_Int64 = global_data.Stdlib__Int64, - Stdlib_Bytes = global_data.Stdlib__Bytes, - Stdlib_Digest = global_data.Stdlib__Digest, - Stdlib_String = global_data.Stdlib__String, - Stdlib_Bigarray = global_data.Stdlib__Bigarray, - Stdlib_Nativeint = global_data.Stdlib__Nativeint, - _j_ = runtime.caml_int64_create_lo_mi_hi(14371852, 15349651, 22696), - _k_ = runtime.caml_int64_create_lo_mi_hi(12230193, 11438743, 35013), - _l_ = runtime.caml_int64_create_lo_mi_hi(1424933, 15549263, 2083), - _m_ = runtime.caml_int64_create_lo_mi_hi(9492471, 4696708, 43520), - _f_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), - _h_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), - _i_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), - _g_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), - cst_Random_int64 = "Random.int64", - cst_Random_int32 = "Random.int32", - cst_Random_full_int = "Random.full_int", - cst_Random_int = "Random.int", - _a_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), - _b_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), - _e_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), - _c_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), - _d_ = runtime.caml_int64_create_lo_mi_hi(2, 0, 0); - function create(param){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Bigarray[19][1], 7, 0, 4); - /*<>*/ } - function set(s, i1, i2, i3, i4){ - /*<>*/ /*<>*/ caml_ba_set_1 - (s, 0, /*<>*/ runtime.caml_int64_or(i1, _a_)); - /*<>*/ /*<>*/ caml_ba_set_1(s, 1, i2); - /*<>*/ /*<>*/ var - i3$0 = /*<>*/ caml_notequal(i3, _b_) ? i3 : _e_; - /*<>*/ /*<>*/ caml_ba_set_1(s, 2, i3$0); - /*<>*/ /*<>*/ var - i4$0 = /*<>*/ caml_notequal(i4, _c_) ? i4 : _d_; - /*<>*/ return /*<>*/ caml_ba_set_1 - (s, 3, i4$0); - /*<>*/ } - function mk(i1, i2, i3, i4){ - /*<>*/ /*<>*/ var s = create(0); - /*<>*/ set(s, i1, i2, i3, i4); - /*<>*/ return s; - /*<>*/ } - function copy(s){ - /*<>*/ /*<>*/ var s$0 = create(0); - /*<>*/ /*<>*/ caml_ba_blit(s, s$0); - /*<>*/ return s$0; - /*<>*/ } - function reinit(s, seed){ - /*<>*/ var - n = seed.length - 1, - /*<>*/ b = - /*<>*/ runtime.caml_create_bytes((n * 8 | 0) + 1 | 0), - /*<>*/ _p_ = n - 1 | 0, - /*<>*/ _o_ = 0; - if(_p_ >= 0){ - var i = _o_; - for(;;){ - /*<>*/ /*<>*/ var - _t_ = - /*<>*/ caml_int64_of_int32 - (runtime.caml_check_bound(seed, i)[1 + i]); - /*<>*/ /*<>*/ caml_call3 - (Stdlib_Bytes[86], b, i * 8 | 0, _t_); - /*<>*/ /*<>*/ var _u_ = i + 1 | 0; - if(_p_ === i) break; - var i = _u_; - } - } - /*<>*/ /*<>*/ caml_bytes_set - (b, n * 8 | 0, 1); - /*<>*/ /*<>*/ var - d1 = /*<>*/ caml_call1(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); - /*<>*/ return set - (s, - /*<>*/ caml_call2(Stdlib_String[64], d1, 0), - _s_, - _r_, - _q_); - /*<>*/ } - function make(seed){ - /*<>*/ /*<>*/ var s = create(0); - /*<>*/ reinit(s, seed); - /*<>*/ return s; - /*<>*/ } - function make_self_init(param){ - /*<>*/ return make - ( /*<>*/ caml_sys_random_seed(0)); - /*<>*/ } - function bits(s){ - /*<>*/ return /*<>*/ caml_int64_to_int32 - ( /*<>*/ caml_lxm_next(s)) - & 1073741823; - /*<>*/ } - function intaux(s, n){ - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ r = bits(s), - v = caml_mod(r, n); - if(((1073741823 - n | 0) + 1 | 0) >= (r - v | 0)) - /*<>*/ return v; - } - /*<>*/ } - function int$0(s, bound){ - /*<>*/ if(1073741823 >= bound && 0 < bound) - /*<>*/ return intaux(s, bound); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Random_int); - /*<>*/ } - function full_int(s, bound){ - /*<>*/ if(0 >= bound) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Random_full_int); - if(1073741823 >= bound) /*<>*/ return intaux(s, bound); - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ _n_ = Stdlib[19], - r = - /*<>*/ caml_int64_to_int32 - ( /*<>*/ caml_lxm_next(s)) - & _n_, - v = caml_mod(r, bound); - if(((Stdlib[19] - bound | 0) + 1 | 0) >= (r - v | 0)) - /*<>*/ return v; - } - /*<>*/ } - function bits32(s){ - /*<>*/ return /*<>*/ caml_int64_to_int32 - ( /*<>*/ caml_lxm_next(s)); - /*<>*/ } - function int32(s, bound){ - /*<>*/ if - ( /*<>*/ caml_lessequal(bound, 0)) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Random_int32); - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ r = bits32(s) >>> 1 | 0, - /*<>*/ v = - /*<>*/ caml_mod(r, bound); - /*<>*/ if - (! - /*<>*/ caml_greaterthan - (r - v | 0, (Stdlib_Int32[9] - bound | 0) + 1 | 0)) - /*<>*/ return v; - } - /*<>*/ } - var bits64 = caml_lxm_next; - function int64(s, bound){ - /*<>*/ if - ( /*<>*/ caml_lessequal(bound, _g_)) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Random_int64); - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_int64_shift_right_unsigne - ( /*<>*/ caml_lxm_next(s), 1), - /*<>*/ v = - /*<>*/ runtime.caml_int64_mod(r, bound); - /*<>*/ if - (! - /*<>*/ caml_greaterthan - ( /*<>*/ caml_int64_sub(r, v), - /*<>*/ runtime.caml_int64_add - ( /*<>*/ caml_int64_sub(Stdlib_Int64[9], bound), - _f_))) - /*<>*/ return v; - } - /*<>*/ } - var - nativebits = - 32 === Stdlib_Nativeint[9] - ? function - (s){ - /*<>*/ return bits32(s); - /*<>*/ } - : function - (s){ - /*<>*/ return /*<>*/ caml_int64_to_int32 - ( /*<>*/ caml_lxm_next(s)); - /*<>*/ }, - nativeint = - 32 === Stdlib_Nativeint[9] - ? function - (s, bound){ - /*<>*/ return int32(s, bound); - /*<>*/ } - : function - (s, bound){ - /*<>*/ return /*<>*/ caml_int64_to_int32 - (int64 - (s, /*<>*/ caml_int64_of_int32(bound))); - /*<>*/ }; - function float$0(s, bound){ - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ b = /*<>*/ caml_lxm_next(s), - /*<>*/ n = - /*<>*/ caml_int64_shift_right_unsigne(b, 11); - /*<>*/ if - ( /*<>*/ caml_notequal(n, _h_)) - /*<>*/ return /*<>*/ runtime.caml_int64_to_float - (n) - * 1.1102230246251565e-16 - * bound; - } - /*<>*/ } - function bool(s){ - /*<>*/ return /*<>*/ runtime.caml_lessthan - ( /*<>*/ caml_lxm_next(s), _i_); - /*<>*/ } - function split(s){ - /*<>*/ var - /*<>*/ i1 = /*<>*/ caml_lxm_next(s), - /*<>*/ i2 = /*<>*/ caml_lxm_next(s), - /*<>*/ i3 = /*<>*/ caml_lxm_next(s), - /*<>*/ i4 = /*<>*/ caml_lxm_next(s); - /*<>*/ return mk(i1, i2, i3, i4); - /*<>*/ } - function mk_default(param){ - /*<>*/ return mk(_m_, _l_, _k_, _j_); - /*<>*/ } - /*<>*/ /*<>*/ var - random_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], [0, split], mk_default); - function bits$0(param){ - /*<>*/ return bits - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)); - /*<>*/ } - function int$1(bound){ - /*<>*/ return int$0 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), - bound); - /*<>*/ } - function full_int$0(bound){ - /*<>*/ return full_int - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), - bound); - /*<>*/ } - function int32$0(bound){ - /*<>*/ return int32 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), - bound); - /*<>*/ } - function nativeint$0(bound){ - /*<>*/ return nativeint - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), - bound); - /*<>*/ } - function int64$0(bound){ - /*<>*/ return int64 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), - bound); - /*<>*/ } - function float$1(scale){ - /*<>*/ return float$0 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), - scale); - /*<>*/ } - function bool$0(param){ - /*<>*/ return bool - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)); - /*<>*/ } - function bits32$0(param){ - /*<>*/ return bits32 - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)); - /*<>*/ } - function bits64$0(param){ - /*<>*/ return /*<>*/ caml_lxm_next - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)); - /*<>*/ } - function nativebits$0(param){ - /*<>*/ return nativebits - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)); - /*<>*/ } - function full_init(seed){ - /*<>*/ return reinit - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key), - seed); - /*<>*/ } - function init(seed){ - /*<>*/ return full_init([0, seed]); - /*<>*/ } - function self_init(param){ - /*<>*/ return full_init - ( /*<>*/ caml_sys_random_seed(0)); - /*<>*/ } - function split$0(param){ - /*<>*/ return split - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)); - /*<>*/ } - function get_state(param){ - /*<>*/ return copy - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)); - /*<>*/ } - function set_state(s){ - /*<>*/ return /*<>*/ caml_ba_blit - (s, - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], random_key)); - /*<>*/ } - var - Stdlib_Random = - [0, - init, - full_init, - self_init, - bits$0, - int$1, - full_int$0, - int32$0, - nativeint$0, - int64$0, - float$1, - bool$0, - bits32$0, - bits64$0, - nativebits$0, - [0, - make, - make_self_init, - copy, - bits, - int$0, - full_int, - int32, - nativeint, - int64, - float$0, - bool, - bits32, - bits64, - nativebits, - split], - get_state, - set_state, - split$0]; - runtime.caml_register_global(29, Stdlib_Random, "Stdlib__Random"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Hashtbl -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Array, Stdlib__Atomic, Stdlib__Domain, Stdlib__Int, Stdlib__Random, Stdlib__Seq, Stdlib__String, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_check_bound = runtime.caml_check_bound, - caml_compare = runtime.caml_compare, - caml_hash = runtime.caml_hash, - caml_make_vect = runtime.caml_make_vect, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_sys_getenv = runtime.caml_sys_getenv, - 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) - : 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(), - cst = "", - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib = global_data.Stdlib, - Stdlib_Atomic = global_data.Stdlib__Atomic, - Stdlib_Domain = global_data.Stdlib__Domain, - Stdlib_Random = global_data.Stdlib__Random, - Stdlib_Seq = global_data.Stdlib__Seq, - Stdlib_Int = global_data.Stdlib__Int, - Stdlib_Array = global_data.Stdlib__Array; - global_data.Assert_failure; - var - Stdlib_String = global_data.Stdlib__String, - cst_Hashtbl_unsupported_hash_t = "Hashtbl: unsupported hash table format", - _d_ = [0, 0]; - function ongoing_traversal(h){ - /*<>*/ var - _aB_ = h.length - 1 < 4 ? 1 : 0, - _aC_ = _aB_ || (h[4] < 0 ? 1 : 0); - return _aC_; - /*<>*/ } - function flip_ongoing_traversal(h){ - /*<>*/ h[4] = - h[4] | 0; - return 0; - /*<>*/ } - try{ - /*<>*/ var - /*<>*/ _f_ = - /*<>*/ caml_sys_getenv("OCAMLRUNPARAM"), - params = _f_; - } - catch(_az_){ - var _a_ = caml_wrap_exception(_az_); - if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); - /*<>*/ try{ - /*<>*/ var - /*<>*/ _e_ = - /*<>*/ caml_sys_getenv("CAMLRUNPARAM"), - _c_ = _e_; - } - catch(_aA_){ - var _b_ = caml_wrap_exception(_aA_); - if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); - var _c_ = cst; - } - var params = _c_; - } - /*<>*/ var - /*<>*/ randomized_default = - /*<>*/ caml_call2(Stdlib_String[14], params, 82), - /*<>*/ randomized = - /*<>*/ caml_call1 - (Stdlib_Atomic[1], randomized_default); - function randomize(param){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Atomic[3], randomized, 1); - /*<>*/ } - function is_randomized(param){ - /*<>*/ return caml_call1(Stdlib_Atomic[2], randomized); - /*<>*/ } - /*<>*/ /*<>*/ var - prng_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, Stdlib_Random[15][2]); - function power_2_above(x, n){ - /*<>*/ var x$0 = x; - /*<>*/ for(;;){ - if(n <= x$0) /*<>*/ return x$0; - if(Stdlib_Sys[13] < (x$0 * 2 | 0)) /*<>*/ return x$0; - var x$1 = x$0 * 2 | 0, x$0 = x$1; - } - /*<>*/ } - function create(opt, initial_size){ - /*<>*/ if(opt) - var sth = opt[1], random = sth; - else - var - random = - /*<>*/ caml_call1(Stdlib_Atomic[2], randomized); - /*<>*/ /*<>*/ var - s = power_2_above(16, initial_size); - /*<>*/ if(random) - /*<>*/ var - /*<>*/ _ay_ = - /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), - seed = /*<>*/ caml_call1(Stdlib_Random[15][4], _ay_); - else - var seed = 0; - /*<>*/ return [0, - 0, - /*<>*/ caml_make_vect(s, 0), - seed, - s]; - /*<>*/ } - function clear(h){ - /*<>*/ var _ax_ = 0 < h[1] ? 1 : 0; - return _ax_ - ? (h - [1] - = 0, - /*<>*/ caml_call4 - (Stdlib_Array[7], h[2], 0, h[2].length - 1, 0)) - : _ax_; - /*<>*/ } - function reset(h){ - /*<>*/ var len = h[2].length - 1; - if - (4 <= h.length - 1 - && len !== /*<>*/ caml_call1(Stdlib[18], h[4])){ - h[1] = 0; - h[2] = - /*<>*/ caml_make_vect - ( /*<>*/ caml_call1(Stdlib[18], h[4]), 0); - return 0; - } - /*<>*/ return clear(h); - /*<>*/ } - function copy_bucketlist(param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - key = param[1], - data = param[2], - next = param[3], - /*<>*/ prec$1 = [0, key, data, next], - prec = prec$1, - param$0 = next; - for(;;){ - if(! param$0) /*<>*/ return prec$1; - /*<>*/ var - key$0 = param$0[1], - data$0 = param$0[2], - next$0 = param$0[3], - /*<>*/ prec$0 = [0, key$0, data$0, next$0]; - prec[3] = prec$0; - var prec = prec$0, param$0 = next$0; - } - /*<>*/ } - function copy(h){ - /*<>*/ var - _au_ = h[4], - _av_ = h[3], - /*<>*/ _aw_ = - /*<>*/ caml_call2 - (Stdlib_Array[13], copy_bucketlist, h[2]); - /*<>*/ return [0, h[1], _aw_, _av_, _au_]; - /*<>*/ } - function length(h){ - /*<>*/ return h[1]; - /*<>*/ } - function insert_all_buckets(indexfun, inplace, odata, ndata){ - /*<>*/ var - nsize = ndata.length - 1, - /*<>*/ ndata_tail = - /*<>*/ caml_make_vect(nsize, 0), - _ao_ = odata.length - 1 - 1 | 0, - /*<>*/ _an_ = 0; - if(_ao_ >= 0){ - var i$0 = _an_; - a: - for(;;){ - /*<>*/ var - /*<>*/ cell$1 = - caml_check_bound(odata, i$0)[1 + i$0], - cell = cell$1; - /*<>*/ for(;;){ - if(! cell){ - /*<>*/ /*<>*/ var - _at_ = i$0 + 1 | 0; - if(_ao_ === i$0) break a; - var i$0 = _at_; - break; - } - /*<>*/ var - key = cell[1], - data = cell[2], - next = cell[3], - /*<>*/ cell$0 = inplace ? cell : [0, key, data, 0], - /*<>*/ nidx = - /*<>*/ caml_call1(indexfun, key), - /*<>*/ match = - caml_check_bound(ndata_tail, nidx)[1 + nidx]; - if(match) - match[3] = cell$0; - else - /*<>*/ caml_check_bound(ndata, nidx)[1 + nidx] = cell$0; - /*<>*/ caml_check_bound(ndata_tail, nidx)[1 + nidx] - = cell$0; - var cell = next; - } - } - } - if(inplace){ - /*<>*/ var - _aq_ = nsize - 1 | 0, - /*<>*/ _ap_ = 0; - if(_aq_ >= 0){ - var i = _ap_; - for(;;){ - /*<>*/ /*<>*/ var - match$0 = caml_check_bound(ndata_tail, i)[1 + i]; - if(match$0) match$0[3] = 0; - /*<>*/ /*<>*/ var - _as_ = i + 1 | 0; - if(_aq_ === i) break; - var i = _as_; - } - } - var _ar_ = 0; - } - else - var _ar_ = inplace; - return _ar_; - /*<>*/ } - function resize(indexfun, h){ - /*<>*/ var - odata = h[2], - /*<>*/ osize = odata.length - 1, - nsize = osize * 2 | 0, - _am_ = nsize < Stdlib_Sys[13] ? 1 : 0; - if(! _am_) return _am_; - /*<>*/ var - /*<>*/ ndata = - /*<>*/ caml_make_vect(nsize, 0), - /*<>*/ inplace = 1 - ongoing_traversal(h); - h[2] = ndata; - /*<>*/ return insert_all_buckets - ( /*<>*/ caml_call1(indexfun, h), - inplace, - odata, - ndata); - /*<>*/ } - function iter(f, h){ - /*<>*/ /*<>*/ var - old_trav = ongoing_traversal(h); - if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); - /*<>*/ try{ - var d = h[2], _ai_ = d.length - 1 - 1 | 0, _ah_ = 0; - if(_ai_ >= 0){ - var i = _ah_; - a: - for(;;){ - var param = caml_check_bound(d, i)[1 + i]; - /*<>*/ for(;;){ - if(! param){ - /*<>*/ /*<>*/ var - _al_ = i + 1 | 0; - if(_ai_ === i) break a; - var i = _al_; - break; - } - var key = param[1], data = param[2], next = param[3]; - /*<>*/ /*<>*/ caml_call2 - (f, key, data); - var param = next; - } - } - } - var _aj_ = 1 - old_trav, _ak_ = _aj_ ? flip_ongoing_traversal(h) : _aj_; - /*<>*/ return _ak_; - } - catch(exn$0){ - var exn = caml_wrap_exception(exn$0); - /*<>*/ if(old_trav) - throw caml_maybe_attach_backtrace(exn, 0); - /*<>*/ flip_ongoing_traversal(h); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (exn, 0); - } - /*<>*/ } - function filter_map_inplace(f, h){ - /*<>*/ var - d = h[2], - /*<>*/ old_trav = ongoing_traversal(h); - if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); - /*<>*/ try{ - var _ad_ = d.length - 1 - 1 | 0, _ac_ = 0; - if(_ad_ >= 0){ - var i = _ac_; - a: - for(;;){ - /*<>*/ var - /*<>*/ slot$0 = caml_check_bound(h[2], i)[1 + i], - prec = 0, - slot = slot$0; - for(;;){ - if(! slot){ - if(prec) - prec[3] = 0; - else - /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; - /*<>*/ /*<>*/ var - _ag_ = i + 1 | 0; - if(_ad_ === i) break a; - var i = _ag_; - break; - } - /*<>*/ var - key = slot[1], - data = slot[2], - next = slot[3], - /*<>*/ match = - /*<>*/ caml_call2(f, key, data); - if(match){ - var data$0 = match[1]; - /*<>*/ if(prec) - prec[3] = slot; - else - /*<>*/ caml_check_bound(h[2], i)[1 + i] = slot; - slot[2] = data$0; - var prec = slot, slot = next; - } - else{h[1] = h[1] - 1 | 0; var slot = next;} - } - } - } - var _ae_ = 1 - old_trav, _af_ = _ae_ ? flip_ongoing_traversal(h) : _ae_; - /*<>*/ return _af_; - } - catch(exn$0){ - var exn = caml_wrap_exception(exn$0); - /*<>*/ if(old_trav) - throw caml_maybe_attach_backtrace(exn, 0); - /*<>*/ flip_ongoing_traversal(h); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (exn, 0); - } - /*<>*/ } - function fold(f, h, init){ - /*<>*/ /*<>*/ var - old_trav = ongoing_traversal(h); - if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); - /*<>*/ try{ - /*<>*/ var - d = h[2], - /*<>*/ accu$1 = [0, init], - _$_ = d.length - 1 - 1 | 0, - /*<>*/ ___ = 0; - if(_$_ >= 0){ - var i = ___; - a: - for(;;){ - /*<>*/ var - accu$2 = accu$1[1], - /*<>*/ b$0 = caml_check_bound(d, i)[1 + i], - b = b$0, - accu = accu$2; - /*<>*/ for(;;){ - if(! b){ - accu$1[1] = accu; - /*<>*/ /*<>*/ var - _ab_ = i + 1 | 0; - if(_$_ === i) break a; - var i = _ab_; - break; - } - /*<>*/ var - key = b[1], - data = b[2], - next = b[3], - /*<>*/ accu$0 = - /*<>*/ caml_call3(f, key, data, accu), - b = next, - accu = accu$0; - } - } - } - if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); - var _aa_ = accu$1[1]; - return _aa_; - } - catch(exn$0){ - var exn = caml_wrap_exception(exn$0); - /*<>*/ if(old_trav) - throw caml_maybe_attach_backtrace(exn, 0); - /*<>*/ flip_ongoing_traversal(h); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (exn, 0); - } - /*<>*/ } - function bucket_length(accu, param){ - var accu$0 = accu, param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return accu$0; - /*<>*/ var - next = param$0[3], - /*<>*/ accu$1 = accu$0 + 1 | 0, - accu$0 = accu$1, - param$0 = next; - } - } - function stats(h){ - /*<>*/ var _U_ = h[2], _V_ = 0; - function _W_(m, b){ - /*<>*/ /*<>*/ var - _Z_ = bucket_length(0, b); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _Z_); - /*<>*/ } - /*<>*/ var - /*<>*/ mbl = - /*<>*/ caml_call3(Stdlib_Array[15], _W_, _V_, _U_), - /*<>*/ histo = - /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _X_ = h[2]; - function _Y_(b){ - /*<>*/ /*<>*/ var - l = bucket_length(0, b); - /*<>*/ histo[1 + l] = - caml_check_bound(histo, l)[1 + l] + 1 | 0; - /*<>*/ return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _Y_, _X_); - /*<>*/ return [0, h[1], h[2].length - 1, mbl, histo]; - /*<>*/ } - function to_seq(tbl){ - /*<>*/ var tbl_data = tbl[2]; - /*<>*/ function aux(i, buck, param){ - /*<>*/ var i$0 = i, buck$0 = buck; - /*<>*/ for(;;){ - if(buck$0){ - var key = buck$0[1], data = buck$0[2], next = buck$0[3]; - /*<>*/ return [0, - [0, key, data], - function(_T_){ /*<>*/ return aux(i$0, next, _T_);}]; - } - if(i$0 === tbl_data.length - 1) /*<>*/ return 0; - /*<>*/ var - /*<>*/ buck$1 = - caml_check_bound(tbl_data, i$0)[1 + i$0], - /*<>*/ i$1 = i$0 + 1 | 0, - i$0 = i$1, - buck$0 = buck$1; - } - /*<>*/ } - /*<>*/ var /*<>*/ _Q_ = 0, _R_ = 0; - /*<>*/ return function(_S_){ - /*<>*/ return aux(_R_, _Q_, _S_);}; - /*<>*/ } - function to_seq_keys(m){ - /*<>*/ /*<>*/ var _N_ = to_seq(m); - function _O_(_P_){ /*<>*/ return _P_[1];} - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[27], _O_, _N_); - /*<>*/ } - function to_seq_values(m){ - /*<>*/ /*<>*/ var _K_ = to_seq(m); - function _L_(_M_){ /*<>*/ return _M_[2];} - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[27], _L_, _K_); - /*<>*/ } - function MakeSeeded(H){ - function key_index(h, key){ - /*<>*/ var _J_ = h[2].length - 1 - 1 | 0; - /*<>*/ return /*<>*/ caml_call2 - (H[2], h[3], key) - & _J_; - /*<>*/ } - function add(h, key, data){ - /*<>*/ var - /*<>*/ i = key_index(h, key), - /*<>*/ bucket = - [0, key, data, caml_check_bound(h[2], i)[1 + i]]; - /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; - h[1] = h[1] + 1 | 0; - var _I_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _I_ ? resize(key_index, h) : _I_; - /*<>*/ } - function remove(h, key){ - /*<>*/ var - /*<>*/ i = key_index(h, key), - /*<>*/ c = caml_check_bound(h[2], i)[1 + i], - prec$0 = 0, - prec = c; - for(;;){ - if(! prec) /*<>*/ return 0; - var k = prec[1], next = prec[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], k, key)){ - h[1] = h[1] - 1 | 0; - return prec$0 - ? (prec$0[3] = next, 0) - : (caml_check_bound(h[2], i)[1 + i] = next, 0); - } - var prec$0 = prec, prec = next; - } - /*<>*/ } - function find(h, key){ - /*<>*/ var - /*<>*/ _H_ = key_index(h, key), - /*<>*/ match = caml_check_bound(h[2], _H_)[1 + _H_]; - if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var k1 = match[1], d1 = match[2], next1 = match[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], key, k1)) - /*<>*/ return d1; - if(! next1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var k2 = next1[1], d2 = next1[2], next2 = next1[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], key, k2)) - /*<>*/ return d2; - if(! next2) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var k3 = next2[1], d3 = next2[2], next3 = next2[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], key, k3)) - /*<>*/ return d3; - var param = next3; - for(;;){ - if(! param) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var k = param[1], data = param[2], next = param[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], key, k)) - /*<>*/ return data; - var param = next; - } - /*<>*/ } - function find_opt(h, key){ - /*<>*/ var - /*<>*/ _G_ = key_index(h, key), - /*<>*/ match = caml_check_bound(h[2], _G_)[1 + _G_]; - if(! match) /*<>*/ return 0; - var k1 = match[1], d1 = match[2], next1 = match[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], key, k1)) - /*<>*/ return [0, d1]; - if(! next1) /*<>*/ return 0; - var k2 = next1[1], d2 = next1[2], next2 = next1[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], key, k2)) - /*<>*/ return [0, d2]; - if(! next2) /*<>*/ return 0; - var k3 = next2[1], d3 = next2[2], next3 = next2[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], key, k3)) - /*<>*/ return [0, d3]; - var param = next3; - for(;;){ - if(! param) /*<>*/ return 0; - var k = param[1], data = param[2], next = param[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], key, k)) - /*<>*/ return [0, data]; - var param = next; - } - /*<>*/ } - function find_all(h, key){ - function find_in_bucket(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var k = param$0[1], d = param$0[2], next = param$0[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], k, key)) - /*<>*/ return [0, d, find_in_bucket(next)]; - var param$0 = next; - } - /*<>*/ } - /*<>*/ /*<>*/ var - _F_ = key_index(h, key); - /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _F_)[1 + _F_]); - /*<>*/ } - function replace(h, key, data){ - /*<>*/ var - /*<>*/ i = key_index(h, key), - /*<>*/ l = caml_check_bound(h[2], i)[1 + i], - slot = l; - for(;;){ - if(slot){ - var k = slot[1], next = slot[3]; - /*<>*/ if - (! /*<>*/ caml_call2(H[1], k, key)){var slot = next; continue;} - slot[1] = key; - slot[2] = data; - var _C_ = 0; - } - else - var _C_ = 1; - /*<>*/ if(_C_){ - /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, key, data, l]; - h[1] = h[1] + 1 | 0; - var _D_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - if(_D_) /*<>*/ return resize(key_index, h); - var _E_ = _D_; - } - else - var _E_ = _C_; - return _E_; - } - /*<>*/ } - function mem(h, key){ - /*<>*/ var - /*<>*/ _B_ = key_index(h, key), - param = caml_check_bound(h[2], _B_)[1 + _B_]; - /*<>*/ for(;;){ - if(! param) /*<>*/ return 0; - /*<>*/ var - k = param[1], - next = param[3], - /*<>*/ _A_ = - /*<>*/ caml_call2(H[1], k, key); - /*<>*/ if(_A_) - /*<>*/ return _A_; - var param = next; - } - /*<>*/ } - function add_seq(tbl, i){ - function _z_(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return add(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _z_, i); - /*<>*/ } - function replace_seq(tbl, i){ - function _y_(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return replace(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _y_, i); - /*<>*/ } - function of_seq(i){ - /*<>*/ /*<>*/ var - tbl = create(0, 16); - /*<>*/ replace_seq(tbl, i); - /*<>*/ return tbl; - /*<>*/ } - /*<>*/ return [0, - create, - clear, - reset, - copy, - add, - remove, - find, - find_opt, - find_all, - replace, - mem, - iter, - filter_map_inplace, - fold, - length, - stats, - to_seq, - to_seq_keys, - to_seq_values, - add_seq, - replace_seq, - of_seq]; - } - function Make(H){ - var equal = H[1]; - function seeded_hash(seed, x){ - /*<>*/ return /*<>*/ caml_call1 - (H[2], x); - /*<>*/ } - var - include = MakeSeeded([0, equal, seeded_hash]), - clear = include[2], - reset = include[3], - copy = include[4], - add = include[5], - remove = include[6], - find = include[7], - find_opt = include[8], - find_all = include[9], - replace = include[10], - mem = include[11], - iter = include[12], - filter_map_inplace = include[13], - fold = include[14], - length = include[15], - stats = include[16], - to_seq = include[17], - to_seq_keys = include[18], - to_seq_values = include[19], - add_seq = include[20], - replace_seq = include[21], - _x_ = include[1]; - function create(sz){ - /*<>*/ return /*<>*/ caml_call2 - (_x_, _d_, sz); - /*<>*/ } - function of_seq(i){ - /*<>*/ /*<>*/ var - tbl = create(16); - /*<>*/ /*<>*/ caml_call2 - (replace_seq, tbl, i); - /*<>*/ return tbl; - /*<>*/ } - /*<>*/ return [0, - create, - clear, - reset, - copy, - add, - remove, - find, - find_opt, - find_all, - replace, - mem, - iter, - filter_map_inplace, - fold, - length, - stats, - to_seq, - to_seq_keys, - to_seq_values, - add_seq, - replace_seq, - of_seq]; - } - function hash(x){ - /*<>*/ return /*<>*/ caml_hash - (10, 100, 0, x); - /*<>*/ } - function hash_param(n1, n2, x){ - /*<>*/ return /*<>*/ caml_hash - (n1, n2, 0, x); - /*<>*/ } - function seeded_hash(seed, x){ - /*<>*/ return /*<>*/ caml_hash - (10, 100, seed, x); - /*<>*/ } - function key_index(h, key){ - /*<>*/ return 4 <= h.length - 1 - ? /*<>*/ caml_hash - (10, 100, h[3], key) - & (h[2].length - 1 - 1 | 0) - : /*<>*/ caml_call1 - (Stdlib[1], cst_Hashtbl_unsupported_hash_t); - /*<>*/ } - function add(h, key, data){ - /*<>*/ var - /*<>*/ i = key_index(h, key), - /*<>*/ bucket = - [0, key, data, caml_check_bound(h[2], i)[1 + i]]; - /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; - h[1] = h[1] + 1 | 0; - var _w_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _w_ ? resize(key_index, h) : _w_; - /*<>*/ } - function remove(h, key){ - /*<>*/ var - /*<>*/ i = key_index(h, key), - /*<>*/ c = caml_check_bound(h[2], i)[1 + i], - prec$0 = 0, - prec = c; - for(;;){ - if(! prec) /*<>*/ return 0; - var k = prec[1], next = prec[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(k, key)){ - h[1] = h[1] - 1 | 0; - return prec$0 - ? (prec$0[3] = next, 0) - : (caml_check_bound(h[2], i)[1 + i] = next, 0); - } - var prec$0 = prec, prec = next; - } - /*<>*/ } - function find(h, key){ - /*<>*/ var - /*<>*/ _v_ = key_index(h, key), - /*<>*/ match = caml_check_bound(h[2], _v_)[1 + _v_]; - if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var k1 = match[1], d1 = match[2], next1 = match[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k1)) - /*<>*/ return d1; - if(! next1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var k2 = next1[1], d2 = next1[2], next2 = next1[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k2)) - /*<>*/ return d2; - if(! next2) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var k3 = next2[1], d3 = next2[2], next3 = next2[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k3)) - /*<>*/ return d3; - var param = next3; - for(;;){ - if(! param) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var k = param[1], data = param[2], next = param[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k)) - /*<>*/ return data; - var param = next; - } - /*<>*/ } - function find_opt(h, key){ - /*<>*/ var - /*<>*/ _u_ = key_index(h, key), - /*<>*/ match = caml_check_bound(h[2], _u_)[1 + _u_]; - if(! match) /*<>*/ return 0; - var k1 = match[1], d1 = match[2], next1 = match[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k1)) - /*<>*/ return [0, d1]; - if(! next1) /*<>*/ return 0; - var k2 = next1[1], d2 = next1[2], next2 = next1[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k2)) - /*<>*/ return [0, d2]; - if(! next2) /*<>*/ return 0; - var k3 = next2[1], d3 = next2[2], next3 = next2[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k3)) - /*<>*/ return [0, d3]; - var param = next3; - for(;;){ - if(! param) /*<>*/ return 0; - var k = param[1], data = param[2], next = param[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k)) - /*<>*/ return [0, data]; - var param = next; - } - /*<>*/ } - function find_all(h, key){ - function find_in_bucket(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var k = param$0[1], data = param$0[2], next = param$0[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(k, key)) - /*<>*/ return [0, data, find_in_bucket(next)]; - var param$0 = next; - } - /*<>*/ } - /*<>*/ /*<>*/ var - _t_ = key_index(h, key); - /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _t_)[1 + _t_]); - /*<>*/ } - function replace(h, key, data){ - /*<>*/ var - /*<>*/ i = key_index(h, key), - /*<>*/ l = caml_check_bound(h[2], i)[1 + i], - slot = l; - for(;;){ - if(slot){ - var k = slot[1], next = slot[3]; - /*<>*/ if - (0 !== /*<>*/ caml_compare(k, key)){var slot = next; continue;} - slot[1] = key; - slot[2] = data; - var _q_ = 0; - } - else - var _q_ = 1; - /*<>*/ if(_q_){ - /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, key, data, l]; - h[1] = h[1] + 1 | 0; - var _r_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - if(_r_) /*<>*/ return resize(key_index, h); - var _s_ = _r_; - } - else - var _s_ = _q_; - return _s_; - } - /*<>*/ } - function mem(h, key){ - /*<>*/ var - /*<>*/ _p_ = key_index(h, key), - param = caml_check_bound(h[2], _p_)[1 + _p_]; - /*<>*/ for(;;){ - if(! param) /*<>*/ return 0; - var - k = param[1], - next = param[3], - _o_ = 0 === /*<>*/ caml_compare(k, key) ? 1 : 0; - if(_o_) return _o_; - var param = next; - } - /*<>*/ } - function add_seq(tbl, i){ - function _n_(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return add(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _n_, i); - /*<>*/ } - function replace_seq(tbl, i){ - function _m_(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return replace(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _m_, i); - /*<>*/ } - function of_seq(i){ - /*<>*/ /*<>*/ var - tbl = create(0, 16); - /*<>*/ replace_seq(tbl, i); - /*<>*/ return tbl; - /*<>*/ } - function rebuild(opt, h){ - /*<>*/ if(opt) - var sth = opt[1], random = sth; - else - var - random = - /*<>*/ caml_call1(Stdlib_Atomic[2], randomized); - /*<>*/ /*<>*/ var - s = power_2_above(16, h[2].length - 1); - /*<>*/ if(random) - /*<>*/ var - /*<>*/ _g_ = - /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), - seed = /*<>*/ caml_call1(Stdlib_Random[15][4], _g_); - else - var seed = 4 <= h.length - 1 ? h[3] : 0; - /*<>*/ var - _h_ = 4 <= h.length - 1 ? h[4] : s, - /*<>*/ h$0 = - [0, h[1], /*<>*/ caml_make_vect(s, 0), seed, _h_], - _i_ = h$0[2], - _j_ = h[2], - _k_ = 0; - /*<>*/ insert_all_buckets - (function(_l_){ /*<>*/ return key_index(h$0, _l_);}, _k_, _j_, _i_); - /*<>*/ return h$0; - /*<>*/ } - var - Stdlib_Hashtbl = - [0, - create, - clear, - reset, - copy, - add, - find, - find_opt, - find_all, - mem, - remove, - replace, - iter, - filter_map_inplace, - fold, - length, - randomize, - is_randomized, - rebuild, - stats, - to_seq, - to_seq_keys, - to_seq_values, - add_seq, - replace_seq, - of_seq, - Make, - MakeSeeded, - hash, - seeded_hash, - hash_param, - caml_hash]; - runtime.caml_register_global(16, Stdlib_Hashtbl, "Stdlib__Hashtbl"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Weak -//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Int, Stdlib__Obj, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_check_bound = runtime.caml_check_bound, - caml_make_vect = runtime.caml_make_vect, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_mod = runtime.caml_mod; - /*<>*/ 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_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, - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib_Int = global_data.Stdlib__Int, - Stdlib_Array = global_data.Stdlib__Array, - Stdlib_Obj = global_data.Stdlib__Obj, - cst_Weak_Make_hash_bucket_cann = "Weak.Make: hash bucket cannot grow more", - cst_Weak_fill = "Weak.fill", - cst_Weak_blit = "Weak.blit", - cst_Weak_check = "Weak.check", - cst_Weak_get_copy = "Weak.get_copy", - cst_Weak_get = "Weak.get", - cst_Weak_set = "Weak.set", - cst_Weak_create = "Weak.create"; - function create(l){ - /*<>*/ var - _W_ = 0 <= l ? 1 : 0, - _X_ = _W_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _W_; - if(1 - _X_) - /*<>*/ /*<>*/ caml_call1 - (Stdlib[1], cst_Weak_create); - /*<>*/ return /*<>*/ runtime.caml_weak_create - (l); - /*<>*/ } - function length(x){ - /*<>*/ return x.length - 1 - 2 | 0; - /*<>*/ } - function raise_if_invalid_offset(e, o, msg){ - /*<>*/ var - _T_ = 0 <= o ? 1 : 0, - _U_ = _T_ ? o < length(e) ? 1 : 0 : _T_, - _V_ = 1 - _U_; - return _V_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _V_; - /*<>*/ } - function set(e, o, x){ - /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); - if(! x) - /*<>*/ return /*<>*/ runtime.caml_ephe_unset_key - (e, o); - var x$0 = x[1]; - /*<>*/ return /*<>*/ runtime.caml_ephe_set_key - (e, o, x$0); - /*<>*/ } - function get(e, o){ - /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_get); - /*<>*/ return /*<>*/ runtime.caml_ephe_get_key - (e, o); - /*<>*/ } - function get_copy(e, o){ - /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_get_copy); - /*<>*/ return /*<>*/ runtime.caml_ephe_get_key_copy - (e, o); - /*<>*/ } - function check(e, o){ - /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_check); - /*<>*/ return /*<>*/ runtime.caml_ephe_check_key - (e, o); - /*<>*/ } - function blit(e1, o1, e2, o2, l){ - /*<>*/ if - (0 <= l - && - 0 <= o1 - && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ - var - _R_ = 0 !== l ? 1 : 0, - _S_ = - _R_ - ? /*<>*/ runtime.caml_ephe_blit_key - (e1, o1, e2, o2, l) - : _R_; - /*<>*/ return _S_; - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Weak_blit); - /*<>*/ } - function fill(ar, ofs, len, x){ - /*<>*/ if - (0 <= ofs && 0 <= len && (length(ar) - len | 0) >= ofs){ - var _P_ = (ofs + len | 0) - 1 | 0; - if(_P_ >= ofs){ - var i = ofs; - for(;;){ - /*<>*/ set(ar, i, x); - /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(_P_ === i) break; - var i = _Q_; - } - } - return 0; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], cst_Weak_fill], 1); - /*<>*/ } - function Make(H){ - /*<>*/ /*<>*/ var - emptybucket = create(0); - function get_index(t, h){ - /*<>*/ return caml_mod(h & Stdlib[19], t[1].length - 1); - /*<>*/ } - var limit = 7; - function create$0(sz){ - /*<>*/ var - sz$0 = 7 <= sz ? sz : 7, - sz$1 = Stdlib_Sys[13] < sz$0 ? Stdlib_Sys[13] : sz$0; - /*<>*/ return [0, - /*<>*/ caml_make_vect(sz$1, emptybucket), - /*<>*/ caml_make_vect(sz$1, [0]), - limit, - 0, - 0]; - /*<>*/ } - function clear(t){ - /*<>*/ var - _N_ = t[1].length - 1 - 1 | 0, - /*<>*/ _M_ = 0; - if(_N_ >= 0){ - var i = _M_; - for(;;){ - /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; - /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; - /*<>*/ /*<>*/ var _O_ = i + 1 | 0; - if(_N_ === i) break; - var i = _O_; - } - } - t[3] = limit; - t[4] = 0; - return 0; - /*<>*/ } - function fold(f, t, init){ - /*<>*/ var _K_ = t[1], i = 0; - /*<>*/ function _L_(b, accu$1){ - var i$0 = i, accu = accu$1; - /*<>*/ for(;;){ - if(length(b) <= i$0) /*<>*/ return accu; - /*<>*/ /*<>*/ var - match = get(b, i$0); - if(match) - /*<>*/ var - v = match[1], - /*<>*/ accu$0 = - /*<>*/ caml_call2(f, v, accu), - i$1 = i$0 + 1 | 0, - i$0 = i$1, - accu = accu$0; - else - var i$2 = i$0 + 1 | 0, i$0 = i$2; - } - } - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _L_, _K_, init); - /*<>*/ } - function iter(f, t){ - /*<>*/ var _I_ = t[1], i = 0; - /*<>*/ function _J_(b){ - var i$0 = i; - /*<>*/ for(;;){ - if(length(b) <= i$0) /*<>*/ return 0; - /*<>*/ /*<>*/ var - match = get(b, i$0); - if(match){ - var v = match[1]; - /*<>*/ /*<>*/ caml_call1(f, v); - var i$1 = i$0 + 1 | 0, i$0 = i$1; - } - else - var i$2 = i$0 + 1 | 0, i$0 = i$2; - } - } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Array[11], _J_, _I_); - /*<>*/ } - function count_bucket(i, b, accu){ - /*<>*/ var i$0 = i, accu$0 = accu; - /*<>*/ for(;;){ - if(length(b) <= i$0) /*<>*/ return accu$0; - /*<>*/ var - /*<>*/ _H_ = check(b, i$0) ? 1 : 0, - accu$1 = accu$0 + _H_ | 0, - i$1 = i$0 + 1 | 0, - i$0 = i$1, - accu$0 = accu$1; - } - /*<>*/ } - function count(t){ - /*<>*/ var - /*<>*/ _B_ = 0, - _C_ = t[1], - _D_ = 0; - /*<>*/ function _E_(_F_, _G_){ - /*<>*/ return count_bucket(_D_, _F_, _G_); - } - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _E_, _C_, _B_); - /*<>*/ } - function add_aux(t, setter, d, h, index){ - /*<>*/ var - /*<>*/ bucket$0 = - caml_check_bound(t[1], index)[1 + index], - /*<>*/ hashes = - caml_check_bound(t[2], index)[1 + index], - /*<>*/ sz = length(bucket$0), - i$3 = 0; - /*<>*/ for(;;){ - if(sz <= i$3){ - /*<>*/ /*<>*/ var - newsz = - /*<>*/ caml_call2 - (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); - /*<>*/ var - /*<>*/ newbucket$0 = create(newsz), - /*<>*/ newhashes = - /*<>*/ caml_make_vect(newsz, 0); - /*<>*/ blit(bucket$0, 0, newbucket$0, 0, sz); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Array[8], 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; - /*<>*/ caml_check_bound(t[2], index)[1 + index] = newhashes; - var _x_ = sz <= t[3] ? 1 : 0, _y_ = _x_ ? t[3] < newsz ? 1 : 0 : _x_; - if(_y_){ - t[4] = t[4] + 1 | 0; - var i$4 = 0; - for(;;){ - /*<>*/ var - _n_ = t[5], - /*<>*/ bucket = - caml_check_bound(t[1], _n_)[1 + _n_], - /*<>*/ _o_ = t[5], - /*<>*/ hbucket = - caml_check_bound(t[2], _o_)[1 + _o_], - /*<>*/ len = length(bucket), - prev_len = (((len - 3 | 0) * 2 | 0) + 2 | 0) / 3 | 0, - /*<>*/ live = count_bucket(0, bucket, 0); - if(live <= prev_len){ - /*<>*/ var - /*<>*/ j$2 = length(bucket) - 1 | 0, - i$0 = 0, - j = j$2; - /*<>*/ for(;;){ - if(prev_len > j){ - if(0 === prev_len){ - var _q_ = t[5]; - /*<>*/ caml_check_bound(t[1], _q_)[1 + _q_] = emptybucket; - var _r_ = t[5]; - /*<>*/ caml_check_bound(t[2], _r_)[1 + _r_] = [0]; - } - else{ - /*<>*/ /*<>*/ var - newbucket = create(prev_len); - /*<>*/ blit(bucket, 0, newbucket, 0, prev_len); - var _u_ = t[5]; - /*<>*/ caml_check_bound(t[1], _u_)[1 + _u_] = newbucket; - /*<>*/ var - /*<>*/ _v_ = - /*<>*/ caml_call3 - (Stdlib_Array[5], hbucket, 0, prev_len), - _w_ = t[5]; - /*<>*/ caml_check_bound(t[2], _w_)[1 + _w_] = _v_; - } - var - _s_ = t[3] < len ? 1 : 0, - _t_ = _s_ ? prev_len <= t[3] ? 1 : 0 : _s_; - if(_t_) t[4] = t[4] - 1 | 0; - break; - } - /*<>*/ if(check(bucket, i$0)) - var i$1 = i$0 + 1 | 0, i$0 = i$1; - else if(check(bucket, j)){ - /*<>*/ blit(bucket, j, bucket, i$0, 1); - /*<>*/ /*<>*/ var - _p_ = caml_check_bound(hbucket, j)[1 + j]; - /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _p_; - /*<>*/ var - /*<>*/ j$0 = j - 1 | 0, - i$2 = i$0 + 1 | 0, - i$0 = i$2, - j = j$0; - } - else - /*<>*/ var - /*<>*/ j$1 = j - 1 | 0, - j = j$1; - } - } - t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); - /*<>*/ /*<>*/ var - _A_ = i$4 + 1 | 0; - if(2 === i$4) break; - var i$4 = _A_; - } - } - var _z_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; - if(! _z_) return _z_; - /*<>*/ var - oldlen = t[1].length - 1, - /*<>*/ newlen = - /*<>*/ caml_call2 - (Stdlib_Int[10], - ((3 * oldlen | 0) / 2 | 0) + 3 | 0, - Stdlib_Sys[13]); - if(oldlen < newlen){ - /*<>*/ var - /*<>*/ newt = create$0(newlen), - _l_ = t[1], - i = 0, - /*<>*/ _m_ = - function(j, ob){ - var oi = i; - /*<>*/ for(;;){ - if(length(ob) <= oi) /*<>*/ return 0; - if(check(ob, oi)){ - /*<>*/ var - /*<>*/ oh = caml_check_bound(t[2], j)[1 + j], - setter$0 = - function(oi){ - function setter(nb, ni, param){ - /*<>*/ return blit(ob, oi, nb, ni, 1); - /*<>*/ } - return setter; - }, - setter = setter$0(oi), - /*<>*/ h = caml_check_bound(oh, oi)[1 + oi]; - /*<>*/ add_aux - (newt, setter, 0, h, get_index(newt, h)); - var i$0 = oi + 1 | 0, oi = i$0; - } - else - var i$1 = oi + 1 | 0, oi = i$1; - } - }; - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[12], _m_, _l_); - t[1] = newt[1]; - t[2] = newt[2]; - t[3] = newt[3]; - t[4] = newt[4]; - t[5] = caml_mod(t[5], newt[1].length - 1); - return 0; - } - t[3] = Stdlib[19]; - t[4] = 0; - return 0; - } - /*<>*/ if(! check(bucket$0, i$3)){ - /*<>*/ /*<>*/ caml_call3 - (setter, bucket$0, i$3, d); - /*<>*/ caml_check_bound(hashes, i$3)[1 + i$3] = h; - /*<>*/ return 0; - } - /*<>*/ var - /*<>*/ i$5 = i$3 + 1 | 0, - i$3 = i$5; - } - /*<>*/ } - function add(t, d){ - /*<>*/ /*<>*/ var - h = /*<>*/ caml_call1(H[2], d); - /*<>*/ return add_aux - (t, set, [0, d], h, get_index(t, h)); - /*<>*/ } - function find_or(t, d, ifnotfound){ - /*<>*/ var - /*<>*/ h = /*<>*/ caml_call1(H[2], d), - /*<>*/ index = get_index(t, h), - /*<>*/ bucket = - caml_check_bound(t[1], index)[1 + index], - /*<>*/ hashes = - caml_check_bound(t[2], index)[1 + index], - /*<>*/ sz = length(bucket), - i = 0; - /*<>*/ for(;;){ - if(sz <= i) - /*<>*/ return /*<>*/ caml_call2 - (ifnotfound, h, index); - if(h === caml_check_bound(hashes, i)[1 + i]){ - /*<>*/ /*<>*/ var - match = get_copy(bucket, i); - if(match){ - var v = match[1]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], v, d)){ - /*<>*/ /*<>*/ var - match$0 = get(bucket, i); - if(match$0){ - var v$0 = match$0[1]; - /*<>*/ return v$0; - } - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - continue; - } - } - /*<>*/ var - /*<>*/ i$1 = i + 1 | 0, - i = i$1; - } - else - /*<>*/ var - /*<>*/ i$2 = i + 1 | 0, - i = i$2; - } - /*<>*/ } - function merge(t, d){ - /*<>*/ return find_or - (t, - d, - function(h, index){ - /*<>*/ add_aux(t, set, [0, d], h, index); - /*<>*/ return d; - /*<>*/ }); - /*<>*/ } - function find(t, d){ - /*<>*/ return find_or - (t, - d, - function(h, index){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - /*<>*/ }); - /*<>*/ } - function find_opt(t, d){ - /*<>*/ var - /*<>*/ h = /*<>*/ caml_call1(H[2], d), - /*<>*/ index = get_index(t, h), - /*<>*/ bucket = - caml_check_bound(t[1], index)[1 + index], - /*<>*/ hashes = - caml_check_bound(t[2], index)[1 + index], - /*<>*/ sz = length(bucket), - i = 0; - /*<>*/ for(;;){ - if(sz <= i) /*<>*/ return 0; - if(h === caml_check_bound(hashes, i)[1 + i]){ - /*<>*/ /*<>*/ var - match = get_copy(bucket, i); - if(match){ - var v = match[1]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], v, d)){ - /*<>*/ /*<>*/ var - v$0 = get(bucket, i); - if(v$0) /*<>*/ return v$0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - continue; - } - } - /*<>*/ var - /*<>*/ i$1 = i + 1 | 0, - i = i$1; - } - else - /*<>*/ var - /*<>*/ i$2 = i + 1 | 0, - i = i$2; - } - /*<>*/ } - function find_shadow(t, d, iffound, ifnotfound){ - /*<>*/ var - /*<>*/ h = /*<>*/ caml_call1(H[2], d), - /*<>*/ index = get_index(t, h), - /*<>*/ bucket = - caml_check_bound(t[1], index)[1 + index], - /*<>*/ hashes = - caml_check_bound(t[2], index)[1 + index], - /*<>*/ sz = length(bucket), - i = 0; - /*<>*/ for(;;){ - if(sz <= i) return ifnotfound; - if(h === caml_check_bound(hashes, i)[1 + i]){ - /*<>*/ /*<>*/ var - match = get_copy(bucket, i); - if(match){ - var v = match[1]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], v, d)) - /*<>*/ return /*<>*/ caml_call2 - (iffound, bucket, i); - } - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - else - /*<>*/ var - /*<>*/ i$1 = i + 1 | 0, - i = i$1; - } - /*<>*/ } - function remove(t, d){ - /*<>*/ /*<>*/ var _k_ = 0; - /*<>*/ return find_shadow - (t, - d, - function(w, i){ - /*<>*/ return set(w, i, 0); - /*<>*/ }, - _k_); - /*<>*/ } - function mem(t, d){ - /*<>*/ /*<>*/ var _j_ = 0; - /*<>*/ return find_shadow - (t, - d, - function(w, i){ - /*<>*/ return 1; - /*<>*/ }, - _j_); - /*<>*/ } - function find_all(t, d){ - /*<>*/ var - /*<>*/ h = /*<>*/ caml_call1(H[2], d), - /*<>*/ index = get_index(t, h), - /*<>*/ bucket = - caml_check_bound(t[1], index)[1 + index], - /*<>*/ hashes = - caml_check_bound(t[2], index)[1 + index], - /*<>*/ sz = length(bucket), - i = 0, - accu = 0; - /*<>*/ for(;;){ - if(sz <= i) /*<>*/ return accu; - if(h === caml_check_bound(hashes, i)[1 + i]){ - /*<>*/ /*<>*/ var - match = get_copy(bucket, i); - if(match){ - var v = match[1]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], v, d)){ - /*<>*/ /*<>*/ var - match$0 = get(bucket, i); - if(match$0){ - /*<>*/ var - v$0 = match$0[1], - /*<>*/ accu$0 = [0, v$0, accu], - /*<>*/ i$0 = i + 1 | 0, - i = i$0, - accu = accu$0; - continue; - } - var i$1 = i + 1 | 0, i = i$1; - continue; - } - } - var i$2 = i + 1 | 0, i = i$2; - } - else - var i$3 = i + 1 | 0, i = i$3; - } - /*<>*/ } - function stats(t){ - /*<>*/ var - len = t[1].length - 1, - /*<>*/ lens = - /*<>*/ caml_call2(Stdlib_Array[13], length, t[1]); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[30], runtime.caml_int_compare, lens); - var _a_ = 0; - function _b_(_i_, _h_){ /*<>*/ return _i_ + _h_ | 0;} - /*<>*/ var - /*<>*/ totlen = - /*<>*/ caml_call3(Stdlib_Array[15], _b_, _a_, lens), - /*<>*/ _c_ = len - 1 | 0, - _e_ = len / 2 | 0, - /*<>*/ _d_ = caml_check_bound(lens, _c_)[1 + _c_], - /*<>*/ _f_ = caml_check_bound(lens, _e_)[1 + _e_], - /*<>*/ _g_ = caml_check_bound(lens, 0)[1]; - /*<>*/ return [0, len, count(t), totlen, _g_, _f_, _d_]; - /*<>*/ } - /*<>*/ return [0, - create$0, - clear, - merge, - add, - remove, - find, - find_opt, - find_all, - mem, - iter, - fold, - count, - stats]; - } - var - Stdlib_Weak = - [0, create, length, set, get, get_copy, check, fill, blit, Make]; - runtime.caml_register_global(13, Stdlib_Weak, "Stdlib__Weak"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Format -//# unitInfo: Requires: CamlinternalFormat, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Domain, Stdlib__Int, Stdlib__List, Stdlib__Queue, Stdlib__Stack, Stdlib__String -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst$16 = "", - cst$15 = ">", - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_string_length = runtime.caml_ml_string_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]); - } - var - global_data = runtime.caml_get_global_data(), - cst$14 = ".", - cst$11 = cst$15, - cst$12 = "<\/", - cst$13 = cst$16, - cst$8 = cst$15, - cst$9 = "<", - cst$10 = cst$16, - cst$7 = "\n", - cst$3 = cst$16, - cst$4 = cst$16, - cst$5 = cst$16, - cst$6 = cst$16, - cst = cst$16, - cst$0 = cst$16, - cst$1 = cst$16, - cst$2 = cst$16, - Stdlib_Queue = global_data.Stdlib__Queue, - CamlinternalFormat = global_data.CamlinternalFormat, - Stdlib = global_data.Stdlib, - Stdlib_String = global_data.Stdlib__String, - Stdlib_Domain = global_data.Stdlib__Domain, - Stdlib_Buffer = global_data.Stdlib__Buffer, - Stdlib_List = global_data.Stdlib__List, - Stdlib_Stack = global_data.Stdlib__Stack, - Stdlib_Int = global_data.Stdlib__Int, - Stdlib_Bytes = global_data.Stdlib__Bytes, - _f_ = [3, 0, 3], - cst_Format_pp_set_geometry = "Format.pp_set_geometry: ", - _e_ = [1, "max_indent < 2"], - _c_ = [1, "margin <= max_indent"], - _d_ = [0, 0], - _b_ = [0, cst$16], - _a_ = [0, cst$16, 0, cst$16], - cst_Stdlib_Format_String_tag = "Stdlib.Format.String_tag"; - function id(x){ /*<>*/ return x; /*<>*/ } - /*<>*/ var - /*<>*/ String_tag = - [248, cst_Stdlib_Format_String_tag, runtime.caml_fresh_oo_id(0)], - zero = 0, - unknown = -1; - function pp_enqueue(state, token){ - /*<>*/ state[13] = state[13] + token[3] | 0; - return caml_call2(Stdlib_Queue[3], token, state[28]); - /*<>*/ } - var pp_infinity = 1000000010; - function pp_output_string(state, s){ - /*<>*/ return caml_call3 - (state[17], s, 0, caml_ml_string_length(s)); - /*<>*/ } - function pp_output_newline(state){ - /*<>*/ return /*<>*/ caml_call1 - (state[19], 0); - /*<>*/ } - function format_pp_text(state, size, text){ - /*<>*/ state[9] = state[9] - size | 0; - /*<>*/ pp_output_string(state, text); - state[11] = 0; - return 0; - /*<>*/ } - function format_string(state, s){ - /*<>*/ /*<>*/ var - _bQ_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); - /*<>*/ return _bQ_ - ? format_pp_text(state, caml_ml_string_length(s), s) - : _bQ_; - /*<>*/ } - function break_new_line(state, param, width){ - var after = param[3], offset = param[2], before = param[1]; - /*<>*/ format_string(state, before); - /*<>*/ pp_output_newline(state); - state[11] = 1; - /*<>*/ var - indent = (state[6] - width | 0) + offset | 0, - /*<>*/ real_indent = - /*<>*/ caml_call2(Stdlib_Int[10], state[8], indent); - state[10] = real_indent; - state[9] = state[6] - state[10] | 0; - var n = state[10]; - /*<>*/ /*<>*/ caml_call1 - (state[21], n); - /*<>*/ return format_string(state, after); - } - function break_line(state, width){ - /*<>*/ return break_new_line(state, _a_, width); - /*<>*/ } - function break_same_line(state, param){ - var after = param[3], width = param[2], before = param[1]; - /*<>*/ format_string(state, before); - state[9] = state[9] - width | 0; - /*<>*/ /*<>*/ caml_call1 - (state[20], width); - /*<>*/ return format_string(state, after); - } - function format_pp_token(state, size$0, param){ - /*<>*/ if(typeof param === "number") - switch(param){ - case 0: - /*<>*/ /*<>*/ var - match$3 = - /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$3) /*<>*/ return 0; - /*<>*/ var - tabs = match$3[1][1], - /*<>*/ add_tab = - function(n, ls){ - /*<>*/ if(! ls) /*<>*/ return [0, n, 0]; - var l = ls[2], x = ls[1]; - /*<>*/ return /*<>*/ runtime.caml_lessthan - (n, x) - ? [0, n, ls] - : [0, x, add_tab(n, l)]; - }; - tabs[1] = add_tab(state[6] - state[9] | 0, tabs[1]); - return 0; - case 1: - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[5], state[2]); - /*<>*/ return 0; - case 2: - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[5], state[3]); - /*<>*/ return 0; - case 3: - /*<>*/ /*<>*/ var - match$4 = - /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(! match$4) - /*<>*/ return pp_output_newline(state); - var width$0 = match$4[1][2]; - /*<>*/ return break_line(state, width$0); - case 4: - var _bO_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; - if(! _bO_) return _bO_; - /*<>*/ /*<>*/ var - match$1 = - /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); - if(! match$1) /*<>*/ return 0; - var match$2 = match$1[1], size = match$2[1], length = match$2[3]; - state[12] = state[12] - length | 0; - state[9] = state[9] + size | 0; - return 0; - default: - /*<>*/ /*<>*/ var - match$5 = - /*<>*/ caml_call1(Stdlib_Stack[5], state[5]); - if(! match$5) /*<>*/ return 0; - /*<>*/ var - tag_name = match$5[1], - /*<>*/ marker = - /*<>*/ caml_call1(state[25], tag_name); - /*<>*/ return pp_output_string(state, marker); - } - switch(param[0]){ - case 0: - var s = param[1]; - /*<>*/ return format_pp_text(state, size$0, s); - case 1: - /*<>*/ var - breaks = param[2], - fits = param[1], - /*<>*/ off = breaks[2], - before = breaks[1], - /*<>*/ match$6 = - /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(! match$6) /*<>*/ return 0; - var - match$7 = match$6[1], - width$1 = match$7[2], - box_type$0 = match$7[1]; - /*<>*/ switch(box_type$0){ - case 0: - /*<>*/ return break_same_line(state, fits); - case 1: - /*<>*/ return break_new_line - (state, breaks, width$1); - case 2: - /*<>*/ return break_new_line - (state, breaks, width$1); - case 3: - return state[9] < (size$0 + caml_ml_string_length(before) | 0) - ? break_new_line(state, breaks, width$1) - : break_same_line(state, fits); - case 4: - return state[11] - ? break_same_line(state, fits) - : state - [9] - < (size$0 + caml_ml_string_length(before) | 0) - ? break_new_line(state, breaks, width$1) - : ((state - [6] - - width$1 - | 0) - + off - | 0) - < state[10] - ? break_new_line(state, breaks, width$1) - : break_same_line(state, fits); - default: - /*<>*/ return break_same_line(state, fits); - } - case 2: - /*<>*/ var - off$0 = param[2], - n = param[1], - insertion_point = state[6] - state[9] | 0, - /*<>*/ match$8 = - /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); - if(! match$8) /*<>*/ return 0; - /*<>*/ var - tabs$0 = match$8[1][1], - /*<>*/ match$9 = tabs$0[1]; - if(match$9){ - var first = match$9[1], param$0 = tabs$0[1]; - /*<>*/ for(;;){ - if(param$0){ - var tail = param$0[2], head = param$0[1]; - if(insertion_point > head){var param$0 = tail; continue;} - var _bP_ = head; - } - else - var _bP_ = first; - var tab = _bP_; - break; - } - } - else - var tab = insertion_point; - var offset = tab - insertion_point | 0; - /*<>*/ return 0 <= offset - ? break_same_line(state, [0, cst$0, offset + n | 0, cst]) - : break_new_line - (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]); - case 3: - var - ty = param[2], - off$1 = param[1], - insertion_point$0 = state[6] - state[9] | 0; - if(state[8] < insertion_point$0){ - /*<>*/ /*<>*/ var - match = - /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); - if(match){ - var match$0 = match[1], width = match$0[2], box_type = match$0[1]; - if(state[9] < width && 3 >= box_type - 1 >>> 0) - /*<>*/ break_line(state, width); - } - else - /*<>*/ pp_output_newline(state); - } - /*<>*/ var - 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]); - case 4: - var tbox = param[1]; - /*<>*/ return /*<>*/ caml_call2 - (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]); - } - } - function advance_left(state){ - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(Stdlib_Queue[9], state[28]); - if(! match) /*<>*/ return 0; - /*<>*/ var - match$0 = match[1], - size = match$0[1], - length = match$0[3], - token = match$0[2], - pending_count = state[13] - state[12] | 0, - /*<>*/ _bM_ = 0 <= size ? 1 : 0, - /*<>*/ _bN_ = - _bM_ || (state[9] <= pending_count ? 1 : 0); - if(! _bN_) /*<>*/ return _bN_; - /*<>*/ /*<>*/ caml_call1 - (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; - } - /*<>*/ } - function enqueue_advance(state, tok){ - /*<>*/ pp_enqueue(state, tok); - /*<>*/ return advance_left(state); - /*<>*/ } - function enqueue_string_as(state, size, s){ - /*<>*/ return enqueue_advance - (state, [0, size, [0, s], size]); - /*<>*/ } - function initialize_scan_stack(stack){ - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], stack); - /*<>*/ /*<>*/ var - queue_elem = [0, unknown, _b_, 0]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Stack[3], [0, -1, queue_elem], stack); - /*<>*/ } - function set_size(state, ty){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(Stdlib_Stack[7], state[1]); - if(! match) /*<>*/ return 0; - /*<>*/ var - match$0 = match[1], - queue_elem = match$0[2], - left_total = match$0[1], - /*<>*/ size = queue_elem[1]; - if(left_total < state[12]) return initialize_scan_stack(state[1]); - var _bI_ = queue_elem[2]; - if(typeof _bI_ !== "number") - switch(_bI_[0]){ - case 3: - var - _bK_ = 1 - ty, - _bL_ = - _bK_ - ? (queue_elem - [1] - = state[13] + size | 0, - /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), - 0) - : _bK_; - /*<>*/ return _bL_; - case 1: - case 2: - var - _bJ_ = - ty - ? (queue_elem - [1] - = state[13] + size | 0, - /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), - 0) - : ty; - /*<>*/ return _bJ_; - } - /*<>*/ return 0; - /*<>*/ } - function scan_push(state, b, token){ - /*<>*/ pp_enqueue(state, token); - if(b) /*<>*/ set_size(state, 1); - /*<>*/ /*<>*/ var - elem = [0, state[13], token]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Stack[3], elem, state[1]); - /*<>*/ } - function pp_open_box_gen(state, indent, br_ty){ - /*<>*/ state[14] = state[14] + 1 | 0; - if(state[14] < state[15]){ - /*<>*/ var - size = - state[13] | 0, - /*<>*/ elem = [0, size, [3, indent, br_ty], 0]; - /*<>*/ return scan_push(state, 0, elem); - } - var _bH_ = state[14] === state[15] ? 1 : 0; - if(! _bH_) return _bH_; - var s = state[16]; - /*<>*/ return enqueue_string_as - (state, caml_ml_string_length(s), s); - /*<>*/ } - function pp_close_box(state, param){ - /*<>*/ var _bF_ = 1 < state[14] ? 1 : 0; - if(_bF_){ - 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 _bG_ = 0; - } - else - var _bG_ = _bF_; - return _bG_; - /*<>*/ } - function pp_open_stag(state, tag_name){ - /*<>*/ if(state[22]){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[3], tag_name, state[4]); - /*<>*/ /*<>*/ caml_call1 - (state[26], tag_name); - } - var _bE_ = state[23]; - if(! _bE_) return _bE_; - /*<>*/ /*<>*/ 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 _bC_ = state[22]; - if(_bC_){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(Stdlib_Stack[5], state[4]); - if(match){ - var tag_name = match[1]; - /*<>*/ return /*<>*/ caml_call1 - (state[27], tag_name); - } - var _bD_ = 0; - } - else - var _bD_ = _bC_; - /*<>*/ return _bD_; - /*<>*/ } - function pp_set_print_tags(state, b){ - /*<>*/ state[22] = b; - return 0; - /*<>*/ } - function pp_set_mark_tags(state, b){ - /*<>*/ state[23] = b; - return 0; - /*<>*/ } - function pp_get_print_tags(state, param){ - /*<>*/ return state[22]; - /*<>*/ } - function pp_get_mark_tags(state, param){ - /*<>*/ return state[23]; - /*<>*/ } - function pp_set_tags(state, b){ - /*<>*/ pp_set_print_tags(state, b); - /*<>*/ return pp_set_mark_tags(state, b); - /*<>*/ } - function pp_get_formatter_stag_function(state, param){ - /*<>*/ return [0, - state[24], - state[25], - state[26], - state[27]]; - /*<>*/ } - function pp_set_formatter_stag_function(state, param){ - var pct = param[4], pot = param[3], mct = param[2], mot = param[1]; - state[24] = mot; - state[25] = mct; - state[26] = pot; - state[27] = pct; - return 0; - } - function pp_rinit(state){ - /*<>*/ state[12] = 1; - state[13] = 1; - caml_call1(Stdlib_Queue[11], state[28]); - /*<>*/ initialize_scan_stack(state[1]); - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], state[2]); - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], state[3]); - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], state[4]); - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], 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, b){ - /*<>*/ var _bA_ = state[4]; - function _bB_(param){ - /*<>*/ return pp_close_stag(state, 0); - /*<>*/ } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[12], _bB_, _bA_); - /*<>*/ for(;;){ - if(1 >= state[14]){ - state[13] = pp_infinity; - /*<>*/ advance_left(state); - if(b) /*<>*/ pp_output_newline(state); - /*<>*/ return pp_rinit(state); - } - /*<>*/ pp_close_box(state, 0); - } - /*<>*/ } - function pp_print_as_size(state, size, s){ - /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; - return _bz_ ? enqueue_string_as(state, size, s) : _bz_; - /*<>*/ } - function pp_print_as(state, isize, s){ - /*<>*/ return pp_print_as_size(state, isize, s); - /*<>*/ } - function pp_print_string(state, s){ - /*<>*/ return pp_print_as - (state, caml_ml_string_length(s), s); - /*<>*/ } - function pp_print_bytes(state, s){ - /*<>*/ return pp_print_as - (state, - runtime.caml_ml_bytes_length(s), - /*<>*/ caml_call1(Stdlib_Bytes[6], s)); - /*<>*/ } - function pp_print_int(state, i){ - /*<>*/ return pp_print_string - (state, /*<>*/ caml_call1(Stdlib_Int[12], i)); - /*<>*/ } - function pp_print_float(state, f){ - /*<>*/ return pp_print_string - (state, /*<>*/ caml_call1(Stdlib[35], f)); - /*<>*/ } - function pp_print_bool(state, b){ - /*<>*/ return pp_print_string - (state, /*<>*/ caml_call1(Stdlib[30], b)); - /*<>*/ } - function pp_print_char(state, c){ - /*<>*/ return pp_print_as - (state, - 1, - /*<>*/ caml_call2(Stdlib_String[1], 1, c)); - /*<>*/ } - function pp_open_hbox(state, param){ - /*<>*/ return pp_open_box_gen(state, 0, 0); - /*<>*/ } - function pp_open_vbox(state, indent){ - /*<>*/ return pp_open_box_gen(state, indent, 1); - /*<>*/ } - function pp_open_hvbox(state, indent){ - /*<>*/ return pp_open_box_gen(state, indent, 2); - /*<>*/ } - function pp_open_hovbox(state, indent){ - /*<>*/ return pp_open_box_gen(state, indent, 3); - /*<>*/ } - function pp_open_box(state, indent){ - /*<>*/ return pp_open_box_gen(state, indent, 4); - /*<>*/ } - function pp_print_newline(state, param){ - /*<>*/ pp_flush_queue(state, 1); - /*<>*/ return /*<>*/ caml_call1 - (state[18], 0); - /*<>*/ } - function pp_print_flush(state, param){ - /*<>*/ pp_flush_queue(state, 0); - /*<>*/ return /*<>*/ caml_call1 - (state[18], 0); - /*<>*/ } - function pp_force_newline(state, param){ - /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; - return _by_ ? enqueue_advance(state, [0, zero, 3, 0]) : _by_; - /*<>*/ } - function pp_print_if_newline(state, param){ - /*<>*/ var _bx_ = state[14] < state[15] ? 1 : 0; - return _bx_ ? enqueue_advance(state, [0, zero, 4, 0]) : _bx_; - /*<>*/ } - function pp_print_custom_break(state, fits, breaks){ - /*<>*/ var - after = fits[3], - width = fits[2], - before = fits[1], - _bw_ = state[14] < state[15] ? 1 : 0; - if(! _bw_) return _bw_; - /*<>*/ var - size = - state[13] | 0, - /*<>*/ token = [1, fits, breaks], - length = - (caml_ml_string_length(before) + width | 0) - + /*<>*/ caml_ml_string_length(after) - | 0, - /*<>*/ elem = [0, size, token, length]; - /*<>*/ return scan_push(state, 1, elem); - /*<>*/ } - function pp_print_break(state, width, offset){ - /*<>*/ return pp_print_custom_break - (state, [0, cst$6, width, cst$5], [0, cst$4, offset, cst$3]); - /*<>*/ } - function pp_print_space(state, param){ - /*<>*/ return pp_print_break(state, 1, 0); - /*<>*/ } - function pp_print_cut(state, param){ - /*<>*/ return pp_print_break(state, 0, 0); - /*<>*/ } - function pp_open_tbox(state, param){ - /*<>*/ state[14] = state[14] + 1 | 0; - var _bv_ = state[14] < state[15] ? 1 : 0; - if(! _bv_) return _bv_; - /*<>*/ /*<>*/ var - elem = [0, zero, [4, [0, [0, 0]]], 0]; - /*<>*/ return enqueue_advance(state, elem); - /*<>*/ } - function pp_close_tbox(state, param){ - /*<>*/ var _bs_ = 1 < state[14] ? 1 : 0; - if(_bs_){ - var _bt_ = state[14] < state[15] ? 1 : 0; - if(_bt_){ - /*<>*/ /*<>*/ var - elem = [0, zero, 2, 0]; - /*<>*/ enqueue_advance(state, elem); - state[14] = state[14] - 1 | 0; - var _bu_ = 0; - } - else - var _bu_ = _bt_; - } - else - var _bu_ = _bs_; - return _bu_; - /*<>*/ } - function pp_print_tbreak(state, width, offset){ - /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; - if(! _br_) return _br_; - /*<>*/ var - size = - state[13] | 0, - /*<>*/ elem = [0, size, [2, width, offset], width]; - /*<>*/ return scan_push(state, 1, elem); - /*<>*/ } - function pp_print_tab(state, param){ - /*<>*/ return pp_print_tbreak(state, 0, 0); - /*<>*/ } - function pp_set_tab(state, param){ - /*<>*/ var _bq_ = state[14] < state[15] ? 1 : 0; - if(! _bq_) return _bq_; - /*<>*/ /*<>*/ var - elem = [0, zero, 0, 0]; - /*<>*/ return enqueue_advance(state, elem); - /*<>*/ } - function pp_set_max_boxes(state, n){ - /*<>*/ var - _bo_ = 1 < n ? 1 : 0, - _bp_ = _bo_ ? (state[15] = n, 0) : _bo_; - return _bp_; - /*<>*/ } - function pp_get_max_boxes(state, param){ - /*<>*/ return state[15]; - /*<>*/ } - function pp_over_max_boxes(state, param){ - /*<>*/ return state[14] === state[15] ? 1 : 0; - /*<>*/ } - function pp_set_ellipsis_text(state, s){ - /*<>*/ state[16] = s; - return 0; - /*<>*/ } - function pp_get_ellipsis_text(state, param){ - /*<>*/ return state[16]; - /*<>*/ } - function pp_limit(n){ - /*<>*/ return n < 1000000010 ? n : 1000000009; - /*<>*/ } - function pp_set_max_indent(state, n$0){ - /*<>*/ var _bn_ = 1 < n$0 ? 1 : 0; - if(! _bn_) return _bn_; - var n$1 = state[6] - n$0 | 0, _bm_ = 1 <= n$1 ? 1 : 0; - if(! _bm_) return _bm_; - /*<>*/ /*<>*/ var n = pp_limit(n$1); - state[7] = n; - state[8] = state[6] - state[7] | 0; - /*<>*/ return pp_rinit(state); - /*<>*/ } - function pp_get_max_indent(state, param){ - /*<>*/ return state[8]; - /*<>*/ } - function pp_set_margin(state, n){ - /*<>*/ var _bk_ = 1 <= n ? 1 : 0; - if(! _bk_) return _bk_; - /*<>*/ /*<>*/ var n$0 = pp_limit(n); - state[6] = n$0; - if(state[8] <= state[6]) - var new_max_indent = state[8]; - else - /*<>*/ var - /*<>*/ _bl_ = - /*<>*/ caml_call2 - (Stdlib_Int[11], state[6] - state[7] | 0, state[6] / 2 | 0), - new_max_indent = - /*<>*/ caml_call2(Stdlib_Int[11], _bl_, 1); - /*<>*/ return pp_set_max_indent(state, new_max_indent); - /*<>*/ } - function validate_geometry(param){ - var margin = param[2], max_indent = param[1]; - /*<>*/ return 2 <= max_indent - ? margin <= max_indent ? _c_ : _d_ - : _e_; - } - function check_geometry(geometry){ - /*<>*/ return 0 === validate_geometry(geometry)[0] - ? 1 - : 0; - /*<>*/ } - function pp_get_margin(state, param){ - /*<>*/ return state[6]; - /*<>*/ } - function pp_set_full_geometry(state, param){ - var margin = param[2], max_indent = param[1]; - /*<>*/ pp_set_margin(state, margin); - /*<>*/ pp_set_max_indent(state, max_indent); - /*<>*/ return 0; - } - function pp_set_geometry(state, max_indent, margin){ - /*<>*/ var - /*<>*/ geometry = [0, max_indent, margin], - /*<>*/ match = validate_geometry(geometry); - if(0 === match[0]) - /*<>*/ return pp_set_full_geometry(state, geometry); - /*<>*/ var - msg = match[1], - /*<>*/ _bj_ = - /*<>*/ caml_call2 - (Stdlib[28], cst_Format_pp_set_geometry, msg); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], _bj_], 1); - /*<>*/ } - function pp_safe_set_geometry(state, max_indent, margin){ - /*<>*/ /*<>*/ var - geometry = [0, max_indent, margin]; - return 0 === validate_geometry(geometry)[0] - ? pp_set_full_geometry(state, geometry) - : 0; - /*<>*/ } - function pp_get_geometry(state, param){ - /*<>*/ return [0, state[8], state[6]]; - /*<>*/ } - function pp_update_geometry(state, update){ - /*<>*/ /*<>*/ var - geometry = pp_get_geometry(state, 0); - /*<>*/ return pp_set_full_geometry - (state, /*<>*/ caml_call1(update, geometry)); - /*<>*/ } - function pp_set_formatter_out_functions(state, param){ - var j = param[5], i = param[4], h = param[3], g = param[2], f = param[1]; - state[17] = f; - state[18] = g; - state[19] = h; - state[20] = i; - state[21] = j; - return 0; - } - function pp_get_formatter_out_functions(state, param){ - /*<>*/ return [0, - state[17], - state[18], - state[19], - state[20], - state[21]]; - /*<>*/ } - function pp_set_formatter_output_functi(state, f, g){ - /*<>*/ state[17] = f; - state[18] = g; - return 0; - /*<>*/ } - function pp_get_formatter_output_functi(state, param){ - /*<>*/ return [0, state[17], state[18]]; - /*<>*/ } - function display_newline(state, param){ - /*<>*/ return /*<>*/ caml_call3 - (state[17], cst$7, 0, 1); - /*<>*/ } - /*<>*/ /*<>*/ var - blank_line = - /*<>*/ caml_call2(Stdlib_String[1], 80, 32); - function display_blanks(state, n){ - /*<>*/ var n$0 = n; - /*<>*/ for(;;){ - var _bi_ = 0 < n$0 ? 1 : 0; - if(! _bi_) return _bi_; - if(80 >= n$0) - /*<>*/ return /*<>*/ caml_call3 - (state[17], blank_line, 0, n$0); - /*<>*/ /*<>*/ caml_call3 - (state[17], blank_line, 0, 80); - /*<>*/ var - /*<>*/ n$1 = n$0 - 80 | 0, - n$0 = n$1; - } - /*<>*/ } - function pp_set_formatter_out_channel(state, oc){ - /*<>*/ state[17] = - /*<>*/ caml_call1(Stdlib[69], oc); - state[18] = - function(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[63], oc); - /*<>*/ }; - state[19] = - function(_bh_){ /*<>*/ return display_newline(state, _bh_);}; - state[20] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; - state[21] = function(_bf_){ /*<>*/ return display_blanks(state, _bf_);}; - return 0; - /*<>*/ } - function default_pp_mark_open_tag(param){ - /*<>*/ if(param[1] !== String_tag) - /*<>*/ return cst$10; - /*<>*/ var - s = param[2], - /*<>*/ _be_ = - /*<>*/ caml_call2(Stdlib[28], s, cst$8); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$9, _be_); - /*<>*/ } - function default_pp_mark_close_tag(param){ - /*<>*/ if(param[1] !== String_tag) - /*<>*/ return cst$13; - /*<>*/ var - s = param[2], - /*<>*/ _bd_ = - /*<>*/ caml_call2(Stdlib[28], s, cst$11); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$12, _bd_); - /*<>*/ } - function default_pp_print_open_tag(_bc_){ /*<>*/ return 0;} - function default_pp_print_close_tag(_bb_){ /*<>*/ return 0;} - function pp_make_formatter(f, g, h, i, j){ - /*<>*/ var - /*<>*/ pp_queue = - /*<>*/ caml_call1(Stdlib_Queue[2], 0), - /*<>*/ sys_tok = [0, unknown, _f_, 0]; - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Queue[3], sys_tok, pp_queue); - /*<>*/ /*<>*/ var - scan_stack = /*<>*/ caml_call1(Stdlib_Stack[2], 0); - /*<>*/ initialize_scan_stack(scan_stack); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[3], [0, 1, sys_tok], scan_stack); - /*<>*/ var - _a9_ = Stdlib[19], - /*<>*/ _a__ = - /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _a$_ = - /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _ba_ = - /*<>*/ caml_call1(Stdlib_Stack[2], 0); - /*<>*/ return [0, - scan_stack, - /*<>*/ caml_call1(Stdlib_Stack[2], 0), - _ba_, - _a$_, - _a__, - 78, - 10, - 68, - 78, - 0, - 1, - 1, - 1, - 1, - _a9_, - cst$14, - f, - g, - h, - i, - j, - 0, - 0, - default_pp_mark_open_tag, - default_pp_mark_close_tag, - default_pp_print_open_tag, - default_pp_print_close_tag, - pp_queue]; - } - function formatter_of_out_functions(out_funs){ - /*<>*/ return pp_make_formatter - (out_funs[1], out_funs[2], out_funs[3], out_funs[4], out_funs[5]); - /*<>*/ } - function make_formatter(output, flush){ - function _a1_(_a8_){ /*<>*/ return 0;} - function _a2_(_a7_){ /*<>*/ return 0;} - /*<>*/ /*<>*/ var - ppf = - pp_make_formatter - (output, flush, function(_a6_){ /*<>*/ return 0;}, _a2_, _a1_); - ppf[19] = function(_a5_){ /*<>*/ return display_newline(ppf, _a5_);}; - ppf[20] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; - ppf[21] = function(_a3_){ /*<>*/ return display_blanks(ppf, _a3_);}; - /*<>*/ return ppf; - /*<>*/ } - function formatter_of_out_channel(oc){ - function _a0_(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[63], oc); - /*<>*/ } - /*<>*/ return make_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _a0_); - /*<>*/ } - function formatter_of_buffer(b){ - /*<>*/ function _aY_(_aZ_){ /*<>*/ return 0;} - /*<>*/ return make_formatter - ( /*<>*/ caml_call1(Stdlib_Buffer[18], b), - _aY_); - /*<>*/ } - var pp_buffer_size = 512; - function pp_make_buffer(param){ - /*<>*/ return caml_call1 - (Stdlib_Buffer[1], pp_buffer_size); - /*<>*/ } - /*<>*/ var - /*<>*/ stdbuf = pp_make_buffer(0), - /*<>*/ std_formatter = - formatter_of_out_channel(Stdlib[39]), - /*<>*/ err_formatter = - 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); - function _g_(param){ - /*<>*/ return formatter_of_buffer - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], stdbuf_key)); - /*<>*/ } - /*<>*/ /*<>*/ var - str_formatter_key = - /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _g_); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Domain[10][3], str_formatter_key, str_formatter); - /*<>*/ function buffered_out_string(key, str, ofs, len){ - /*<>*/ /*<>*/ var - _aX_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); - /*<>*/ return /*<>*/ caml_call4 - (Stdlib_Buffer[18], _aX_, 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); - /*<>*/ } - function _h_(param){ - /*<>*/ return caml_call1 - (Stdlib_Buffer[1], pp_buffer_size); - /*<>*/ } - /*<>*/ /*<>*/ var - std_buf_key = - /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _h_); - function _i_(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Buffer[1], pp_buffer_size); - /*<>*/ } - /*<>*/ /*<>*/ var - err_buf_key = - /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _i_); - function _j_(param){ - function _aG_(_aW_){ /*<>*/ return 0;} - function _aH_(_aV_){ /*<>*/ return 0;} - function _aI_(_aU_){ /*<>*/ return 0;} - var _aJ_ = Stdlib[39]; - /*<>*/ function _aK_(_aT_){ - /*<>*/ return buffered_out_flush(_aJ_, std_buf_key, _aT_); - } - /*<>*/ /*<>*/ var - ppf = - pp_make_formatter - (function(_aQ_, _aR_, _aS_){ - /*<>*/ return buffered_out_string(std_buf_key, _aQ_, _aR_, _aS_); - }, - _aK_, - _aI_, - _aH_, - _aG_); - ppf[19] = function(_aP_){ /*<>*/ return display_newline(ppf, _aP_);}; - ppf[20] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; - ppf[21] = function(_aN_){ /*<>*/ return display_blanks(ppf, _aN_);}; - /*<>*/ function _aL_(_aM_){ - /*<>*/ return pp_print_flush(ppf, _aM_); - } - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _aL_); - /*<>*/ return ppf; - /*<>*/ } - /*<>*/ /*<>*/ var - std_formatter_key = - /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _j_); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Domain[10][3], std_formatter_key, std_formatter); - function _k_(param){ - function _ap_(_aF_){ /*<>*/ return 0;} - function _aq_(_aE_){ /*<>*/ return 0;} - function _ar_(_aD_){ /*<>*/ return 0;} - var _as_ = Stdlib[40]; - /*<>*/ function _at_(_aC_){ - /*<>*/ return buffered_out_flush(_as_, err_buf_key, _aC_); - } - /*<>*/ /*<>*/ var - ppf = - pp_make_formatter - (function(_az_, _aA_, _aB_){ - /*<>*/ return buffered_out_string(err_buf_key, _az_, _aA_, _aB_); - }, - _at_, - _ar_, - _aq_, - _ap_); - ppf[19] = function(_ay_){ /*<>*/ return display_newline(ppf, _ay_);}; - ppf[20] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; - ppf[21] = function(_aw_){ /*<>*/ return display_blanks(ppf, _aw_);}; - /*<>*/ function _au_(_av_){ - /*<>*/ return pp_print_flush(ppf, _av_); - } - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _au_); - /*<>*/ return ppf; - /*<>*/ } - /*<>*/ /*<>*/ var - err_formatter_key = - /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _k_); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Domain[10][3], err_formatter_key, err_formatter); - function get_std_formatter(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key); - /*<>*/ } - function get_err_formatter(param){ - /*<>*/ return caml_call1 - (Stdlib_Domain[10][2], err_formatter_key); - /*<>*/ } - function get_str_formatter(param){ - /*<>*/ return caml_call1 - (Stdlib_Domain[10][2], str_formatter_key); - /*<>*/ } - function get_stdbuf(param){ - /*<>*/ return caml_call1 - (Stdlib_Domain[10][2], stdbuf_key); - /*<>*/ } - 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); - /*<>*/ return s; - /*<>*/ } - function flush_str_formatter(param){ - /*<>*/ var - /*<>*/ stdbuf = - /*<>*/ caml_call1(Stdlib_Domain[10][2], stdbuf_key), - /*<>*/ str_formatter = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], str_formatter_key); - /*<>*/ return flush_buffer_formatter - (stdbuf, str_formatter); - /*<>*/ } - function make_synchronized_formatter(output, flush){ - function _an_(param){ - /*<>*/ var - /*<>*/ buf = - /*<>*/ caml_call1 - (Stdlib_Buffer[1], pp_buffer_size), - /*<>*/ output$0 = - /*<>*/ caml_call1(Stdlib_Buffer[18], buf); - function flush$0(param){ - /*<>*/ /*<>*/ var - _ao_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); - /*<>*/ /*<>*/ caml_call3 - (output, - /*<>*/ caml_call1(Stdlib_Buffer[2], buf), - 0, - _ao_); - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Buffer[8], buf); - /*<>*/ return /*<>*/ caml_call1 - (flush, 0); - /*<>*/ } - /*<>*/ return make_formatter(output$0, flush$0); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, _an_); - /*<>*/ } - function synchronized_formatter_of_out_(oc){ - function _am_(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[63], oc); - /*<>*/ } - /*<>*/ return make_synchronized_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _am_); - /*<>*/ } - function make_symbolic_output_buffer(param){ /*<>*/ return [0, 0]; - /*<>*/ } - function clear_symbolic_output_buffer(sob){ - /*<>*/ sob[1] = 0; - return 0; - /*<>*/ } - function get_symbolic_output_buffer(sob){ - /*<>*/ return caml_call1(Stdlib_List[9], sob[1]); - /*<>*/ } - function flush_symbolic_output_buffer(sob){ - /*<>*/ /*<>*/ var - items = get_symbolic_output_buffer(sob); - /*<>*/ clear_symbolic_output_buffer(sob); - /*<>*/ return items; - /*<>*/ } - function add_symbolic_output_item(sob, item){ - /*<>*/ sob[1] = [0, item, sob[1]]; - return 0; - /*<>*/ } - function formatter_of_symbolic_output_b(sob){ - /*<>*/ function f(s, i, n){ - /*<>*/ return add_symbolic_output_item - (sob, - [0, - /*<>*/ caml_call3 - (Stdlib_String[15], s, i, n)]); - } - /*<>*/ function g(_al_){ - /*<>*/ return add_symbolic_output_item(sob, 0); - } - /*<>*/ function h(_ak_){ - /*<>*/ return add_symbolic_output_item(sob, 1); - } - /*<>*/ function i(n){ - /*<>*/ return add_symbolic_output_item(sob, [1, n]); - } - /*<>*/ function j(n){ - /*<>*/ return add_symbolic_output_item(sob, [2, n]); - } - /*<>*/ return pp_make_formatter(f, g, h, i, j); - /*<>*/ } - function open_hbox(v){ - /*<>*/ return pp_open_hbox - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function open_hvbox(v){ - /*<>*/ return pp_open_hvbox - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function open_box(v){ - /*<>*/ return pp_open_box - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function open_stag(v){ - /*<>*/ return pp_open_stag - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function print_as(v, w){ - /*<>*/ return pp_print_as - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), - v, - w); - /*<>*/ } - function print_string(v){ - /*<>*/ return pp_print_string - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function print_int(v){ - /*<>*/ return pp_print_int - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function print_char(v){ - /*<>*/ return pp_print_char - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function print_break(v, w){ - /*<>*/ return pp_print_break - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function print_space(v){ - /*<>*/ return pp_print_space - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function print_flush(v){ - /*<>*/ return pp_print_flush - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function print_if_newline(v){ - /*<>*/ return pp_print_if_newline - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function close_tbox(v){ - /*<>*/ return pp_close_tbox - ( /*<>*/ caml_call1 - (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), - v, - w); - /*<>*/ } - function set_tab(v){ - /*<>*/ return pp_set_tab - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function set_margin(v){ - /*<>*/ return pp_set_margin - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), - v); - /*<>*/ } - function get_margin(v){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key) - [6]; - /*<>*/ } - function set_max_indent(v){ - /*<>*/ return pp_set_max_indent - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), - v); - /*<>*/ } - function get_max_indent(v){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key) - [8]; - /*<>*/ } - function set_geometry(max_indent, margin){ - /*<>*/ return pp_set_geometry - ( /*<>*/ caml_call1 - (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), - max_indent, - margin); - /*<>*/ } - function get_geometry(v){ - /*<>*/ return pp_get_geometry - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function set_max_boxes(v){ - /*<>*/ return pp_set_max_boxes - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), - v); - /*<>*/ } - function get_max_boxes(v){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key) - [15]; - /*<>*/ } - function over_max_boxes(v){ - /*<>*/ return pp_over_max_boxes - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function get_ellipsis_text(v){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key) - [16]; - /*<>*/ } - function set_formatter_out_channel(v){ - /*<>*/ return pp_set_formatter_out_channel - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function get_formatter_out_functions(v){ - /*<>*/ return pp_get_formatter_out_functions - ( /*<>*/ caml_call1 - (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), - v, - w); - /*<>*/ } - function get_formatter_output_functions(v){ - /*<>*/ return pp_get_formatter_output_functi - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function get_formatter_stag_functions(v){ - /*<>*/ return pp_get_formatter_stag_function - ( /*<>*/ caml_call1 - (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), - v); - /*<>*/ } - function get_print_tags(v){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key) - [22]; - /*<>*/ } - function set_mark_tags(v){ - /*<>*/ return pp_set_mark_tags - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), - v); - /*<>*/ } - function get_mark_tags(v){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key) - [23]; - /*<>*/ } - function set_tags(v){ - /*<>*/ return pp_set_tags - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), - v); - /*<>*/ } - function pp_print_list(opt, pp_v, ppf, param){ - var opt$0 = opt, param$0 = param; - for(;;){ - /*<>*/ if(opt$0) - var sth = opt$0[1], pp_sep = sth; - else - var pp_sep = pp_print_cut; - /*<>*/ if(! param$0) - /*<>*/ return 0; - var v = param$0[1]; - if(! param$0[2]) - /*<>*/ return /*<>*/ caml_call2 - (pp_v, ppf, v); - var vs = param$0[2]; - /*<>*/ /*<>*/ caml_call2 - (pp_v, ppf, v); - /*<>*/ /*<>*/ caml_call2 - (pp_sep, ppf, 0); - /*<>*/ var - /*<>*/ opt$1 = [0, pp_sep], - opt$0 = opt$1, - param$0 = vs; - } - } - function pp_print_seq(opt, pp_v, ppf, seq$1){ - /*<>*/ if(opt) - var sth = opt[1], pp_sep = sth; - else - var pp_sep = pp_print_cut; - /*<>*/ /*<>*/ var - match$0 = /*<>*/ caml_call1(seq$1, 0); - if(! match$0) /*<>*/ return 0; - var seq$2 = match$0[2], v$0 = match$0[1]; - /*<>*/ /*<>*/ caml_call2 - (pp_v, ppf, v$0); - var seq = seq$2; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq, 0); - if(! match) /*<>*/ return 0; - var seq$0 = match[2], v = match[1]; - /*<>*/ /*<>*/ caml_call2 - (pp_sep, ppf, 0); - /*<>*/ /*<>*/ caml_call2 - (pp_v, ppf, v); - var seq = seq$0; - } - /*<>*/ } - function pp_print_text(ppf, s){ - /*<>*/ var - len = caml_ml_string_length(s), - /*<>*/ left = [0, 0], - /*<>*/ right = [0, 0]; - function flush(param){ - /*<>*/ pp_print_string - (ppf, - /*<>*/ caml_call3 - (Stdlib_String[15], s, left[1], right[1] - left[1] | 0)); - right[1]++; - left[1] = right[1]; - return 0; - /*<>*/ } - for(;;){ - if(right[1] === len){ - var _aj_ = left[1] !== len ? 1 : 0; - return _aj_ ? flush(0) : _aj_; - } - /*<>*/ /*<>*/ var - match = /*<>*/ runtime.caml_string_get(s, right[1]); - if(10 === match){ - /*<>*/ flush(0); - /*<>*/ pp_force_newline(ppf, 0); - } - else if(32 === match){ - /*<>*/ flush(0); - /*<>*/ pp_print_space(ppf, 0); - } - else - right[1]++; - } - /*<>*/ } - function pp_print_option(opt, pp_v, ppf, param){ - /*<>*/ if(opt) - var sth = opt[1], none = sth; - else - var - none = - function(param, _ai_){ - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ if(! param) - /*<>*/ return /*<>*/ caml_call2 - (none, ppf, 0); - var v = param[1]; - /*<>*/ return /*<>*/ caml_call2 - (pp_v, ppf, v); - } - function pp_print_result(ok, error, ppf, param){ - /*<>*/ if(0 === param[0]){ - var v = param[1]; - /*<>*/ return /*<>*/ caml_call2 - (ok, ppf, v); - } - var e = param[1]; - /*<>*/ return /*<>*/ caml_call2 - (error, ppf, e); - } - function pp_print_either(left, right, ppf, param){ - /*<>*/ if(0 === param[0]){ - var l = param[1]; - /*<>*/ return /*<>*/ caml_call2 - (left, ppf, l); - } - var r = param[1]; - /*<>*/ return /*<>*/ caml_call2 - (right, ppf, r); - } - function compute_tag(output, tag_acc){ - /*<>*/ var - /*<>*/ buf = - /*<>*/ caml_call1(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); - /*<>*/ return 2 <= len - ? /*<>*/ caml_call3 - (Stdlib_Buffer[4], buf, 1, len - 2 | 0) - : /*<>*/ caml_call1(Stdlib_Buffer[2], buf); - /*<>*/ } - function output_formatting_lit(ppf, fmting_lit){ - /*<>*/ if(typeof fmting_lit === "number") - switch(fmting_lit){ - case 0: - /*<>*/ return pp_close_box(ppf, 0); - case 1: - /*<>*/ return pp_close_stag(ppf, 0); - case 2: - /*<>*/ return pp_print_flush(ppf, 0); - case 3: - /*<>*/ return pp_force_newline(ppf, 0); - case 4: - /*<>*/ return pp_print_newline(ppf, 0); - case 5: - /*<>*/ return pp_print_char(ppf, 64); - default: /*<>*/ return pp_print_char(ppf, 37); - } - switch(fmting_lit[0]){ - case 0: - var offset = fmting_lit[3], width = fmting_lit[2]; - /*<>*/ return pp_print_break(ppf, width, offset); - case 1: - /*<>*/ return 0; - default: - var c = fmting_lit[1]; - /*<>*/ pp_print_char(ppf, 64); - /*<>*/ return pp_print_char(ppf, c); - } - /*<>*/ } - function output_acc(ppf, acc){ - /*<>*/ if(typeof acc === "number") - /*<>*/ return 0; - a: - { - b: - { - c: - { - switch(acc[0]){ - case 0: - var f = acc[2], p = acc[1]; - /*<>*/ output_acc(ppf, p); - /*<>*/ return output_formatting_lit(ppf, f); - case 1: - var match = acc[2], p$0 = acc[1]; - if(0 === match[0]){ - var acc$0 = match[1]; - /*<>*/ output_acc(ppf, p$0); - /*<>*/ return pp_open_stag - (ppf, [0, String_tag, compute_tag(output_acc, acc$0)]); - } - var acc$1 = match[1]; - /*<>*/ output_acc(ppf, p$0); - /*<>*/ var - /*<>*/ _$_ = compute_tag(output_acc, acc$1), - /*<>*/ match$0 = - /*<>*/ caml_call1 - (CamlinternalFormat[20], _$_), - bty = match$0[2], - indent = match$0[1]; - /*<>*/ return pp_open_box_gen(ppf, indent, bty); - case 2: - var _aa_ = acc[1]; - if(typeof _aa_ !== "number" && 0 === _aa_[0]){ - var _ab_ = _aa_[2]; - if(typeof _ab_ !== "number" && 1 === _ab_[0]){ - var s$0 = acc[2], size = _ab_[2], p$2 = _aa_[1]; - break b; - } - } - var s = acc[2], p$1 = _aa_; - break a; - case 3: - var _ac_ = acc[1]; - if(typeof _ac_ !== "number" && 0 === _ac_[0]){ - var _ad_ = _ac_[2]; - if(typeof _ad_ !== "number" && 1 === _ad_[0]){ - var c$0 = acc[2], size$0 = _ad_[2], p$4 = _ac_[1]; - break; - } - } - var c = acc[2], p$3 = _ac_; - break c; - case 4: - var _ae_ = acc[1]; - if(typeof _ae_ !== "number" && 0 === _ae_[0]){ - var _af_ = _ae_[2]; - if(typeof _af_ !== "number" && 1 === _af_[0]){ - var s$0 = acc[2], size = _af_[2], p$2 = _ae_[1]; - break b; - } - } - var s = acc[2], p$1 = _ae_; - break a; - case 5: - var _ag_ = acc[1]; - if(typeof _ag_ !== "number" && 0 === _ag_[0]){ - var _ah_ = _ag_[2]; - if(typeof _ah_ !== "number" && 1 === _ah_[0]){ - var c$0 = acc[2], size$0 = _ah_[2], p$4 = _ag_[1]; - break; - } - } - var c = acc[2], p$3 = _ag_; - break c; - case 6: - var f$0 = acc[2], p$5 = acc[1]; - /*<>*/ output_acc(ppf, p$5); - /*<>*/ return /*<>*/ caml_call1 - (f$0, ppf); - case 7: - var p$6 = acc[1]; - /*<>*/ output_acc(ppf, p$6); - /*<>*/ return pp_print_flush(ppf, 0); - default: - var msg = acc[2], p$7 = acc[1]; - /*<>*/ output_acc(ppf, p$7); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], msg); - } - /*<>*/ output_acc(ppf, p$4); - /*<>*/ return pp_print_as_size - (ppf, - size$0, - /*<>*/ caml_call2 - (Stdlib_String[1], 1, c$0)); - } - /*<>*/ output_acc(ppf, p$3); - /*<>*/ return pp_print_char(ppf, c); - } - /*<>*/ output_acc(ppf, p$2); - /*<>*/ return pp_print_as_size(ppf, size, s$0); - } - /*<>*/ output_acc(ppf, p$1); - /*<>*/ return pp_print_string(ppf, s); - /*<>*/ } - function strput_acc(ppf, acc){ - /*<>*/ if(typeof acc === "number") - /*<>*/ return 0; - a: - { - b: - { - c: - { - switch(acc[0]){ - case 0: - var f = acc[2], p = acc[1]; - /*<>*/ strput_acc(ppf, p); - /*<>*/ return output_formatting_lit(ppf, f); - case 1: - var match = acc[2], p$0 = acc[1]; - if(0 === match[0]){ - var acc$0 = match[1]; - /*<>*/ strput_acc(ppf, p$0); - /*<>*/ return pp_open_stag - (ppf, [0, String_tag, compute_tag(strput_acc, acc$0)]); - } - var acc$1 = match[1]; - /*<>*/ strput_acc(ppf, p$0); - /*<>*/ var - /*<>*/ _S_ = compute_tag(strput_acc, acc$1), - /*<>*/ match$0 = - /*<>*/ caml_call1 - (CamlinternalFormat[20], _S_), - bty = match$0[2], - indent = match$0[1]; - /*<>*/ return pp_open_box_gen(ppf, indent, bty); - case 2: - var _T_ = acc[1]; - if(typeof _T_ !== "number" && 0 === _T_[0]){ - var _U_ = _T_[2]; - if(typeof _U_ !== "number" && 1 === _U_[0]){ - var s$0 = acc[2], size = _U_[2], p$2 = _T_[1]; - break b; - } - } - var s = acc[2], p$1 = _T_; - break a; - case 3: - var _V_ = acc[1]; - if(typeof _V_ !== "number" && 0 === _V_[0]){ - var _W_ = _V_[2]; - if(typeof _W_ !== "number" && 1 === _W_[0]){ - var c$0 = acc[2], size$0 = _W_[2], p$4 = _V_[1]; - break; - } - } - var c = acc[2], p$3 = _V_; - break c; - case 4: - var _X_ = acc[1]; - if(typeof _X_ !== "number" && 0 === _X_[0]){ - var _Y_ = _X_[2]; - if(typeof _Y_ !== "number" && 1 === _Y_[0]){ - var s$0 = acc[2], size = _Y_[2], p$2 = _X_[1]; - break b; - } - } - var s = acc[2], p$1 = _X_; - break a; - case 5: - var _Z_ = acc[1]; - if(typeof _Z_ !== "number" && 0 === _Z_[0]){ - var ___ = _Z_[2]; - if(typeof ___ !== "number" && 1 === ___[0]){ - var c$0 = acc[2], size$0 = ___[2], p$4 = _Z_[1]; - break; - } - } - var c = acc[2], p$3 = _Z_; - break c; - case 6: - var p$5 = acc[1]; - if(typeof p$5 !== "number" && 0 === p$5[0]){ - var match$1 = p$5[2]; - if(typeof match$1 !== "number" && 1 === match$1[0]){ - var f$1 = acc[2], size$1 = match$1[2], p$6 = p$5[1]; - /*<>*/ strput_acc(ppf, p$6); - /*<>*/ return pp_print_as_size - (ppf, size$1, /*<>*/ caml_call1(f$1, 0)); - } - } - var f$0 = acc[2]; - /*<>*/ strput_acc(ppf, p$5); - /*<>*/ return pp_print_string - (ppf, /*<>*/ caml_call1(f$0, 0)); - case 7: - var p$7 = acc[1]; - /*<>*/ strput_acc(ppf, p$7); - /*<>*/ return pp_print_flush(ppf, 0); - default: - var msg = acc[2], p$8 = acc[1]; - /*<>*/ strput_acc(ppf, p$8); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], msg); - } - /*<>*/ strput_acc(ppf, p$4); - /*<>*/ return pp_print_as_size - (ppf, - size$0, - /*<>*/ caml_call2 - (Stdlib_String[1], 1, c$0)); - } - /*<>*/ strput_acc(ppf, p$3); - /*<>*/ return pp_print_char(ppf, c); - } - /*<>*/ strput_acc(ppf, p$2); - /*<>*/ return pp_print_as_size(ppf, size, s$0); - } - /*<>*/ strput_acc(ppf, p$1); - /*<>*/ return pp_print_string(ppf, s); - /*<>*/ } - function kfprintf(k, ppf, param){ - /*<>*/ var - fmt = param[1], - /*<>*/ _Q_ = 0; - function _R_(acc){ - /*<>*/ output_acc(ppf, acc); - return caml_call1(k, ppf); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _R_, _Q_, fmt); - } - function ikfprintf(k, ppf, param){ - var fmt = param[1]; - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[8], k, ppf, fmt); - } - function ifprintf(ppf, param){ - /*<>*/ var - fmt = param[1], - /*<>*/ _N_ = 0; - function _O_(_P_){ /*<>*/ return 0;} - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[8], _O_, _N_, fmt); - } - function fprintf(ppf){ - function _K_(_M_){ /*<>*/ return 0;} - /*<>*/ return function(_L_){ - /*<>*/ return kfprintf(_K_, ppf, _L_);}; - /*<>*/ } - function printf(param){ - /*<>*/ var - fmt = param[1], - /*<>*/ _I_ = 0; - function _J_(acc){ - /*<>*/ return output_acc - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), - acc); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _J_, _I_, fmt); - } - function eprintf(param){ - /*<>*/ var - fmt = param[1], - /*<>*/ _G_ = 0; - function _H_(acc){ - /*<>*/ return output_acc - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], err_formatter_key), - acc); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _H_, _G_, fmt); - } - function kdprintf(k, param){ - /*<>*/ var - fmt = param[1], - /*<>*/ _E_ = 0; - function _F_(acc){ - /*<>*/ return /*<>*/ caml_call1 - (k, - function(ppf){ - /*<>*/ return output_acc(ppf, acc); - /*<>*/ }); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _F_, _E_, fmt); - } - function dprintf(fmt){ - /*<>*/ return kdprintf - (function(i){ - /*<>*/ return i; - /*<>*/ }, - fmt); - /*<>*/ } - function ksprintf(k, param){ - /*<>*/ var - fmt = param[1], - /*<>*/ b = pp_make_buffer(0), - /*<>*/ ppf = formatter_of_buffer(b); - function k$0(acc){ - /*<>*/ strput_acc(ppf, acc); - /*<>*/ return /*<>*/ caml_call1 - (k, flush_buffer_formatter(b, ppf)); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], k$0, 0, fmt); - } - function sprintf(fmt){ - /*<>*/ return ksprintf(id, fmt); - /*<>*/ } - function kasprintf(k, param){ - /*<>*/ var - fmt = param[1], - /*<>*/ b = pp_make_buffer(0), - /*<>*/ ppf = formatter_of_buffer(b); - function k$0(acc){ - /*<>*/ output_acc(ppf, acc); - /*<>*/ return /*<>*/ caml_call1 - (k, flush_buffer_formatter(b, ppf)); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], k$0, 0, fmt); - } - function asprintf(fmt){ - /*<>*/ return kasprintf(id, fmt); - /*<>*/ } - function flush_standard_formatters(param){ - /*<>*/ pp_print_flush - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], std_formatter_key), - 0); - /*<>*/ return pp_print_flush - ( /*<>*/ caml_call1 - (Stdlib_Domain[10][2], err_formatter_key), - 0); - /*<>*/ } - /*<>*/ /*<>*/ caml_call1 - (Stdlib[100], flush_standard_formatters); - function _l_(param){ - /*<>*/ flush_standard_formatters(0); - /*<>*/ var - /*<>*/ fs = - pp_get_formatter_out_functions(std_formatter, 0), - _m_ = fs[5], - _n_ = fs[4], - _o_ = fs[3], - _p_ = Stdlib[39]; - /*<>*/ function _q_(_D_){ - /*<>*/ return buffered_out_flush(_p_, std_buf_key, _D_); - } - /*<>*/ pp_set_formatter_out_functions - (std_formatter, - [0, - function(_A_, _B_, _C_){ - /*<>*/ return buffered_out_string(std_buf_key, _A_, _B_, _C_); - }, - _q_, - _o_, - _n_, - _m_]); - /*<>*/ var - /*<>*/ fs$0 = - pp_get_formatter_out_functions(err_formatter, 0), - _r_ = fs$0[5], - _s_ = fs$0[4], - _t_ = fs$0[3], - _u_ = Stdlib[40]; - /*<>*/ function _v_(_z_){ - /*<>*/ return buffered_out_flush(_u_, err_buf_key, _z_); - } - /*<>*/ return pp_set_formatter_out_functions - (err_formatter, - [0, - function(_w_, _x_, _y_){ - /*<>*/ return buffered_out_string - (err_buf_key, _w_, _x_, _y_); - }, - _v_, - _t_, - _s_, - _r_]); - /*<>*/ } - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[5], _l_); - var - Stdlib_Format = - [0, - pp_open_box, - open_box, - pp_close_box, - close_box, - pp_open_hbox, - open_hbox, - pp_open_vbox, - open_vbox, - pp_open_hvbox, - open_hvbox, - pp_open_hovbox, - open_hovbox, - pp_print_string, - print_string, - pp_print_bytes, - print_bytes, - pp_print_as, - print_as, - pp_print_int, - print_int, - pp_print_float, - print_float, - pp_print_char, - print_char, - pp_print_bool, - print_bool, - pp_print_space, - print_space, - pp_print_cut, - print_cut, - pp_print_break, - print_break, - pp_print_custom_break, - pp_force_newline, - force_newline, - pp_print_if_newline, - print_if_newline, - pp_print_flush, - print_flush, - pp_print_newline, - print_newline, - pp_set_margin, - set_margin, - pp_get_margin, - get_margin, - pp_set_max_indent, - set_max_indent, - pp_get_max_indent, - get_max_indent, - check_geometry, - pp_set_geometry, - set_geometry, - pp_safe_set_geometry, - safe_set_geometry, - pp_update_geometry, - update_geometry, - pp_get_geometry, - get_geometry, - pp_set_max_boxes, - set_max_boxes, - pp_get_max_boxes, - get_max_boxes, - pp_over_max_boxes, - over_max_boxes, - pp_open_tbox, - open_tbox, - pp_close_tbox, - close_tbox, - pp_set_tab, - set_tab, - pp_print_tab, - print_tab, - pp_print_tbreak, - print_tbreak, - pp_set_ellipsis_text, - set_ellipsis_text, - pp_get_ellipsis_text, - get_ellipsis_text, - String_tag, - pp_open_stag, - open_stag, - pp_close_stag, - close_stag, - pp_set_tags, - set_tags, - pp_set_print_tags, - set_print_tags, - pp_set_mark_tags, - set_mark_tags, - pp_get_print_tags, - get_print_tags, - pp_get_mark_tags, - get_mark_tags, - pp_set_formatter_out_channel, - set_formatter_out_channel, - pp_set_formatter_output_functi, - set_formatter_output_functions, - pp_get_formatter_output_functi, - get_formatter_output_functions, - pp_set_formatter_out_functions, - set_formatter_out_functions, - pp_get_formatter_out_functions, - get_formatter_out_functions, - pp_set_formatter_stag_function, - set_formatter_stag_functions, - pp_get_formatter_stag_function, - get_formatter_stag_functions, - formatter_of_out_channel, - synchronized_formatter_of_out_, - std_formatter, - get_std_formatter, - err_formatter, - get_err_formatter, - formatter_of_buffer, - stdbuf, - get_stdbuf, - str_formatter, - get_str_formatter, - flush_str_formatter, - make_formatter, - make_synchronized_formatter, - formatter_of_out_functions, - make_symbolic_output_buffer, - clear_symbolic_output_buffer, - get_symbolic_output_buffer, - flush_symbolic_output_buffer, - add_symbolic_output_item, - formatter_of_symbolic_output_b, - pp_print_list, - pp_print_seq, - pp_print_text, - pp_print_option, - pp_print_result, - pp_print_either, - fprintf, - printf, - eprintf, - sprintf, - asprintf, - dprintf, - ifprintf, - kfprintf, - kdprintf, - ikfprintf, - ksprintf, - kasprintf]; - runtime.caml_register_global(35, Stdlib_Format, "Stdlib__Format"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Scanf -//# unitInfo: Requires: Assert_failure, CamlinternalFormat, CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Int, Stdlib__Printf, Stdlib__String -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst$5 = '"', - cst$6 = "-", - cst_character = "character ", - cst_scanf_ml = "scanf.ml", - cst_scanf_bad_conversion$3 = 'scanf: bad conversion "%*"', - cst_scanning_of = "scanning of ", - caml_bytes_get = runtime.caml_bytes_get, - caml_int_of_string = runtime.caml_int_of_string, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_string_length = runtime.caml_ml_string_length, - caml_string_get = runtime.caml_string_get, - caml_string_notequal = runtime.caml_string_notequal, - 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) - : 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(), - cst$3 = cst$5, - cst$4 = cst$5, - cst$1 = cst$5, - cst$2 = cst$5, - cst$0 = cst$5, - cst = cst$6, - CamlinternalFormat = global_data.CamlinternalFormat, - CamlinternalFormatBasics = global_data.CamlinternalFormatBasics, - Stdlib_String = global_data.Stdlib__String, - Stdlib = global_data.Stdlib, - Assert_failure = global_data.Assert_failure, - Stdlib_Printf = global_data.Stdlib__Printf, - Stdlib_Int = global_data.Stdlib__Int, - Stdlib_Buffer = global_data.Stdlib__Buffer, - _r_ = [0, 91], - _q_ = [0, 123], - cst_end_of_input_not_found = "end of input not found", - cst_scanf_bad_conversion_a = 'scanf: bad conversion "%a"', - cst_scanf_bad_conversion_t = 'scanf: bad conversion "%t"', - cst_scanf_missing_reader = "scanf: missing reader", - _s_ = [0, cst_scanf_ml, 1414, 13], - cst_scanf_bad_conversion_custo = - 'scanf: bad conversion "%?" (custom converter)', - cst_scanf_bad_conversion = cst_scanf_bad_conversion$3, - cst_scanf_bad_conversion$0 = cst_scanf_bad_conversion$3, - cst_scanf_bad_conversion$1 = 'scanf: bad conversion "%-"', - cst_scanf_bad_conversion$2 = cst_scanf_bad_conversion$3, - _t_ = [0, [3, 0, [10, 0]], "%S%!"], - cst_in_format = ' in format "', - _p_ = [0, 37, ""], - _o_ = - [0, - [11, - "scanf: bad input at char number ", - [4, 3, 0, 0, [11, ": ", [2, 0, 0]]]], - "scanf: bad input at char number %i: %s"], - _n_ = - [0, - [11, "the character ", [1, [11, " cannot start a boolean", 0]]], - "the character %C cannot start a boolean"], - _m_ = - [0, - [11, "bad character hexadecimal encoding \\", [0, [0, 0]]], - "bad character hexadecimal encoding \\%c%c"], - _l_ = - [0, - [11, "bad character decimal encoding \\", [0, [0, [0, 0]]]], - "bad character decimal encoding \\%c%c%c"], - cst_an = "an", - cst_x = "x", - cst_nfinity = "nfinity", - cst_digits = "digits", - _k_ = - [0, - [11, - cst_character, - [1, [11, " is not a valid ", [2, 0, [11, " digit", 0]]]]], - "character %C is not a valid %s digit"], - cst_decimal_digits = "decimal digits", - _j_ = - [0, - [11, cst_character, [1, [11, " is not a decimal digit", 0]]], - "character %C is not a decimal digit"], - cst_0b = "0b", - cst_0o = "0o", - cst_0u = "0u", - cst_0x = "0x", - _i_ = [0, cst_scanf_ml, 516, 9], - _h_ = - [0, - [11, "invalid boolean '", [2, 0, [12, 39, 0]]], - "invalid boolean '%s'"], - _g_ = - [0, - [11, "looking for ", [1, [11, ", found ", [1, 0]]]], - "looking for %C, found %C"], - cst_not_a_valid_float_in_hexad = - "not a valid float in hexadecimal notation", - cst_no_dot_or_exponent_part_fo = - "no dot or exponent part found in float token", - _f_ = - [0, - [11, - cst_scanning_of, - [2, - 0, - [11, - " failed: premature end of file occurred before end of token", - 0]]], - "scanning of %s failed: premature end of file occurred before end of token"], - _e_ = - [0, - [11, - cst_scanning_of, - [2, - 0, - [11, " failed: the specified length was too short for token", 0]]], - "scanning of %s failed: the specified length was too short for token"], - _d_ = - [0, - [11, "illegal escape character ", [1, 0]], - "illegal escape character %C"], - cst_unnamed_function = "unnamed function", - cst_unnamed_character_string = "unnamed character string", - cst_unnamed_Stdlib_input_chann = "unnamed Stdlib input channel", - cst_Stdlib_Scanf_Scan_failure = "Stdlib.Scanf.Scan_failure", - cst_binary = "binary", - cst_octal = "octal", - cst_hexadecimal = "hexadecimal", - cst_a_Char = "a Char", - cst_a_String = "a String", - null_char = 0; - function next_char(ib){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - c = /*<>*/ caml_call1(ib[7], 0); - ib[2] = c; - ib[3] = 1; - ib[4] = ib[4] + 1 | 0; - if(10 === c) ib[5] = ib[5] + 1 | 0; - /*<>*/ return c; - } - catch(_bb_){ - var _ba_ = caml_wrap_exception(_bb_); - if(_ba_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_ba_, 0); - ib[2] = null_char; - ib[3] = 0; - ib[1] = 1; - /*<>*/ return null_char; - } - /*<>*/ } - function peek_char(ib){ - /*<>*/ return ib[3] ? ib[2] : next_char(ib); - /*<>*/ } - function checked_peek_char(ib){ - /*<>*/ /*<>*/ var c = peek_char(ib); - if(ib[1]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[12], 1); - /*<>*/ return c; - /*<>*/ } - function end_of_input(ib){ - /*<>*/ peek_char(ib); - return ib[1]; - /*<>*/ } - function beginning_of_input(ib){ - /*<>*/ return 0 === ib[4] ? 1 : 0; - /*<>*/ } - function name_of_input(ib){ - /*<>*/ var match = ib[9]; - if(typeof match === "number") - return 0 === match ? cst_unnamed_function : cst_unnamed_character_string; - if(0 === match[0]) - /*<>*/ return cst_unnamed_Stdlib_input_chann; - var fname = match[1]; - /*<>*/ return fname; - /*<>*/ } - function char_count(ib){ - /*<>*/ return ib[3] ? ib[4] - 1 | 0 : ib[4]; - /*<>*/ } - function invalidate_current_char(ib){ - /*<>*/ ib[3] = 0; - return 0; - /*<>*/ } - function token_string(ib){ - /*<>*/ var - token_buffer = ib[8], - /*<>*/ tok = - /*<>*/ caml_call1(Stdlib_Buffer[2], token_buffer); - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Buffer[8], token_buffer); - ib[6] = ib[6] + 1 | 0; - /*<>*/ return tok; - /*<>*/ } - function skip_char(width, ib){ - /*<>*/ invalidate_current_char(ib); - /*<>*/ return width; - /*<>*/ } - function ignore_char(width, ib){ - /*<>*/ return skip_char(width - 1 | 0, ib); - /*<>*/ } - function store_char(width, ib, c){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], ib[8], c); - /*<>*/ return ignore_char(width, ib); - /*<>*/ } - var default_token_buffer_size = 1024; - function create(iname, next){ - /*<>*/ return [0, - 0, - null_char, - 0, - 0, - 0, - 0, - next, - /*<>*/ caml_call1 - (Stdlib_Buffer[1], default_token_buffer_size), - iname]; - /*<>*/ } - function from_string(s){ - /*<>*/ var - /*<>*/ i = [0, 0], - /*<>*/ len = - /*<>*/ caml_ml_string_length(s); - function next(param){ - /*<>*/ if(len <= i[1]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[12], 1); - /*<>*/ /*<>*/ var - c = /*<>*/ caml_string_get(s, i[1]); - /*<>*/ i[1]++; - /*<>*/ return c; - /*<>*/ } - /*<>*/ return create(1, next); - /*<>*/ } - var _a_ = 0; - /*<>*/ function from_function(_a$_){ - /*<>*/ return create(_a_, _a$_); - } - /*<>*/ /*<>*/ var len = 1024; - function scan_close_at_end(ic){ - /*<>*/ /*<>*/ caml_call1 - (Stdlib[93], ic); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[12], 1); - /*<>*/ } - function scan_raise_at_end(ic){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[12], 1); - /*<>*/ } - function from_ic(scan_close_ic, iname, ic){ - /*<>*/ var - /*<>*/ buf = - /*<>*/ runtime.caml_create_bytes(1024), - /*<>*/ i = [0, 0], - /*<>*/ lim = [0, 0], - /*<>*/ eof = [0, 0]; - function next(param){ - /*<>*/ if(i[1] < lim[1]){ - /*<>*/ /*<>*/ var - c = /*<>*/ caml_bytes_get(buf, i[1]); - /*<>*/ i[1]++; - /*<>*/ return c; - } - if(eof[1]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[12], 1); - lim[1] = /*<>*/ caml_call4(Stdlib[84], ic, buf, 0, len); - return 0 === lim[1] - ? (eof[1] = 1, caml_call1(scan_close_ic, ic)) - : (i[1] = 1, /*<>*/ caml_bytes_get(buf, 0)); - /*<>*/ } - /*<>*/ return create(iname, next); - /*<>*/ } - /*<>*/ /*<>*/ var - stdin = from_ic(scan_raise_at_end, [1, cst, Stdlib[38]], Stdlib[38]); - function open_in_file(open_in, fname){ - /*<>*/ if(! caml_string_notequal(fname, cst$6)) - /*<>*/ return stdin; - /*<>*/ /*<>*/ var - ic = /*<>*/ caml_call1(open_in, fname); - return from_ic(scan_close_at_end, [1, fname, ic], ic); - /*<>*/ } - var _b_ = Stdlib[79]; - /*<>*/ function open_in(_a__){ - /*<>*/ return open_in_file(_b_, _a__); - } - /*<>*/ /*<>*/ var _c_ = Stdlib[80]; - /*<>*/ function open_in_bin(_a9_){ - /*<>*/ return open_in_file(_c_, _a9_); - } - function from_channel(ic){ - /*<>*/ return from_ic(scan_raise_at_end, [0, ic], ic); - /*<>*/ } - function close_in(ib){ - /*<>*/ var match = ib[9]; - if(typeof match === "number") /*<>*/ return 0; - if(0 === match[0]){ - var ic = match[1]; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[93], ic); - } - var ic$0 = match[2]; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[93], ic$0); - /*<>*/ } - /*<>*/ /*<>*/ var - Scan_failure = - [248, cst_Stdlib_Scanf_Scan_failure, runtime.caml_fresh_oo_id(0)]; - function bad_input(s){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Scan_failure, s], 1); - /*<>*/ } - function bad_input_escape(c){ - /*<>*/ return bad_input - ( /*<>*/ caml_call2(Stdlib_Printf[4], _d_, c)); - /*<>*/ } - function bad_token_length(message){ - /*<>*/ return bad_input - ( /*<>*/ caml_call2 - (Stdlib_Printf[4], _e_, message)); - /*<>*/ } - function bad_float(param){ - /*<>*/ return bad_input(cst_no_dot_or_exponent_part_fo); - /*<>*/ } - 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)); - /*<>*/ } - function check_this_char(ib, c){ - /*<>*/ /*<>*/ var - ci = checked_peek_char(ib); - return ci === c ? invalidate_current_char(ib) : character_mismatch(c, ci); - /*<>*/ } - function check_char(ib, c$0){ - /*<>*/ if(10 === c$0){ - /*<>*/ /*<>*/ var - ci = checked_peek_char(ib); - /*<>*/ return 10 === ci - ? invalidate_current_char(ib) - : 13 - === ci - ? (invalidate_current_char(ib), check_this_char(ib, 10)) - : character_mismatch(10, ci); - } - if(32 !== c$0) /*<>*/ return check_this_char(ib, c$0); - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ c = peek_char(ib), - /*<>*/ _a7_ = 1 - ib[1]; - if(! _a7_) /*<>*/ return _a7_; - /*<>*/ /*<>*/ var _a8_ = c - 9 | 0; - a: - { - if(4 < _a8_ >>> 0){ - if(23 === _a8_) break a; - } - else if(1 < _a8_ - 2 >>> 0) break a; - /*<>*/ return 0; - } - /*<>*/ invalidate_current_char(ib); - } - /*<>*/ } - function token_char(ib){ - /*<>*/ return /*<>*/ caml_string_get - (token_string(ib), 0); - /*<>*/ } - function token_bool(ib){ - /*<>*/ /*<>*/ var s = token_string(ib); - return caml_string_notequal(s, "false") - ? caml_string_notequal - (s, "true") - ? bad_input - ( /*<>*/ caml_call2(Stdlib_Printf[4], _h_, s)) - : 1 - : 0; - /*<>*/ } - function integer_conversion_of_char(param){ - /*<>*/ /*<>*/ var - switcher = param - 88 | 0; - if(32 >= switcher >>> 0) - switch(switcher){ - case 10: - /*<>*/ return 0; - case 12: - /*<>*/ return 1; - case 17: - /*<>*/ return 2; - case 23: - /*<>*/ return 3; - case 29: - /*<>*/ return 4; - case 0: - case 32: - /*<>*/ return 5; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _i_], 1); - /*<>*/ } - function token_int_literal(conv, ib){ - /*<>*/ switch(conv){ - case 0: - /*<>*/ var - /*<>*/ _a3_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a3_); - break; - case 3: - /*<>*/ var - /*<>*/ _a4_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a4_); - break; - case 4: - /*<>*/ var - /*<>*/ _a5_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a5_); - break; - case 5: - /*<>*/ var - /*<>*/ _a6_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a6_); - break; - default: var tok = token_string(ib); - } - /*<>*/ /*<>*/ var - l = /*<>*/ caml_ml_string_length(tok); - /*<>*/ if - (0 !== l && 43 === /*<>*/ caml_string_get(tok, 0)) - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], tok, 1, l - 1 | 0); - /*<>*/ return tok; - /*<>*/ } - function token_float(ib){ - /*<>*/ return /*<>*/ runtime.caml_float_of_string - (token_string(ib)); - /*<>*/ } - function scan_decimal_digit_star(width, ib){ - /*<>*/ var width$0 = width; - /*<>*/ for(;;){ - if(0 === width$0) /*<>*/ return width$0; - /*<>*/ /*<>*/ var c = peek_char(ib); - /*<>*/ if(ib[1]) - /*<>*/ return width$0; - if(58 <= c){ - if(95 === c){ - /*<>*/ var - /*<>*/ width$1 = ignore_char(width$0, ib), - width$0 = width$1; - continue; - } - } - else if(48 <= c){ - /*<>*/ var - /*<>*/ width$2 = store_char(width$0, ib, c), - width$0 = width$2; - continue; - } - /*<>*/ return width$0; - } - /*<>*/ } - function scan_decimal_digit_plus(width, ib){ - /*<>*/ if(0 === width) - /*<>*/ return bad_token_length(cst_decimal_digits); - /*<>*/ /*<>*/ var - c = checked_peek_char(ib); - if(9 < c - 48 >>> 0) - /*<>*/ return bad_input - ( /*<>*/ caml_call2(Stdlib_Printf[4], _j_, c)); - /*<>*/ /*<>*/ var - width$0 = store_char(width, ib, c); - /*<>*/ return scan_decimal_digit_star(width$0, ib); - /*<>*/ } - function scan_digit_plus(basis, digitp, width$2, ib){ - /*<>*/ if(0 === width$2) - /*<>*/ return bad_token_length(cst_digits); - /*<>*/ /*<>*/ 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)); - /*<>*/ var - /*<>*/ width$3 = store_char(width$2, ib, c$0), - width = width$3; - /*<>*/ for(;;){ - if(0 === width) /*<>*/ return width; - /*<>*/ /*<>*/ var c = peek_char(ib); - /*<>*/ if(ib[1]) /*<>*/ return width; - /*<>*/ if - ( /*<>*/ caml_call1(digitp, c)) - /*<>*/ var - /*<>*/ width$0 = store_char(width, ib, c), - width = width$0; - else{ - if(95 !== c) /*<>*/ return width; - /*<>*/ var - /*<>*/ width$1 = ignore_char(width, ib), - width = width$1; - } - } - /*<>*/ } - function is_binary_digit(param){ - /*<>*/ return 1 < param - 48 >>> 0 ? 0 : 1; - /*<>*/ } - /*<>*/ function scan_binary_int(_a1_, _a2_){ - /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a1_, _a2_); - } - function is_octal_digit(param){ - /*<>*/ return 7 < param - 48 >>> 0 ? 0 : 1; - /*<>*/ } - /*<>*/ function scan_octal_int(_aZ_, _a0_){ - /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _aZ_, _a0_); - } - function is_hexa_digit(param){ - /*<>*/ /*<>*/ var - _aY_ = param - 48 | 0; - a: - { - if(22 < _aY_ >>> 0){ - if(5 < _aY_ - 49 >>> 0) break a; - } - else if(6 >= _aY_ - 10 >>> 0) break a; - /*<>*/ return 1; - } - /*<>*/ return 0; - /*<>*/ } - /*<>*/ function scan_hexadecimal_int(_aW_, _aX_){ - /*<>*/ return scan_digit_plus - (cst_hexadecimal, is_hexa_digit, _aW_, _aX_); - } - function scan_sign(width, ib){ - /*<>*/ var - /*<>*/ c = checked_peek_char(ib), - /*<>*/ switcher = c - 43 | 0; - if(2 >= switcher >>> 0) - switch(switcher){ - case 0: - /*<>*/ return store_char(width, ib, c); - case 1: break; - default: /*<>*/ return store_char(width, ib, c); - } - /*<>*/ return width; - /*<>*/ } - function scan_optionally_signed_decimal(width, ib){ - /*<>*/ /*<>*/ var - width$0 = scan_sign(width, ib); - /*<>*/ return scan_decimal_digit_plus(width$0, ib); - /*<>*/ } - function scan_int_conversion(conv, width$1, ib){ - /*<>*/ switch(conv){ - case 0: - /*<>*/ return scan_binary_int(width$1, ib); - case 1: - /*<>*/ return scan_optionally_signed_decimal - (width$1, ib); - case 2: - /*<>*/ var - /*<>*/ width$0 = scan_sign(width$1, ib), - /*<>*/ c = checked_peek_char(ib); - if(48 !== c) - /*<>*/ return scan_decimal_digit_plus(width$0, ib); - /*<>*/ /*<>*/ var - width = store_char(width$0, ib, c); - /*<>*/ if(0 === width) - /*<>*/ return width; - /*<>*/ /*<>*/ var - c$0 = peek_char(ib); - /*<>*/ if(ib[1]) - /*<>*/ return width; - a: - { - if(99 <= c$0){ - if(111 === c$0) - /*<>*/ return scan_octal_int - (store_char(width, ib, c$0), ib); - if(120 === c$0) break a; - } - else{ - if(88 === c$0) break a; - if(98 <= c$0) - /*<>*/ return scan_binary_int - (store_char(width, ib, c$0), ib); - } - /*<>*/ return scan_decimal_digit_star(width, ib); - } - /*<>*/ return scan_hexadecimal_int - (store_char(width, ib, c$0), ib); - case 3: - /*<>*/ return scan_octal_int(width$1, ib); - case 4: - /*<>*/ return scan_decimal_digit_plus(width$1, ib); - default: - /*<>*/ return scan_hexadecimal_int(width$1, ib); - } - /*<>*/ } - function scan_fractional_part(width, ib){ - /*<>*/ if(0 === width) - /*<>*/ return width; - /*<>*/ /*<>*/ var c = peek_char(ib); - /*<>*/ return ib[1] - ? width - : 9 - < c - 48 >>> 0 - ? width - : scan_decimal_digit_star(store_char(width, ib, c), ib); - /*<>*/ } - function scan_exponent_part(width, ib){ - /*<>*/ if(0 === width) - /*<>*/ return width; - /*<>*/ /*<>*/ var c = peek_char(ib); - /*<>*/ if(ib[1]) /*<>*/ return width; - if(69 !== c && 101 !== c) /*<>*/ return width; - /*<>*/ return scan_optionally_signed_decimal - (store_char(width, ib, c), ib); - /*<>*/ } - function scan_float(width$1, precision, ib){ - /*<>*/ var - /*<>*/ width = scan_sign(width$1, ib), - /*<>*/ width$0 = scan_decimal_digit_star(width, ib); - /*<>*/ if(0 === width$0) - /*<>*/ return [0, width$0, precision]; - /*<>*/ /*<>*/ var c = peek_char(ib); - /*<>*/ if(ib[1]) - /*<>*/ return [0, width$0, precision]; - if(46 !== c) - /*<>*/ return [0, - scan_exponent_part(width$0, ib), - precision]; - /*<>*/ var - /*<>*/ width$2 = store_char(width$0, ib, c), - /*<>*/ precision$0 = - /*<>*/ caml_call2(Stdlib_Int[10], width$2, precision), - width$3 = - width$2 - (precision$0 - scan_fractional_part(precision$0, ib) | 0) | 0; - /*<>*/ return [0, - scan_exponent_part(width$3, ib), - precision$0]; - /*<>*/ } - function check_case_insensitive_string(width, ib, error, str){ - /*<>*/ function lowercase(c){ - /*<>*/ return 25 < c - 65 >>> 0 - ? c - : caml_call1(Stdlib[29], (c - 65 | 0) + 97 | 0); - /*<>*/ } - /*<>*/ var - /*<>*/ len = - /*<>*/ caml_ml_string_length(str), - /*<>*/ width$0 = [0, width], - /*<>*/ _aT_ = len - 1 | 0, - /*<>*/ _aS_ = 0; - if(_aT_ >= 0){ - var i = _aS_; - for(;;){ - /*<>*/ var - /*<>*/ c = peek_char(ib), - /*<>*/ _aU_ = - lowercase( /*<>*/ caml_string_get(str, i)); - if(lowercase(c) !== _aU_) - /*<>*/ /*<>*/ caml_call1(error, 0); - if(0 === width$0[1]) - /*<>*/ /*<>*/ caml_call1(error, 0); - width$0[1] = store_char(width$0[1], ib, c); - /*<>*/ /*<>*/ var _aV_ = i + 1 | 0; - if(_aT_ === i) break; - var i = _aV_; - } - } - return width$0[1]; - /*<>*/ } - function scan_hex_float(width, precision, ib){ - /*<>*/ var - _aF_ = 0 === width ? 1 : 0, - _aG_ = _aF_ || end_of_input(ib); - /*<>*/ if(_aG_) - /*<>*/ bad_hex_float(0); - /*<>*/ var - /*<>*/ width$0 = scan_sign(width, ib), - _aH_ = 0 === width$0 ? 1 : 0, - _aI_ = _aH_ || end_of_input(ib); - /*<>*/ if(_aI_) - /*<>*/ bad_hex_float(0); - /*<>*/ /*<>*/ var c = peek_char(ib); - a: - { - if(78 <= c){ - /*<>*/ /*<>*/ var - switcher = c - 79 | 0; - if(30 < switcher >>> 0){ - if(32 <= switcher) break a; - /*<>*/ var - /*<>*/ width$1 = store_char(width$0, ib, c), - _aJ_ = 0 === width$1 ? 1 : 0, - _aK_ = _aJ_ || end_of_input(ib); - /*<>*/ if(_aK_) - /*<>*/ bad_hex_float(0); - /*<>*/ return check_case_insensitive_string - (width$1, ib, bad_hex_float, cst_an); - } - if(26 !== switcher) break a; - } - else{ - if(48 === c){ - /*<>*/ var - /*<>*/ width$3 = store_char(width$0, ib, c), - _aN_ = 0 === width$3 ? 1 : 0, - _aO_ = _aN_ || end_of_input(ib); - /*<>*/ if(_aO_) - /*<>*/ bad_hex_float(0); - /*<>*/ /*<>*/ var - width$4 = - check_case_insensitive_string(width$3, ib, bad_hex_float, cst_x); - /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ - /*<>*/ /*<>*/ var - _aP_ = peek_char(ib) - 46 | 0; - b: - { - c: - { - if(34 < _aP_ >>> 0){ - if(66 === _aP_) break c; - } - else if(32 < _aP_ - 1 >>> 0) break c; - var width$5 = scan_hexadecimal_int(width$4, ib); - break b; - } - var width$5 = width$4; - } - /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ - /*<>*/ /*<>*/ var - c$0 = peek_char(ib); - if(46 === c$0){ - /*<>*/ /*<>*/ var - width$6 = store_char(width$5, ib, c$0); - b: - { - /*<>*/ if(0 !== width$6 && ! end_of_input(ib)){ - /*<>*/ /*<>*/ var - match = peek_char(ib); - c: - { - if(80 !== match && 112 !== match){ - /*<>*/ var - /*<>*/ precision$0 = - /*<>*/ caml_call2 - (Stdlib_Int[10], width$6, precision), - width$10 = - width$6 - - (precision$0 - scan_hexadecimal_int(precision$0, ib) | 0) - | 0; - break c; - } - var width$10 = width$6; - } - var width$7 = width$10; - break b; - } - var width$7 = width$6; - } - var width$8 = width$7; - } - else - var width$8 = width$5; - /*<>*/ if(0 !== width$8 && ! end_of_input(ib)){ - /*<>*/ /*<>*/ var - c$1 = peek_char(ib); - if(80 !== c$1 && 112 !== c$1) - /*<>*/ return width$8; - /*<>*/ var - /*<>*/ width$9 = store_char(width$8, ib, c$1), - _aQ_ = 0 === width$9 ? 1 : 0, - _aR_ = _aQ_ || end_of_input(ib); - /*<>*/ if(_aR_) - /*<>*/ bad_hex_float(0); - /*<>*/ return scan_optionally_signed_decimal - (width$9, ib); - } - /*<>*/ return width$8; - } - /*<>*/ return width$5; - } - /*<>*/ return width$4; - } - if(73 !== c) break a; - } - /*<>*/ var - /*<>*/ width$2 = store_char(width$0, ib, c), - _aL_ = 0 === width$2 ? 1 : 0, - _aM_ = _aL_ || end_of_input(ib); - /*<>*/ if(_aM_) - /*<>*/ bad_hex_float(0); - /*<>*/ return check_case_insensitive_string - (width$2, ib, bad_hex_float, cst_nfinity); - } - /*<>*/ return bad_hex_float(0); - /*<>*/ } - function scan_caml_float_rest(width, precision, ib){ - /*<>*/ var - _aB_ = 0 === width ? 1 : 0, - _aC_ = _aB_ || end_of_input(ib); - /*<>*/ if(_aC_) /*<>*/ bad_float(0); - /*<>*/ var - /*<>*/ width$0 = scan_decimal_digit_star(width, ib), - _aD_ = 0 === width$0 ? 1 : 0, - _aE_ = _aD_ || end_of_input(ib); - /*<>*/ if(_aE_) /*<>*/ bad_float(0); - /*<>*/ var - /*<>*/ c = peek_char(ib), - /*<>*/ switcher = c - 69 | 0; - if(32 < switcher >>> 0){ - if(-23 === switcher){ - /*<>*/ var - /*<>*/ width$1 = store_char(width$0, ib, c), - /*<>*/ precision$0 = - /*<>*/ caml_call2 - (Stdlib_Int[10], width$1, precision), - /*<>*/ width_precision = - scan_fractional_part(precision$0, ib), - frac_width = precision$0 - width_precision | 0, - width$2 = width$1 - frac_width | 0; - /*<>*/ return scan_exponent_part(width$2, ib); - } - } - else if(30 < switcher - 1 >>> 0) - /*<>*/ return scan_exponent_part(width$0, ib); - /*<>*/ return bad_float(0); - /*<>*/ } - function scan_caml_float(width, precision, ib){ - /*<>*/ var - _an_ = 0 === width ? 1 : 0, - _ao_ = _an_ || end_of_input(ib); - /*<>*/ if(_ao_) /*<>*/ bad_float(0); - /*<>*/ var - /*<>*/ width$0 = scan_sign(width, ib), - _ap_ = 0 === width$0 ? 1 : 0, - _aq_ = _ap_ || end_of_input(ib); - /*<>*/ if(_aq_) /*<>*/ bad_float(0); - /*<>*/ /*<>*/ var c = peek_char(ib); - if(49 <= c){ - if(58 > c){ - /*<>*/ var - /*<>*/ width$1 = store_char(width$0, ib, c), - _ar_ = 0 === width$1 ? 1 : 0, - _as_ = _ar_ || end_of_input(ib); - /*<>*/ if(_as_) /*<>*/ bad_float(0); - /*<>*/ return scan_caml_float_rest - (width$1, precision, ib); - } - } - else if(48 <= c){ - /*<>*/ var - /*<>*/ width$2 = store_char(width$0, ib, c), - _at_ = 0 === width$2 ? 1 : 0, - _au_ = _at_ || end_of_input(ib); - /*<>*/ if(_au_) /*<>*/ bad_float(0); - /*<>*/ /*<>*/ var - c$0 = peek_char(ib); - if(88 !== c$0 && 120 !== c$0) - /*<>*/ return scan_caml_float_rest - (width$2, precision, ib); - /*<>*/ var - /*<>*/ width$3 = store_char(width$2, ib, c$0), - _av_ = 0 === width$3 ? 1 : 0, - _aw_ = _av_ || end_of_input(ib); - /*<>*/ if(_aw_) /*<>*/ bad_float(0); - /*<>*/ var - /*<>*/ width$4 = scan_hexadecimal_int(width$3, ib), - _ax_ = 0 === width$4 ? 1 : 0, - _ay_ = _ax_ || end_of_input(ib); - /*<>*/ if(_ay_) /*<>*/ bad_float(0); - /*<>*/ var - /*<>*/ c$1 = peek_char(ib), - /*<>*/ switcher = c$1 - 80 | 0; - a: - { - b: - { - if(32 < switcher >>> 0){ - if(-34 === switcher){ - /*<>*/ /*<>*/ var - width$5 = store_char(width$4, ib, c$1); - c: - { - /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ - /*<>*/ /*<>*/ var - match = peek_char(ib); - d: - { - if(80 !== match && 112 !== match){ - /*<>*/ var - /*<>*/ precision$0 = - /*<>*/ caml_call2 - (Stdlib_Int[10], width$5, precision), - width$10 = - width$5 - - (precision$0 - scan_hexadecimal_int(precision$0, ib) | 0) - | 0; - break d; - } - var width$10 = width$5; - } - var width$6 = width$10; - break c; - } - var width$6 = width$5; - } - var width$7 = width$6; - break b; - } - } - else if(30 < switcher - 1 >>> 0){var width$7 = width$4; break b;} - var width$8 = bad_float(0); - break a; - } - var width$8 = width$7; - } - /*<>*/ if(0 !== width$8 && ! end_of_input(ib)){ - /*<>*/ /*<>*/ var - c$2 = peek_char(ib); - if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$8; - /*<>*/ var - /*<>*/ width$9 = store_char(width$8, ib, c$2), - _az_ = 0 === width$9 ? 1 : 0, - _aA_ = _az_ || end_of_input(ib); - /*<>*/ if(_aA_) - /*<>*/ bad_hex_float(0); - /*<>*/ return scan_optionally_signed_decimal - (width$9, ib); - } - /*<>*/ return width$8; - } - /*<>*/ return bad_float(0); - /*<>*/ } - function scan_string(stp, width, ib){ - /*<>*/ var width$0 = width; - /*<>*/ for(;;){ - if(0 === width$0) /*<>*/ return width$0; - /*<>*/ /*<>*/ var c = peek_char(ib); - /*<>*/ if(ib[1]) - /*<>*/ return width$0; - if(! stp){ - /*<>*/ /*<>*/ var _am_ = c - 9 | 0; - a: - { - if(4 < _am_ >>> 0){ - if(23 === _am_) break a; - } - else if(1 < _am_ - 2 >>> 0) break a; - /*<>*/ var - /*<>*/ width$2 = store_char(width$0, ib, c), - width$0 = width$2; - continue; - } - /*<>*/ return width$0; - } - var c$0 = stp[1]; - if(c === c$0) /*<>*/ return skip_char(width$0, ib); - /*<>*/ var - /*<>*/ width$1 = store_char(width$0, ib, c), - width$0 = width$1; - } - /*<>*/ } - function hexadecimal_value_of_char(c){ - /*<>*/ return 97 <= c - ? c - 87 | 0 - : 65 <= c ? c - 55 | 0 : c - 48 | 0; - /*<>*/ } - function check_next_char(message, width, ib){ - /*<>*/ if(0 === width) - /*<>*/ return bad_token_length(message); - /*<>*/ /*<>*/ var c = peek_char(ib); - /*<>*/ return ib[1] - ? bad_input - ( /*<>*/ caml_call2 - (Stdlib_Printf[4], _f_, message)) - : c; - /*<>*/ } - /*<>*/ function check_next_char_for_char(_ak_, _al_){ - /*<>*/ return check_next_char(cst_a_Char, _ak_, _al_); - } - /*<>*/ function check_next_char_for_string(_ai_, _aj_){ - /*<>*/ return check_next_char(cst_a_String, _ai_, _aj_); - } - function scan_backslash_char(width, ib){ - /*<>*/ /*<>*/ var - c0 = check_next_char_for_char(width, ib); - a: - { - if(40 <= c0){ - if(58 > c0){ - if(48 > c0) break a; - /*<>*/ var - get_digit$0 = - function(param){ - /*<>*/ /*<>*/ var - c = next_char(ib); - return 9 < c - 48 >>> 0 ? bad_input_escape(c) : c; - /*<>*/ }, - /*<>*/ c1$0 = get_digit$0(0), - /*<>*/ c2$0 = get_digit$0(0), - c = - ((100 * (c0 - 48 | 0) | 0) + (10 * (c1$0 - 48 | 0) | 0) | 0) - + (c2$0 - 48 | 0) - | 0; - b: - { - if(0 <= c && 255 >= c){ - var _ag_ = /*<>*/ caml_call1(Stdlib[29], c); - break b; - } - var - _ag_ = - bad_input - ( /*<>*/ caml_call4 - (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); - } - /*<>*/ return store_char(width - 2 | 0, ib, _ag_); - } - /*<>*/ /*<>*/ var - switcher = c0 - 92 | 0; - if(28 < switcher >>> 0) break a; - switch(switcher){ - case 28: - /*<>*/ var - get_digit = - function(param){ - /*<>*/ var - /*<>*/ c = next_char(ib), - /*<>*/ _ah_ = c - 48 | 0; - a: - { - if(22 < _ah_ >>> 0){ - if(5 < _ah_ - 49 >>> 0) break a; - } - else if(6 >= _ah_ - 10 >>> 0) break a; - /*<>*/ return c; - } - /*<>*/ return bad_input_escape(c); - /*<>*/ }, - /*<>*/ c1 = get_digit(0), - /*<>*/ c2 = get_digit(0), - /*<>*/ _ad_ = hexadecimal_value_of_char(c2), - c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ad_ | 0; - b: - { - if(0 <= c$0 && 255 >= c$0){ - var _af_ = /*<>*/ caml_call1(Stdlib[29], c$0); - break b; - } - var - _af_ = - bad_input - ( /*<>*/ caml_call3 - (Stdlib_Printf[4], _m_, c1, c2)); - } - /*<>*/ return store_char(width - 2 | 0, ib, _af_); - case 0: - case 6: - case 18: - case 22: - case 24: break; - default: break a; - } - } - else if(34 !== c0 && 39 > c0) break a; - b: - { - if(110 <= c0){ - if(117 > c0) - switch(c0 - 110 | 0){ - case 0: - var _ae_ = 10; break b; - case 4: - var _ae_ = 13; break b; - case 6: - var _ae_ = 9; break b; - } - } - else if(98 === c0){var _ae_ = 8; break b;} - var _ae_ = c0; - } - /*<>*/ return store_char(width, ib, _ae_); - } - /*<>*/ return bad_input_escape(c0); - /*<>*/ } - function scan_caml_string(width, ib){ - function find_stop$0(counter, width){ - /*<>*/ var width$0 = width; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - c = check_next_char_for_string(width$0, ib); - if(34 === c) /*<>*/ return ignore_char(width$0, ib); - if(92 === c){ - /*<>*/ var - /*<>*/ width$1 = ignore_char(width$0, ib), - /*<>*/ match = - check_next_char_for_string(width$1, ib); - if(10 === match){ - /*<>*/ /*<>*/ var - _ab_ = ignore_char(width$1, ib); - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ab_]); - var counter$0 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$0, _ab_); - } - if(13 === match){ - /*<>*/ /*<>*/ var - width$3 = ignore_char(width$1, ib); - if(10 === check_next_char_for_string(width$3, ib)){ - /*<>*/ /*<>*/ var - _ac_ = ignore_char(width$3, ib); - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ac_]); - var counter$1 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$1, _ac_); - } - /*<>*/ var - /*<>*/ width$5 = store_char(width$3, ib, 13), - width$0 = width$5; - } - else - /*<>*/ var - /*<>*/ width$4 = scan_backslash_char(width$1, ib), - width$0 = width$4; - } - else - /*<>*/ var - /*<>*/ width$2 = store_char(width$0, ib, c), - width$0 = width$2; - } - /*<>*/ } - function skip_spaces(counter, width){ - /*<>*/ var width$0 = width; - /*<>*/ for(;;){ - if(32 !== check_next_char_for_string(width$0, ib)){ - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (find_stop$0, [0, width$0]); - var counter$0 = counter + 1 | 0; - /*<>*/ return find_stop$0(counter$0, width$0); - } - /*<>*/ var - /*<>*/ width$1 = ignore_char(width$0, ib), - width$0 = width$1; - } - /*<>*/ } - function find_stop(width){ - /*<>*/ return caml_trampoline(find_stop$0(0, width)); - } - /*<>*/ /*<>*/ var - c = checked_peek_char(ib); - return 34 === c - ? find_stop(ignore_char(width, ib)) - : character_mismatch(34, c); - /*<>*/ } - function scan_chars_in_char_set(char_set, scan_indic, width, ib){ - function scan_chars(i, stp){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ c = peek_char(ib), - _Z_ = 0 < i$0 ? 1 : 0; - if(_Z_){ - /*<>*/ /*<>*/ var - ___ = 1 - ib[1]; - if(___) - /*<>*/ var - /*<>*/ _$_ = - /*<>*/ caml_call2 - (CamlinternalFormat[1], char_set, c), - /*<>*/ _aa_ = _$_ ? c !== stp ? 1 : 0 : _$_; - else - var _aa_ = ___; - } - else - var _aa_ = _Z_; - if(! _aa_) return _aa_; - /*<>*/ store_char(Stdlib[19], ib, c); - var i$1 = i$0 - 1 | 0, i$0 = i$1; - } - /*<>*/ } - if(! scan_indic) /*<>*/ return scan_chars(width, -1); - var c = scan_indic[1]; - /*<>*/ scan_chars(width, c); - /*<>*/ /*<>*/ var _Y_ = 1 - ib[1]; - if(! _Y_) /*<>*/ return _Y_; - /*<>*/ /*<>*/ var - ci = peek_char(ib); - return c === ci ? invalidate_current_char(ib) : character_mismatch(c, ci); - /*<>*/ } - function scanf_bad_input(ib, x){ - /*<>*/ if(x[1] === Scan_failure) - var s = x[2]; - else{ - if(x[1] !== Stdlib[7]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (x, 1); - var s = x[2]; - } - /*<>*/ /*<>*/ var - i = char_count(ib); - /*<>*/ return bad_input - ( /*<>*/ caml_call3(Stdlib_Printf[4], _o_, i, s)); - } - function width_of_pad_opt(pad_opt){ - /*<>*/ if(! pad_opt) - /*<>*/ return Stdlib[19]; - var width = pad_opt[1]; - /*<>*/ return width; - /*<>*/ } - function stopper_of_formatting_lit(fmting){ - /*<>*/ if(6 === fmting) - /*<>*/ return _p_; - /*<>*/ var - /*<>*/ str = - /*<>*/ caml_call1(CamlinternalFormat[17], fmting), - /*<>*/ stp = - /*<>*/ caml_string_get(str, 1), - /*<>*/ sub_str = - /*<>*/ caml_call3 - (Stdlib_String[15], - str, - 2, - /*<>*/ caml_ml_string_length(str) - 2 | 0); - /*<>*/ return [0, stp, sub_str]; - /*<>*/ } - function take_format_readers$0(counter, k, fmt){ - /*<>*/ var fmt$0 = fmt; - /*<>*/ for(;;){ - if(typeof fmt$0 === "number") - /*<>*/ return /*<>*/ caml_call1 - (k, 0); - switch(fmt$0[0]){ - case 0: - var rest = fmt$0[1], fmt$0 = rest; break; - case 1: - var rest$0 = fmt$0[1], fmt$0 = rest$0; break; - case 2: - var rest$1 = fmt$0[2], fmt$0 = rest$1; break; - case 3: - var rest$2 = fmt$0[2], fmt$0 = rest$2; break; - case 4: - var rest$3 = fmt$0[4], fmt$0 = rest$3; break; - case 5: - var rest$4 = fmt$0[4], fmt$0 = rest$4; break; - case 6: - var rest$5 = fmt$0[4], fmt$0 = rest$5; break; - case 7: - var rest$6 = fmt$0[4], fmt$0 = rest$6; break; - case 8: - var rest$7 = fmt$0[4], fmt$0 = rest$7; break; - case 9: - var rest$8 = fmt$0[2], fmt$0 = rest$8; break; - case 10: - var rest$9 = fmt$0[1], fmt$0 = rest$9; break; - case 11: - var rest$10 = fmt$0[2], fmt$0 = rest$10; break; - case 12: - var rest$11 = fmt$0[2], fmt$0 = rest$11; break; - case 13: - var rest$12 = fmt$0[3], fmt$0 = rest$12; break; - case 14: - /*<>*/ var - rest$13 = fmt$0[3], - fmtty = fmt$0[2], - /*<>*/ _V_ = - /*<>*/ caml_call1(CamlinternalFormat[21], fmtty), - /*<>*/ _W_ = - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _V_); - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (take_fmtty_format_readers$0, [0, k, _W_, rest$13]); - var counter$0 = counter + 1 | 0; - /*<>*/ return take_fmtty_format_readers$0 - (counter$0, k, _W_, rest$13); - case 15: - var rest$14 = fmt$0[1], fmt$0 = rest$14; break; - case 16: - var rest$15 = fmt$0[1], fmt$0 = rest$15; break; - case 17: - var rest$16 = fmt$0[2], fmt$0 = rest$16; break; - case 18: - var _X_ = fmt$0[1]; - if(0 === _X_[0]) - /*<>*/ var - rest$17 = fmt$0[2], - fmt$1 = _X_[1][1], - /*<>*/ fmt$2 = - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$1, rest$17), - fmt$0 = fmt$2; - else - /*<>*/ var - rest$18 = fmt$0[2], - fmt$3 = _X_[1][1], - /*<>*/ fmt$4 = - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$3, rest$18), - fmt$0 = fmt$4; - break; - case 19: - var fmt_rest = fmt$0[1]; - /*<>*/ return function(reader){ - function new_k(readers_rest){ - /*<>*/ return /*<>*/ caml_call1 - (k, [0, reader, readers_rest]); - /*<>*/ } - /*<>*/ return take_format_readers(new_k, fmt_rest); /*<>*/ }; - case 20: - var rest$19 = fmt$0[3], fmt$0 = rest$19; break; - case 21: - var rest$20 = fmt$0[2], fmt$0 = rest$20; break; - case 22: - var rest$21 = fmt$0[1], fmt$0 = rest$21; break; - case 23: - var rest$22 = fmt$0[2], ign = fmt$0[1]; - if(typeof ign === "number") - switch(ign){ - case 0: - var fmt$0 = rest$22; break; - case 1: - var fmt$0 = rest$22; break; - case 2: - /*<>*/ return function(reader){ - function new_k(readers_rest){ - /*<>*/ return /*<>*/ caml_call1 - (k, [0, reader, readers_rest]); - /*<>*/ } - /*<>*/ return take_format_readers - (new_k, rest$22); /*<>*/ }; - default: var fmt$0 = rest$22; - } - else - switch(ign[0]){ - case 0: - var fmt$0 = rest$22; break; - case 1: - var fmt$0 = rest$22; break; - case 2: - var fmt$0 = rest$22; break; - case 3: - var fmt$0 = rest$22; break; - case 4: - var fmt$0 = rest$22; break; - case 5: - var fmt$0 = rest$22; break; - case 6: - var fmt$0 = rest$22; break; - case 7: - var fmt$0 = rest$22; break; - case 8: - var fmt$0 = rest$22; break; - case 9: - var fmtty$0 = ign[2]; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (take_fmtty_format_readers$0, [0, k, fmtty$0, rest$22]); - var counter$1 = counter + 1 | 0; - /*<>*/ return take_fmtty_format_readers$0 - (counter$1, k, fmtty$0, rest$22); - case 10: - var fmt$0 = rest$22; break; - default: var fmt$0 = rest$22; - } - break; - default: var rest$23 = fmt$0[3], fmt$0 = rest$23; - } - } - /*<>*/ } - function take_fmtty_format_readers$0(counter, k, fmtty, fmt){ - /*<>*/ var fmtty$0 = fmtty; - /*<>*/ for(;;){ - if(typeof fmtty$0 === "number"){ - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (take_format_readers$0, [0, k, fmt]); - var counter$0 = counter + 1 | 0; - /*<>*/ return take_format_readers$0 - (counter$0, k, fmt); - } - switch(fmtty$0[0]){ - case 0: - var fmtty$1 = fmtty$0[1], fmtty$0 = fmtty$1; break; - case 1: - var fmtty$2 = fmtty$0[1], fmtty$0 = fmtty$2; break; - case 2: - var fmtty$3 = fmtty$0[1], fmtty$0 = fmtty$3; break; - case 3: - var fmtty$4 = fmtty$0[1], fmtty$0 = fmtty$4; break; - case 4: - var fmtty$5 = fmtty$0[1], fmtty$0 = fmtty$5; break; - case 5: - var fmtty$6 = fmtty$0[1], fmtty$0 = fmtty$6; break; - case 6: - var fmtty$7 = fmtty$0[1], fmtty$0 = fmtty$7; break; - case 7: - var fmtty$8 = fmtty$0[1], fmtty$0 = fmtty$8; break; - case 8: - var fmtty$9 = fmtty$0[2], fmtty$0 = fmtty$9; break; - case 9: - /*<>*/ var - rest = fmtty$0[3], - ty2 = fmtty$0[2], - ty1 = fmtty$0[1], - /*<>*/ _U_ = - /*<>*/ caml_call1(CamlinternalFormat[21], ty1), - /*<>*/ ty = - /*<>*/ caml_call2 - (CamlinternalFormat[22], _U_, ty2), - /*<>*/ fmtty$10 = - /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], ty, rest), - fmtty$0 = fmtty$10; - break; - case 10: - var fmtty$11 = fmtty$0[1], fmtty$0 = fmtty$11; break; - case 11: - var fmtty$12 = fmtty$0[1], fmtty$0 = fmtty$12; break; - case 12: - var fmtty$13 = fmtty$0[1], fmtty$0 = fmtty$13; break; - case 13: - var fmt_rest = fmtty$0[1]; - /*<>*/ return function(reader){ - function new_k(readers_rest){ - /*<>*/ return /*<>*/ caml_call1 - (k, [0, reader, readers_rest]); - /*<>*/ } - /*<>*/ return take_fmtty_format_readers - (new_k, fmt_rest, fmt); /*<>*/ }; - default: - var fmt_rest$0 = fmtty$0[1]; - /*<>*/ return function(reader){ - function new_k(readers_rest){ - /*<>*/ return /*<>*/ caml_call1 - (k, [0, reader, readers_rest]); - /*<>*/ } - /*<>*/ return take_fmtty_format_readers - (new_k, fmt_rest$0, fmt); /*<>*/ }; - } - } - /*<>*/ } - function take_format_readers(k, fmt){ - /*<>*/ return caml_trampoline(take_format_readers$0(0, k, fmt)); - } - function take_fmtty_format_readers(k, fmtty, fmt){ - /*<>*/ return caml_trampoline - (take_fmtty_format_readers$0(0, k, fmtty, fmt)); - } - function pad_prec_scanf(ib, fmt, readers, pad, prec, scan, token){ - /*<>*/ if(typeof pad === "number"){ - if(typeof prec !== "number"){ - var p = prec[1]; - /*<>*/ /*<>*/ caml_call3 - (scan, Stdlib[19], p, ib); - /*<>*/ /*<>*/ var - x$0 = /*<>*/ caml_call1(token, ib); - /*<>*/ return [0, x$0, make_scanf(ib, fmt, readers)]; - } - if(prec) - /*<>*/ return /*<>*/ caml_call1 - (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); - if(! pad[1]) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_scanf_bad_conversion$1); - var w = pad[2]; - if(typeof prec !== "number"){ - var p$0 = prec[1]; - /*<>*/ /*<>*/ caml_call3 - (scan, w, p$0, ib); - /*<>*/ /*<>*/ var - x$2 = /*<>*/ caml_call1(token, ib); - /*<>*/ return [0, x$2, make_scanf(ib, fmt, readers)]; - } - if(prec) - /*<>*/ return /*<>*/ caml_call1 - (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)]; - /*<>*/ } - function make_scanf(ib, fmt, readers){ - /*<>*/ var fmt$0 = fmt; - /*<>*/ for(;;){ - if(typeof fmt$0 === "number") /*<>*/ return 0; - switch(fmt$0[0]){ - case 0: - var rest = fmt$0[1]; - /*<>*/ store_char(0, ib, checked_peek_char(ib)); - /*<>*/ /*<>*/ var - c$1 = token_char(ib); - /*<>*/ return [0, - c$1, - make_scanf(ib, rest, readers)]; - case 1: - /*<>*/ var - rest$0 = fmt$0[1], - /*<>*/ width$0 = 0, - find_stop = - function(width){ - /*<>*/ /*<>*/ var - c = check_next_char_for_char(width, ib); - return 39 === c - ? ignore_char(width, ib) - : character_mismatch(39, c); - /*<>*/ }, - /*<>*/ c = checked_peek_char(ib); - if(39 === c){ - /*<>*/ var - /*<>*/ width = ignore_char(width$0, ib), - /*<>*/ c$0 = check_next_char_for_char(width, ib); - if(92 === c$0) - /*<>*/ find_stop - (scan_backslash_char(ignore_char(width, ib), ib)); - else - /*<>*/ find_stop(store_char(width, ib, c$0)); - } - else - /*<>*/ character_mismatch(39, c); - /*<>*/ /*<>*/ var - c$2 = token_char(ib); - /*<>*/ return [0, - c$2, - make_scanf(ib, rest$0, readers)]; - case 2: - var pad = fmt$0[1], match = fmt$0[2]; - if(typeof match !== "number") - switch(match[0]){ - case 17: - /*<>*/ var - rest$2 = match[2], - fmting_lit = match[1], - /*<>*/ match$0 = - stopper_of_formatting_lit(fmting_lit), - str = match$0[2], - stp = match$0[1], - scan$0 = - function(width, param, ib){ - /*<>*/ return scan_string - ([0, stp], width, ib); - /*<>*/ }, - /*<>*/ str_rest = [11, str, rest$2]; - /*<>*/ return pad_prec_scanf - (ib, str_rest, readers, pad, 0, scan$0, token_string); - case 18: - var _G_ = match[1]; - if(0 === _G_[0]){ - /*<>*/ var - rest$3 = match[2], - fmt$1 = _G_[1][1], - /*<>*/ scan$1 = - function(width, param, ib){ - /*<>*/ return scan_string(_q_, width, ib); - /*<>*/ }; - /*<>*/ return pad_prec_scanf - (ib, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$1, rest$3), - readers, - pad, - 0, - scan$1, - token_string); - } - /*<>*/ var - rest$4 = match[2], - fmt$2 = _G_[1][1], - /*<>*/ scan$2 = - function(width, param, ib){ - /*<>*/ return scan_string(_r_, width, ib); - /*<>*/ }; - /*<>*/ return pad_prec_scanf - (ib, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$2, rest$4), - readers, - pad, - 0, - scan$2, - token_string); - } - /*<>*/ var - rest$1 = fmt$0[2], - /*<>*/ scan = - function(width, param, ib){ - /*<>*/ return scan_string(0, width, ib); - /*<>*/ }; - /*<>*/ return pad_prec_scanf - (ib, rest$1, readers, pad, 0, scan, token_string); - case 3: - /*<>*/ var - rest$5 = fmt$0[2], - pad$0 = fmt$0[1], - /*<>*/ scan$3 = - function(width, param, ib){ - /*<>*/ return scan_caml_string(width, ib); - /*<>*/ }; - /*<>*/ return pad_prec_scanf - (ib, rest$5, readers, pad$0, 0, scan$3, token_string); - case 4: - /*<>*/ var - rest$6 = fmt$0[4], - prec = fmt$0[3], - pad$1 = fmt$0[2], - iconv = fmt$0[1], - /*<>*/ conv = - integer_conversion_of_char - ( /*<>*/ caml_call1 - (CamlinternalFormat[16], iconv)), - scan$4 = - function(width, param, ib){ - /*<>*/ return scan_int_conversion - (conv, width, ib); - /*<>*/ }; - /*<>*/ return pad_prec_scanf - (ib, - rest$6, - readers, - pad$1, - prec, - scan$4, - function(ib){ - /*<>*/ return /*<>*/ caml_int_of_string - (token_int_literal(conv, ib)); - }); - case 5: - /*<>*/ var - rest$7 = fmt$0[4], - prec$0 = fmt$0[3], - pad$2 = fmt$0[2], - iconv$0 = fmt$0[1], - /*<>*/ conv$0 = - integer_conversion_of_char - ( /*<>*/ caml_call1 - (CamlinternalFormat[16], iconv$0)), - scan$5 = - function(width, param, ib){ - /*<>*/ return scan_int_conversion - (conv$0, width, ib); - /*<>*/ }; - /*<>*/ return pad_prec_scanf - (ib, - rest$7, - readers, - pad$2, - prec$0, - scan$5, - function(ib){ - /*<>*/ return /*<>*/ caml_int_of_string - (token_int_literal(conv$0, ib)); - }); - case 6: - /*<>*/ var - rest$8 = fmt$0[4], - prec$1 = fmt$0[3], - pad$3 = fmt$0[2], - iconv$1 = fmt$0[1], - /*<>*/ conv$1 = - integer_conversion_of_char - ( /*<>*/ caml_call1 - (CamlinternalFormat[16], iconv$1)), - scan$6 = - function(width, param, ib){ - /*<>*/ return scan_int_conversion - (conv$1, width, ib); - /*<>*/ }; - /*<>*/ return pad_prec_scanf - (ib, - rest$8, - readers, - pad$3, - prec$1, - scan$6, - function(ib){ - /*<>*/ return /*<>*/ caml_int_of_string - (token_int_literal(conv$1, ib)); - }); - case 7: - /*<>*/ var - rest$9 = fmt$0[4], - prec$2 = fmt$0[3], - pad$4 = fmt$0[2], - iconv$2 = fmt$0[1], - /*<>*/ conv$2 = - integer_conversion_of_char - ( /*<>*/ caml_call1 - (CamlinternalFormat[16], iconv$2)), - scan$7 = - function(width, param, ib){ - /*<>*/ return scan_int_conversion - (conv$2, width, ib); - /*<>*/ }; - /*<>*/ return pad_prec_scanf - (ib, - rest$9, - readers, - pad$4, - prec$2, - scan$7, - function(ib){ - /*<>*/ return /*<>*/ runtime.caml_int64_of_string - (token_int_literal(conv$2, ib)); - }); - case 8: - switch(fmt$0[1][2]){ - case 5: - case 8: - var rest$11 = fmt$0[4], prec$4 = fmt$0[3], pad$6 = fmt$0[2]; - /*<>*/ return pad_prec_scanf - (ib, - rest$11, - readers, - pad$6, - prec$4, - scan_caml_float, - token_float); - case 6: - case 7: - var rest$12 = fmt$0[4], prec$5 = fmt$0[3], pad$7 = fmt$0[2]; - /*<>*/ return pad_prec_scanf - (ib, - rest$12, - readers, - pad$7, - prec$5, - scan_hex_float, - token_float); - default: - var rest$10 = fmt$0[4], prec$3 = fmt$0[3], pad$5 = fmt$0[2]; - /*<>*/ return pad_prec_scanf - (ib, - rest$10, - readers, - pad$5, - prec$3, - scan_float, - token_float); - } - case 9: - /*<>*/ var - rest$13 = fmt$0[2], - pad$8 = fmt$0[1], - /*<>*/ scan$8 = - function(param, _T_, ib){ - /*<>*/ var - /*<>*/ c = checked_peek_char(ib), - /*<>*/ m = - 102 === c - ? 5 - : 116 - === c - ? 4 - : bad_input - ( /*<>*/ caml_call2 - (Stdlib_Printf[4], _n_, c)); - /*<>*/ return scan_string(0, m, ib); - /*<>*/ }; - /*<>*/ return pad_prec_scanf - (ib, rest$13, readers, pad$8, 0, scan$8, token_bool); - case 10: - var rest$14 = fmt$0[1]; - /*<>*/ if(! end_of_input(ib)) - /*<>*/ return bad_input(cst_end_of_input_not_found); - var fmt$0 = rest$14; - break; - case 11: - /*<>*/ var - rest$15 = fmt$0[2], - str$0 = fmt$0[1], - /*<>*/ _H_ = - function(_S_){ /*<>*/ return check_char(ib, _S_);}; - /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _H_, str$0); - var fmt$0 = rest$15; - break; - case 12: - var rest$16 = fmt$0[2], chr = fmt$0[1]; - /*<>*/ check_char(ib, chr); - var fmt$0 = rest$16; - break; - case 13: - var rest$17 = fmt$0[3], fmtty = fmt$0[2], pad_opt = fmt$0[1]; - /*<>*/ scan_caml_string - (width_of_pad_opt(pad_opt), ib); - /*<>*/ /*<>*/ var - s = token_string(ib); - /*<>*/ try{ - /*<>*/ var - /*<>*/ _I_ = - /*<>*/ caml_call2 - (CamlinternalFormat[14], s, fmtty), - fmt$3 = _I_; - } - catch(exn$0){ - var exn = caml_wrap_exception(exn$0); - if(exn[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(exn, 0); - var msg = exn[2], fmt$3 = bad_input(msg); - } - /*<>*/ return [0, - fmt$3, - make_scanf(ib, rest$17, readers)]; - case 14: - var rest$18 = fmt$0[3], fmtty$0 = fmt$0[2], pad_opt$0 = fmt$0[1]; - /*<>*/ scan_caml_string - (width_of_pad_opt(pad_opt$0), ib); - /*<>*/ /*<>*/ var - s$0 = token_string(ib); - try{ - /*<>*/ var - fmt$6 = - /*<>*/ caml_call2 - (CamlinternalFormat[13], 0, s$0) - [1], - fmt$7 = - /*<>*/ caml_call2 - (CamlinternalFormat[13], 0, s$0) - [1], - /*<>*/ _K_ = - /*<>*/ caml_call1 - (CamlinternalFormat[21], fmtty$0), - /*<>*/ _L_ = - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _K_), - /*<>*/ fmt$8 = - /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$7, _L_), - /*<>*/ _M_ = - /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], fmtty$0), - /*<>*/ _N_ = - /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$6, _M_), - fmt$5 = fmt$8, - fmt$4 = _N_; - } - catch(exn){ - var exn$0 = caml_wrap_exception(exn); - if(exn$0[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(exn$0, 0); - var - msg$0 = exn$0[2], - _J_ = bad_input(msg$0), - fmt$5 = _J_[2], - fmt$4 = _J_[1]; - } - /*<>*/ return [0, - [0, fmt$4, s$0], - make_scanf - (ib, - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$5, rest$18), - readers)]; - case 15: - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_scanf_bad_conversion_a); - case 16: - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_scanf_bad_conversion_t); - case 17: - /*<>*/ var - rest$19 = fmt$0[2], - formatting_lit = fmt$0[1], - /*<>*/ _O_ = - /*<>*/ caml_call1 - (CamlinternalFormat[17], formatting_lit), - /*<>*/ _P_ = - function(_R_){ /*<>*/ return check_char(ib, _R_);}; - /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _P_, _O_); - var fmt$0 = rest$19; - break; - case 18: - var _Q_ = fmt$0[1]; - if(0 === _Q_[0]){ - var rest$20 = fmt$0[2], fmt$9 = _Q_[1][1]; - /*<>*/ check_char(ib, 64); - /*<>*/ check_char(ib, 123); - /*<>*/ var - /*<>*/ fmt$10 = - /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], fmt$9, rest$20), - fmt$0 = fmt$10; - } - else{ - var rest$21 = fmt$0[2], fmt$11 = _Q_[1][1]; - /*<>*/ check_char(ib, 64); - /*<>*/ check_char(ib, 91); - /*<>*/ var - /*<>*/ fmt$12 = - /*<>*/ caml_call2 - (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); - /*<>*/ var - readers_rest = readers[2], - reader = readers[1], - /*<>*/ x = - /*<>*/ caml_call1(reader, ib); - /*<>*/ return [0, - x, - make_scanf(ib, fmt_rest, readers_rest)]; - case 20: - var width_opt = fmt$0[1], match$1 = fmt$0[3]; - if(typeof match$1 !== "number" && 17 === match$1[0]){ - /*<>*/ var - rest$23 = match$1[2], - fmting_lit$0 = match$1[1], - char_set$0 = fmt$0[2], - /*<>*/ match$2 = - stopper_of_formatting_lit(fmting_lit$0), - str$1 = match$2[2], - stp$0 = match$2[1], - /*<>*/ width$2 = width_of_pad_opt(width_opt); - /*<>*/ scan_chars_in_char_set - (char_set$0, [0, stp$0], width$2, ib); - /*<>*/ var - /*<>*/ s$2 = token_string(ib), - /*<>*/ str_rest$0 = [11, str$1, rest$23]; - /*<>*/ return [0, - s$2, - make_scanf(ib, str_rest$0, readers)]; - } - /*<>*/ var - rest$22 = fmt$0[3], - char_set = fmt$0[2], - /*<>*/ width$1 = width_of_pad_opt(width_opt); - /*<>*/ scan_chars_in_char_set - (char_set, 0, width$1, ib); - /*<>*/ /*<>*/ var - s$1 = token_string(ib); - /*<>*/ return [0, - s$1, - make_scanf(ib, rest$22, readers)]; - case 21: - var rest$24 = fmt$0[2], counter = fmt$0[1]; - switch(counter){ - case 0: - var count = ib[5]; break; - case 1: - var count = char_count(ib); break; - default: var count = ib[6]; - } - /*<>*/ return [0, - count, - make_scanf(ib, rest$24, readers)]; - case 22: - /*<>*/ var - rest$25 = fmt$0[1], - /*<>*/ c$3 = checked_peek_char(ib); - /*<>*/ return [0, - c$3, - make_scanf(ib, rest$25, readers)]; - case 23: - /*<>*/ var - rest$26 = fmt$0[2], - ign = fmt$0[1], - fmt$13 = - /*<>*/ caml_call2 - (CamlinternalFormat[6], ign, rest$26) - [1], - /*<>*/ match$3 = make_scanf(ib, fmt$13, readers); - if(! match$3) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _s_], 1); - var arg_rest = match$3[2]; - /*<>*/ return arg_rest; - default: - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_scanf_bad_conversion_custo); - } - } - /*<>*/ } - 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]); - /*<>*/ try{ - /*<>*/ /*<>*/ var - args$1 = make_scanf(ib, fmt, readers); - } - catch(exc$0){ - var exc = caml_wrap_exception(exc$0); - if - (exc[1] !== Scan_failure && exc[1] !== Stdlib[7] && exc !== Stdlib[12]){ - if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); - /*<>*/ var - msg = exc[2], - /*<>*/ _C_ = - /*<>*/ caml_call1(Stdlib_String[24], str), - /*<>*/ _D_ = - /*<>*/ caml_call2(Stdlib[28], _C_, cst$0), - /*<>*/ _E_ = - /*<>*/ caml_call2(Stdlib[28], cst_in_format, _D_), - /*<>*/ _F_ = - /*<>*/ caml_call2(Stdlib[28], msg, _E_); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], _F_); - } - /*<>*/ return /*<>*/ caml_call2 - (ef, ib, exc); - } - var f = f$1, args = args$1; - /*<>*/ for(;;){ - if(! args) - /*<>*/ return /*<>*/ caml_call1 - (af, f); - /*<>*/ var - args$0 = args[2], - x = args[1], - /*<>*/ f$0 = - /*<>*/ caml_call1(f, x), - f = f$0, - args = args$0; - } - /*<>*/ } - /*<>*/ return take_format_readers(k, fmt); - } - function kscanf(ib, ef, fmt){ - /*<>*/ return kscanf_gen - (ib, - ef, - function(x){ - /*<>*/ return x; - /*<>*/ }, - fmt); - /*<>*/ } - function kscanf_opt(ib, fmt){ - function _A_(x){ - /*<>*/ return [0, x]; - /*<>*/ } - /*<>*/ return kscanf_gen - (ib, - function(param, _B_){ - /*<>*/ return 0; - /*<>*/ }, - _A_, - fmt); - /*<>*/ } - function bscanf(ib, fmt){ - /*<>*/ return kscanf(ib, scanf_bad_input, fmt); - /*<>*/ } - function bscanf_opt(ib, fmt){ - /*<>*/ return kscanf_opt(ib, fmt); - /*<>*/ } - function ksscanf(s, ef, fmt){ - /*<>*/ return kscanf(from_string(s), ef, fmt); - /*<>*/ } - function sscanf(s, fmt){ - /*<>*/ return kscanf - (from_string(s), scanf_bad_input, fmt); - /*<>*/ } - function sscanf_opt(s, fmt){ - /*<>*/ return kscanf_opt(from_string(s), fmt); - /*<>*/ } - function scanf(fmt){ - /*<>*/ return kscanf(stdin, scanf_bad_input, fmt); - /*<>*/ } - function scanf_opt(fmt){ - /*<>*/ return kscanf_opt(stdin, fmt); - /*<>*/ } - function bscanf_format(ib, format, f){ - /*<>*/ scan_caml_string(Stdlib[19], ib); - /*<>*/ /*<>*/ var - str = token_string(ib); - /*<>*/ try{ - /*<>*/ var - /*<>*/ _z_ = - /*<>*/ caml_call2 - (CamlinternalFormat[15], str, format), - fmt = _z_; - } - catch(exn$0){ - var exn = caml_wrap_exception(exn$0); - if(exn[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(exn, 0); - var msg = exn[2], fmt = bad_input(msg); - } - /*<>*/ return /*<>*/ caml_call1 - (f, fmt); - /*<>*/ } - function sscanf_format(s, format, f){ - /*<>*/ return bscanf_format(from_string(s), format, f); - /*<>*/ } - function format_from_string(s, fmt){ - /*<>*/ function _w_(x){ - /*<>*/ return x; - /*<>*/ } - /*<>*/ var - /*<>*/ _x_ = - /*<>*/ caml_call1(Stdlib_String[24], s), - /*<>*/ _y_ = - /*<>*/ caml_call2(Stdlib[28], _x_, cst$1); - /*<>*/ return sscanf_format - ( /*<>*/ caml_call2(Stdlib[28], cst$2, _y_), - fmt, - _w_); - /*<>*/ } - function unescaped(s){ - /*<>*/ function _u_(x){ - /*<>*/ return x; - /*<>*/ } - /*<>*/ /*<>*/ var - _v_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); - /*<>*/ return /*<>*/ caml_call1 - (sscanf - ( /*<>*/ caml_call2(Stdlib[28], cst$4, _v_), - _t_), - _u_); - /*<>*/ } - var - Stdlib_Scanf = - [0, - [0, - stdin, - open_in, - open_in_bin, - close_in, - open_in, - open_in_bin, - from_string, - from_function, - from_channel, - end_of_input, - beginning_of_input, - name_of_input], - Scan_failure, - bscanf, - bscanf_opt, - sscanf, - sscanf_opt, - scanf, - scanf_opt, - kscanf, - ksscanf, - bscanf_format, - sscanf_format, - format_from_string, - unescaped]; - runtime.caml_register_global(64, Stdlib_Scanf, "Stdlib__Scanf"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Callback -//# unitInfo: Requires: Stdlib, Stdlib__Obj -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_register_named_value = runtime.caml_register_named_value, - global_data = runtime.caml_get_global_data(), - Stdlib_Obj = global_data.Stdlib__Obj, - register = caml_register_named_value; - function register_exception(name, exn){ - /*<>*/ var - _a_ = Stdlib_Obj[10], - slot = - /*<>*/ runtime.caml_obj_tag(exn) === _a_ - ? exn - : exn[1]; - /*<>*/ return /*<>*/ caml_register_named_value - (name, slot); - /*<>*/ } - var Stdlib_Callback = [0, register, register_exception]; - runtime.caml_register_global(1, Stdlib_Callback, "Stdlib__Callback"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: CamlinternalOO -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Map, Stdlib__Obj, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_camlinternalOO_ml = "camlinternalOO.ml", - caml_check_bound = runtime.caml_check_bound, - caml_div = runtime.caml_div, - caml_get_public_method = runtime.caml_get_public_method, - caml_make_vect = runtime.caml_make_vect, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_obj_block = runtime.caml_obj_block, - caml_set_oo_id = runtime.caml_set_oo_id, - caml_string_compare = runtime.caml_string_compare, - 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) - : 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 - global_data = runtime.caml_get_global_data(), - Assert_failure = global_data.Assert_failure, - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib_Obj = global_data.Stdlib__Obj, - Stdlib = global_data.Stdlib, - Stdlib_Array = global_data.Stdlib__Array, - Stdlib_List = global_data.Stdlib__List, - Stdlib_Map = global_data.Stdlib__Map, - _g_ = [0, cst_camlinternalOO_ml, 439, 17], - _f_ = [0, cst_camlinternalOO_ml, 421, 13], - _e_ = [0, cst_camlinternalOO_ml, 418, 13], - _d_ = [0, cst_camlinternalOO_ml, 415, 13], - _c_ = [0, cst_camlinternalOO_ml, 412, 13], - _b_ = [0, cst_camlinternalOO_ml, 409, 13], - _a_ = [0, cst_camlinternalOO_ml, 281, 50]; - function copy(o){ - /*<>*/ /*<>*/ var - o$0 = /*<>*/ o.slice(); - /*<>*/ return /*<>*/ caml_set_oo_id - (o$0); - /*<>*/ } - /*<>*/ var - /*<>*/ params = [0, 1, 1, 1, 3, 16], - /*<>*/ initial_object_size = 2, - dummy_item = 0; - function public_method_label(s){ - /*<>*/ var - /*<>*/ accu = [0, 0], - _aE_ = runtime.caml_ml_string_length(s) - 1 | 0, - /*<>*/ _aD_ = 0; - if(_aE_ >= 0){ - var i = _aD_; - for(;;){ - /*<>*/ /*<>*/ var - _aF_ = /*<>*/ runtime.caml_string_get(s, i); - accu[1] = (223 * accu[1] | 0) + _aF_ | 0; - /*<>*/ /*<>*/ var - _aG_ = i + 1 | 0; - if(_aE_ === i) break; - var i = _aG_; - } - } - accu[1] = accu[1] & 2147483647; - var tag = 1073741823 < accu[1] ? accu[1] + 2147483648 | 0 : accu[1]; - /*<>*/ return tag; - /*<>*/ } - /*<>*/ var - compare = caml_string_compare, - Vars = caml_call1(Stdlib_Map[1], [0, compare]), - compare$0 = caml_string_compare, - Meths = caml_call1(Stdlib_Map[1], [0, compare$0]), - compare$1 = runtime.caml_int_compare, - Labs = caml_call1(Stdlib_Map[1], [0, compare$1]), - /*<>*/ dummy_table = - [0, 0, [0, dummy_item], Meths[1], Labs[1], 0, 0, Vars[1], 0], - /*<>*/ table_count = [0, 0], - /*<>*/ dummy_met = - /*<>*/ caml_obj_block(0, 0); - function fit_size(n){ - /*<>*/ return 2 < n - ? fit_size((n + 1 | 0) / 2 | 0) * 2 | 0 - : n; - /*<>*/ } - function new_table(pub_labels){ - /*<>*/ table_count[1]++; - /*<>*/ var - len = pub_labels.length - 1, - /*<>*/ methods = - /*<>*/ caml_make_vect - ((len * 2 | 0) + 2 | 0, dummy_met); - /*<>*/ caml_check_bound(methods, 0)[1] = len; - var - _aw_ = Stdlib_Sys[9], - _ax_ = - ( /*<>*/ runtime.caml_mul - (fit_size(len), _aw_) - / 8 - | 0) - - 1 - | 0; - /*<>*/ caml_check_bound(methods, 1)[2] = _ax_; - /*<>*/ var - _az_ = len - 1 | 0, - /*<>*/ _ay_ = 0; - if(_az_ >= 0){ - var i = _ay_; - for(;;){ - /*<>*/ var - _aB_ = (i * 2 | 0) + 3 | 0, - /*<>*/ _aA_ = - caml_check_bound(pub_labels, i)[1 + i]; - /*<>*/ caml_check_bound(methods, _aB_) - [1 + _aB_] - = _aA_; - /*<>*/ /*<>*/ var - _aC_ = i + 1 | 0; - if(_az_ === i) break; - var i = _aC_; - } - } - /*<>*/ return [0, - initial_object_size, - methods, - Meths[1], - Labs[1], - 0, - 0, - Vars[1], - 0]; - /*<>*/ } - function resize(array, new_size){ - /*<>*/ var - old_size = array[2].length - 1, - _au_ = old_size < new_size ? 1 : 0; - if(_au_){ - /*<>*/ /*<>*/ var - new_buck = - /*<>*/ caml_make_vect(new_size, dummy_met); - /*<>*/ /*<>*/ caml_call5 - (Stdlib_Array[8], array[2], 0, new_buck, 0, old_size); - array[2] = new_buck; - var _av_ = 0; - } - else - var _av_ = _au_; - return _av_; - /*<>*/ } - /*<>*/ var - /*<>*/ method_count = [0, 0], - /*<>*/ inst_var_count = [0, 0]; - function new_method(table){ - /*<>*/ var index = table[2].length - 1; - /*<>*/ resize(table, index + 1 | 0); - /*<>*/ return index; - /*<>*/ } - function get_method_label(table, name){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _as_ = - /*<>*/ caml_call2(Meths[28], name, table[3]); - /*<>*/ return _as_; - } - catch(_at_){ - var _ar_ = caml_wrap_exception(_at_); - if(_ar_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ar_, 0); - /*<>*/ /*<>*/ var - label = new_method(table); - table[3] = - /*<>*/ caml_call3 - (Meths[4], name, label, table[3]); - table[4] = - /*<>*/ caml_call3 - (Labs[4], label, 1, table[4]); - /*<>*/ return label; - } - /*<>*/ } - function get_method_labels(table, names){ - /*<>*/ function _ap_(_aq_){ - /*<>*/ return get_method_label(table, _aq_); - } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Array[13], _ap_, names); - /*<>*/ } - function set_method(table, label, element){ - /*<>*/ method_count[1]++; - /*<>*/ return /*<>*/ caml_call2 - (Labs[28], label, table[4]) - ? (resize - (table, label + 1 | 0), - caml_check_bound(table[2], label)[1 + label] = element, - 0) - : (table[6] = [0, [0, label, element], table[6]], 0); - /*<>*/ } - function get_method(table, label){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _an_ = - /*<>*/ caml_call2 - (Stdlib_List[46], label, table[6]); - /*<>*/ return _an_; - } - catch(_ao_){ - var _am_ = caml_wrap_exception(_ao_); - if(_am_ === Stdlib[8]) - /*<>*/ return caml_check_bound - (table[2], label) - [1 + label]; - throw caml_maybe_attach_backtrace(_am_, 0); - } - /*<>*/ } - function to_list(arr){ - /*<>*/ return 0 === arr - ? 0 - : /*<>*/ caml_call1 - (Stdlib_Array[9], arr); - /*<>*/ } - function narrow(table, vars, virt_meths, concr_meths){ - /*<>*/ var - /*<>*/ vars$0 = to_list(vars), - /*<>*/ virt_meths$0 = to_list(virt_meths), - /*<>*/ concr_meths$0 = to_list(concr_meths); - /*<>*/ function _X_(_al_){ - /*<>*/ return get_method_label(table, _al_); - } - /*<>*/ /*<>*/ var - virt_meth_labs = - /*<>*/ caml_call2 - (Stdlib_List[19], _X_, virt_meths$0); - /*<>*/ function _Y_(_ak_){ - /*<>*/ return get_method_label(table, _ak_); - } - /*<>*/ /*<>*/ var - concr_meth_labs = - /*<>*/ caml_call2 - (Stdlib_List[19], _Y_, concr_meths$0); - table[5] = - [0, - [0, table[3], table[4], table[6], table[7], virt_meth_labs, vars$0], - table[5]]; - var _Z_ = Vars[1], ___ = table[7]; - function _$_(lab, info, tvars){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[36], lab, vars$0) - ? /*<>*/ caml_call3 - (Vars[4], lab, info, tvars) - : tvars; - /*<>*/ } - table[7] = - /*<>*/ caml_call3(Vars[13], _$_, ___, _Z_); - /*<>*/ var - /*<>*/ by_name = [0, Meths[1]], - /*<>*/ by_label = [0, Labs[1]]; - function _aa_(met, label){ - /*<>*/ by_name[1] = - /*<>*/ caml_call3 - (Meths[4], met, label, by_name[1]); - var _af_ = by_label[1]; - try{ - /*<>*/ var - /*<>*/ _ai_ = - /*<>*/ caml_call2 - (Labs[28], label, table[4]), - _ah_ = _ai_; - } - catch(_aj_){ - var _ag_ = caml_wrap_exception(_aj_); - if(_ag_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ag_, 0); - var _ah_ = 1; - } - by_label[1] = - /*<>*/ caml_call3(Labs[4], label, _ah_, _af_); - return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call3 - (Stdlib_List[27], _aa_, concr_meths$0, concr_meth_labs); - function _ab_(met, label){ - /*<>*/ by_name[1] = - /*<>*/ caml_call3 - (Meths[4], met, label, by_name[1]); - by_label[1] = - /*<>*/ caml_call3 - (Labs[4], label, 0, by_label[1]); - return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call3 - (Stdlib_List[27], _ab_, virt_meths$0, virt_meth_labs); - table[3] = by_name[1]; - table[4] = by_label[1]; - /*<>*/ var - /*<>*/ _ac_ = 0, - _ad_ = table[6]; - function _ae_(met, hm){ - /*<>*/ var lab = met[1]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[36], lab, virt_meth_labs) - ? hm - : [0, met, hm]; - /*<>*/ } - table[6] = - /*<>*/ caml_call3 - (Stdlib_List[26], _ae_, _ad_, _ac_); - return 0; - /*<>*/ } - function widen(table){ - /*<>*/ var - /*<>*/ match = - /*<>*/ caml_call1(Stdlib_List[5], 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[6], table[5]); - function _T_(s, v){ - /*<>*/ /*<>*/ var - _W_ = - /*<>*/ caml_call2(Vars[28], v, table[7]); - /*<>*/ return /*<>*/ caml_call3 - (Vars[4], v, _W_, s); - /*<>*/ } - table[7] = - /*<>*/ caml_call3 - (Stdlib_List[25], _T_, saved_vars, vars); - table[3] = by_name; - table[4] = by_label; - var _U_ = table[6]; - function _V_(met, hm){ - /*<>*/ var lab = met[1]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[36], lab, virt_meths) - ? hm - : [0, met, hm]; - /*<>*/ } - table[6] = - /*<>*/ caml_call3 - (Stdlib_List[26], _V_, _U_, saved_hidden_meths); - return 0; - /*<>*/ } - function new_variable(table, name){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _R_ = - /*<>*/ caml_call2(Vars[28], name, table[7]); - /*<>*/ return _R_; - } - catch(_S_){ - var _Q_ = caml_wrap_exception(_S_); - if(_Q_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Q_, 0); - var index = table[1]; - table[1] = index + 1 | 0; - /*<>*/ if - ( /*<>*/ runtime.caml_string_notequal(name, "")) - table[7] = - /*<>*/ caml_call3 - (Vars[4], name, index, table[7]); - /*<>*/ return index; - } - /*<>*/ } - function to_array(arr){ - /*<>*/ return /*<>*/ runtime.caml_equal - (arr, 0) - ? [0] - : arr; - /*<>*/ } - function new_methods_variables(table, meths, vals){ - /*<>*/ var - /*<>*/ meths$0 = to_array(meths), - /*<>*/ nmeths = meths$0.length - 1, - nvals = vals.length - 1, - /*<>*/ res = - /*<>*/ caml_make_vect(nmeths + nvals | 0, 0), - /*<>*/ _I_ = nmeths - 1 | 0, - /*<>*/ _H_ = 0; - if(_I_ >= 0){ - var i$0 = _H_; - for(;;){ - /*<>*/ /*<>*/ var - _O_ = get_method_label(table, caml_check_bound(meths$0, i$0)[1 + i$0]); - /*<>*/ caml_check_bound(res, i$0)[1 + i$0] = _O_; - /*<>*/ /*<>*/ var - _P_ = i$0 + 1 | 0; - if(_I_ === i$0) break; - var i$0 = _P_; - } - } - /*<>*/ var - _K_ = nvals - 1 | 0, - /*<>*/ _J_ = 0; - if(_K_ >= 0){ - var i = _J_; - for(;;){ - /*<>*/ var - _M_ = i + nmeths | 0, - /*<>*/ _L_ = - new_variable(table, caml_check_bound(vals, i)[1 + i]); - /*<>*/ caml_check_bound(res, _M_)[1 + _M_] = _L_; - /*<>*/ /*<>*/ var - _N_ = i + 1 | 0; - if(_K_ === i) break; - var i = _N_; - } - } - /*<>*/ return res; - /*<>*/ } - function get_variable(table, name){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _F_ = - /*<>*/ caml_call2(Vars[28], name, table[7]); - /*<>*/ return _F_; - } - catch(_G_){ - var _E_ = caml_wrap_exception(_G_); - if(_E_ === Stdlib[8]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - throw caml_maybe_attach_backtrace(_E_, 0); - } - /*<>*/ } - function get_variables(table, names){ - /*<>*/ function _C_(_D_){ - /*<>*/ return get_variable(table, _D_); - } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Array[13], _C_, names); - /*<>*/ } - function add_initializer(table, f){ - /*<>*/ table[8] = [0, f, table[8]]; - return 0; - /*<>*/ } - function create_table(public_methods){ - /*<>*/ if(0 === public_methods) - /*<>*/ return new_table([0]); - /*<>*/ var - /*<>*/ tags = - /*<>*/ caml_call2 - (Stdlib_Array[13], public_method_label, public_methods), - /*<>*/ table = new_table(tags); - function _B_(i, met){ - /*<>*/ var lab = (i * 2 | 0) + 2 | 0; - table[3] = - /*<>*/ caml_call3 - (Meths[4], met, lab, table[3]); - table[4] = - /*<>*/ caml_call3(Labs[4], lab, 1, table[4]); - return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[12], _B_, public_methods); - /*<>*/ return table; - /*<>*/ } - function init_class(table){ - /*<>*/ inst_var_count[1] = - (inst_var_count[1] + table[1] | 0) - 1 | 0; - table[8] = - /*<>*/ caml_call1(Stdlib_List[9], table[8]); - /*<>*/ /*<>*/ var - _A_ = Stdlib_Sys[9]; - return resize - (table, - 3 + caml_div(caml_check_bound(table[2], 1)[2] * 16 | 0, _A_) | 0); - /*<>*/ } - function inherits(cla, vals, virt_meths, concr_meths, param, top){ - var env = param[4], super$0 = param[2]; - /*<>*/ narrow - (cla, vals, virt_meths, concr_meths); - var - init = - top - ? /*<>*/ caml_call2(super$0, cla, env) - : /*<>*/ caml_call1(super$0, cla); - /*<>*/ widen(cla); - /*<>*/ var - /*<>*/ _s_ = 0, - /*<>*/ _t_ = to_array(concr_meths); - function _u_(nm){ - /*<>*/ return get_method - (cla, get_method_label(cla, nm)); - /*<>*/ } - /*<>*/ var - _v_ = - [0, - /*<>*/ caml_call2 - (Stdlib_Array[13], _u_, _t_), - _s_], - /*<>*/ _w_ = to_array(vals); - /*<>*/ function _x_(_z_){ - /*<>*/ return get_variable(cla, _z_); - } - /*<>*/ /*<>*/ var - _y_ = - [0, - [0, init], - [0, - /*<>*/ caml_call2 - (Stdlib_Array[13], _x_, _w_), - _v_]]; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Array[4], _y_); - } - function make_class(pub_meths, class_init){ - /*<>*/ var - /*<>*/ table = create_table(pub_meths), - /*<>*/ env_init = - /*<>*/ caml_call1(class_init, table); - /*<>*/ init_class(table); - /*<>*/ return [0, - /*<>*/ caml_call1(env_init, 0), - class_init, - env_init, - 0]; - /*<>*/ } - function make_class_store(pub_meths, class_init, init_table){ - /*<>*/ var - /*<>*/ table = create_table(pub_meths), - /*<>*/ env_init = - /*<>*/ caml_call1(class_init, table); - /*<>*/ init_class(table); - init_table[2] = class_init; - init_table[1] = env_init; - return 0; - /*<>*/ } - function dummy_class(loc){ - function undef(param){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[15], loc], 1); - /*<>*/ } - /*<>*/ return [0, undef, undef, undef, 0]; - /*<>*/ } - function create_object(table){ - /*<>*/ /*<>*/ var - obj = - /*<>*/ caml_obj_block - (Stdlib_Obj[10], table[1]); - /*<>*/ obj[1] = table[2]; - /*<>*/ return /*<>*/ caml_set_oo_id - (obj); - /*<>*/ } - function create_object_opt(obj_0, table){ - /*<>*/ if(obj_0) - /*<>*/ return obj_0; - /*<>*/ /*<>*/ var - obj = - /*<>*/ caml_obj_block - (Stdlib_Obj[10], table[1]); - /*<>*/ obj[1] = table[2]; - /*<>*/ return /*<>*/ caml_set_oo_id - (obj); - /*<>*/ } - function iter_f(obj, param){ - var param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], f = param$0[1]; - /*<>*/ /*<>*/ caml_call1 - (f, obj); - var param$0 = l; - } - } - function run_initializers(obj, table){ - /*<>*/ var - inits = table[8], - _r_ = 0 !== inits ? 1 : 0; - return _r_ ? iter_f(obj, inits) : _r_; - /*<>*/ } - function run_initializers_opt(obj_0, obj, table){ - /*<>*/ if(obj_0) - /*<>*/ return obj; - var inits = table[8]; - if(0 !== inits) /*<>*/ iter_f(obj, inits); - /*<>*/ return obj; - /*<>*/ } - function create_object_and_run_initiali(obj_0, table){ - /*<>*/ if(obj_0) - /*<>*/ return obj_0; - /*<>*/ /*<>*/ var - obj = create_object(table); - /*<>*/ run_initializers(obj, table); - /*<>*/ return obj; - /*<>*/ } - function get_data(param){ - /*<>*/ if(param) - /*<>*/ return param[2]; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _e_], 1); - /*<>*/ } - function build_path(n, keys, tables){ - /*<>*/ var - /*<>*/ res = [0, 0, 0, 0], - /*<>*/ r = [0, res], - /*<>*/ _o_ = 0; - if(n >= 0){ - var i = _o_; - for(;;){ - var _p_ = r[1]; - r[1] = [0, caml_check_bound(keys, i)[1 + i], _p_, 0]; - /*<>*/ /*<>*/ var - _q_ = i + 1 | 0; - if(n === i) break; - var i = _q_; - } - } - var v = r[1]; - if(! tables) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); - tables[2] = v; - /*<>*/ return res; - /*<>*/ } - function lookup_tables(root, keys){ - /*<>*/ /*<>*/ var - root_data = get_data(root); - if(! root_data) - /*<>*/ return build_path - (keys.length - 1 - 1 | 0, keys, root); - var i$1 = keys.length - 1 - 1 | 0, i = i$1, tables$0 = root_data; - /*<>*/ for(;;){ - if(0 > i) /*<>*/ return tables$0; - /*<>*/ var - /*<>*/ key = caml_check_bound(keys, i)[1 + i], - tables$1 = tables$0; - /*<>*/ for(;;){ - if(! tables$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); - if(tables$1[1] === key){ - /*<>*/ /*<>*/ var - tables_data = get_data(tables$1); - if(! tables_data) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _g_], 1); - var i$0 = i - 1 | 0, i = i$0, tables$0 = tables_data; - break; - } - if(! tables$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _f_], 1); - /*<>*/ /*<>*/ var - tables = tables$1[3]; - if(! tables){ - /*<>*/ /*<>*/ var - next = [0, key, 0, 0]; - if(! tables$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); - tables$1[3] = next; - /*<>*/ return build_path - (i - 1 | 0, keys, next); - } - var tables$1 = tables; - } - } - /*<>*/ } - function new_cache(table){ - /*<>*/ /*<>*/ var - n = new_method(table); - a: - { - if(0 !== (n % 2 | 0)){ - var _n_ = Stdlib_Sys[9]; - if - ((2 + caml_div(caml_check_bound(table[2], 1)[2] * 16 | 0, _n_) | 0) - >= n){ - var n$0 = new_method(table); - break a; - } - } - var n$0 = n; - } - /*<>*/ caml_check_bound(table[2], n$0)[1 + n$0] - = 0; - /*<>*/ return n$0; - /*<>*/ } - function set_methods(table, methods){ - /*<>*/ var - len = methods.length - 1, - /*<>*/ i = [0, 0]; - for(;;){ - if(i[1] >= len) return 0; - /*<>*/ var - _h_ = i[1], - /*<>*/ label = - caml_check_bound(methods, _h_)[1 + _h_], - next = - function(param){ - /*<>*/ i[1]++; - var _m_ = i[1]; - /*<>*/ return caml_check_bound - (methods, _m_) - [1 + _m_]; - /*<>*/ }, - /*<>*/ clo = next(0); - if(typeof clo === "number") - switch(clo){ - case 0: - /*<>*/ var - /*<>*/ x = next(0), - clo$0 = - function(x){ - /*<>*/ return function(obj){ - /*<>*/ return x; /*<>*/ }; - } - (x); - break; - case 1: - /*<>*/ var - /*<>*/ n = next(0), - clo$0 = - function(n){ - /*<>*/ return function(obj){ - /*<>*/ return obj[1 + n]; /*<>*/ }; - } - (n); - break; - case 2: - /*<>*/ var - /*<>*/ e = next(0), - /*<>*/ n$0 = next(0), - clo$0 = - function(e, n){ - /*<>*/ return function(obj){ - /*<>*/ return obj[1 + e][1 + n]; /*<>*/ }; - } - (e, n$0); - break; - case 3: - /*<>*/ var - /*<>*/ n$1 = next(0), - clo$0 = - function(n){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call1 - (obj[1][1 + n], obj); /*<>*/ }; - } - (n$1); - break; - case 4: - /*<>*/ var - /*<>*/ n$2 = next(0), - clo$0 = - function(n){ - /*<>*/ return function(obj, x){ - /*<>*/ obj[1 + n] = x; - return 0; /*<>*/ }; - } - (n$2); - break; - case 5: - /*<>*/ var - /*<>*/ f = next(0), - /*<>*/ x$0 = next(0), - clo$0 = - function(f, x){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call1 - (f, x); /*<>*/ }; - } - (f, x$0); - break; - case 6: - /*<>*/ var - /*<>*/ f$0 = next(0), - /*<>*/ n$3 = next(0), - clo$0 = - function(f, n){ - /*<>*/ return function(obj){ - /*<>*/ return caml_call1 - (f, obj[1 + n]); /*<>*/ }; - } - (f$0, n$3); - break; - case 7: - /*<>*/ var - /*<>*/ f$1 = next(0), - /*<>*/ e$0 = next(0), - /*<>*/ n$4 = next(0), - clo$0 = - function(f, e, n){ - /*<>*/ return function(obj){ - /*<>*/ return caml_call1 - (f, obj[1 + e][1 + n]); /*<>*/ }; - } - (f$1, e$0, n$4); - break; - case 8: - /*<>*/ var - /*<>*/ f$2 = next(0), - /*<>*/ n$5 = next(0), - clo$0 = - function(f, n){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call1 - (f, - /*<>*/ caml_call1 - (obj[1][1 + n], obj)); /*<>*/ }; - } - (f$2, n$5); - break; - case 9: - /*<>*/ var - /*<>*/ f$3 = next(0), - /*<>*/ x$1 = next(0), - /*<>*/ y = next(0), - clo$0 = - function(f, x, y){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (f, x, y); /*<>*/ }; - } - (f$3, x$1, y); - break; - case 10: - /*<>*/ var - /*<>*/ f$4 = next(0), - /*<>*/ x$2 = next(0), - /*<>*/ n$6 = next(0), - clo$0 = - function(f, x, n){ - /*<>*/ return function(obj){ - /*<>*/ return caml_call2 - (f, x, obj[1 + n]); /*<>*/ }; - } - (f$4, x$2, n$6); - break; - case 11: - /*<>*/ var - /*<>*/ f$5 = next(0), - /*<>*/ x$3 = next(0), - /*<>*/ e$1 = next(0), - /*<>*/ n$7 = next(0), - clo$0 = - function(f, x, e, n){ - /*<>*/ return function(obj){ - /*<>*/ return caml_call2 - (f, x, obj[1 + e][1 + n]); /*<>*/ }; - } - (f$5, x$3, e$1, n$7); - break; - case 12: - /*<>*/ var - /*<>*/ f$6 = next(0), - /*<>*/ x$4 = next(0), - /*<>*/ n$8 = next(0), - clo$0 = - function(f, x, n){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (f, - x, - /*<>*/ caml_call1 - (obj[1][1 + n], obj)); /*<>*/ }; - } - (f$6, x$4, n$8); - break; - case 13: - /*<>*/ var - /*<>*/ f$7 = next(0), - /*<>*/ n$9 = next(0), - /*<>*/ x$5 = next(0), - clo$0 = - function(f, n, x){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (f, obj[1 + n], x); /*<>*/ }; - } - (f$7, n$9, x$5); - break; - case 14: - /*<>*/ var - /*<>*/ f$8 = next(0), - /*<>*/ e$2 = next(0), - /*<>*/ n$10 = next(0), - /*<>*/ x$6 = next(0), - clo$0 = - function(f, e, n, x){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (f, obj[1 + e][1 + n], x); /*<>*/ }; - } - (f$8, e$2, n$10, x$6); - break; - case 15: - /*<>*/ var - /*<>*/ f$9 = next(0), - /*<>*/ n$11 = next(0), - /*<>*/ x$7 = next(0), - clo$0 = - function(f, n, x){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (f, - /*<>*/ caml_call1 - (obj[1][1 + n], obj), - x); /*<>*/ }; - } - (f$9, n$11, x$7); - break; - case 16: - /*<>*/ var - /*<>*/ n$12 = next(0), - /*<>*/ x$8 = next(0), - clo$0 = - function(n, x){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (obj[1][1 + n], obj, x); /*<>*/ }; - } - (n$12, x$8); - break; - case 17: - /*<>*/ var - /*<>*/ n$13 = next(0), - /*<>*/ m = next(0), - clo$0 = - function(n, m){ - /*<>*/ return function(obj){ - /*<>*/ return caml_call2 - (obj[1][1 + n], obj, obj[1 + m]); /*<>*/ }; - } - (n$13, m); - break; - case 18: - /*<>*/ var - /*<>*/ n$14 = next(0), - /*<>*/ e$3 = next(0), - /*<>*/ m$0 = next(0), - clo$0 = - function(n, e, m){ - /*<>*/ return function(obj){ - /*<>*/ return caml_call2 - (obj[1][1 + n], obj, obj[1 + e][1 + m]); /*<>*/ }; - } - (n$14, e$3, m$0); - break; - case 19: - /*<>*/ var - /*<>*/ n$15 = next(0), - /*<>*/ m$1 = next(0), - clo$0 = - function(n, m){ - /*<>*/ return function(obj){ - /*<>*/ /*<>*/ var - _k_ = - /*<>*/ caml_call1 - (obj[1][1 + m], obj); - /*<>*/ return /*<>*/ caml_call2 - (obj[1][1 + n], obj, _k_); /*<>*/ }; - } - (n$15, m$1); - break; - case 20: - /*<>*/ var - /*<>*/ m$2 = next(0), - /*<>*/ x$9 = next(0); - /*<>*/ new_cache(table); - var - clo$0 = - function(m, x){ - /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call1 - (caml_get_public_method(x, m, 0), x); /*<>*/ }; - } - (m$2, x$9); - break; - case 21: - /*<>*/ var - /*<>*/ m$3 = next(0), - /*<>*/ n$16 = next(0); - /*<>*/ new_cache(table); - var - clo$0 = - function(m, n){ - /*<>*/ return function(obj){ - /*<>*/ var _j_ = obj[1 + n]; - return caml_call1(caml_get_public_method(_j_, m, 0), _j_); /*<>*/ }; - } - (m$3, n$16); - break; - case 22: - /*<>*/ var - /*<>*/ m$4 = next(0), - /*<>*/ e$4 = next(0), - /*<>*/ n$17 = next(0); - /*<>*/ new_cache(table); - var - clo$0 = - function(m, e, n){ - /*<>*/ return function(obj){ - /*<>*/ var _i_ = obj[1 + e][1 + n]; - return caml_call1(caml_get_public_method(_i_, m, 0), _i_); /*<>*/ }; - } - (m$4, e$4, n$17); - break; - default: - /*<>*/ var - /*<>*/ m$5 = next(0), - /*<>*/ n$18 = next(0); - /*<>*/ new_cache(table); - var - clo$0 = - function(m, n){ - /*<>*/ return function(obj){ - /*<>*/ /*<>*/ var - _l_ = - /*<>*/ caml_call1 - (obj[1][1 + n], obj); - /*<>*/ return /*<>*/ caml_call1 - (caml_get_public_method(_l_, m, 0), _l_); /*<>*/ }; - } - (m$5, n$18); - } - else - var clo$0 = clo; - /*<>*/ set_method(table, label, clo$0); - i[1]++; - } - /*<>*/ } - function stats(param){ - /*<>*/ return [0, - table_count[1], - method_count[1], - inst_var_count[1]]; - /*<>*/ } - var - CamlinternalOO = - [0, - public_method_label, - new_method, - new_variable, - new_methods_variables, - get_variable, - get_variables, - get_method_label, - get_method_labels, - get_method, - set_method, - set_methods, - narrow, - widen, - add_initializer, - dummy_table, - create_table, - init_class, - inherits, - make_class, - make_class_store, - dummy_class, - copy, - create_object, - create_object_opt, - run_initializers, - run_initializers_opt, - create_object_and_run_initiali, - lookup_tables, - params, - stats]; - runtime.caml_register_global(17, CamlinternalOO, "CamlinternalOO"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Oo -//# unitInfo: Requires: CamlinternalOO -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - global_data = runtime.caml_get_global_data(), - CamlinternalOO = global_data.CamlinternalOO, - copy = CamlinternalOO[22], - new_method = CamlinternalOO[1], - public_method_label = CamlinternalOO[1], - Stdlib_Oo = [0, copy, new_method, public_method_label]; - runtime.caml_register_global(1, Stdlib_Oo, "Stdlib__Oo"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: CamlinternalMod -//# unitInfo: Requires: Assert_failure, CamlinternalLazy, CamlinternalOO, Stdlib, Stdlib__Obj -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst_camlinternalMod_ml = "camlinternalMod.ml", - caml_check_bound = runtime.caml_check_bound, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - 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 - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - CamlinternalLazy = global_data.CamlinternalLazy, - CamlinternalOO = global_data.CamlinternalOO, - Assert_failure = global_data.Assert_failure, - _a_ = [0, cst_camlinternalMod_ml, 72, 5], - _b_ = [0, cst_camlinternalMod_ml, 81, 2], - cst_CamlinternalMod_update_mod = - "CamlinternalMod.update_mod: not a module", - cst_CamlinternalMod_init_mod_n = "CamlinternalMod.init_mod: not a module"; - function init_mod_block(loc, comps$0){ - /*<>*/ var - length = comps$0.length - 1, - /*<>*/ modu = - /*<>*/ runtime.caml_obj_block(0, length), - /*<>*/ _h_ = length - 1 | 0, - /*<>*/ _g_ = 0; - if(_h_ >= 0){ - var i = _g_; - for(;;){ - /*<>*/ /*<>*/ var - shape = caml_check_bound(comps$0, i)[1 + i]; - if(typeof shape === "number") - switch(shape){ - case 0: - var - fn$0 = - function(i){ - function fn(x){ - /*<>*/ /*<>*/ var - fn$0 = modu[1 + i]; - if(fn === fn$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[15], loc], 1); - /*<>*/ return /*<>*/ caml_call1 - (fn$0, x); - /*<>*/ } - return fn; - }, - fn = fn$0(i), - init = fn; - break; - case 1: - var l = []; - runtime.caml_update_dummy - (l, - [246, - function(l, i){ - /*<>*/ return function(param){ - /*<>*/ /*<>*/ var - l$0 = modu[1 + i]; - if(l === l$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[15], loc], 1); - var _j_ = caml_obj_tag(l$0); - if(250 === _j_) return l$0[1]; - if(246 !== _j_ && 244 !== _j_) - /*<>*/ return l$0; - /*<>*/ return /*<>*/ caml_call1 - (CamlinternalLazy[2], l$0);}; - } - (l, i)]); - var init = l; - break; - default: - var - init = - /*<>*/ caml_call1 - (CamlinternalOO[21], loc); - } - else if(0 === shape[0]) - var comps = shape[1], init = init_mod_block(loc, comps); - else - var v = shape[1], init = v; - /*<>*/ modu[1 + i] = init; - /*<>*/ /*<>*/ var - _i_ = i + 1 | 0; - if(_h_ === i) break; - var i = _i_; - } - } - /*<>*/ return modu; - /*<>*/ } - function init_mod(loc, shape){ - /*<>*/ if - (typeof shape !== "number" && 0 === shape[0]){ - var comps = shape[1]; - /*<>*/ return init_mod_block(loc, comps); - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], cst_CamlinternalMod_init_mod_n); - /*<>*/ } - function update_mod_block(comps$0, modu, n){ - /*<>*/ if - (0 === /*<>*/ caml_obj_tag(n) - && comps$0.length - 1 <= n.length - 1){ - /*<>*/ var - _e_ = comps$0.length - 1 - 1 | 0, - /*<>*/ _d_ = 0; - if(_e_ >= 0){ - var i = _d_; - for(;;){ - /*<>*/ var - /*<>*/ n$0 = n[1 + i], - /*<>*/ shape = - caml_check_bound(comps$0, i)[1 + i]; - a: - if(typeof shape === "number"){ - if(2 === shape){ - if - (0 === /*<>*/ caml_obj_tag(n$0) - && 4 === n$0.length - 1){ - /*<>*/ var - /*<>*/ cl = modu[1 + i], - j = 0; - for(;;){ - /*<>*/ cl[1 + j] = n$0[1 + j]; - /*<>*/ /*<>*/ var - _c_ = j + 1 | 0; - if(3 === j) break a; - var j = _c_; - } - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - } - /*<>*/ modu[1 + i] = n$0; - } - else if(0 === shape[0]){ - var comps = shape[1]; - /*<>*/ update_mod_block - (comps, modu[1 + i], n$0); - } - /*<>*/ /*<>*/ var - _f_ = i + 1 | 0; - if(_e_ === i) break; - var i = _f_; - } - } - return 0; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); - /*<>*/ } - function update_mod(shape, o, n){ - /*<>*/ if - (typeof shape !== "number" && 0 === shape[0]){ - var comps = shape[1]; - /*<>*/ return update_mod_block(comps, o, n); - } - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], cst_CamlinternalMod_update_mod); - /*<>*/ } - var CamlinternalMod = [0, init_mod, update_mod]; - runtime.caml_register_global(8, CamlinternalMod, "CamlinternalMod"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Ephemeron -//# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Array, Stdlib__Hashtbl, Stdlib__Int, Stdlib__List, Stdlib__Obj, Stdlib__Random, Stdlib__Seq, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_check_bound = runtime.caml_check_bound, - caml_make_vect = runtime.caml_make_vect, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - 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) - : 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_List = global_data.Stdlib__List, - Stdlib = global_data.Stdlib, - Stdlib_Obj = global_data.Stdlib__Obj, - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib_Seq = global_data.Stdlib__Seq, - Stdlib_Int = global_data.Stdlib__Int, - Stdlib_Array = global_data.Stdlib__Array, - Stdlib_Hashtbl = global_data.Stdlib__Hashtbl, - CamlinternalLazy = global_data.CamlinternalLazy, - Stdlib_Random = global_data.Stdlib__Random, - _c_ = [0, 0], - _b_ = [0, 0], - _a_ = [0, 0]; - function MakeSeeded(H){ - /*<>*/ /*<>*/ var - prng = - [246, - function(_aM_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; - function create(opt, initial_size){ - /*<>*/ if(opt) - var sth = opt[1], random = sth; - else - var - random = /*<>*/ caml_call1(Stdlib_Hashtbl[17], 0); - var x = 16; - /*<>*/ for(;;){ - if(initial_size > x && Stdlib_Sys[13] >= (x * 2 | 0)){var x$0 = x * 2 | 0, x = x$0; continue;} - /*<>*/ if(random){ - var _aK_ = runtime.caml_obj_tag(prng); - a: - if(250 === _aK_) - var _aL_ = prng[1]; - else{ - if(246 !== _aK_ && 244 !== _aK_){var _aL_ = prng; break a;} - var _aL_ = caml_call1(CamlinternalLazy[2], prng); - } - var - seed = - /*<>*/ caml_call1(Stdlib_Random[15][4], _aL_); - } - else - var seed = 0; - /*<>*/ return [0, - 0, - /*<>*/ caml_make_vect(x, 0), - seed, - x]; - } - /*<>*/ } - function clear(h){ - /*<>*/ h[1] = 0; - /*<>*/ var - len = h[2].length - 1, - /*<>*/ _aI_ = len - 1 | 0, - _aH_ = 0; - if(_aI_ >= 0){ - var i = _aH_; - for(;;){ - /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; - /*<>*/ /*<>*/ var - _aJ_ = i + 1 | 0; - if(_aI_ === i) break; - var i = _aJ_; - } - } - return 0; - /*<>*/ } - function reset(h){ - /*<>*/ var len = h[2].length - 1; - return len === h[4] - ? clear(h) - : (h - [1] - = 0, - h[2] = /*<>*/ caml_make_vect(h[4], 0), - 0); - /*<>*/ } - function copy(h){ - /*<>*/ var - _aE_ = h[4], - _aF_ = h[3], - /*<>*/ _aG_ = - /*<>*/ caml_call1(Stdlib_Array[6], h[2]); - /*<>*/ return [0, h[1], _aG_, _aF_, _aE_]; - /*<>*/ } - function key_index(h, hkey){ - /*<>*/ return hkey & (h[2].length - 1 - 1 | 0); - /*<>*/ } - function clean(h){ - function do_bucket(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var hkey = param$0[1], rest = param$0[3], c = param$0[2]; - /*<>*/ if - ( /*<>*/ caml_call1(H[6], c)){ - var rest$0 = param$0[3], c$0 = param$0[2]; - /*<>*/ return [0, hkey, c$0, do_bucket(rest$0)]; - } - h[1] = h[1] - 1 | 0; - var param$0 = rest; - } - /*<>*/ } - var d = h[2], _aC_ = d.length - 1 - 1 | 0, _aB_ = 0; - if(_aC_ >= 0){ - var i = _aB_; - for(;;){ - /*<>*/ d[1 + i] = - do_bucket(caml_check_bound(d, i)[1 + i]); - /*<>*/ /*<>*/ var - _aD_ = i + 1 | 0; - if(_aC_ === i) break; - var i = _aD_; - } - } - return 0; - /*<>*/ } - function resize(h){ - /*<>*/ var - odata = h[2], - /*<>*/ osize = odata.length - 1, - nsize = osize * 2 | 0; - /*<>*/ clean(h); - var - _av_ = nsize < Stdlib_Sys[13] ? 1 : 0, - _aw_ = _av_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _av_; - if(_aw_){ - /*<>*/ /*<>*/ var - ndata = /*<>*/ caml_make_vect(nsize, 0); - h[2] = ndata; - /*<>*/ var - insert_bucket = - function(param){ - /*<>*/ if(! param) - /*<>*/ return 0; - var rest = param[3], data = param[2], hkey = param[1]; - /*<>*/ insert_bucket(rest); - /*<>*/ /*<>*/ var - nidx = key_index(h, hkey); - /*<>*/ ndata[1 + nidx] = - [0, hkey, data, caml_check_bound(ndata, nidx)[1 + nidx]]; - /*<>*/ return 0; - /*<>*/ }, - /*<>*/ _ay_ = osize - 1 | 0, - /*<>*/ _ax_ = 0; - if(_ay_ >= 0){ - var i = _ax_; - for(;;){ - /*<>*/ insert_bucket - (caml_check_bound(odata, i)[1 + i]); - /*<>*/ /*<>*/ var - _aA_ = i + 1 | 0; - if(_ay_ === i) break; - var i = _aA_; - } - } - var _az_ = 0; - } - else - var _az_ = _aw_; - return _az_; - /*<>*/ } - function add(h, key, info){ - /*<>*/ var - /*<>*/ hkey = - /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ i = key_index(h, hkey), - /*<>*/ container = - /*<>*/ caml_call2(H[1], key, info), - /*<>*/ bucket = - [0, hkey, container, caml_check_bound(h[2], i)[1 + i]]; - /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; - h[1] = h[1] + 1 | 0; - var _au_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _au_ ? resize(h) : _au_; - /*<>*/ } - function remove(h, key){ - /*<>*/ /*<>*/ var - hkey = /*<>*/ caml_call2(H[2], h[3], key); - function remove_bucket(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var hk = param$0[1], next = param$0[3], c = param$0[2]; - if(hkey !== hk){ - var next$0 = param$0[3], c$0 = param$0[2]; - /*<>*/ return [0, - hk, - c$0, - remove_bucket(next$0)]; - } - switch( /*<>*/ caml_call2(H[3], c, key)){ - case 0: - h[1] = h[1] - 1 | 0; /*<>*/ return next; - case 1: - /*<>*/ return [0, hk, c, remove_bucket(next)]; - default: h[1] = h[1] - 1 | 0; var param$0 = next; - } - } - /*<>*/ } - /*<>*/ var - /*<>*/ i = key_index(h, hkey), - /*<>*/ _at_ = - remove_bucket(caml_check_bound(h[2], i)[1 + i]); - /*<>*/ caml_check_bound(h[2], i)[1 + i] = _at_; - /*<>*/ return 0; - /*<>*/ } - function find(h, key){ - /*<>*/ var - /*<>*/ hkey = - /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _as_ = key_index(h, hkey), - param = caml_check_bound(h[2], _as_)[1 + _as_]; - for(;;){ - if(! param) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var hk = param[1], rest = param[3], c = param[2]; - if(hkey === hk) - switch( /*<>*/ caml_call2(H[3], c, key)){ - case 0: - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(H[4], c); - if(match){var d = match[1]; /*<>*/ return d;} - var param = rest; - break; - case 1: - var param = rest; break; - default: var param = rest; - } - else - var rest$0 = param[3], param = rest$0; - } - /*<>*/ } - function find_opt(h, key){ - /*<>*/ var - /*<>*/ hkey = - /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _ar_ = key_index(h, hkey), - param = caml_check_bound(h[2], _ar_)[1 + _ar_]; - for(;;){ - if(! param) /*<>*/ return 0; - var hk = param[1], rest = param[3], c = param[2]; - if(hkey === hk) - switch( /*<>*/ caml_call2(H[3], c, key)){ - case 0: - /*<>*/ /*<>*/ var - d = /*<>*/ caml_call1(H[4], c); - if(d) /*<>*/ return d; - var param = rest; - break; - case 1: - var param = rest; break; - default: var param = rest; - } - else - var rest$0 = param[3], param = rest$0; - } - /*<>*/ } - function find_all(h, key){ - /*<>*/ /*<>*/ var - hkey = /*<>*/ caml_call2(H[2], h[3], key); - function find_in_bucket(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var hk = param$0[1], rest = param$0[3], c = param$0[2]; - if(hkey === hk) - switch( /*<>*/ caml_call2(H[3], c, key)){ - case 0: - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(H[4], c); - if(match){ - var d = match[1]; - /*<>*/ return [0, d, find_in_bucket(rest)]; - } - var param$0 = rest; - break; - case 1: - var param$0 = rest; break; - default: var param$0 = rest; - } - else - var rest$0 = param$0[3], param$0 = rest$0; - } - /*<>*/ } - /*<>*/ /*<>*/ var - _aq_ = key_index(h, hkey); - /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _aq_)[1 + _aq_]); - /*<>*/ } - function replace(h, key, info){ - /*<>*/ var - /*<>*/ hkey = - /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ i = key_index(h, hkey), - /*<>*/ l = caml_check_bound(h[2], i)[1 + i]; - /*<>*/ try{ - var param = l; - /*<>*/ for(;;){ - if(! param) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - var hk = param[1], next = param[3], c = param[2]; - if(hkey === hk){ - if(! /*<>*/ caml_call2(H[3], c, key)){ - /*<>*/ /*<>*/ var - _am_ = /*<>*/ caml_call3(H[5], c, key, info); - /*<>*/ return _am_; - } - var param = next; - } - else - var next$0 = param[3], param = next$0; - } - } - catch(_ap_){ - var _an_ = caml_wrap_exception(_ap_); - if(_an_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_an_, 0); - /*<>*/ /*<>*/ var - container = /*<>*/ caml_call2(H[1], key, info); - /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, hkey, container, l]; - h[1] = h[1] + 1 | 0; - var _ao_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _ao_ ? resize(h) : _ao_; - } - /*<>*/ } - function mem(h, key){ - /*<>*/ var - /*<>*/ hkey = - /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _al_ = key_index(h, hkey), - param = caml_check_bound(h[2], _al_)[1 + _al_]; - /*<>*/ for(;;){ - if(! param) /*<>*/ return 0; - var hk = param[1], rest = param[3], c = param[2]; - if(hk === hkey){ - if(! /*<>*/ caml_call2(H[3], c, key)) - /*<>*/ return 1; - var param = rest; - } - else - var rest$0 = param[3], param = rest$0; - } - /*<>*/ } - function length(h){ - /*<>*/ return h[1]; - /*<>*/ } - function bucket_length(accu, param){ - var accu$0 = accu, param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return accu$0; - /*<>*/ var - rest = param$0[3], - /*<>*/ accu$1 = accu$0 + 1 | 0, - accu$0 = accu$1, - param$0 = rest; - } - } - function stats(h){ - /*<>*/ var _af_ = h[2], _ag_ = 0; - function _ah_(m, b){ - /*<>*/ /*<>*/ var - _ak_ = bucket_length(0, b); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _ak_); - /*<>*/ } - /*<>*/ var - /*<>*/ mbl = - /*<>*/ caml_call3 - (Stdlib_Array[15], _ah_, _ag_, _af_), - /*<>*/ histo = - /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ai_ = h[2]; - function _aj_(b){ - /*<>*/ /*<>*/ var - l = bucket_length(0, b); - /*<>*/ histo[1 + l] = - caml_check_bound(histo, l)[1 + l] + 1 | 0; - /*<>*/ return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _aj_, _ai_); - /*<>*/ return [0, h[1], h[2].length - 1, mbl, histo]; - /*<>*/ } - function bucket_length_alive(accu, param){ - var accu$0 = accu, param$0 = param; - for(;;){ - if(! param$0) /*<>*/ return accu$0; - var rest = param$0[3], c = param$0[2]; - /*<>*/ if - ( /*<>*/ caml_call1(H[6], c)) - var accu$1 = accu$0 + 1 | 0, accu$0 = accu$1, param$0 = rest; - else - var rest$0 = param$0[3], param$0 = rest$0; - } - } - function stats_alive(h){ - /*<>*/ var - /*<>*/ size = [0, 0], - /*<>*/ _$_ = h[2], - _aa_ = 0; - function _ab_(m, b){ - /*<>*/ /*<>*/ var - _ae_ = bucket_length_alive(0, b); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _ae_); - /*<>*/ } - /*<>*/ var - /*<>*/ mbl = - /*<>*/ caml_call3 - (Stdlib_Array[15], _ab_, _aa_, _$_), - /*<>*/ histo = - /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ac_ = h[2]; - function _ad_(b){ - /*<>*/ /*<>*/ var - l = bucket_length_alive(0, b); - size[1] = size[1] + l | 0; - /*<>*/ histo[1 + l] = - caml_check_bound(histo, l)[1 + l] + 1 | 0; - /*<>*/ return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _ad_, _ac_); - /*<>*/ return [0, - size[1], - h[2].length - 1, - mbl, - histo]; - /*<>*/ } - function add_seq(tbl, i){ - function ___(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return add(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], ___, i); - /*<>*/ } - function replace_seq(tbl, i){ - function _Z_(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return replace(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _Z_, i); - /*<>*/ } - function of_seq(i){ - /*<>*/ /*<>*/ var - tbl = create(0, 16); - /*<>*/ replace_seq(tbl, i); - /*<>*/ return tbl; - /*<>*/ } - /*<>*/ return [0, - create, - clear, - reset, - copy, - add, - remove, - find, - find_opt, - find_all, - replace, - mem, - length, - stats, - add_seq, - replace_seq, - of_seq, - clean, - stats_alive]; - } - function create(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Obj[24][1], 1); - /*<>*/ } - function get_key(t){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Obj[24][3], t, 0); - /*<>*/ } - function set_key(t, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ } - function check_key(t){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Obj[24][7], t, 0); - /*<>*/ } - function get_data(t){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Obj[24][9], t); - /*<>*/ } - function set_data(t, d){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Obj[24][11], t, d); - /*<>*/ } - function make(key, data){ - /*<>*/ /*<>*/ var - eph = create(0); - /*<>*/ set_data(eph, data); - /*<>*/ set_key(eph, key); - /*<>*/ return eph; - /*<>*/ } - function query(eph, key){ - /*<>*/ /*<>*/ var - match = get_key(eph); - if(! match) /*<>*/ return 0; - var k = match[1]; - return k === key ? get_data(eph) : 0; - /*<>*/ } - function MakeSeeded$0(H){ - function create$0(k, d){ - /*<>*/ /*<>*/ var - c = create(0); - /*<>*/ set_data(c, d); - /*<>*/ set_key(c, k); - /*<>*/ return c; - /*<>*/ } - var seeded_hash = H[2]; - function equal(c, k){ - /*<>*/ /*<>*/ var - match = get_key(c); - if(! match) /*<>*/ return 2; - var k$0 = match[1]; - /*<>*/ return /*<>*/ caml_call2 - (H[1], k, k$0) - ? 0 - : 1; - /*<>*/ } - function set_key_data(c, k, d){ - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Obj[24][12], c); - /*<>*/ set_key(c, k); - /*<>*/ return set_data(c, d); - /*<>*/ } - /*<>*/ return MakeSeeded - ([0, - create$0, - seeded_hash, - equal, - get_data, - set_key_data, - check_key]); - } - function Make(H){ - var equal = H[1]; - function seeded_hash(seed, x){ - /*<>*/ return /*<>*/ caml_call1 - (H[2], x); - /*<>*/ } - var - include = MakeSeeded$0([0, equal, seeded_hash]), - clear = include[2], - reset = include[3], - copy = include[4], - add = include[5], - remove = include[6], - find = include[7], - find_opt = include[8], - find_all = include[9], - replace = include[10], - mem = include[11], - length = include[12], - stats = include[13], - add_seq = include[14], - replace_seq = include[15], - clean = include[17], - stats_alive = include[18], - _Y_ = include[1]; - function create(sz){ - /*<>*/ return /*<>*/ caml_call2 - (_Y_, _a_, sz); - /*<>*/ } - function of_seq(i){ - /*<>*/ /*<>*/ var - tbl = create(16); - /*<>*/ /*<>*/ caml_call2 - (replace_seq, tbl, i); - /*<>*/ return tbl; - /*<>*/ } - /*<>*/ return [0, - create, - clear, - reset, - copy, - add, - remove, - find, - find_opt, - find_all, - replace, - mem, - length, - stats, - add_seq, - replace_seq, - of_seq, - clean, - stats_alive]; - } - function make$0(param){ - /*<>*/ return [0, 0]; - /*<>*/ } - function add(b, k, d){ - /*<>*/ var _X_ = b[1]; - b[1] = [0, make(k, d), _X_]; - return 0; - /*<>*/ } - function test_key(k, e){ - /*<>*/ /*<>*/ var - match = get_key(e); - if(match){ - var x = match[1]; - if(x === k) /*<>*/ return 1; - } - /*<>*/ return 0; - /*<>*/ } - function remove(b, k){ - /*<>*/ var l$0 = b[1], l = l$0, acc = 0; - /*<>*/ for(;;){ - if(! l) /*<>*/ return 0; - var h = l[1], t = l[2]; - /*<>*/ if(test_key(k, h)){ - b[1] = /*<>*/ caml_call2(Stdlib_List[12], acc, t); - return 0; - } - /*<>*/ var - t$0 = l[2], - /*<>*/ acc$0 = [0, h, acc], - l = t$0, - acc = acc$0; - } - /*<>*/ } - function find(b, k){ - /*<>*/ var _U_ = b[1]; - /*<>*/ function _V_(_W_){ - /*<>*/ return test_key(k, _W_); - } - /*<>*/ /*<>*/ var - match = - /*<>*/ caml_call2(Stdlib_List[39], _V_, _U_); - if(! match) /*<>*/ return 0; - var e = match[1]; - /*<>*/ return get_data(e); - /*<>*/ } - function length(b){ - /*<>*/ return caml_call1(Stdlib_List[1], b[1]); - /*<>*/ } - function clear(b){ - /*<>*/ b[1] = 0; - return 0; - /*<>*/ } - function create$0(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Obj[24][1], 2); - /*<>*/ } - function get_key1(t){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Obj[24][3], t, 0); - /*<>*/ } - function set_key1(t, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 0, k); - /*<>*/ } - function get_key2(t){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Obj[24][3], t, 1); - /*<>*/ } - function set_key2(t, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 1, k); - /*<>*/ } - function get_data$0(t){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Obj[24][9], t); - /*<>*/ } - function set_data$0(t, d){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Obj[24][11], t, d); - /*<>*/ } - function make$1(key1, key2, data){ - /*<>*/ /*<>*/ var - eph = create$0(0); - /*<>*/ set_data$0(eph, data); - /*<>*/ set_key1(eph, key1); - /*<>*/ set_key2(eph, key2); - /*<>*/ return eph; - /*<>*/ } - function query$0(eph, key1, key2){ - /*<>*/ /*<>*/ var - match = get_key1(eph); - if(! match) /*<>*/ return 0; - var k = match[1]; - if(k !== key1) /*<>*/ return 0; - /*<>*/ /*<>*/ var - match$0 = get_key2(eph); - if(! match$0) /*<>*/ return 0; - var k$0 = match$0[1]; - return k$0 === key2 ? get_data$0(eph) : 0; - /*<>*/ } - function MakeSeeded$1(H1, H2){ - function create(param, d){ - /*<>*/ var - k2 = param[2], - k1 = param[1], - /*<>*/ c = create$0(0); - /*<>*/ set_data$0(c, d); - /*<>*/ set_key1(c, k1); - /*<>*/ set_key2(c, k2); - /*<>*/ return c; - } - function seeded_hash(seed, param){ - /*<>*/ var - k2 = param[2], - k1 = param[1], - /*<>*/ _T_ = - /*<>*/ caml_call2(H2[2], seed, k2) * 65599 | 0; - /*<>*/ return /*<>*/ caml_call2 - (H1[2], seed, k1) - + _T_ - | 0; - } - function equal(c, param){ - /*<>*/ var - k2 = param[2], - k1 = param[1], - /*<>*/ match = get_key1(c), - /*<>*/ match$0 = get_key2(c); - if(match && match$0){ - var k2$0 = match$0[1], k1$0 = match[1]; - /*<>*/ if - ( /*<>*/ caml_call2(H1[1], k1, k1$0) - && /*<>*/ caml_call2(H2[1], k2, k2$0)) - /*<>*/ return 0; - /*<>*/ return 1; - } - /*<>*/ return 2; - } - function set_key_data(c, param, d){ - var k2 = param[2], k1 = param[1]; - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Obj[24][12], c); - /*<>*/ set_key1(c, k1); - /*<>*/ set_key2(c, k2); - /*<>*/ return set_data$0(c, d); - } - function check_key(c){ - /*<>*/ /*<>*/ var - _S_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); - /*<>*/ return _S_ - ? /*<>*/ caml_call2 - (Stdlib_Obj[24][7], c, 1) - : _S_; - /*<>*/ } - /*<>*/ return MakeSeeded - ([0, - create, - seeded_hash, - equal, - get_data$0, - set_key_data, - check_key]); - } - function Make$0(H1, H2){ - var equal = H2[1]; - function seeded_hash(seed, x){ - /*<>*/ return /*<>*/ caml_call1 - (H2[2], x); - /*<>*/ } - /*<>*/ var - equal$0 = H1[1], - /*<>*/ _Q_ = [0, equal, seeded_hash]; - function seeded_hash$0(seed, x){ - /*<>*/ return /*<>*/ caml_call1 - (H1[2], x); - /*<>*/ } - var - include = MakeSeeded$1([0, equal$0, seeded_hash$0], _Q_), - clear = include[2], - reset = include[3], - copy = include[4], - add = include[5], - remove = include[6], - find = include[7], - find_opt = include[8], - find_all = include[9], - replace = include[10], - mem = include[11], - length = include[12], - stats = include[13], - add_seq = include[14], - replace_seq = include[15], - clean = include[17], - stats_alive = include[18], - _R_ = include[1]; - function create(sz){ - /*<>*/ return /*<>*/ caml_call2 - (_R_, _b_, sz); - /*<>*/ } - function of_seq(i){ - /*<>*/ /*<>*/ var - tbl = create(16); - /*<>*/ /*<>*/ caml_call2 - (replace_seq, tbl, i); - /*<>*/ return tbl; - /*<>*/ } - /*<>*/ return [0, - create, - clear, - reset, - copy, - add, - remove, - find, - find_opt, - find_all, - replace, - mem, - length, - stats, - add_seq, - replace_seq, - of_seq, - clean, - stats_alive]; - } - function make$2(param){ - /*<>*/ return [0, 0]; - /*<>*/ } - function add$0(b, k1, k2, d){ - /*<>*/ var _P_ = b[1]; - b[1] = [0, make$1(k1, k2, d), _P_]; - return 0; - /*<>*/ } - function test_keys(k1, k2, e){ - /*<>*/ var - /*<>*/ match = get_key1(e), - /*<>*/ match$0 = get_key2(e); - if(match && match$0){ - var x2 = match$0[1], x1 = match[1]; - if(x1 === k1 && x2 === k2) /*<>*/ return 1; - } - /*<>*/ return 0; - /*<>*/ } - function remove$0(b, k1, k2){ - /*<>*/ var l$0 = b[1], l = l$0, acc = 0; - /*<>*/ for(;;){ - if(! l) /*<>*/ return 0; - var h = l[1], t = l[2]; - /*<>*/ if(test_keys(k1, k2, h)){ - b[1] = /*<>*/ caml_call2(Stdlib_List[12], acc, t); - return 0; - } - /*<>*/ var - t$0 = l[2], - /*<>*/ acc$0 = [0, h, acc], - l = t$0, - acc = acc$0; - } - /*<>*/ } - function find$0(b, k1, k2){ - /*<>*/ var _M_ = b[1]; - /*<>*/ function _N_(_O_){ - /*<>*/ return test_keys(k1, k2, _O_); - } - /*<>*/ /*<>*/ var - match = - /*<>*/ caml_call2(Stdlib_List[39], _N_, _M_); - if(! match) /*<>*/ return 0; - var e = match[1]; - /*<>*/ return get_data$0(e); - /*<>*/ } - function length$0(b){ - /*<>*/ return caml_call1(Stdlib_List[1], b[1]); - /*<>*/ } - function clear$0(b){ - /*<>*/ b[1] = 0; - return 0; - /*<>*/ } - function create$1(n){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Obj[24][1], n); - /*<>*/ } - function length$1(k){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Obj[24][2], k); - /*<>*/ } - function get_key$0(t, n){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Obj[24][3], t, n); - /*<>*/ } - function set_key$0(t, n, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, n, k); - /*<>*/ } - function get_data$1(t){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Obj[24][9], t); - /*<>*/ } - function set_data$1(t, d){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Obj[24][11], t, d); - /*<>*/ } - function make$3(keys, data){ - /*<>*/ var - l = keys.length - 1, - /*<>*/ eph = create$1(l); - /*<>*/ set_data$1(eph, data); - /*<>*/ var - _K_ = l - 1 | 0, - /*<>*/ _J_ = 0; - if(_K_ >= 0){ - var i = _J_; - for(;;){ - /*<>*/ set_key$0 - (eph, i, caml_check_bound(keys, i)[1 + i]); - /*<>*/ /*<>*/ var - _L_ = i + 1 | 0; - if(_K_ === i) break; - var i = _L_; - } - } - /*<>*/ return eph; - /*<>*/ } - function query$1(eph, keys){ - /*<>*/ /*<>*/ var - l = length$1(eph); - /*<>*/ try{ - if(l !== keys.length - 1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[3], 1); - /*<>*/ var - /*<>*/ _F_ = l - 1 | 0, - /*<>*/ _E_ = 0; - if(_F_ >= 0){ - var i = _E_; - for(;;){ - /*<>*/ /*<>*/ var - match = get_key$0(eph, i); - if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[3], 1); - var k = match[1]; - if(k !== caml_check_bound(keys, i)[1 + i]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[3], 1); - /*<>*/ /*<>*/ var - _H_ = i + 1 | 0; - if(_F_ === i) break; - var i = _H_; - } - } - /*<>*/ /*<>*/ var - _G_ = get_data$1(eph); - /*<>*/ return _G_; - } - catch(_I_){ - var _D_ = caml_wrap_exception(_I_); - if(_D_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_D_, 0); - } - /*<>*/ } - function MakeSeeded$2(H){ - function create(k, d){ - /*<>*/ /*<>*/ var - c = create$1(k.length - 1); - /*<>*/ set_data$1(c, d); - /*<>*/ var - _B_ = k.length - 1 - 1 | 0, - /*<>*/ _A_ = 0; - if(_B_ >= 0){ - var i = _A_; - for(;;){ - /*<>*/ set_key$0 - (c, i, caml_check_bound(k, i)[1 + i]); - /*<>*/ /*<>*/ var - _C_ = i + 1 | 0; - if(_B_ === i) break; - var i = _C_; - } - } - /*<>*/ return c; - /*<>*/ } - function seeded_hash(seed, k){ - /*<>*/ var - /*<>*/ h = [0, 0], - _w_ = k.length - 1 - 1 | 0, - /*<>*/ _v_ = 0; - if(_w_ >= 0){ - var i = _v_; - for(;;){ - /*<>*/ var - _x_ = h[1], - /*<>*/ _y_ = caml_check_bound(k, i)[1 + i]; - h[1] = - ( /*<>*/ caml_call2(H[2], seed, _y_) * 65599 | 0) - + _x_ - | 0; - /*<>*/ /*<>*/ var - _z_ = i + 1 | 0; - if(_w_ === i) break; - var i = _z_; - } - } - return h[1]; - /*<>*/ } - function equal(c, k){ - /*<>*/ var - len = k.length - 1, - /*<>*/ len$0 = length$1(c); - if(len !== len$0) /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$1 = len - 1 | 0, - i = i$1; - /*<>*/ for(;;){ - if(0 > i) /*<>*/ return 0; - /*<>*/ /*<>*/ var - match = get_key$0(c, i); - if(! match) /*<>*/ return 2; - /*<>*/ var - ki = match[1], - /*<>*/ _u_ = caml_check_bound(k, i)[1 + i]; - /*<>*/ if - (! /*<>*/ caml_call2(H[1], _u_, ki)) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i - 1 | 0, - i = i$0; - } - /*<>*/ } - function set_key_data(c, k, d){ - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Obj[24][12], c); - /*<>*/ var - _s_ = k.length - 1 - 1 | 0, - /*<>*/ _r_ = 0; - if(_s_ >= 0){ - var i = _r_; - for(;;){ - /*<>*/ set_key$0 - (c, i, caml_check_bound(k, i)[1 + i]); - /*<>*/ /*<>*/ var - _t_ = i + 1 | 0; - if(_s_ === i) break; - var i = _t_; - } - } - /*<>*/ return set_data$1(c, d); - /*<>*/ } - function check_key(c){ - /*<>*/ var - /*<>*/ i$1 = length$1(c) - 1 | 0, - i = i$1; - /*<>*/ for(;;){ - var _p_ = i < 0 ? 1 : 0; - if(_p_) - var _q_ = _p_; - else{ - /*<>*/ /*<>*/ var - _o_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); - /*<>*/ if(_o_){ - var i$0 = i - 1 | 0, i = i$0; - continue; - } - var _q_ = _o_; - } - return _q_; - } - /*<>*/ } - /*<>*/ return MakeSeeded - ([0, - create, - seeded_hash, - equal, - get_data$1, - set_key_data, - check_key]); - } - function Make$1(H){ - var equal = H[1]; - function seeded_hash(seed, x){ - /*<>*/ return /*<>*/ caml_call1 - (H[2], x); - /*<>*/ } - var - include = MakeSeeded$2([0, equal, seeded_hash]), - clear = include[2], - reset = include[3], - copy = include[4], - add = include[5], - remove = include[6], - find = include[7], - find_opt = include[8], - find_all = include[9], - replace = include[10], - mem = include[11], - length = include[12], - stats = include[13], - add_seq = include[14], - replace_seq = include[15], - clean = include[17], - stats_alive = include[18], - _n_ = include[1]; - function create(sz){ - /*<>*/ return /*<>*/ caml_call2 - (_n_, _c_, sz); - /*<>*/ } - function of_seq(i){ - /*<>*/ /*<>*/ var - tbl = create(16); - /*<>*/ /*<>*/ caml_call2 - (replace_seq, tbl, i); - /*<>*/ return tbl; - /*<>*/ } - /*<>*/ return [0, - create, - clear, - reset, - copy, - add, - remove, - find, - find_opt, - find_all, - replace, - mem, - length, - stats, - add_seq, - replace_seq, - of_seq, - clean, - stats_alive]; - } - function make$4(param){ - /*<>*/ return [0, 0]; - /*<>*/ } - function add$1(b, k, d){ - /*<>*/ var _m_ = b[1]; - b[1] = [0, make$3(k, d), _m_]; - return 0; - /*<>*/ } - function test_keys$0(k, e){ - /*<>*/ try{ - if(length$1(e) !== k.length - 1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[3], 1); - /*<>*/ var - _i_ = k.length - 1 - 1 | 0, - /*<>*/ _h_ = 0; - if(_i_ >= 0){ - var i = _h_; - for(;;){ - /*<>*/ /*<>*/ var - match = get_key$0(e, i); - if(match){ - var x = match[1]; - if(x === caml_check_bound(k, i)[1 + i]){ - /*<>*/ /*<>*/ var - _k_ = i + 1 | 0; - if(_i_ === i) break; - var i = _k_; - continue; - } - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[3], 1); - } - } - /*<>*/ /*<>*/ var _j_ = 1; - /*<>*/ return _j_; - } - catch(_l_){ - var _g_ = caml_wrap_exception(_l_); - if(_g_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_g_, 0); - } - /*<>*/ } - function remove$1(b, k){ - /*<>*/ var l$0 = b[1], l = l$0, acc = 0; - /*<>*/ for(;;){ - if(! l) /*<>*/ return 0; - var h = l[1], t = l[2]; - /*<>*/ if(test_keys$0(k, h)){ - b[1] = /*<>*/ caml_call2(Stdlib_List[12], acc, t); - return 0; - } - /*<>*/ var - t$0 = l[2], - /*<>*/ acc$0 = [0, h, acc], - l = t$0, - acc = acc$0; - } - /*<>*/ } - function find$1(b, k){ - /*<>*/ var _d_ = b[1]; - /*<>*/ function _e_(_f_){ - /*<>*/ return test_keys$0(k, _f_); - } - /*<>*/ /*<>*/ var - match = - /*<>*/ caml_call2(Stdlib_List[39], _e_, _d_); - if(! match) /*<>*/ return 0; - var e = match[1]; - /*<>*/ return get_data$1(e); - /*<>*/ } - function length$2(b){ - /*<>*/ return caml_call1(Stdlib_List[1], b[1]); - /*<>*/ } - function clear$1(b){ - /*<>*/ b[1] = 0; - return 0; - /*<>*/ } - var - Stdlib_Ephemeron = - [0, - [0, - make, - query, - Make, - MakeSeeded$0, - [0, make$0, add, remove, find, length, clear]], - [0, - make$1, - query$0, - Make$0, - MakeSeeded$1, - [0, make$2, add$0, remove$0, find$0, length$0, clear$0]], - [0, - make$3, - query$1, - Make$1, - MakeSeeded$2, - [0, make$4, add$1, remove$1, find$1, length$2, clear$1]]]; - runtime.caml_register_global(13, Stdlib_Ephemeron, "Stdlib__Ephemeron"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Filename -//# unitInfo: Requires: Stdlib, Stdlib__Buffer, Stdlib__Domain, Stdlib__List, Stdlib__Printf, Stdlib__Random, Stdlib__String, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - cst$19 = "", - cst$23 = " ", - cst_2$1 = " 2>", - cst_2_1$1 = " 2>&1", - cst$22 = " <", - cst$21 = " >", - cst$20 = '"', - cst$24 = ".", - cst$25 = "..", - cst$28 = "../", - cst$27 = "./", - cst$26 = "/", - cst_dev_null = "/dev/null", - caml_equal = runtime.caml_equal, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_string_length = runtime.caml_ml_string_length, - caml_string_equal = runtime.caml_string_equal, - caml_string_get = runtime.caml_string_get, - caml_string_notequal = runtime.caml_string_notequal, - caml_sys_getenv = runtime.caml_sys_getenv, - 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) - : 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(), - cst$18 = cst$19, - cst$17 = cst$19, - cst$16 = cst$19, - cst$8 = cst$21, - cst$15 = cst$19, - cst$9 = cst$22, - cst$14 = cst$19, - cst$10 = cst$23, - cst$11 = cst$23, - cst$12 = cst$20, - cst$13 = cst$19, - cst$6 = cst$20, - cst$7 = cst$20, - cst$4 = cst$19, - cst = cst$21, - cst$3 = cst$19, - cst$0 = cst$22, - cst$2 = cst$19, - cst$1 = cst$23, - null$0 = cst_dev_null, - current_dir_name = cst$24, - parent_dir_name = cst$25, - dir_sep = cst$26, - quotequote = "'\\''", - null$1 = "NUL", - current_dir_name$0 = cst$24, - parent_dir_name$0 = cst$25, - dir_sep$0 = "\\", - cst$5 = cst$24, - null$2 = cst_dev_null, - current_dir_name$1 = cst$24, - parent_dir_name$1 = cst$25, - dir_sep$1 = cst$26, - Stdlib = global_data.Stdlib, - Stdlib_Domain = global_data.Stdlib__Domain, - Stdlib_Random = global_data.Stdlib__Random, - Stdlib_Printf = global_data.Stdlib__Printf, - Stdlib_String = global_data.Stdlib__String, - Stdlib_List = global_data.Stdlib__List, - Stdlib_Buffer = global_data.Stdlib__Buffer, - Stdlib_Sys = global_data.Stdlib__Sys, - _i_ = [0, 7, 0], - _h_ = [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", - _c_ = [0, cst$20, 0], - cst_2_1$0 = cst_2_1$1, - cst_2$0 = cst_2$1, - cst_Filename_quote_command_bad = "Filename.quote_command: bad file name ", - cst_2_1 = cst_2_1$1, - cst_2 = cst_2$1, - cst_tmp = "/tmp"; - function generic_basename(is_dir_sep, current_dir_name, name){ - /*<>*/ if - ( /*<>*/ caml_string_equal(name, cst$19)) - /*<>*/ return current_dir_name; - var n$3 = caml_ml_string_length(name) - 1 | 0, n = n$3; - /*<>*/ for(;;){ - if(0 > n) - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, 1); - /*<>*/ if - ( /*<>*/ caml_call2(is_dir_sep, name, n)) - /*<>*/ var - /*<>*/ n$0 = n - 1 | 0, - n = n$0; - else{ - /*<>*/ var - /*<>*/ p = n + 1 | 0, - n$1 = n; - /*<>*/ for(;;){ - if(0 > n$1) - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, p); - /*<>*/ if - ( /*<>*/ caml_call2(is_dir_sep, name, n$1)) - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, n$1 + 1 | 0, (p - n$1 | 0) - 1 | 0); - var n$2 = n$1 - 1 | 0, n$1 = n$2; - } - } - } - /*<>*/ } - function generic_dirname(is_dir_sep, current_dir_name, name){ - /*<>*/ if - ( /*<>*/ caml_string_equal(name, cst$19)) - /*<>*/ return current_dir_name; - var n$5 = caml_ml_string_length(name) - 1 | 0, n = n$5; - /*<>*/ for(;;){ - if(0 > n) - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, 1); - /*<>*/ if - ( /*<>*/ caml_call2(is_dir_sep, name, n)) - /*<>*/ var - /*<>*/ n$0 = n - 1 | 0, - n = n$0; - else{ - var n$1 = n; - /*<>*/ for(;;){ - if(0 > n$1) return current_dir_name; - /*<>*/ if - ( /*<>*/ caml_call2(is_dir_sep, name, n$1)){ - var n$3 = n$1; - /*<>*/ for(;;){ - if(0 > n$3) - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, 1); - /*<>*/ if - (! /*<>*/ caml_call2(is_dir_sep, name, n$3)) - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, n$3 + 1 | 0); - /*<>*/ var - /*<>*/ n$4 = n$3 - 1 | 0, - n$3 = n$4; - } - } - else - /*<>*/ var - /*<>*/ n$2 = n$1 - 1 | 0, - n$1 = n$2; - } - } - } - /*<>*/ } - function is_dir_sep(s, i){ - /*<>*/ return 47 - === /*<>*/ caml_string_get(s, i) - ? 1 - : 0; - /*<>*/ } - function is_relative(n){ - /*<>*/ var - _aK_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _aL_ = - _aK_ - || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - return _aL_; - /*<>*/ } - function is_implicit(n){ - /*<>*/ /*<>*/ var - _aF_ = is_relative(n); - /*<>*/ if(_aF_){ - var - _aG_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aH_ = - _aG_ - || - /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), - cst$27); - /*<>*/ if(_aH_) - var - _aI_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aJ_ = - _aI_ - || - /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 3), - cst$28); - else - var _aJ_ = _aH_; - } - else - var _aJ_ = _aF_; - /*<>*/ return _aJ_; - /*<>*/ } - function check_suffix(name, suff){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[11], suff, name); - /*<>*/ } - function chop_suffix_opt(suffix, filename){ - /*<>*/ var - len_s = caml_ml_string_length(suffix), - len_f = caml_ml_string_length(filename); - if(len_s > len_f) /*<>*/ return 0; - /*<>*/ /*<>*/ var - r = - /*<>*/ caml_call3 - (Stdlib_String[15], filename, len_f - len_s | 0, len_s); - /*<>*/ return /*<>*/ caml_string_equal - (r, suffix) - ? [0, - /*<>*/ caml_call3 - (Stdlib_String[15], filename, 0, len_f - len_s | 0)] - : 0; - /*<>*/ } - try{ - /*<>*/ var - /*<>*/ _k_ = - /*<>*/ caml_sys_getenv("TMPDIR"), - temp_dir_name = _k_; - } - catch(_aE_){ - var _a_ = caml_wrap_exception(_aE_); - 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 - _aB_ = l - 1 | 0, - /*<>*/ _aA_ = 0; - if(_aB_ >= 0){ - var i = _aA_; - for(;;){ - /*<>*/ if - (39 === /*<>*/ caml_string_get(s, i)) - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, quotequote); - else{ - /*<>*/ /*<>*/ var - _aD_ = /*<>*/ caml_string_get(s, i); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, _aD_); - } - /*<>*/ /*<>*/ var - _aC_ = i + 1 | 0; - if(_aB_ === i) break; - var i = _aC_; - } - } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 39); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Buffer[2], b); - } - function quote_command(cmd, stdin, stdout, stderr, args){ - /*<>*/ if(stderr){ - var f = stderr[1]; - /*<>*/ if - ( /*<>*/ caml_equal(stderr, stdout)) - var _ap_ = cst_2_1; - else - /*<>*/ var - /*<>*/ _az_ = quote(f), - _ap_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _az_); - var _aq_ = _ap_; - } - else - var _aq_ = cst$4; - if(stdout) - /*<>*/ var - f$0 = stdout[1], - /*<>*/ _ar_ = quote(f$0), - _as_ = /*<>*/ caml_call2(Stdlib[28], cst, _ar_); - else - var _as_ = cst$3; - /*<>*/ /*<>*/ var - _at_ = /*<>*/ caml_call2(Stdlib[28], _as_, _aq_); - if(stdin) - /*<>*/ var - f$1 = stdin[1], - /*<>*/ _au_ = quote(f$1), - _av_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _au_); - else - var _av_ = cst$2; - /*<>*/ var - /*<>*/ _aw_ = - /*<>*/ caml_call2(Stdlib[28], _av_, _at_), - /*<>*/ _ax_ = - /*<>*/ caml_call2 - (Stdlib_List[19], quote, [0, cmd, args]), - /*<>*/ _ay_ = - /*<>*/ caml_call2(Stdlib_String[6], cst$1, _ax_); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _ay_, _aw_); - /*<>*/ } - /*<>*/ function basename(_ao_){ - /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _ao_); - } - /*<>*/ function dirname(_an_){ - /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _an_); - } - /*<>*/ /*<>*/ var - Unix = - [0, - null$0, - current_dir_name, - parent_dir_name, - dir_sep, - is_dir_sep, - is_relative, - is_implicit, - check_suffix, - chop_suffix_opt, - temp_dir_name, - quote, - quote_command, - basename, - dirname]; - function is_dir_sep$0(s, i){ - /*<>*/ var - /*<>*/ c = - /*<>*/ caml_string_get(s, i), - _ak_ = 47 === c ? 1 : 0; - if(_ak_) - var _al_ = _ak_; - else - var _am_ = 92 === c ? 1 : 0, _al_ = _am_ || (58 === c ? 1 : 0); - return _al_; - /*<>*/ } - function is_relative$0(n){ - /*<>*/ var - _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _af_ = - _ae_ - || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_af_){ - var - _ag_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ah_ = - _ag_ - || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ah_) - var - _ai_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aj_ = - _ai_ - || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); - else - var _aj_ = _ah_; - } - else - var _aj_ = _af_; - return _aj_; - /*<>*/ } - function is_implicit$0(n){ - /*<>*/ /*<>*/ var - _X_ = is_relative$0(n); - /*<>*/ if(_X_){ - var - _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _Z_ = - _Y_ - || - /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), - cst$27); - /*<>*/ if(_Z_){ - var - ___ = caml_ml_string_length(n) < 2 ? 1 : 0, - _$_ = - ___ - || - /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), - ".\\"); - /*<>*/ if(_$_){ - var - _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _ab_ = - _aa_ - || - /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3 - (Stdlib_String[15], n, 0, 3), - cst$28); - /*<>*/ if(_ab_) - var - _ac_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _ad_ = - _ac_ - || - /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3 - (Stdlib_String[15], n, 0, 3), - "..\\"); - else - var _ad_ = _ab_; - } - else - var _ad_ = _$_; - } - else - var _ad_ = _Z_; - } - else - var _ad_ = _X_; - /*<>*/ return _ad_; - /*<>*/ } - function check_suffix$0(name, suff){ - /*<>*/ var - _U_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_U_) - /*<>*/ var - /*<>*/ s = - /*<>*/ caml_call3 - (Stdlib_String[15], - name, - caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, - caml_ml_string_length(suff)), - /*<>*/ _V_ = - /*<>*/ caml_call1(Stdlib_String[26], suff), - _W_ = - /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[26], s), _V_); - else - var _W_ = _U_; - /*<>*/ return _W_; - /*<>*/ } - function chop_suffix_opt$0(suffix, filename){ - /*<>*/ var - len_s = caml_ml_string_length(suffix), - len_f = caml_ml_string_length(filename); - if(len_s > len_f) /*<>*/ return 0; - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_call3 - (Stdlib_String[15], filename, len_f - len_s | 0, len_s), - /*<>*/ _T_ = - /*<>*/ caml_call1(Stdlib_String[26], suffix); - /*<>*/ return /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[26], r), - _T_) - ? [0, - /*<>*/ caml_call3 - (Stdlib_String[15], filename, 0, len_f - len_s | 0)] - : 0; - /*<>*/ } - try{ - /*<>*/ var - /*<>*/ _j_ = - /*<>*/ caml_sys_getenv("TEMP"), - temp_dir_name$0 = _j_; - } - catch(_S_){ - var _b_ = caml_wrap_exception(_S_); - 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); - function add_bs(n){ - /*<>*/ /*<>*/ var _Q_ = 1; - if(n >= 1){ - var j = _Q_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 92); - /*<>*/ /*<>*/ var - _R_ = j + 1 | 0; - if(n === j) break; - var j = _R_; - } - } - return 0; - /*<>*/ } - function loop$0(counter, i){ - /*<>*/ var i$0 = i; - /*<>*/ for(;;){ - if(i$0 === l) - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 34); - /*<>*/ /*<>*/ var - c = /*<>*/ caml_string_get(s, i$0); - if(34 === c){ - var _O_ = 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop_bs, [0, _O_, i$0]); - var counter$1 = counter + 1 | 0; - /*<>*/ return loop_bs(counter$1, _O_, i$0); - } - if(92 === c){ - var _P_ = 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop_bs, [0, _P_, i$0]); - var counter$0 = counter + 1 | 0; - /*<>*/ return loop_bs(counter$0, _P_, i$0); - } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, c); - /*<>*/ var - /*<>*/ i$1 = i$0 + 1 | 0, - i$0 = i$1; - } - /*<>*/ } - function loop_bs(counter, n, i){ - /*<>*/ var n$0 = n, i$0 = i; - /*<>*/ for(;;){ - if(i$0 === l){ - /*<>*/ /*<>*/ caml_call2 - (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 - _N_ = i$0 + 1 | 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop$0, [0, _N_]); - var counter$1 = counter + 1 | 0; - /*<>*/ return loop$0(counter$1, _N_); - } - if(92 !== match){ - /*<>*/ add_bs(n$0); - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop$0, [0, i$0]); - var counter$0 = counter + 1 | 0; - /*<>*/ return loop$0(counter$0, i$0); - } - /*<>*/ var - /*<>*/ i$1 = i$0 + 1 | 0, - n$1 = n$0 + 1 | 0, - n$0 = n$1, - i$0 = i$1; - } - /*<>*/ } - function loop(i){ /*<>*/ return caml_trampoline(loop$0(0, i));} - /*<>*/ loop(0); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Buffer[2], b); - /*<>*/ } - function quote_cmd_filename(f){ - /*<>*/ if - (! - /*<>*/ caml_call2(Stdlib_String[14], f, 34) - && ! /*<>*/ caml_call2(Stdlib_String[14], f, 37)){ - /*<>*/ if - (! /*<>*/ caml_call2(Stdlib_String[14], f, 32)) - /*<>*/ return f; - /*<>*/ /*<>*/ var - _M_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _M_); - } - /*<>*/ /*<>*/ var - _L_ = - /*<>*/ caml_call2 - (Stdlib[28], cst_Filename_quote_command_bad, f); - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _L_); - /*<>*/ } - function quote_command$0(cmd, stdin, stdout, stderr, args){ - /*<>*/ if(stderr){ - var f = stderr[1]; - /*<>*/ if - ( /*<>*/ caml_equal(stderr, stdout)) - var _x_ = cst_2_1$0; - else - /*<>*/ var - /*<>*/ _J_ = quote_cmd_filename(f), - _x_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _J_); - var _y_ = _x_; - } - else - var _y_ = cst$16; - var _z_ = [0, _y_, _c_]; - if(stdout) - /*<>*/ var - f$0 = stdout[1], - /*<>*/ _A_ = quote_cmd_filename(f$0), - _B_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _A_); - else - var _B_ = cst$15; - var _C_ = [0, _B_, _z_]; - if(stdin) - /*<>*/ var - f$1 = stdin[1], - /*<>*/ _D_ = quote_cmd_filename(f$1), - _E_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _D_); - else - var _E_ = cst$14; - /*<>*/ var - /*<>*/ _G_ = - /*<>*/ caml_call2(Stdlib_List[19], quote$0, args), - /*<>*/ s = - /*<>*/ caml_call2(Stdlib_String[6], cst$10, _G_), - /*<>*/ b = - /*<>*/ caml_call1 - (Stdlib_Buffer[1], caml_ml_string_length(s) + 20 | 0), - _F_ = [0, _E_, _C_]; - function _w_(c){ - /*<>*/ a: - { - if(62 <= c){ - var _K_ = c - 63 | 0; - if(60 < _K_ >>> 0){if(62 <= _K_) break a;} else if(31 !== _K_) break a; - } - else - if(42 <= c){ - if(60 !== c) break a; - } - else{ - if(33 > c) break a; - 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); - } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, c); - /*<>*/ } - /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _w_, s); - /*<>*/ var - _H_ = - [0, - cst$11, - [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _F_]], - /*<>*/ _I_ = - [0, cst$12, [0, quote_cmd_filename(cmd), _H_]]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[6], cst$13, _I_); - /*<>*/ } - function drive_and_path(s){ - /*<>*/ var - _s_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; - if(_s_){ - /*<>*/ /*<>*/ var - param = /*<>*/ caml_string_get(s, 0); - a: - { - b: - { - if(91 <= param){ - if(25 < param - 97 >>> 0) break b; - } - else if(65 > param) break b; - var _t_ = 1; - break a; - } - var _t_ = 0; - } - /*<>*/ /*<>*/ var - _u_ = - _t_ - ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 - : _t_; - } - else - var _u_ = _s_; - /*<>*/ if(! _u_) - /*<>*/ return [0, cst$17, s]; - /*<>*/ /*<>*/ var - _v_ = - /*<>*/ caml_call3 - (Stdlib_String[15], s, 2, caml_ml_string_length(s) - 2 | 0); - /*<>*/ return [0, - /*<>*/ caml_call3(Stdlib_String[15], s, 0, 2), - _v_]; - /*<>*/ } - function dirname$0(s){ - /*<>*/ var - /*<>*/ match = drive_and_path(s), - path = match[2], - drive = match[1], - /*<>*/ dir = - generic_dirname(is_dir_sep$0, current_dir_name$0, path); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], drive, dir); - /*<>*/ } - function basename$0(s){ - /*<>*/ var path = drive_and_path(s)[2]; - /*<>*/ return generic_basename - (is_dir_sep$0, current_dir_name$0, path); - /*<>*/ } - /*<>*/ /*<>*/ var - Win32 = - [0, - null$1, - current_dir_name$0, - parent_dir_name$0, - dir_sep$0, - is_dir_sep$0, - is_relative$0, - is_implicit$0, - check_suffix$0, - chop_suffix_opt$0, - temp_dir_name$0, - quote$0, - quote_command$0, - basename$0, - dirname$0]; - /*<>*/ function basename$1(_r_){ - /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _r_); - } - /*<>*/ function dirname$1(_q_){ - /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _q_); - } - /*<>*/ var - /*<>*/ Cygwin = - [0, - null$2, - current_dir_name$1, - parent_dir_name$1, - dir_sep$1, - is_dir_sep$0, - is_relative$0, - is_implicit$0, - check_suffix$0, - chop_suffix_opt$0, - temp_dir_name, - quote, - quote_command, - basename$1, - dirname$1], - _d_ = Stdlib_Sys[4], - Sysdeps = - caml_string_notequal(_d_, "Cygwin") - ? caml_string_notequal(_d_, "Win32") ? Unix : Win32 - : Cygwin, - null$3 = Sysdeps[1], - current_dir_name$2 = Sysdeps[2], - parent_dir_name$2 = Sysdeps[3], - dir_sep$2 = Sysdeps[4], - is_dir_sep$1 = Sysdeps[5], - is_relative$1 = Sysdeps[6], - is_implicit$1 = Sysdeps[7], - check_suffix$1 = Sysdeps[8], - chop_suffix_opt$1 = Sysdeps[9], - temp_dir_name$1 = Sysdeps[10], - quote$1 = Sysdeps[11], - quote_command$1 = Sysdeps[12], - basename$2 = Sysdeps[13], - dirname$2 = Sysdeps[14]; - function concat(dirname, filename){ - /*<>*/ var l = caml_ml_string_length(dirname); - /*<>*/ if - (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_); - } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], dirname, filename); - /*<>*/ } - function chop_suffix(name, suff){ - /*<>*/ return check_suffix$1(name, suff) - ? caml_call3 - (Stdlib_String[15], - name, - 0, - caml_ml_string_length(name) - caml_ml_string_length(suff) | 0) - : /*<>*/ caml_call1 - (Stdlib[1], cst_Filename_chop_suffix); - /*<>*/ } - function extension_len(name){ - /*<>*/ var - i$3 = caml_ml_string_length(name) - 1 | 0, - i0 = i$3; - /*<>*/ for(;;){ - /*<>*/ if(0 <= i0 && ! is_dir_sep$1(name, i0)){ - /*<>*/ if - (46 !== /*<>*/ caml_string_get(name, i0)){ - /*<>*/ var - /*<>*/ i$2 = i0 - 1 | 0, - i0 = i$2; - continue; - } - /*<>*/ var - /*<>*/ i$1 = i0 - 1 | 0, - i = i$1; - /*<>*/ for(;;){ - /*<>*/ if(0 <= i && ! is_dir_sep$1(name, i)){ - /*<>*/ if - (46 !== /*<>*/ caml_string_get(name, i)) - return caml_ml_string_length(name) - i0 | 0; - /*<>*/ var - /*<>*/ i$0 = i - 1 | 0, - i = i$0; - continue; - } - /*<>*/ return 0; - } - } - /*<>*/ return 0; - } - /*<>*/ } - function extension(name){ - /*<>*/ /*<>*/ var - l = extension_len(name); - /*<>*/ return 0 === l - ? cst$18 - : /*<>*/ caml_call3 - (Stdlib_String[15], - 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[15], - 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[15], - name, - 0, - caml_ml_string_length(name) - l | 0); - /*<>*/ } - /*<>*/ /*<>*/ var - prng_key = - /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, Stdlib_Random[15][2]); - function temp_file_name(temp_dir, prefix, suffix){ - /*<>*/ var - /*<>*/ random_state = - /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), - /*<>*/ rnd = - /*<>*/ caml_call1 - (Stdlib_Random[15][4], random_state) - & 16777215; - /*<>*/ return concat - (temp_dir, - /*<>*/ caml_call4 - (Stdlib_Printf[4], _e_, prefix, rnd, suffix)); - /*<>*/ } - function _f_(param){ - /*<>*/ return temp_dir_name$1; - /*<>*/ } - /*<>*/ var - /*<>*/ _g_ = - [0, function(_o_){ /*<>*/ return _o_;}], - /*<>*/ current_temp_dir_name = - /*<>*/ caml_call2(Stdlib_Domain[10][1], _g_, _f_); - function set_temp_dir_name(s){ - /*<>*/ return /*<>*/ caml_call2 - (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); - /*<>*/ } - function temp_file(opt, prefix, suffix){ - /*<>*/ if(opt) - var sth = opt[1], temp_dir = sth; - else - var - temp_dir = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], current_temp_dir_name); - var counter = 0; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - name = temp_file_name(temp_dir, prefix, suffix); - /*<>*/ try{ - /*<>*/ /*<>*/ runtime.caml_sys_close - ( /*<>*/ runtime.caml_sys_open(name, _h_, 384)); - /*<>*/ return name; - } - catch(e$0){ - var e = caml_wrap_exception(e$0); - if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); - if(1000 <= counter) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 0); - /*<>*/ var - /*<>*/ counter$0 = counter + 1 | 0, - counter = counter$0; - } - } - /*<>*/ } - function open_temp_file(opt, _m_, _l_, prefix, suffix){ - /*<>*/ if(opt) - var sth = opt[1], mode = sth; - else - var mode = _i_; - /*<>*/ if(_m_) - var sth$0 = _m_[1], perms = sth$0; - else - var perms = 384; - /*<>*/ if(_l_) - var sth$1 = _l_[1], temp_dir = sth$1; - else - var - temp_dir = - /*<>*/ caml_call1 - (Stdlib_Domain[10][2], current_temp_dir_name); - var counter = 0; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - name = temp_file_name(temp_dir, prefix, suffix); - /*<>*/ try{ - /*<>*/ /*<>*/ var - _n_ = - [0, - name, - /*<>*/ caml_call3 - (Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; - /*<>*/ return _n_; - } - catch(e$0){ - var e = caml_wrap_exception(e$0); - if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); - if(1000 <= counter) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 0); - /*<>*/ var - /*<>*/ counter$0 = counter + 1 | 0, - counter = counter$0; - } - } - /*<>*/ } - var - Stdlib_Filename = - [0, - current_dir_name$2, - parent_dir_name$2, - dir_sep$2, - concat, - is_relative$1, - is_implicit$1, - check_suffix$1, - chop_suffix, - chop_suffix_opt$1, - extension, - remove_extension, - chop_extension, - basename$2, - dirname$2, - null$3, - temp_file, - open_temp_file, - get_temp_dir_name, - set_temp_dir_name, - quote$1, - quote_command$1]; - runtime.caml_register_global(65, Stdlib_Filename, "Stdlib__Filename"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Complex -//# unitInfo: Requires: Stdlib, Stdlib__Float -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - zero = [254, 0., 0.], - one = [254, 1., 0.], - i = [254, 0., 1.], - _a_ = [254, 0., 0.]; - function add(x, y){ - /*<>*/ return [254, x[1] + y[1], x[2] + y[2]]; - /*<>*/ } - function sub(x, y){ - /*<>*/ return [254, x[1] - y[1], x[2] - y[2]]; - /*<>*/ } - function neg(x){ - /*<>*/ return [254, - x[1], - x[2]]; - /*<>*/ } - function conj(x){ - /*<>*/ return [254, x[1], - x[2]]; - /*<>*/ } - function mul(x, y){ - /*<>*/ return [254, - x[1] * y[1] - x[2] * y[2], - x[1] * y[2] + x[2] * y[1]]; - /*<>*/ } - function div(x, y){ - /*<>*/ if - ( /*<>*/ Math.abs(y[2]) - <= /*<>*/ Math.abs(y[1])){ - /*<>*/ var - /*<>*/ r = y[2] / y[1], - /*<>*/ d = y[1] + r * y[2]; - /*<>*/ return [254, - (x[1] + r * x[2]) / d, - (x[2] - r * x[1]) / d]; - } - /*<>*/ var - /*<>*/ r$0 = y[1] / y[2], - /*<>*/ d$0 = y[2] + r$0 * y[1]; - /*<>*/ return [254, - (r$0 * x[1] + x[2]) / d$0, - (r$0 * x[2] - x[1]) / d$0]; - /*<>*/ } - function inv(x){ - /*<>*/ return div(one, x); - /*<>*/ } - function norm2(x){ - /*<>*/ return x[1] * x[1] + x[2] * x[2]; - /*<>*/ } - function norm(x){ - /*<>*/ return /*<>*/ runtime.caml_hypot_float - (x[1], x[2]); - /*<>*/ } - function arg(x){ - /*<>*/ return /*<>*/ Math.atan2 - (x[2], x[1]); - /*<>*/ } - function polar(n, a){ - /*<>*/ return [254, - /*<>*/ Math.cos(a) * n, - /*<>*/ Math.sin(a) * n]; - /*<>*/ } - function sqrt(x){ - /*<>*/ if(x[1] == 0. && x[2] == 0.) - /*<>*/ return _a_; - /*<>*/ var - /*<>*/ r = /*<>*/ Math.abs(x[1]), - /*<>*/ i = /*<>*/ Math.abs(x[2]); - if(i <= r) - /*<>*/ var - /*<>*/ q = i / r, - w = - /*<>*/ Math.sqrt(r) - * - /*<>*/ Math.sqrt - (0.5 * (1. + /*<>*/ Math.sqrt(1. + q * q))); - else - /*<>*/ var - /*<>*/ q$0 = r / i, - w = - /*<>*/ Math.sqrt(i) - * - /*<>*/ Math.sqrt - (0.5 * (q$0 + /*<>*/ Math.sqrt(1. + q$0 * q$0))); - if(0. <= x[1]) /*<>*/ return [254, w, 0.5 * x[2] / w]; - var w$0 = 0. <= x[2] ? w : - w; - /*<>*/ return [254, 0.5 * i / w, w$0]; - /*<>*/ } - function exp(x){ - /*<>*/ /*<>*/ var - e = /*<>*/ Math.exp(x[1]); - /*<>*/ return [254, - e * /*<>*/ Math.cos(x[2]), - e * /*<>*/ Math.sin(x[2])]; - /*<>*/ } - function log(x){ - /*<>*/ /*<>*/ var - _b_ = /*<>*/ Math.atan2(x[2], x[1]); - /*<>*/ return [254, - /*<>*/ Math.log(norm(x)), - _b_]; - /*<>*/ } - function pow(x, y){ - /*<>*/ return exp(mul(y, log(x))); - /*<>*/ } - var - Stdlib_Complex = - [0, - zero, - one, - i, - neg, - conj, - add, - sub, - mul, - inv, - div, - sqrt, - norm2, - norm, - arg, - polar, - exp, - log, - pow]; - runtime.caml_register_global(15, Stdlib_Complex, "Stdlib__Complex"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__ArrayLabels -//# unitInfo: Requires: Stdlib__Array -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - global_data = runtime.caml_get_global_data(), - Stdlib_Array = global_data.Stdlib__Array, - init = Stdlib_Array[1], - make_matrix = Stdlib_Array[2], - append = Stdlib_Array[3], - concat = Stdlib_Array[4], - sub = Stdlib_Array[5], - copy = Stdlib_Array[6], - fill = Stdlib_Array[7], - blit = Stdlib_Array[8], - to_list = Stdlib_Array[9], - of_list = Stdlib_Array[10], - iter = Stdlib_Array[11], - iteri = Stdlib_Array[12], - map = Stdlib_Array[13], - mapi = Stdlib_Array[14], - fold_left = Stdlib_Array[15], - fold_left_map = Stdlib_Array[16], - fold_right = Stdlib_Array[17], - iter2 = Stdlib_Array[18], - map2 = Stdlib_Array[19], - for_all = Stdlib_Array[20], - exists = Stdlib_Array[21], - for_all2 = Stdlib_Array[22], - exists2 = Stdlib_Array[23], - mem = Stdlib_Array[24], - memq = Stdlib_Array[25], - find_opt = Stdlib_Array[26], - find_map = Stdlib_Array[27], - split = Stdlib_Array[28], - combine = Stdlib_Array[29], - sort = Stdlib_Array[30], - stable_sort = Stdlib_Array[31], - fast_sort = Stdlib_Array[32], - to_seq = Stdlib_Array[33], - to_seqi = Stdlib_Array[34], - of_seq = Stdlib_Array[35], - Floatarray = Stdlib_Array[36], - Stdlib_ArrayLabels = - [0, - init, - make_matrix, - append, - concat, - sub, - copy, - fill, - blit, - to_list, - of_list, - iter, - iteri, - map, - mapi, - fold_left, - fold_left_map, - fold_right, - iter2, - map2, - for_all, - exists, - for_all2, - exists2, - mem, - memq, - find_opt, - find_map, - split, - combine, - sort, - stable_sort, - fast_sort, - to_seq, - to_seqi, - of_seq, - Floatarray]; - runtime.caml_register_global(1, Stdlib_ArrayLabels, "Stdlib__ArrayLabels"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__ListLabels -//# unitInfo: Requires: Stdlib__List -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - global_data = runtime.caml_get_global_data(), - Stdlib_List = global_data.Stdlib__List, - length = Stdlib_List[1], - compare_lengths = Stdlib_List[2], - compare_length_with = Stdlib_List[3], - cons = Stdlib_List[4], - hd = Stdlib_List[5], - tl = Stdlib_List[6], - nth = Stdlib_List[7], - nth_opt = Stdlib_List[8], - rev = Stdlib_List[9], - init = Stdlib_List[10], - append = Stdlib_List[11], - rev_append = Stdlib_List[12], - concat = Stdlib_List[13], - flatten = Stdlib_List[14], - equal = Stdlib_List[15], - compare = Stdlib_List[16], - iter = Stdlib_List[17], - iteri = Stdlib_List[18], - map = Stdlib_List[19], - mapi = Stdlib_List[20], - rev_map = Stdlib_List[21], - filter_map = Stdlib_List[22], - concat_map = Stdlib_List[23], - fold_left_map = Stdlib_List[24], - fold_left = Stdlib_List[25], - fold_right = Stdlib_List[26], - iter2 = Stdlib_List[27], - map2 = Stdlib_List[28], - rev_map2 = Stdlib_List[29], - fold_left2 = Stdlib_List[30], - fold_right2 = Stdlib_List[31], - for_all = Stdlib_List[32], - exists = Stdlib_List[33], - for_all2 = Stdlib_List[34], - exists2 = Stdlib_List[35], - mem = Stdlib_List[36], - memq = Stdlib_List[37], - find = Stdlib_List[38], - find_opt = Stdlib_List[39], - find_map = Stdlib_List[40], - filter = Stdlib_List[41], - find_all = Stdlib_List[42], - filteri = Stdlib_List[43], - partition = Stdlib_List[44], - partition_map = Stdlib_List[45], - assoc = Stdlib_List[46], - assoc_opt = Stdlib_List[47], - assq = Stdlib_List[48], - assq_opt = Stdlib_List[49], - mem_assoc = Stdlib_List[50], - mem_assq = Stdlib_List[51], - remove_assoc = Stdlib_List[52], - remove_assq = Stdlib_List[53], - split = Stdlib_List[54], - combine = Stdlib_List[55], - sort = Stdlib_List[56], - stable_sort = Stdlib_List[57], - fast_sort = Stdlib_List[58], - sort_uniq = Stdlib_List[59], - merge = Stdlib_List[60], - to_seq = Stdlib_List[61], - of_seq = Stdlib_List[62], - Stdlib_ListLabels = - [0, - length, - compare_lengths, - compare_length_with, - cons, - hd, - tl, - nth, - nth_opt, - rev, - init, - append, - rev_append, - concat, - flatten, - equal, - compare, - iter, - iteri, - map, - mapi, - rev_map, - filter_map, - concat_map, - fold_left_map, - fold_left, - fold_right, - iter2, - map2, - rev_map2, - fold_left2, - fold_right2, - for_all, - exists, - for_all2, - exists2, - mem, - memq, - find, - find_opt, - find_map, - filter, - find_all, - filteri, - partition, - partition_map, - assoc, - assoc_opt, - assq, - assq_opt, - mem_assoc, - mem_assq, - remove_assoc, - remove_assq, - split, - combine, - sort, - stable_sort, - fast_sort, - sort_uniq, - merge, - to_seq, - of_seq]; - runtime.caml_register_global(1, Stdlib_ListLabels, "Stdlib__ListLabels"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__BytesLabels -//# unitInfo: Requires: Stdlib__Bytes -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - global_data = runtime.caml_get_global_data(), - Stdlib_Bytes = global_data.Stdlib__Bytes, - make = Stdlib_Bytes[1], - init = Stdlib_Bytes[2], - empty = Stdlib_Bytes[3], - copy = Stdlib_Bytes[4], - of_string = Stdlib_Bytes[5], - to_string = Stdlib_Bytes[6], - sub = Stdlib_Bytes[7], - sub_string = Stdlib_Bytes[8], - extend = Stdlib_Bytes[9], - fill = Stdlib_Bytes[10], - blit = Stdlib_Bytes[11], - blit_string = Stdlib_Bytes[12], - concat = Stdlib_Bytes[13], - cat = Stdlib_Bytes[14], - iter = Stdlib_Bytes[15], - iteri = Stdlib_Bytes[16], - map = Stdlib_Bytes[17], - mapi = Stdlib_Bytes[18], - fold_left = Stdlib_Bytes[19], - fold_right = Stdlib_Bytes[20], - for_all = Stdlib_Bytes[21], - exists = Stdlib_Bytes[22], - trim = Stdlib_Bytes[23], - escaped = Stdlib_Bytes[24], - index = Stdlib_Bytes[25], - index_opt = Stdlib_Bytes[26], - rindex = Stdlib_Bytes[27], - rindex_opt = Stdlib_Bytes[28], - index_from = Stdlib_Bytes[29], - index_from_opt = Stdlib_Bytes[30], - rindex_from = Stdlib_Bytes[31], - rindex_from_opt = Stdlib_Bytes[32], - contains = Stdlib_Bytes[33], - contains_from = Stdlib_Bytes[34], - rcontains_from = Stdlib_Bytes[35], - uppercase_ascii = Stdlib_Bytes[36], - lowercase_ascii = Stdlib_Bytes[37], - capitalize_ascii = Stdlib_Bytes[38], - uncapitalize_ascii = Stdlib_Bytes[39], - compare = Stdlib_Bytes[40], - equal = Stdlib_Bytes[41], - starts_with = Stdlib_Bytes[42], - ends_with = Stdlib_Bytes[43], - unsafe_to_string = Stdlib_Bytes[44], - unsafe_of_string = Stdlib_Bytes[45], - split_on_char = Stdlib_Bytes[46], - to_seq = Stdlib_Bytes[47], - to_seqi = Stdlib_Bytes[48], - of_seq = Stdlib_Bytes[49], - get_utf_8_uchar = Stdlib_Bytes[50], - set_utf_8_uchar = Stdlib_Bytes[51], - is_valid_utf_8 = Stdlib_Bytes[52], - get_utf_16be_uchar = Stdlib_Bytes[53], - set_utf_16be_uchar = Stdlib_Bytes[54], - is_valid_utf_16be = Stdlib_Bytes[55], - get_utf_16le_uchar = Stdlib_Bytes[56], - set_utf_16le_uchar = Stdlib_Bytes[57], - is_valid_utf_16le = Stdlib_Bytes[58], - get_uint8 = Stdlib_Bytes[59], - get_int8 = Stdlib_Bytes[60], - get_uint16_ne = Stdlib_Bytes[61], - get_uint16_be = Stdlib_Bytes[62], - get_uint16_le = Stdlib_Bytes[63], - get_int16_ne = Stdlib_Bytes[64], - get_int16_be = Stdlib_Bytes[65], - get_int16_le = Stdlib_Bytes[66], - get_int32_ne = Stdlib_Bytes[67], - get_int32_be = Stdlib_Bytes[68], - get_int32_le = Stdlib_Bytes[69], - get_int64_ne = Stdlib_Bytes[70], - get_int64_be = Stdlib_Bytes[71], - get_int64_le = Stdlib_Bytes[72], - set_uint8 = Stdlib_Bytes[73], - set_int8 = Stdlib_Bytes[74], - set_uint16_ne = Stdlib_Bytes[75], - set_uint16_be = Stdlib_Bytes[76], - set_uint16_le = Stdlib_Bytes[77], - set_int16_ne = Stdlib_Bytes[78], - set_int16_be = Stdlib_Bytes[79], - set_int16_le = Stdlib_Bytes[80], - set_int32_ne = Stdlib_Bytes[81], - set_int32_be = Stdlib_Bytes[82], - set_int32_le = Stdlib_Bytes[83], - set_int64_ne = Stdlib_Bytes[84], - set_int64_be = Stdlib_Bytes[85], - set_int64_le = Stdlib_Bytes[86], - unsafe_escape = Stdlib_Bytes[87], - Stdlib_BytesLabels = - [0, - make, - init, - empty, - copy, - of_string, - to_string, - sub, - sub_string, - extend, - fill, - blit, - blit_string, - concat, - cat, - iter, - iteri, - map, - mapi, - fold_left, - fold_right, - for_all, - exists, - trim, - escaped, - index, - index_opt, - rindex, - rindex_opt, - index_from, - index_from_opt, - rindex_from, - rindex_from_opt, - contains, - contains_from, - rcontains_from, - uppercase_ascii, - lowercase_ascii, - capitalize_ascii, - uncapitalize_ascii, - compare, - equal, - starts_with, - ends_with, - unsafe_to_string, - unsafe_of_string, - split_on_char, - to_seq, - to_seqi, - of_seq, - get_utf_8_uchar, - set_utf_8_uchar, - is_valid_utf_8, - get_utf_16be_uchar, - set_utf_16be_uchar, - is_valid_utf_16be, - get_utf_16le_uchar, - set_utf_16le_uchar, - is_valid_utf_16le, - get_uint8, - get_int8, - get_uint16_ne, - get_uint16_be, - get_uint16_le, - get_int16_ne, - get_int16_be, - get_int16_le, - get_int32_ne, - get_int32_be, - get_int32_le, - get_int64_ne, - get_int64_be, - get_int64_le, - set_uint8, - set_int8, - set_uint16_ne, - set_uint16_be, - set_uint16_le, - set_int16_ne, - set_int16_be, - set_int16_le, - set_int32_ne, - set_int32_be, - set_int32_le, - set_int64_ne, - set_int64_be, - set_int64_le, - unsafe_escape]; - runtime.caml_register_global(1, Stdlib_BytesLabels, "Stdlib__BytesLabels"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__StringLabels -//# unitInfo: Requires: Stdlib__String -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - global_data = runtime.caml_get_global_data(), - Stdlib_String = global_data.Stdlib__String, - make = Stdlib_String[1], - init = Stdlib_String[2], - empty = Stdlib_String[3], - of_bytes = Stdlib_String[4], - to_bytes = Stdlib_String[5], - concat = Stdlib_String[6], - cat = Stdlib_String[7], - equal = Stdlib_String[8], - compare = Stdlib_String[9], - starts_with = Stdlib_String[10], - ends_with = Stdlib_String[11], - contains_from = Stdlib_String[12], - rcontains_from = Stdlib_String[13], - contains = Stdlib_String[14], - sub = Stdlib_String[15], - split_on_char = Stdlib_String[16], - map = Stdlib_String[17], - mapi = Stdlib_String[18], - fold_left = Stdlib_String[19], - fold_right = Stdlib_String[20], - for_all = Stdlib_String[21], - exists = Stdlib_String[22], - trim = Stdlib_String[23], - escaped = Stdlib_String[24], - uppercase_ascii = Stdlib_String[25], - lowercase_ascii = Stdlib_String[26], - capitalize_ascii = Stdlib_String[27], - uncapitalize_ascii = Stdlib_String[28], - iter = Stdlib_String[29], - iteri = Stdlib_String[30], - index_from = Stdlib_String[31], - index_from_opt = Stdlib_String[32], - rindex_from = Stdlib_String[33], - rindex_from_opt = Stdlib_String[34], - index = Stdlib_String[35], - index_opt = Stdlib_String[36], - rindex = Stdlib_String[37], - rindex_opt = Stdlib_String[38], - to_seq = Stdlib_String[39], - to_seqi = Stdlib_String[40], - of_seq = Stdlib_String[41], - get_utf_8_uchar = Stdlib_String[42], - is_valid_utf_8 = Stdlib_String[43], - get_utf_16be_uchar = Stdlib_String[44], - is_valid_utf_16be = Stdlib_String[45], - get_utf_16le_uchar = Stdlib_String[46], - is_valid_utf_16le = Stdlib_String[47], - blit = Stdlib_String[48], - get_uint8 = Stdlib_String[49], - get_int8 = Stdlib_String[50], - get_uint16_ne = Stdlib_String[51], - get_uint16_be = Stdlib_String[52], - get_uint16_le = Stdlib_String[53], - get_int16_ne = Stdlib_String[54], - get_int16_be = Stdlib_String[55], - get_int16_le = Stdlib_String[56], - get_int32_ne = Stdlib_String[57], - hash = Stdlib_String[58], - seeded_hash = Stdlib_String[59], - get_int32_be = Stdlib_String[60], - get_int32_le = Stdlib_String[61], - get_int64_ne = Stdlib_String[62], - get_int64_be = Stdlib_String[63], - get_int64_le = Stdlib_String[64], - Stdlib_StringLabels = - [0, - make, - init, - empty, - of_bytes, - to_bytes, - concat, - cat, - equal, - compare, - starts_with, - ends_with, - contains_from, - rcontains_from, - contains, - sub, - split_on_char, - map, - mapi, - fold_left, - fold_right, - for_all, - exists, - trim, - escaped, - uppercase_ascii, - lowercase_ascii, - capitalize_ascii, - uncapitalize_ascii, - iter, - iteri, - index_from, - index_from_opt, - rindex_from, - rindex_from_opt, - index, - index_opt, - rindex, - rindex_opt, - to_seq, - to_seqi, - of_seq, - get_utf_8_uchar, - is_valid_utf_8, - get_utf_16be_uchar, - is_valid_utf_16be, - get_utf_16le_uchar, - is_valid_utf_16le, - blit, - get_uint8, - get_int8, - get_uint16_ne, - get_uint16_be, - get_uint16_le, - get_int16_ne, - get_int16_be, - get_int16_le, - get_int32_ne, - hash, - seeded_hash, - get_int32_be, - get_int32_le, - get_int64_ne, - get_int64_be, - get_int64_le]; - runtime.caml_register_global - (1, Stdlib_StringLabels, "Stdlib__StringLabels"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__MoreLabels -//# unitInfo: Requires: Stdlib__Hashtbl, Stdlib__Map, Stdlib__Set -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - global_data = runtime.caml_get_global_data(), - Stdlib_Set = global_data.Stdlib__Set, - Stdlib_Map = global_data.Stdlib__Map, - Stdlib_Hashtbl = global_data.Stdlib__Hashtbl, - Stdlib_MoreLabels = [0, Stdlib_Hashtbl, Stdlib_Map, Stdlib_Set]; - runtime.caml_register_global(3, Stdlib_MoreLabels, "Stdlib__MoreLabels"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__StdLabels -(function(globalThis){ - "use strict"; - var runtime = globalThis.jsoo_runtime, Stdlib_StdLabels = [0]; - runtime.caml_register_global(0, Stdlib_StdLabels, "Stdlib__StdLabels"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__In_channel -//# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Fun, Stdlib__Sys -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_create_bytes = runtime.caml_create_bytes, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_ml_bytes_length = runtime.caml_ml_bytes_length, - 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) - : 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, - Stdlib = global_data.Stdlib, - Stdlib_Sys = global_data.Stdlib__Sys, - Stdlib_Fun = global_data.Stdlib__Fun, - stdin = Stdlib[38], - open_bin = Stdlib[80], - open_text = Stdlib[79], - open_gen = Stdlib[81], - cst_In_channel_input_all_chann = - "In_channel.input_all: channel content is larger than maximum string length", - _a_ = [0, 0]; - function with_open(openfun, s, f){ - /*<>*/ /*<>*/ var - ic = /*<>*/ caml_call1(openfun, s); - function _r_(param){ - /*<>*/ return /*<>*/ caml_call1 - (f, ic); - /*<>*/ } - function _s_(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[94], ic); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Fun[4], _s_, _r_); - /*<>*/ } - function with_open_bin(s, f){ - /*<>*/ return with_open(Stdlib[80], s, f); - /*<>*/ } - function with_open_text(s, f){ - /*<>*/ return with_open(Stdlib[79], s, f); - /*<>*/ } - function with_open_gen(flags, perm, s, f){ - /*<>*/ return with_open - ( /*<>*/ caml_call2(Stdlib[81], flags, perm), - s, - f); - /*<>*/ } - var - seek = Stdlib[96][4], - pos = Stdlib[96][5], - length = Stdlib[96][6], - close = Stdlib[93], - close_noerr = Stdlib[94]; - function input_char(ic){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - c = /*<>*/ caml_call1(Stdlib[82], ic); - } - catch(_q_){ - var _p_ = caml_wrap_exception(_q_); - if(_p_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_p_, 0); - } - /*<>*/ return [0, c]; - /*<>*/ } - function input_byte(ic){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - n = /*<>*/ caml_call1(Stdlib[87], ic); - } - catch(_o_){ - var _n_ = caml_wrap_exception(_o_); - if(_n_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_n_, 0); - } - /*<>*/ return [0, n]; - /*<>*/ } - function input_line(ic){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - s = /*<>*/ caml_call1(Stdlib[83], ic); - } - catch(_m_){ - var _l_ = caml_wrap_exception(_m_); - if(_l_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_l_, 0); - } - /*<>*/ return [0, s]; - /*<>*/ } - var input = Stdlib[84]; - function really_input(ic, buf, pos, len){ - /*<>*/ try{ - /*<>*/ /*<>*/ caml_call4 - (Stdlib[85], ic, buf, pos, len); - /*<>*/ return _a_; - } - catch(_k_){ - var _j_ = caml_wrap_exception(_k_); - if(_j_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_j_, 0); - } - /*<>*/ } - function really_input_string(ic, len){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - s = /*<>*/ caml_call2(Stdlib[86], ic, len); - } - catch(_i_){ - var _h_ = caml_wrap_exception(_i_); - if(_h_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_h_, 0); - } - /*<>*/ return [0, s]; - /*<>*/ } - function read_upto(ic, buf, ofs, len){ - /*<>*/ var ofs$0 = ofs, len$0 = len; - /*<>*/ for(;;){ - if(0 !== len$0){ - /*<>*/ /*<>*/ var - r = - /*<>*/ caml_call4 - (Stdlib[84], ic, buf, ofs$0, len$0); - /*<>*/ if(0 !== r){ - var - len$1 = len$0 - r | 0, - ofs$1 = ofs$0 + r | 0, - ofs$0 = ofs$1, - len$0 = len$1; - continue; - } - } - /*<>*/ return ofs$0 - ofs | 0; - } - /*<>*/ } - function ensure(buf, ofs, n){ - /*<>*/ var len = caml_ml_bytes_length(buf); - if((ofs + n | 0) <= len) /*<>*/ return buf; - /*<>*/ /*<>*/ var - new_len = [0, len]; - for(;;){ - if(new_len[1] >= (ofs + n | 0)){ - /*<>*/ var - new_len$0 = new_len[1], - new_len$1 = - new_len$0 <= Stdlib_Sys[12] - ? new_len$0 - : ofs - < Stdlib_Sys[12] - ? Stdlib_Sys[12] - : /*<>*/ caml_call1 - (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); - /*<>*/ return new_buf; - } - new_len[1] = (2 * new_len[1] | 0) + 1 | 0; - } - /*<>*/ } - function input_all(ic){ - /*<>*/ /*<>*/ var - chunk_size = 65536; - /*<>*/ try{ - /*<>*/ var - /*<>*/ _d_ = - /*<>*/ caml_call1(Stdlib[91], ic), - /*<>*/ _e_ = - /*<>*/ caml_call1(Stdlib[92], ic) - _d_ | 0, - initial_size = _e_; - } - catch(_g_){ - var _b_ = caml_wrap_exception(_g_); - if(_b_[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(_b_, 0); - var initial_size = -1; - } - /*<>*/ var - /*<>*/ initial_size$0 = - 0 <= initial_size ? initial_size : chunk_size, - initial_size$1 = - initial_size$0 <= Stdlib_Sys[12] ? initial_size$0 : Stdlib_Sys[12], - /*<>*/ buf = - /*<>*/ caml_create_bytes(initial_size$1), - /*<>*/ nread = - read_upto(ic, buf, 0, initial_size$1); - if(nread < initial_size$1) - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Bytes[8], buf, 0, nread); - /*<>*/ try{ - /*<>*/ /*<>*/ var - c = /*<>*/ caml_call1(Stdlib[82], ic); - } - catch(_f_){ - var _c_ = caml_wrap_exception(_f_); - if(_c_ === Stdlib[12]) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Bytes[44], buf); - throw caml_maybe_attach_backtrace(_c_, 0); - } - /*<>*/ /*<>*/ var - buf$2 = ensure(buf, nread, 65537); - /*<>*/ /*<>*/ runtime.caml_bytes_set - (buf$2, nread, c); - /*<>*/ var - /*<>*/ ofs$1 = nread + 1 | 0, - buf$0 = buf$2, - ofs = ofs$1; - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ buf$1 = ensure(buf$0, ofs, chunk_size), - rem = 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); - var ofs$0 = ofs + rem | 0, buf$0 = buf$1, ofs = ofs$0; - } - /*<>*/ } - var - set_binary_mode = Stdlib[95], - Stdlib_In_channel = - [0, - stdin, - open_bin, - open_text, - open_gen, - with_open_bin, - with_open_text, - with_open_gen, - seek, - pos, - length, - close, - close_noerr, - input_char, - input_byte, - input_line, - input, - really_input, - really_input_string, - input_all, - set_binary_mode]; - runtime.caml_register_global(6, Stdlib_In_channel, "Stdlib__In_channel"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Out_channel -//# unitInfo: Requires: Stdlib, Stdlib__Fun -(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]); - } - /*<>*/ 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, - Stdlib_Fun = global_data.Stdlib__Fun, - stdout = Stdlib[39], - stderr = Stdlib[40], - open_bin = Stdlib[61], - open_text = Stdlib[60], - open_gen = Stdlib[62]; - function with_open(openfun, s, f){ - /*<>*/ /*<>*/ var - oc = /*<>*/ caml_call1(openfun, s); - function _a_(param){ - /*<>*/ return /*<>*/ caml_call1 - (f, oc); - /*<>*/ } - function _b_(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[77], oc); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Fun[4], _b_, _a_); - /*<>*/ } - function with_open_bin(s, f){ - /*<>*/ return with_open(Stdlib[61], s, f); - /*<>*/ } - function with_open_text(s, f){ - /*<>*/ return with_open(Stdlib[60], s, f); - /*<>*/ } - function with_open_gen(flags, perm, s, f){ - /*<>*/ return with_open - ( /*<>*/ caml_call2(Stdlib[62], flags, perm), - s, - f); - /*<>*/ } - var - seek = Stdlib[96][1], - pos = Stdlib[96][2], - length = Stdlib[96][3], - close = Stdlib[76], - close_noerr = Stdlib[77], - flush = Stdlib[63], - flush_all = Stdlib[64], - output_char = Stdlib[65], - output_byte = Stdlib[70], - output_string = Stdlib[66], - output_bytes = Stdlib[67], - output = Stdlib[68], - output_substring = Stdlib[69], - set_binary_mode = Stdlib[78], - Stdlib_Out_channel = - [0, - stdout, - stderr, - open_bin, - open_text, - open_gen, - with_open_bin, - with_open_text, - with_open_gen, - seek, - pos, - length, - close, - close_noerr, - flush, - flush_all, - output_char, - output_byte, - output_string, - output_bytes, - output, - output_substring, - set_binary_mode, - runtime.caml_ml_set_buffered, - runtime.caml_ml_is_buffered]; - runtime.caml_register_global(2, Stdlib_Out_channel, "Stdlib__Out_channel"); - return; - /*<>*/ } - (globalThis)); - -//# unitInfo: Provides: Stdlib__Effect -//# unitInfo: Requires: Stdlib, Stdlib__Callback, Stdlib__Printexc, Stdlib__Printf -//# unitInfo: Effects_without_cps: true -(function - (globalThis){ - "use strict"; - var - runtime = globalThis.jsoo_runtime, - caml_alloc_stack = runtime.caml_alloc_stack, - caml_continuation_use_noexc = runtime.caml_continuation_use_noexc, - caml_fresh_oo_id = runtime.caml_fresh_oo_id, - caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, - caml_restore_raw_backtrace = runtime.caml_restore_raw_backtrace, - caml_wrap_exception = runtime.caml_wrap_exception, - jsoo_effect_not_supported = runtime.jsoo_effect_not_supported; - /*<>*/ 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 - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib, - Stdlib_Printexc = global_data.Stdlib__Printexc, - Stdlib_Printf = global_data.Stdlib__Printf, - Stdlib_Callback = global_data.Stdlib__Callback, - /*<>*/ Unhandled = - [248, "Stdlib.Effect.Unhandled", caml_fresh_oo_id(0)], - /*<>*/ Continuation_already_resumed = - [248, "Stdlib.Effect.Continuation_already_resumed", caml_fresh_oo_id(0)], - cst_impossible = "impossible", - cst_Initial_setup = "Initial_setup__", - cst_E = "E", - _a_ = - [0, - [11, "Stdlib.Effect.Unhandled(", [2, 0, [12, 41, 0]]], - "Stdlib.Effect.Unhandled(%s)"], - cst_Stdlib_Effect_Should_not_s = "Stdlib.Effect.Should_not_see_this__", - cst_Effect_Unhandled = "Effect.Unhandled", - cst_Effect_Continuation_alread = "Effect.Continuation_already_resumed"; - function printer(param){ - /*<>*/ if(param[1] !== Unhandled) - /*<>*/ return 0; - /*<>*/ var - x = param[2], - /*<>*/ _j_ = - /*<>*/ caml_call1(Stdlib_Printexc[26], x), - /*<>*/ msg = - /*<>*/ caml_call2(Stdlib_Printf[4], _a_, _j_); - /*<>*/ return [0, msg]; - /*<>*/ } - /*<>*/ /*<>*/ caml_call1 - (Stdlib_Printexc[9], printer); - /*<>*/ /*<>*/ var - Should_not_see_this = - [248, cst_Stdlib_Effect_Should_not_s, caml_fresh_oo_id(0)]; - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Callback[2], - cst_Effect_Unhandled, - [0, Unhandled, Should_not_see_this]); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Callback[2], - cst_Effect_Continuation_alread, - Continuation_already_resumed); - /*<>*/ function continue$0(k, v){ - function _h_(x){ - /*<>*/ return x; - /*<>*/ } - /*<>*/ /*<>*/ var - _i_ = /*<>*/ caml_continuation_use_noexc(k); - /*<>*/ return /*<>*/ jsoo_effect_not_supported - (); - /*<>*/ } - function discontinue(k, e){ - function _f_(e){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 1); - /*<>*/ } - /*<>*/ /*<>*/ var - _g_ = /*<>*/ caml_continuation_use_noexc(k); - /*<>*/ return /*<>*/ jsoo_effect_not_supported - (); - /*<>*/ } - function discontinue_with_backtrace(k, e, bt){ - function _d_(e){ - /*<>*/ caml_restore_raw_backtrace(e, bt); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 0); - /*<>*/ } - /*<>*/ /*<>*/ var - _e_ = /*<>*/ caml_continuation_use_noexc(k); - /*<>*/ return /*<>*/ jsoo_effect_not_supported - (); - /*<>*/ } - function match_with(comp, arg, handler){ - function effc(eff, k, last_fiber){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(handler[3], eff); - if(! match) - /*<>*/ return /*<>*/ jsoo_effect_not_supported - (); - var f = match[1]; - /*<>*/ return /*<>*/ caml_call1(f, k); - /*<>*/ } - /*<>*/ /*<>*/ var - s = - /*<>*/ caml_alloc_stack(handler[1], handler[2], effc); - /*<>*/ return /*<>*/ jsoo_effect_not_supported - (); - /*<>*/ } - function try_with(comp, arg, handler){ - function effc(eff, k, last_fiber){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(handler[1], eff); - if(! match) - /*<>*/ return /*<>*/ jsoo_effect_not_supported - (); - var f = match[1]; - /*<>*/ return /*<>*/ caml_call1(f, k); - /*<>*/ } - function _c_(e){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 1); - /*<>*/ } - /*<>*/ /*<>*/ var - s = - /*<>*/ caml_alloc_stack - (function(x){ - /*<>*/ return x; - /*<>*/ }, - _c_, - effc); - /*<>*/ return /*<>*/ jsoo_effect_not_supported - (); - /*<>*/ } - /*<>*/ /*<>*/ var - Deep = - [0, - continue$0, - discontinue, - discontinue_with_backtrace, - match_with, - try_with]; - function fiber(f){ - /*<>*/ var - /*<>*/ Initial_setup = - [248, cst_Initial_setup, caml_fresh_oo_id(0)], - /*<>*/ E = [248, cst_E, caml_fresh_oo_id(0)]; - function f$0(param){ - /*<>*/ return /*<>*/ caml_call1 - (f, /*<>*/ jsoo_effect_not_supported()); - /*<>*/ } - /*<>*/ function error(param){ - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], cst_impossible); - /*<>*/ } - function effc(eff, k, last_fiber){ - /*<>*/ if(eff === Initial_setup) - /*<>*/ throw [0, E, k]; - /*<>*/ return error(0); - /*<>*/ } - /*<>*/ /*<>*/ var - s = /*<>*/ caml_alloc_stack(error, error, effc); - /*<>*/ try{ - /*<>*/ /*<>*/ jsoo_effect_not_supported - (); - var _b_ = 0; - } - catch(exn$0){ - var exn = caml_wrap_exception(exn$0); - if(exn[1] !== E) throw caml_maybe_attach_backtrace(exn, 0); - var k = exn[2]; - /*<>*/ return k; - } - /*<>*/ return error(0); - /*<>*/ } - function continue_gen(k, resume_fun, v, handler){ - function effc(eff, k, last_fiber){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(handler[3], eff); - if(! match) - /*<>*/ return /*<>*/ jsoo_effect_not_supported - (); - var f = match[1]; - /*<>*/ return /*<>*/ caml_call1 - (f, k); - /*<>*/ } - /*<>*/ /*<>*/ var - stack = - /*<>*/ runtime.caml_continuation_use_and_update_handler_noexc - (k, handler[1], handler[2], effc); - /*<>*/ return /*<>*/ jsoo_effect_not_supported - (); - /*<>*/ } - function continue_with(k, v, handler){ - /*<>*/ return continue_gen - (k, - function(x){ - /*<>*/ return x; - /*<>*/ }, - v, - handler); - /*<>*/ } - function discontinue_with(k, v, handler){ - /*<>*/ return continue_gen - (k, - function(e){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 1); - /*<>*/ }, - v, - handler); - /*<>*/ } - function discontinue_with_backtrace$0(k, v, bt, handler){ - /*<>*/ return continue_gen - (k, - function(e){ - /*<>*/ caml_restore_raw_backtrace(e, bt); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (e, 0); - /*<>*/ }, - v, - handler); - /*<>*/ } - var - Stdlib_Effect = - [0, - Unhandled, - Continuation_already_resumed, - Deep, - [0, - fiber, - continue_with, - discontinue_with, - discontinue_with_backtrace$0]]; - runtime.caml_register_global(13, Stdlib_Effect, "Stdlib__Effect"); - return; - /*<>*/ } - (globalThis)); diff --git a/testing/dead_field.js b/testing/dead_field.js deleted file mode 100644 index c9c740a5b2..0000000000 --- a/testing/dead_field.js +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by js_of_ocaml -//# buildInfo:effects=false, kind=cmo, use-js-string=true, version=5.4.0+git-5.2.0-99-g50bcd077-dirty - -//# unitInfo: Provides: Dead_field -//# unitInfo: Requires: Stdlib -(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 - _d_ = undefined, - global_data = runtime.caml_get_global_data(), - Stdlib = global_data.Stdlib; - function _a_(_f_, _e_){ - var _g_ = _f_ ? [0, 1, _d_, _e_] : [0, 3, _d_, 4]; - return [0, _g_[1], _g_[3]]; - } - var _b_ = _a_(0, 2)[2], _c_ = _a_(1, 1)[1] + _b_ | 0; - caml_call1(Stdlib[44], _c_); - var Dead_field = [0]; - runtime.caml_register_global(1, Dead_field, "Dead_field"); - return; - } - (globalThis)); From 658dcb0dcadbfc6ec7db1d4824b797e8c4ff06bc Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 4 Oct 2023 11:41:22 -0500 Subject: [PATCH 084/112] Move documentation --- compiler/lib/global_deadcode.ml | 10 ---------- compiler/lib/global_deadcode.mli | 13 +++++++++++++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 2022864a8d..525c31a26a 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -14,16 +14,6 @@ * 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. - - This module provides a global liveness analysis more powerful than that found in [deadcode.ml]. In particular, - this analysis annotates blocks with the specific fields that are live. It also uses [global_flow.ml] to determine - the liveness of function return values. It first computes an initial liveness of each variable by traversing the program IR. - Then it propagates this information to the dependencies of each variable using a flow analysis solver. Lastly it replaces - dead variables with a sentinal zero variable. - - Although this module does not perform any dead-code elimination itself, it is designed to be used to identify and substitute - dead variables that are then removed by [deadcode.ml]. In particular it can allow the elimination of unused functions defined - in functors, which the original deadcode elimination cannot. *) open Code diff --git a/compiler/lib/global_deadcode.mli b/compiler/lib/global_deadcode.mli index ccb1b6c0b6..b5b94e7cbe 100644 --- a/compiler/lib/global_deadcode.mli +++ b/compiler/lib/global_deadcode.mli @@ -16,6 +16,19 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +(** Global deadcode elimination pass. + +This module provides a global liveness analysis more powerful than that found in [deadcode.ml]. In particular, +this analysis annotates blocks with the specific fields that are live. It also uses [global_flow.ml] to determine +the liveness of function return values. It first computes an initial liveness of each variable by traversing the program IR. +Then it propagates this information to the dependencies of each variable using a flow analysis solver. Lastly it replaces +dead variables with a sentinal zero variable (the JS value `undefined`). + +Although this module does not perform any dead-code elimination itself, it is designed to be used to identify and substitute +dead variables that are then removed by [deadcode.ml]. In particular it allows for the elimination of unused functions defined +in functors, which the original deadcode elimination cannot. +*) + val add_sentinal : Code.program -> Code.program * Code.Var.t val f : Code.program -> Code.Var.t -> Global_flow.info -> Code.program \ No newline at end of file From 68673240462c4d700ed3d0613bfec51d8e043f95 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 9 Oct 2023 20:50:11 -0500 Subject: [PATCH 085/112] remove option from deadcode_sentinal --- compiler/lib/driver.ml | 8 ++++---- compiler/lib/generate.ml | 16 +++++++--------- compiler/lib/generate.mli | 2 +- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 1b0bad697d..5d96c644b2 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -110,14 +110,14 @@ let exact_calls profile p = let p, deadcode_sentinal = Global_deadcode.add_sentinal p in let info = Global_flow.f ~fast p in let p = Global_deadcode.f p deadcode_sentinal info in - p, info, Some deadcode_sentinal + p, info, deadcode_sentinal else let info = Global_flow.f ~fast p in - p, info, None + p, info, Code.Var.fresh () (* If deadcode is not run, this field is set to a dummy fresh variable *) in let p = Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p in p, deadcode_sentinal - else p, None + else p, Code.Var.fresh () let print p = if debug () then Code.Print.program (fun _ _ -> "") p; @@ -186,7 +186,7 @@ let generate ~exported_runtime ~wrap_with_fun ~warn_on_unhandled_effect - (((p, live_vars), cps_calls), deadcode_sentinal) = + (((p, live_vars), cps_calls), deadcode_sentinal) = if times () then Format.eprintf "Start Generation...@."; let should_export = should_export wrap_with_fun in Generate.f diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 290ff920d3..1d9280d95e 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -285,7 +285,7 @@ module Ctx = struct ; should_export : bool ; effect_warning : bool ref ; cps_calls : Effects.cps_calls - ; deadcode_sentinal : Var.t option + ; deadcode_sentinal : Var.t } let initial @@ -1042,10 +1042,10 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = let (prop', cx), queue = access_queue queue x in let cx = match cx with - | J.EVar (J.V v) -> ( - match ctx.deadcode_sentinal with - | Some s -> if Var.equal v s then J.ElementHole else J.Element cx - | None -> J.Element cx) + | J.EVar (J.V v) -> + if Var.equal v ctx.deadcode_sentinal + then J.ElementHole + else J.Element cx | _ -> J.Element cx in cx :: args, or_p prop prop', queue) @@ -1596,10 +1596,8 @@ and compile_conditional st queue ~fall_through last scope_stack : _ * _ = match last with | Return x -> let (_px, cx), queue = access_queue queue x in - let return_expr = - match st.ctx.deadcode_sentinal with - | Some sentinal when Var.equal sentinal x -> None - | _ -> Some cx + let return_expr = + if Var.equal st.ctx.deadcode_sentinal x then None else Some cx in true, flush_all queue [ J.Return_statement return_expr, loc ] | Raise (x, k) -> diff --git a/compiler/lib/generate.mli b/compiler/lib/generate.mli index 6a0df32259..eaf1ab8f5e 100644 --- a/compiler/lib/generate.mli +++ b/compiler/lib/generate.mli @@ -25,7 +25,7 @@ val f : -> cps_calls:Effects.cps_calls -> should_export:bool -> warn_on_unhandled_effect:bool - -> deadcode_sentinal:Code.Var.t option + -> deadcode_sentinal:Code.Var.t -> Parse_bytecode.Debug.t -> Javascript.program From bd81aee711e6aaf44aaea8464f035e494f28cb65 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Tue, 10 Oct 2023 10:25:37 +0200 Subject: [PATCH 086/112] improve test --- compiler/lib/driver.ml | 6 +- compiler/lib/global_deadcode.mli | 2 +- compiler/tests-compiler/global_deadcode.ml | 111 +++++++++++++-------- compiler/tests-compiler/util/util.ml | 8 ++ compiler/tests-compiler/util/util.mli | 2 + 5 files changed, 88 insertions(+), 41 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 5d96c644b2..172bdcb324 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -113,7 +113,11 @@ let exact_calls profile p = p, info, deadcode_sentinal else let info = Global_flow.f ~fast p in - p, info, Code.Var.fresh () (* If deadcode is not run, this field is set to a dummy fresh variable *) + let deadcode_sentinal = + (* If deadcode is not enabled, this field is set to a dummy fresh variable *) + Code.Var.fresh () + in + p, info, deadcode_sentinal in let p = Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p in p, deadcode_sentinal diff --git a/compiler/lib/global_deadcode.mli b/compiler/lib/global_deadcode.mli index b5b94e7cbe..250a0edddd 100644 --- a/compiler/lib/global_deadcode.mli +++ b/compiler/lib/global_deadcode.mli @@ -31,4 +31,4 @@ in functors, which the original deadcode elimination cannot. val add_sentinal : Code.program -> Code.program * Code.Var.t -val f : Code.program -> Code.Var.t -> Global_flow.info -> Code.program \ No newline at end of file +val f : Code.program -> Code.Var.t -> Global_flow.info -> Code.program diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index 211f9bea2f..de7a3632f9 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -4,7 +4,7 @@ let%expect_test "Eliminates unused functions from functor" = let program = (* Create two instances of Set functor so compiler can't inline one implementation. *) compile_and_parse_whole_program - ~flags: ["--enable"; "globaldeadcode"] + ~flags:[ "--enable"; "globaldeadcode" ] {| module Int_set = Set.Make (Int);; module String_set = Set.Make (String);; @@ -15,45 +15,75 @@ let%expect_test "Eliminates unused functions from functor" = print_endline (string_of_int (Int_set.find 1 int_set) ^ (String_set.find "hello" string_set)) |} in - (* Expect: compiles functor members used in the program *) - print_fun_decl program (Some "find"); + let app = find_variable program "String_set" in + (let open Js_of_ocaml_compiler in + match app with + | Javascript.ECall (EVar (S { name = Utf8 name; _ }), _, _, _) -> + print_fun_decl program (Some name) + | _ -> ()); [%expect {| - function find(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) throw caml_maybe_attach_backtrace(Not_found, 1); - var - r = param$0[3], - v = param$0[2], - l = param$0[1], - c = caml_call2(Ord[1], x, v); - if(0 === c) return v; - var r$0 = 0 <= c ? r : l, param$0 = r$0; + function _e_(Ord){ + function height(param){if(! param) return 0; var h = param[4]; return h;} + function create(l, v, r){ + if(l) var h = l[4], hl = h; else var hl = 0; + if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + var _m_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, _m_]; } + function bal(l, v, r){ + if(l) var h = l[4], hl = h; else var hl = 0; + if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + if((hr + 2 | 0) < hl){ + if(! l) return invalid_arg(_b_); + var lr = l[3], lv = l[2], ll = l[1], _h_ = height(lr); + if(_h_ <= height(ll)) return create(ll, lv, create(lr, v, r)); + if(! lr) return invalid_arg(_a_); + var lrr = lr[3], lrv = lr[2], lrl = lr[1], _i_ = create(lrr, v, r); + return create(create(ll, lv, lrl), lrv, _i_); + } + if((hl + 2 | 0) >= hr){ + var _l_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, _l_]; + } + if(! r) return invalid_arg(_d_); + var rr = r[3], rv = r[2], rl = r[1], _j_ = height(rl); + if(_j_ <= height(rr)) return create(create(l, v, rl), rv, rr); + if(! rl) return invalid_arg(_c_); + var rlr = rl[3], rlv = rl[2], rll = rl[1], _k_ = create(rlr, rv, rr); + return create(create(l, v, rll), rlv, _k_); + } + function add(x, t){ + if(! t) return [0, 0, x, 0, 1]; + var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); + if(0 === c) return t; + if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} + var ll = add(x, l); + return l === ll ? t : bal(ll, v, r); + } + function singleton(x){return [0, 0, x, 0, 1];} + var empty = 0; + function find(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) throw caml_maybe_attach_backtrace(Not_found, 1); + var + r = param$0[3], + v = param$0[2], + l = param$0[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return v; + var r$0 = 0 <= c ? r : l, param$0 = r$0; + } + } + return [0, empty, add, singleton, , , , , , , , , , , , , , find]; } - //end |}]; - print_fun_decl program (Some "add"); - [%expect {| - function add(x, t){ - if(! t) return [0, 0, x, 0, 1]; - var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); - if(0 === c) return t; - if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} - var ll = add(x, l); - return l === ll ? t : bal(ll, v, r); - } - //end |}]; - (* Expect: does not compile unused functor member *) - print_fun_decl program (Some "union"); - [%expect {| not found |}]; - print_fun_decl program (Some "inter"); - [%expect {| not found |}] + //end |}] let%expect_test "Omit unused fields" = let program = compile_and_parse - ~flags:["--enable"; "globaldeadcode"] + ~flags:[ "--enable"; "globaldeadcode" ] {| let f b x = let t = if b then (1, 2, x) else (3, x, 4) in @@ -61,10 +91,11 @@ let%expect_test "Omit unused fields" = (u, v) in print_int (fst (f true 1) + snd (f false 2)) |} - in + in (* Expect second field in each triple to be omitted. *) print_fun_decl program (Some "f"); - [%expect {| + [%expect + {| function f(b, x){ var t = b ? [0, 1, , x] : [0, 3, , 4], v = t[3], u = t[1]; return [0, u, v]; @@ -74,7 +105,7 @@ let%expect_test "Omit unused fields" = let%expect_test "Omit unused return expressions" = let program = compile_and_parse - ~flags:["--enable"; "globaldeadcode"] + ~flags:[ "--enable"; "globaldeadcode" ] {| let f x = print_int x; @@ -82,9 +113,11 @@ let%expect_test "Omit unused return expressions" = in ignore (f 5 + f 6) |} - in + in (* Expect return value of f to be omitted. *) print_fun_decl program (Some "f"); - [%expect " - function f(x){caml_call1(Stdlib[44], x); return;} - //end"]; \ No newline at end of file + [%expect + {| + function f(x){caml_call1(Stdlib[44], x); return;} + //end + |}] diff --git a/compiler/tests-compiler/util/util.ml b/compiler/tests-compiler/util/util.ml index 6ee6908049..9e81901d5e 100644 --- a/compiler/tests-compiler/util/util.ml +++ b/compiler/tests-compiler/util/util.ml @@ -444,6 +444,14 @@ class find_variable_declaration r n = super#variable_declaration k v end +let find_variable program n = + let r = ref [] in + let o = new find_variable_declaration r n in + ignore (o#program program); + match !r with + | [ DeclIdent (_, Some (expression, _)) ] -> expression + | _ -> raise Not_found + let print_var_decl program n = let r = ref [] in let o = new find_variable_declaration r n in diff --git a/compiler/tests-compiler/util/util.mli b/compiler/tests-compiler/util/util.mli index 5cdf488398..cfca291b85 100644 --- a/compiler/tests-compiler/util/util.mli +++ b/compiler/tests-compiler/util/util.mli @@ -71,6 +71,8 @@ val print_var_decl : Javascript.program -> string -> unit val print_fun_decl : Javascript.program -> string option -> unit +val find_variable : Javascript.program -> string -> Javascript.expression + val compile_and_run : ?debug:bool -> ?skip_modern:bool From 596dcb55f1aef0649afbfdbec1f3c672c8645d44 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Tue, 10 Oct 2023 13:35:48 +0200 Subject: [PATCH 087/112] fix test --- compiler/tests-compiler/global_deadcode.ml | 124 +++++++++++---------- compiler/tests-compiler/util/util.ml | 8 ++ compiler/tests-compiler/util/util.mli | 2 + 3 files changed, 78 insertions(+), 56 deletions(-) diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index de7a3632f9..ab290f7313 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -13,71 +13,83 @@ let%expect_test "Eliminates unused functions from functor" = let string_set = String_set.empty in let string_set = String_set.add "hello" string_set in print_endline (string_of_int (Int_set.find 1 int_set) ^ (String_set.find "hello" string_set)) - |} + |} in let app = find_variable program "String_set" in (let open Js_of_ocaml_compiler in + let open Stdlib in match app with - | Javascript.ECall (EVar (S { name = Utf8 name; _ }), _, _, _) -> - print_fun_decl program (Some name) + | Javascript.ECall (EVar (S { name = Utf8 name; _ }), _, _, _) -> ( + let _, _, body, _ = find_function program name in + match List.rev body with + | (Return_statement (Some (EArr return)), loc) :: rest -> + let return = + ( Javascript.Return_statement + (Some + (EArr + (List.filter return ~f:(function + | Javascript.ElementHole -> false + | _ -> true)))) + , loc ) + in + print_program (List.rev (return :: rest)) + | _ -> ()) | _ -> ()); [%expect {| - function _e_(Ord){ - function height(param){if(! param) return 0; var h = param[4]; return h;} - function create(l, v, r){ - if(l) var h = l[4], hl = h; else var hl = 0; - if(r) var h$0 = r[4], hr = h$0; else var hr = 0; - var _m_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _m_]; - } - function bal(l, v, r){ - if(l) var h = l[4], hl = h; else var hl = 0; - if(r) var h$0 = r[4], hr = h$0; else var hr = 0; - if((hr + 2 | 0) < hl){ - if(! l) return invalid_arg(_b_); - var lr = l[3], lv = l[2], ll = l[1], _h_ = height(lr); - if(_h_ <= height(ll)) return create(ll, lv, create(lr, v, r)); - if(! lr) return invalid_arg(_a_); - var lrr = lr[3], lrv = lr[2], lrl = lr[1], _i_ = create(lrr, v, r); - return create(create(ll, lv, lrl), lrv, _i_); - } - if((hl + 2 | 0) >= hr){ - var _l_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _l_]; - } - if(! r) return invalid_arg(_d_); - var rr = r[3], rv = r[2], rl = r[1], _j_ = height(rl); - if(_j_ <= height(rr)) return create(create(l, v, rl), rv, rr); - if(! rl) return invalid_arg(_c_); - var rlr = rl[3], rlv = rl[2], rll = rl[1], _k_ = create(rlr, rv, rr); - return create(create(l, v, rll), rlv, _k_); + function height(param){if(! param) return 0; var h = param[4]; return h;} + function create(l, v, r){ + if(l) var h = l[4], hl = h; else var hl = 0; + if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + var _m_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, _m_]; + } + function bal(l, v, r){ + if(l) var h = l[4], hl = h; else var hl = 0; + if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + if((hr + 2 | 0) < hl){ + if(! l) return invalid_arg(_b_); + var lr = l[3], lv = l[2], ll = l[1], _h_ = height(lr); + if(_h_ <= height(ll)) return create(ll, lv, create(lr, v, r)); + if(! lr) return invalid_arg(_a_); + var lrr = lr[3], lrv = lr[2], lrl = lr[1], _i_ = create(lrr, v, r); + return create(create(ll, lv, lrl), lrv, _i_); } - function add(x, t){ - if(! t) return [0, 0, x, 0, 1]; - var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); - if(0 === c) return t; - if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} - var ll = add(x, l); - return l === ll ? t : bal(ll, v, r); + if((hl + 2 | 0) >= hr){ + var _l_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, _l_]; } - function singleton(x){return [0, 0, x, 0, 1];} - var empty = 0; - function find(x, param){ - var param$0 = param; - for(;;){ - if(! param$0) throw caml_maybe_attach_backtrace(Not_found, 1); - var - r = param$0[3], - v = param$0[2], - l = param$0[1], - c = caml_call2(Ord[1], x, v); - if(0 === c) return v; - var r$0 = 0 <= c ? r : l, param$0 = r$0; - } + if(! r) return invalid_arg(_d_); + var rr = r[3], rv = r[2], rl = r[1], _j_ = height(rl); + if(_j_ <= height(rr)) return create(create(l, v, rl), rv, rr); + if(! rl) return invalid_arg(_c_); + var rlr = rl[3], rlv = rl[2], rll = rl[1], _k_ = create(rlr, rv, rr); + return create(create(l, v, rll), rlv, _k_); + } + function add(x, t){ + if(! t) return [0, 0, x, 0, 1]; + var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); + if(0 === c) return t; + if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} + var ll = add(x, l); + return l === ll ? t : bal(ll, v, r); + } + function singleton(x){return [0, 0, x, 0, 1];} + var empty = 0; + function find(x, param){ + var param$0 = param; + for(;;){ + if(! param$0) throw caml_maybe_attach_backtrace(Not_found, 1); + var + r = param$0[3], + v = param$0[2], + l = param$0[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return v; + var r$0 = 0 <= c ? r : l, param$0 = r$0; } - return [0, empty, add, singleton, , , , , , , , , , , , , , find]; } + return [0, empty, add, singleton, find]; //end |}] let%expect_test "Omit unused fields" = @@ -108,9 +120,9 @@ let%expect_test "Omit unused return expressions" = ~flags:[ "--enable"; "globaldeadcode" ] {| let f x = - print_int x; + print_int x; x + 1 - in + in ignore (f 5 + f 6) |} in diff --git a/compiler/tests-compiler/util/util.ml b/compiler/tests-compiler/util/util.ml index 9e81901d5e..428245646f 100644 --- a/compiler/tests-compiler/util/util.ml +++ b/compiler/tests-compiler/util/util.ml @@ -491,6 +491,14 @@ class find_function_declaration r n = let print_program p = print_string (program_to_string p) +let find_function program n = + let r = ref [] in + let o = new find_function_declaration r (Some n) in + ignore (o#program program); + match !r with + | [ (_, fd) ] -> fd + | _ -> raise Not_found + let print_fun_decl program n = let r = ref [] in let o = new find_function_declaration r n in diff --git a/compiler/tests-compiler/util/util.mli b/compiler/tests-compiler/util/util.mli index cfca291b85..a8718910d2 100644 --- a/compiler/tests-compiler/util/util.mli +++ b/compiler/tests-compiler/util/util.mli @@ -73,6 +73,8 @@ val print_fun_decl : Javascript.program -> string option -> unit val find_variable : Javascript.program -> string -> Javascript.expression +val find_function : Javascript.program -> string -> Javascript.function_declaration + val compile_and_run : ?debug:bool -> ?skip_modern:bool From 34edd4540048866a4c530a8bb8febdc30cf9ed27 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 10:42:15 -0500 Subject: [PATCH 088/112] remove deadcode flag from pure_expr --- compiler/lib/global_deadcode.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 525c31a26a..d45dee0cc9 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -58,7 +58,7 @@ end module Solver = G.Solver (Domain) -let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e && Config.Flag.deadcode () +let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e let definitions nv prog = let defs = Array.make nv Param in From cd3eb5a365d949951696482a424e29531db92e68 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 10:45:04 -0500 Subject: [PATCH 089/112] equal exhaustive case --- compiler/lib/global_deadcode.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index d45dee0cc9..29f9d3b3e5 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -43,7 +43,7 @@ module Domain = struct match l1, l2 with | Top, Top | Dead, Dead -> true | Live f1, Live f2 -> IntSet.equal f1 f2 - | _ -> false + | Top, (Dead | Live _) | Live _, (Dead | Top) | Dead, (Live _ | Top) -> false let bot = Dead From 04a7e875b68019793ce1c90ccd578d5f493ec652 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 10:46:03 -0500 Subject: [PATCH 090/112] definitions exhaustive case --- compiler/lib/global_deadcode.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 29f9d3b3e5..b2414f1d08 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -71,7 +71,7 @@ let definitions nv prog = match i with | Let (x, e) -> set_def x (Expr e) | Assign (x, _) -> set_def x Param - | _ -> ()) + | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> ()) block.body) prog.blocks; defs From 646b216fade85c7567e0b559fedd661b1c972503 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 11:27:48 -0500 Subject: [PATCH 091/112] Use Var.Tbl instead of var array --- compiler/lib/global_deadcode.ml | 74 +++++++++++++++++---------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index b2414f1d08..c300ea9e39 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -60,9 +60,9 @@ module Solver = G.Solver (Domain) let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e -let definitions nv prog = - let defs = Array.make nv Param in - let set_def x d = defs.(Var.idx x) <- d in +let definitions prog = + let defs = Var.Tbl.make () Param in + let set_def x d = Var.Tbl.set defs x d in Addr.Map.iter (fun _ block -> (* Add defs from block body *) @@ -92,9 +92,9 @@ type usage_kind = We use information from global flow to try to add edges between function calls and their return values at known call sites. *) -let usages nv prog (global_info : Global_flow.info) : usage_kind Var.Map.t array = - let uses = Array.make nv Var.Map.empty in - let add_use kind x y = uses.(Var.idx y) <- Var.Map.add x kind uses.(Var.idx y) in +let usages prog (global_info : Global_flow.info) : usage_kind Var.Map.t Var.Tbl.t = + let uses = Var.Tbl.make () Var.Map.empty in + let add_use kind x y = Var.Tbl.set uses y (Var.Map.add x kind (Var.Tbl.get uses y)) in let add_arg_dep params args = try List.iter2 ~f:(fun x y -> add_use Propagate x y) params args with Invalid_argument _ -> () @@ -196,17 +196,16 @@ let expr_vars e = + Or, it is returned or applied to a function and the global flow analysis marked it as escaping. A variable [x[i]] is marked as [Live {i}] if it is used in an instruction where field [i] is referenced or set. *) -let liveness nv prog pure_funs (global_info : Global_flow.info) = - let live_vars = Array.make nv Dead in - let add_top v = - let idx = Var.idx v in - live_vars.(idx) <- Top - in - let add_live v i = - let idx = Var.idx v in - match live_vars.(idx) with - | Live fields -> live_vars.(idx) <- Live (IntSet.add i fields) - | _ -> live_vars.(idx) <- Live (IntSet.singleton i) +let liveness prog pure_funs (global_info : Global_flow.info) = + let live_vars = Var.Tbl.make () Dead in + let add_top v = Var.Tbl.set live_vars v Top in + let add_live_field v i = + let live_fields = + match Var.Tbl.get live_vars v with + | Live fields -> Live (IntSet.add i fields) + | Top | Dead -> Live (IntSet.singleton i) + in + Var.Tbl.set live_vars v live_fields in let live_instruction i = match i with @@ -224,13 +223,13 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = Var.Set.iter add_top vars) | Assign (_, _) -> () | Set_field (x, i, y) -> - add_live x i; + add_live_field x i; add_top y | Array_set (x, y, z) -> add_top x; add_top y; add_top z - | Offset_ref (x, i) -> add_live x i + | Offset_ref (x, i) -> add_live_field x i in let live_block block = List.iter ~f:(fun (i, _) -> live_instruction i) block.body; @@ -245,17 +244,21 @@ let liveness nv prog pure_funs (global_info : Global_flow.info) = Addr.Map.iter (fun _ block -> live_block block) prog.blocks; live_vars -(* Returns the set of variables given the adjacency list of variable dependencies. *) +(* Returns the set of variables given a table of variables. *) let variables deps = let vars = Var.ISet.empty () in - Array.iteri ~f:(fun i _ -> Var.ISet.add vars (Var.of_idx i)) deps; + Var.Tbl.iter (fun v _ -> Var.ISet.add vars v) deps; vars (** Propagate liveness of the usages of a variable [x] to [x]. The liveness of [x] is defined by joining its current liveness and the contribution of each vairable [y] that uses [x]. *) -let propagate uses defs live_vars live_table x = - let idx = Var.idx x in +let propagate + (uses : usage_kind Var.Map.t Var.Tbl.t) + (defs : def Var.Tbl.t) + (live_vars : live Var.Tbl.t) + live_table + x = (* Variable [y] uses [x] either in its definition ([Compute]) or as a closure/block parameter ([Propagate]). In the latter case, the contribution is simply the liveness of [y]. In the former, the contribution depends on the liveness of [y] and its definition. *) @@ -268,7 +271,7 @@ let propagate uses defs live_vars live_table x = | Dead -> Dead (* If y is a live block, then x is the join of liveness fields that are x *) | Live fields -> ( - match defs.(Var.idx y) with + match Var.Tbl.get defs y with | Expr (Block (_, vars, _)) -> let found = ref false in Array.iteri @@ -280,7 +283,7 @@ let propagate uses defs live_vars live_table x = | _ -> Top) (* If y is top and y is a field access, x depends only on that field *) | Top -> ( - match defs.(Var.idx y) with + match Var.Tbl.get defs y with | Expr (Field (_, i)) -> Live (IntSet.singleton i) | _ -> Top)) (* If x is used as an argument for parameter y, then contribution is liveness of y *) @@ -288,13 +291,13 @@ let propagate uses defs live_vars live_table x = in Var.Map.fold (fun y usage_kind live -> Domain.join (contribution y usage_kind) live) - uses.(idx) - (Domain.join live_vars.(idx) (Var.Tbl.get live_table x)) + (Var.Tbl.get uses x) + (Domain.join (Var.Tbl.get live_vars x) (Var.Tbl.get live_table x)) let solver vars uses defs live_vars = let g = { G.domain = vars - ; G.iter_children = (fun f x -> Var.Map.iter (fun y _ -> f y) uses.(Var.idx x)) + ; G.iter_children = (fun f x -> Var.Map.iter (fun y _ -> f y) (Var.Tbl.get uses x)) } in Solver.f () (G.invert () g) (propagate uses defs live_vars) @@ -369,9 +372,9 @@ module Print = struct let print_uses uses = Format.eprintf "Usages:\n"; - Array.iteri - ~f:(fun i ds -> - Format.eprintf "v%d: { " i; + Var.Tbl.iter + (fun v ds -> + Format.eprintf "%a: { " Var.print v; Var.Map.iter (fun d k -> Format.eprintf @@ -387,7 +390,7 @@ module Print = struct let print_liveness live_vars = Format.eprintf "Liveness:\n"; - Array.iteri ~f:(fun i l -> Format.eprintf "v%d: %s\n" i (live_to_string l)) live_vars + Var.Tbl.iter (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) live_vars let print_live_tbl live_table = Format.eprintf "Liveness with dependencies:\n"; @@ -406,14 +409,13 @@ let add_sentinal p = (** Run the liveness analysis and replace dead variables with the given sentinal. *) let f p sentinal global_info = let t = Timer.make () in - let nv = Var.count () in (* Compute definitions *) - let defs = definitions nv p in + let defs = definitions p in (* Compute usages *) - let uses = usages nv p global_info in + let uses = usages p global_info in (* Compute initial liveness *) let pure_funs = Pure_fun.f p in - let live_vars = liveness nv p pure_funs global_info in + let live_vars = liveness p pure_funs global_info in (* Propagate liveness to dependencies *) let vars = variables uses in let live_table = solver vars uses defs live_vars in From fc846de5ff436100be11ec8f869f90cdc62f444a Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 13:35:32 -0500 Subject: [PATCH 092/112] small fixes --- compiler/lib/global_deadcode.ml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index c300ea9e39..68b39523cd 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -96,8 +96,7 @@ let usages prog (global_info : Global_flow.info) : usage_kind Var.Map.t Var.Tbl. let uses = Var.Tbl.make () Var.Map.empty in let add_use kind x y = Var.Tbl.set uses y (Var.Map.add x kind (Var.Tbl.get uses y)) in let add_arg_dep params args = - try List.iter2 ~f:(fun x y -> add_use Propagate x y) params args - with Invalid_argument _ -> () + List.iter2 ~f:(fun x y -> add_use Propagate x y) params args in let add_cont_deps (pc, args) = match try Some (Addr.Map.find pc prog.blocks) with Not_found -> None with @@ -118,7 +117,7 @@ let usages prog (global_info : Global_flow.info) : usage_kind Var.Map.t Var.Tbl. | Expr (Closure (params, _)) -> (* If the function is under/over-applied then global flow will mark arguments and return value as escaping. So we only need to consider the case when there is an exact application. *) - if List.length params = List.length args + if List.compare_lengths params args = 0 then ( let return_values = Var.Map.find k global_info.info_return_vals in Var.Set.iter (add_use Propagate x) return_values; @@ -143,15 +142,15 @@ let usages prog (global_info : Global_flow.info) : usage_kind Var.Map.t Var.Tbl. in Addr.Map.iter (fun _ block -> - (* Add deps from block body *) + (* Add uses from block body *) List.iter ~f:(fun (i, _) -> match i with | Let (x, e) -> add_expr_uses x e - | Assign (x, y) -> add_use Compute x y + | Assign (x, y) -> add_use Propagate x y | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> ()) block.body; - (* Add deps from block branch *) + (* Add uses from block branch *) match fst block.branch with | Return _ | Raise _ | Stop -> () | Branch cont -> add_cont_deps cont From 5dfd1caed57d2d0c85606063347b77238cffdb77 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 13:49:26 -0500 Subject: [PATCH 093/112] make exhaustive --- compiler/lib/global_deadcode.ml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 68b39523cd..3b7b5111f4 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -208,7 +208,9 @@ let liveness prog pure_funs (global_info : Global_flow.info) = in let live_instruction i = match i with - | Let (_x, e) -> ( + | Let (_, e) -> ( + (* If e is an impure application, we only need to set escaping arguments + as top. Otherwise, set all variables in e as top. *) if not (pure_expr pure_funs e) then match e with @@ -217,7 +219,7 @@ let liveness prog pure_funs (global_info : Global_flow.info) = List.iter ~f:(fun x -> if variable_may_escape x global_info then add_top x) args - | _ -> + | Block (_, _, _) | Field (_, _) | Closure (_, _) | Constant _ | Prim (_, _) -> let vars = expr_vars e in Var.Set.iter add_top vars) | Assign (_, _) -> () @@ -319,7 +321,7 @@ let zero prog sentinal live_table = let is_live v = match Var.Tbl.get live_table v with | Dead -> false - | _ -> true + | Top | Live _ -> true in let zero_var x = if is_live x then x else sentinal in let zero_instr instr = @@ -389,7 +391,9 @@ module Print = struct let print_liveness live_vars = Format.eprintf "Liveness:\n"; - Var.Tbl.iter (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) live_vars + Var.Tbl.iter + (fun v l -> Format.eprintf "%a: %s\n" Var.print v (live_to_string l)) + live_vars let print_live_tbl live_table = Format.eprintf "Liveness with dependencies:\n"; From dfb0c22e92cd9faf8f2a91d4a281b1d92c5f53ae Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 13:58:02 -0500 Subject: [PATCH 094/112] add comment about closure variables --- compiler/lib/global_deadcode.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 3b7b5111f4..151cf017c5 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -183,6 +183,9 @@ let expr_vars e = | Pc _ -> acc) ~init:vars args + (* We can ignore closures. We want the set of previously defined variables used + in the expression, so not parameters. The continuation may use some variables + but we will add these when we visit the body *) | Constant _ | Closure (_, _) -> vars (** Compute the initial liveness of each variable in the program. From be14b110213814c4d81b0fb7dca439c561f0b5c2 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 14:20:12 -0500 Subject: [PATCH 095/112] clarifying comments --- compiler/lib/global_deadcode.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 151cf017c5..e630bbabc0 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -147,6 +147,7 @@ let usages prog (global_info : Global_flow.info) : usage_kind Var.Map.t Var.Tbl. ~f:(fun (i, _) -> match i with | Let (x, e) -> add_expr_uses x e + (* For assignment, propagate liveness from new to old variable like a block parameter *) | Assign (x, y) -> add_use Propagate x y | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> ()) block.body; @@ -212,8 +213,9 @@ let liveness prog pure_funs (global_info : Global_flow.info) = let live_instruction i = match i with | Let (_, e) -> ( - (* If e is an impure application, we only need to set escaping arguments - as top. Otherwise, set all variables in e as top. *) + (* If e is impure, set all variables in e as Top. The only exception is for function applications, + where we may be able to do better. Global flow gives us information about which arguments in + a function application esacpe, so set only these as top. *) if not (pure_expr pure_funs e) then match e with @@ -225,7 +227,6 @@ let liveness prog pure_funs (global_info : Global_flow.info) = | Block (_, _, _) | Field (_, _) | Closure (_, _) | Constant _ | Prim (_, _) -> let vars = expr_vars e in Var.Set.iter add_top vars) - | Assign (_, _) -> () | Set_field (x, i, y) -> add_live_field x i; add_top y @@ -234,6 +235,8 @@ let liveness prog pure_funs (global_info : Global_flow.info) = add_top y; add_top z | Offset_ref (x, i) -> add_live_field x i + (* Assignment can be ignored. Liveness of old variable is just propagated to new variable. See [usages]. *) + | Assign (_, _) -> () in let live_block block = List.iter ~f:(fun (i, _) -> live_instruction i) block.body; From 02148767e80b11152e311c0f437f8d5ba59f386f Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 14:45:49 -0500 Subject: [PATCH 096/112] small fixes --- compiler/lib/global_deadcode.ml | 34 ++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index e630bbabc0..38dfe0082a 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -185,8 +185,8 @@ let expr_vars e = ~init:vars args (* We can ignore closures. We want the set of previously defined variables used - in the expression, so not parameters. The continuation may use some variables - but we will add these when we visit the body *) + in the expression, so not parameters. The continuation may use some variables + but we will add these when we visit the body *) | Constant _ | Closure (_, _) -> vars (** Compute the initial liveness of each variable in the program. @@ -212,10 +212,10 @@ let liveness prog pure_funs (global_info : Global_flow.info) = in let live_instruction i = match i with + (* If e is impure, set all variables in e as Top. The only exception is for function applications, + where we may be able to do better. Global flow gives us information about which arguments in + a function application esacpe, so set only these as top. *) | Let (_, e) -> ( - (* If e is impure, set all variables in e as Top. The only exception is for function applications, - where we may be able to do better. Global flow gives us information about which arguments in - a function application esacpe, so set only these as top. *) if not (pure_expr pure_funs e) then match e with @@ -322,7 +322,7 @@ let zero prog sentinal live_table = while !i >= 0 && Var.equal vars.(!i) sentinal do i := !i - 1 done; - Array.sub vars ~pos:0 ~len:(!i + 1) + if !i < Array.length vars - 1 then Array.sub vars ~pos:0 ~len:(!i + 1) else vars in let is_live v = match Var.Tbl.get live_table v with @@ -349,21 +349,25 @@ let zero prog sentinal live_table = | Apply ap -> let args = List.map ~f:zero_var ap.args in Let (x, Apply { ap with args }) - | _ -> instr) - | _ -> instr + | Field (_, _) | Closure (_, _) | Constant _ | Prim (_, _) -> instr) + | Assign (_, _) | Set_field (_, _, _) | Offset_ref (_, _) | Array_set (_, _, _) -> + instr in let zero_block block = (* Analyze block instructions *) let body = List.map ~f:(fun (instr, loc) -> zero_instr instr, loc) block.body in (* Analyze branch *) let branch = - let last, loc = block.branch in - let last = - match last with - | Return x -> Return (zero_var x) - | _ -> last - in - last, loc + (* Zero out return values in last instruction, otherwise do nothing. *) + match block.branch with + | Return x, loc -> Return (zero_var x), loc + | Raise (_, _), _ + | Stop, _ + | Branch _, _ + | Cond (_, _, _), _ + | Switch (_, _), _ + | Pushtrap (_, _, _, _), _ + | Poptrap _, _ -> block.branch in { block with body; branch } in From 07c37bdcb8dfa0229c30b42e5ca28aea47b7bee3 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Tue, 17 Oct 2023 15:01:51 -0500 Subject: [PATCH 097/112] Don't expose add_sentinal --- compiler/lib/driver.ml | 3 +-- compiler/lib/global_deadcode.ml | 6 ++++-- compiler/lib/global_deadcode.mli | 4 +--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 172bdcb324..dbef4af4bb 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -107,9 +107,8 @@ let exact_calls profile p = let p, info, deadcode_sentinal = if Config.Flag.globaldeadcode () then - let p, deadcode_sentinal = Global_deadcode.add_sentinal p in let info = Global_flow.f ~fast p in - let p = Global_deadcode.f p deadcode_sentinal info in + let p, deadcode_sentinal = Global_deadcode.f p info in p, info, deadcode_sentinal else let info = Global_flow.f ~fast p in diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 38dfe0082a..8436052ae9 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -420,8 +420,10 @@ let add_sentinal p = Code.prepend p [ instr, loc ], sentinal (** Run the liveness analysis and replace dead variables with the given sentinal. *) -let f p sentinal global_info = +let f p global_info = let t = Timer.make () in + (* Add sentinal variable *) + let p, sentinal = add_sentinal p in (* Compute definitions *) let defs = definitions p in (* Compute usages *) @@ -447,4 +449,4 @@ let f p sentinal global_info = Format.printf "After Zeroing:\n"; Code.Print.program (fun _ _ -> "") p); if times () then Format.eprintf " deadcode dgraph.: %a@." Timer.print t; - p + p, sentinal diff --git a/compiler/lib/global_deadcode.mli b/compiler/lib/global_deadcode.mli index 250a0edddd..80eb0ac95b 100644 --- a/compiler/lib/global_deadcode.mli +++ b/compiler/lib/global_deadcode.mli @@ -29,6 +29,4 @@ dead variables that are then removed by [deadcode.ml]. In particular it allows f in functors, which the original deadcode elimination cannot. *) -val add_sentinal : Code.program -> Code.program * Code.Var.t - -val f : Code.program -> Code.Var.t -> Global_flow.info -> Code.program +val f : Code.program -> Global_flow.info -> (Code.program * Code.Var.t) From 4026c20df511493ff5e095798e0328d83263e7f6 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 18 Oct 2023 09:25:48 -0500 Subject: [PATCH 098/112] typos --- compiler/lib/global_deadcode.ml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 8436052ae9..73c73e1fdd 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -214,7 +214,7 @@ let liveness prog pure_funs (global_info : Global_flow.info) = match i with (* If e is impure, set all variables in e as Top. The only exception is for function applications, where we may be able to do better. Global flow gives us information about which arguments in - a function application esacpe, so set only these as top. *) + a function application escape, so set only these as top. *) | Let (_, e) -> ( if not (pure_expr pure_funs e) then @@ -260,12 +260,7 @@ let variables deps = (** Propagate liveness of the usages of a variable [x] to [x]. The liveness of [x] is defined by joining its current liveness and the contribution of each vairable [y] that uses [x]. *) -let propagate - (uses : usage_kind Var.Map.t Var.Tbl.t) - (defs : def Var.Tbl.t) - (live_vars : live Var.Tbl.t) - live_table - x = +let propagate uses defs live_vars live_table x = (* Variable [y] uses [x] either in its definition ([Compute]) or as a closure/block parameter ([Propagate]). In the latter case, the contribution is simply the liveness of [y]. In the former, the contribution depends on the liveness of [y] and its definition. *) From 18fd434292507ab96dfc76739f72c8d2f9a7ee70 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Wed, 18 Oct 2023 17:51:09 +0200 Subject: [PATCH 099/112] small cleanup --- compiler/lib/driver.ml | 22 +++++++++------------- compiler/lib/global_deadcode.ml | 15 +++++++-------- compiler/lib/global_deadcode.mli | 25 +++++++++++++++---------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index dbef4af4bb..1b2f38dfc0 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -97,6 +97,10 @@ let effects p = else p, (Code.Var.Set.empty : Effects.cps_calls) let exact_calls profile p = + let deadcode_sentinal = + (* If deadcode is disabled, this field is just fresh variable *) + Code.Var.fresh () + in if not (Config.Flag.effects ()) then let fast = @@ -104,23 +108,15 @@ let exact_calls profile p = | O3 -> false | O1 | O2 -> true in - let p, info, deadcode_sentinal = + let info = Global_flow.f ~fast p in + let p = if Config.Flag.globaldeadcode () - then - let info = Global_flow.f ~fast p in - let p, deadcode_sentinal = Global_deadcode.f p info in - p, info, deadcode_sentinal - else - let info = Global_flow.f ~fast p in - let deadcode_sentinal = - (* If deadcode is not enabled, this field is set to a dummy fresh variable *) - Code.Var.fresh () - in - p, info, deadcode_sentinal + then Global_deadcode.f p ~deadcode_sentinal info + else p in let p = Specialize.f ~function_arity:(fun f -> Global_flow.function_arity info f) p in p, deadcode_sentinal - else p, Code.Var.fresh () + else p, deadcode_sentinal let print p = if debug () then Code.Print.program (fun _ _ -> "") p; diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 73c73e1fdd..c18f5c50f4 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -408,17 +408,16 @@ module Print = struct end (** Add a sentinal variable declaration to the IR. The fresh variable is assigned to `undefined`. *) -let add_sentinal p = - let sentinal = Var.fresh_n "sentinal" in +let add_sentinal p sentinal = let undefined = Prim (Extern "%undefined", []) in - let instr, loc = Let (sentinal, undefined), Before 0 in - Code.prepend p [ instr, loc ], sentinal + let instr, loc = Let (sentinal, undefined), noloc in + Code.prepend p [ instr, loc ] (** Run the liveness analysis and replace dead variables with the given sentinal. *) -let f p global_info = +let f p ~deadcode_sentinal global_info = let t = Timer.make () in (* Add sentinal variable *) - let p, sentinal = add_sentinal p in + let p = add_sentinal p deadcode_sentinal in (* Compute definitions *) let defs = definitions p in (* Compute usages *) @@ -438,10 +437,10 @@ let f p global_info = Print.print_uses uses; Print.print_live_tbl live_table); (* Zero out dead fields *) - let p = zero p sentinal live_table in + let p = zero p deadcode_sentinal live_table in if debug () then ( Format.printf "After Zeroing:\n"; Code.Print.program (fun _ _ -> "") p); if times () then Format.eprintf " deadcode dgraph.: %a@." Timer.print t; - p, sentinal + p diff --git a/compiler/lib/global_deadcode.mli b/compiler/lib/global_deadcode.mli index 80eb0ac95b..0c44ef8d93 100644 --- a/compiler/lib/global_deadcode.mli +++ b/compiler/lib/global_deadcode.mli @@ -18,15 +18,20 @@ (** Global deadcode elimination pass. -This module provides a global liveness analysis more powerful than that found in [deadcode.ml]. In particular, -this analysis annotates blocks with the specific fields that are live. It also uses [global_flow.ml] to determine -the liveness of function return values. It first computes an initial liveness of each variable by traversing the program IR. -Then it propagates this information to the dependencies of each variable using a flow analysis solver. Lastly it replaces -dead variables with a sentinal zero variable (the JS value `undefined`). +This module provides a global liveness analysis more powerful than +that found in [deadcode.ml]. In particular, this analysis annotates +blocks with the specific fields that are live. It also uses +[global_flow.ml] to determine the liveness of function return +values. It first computes an initial liveness of each variable by +traversing the program IR. Then it propagates this information to +the dependencies of each variable using a flow analysis +solver. Lastly it replaces dead variables with a sentinal zero +variable (the JS value `undefined`). -Although this module does not perform any dead-code elimination itself, it is designed to be used to identify and substitute -dead variables that are then removed by [deadcode.ml]. In particular it allows for the elimination of unused functions defined -in functors, which the original deadcode elimination cannot. -*) +Although this module does not perform any dead-code elimination +itself, it is designed to be used to identify and substitute dead +variables that are then removed by [deadcode.ml]. In particular it +allows for the elimination of unused functions defined in functors, +which the original deadcode elimination cannot. *) -val f : Code.program -> Global_flow.info -> (Code.program * Code.Var.t) +val f : Code.program -> deadcode_sentinal:Code.Var.t -> Global_flow.info -> Code.program From 527998ce32874914f8edf2b3a2447ce6fb51a41d Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Wed, 18 Oct 2023 17:52:57 +0200 Subject: [PATCH 100/112] CR --- compiler/lib/global_deadcode.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index c18f5c50f4..f955e6421a 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -317,7 +317,7 @@ let zero prog sentinal live_table = while !i >= 0 && Var.equal vars.(!i) sentinal do i := !i - 1 done; - if !i < Array.length vars - 1 then Array.sub vars ~pos:0 ~len:(!i + 1) else vars + if !i + 1 < Array.length vars then Array.sub vars ~pos:0 ~len:(!i + 1) else vars in let is_live v = match Var.Tbl.get live_table v with From a817445e3157c7289d85bd3184ef132cb8357c43 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Wed, 18 Oct 2023 14:29:01 -0500 Subject: [PATCH 101/112] cleanup --- compiler/lib/global_deadcode.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 73c73e1fdd..83490a5988 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -241,12 +241,11 @@ let liveness prog pure_funs (global_info : Global_flow.info) = let live_block block = List.iter ~f:(fun (i, _) -> live_instruction i) block.body; match fst block.branch with - | Stop -> () | Return x -> if variable_may_escape x global_info then add_top x | Raise (x, _) -> add_top x | Cond (x, _, _) -> add_top x | Switch (x, _) -> add_top x - | Branch _ | Poptrap _ | Pushtrap _ -> () + | Stop | Branch _ | Poptrap _ | Pushtrap _ -> () in Addr.Map.iter (fun _ block -> live_block block) prog.blocks; live_vars From 48fccd4502c0114a26b0c3595dc37773a74a6c42 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 19 Oct 2023 10:53:01 -0500 Subject: [PATCH 102/112] remove pure_expr alias --- compiler/lib/global_deadcode.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 9df9a3ef24..8417af0b57 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -58,8 +58,6 @@ end module Solver = G.Solver (Domain) -let pure_expr pure_funs e = Pure_fun.pure_expr pure_funs e - let definitions prog = let defs = Var.Tbl.make () Param in let set_def x d = Var.Tbl.set defs x d in @@ -192,7 +190,7 @@ let expr_vars e = (** Compute the initial liveness of each variable in the program. A variable [x] is marked as [Top] if - + It is used in an impure expression (as defined by [pure_expr]); + + It is used in an impure expression (as defined by [Pure_fun.pure_expr]); + It is used in a conditonal/switch; + It is raised by an exception; + It is used in another stateful instruction (like setting a block or array field); @@ -216,7 +214,7 @@ let liveness prog pure_funs (global_info : Global_flow.info) = where we may be able to do better. Global flow gives us information about which arguments in a function application escape, so set only these as top. *) | Let (_, e) -> ( - if not (pure_expr pure_funs e) + if not (Pure_fun.pure_expr pure_funs e) then match e with | Apply { f; args; _ } -> From 99caa929ee6f66437260688c9fc057bbc98a75a1 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 26 Oct 2023 11:43:34 +0200 Subject: [PATCH 103/112] Compiler: add purity for jsoo-special primitives --- compiler/lib/primitive.ml | 10 ++++++++- compiler/tests-compiler/global_deadcode.ml | 24 +++++++++++----------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/compiler/lib/primitive.ml b/compiler/lib/primitive.ml index 55f9e8d27a..ee7f3ba72c 100644 --- a/compiler/lib/primitive.ml +++ b/compiler/lib/primitive.ml @@ -73,7 +73,15 @@ let arity nm = Hashtbl.find arities (resolve nm) let has_arity nm a = try Hashtbl.find arities (resolve nm) = a with Not_found -> false -let is_pure nm = Poly.(kind nm <> `Mutator) +let is_pure nm = match nm with + | "%undefined" + | "%closure" + | "%identity" + | "%direct_int_div" + | "%direct_int_mod" + | "%direct_int_mul" + -> true + | _ -> Poly.(kind nm <> `Mutator) let exists p = Hashtbl.mem kinds p diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index ab290f7313..49d1583dfc 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -41,30 +41,30 @@ let%expect_test "Eliminates unused functions from functor" = function create(l, v, r){ if(l) var h = l[4], hl = h; else var hl = 0; if(r) var h$0 = r[4], hr = h$0; else var hr = 0; - var _m_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _m_]; + var _n_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, _n_]; } function bal(l, v, r){ if(l) var h = l[4], hl = h; else var hl = 0; if(r) var h$0 = r[4], hr = h$0; else var hr = 0; if((hr + 2 | 0) < hl){ if(! l) return invalid_arg(_b_); - var lr = l[3], lv = l[2], ll = l[1], _h_ = height(lr); - if(_h_ <= height(ll)) return create(ll, lv, create(lr, v, r)); + var lr = l[3], lv = l[2], ll = l[1], _i_ = height(lr); + if(_i_ <= height(ll)) return create(ll, lv, create(lr, v, r)); if(! lr) return invalid_arg(_a_); - var lrr = lr[3], lrv = lr[2], lrl = lr[1], _i_ = create(lrr, v, r); - return create(create(ll, lv, lrl), lrv, _i_); + var lrr = lr[3], lrv = lr[2], lrl = lr[1], _j_ = create(lrr, v, r); + return create(create(ll, lv, lrl), lrv, _j_); } if((hl + 2 | 0) >= hr){ - var _l_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _l_]; + var _m_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, _m_]; } if(! r) return invalid_arg(_d_); - var rr = r[3], rv = r[2], rl = r[1], _j_ = height(rl); - if(_j_ <= height(rr)) return create(create(l, v, rl), rv, rr); + var rr = r[3], rv = r[2], rl = r[1], _k_ = height(rl); + if(_k_ <= height(rr)) return create(create(l, v, rl), rv, rr); if(! rl) return invalid_arg(_c_); - var rlr = rl[3], rlv = rl[2], rll = rl[1], _k_ = create(rlr, rv, rr); - return create(create(l, v, rll), rlv, _k_); + var rlr = rl[3], rlv = rl[2], rll = rl[1], _l_ = create(rlr, rv, rr); + return create(create(l, v, rll), rlv, _l_); } function add(x, t){ if(! t) return [0, 0, x, 0, 1]; From ddc39573ef2d1dd1092bf9b1f08dca2f344c273d Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 30 Oct 2023 10:14:02 -0500 Subject: [PATCH 104/112] make globaldeadcode default on --- compiler/lib/config.ml | 2 +- compiler/tests-compiler/global_deadcode.ml | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/lib/config.ml b/compiler/lib/config.ml index 4d6ab7cc25..9385a063ba 100644 --- a/compiler/lib/config.ml +++ b/compiler/lib/config.ml @@ -58,7 +58,7 @@ module Flag = struct let deadcode = o ~name:"deadcode" ~default:true - let globaldeadcode = o ~name:"globaldeadcode" ~default:false + let globaldeadcode = o ~name:"globaldeadcode" ~default:true let shortvar = o ~name:"shortvar" ~default:true diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index 49d1583dfc..d5ccec6b8a 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -4,7 +4,6 @@ let%expect_test "Eliminates unused functions from functor" = let program = (* Create two instances of Set functor so compiler can't inline one implementation. *) compile_and_parse_whole_program - ~flags:[ "--enable"; "globaldeadcode" ] {| module Int_set = Set.Make (Int);; module String_set = Set.Make (String);; @@ -95,7 +94,6 @@ let%expect_test "Eliminates unused functions from functor" = let%expect_test "Omit unused fields" = let program = compile_and_parse - ~flags:[ "--enable"; "globaldeadcode" ] {| let f b x = let t = if b then (1, 2, x) else (3, x, 4) in @@ -117,7 +115,6 @@ let%expect_test "Omit unused fields" = let%expect_test "Omit unused return expressions" = let program = compile_and_parse - ~flags:[ "--enable"; "globaldeadcode" ] {| let f x = print_int x; From 1c492f09dd150a815d059b85d8c76d41d467cf85 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 30 Oct 2023 14:16:25 -0500 Subject: [PATCH 105/112] Fix offset_ref liveness --- compiler/lib/global_deadcode.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 8417af0b57..2d1e6a0946 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -232,7 +232,7 @@ let liveness prog pure_funs (global_info : Global_flow.info) = add_top x; add_top y; add_top z - | Offset_ref (x, i) -> add_live_field x i + | Offset_ref (x, _) -> add_live_field x 0 (* Assignment can be ignored. Liveness of old variable is just propagated to new variable. See [usages]. *) | Assign (_, _) -> () in From 70664e97a3697dc59d845558b6db91bed7a31147 Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Mon, 30 Oct 2023 14:31:58 -0500 Subject: [PATCH 106/112] promote output changes from default on --- compiler/tests-compiler/direct_calls.ml | 20 ++--- compiler/tests-compiler/gh1007.ml | 100 +++++++++++++----------- compiler/tests-compiler/gh1494.ml | 2 +- 3 files changed, 65 insertions(+), 57 deletions(-) diff --git a/compiler/tests-compiler/direct_calls.ml b/compiler/tests-compiler/direct_calls.ml index 30fdcc82fd..a6148b9780 100644 --- a/compiler/tests-compiler/direct_calls.ml +++ b/compiler/tests-compiler/direct_calls.ml @@ -57,26 +57,26 @@ let%expect_test "direct calls without --enable effects" = [%expect {| function test1(param){ - function f(g, x){return caml_call1(g, x);} - var _d_ = 7; - f(function(x){return x + 1 | 0;}, _d_); - var _e_ = 4.; - f(function(x){return x * 2.;}, _e_); + function f(g, x){caml_call1(g, x); return;} + var _e_ = 7; + f(function(x){return x + 1 | 0;}, _e_); + var _f_ = 4.; + f(function(x){return x * 2.;}, _f_); return 0; } //end function test2(param){ - function f(g, x){return caml_call1(g, x);} - var _c_ = 7; - f(function(x){return x + 1 | 0;}, _c_); + function f(g, x){caml_call1(g, x); return;} + var _d_ = 7; + f(function(x){return x + 1 | 0;}, _d_); f(function(x){return caml_call2(Stdlib[28], x, cst_a$0);}, cst_a); return 0; } //end function test3(x){ function F(symbol){function f(x){return x + 1 | 0;} return [0, f];} - var M1 = F([0]), M2 = F([0]), _b_ = M2[1].call(null, 2); - return [0, M1[1].call(null, 1), _b_]; + var M1 = F([0]), M2 = F([0]), _c_ = M2[1].call(null, 2); + return [0, M1[1].call(null, 1), _c_]; } //end function test4(x){ diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 46eb031059..322e329ed5 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -366,30 +366,34 @@ let () = M.run () var even = function(n){ - if(2 < n >>> 0) return 1 - (1 - odd(n - 1 | 0)); - switch(n){ - case 0: - return 1; - case 1: - return 1 - (1 - odd(0)); - default: return 1 - (1 - odd(1)); - } + if(2 >= n >>> 0) + switch(n){ + case 0: + return; + case 1: + odd(0); return; + default: odd(1); return; + } + odd(n - 1 | 0); + return; }, odd = function(n){ - if(2 < n >>> 0) return 1 - (1 - even(n - 1 | 0)); - switch(n){ - case 0: - return 0; - case 1: - return 1 - (1 - even(0)); - default: return 1 - (1 - even(1)); - } + if(2 >= n >>> 0) + switch(n){ + case 0: + return; + case 1: + even(0); return; + default: even(1); return; + } + even(n - 1 | 0); + return; }; even(i); - var _a_ = i + 1 | 0; + var _b_ = i + 1 | 0; if(4 === i) return 0; - var i = _a_; + var i = _b_; } } //end |}] @@ -463,32 +467,36 @@ let () = M.run () closures = function(i){ function even(n){ - if(2 < n >>> 0) return 1 - (1 - odd(n - 1 | 0)); - switch(n){ - case 0: - var - f = function(param){return caml_call2(Stdlib_Printf[2], _c_, i);}; - delayed[1] = [0, f, delayed[1]]; - f(0); - return 1; - case 1: - return 1 - (1 - odd(0)); - default: return 1 - (1 - odd(1)); - } + if(2 >= n >>> 0) + switch(n){ + case 0: + var + f = function(param){return caml_call2(Stdlib_Printf[2], _c_, i);}; + delayed[1] = [0, f, delayed[1]]; + f(0); + return; + case 1: + odd(0); return; + default: odd(1); return; + } + odd(n - 1 | 0); + return; } function odd(n){ - if(2 < n >>> 0) return 1 - (1 - even(n - 1 | 0)); - switch(n){ - case 0: - var - f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; - delayed[1] = [0, f, delayed[1]]; - f(0); - return 0; - case 1: - return 1 - (1 - even(0)); - default: return 1 - (1 - even(1)); - } + if(2 >= n >>> 0) + switch(n){ + case 0: + var + f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; + delayed[1] = [0, f, delayed[1]]; + f(0); + return; + case 1: + even(0); return; + default: even(1); return; + } + even(n - 1 | 0); + return; } var block = [0, even, odd]; return block; @@ -496,12 +504,12 @@ let () = M.run () closures$0 = closures(i), even = closures$0[1]; even(i); - var _e_ = i + 1 | 0; + var _f_ = i + 1 | 0; if(4 === i){ - var _d_ = caml_call1(list_rev, delayed[1]); - return caml_call2(list_iter, function(f){return caml_call1(f, 0);}, _d_); + var _e_ = caml_call1(list_rev, delayed[1]); + return caml_call2(list_iter, function(f){return caml_call1(f, 0);}, _e_); } - var i = _e_; + var i = _f_; } } //end |}] diff --git a/compiler/tests-compiler/gh1494.ml b/compiler/tests-compiler/gh1494.ml index fd646b38f2..17cab23faf 100644 --- a/compiler/tests-compiler/gh1494.ml +++ b/compiler/tests-compiler/gh1494.ml @@ -39,7 +39,7 @@ let () = [%expect {| function bug(param){ - var g = [0, function(x){return function(_c_){return _c_;};}]; + var g = [0, function(x){return function(_d_){return _d_;};}]; return [0, function(param){return caml_call1(g[1], 1);}, g]; } //end |}] From 8d1841f748ab5ef4a4eb37d4b1e13dddc934b132 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Tue, 31 Oct 2023 10:21:31 +0100 Subject: [PATCH 107/112] tune --- compiler/lib/primitive.ml | 6 +- compiler/tests-compiler/gh1007.ml | 108 ++++++++++++++---------------- 2 files changed, 53 insertions(+), 61 deletions(-) diff --git a/compiler/lib/primitive.ml b/compiler/lib/primitive.ml index ee7f3ba72c..b1a4a6adf5 100644 --- a/compiler/lib/primitive.ml +++ b/compiler/lib/primitive.ml @@ -73,14 +73,14 @@ let arity nm = Hashtbl.find arities (resolve nm) let has_arity nm a = try Hashtbl.find arities (resolve nm) = a with Not_found -> false -let is_pure nm = match nm with +let is_pure nm = + match nm with | "%undefined" | "%closure" | "%identity" | "%direct_int_div" | "%direct_int_mod" - | "%direct_int_mul" - -> true + | "%direct_int_mul" -> true | _ -> Poly.(kind nm <> `Mutator) let exists p = Hashtbl.mem kinds p diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 322e329ed5..084225d871 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -347,7 +347,7 @@ end = struct let run () = for i = 0 to 4 do - ignore (even (i) : bool) + if even (i) then print_string "" done end @@ -366,34 +366,30 @@ let () = M.run () var even = function(n){ - if(2 >= n >>> 0) - switch(n){ - case 0: - return; - case 1: - odd(0); return; - default: odd(1); return; - } - odd(n - 1 | 0); - return; + if(2 < n >>> 0) return 1 - (1 - odd(n - 1 | 0)); + switch(n){ + case 0: + return 1; + case 1: + return 1 - (1 - odd(0)); + default: return 1 - (1 - odd(1)); + } }, odd = function(n){ - if(2 >= n >>> 0) - switch(n){ - case 0: - return; - case 1: - even(0); return; - default: even(1); return; - } - even(n - 1 | 0); - return; + if(2 < n >>> 0) return 1 - (1 - even(n - 1 | 0)); + switch(n){ + case 0: + return 0; + case 1: + return 1 - (1 - even(0)); + default: return 1 - (1 - even(1)); + } }; - even(i); - var _b_ = i + 1 | 0; + if(even(i)) caml_call1(Stdlib[42], cst); + var _a_ = i + 1 | 0; if(4 === i) return 0; - var i = _b_; + var i = _a_; } } //end |}] @@ -435,7 +431,7 @@ end = struct let run () = for i = 0 to 4 do - ignore (even (i) : bool) + if even (i) then print_string "" done; list_iter (fun f -> f ()) (list_rev !delayed) end @@ -467,49 +463,45 @@ let () = M.run () closures = function(i){ function even(n){ - if(2 >= n >>> 0) - switch(n){ - case 0: - var - f = function(param){return caml_call2(Stdlib_Printf[2], _c_, i);}; - delayed[1] = [0, f, delayed[1]]; - f(0); - return; - case 1: - odd(0); return; - default: odd(1); return; - } - odd(n - 1 | 0); - return; + if(2 < n >>> 0) return 1 - (1 - odd(n - 1 | 0)); + switch(n){ + case 0: + var + f = function(param){return caml_call2(Stdlib_Printf[2], _c_, i);}; + delayed[1] = [0, f, delayed[1]]; + f(0); + return 1; + case 1: + return 1 - (1 - odd(0)); + default: return 1 - (1 - odd(1)); + } } function odd(n){ - if(2 >= n >>> 0) - switch(n){ - case 0: - var - f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; - delayed[1] = [0, f, delayed[1]]; - f(0); - return; - case 1: - even(0); return; - default: even(1); return; - } - even(n - 1 | 0); - return; + if(2 < n >>> 0) return 1 - (1 - even(n - 1 | 0)); + switch(n){ + case 0: + var + f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i);}; + delayed[1] = [0, f, delayed[1]]; + f(0); + return 0; + case 1: + return 1 - (1 - even(0)); + default: return 1 - (1 - even(1)); + } } var block = [0, even, odd]; return block; }, closures$0 = closures(i), even = closures$0[1]; - even(i); - var _f_ = i + 1 | 0; + if(even(i)) caml_call1(Stdlib[42], cst); + var _e_ = i + 1 | 0; if(4 === i){ - var _e_ = caml_call1(list_rev, delayed[1]); - return caml_call2(list_iter, function(f){return caml_call1(f, 0);}, _e_); + var _d_ = caml_call1(list_rev, delayed[1]); + return caml_call2(list_iter, function(f){return caml_call1(f, 0);}, _d_); } - var i = _f_; + var i = _e_; } } //end |}] From 47a69f9f51a8f15ec045fce7327ac1a6cce9c6ea Mon Sep 17 00:00:00 2001 From: Micah Cantor Date: Thu, 9 Nov 2023 19:53:41 -0600 Subject: [PATCH 108/112] change log --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 2ba018e26e..e7f5362330 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ # Dev (2023-??-??) - ?? ## Features/Changes +* Compiler: global dead code elimination (#1503) * Compiler: change control-flow compilation strategy (#1496) * Compiler: Dead code elimination of unused references (#2076) * Compiler: reduce memory consumption (#1516) From d4c57b94262240744452722508b88698352fa2ed Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Fri, 10 Nov 2023 08:46:05 +0100 Subject: [PATCH 109/112] no global deadcode if no deadcode --- compiler/lib/driver.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 1b2f38dfc0..a291924c9d 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -110,7 +110,7 @@ let exact_calls profile p = in let info = Global_flow.f ~fast p in let p = - if Config.Flag.globaldeadcode () + if Config.Flag.globaldeadcode () && Config.Flag.deadcode () then Global_deadcode.f p ~deadcode_sentinal info else p in From dffa09a8e1549ee4e0fb05c518b8919ba8538d04 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Sat, 11 Nov 2023 08:22:43 +0100 Subject: [PATCH 110/112] rm trailing space --- compiler/lib/global_deadcode.ml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/lib/global_deadcode.ml b/compiler/lib/global_deadcode.ml index 2d1e6a0946..f6ad5b7743 100644 --- a/compiler/lib/global_deadcode.ml +++ b/compiler/lib/global_deadcode.ml @@ -86,8 +86,8 @@ type usage_kind = (** Compute the adjacency list for the dependency graph of given program. An edge between variables [x] and [y] is marked [Compute] if [x] is used in the definition of [y]. It is marked - as [Propagate] if [x] is applied as a closure or block argument the parameter [y]. - + as [Propagate] if [x] is applied as a closure or block argument the parameter [y]. + We use information from global flow to try to add edges between function calls and their return values at known call sites. *) let usages prog (global_info : Global_flow.info) : usage_kind Var.Map.t Var.Tbl.t = @@ -187,15 +187,15 @@ let expr_vars e = but we will add these when we visit the body *) | Constant _ | Closure (_, _) -> vars -(** Compute the initial liveness of each variable in the program. +(** Compute the initial liveness of each variable in the program. - A variable [x] is marked as [Top] if + A variable [x] is marked as [Top] if + It is used in an impure expression (as defined by [Pure_fun.pure_expr]); + It is used in a conditonal/switch; + It is raised by an exception; + It is used in another stateful instruction (like setting a block or array field); + Or, it is returned or applied to a function and the global flow analysis marked it as escaping. - + A variable [x[i]] is marked as [Live {i}] if it is used in an instruction where field [i] is referenced or set. *) let liveness prog pure_funs (global_info : Global_flow.info) = let live_vars = Var.Tbl.make () Dead in @@ -301,12 +301,12 @@ let solver vars uses defs live_vars = in Solver.f () (G.invert () g) (propagate uses defs live_vars) -(** Replace each instance of a dead variable with a sentinal value. - Blocks that end in dead variables are compacted to the first live entry. +(** Replace each instance of a dead variable with a sentinal value. + Blocks that end in dead variables are compacted to the first live entry. Dead variables are replaced when + They appear in a dead field of a block; or + They are returned; or - + They are applied to a function. + + They are applied to a function. *) let zero prog sentinal live_table = let compact_vars vars = From 1a135ea935f2cdde74d074a22c2dfd224c08f6ca Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Sat, 11 Nov 2023 08:25:28 +0100 Subject: [PATCH 111/112] accept --- compiler/tests-full/stdlib.cma.expected.js | 4906 ++++++++++---------- 1 file changed, 2490 insertions(+), 2416 deletions(-) diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index e95d98a6a6..859f00feef 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -1284,6 +1284,7 @@ Stdlib = global_data.Stdlib, Assert_failure = global_data.Assert_failure, Stdlib_Sys = global_data.Stdlib__Sys, + _b_ = undefined, cst_Obj_Ephemeron_blit_key = "Obj.Ephemeron.blit_key", cst_Obj_Ephemeron_check_key = "Obj.Ephemeron.check_key", cst_Obj_Ephemeron_unset_key = "Obj.Ephemeron.unset_key", @@ -1361,9 +1362,9 @@ max_ephe_length = Stdlib_Sys[13] - 2 | 0; function create(l){ /*<>*/ var - _g_ = 0 <= l ? 1 : 0, - _h_ = _g_ ? l <= max_ephe_length ? 1 : 0 : _g_; - if(1 - _h_) + _h_ = 0 <= l ? 1 : 0, + _i_ = _h_ ? l <= max_ephe_length ? 1 : 0 : _h_; + if(1 - _i_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_create); /*<>*/ return /*<>*/ runtime.caml_ephe_create @@ -1374,10 +1375,12 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _d_ = 0 <= o ? 1 : 0, - _e_ = _d_ ? o < length(e) ? 1 : 0 : _d_, - _f_ = 1 - _e_; - return _f_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _f_; + _e_ = 0 <= o ? 1 : 0, + _f_ = _e_ ? o < length(e) ? 1 : 0 : _e_, + _g_ = 1 - _f_; + if(! _g_) return _g_; + /*<>*/ /*<>*/ caml_call1(Stdlib[1], msg); + /*<>*/ return; /*<>*/ } function get_key(e, o){ /*<>*/ raise_if_invalid_offset @@ -1416,13 +1419,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _b_ = 0 !== l ? 1 : 0, - _c_ = - _b_ + _c_ = 0 !== l ? 1 : 0, + _d_ = + _c_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _b_; - /*<>*/ return _c_; + : _c_; + /*<>*/ return _d_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_blit_key); @@ -4970,6 +4973,7 @@ : runtime.caml_call_gen(f, [a0, a1]); } var + _g_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Uchar = global_data.Stdlib__Uchar, @@ -5014,15 +5018,15 @@ function init(n, f){ /*<>*/ var /*<>*/ s = /*<>*/ caml_create_bytes(n), - /*<>*/ _aq_ = n - 1 | 0, - /*<>*/ _ap_ = 0; - if(_aq_ >= 0){ - var i = _ap_; + /*<>*/ _ar_ = n - 1 | 0, + /*<>*/ _aq_ = 0; + if(_ar_ >= 0){ + var i = _aq_; for(;;){ caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); - /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; - if(_aq_ === i) break; - var i = _ar_; + /*<>*/ /*<>*/ var _as_ = i + 1 | 0; + if(_ar_ === i) break; + var i = _as_; } } /*<>*/ return s; @@ -5064,11 +5068,11 @@ function symbol(a, b){ /*<>*/ var c = a + b | 0, - _ao_ = b < 0 ? 1 : 0, + _ap_ = b < 0 ? 1 : 0, match = c < 0 ? 1 : 0; a: { - if(a < 0){if(_ao_ && ! match) break a;} else if(! _ao_ && match) break a; + if(a < 0){if(_ap_ && ! match) break a;} else if(! _ap_ && match) break a; /*<>*/ return c; } /*<>*/ return /*<>*/ caml_call1 @@ -5131,32 +5135,32 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _am_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var i = _al_; + _an_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _am_ = 0; + if(_an_ >= 0){ + var i = _am_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ === i) break; - var i = _an_; + /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; + if(_an_ === i) break; + var i = _ao_; } } return 0; /*<>*/ } function iteri(f, a){ /*<>*/ var - _aj_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + _ak_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _aj_ = 0; + if(_ak_ >= 0){ + var i = _aj_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; + /*<>*/ /*<>*/ var _al_ = i + 1 | 0; + if(_ak_ === i) break; + var i = _al_; } } return 0; @@ -5179,13 +5183,13 @@ param = tl; continue; } - var _ah_ = caml_ml_bytes_length(hd) + acc | 0; + var _ai_ = caml_ml_bytes_length(hd) + acc | 0; } else - var _ah_ = acc; + var _ai_ = acc; /*<>*/ var /*<>*/ dst = - /*<>*/ caml_create_bytes(_ah_), + /*<>*/ caml_create_bytes(_ai_), pos = pos$1, param$0 = l; for(;;){ @@ -5223,10 +5227,10 @@ /*<>*/ } function is_space(param){ /*<>*/ /*<>*/ var - _ag_ = param - 9 | 0; + _ah_ = param - 9 | 0; a: { - if(4 < _ag_ >>> 0){if(23 !== _ag_) break a;} else if(2 === _ag_) break a; + if(4 < _ah_ >>> 0){if(23 !== _ah_) break a;} else if(2 === _ah_) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -5250,10 +5254,10 @@ function unsafe_escape(s){ /*<>*/ var /*<>*/ n = [0, 0], - _$_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ ___ = 0; - if(_$_ >= 0){ - var i$0 = ___; + _aa_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ _$_ = 0; + if(_aa_ >= 0){ + var i$0 = _$_; for(;;){ var match = caml_bytes_unsafe_get(s, i$0); a: @@ -5263,12 +5267,12 @@ c: { if(32 <= match){ - var _ad_ = match - 34 | 0; - if(58 < _ad_ >>> 0){ - if(93 <= _ad_) break c; + var _ae_ = match - 34 | 0; + if(58 < _ae_ >>> 0){ + if(93 <= _ae_) break c; } - else if(56 < _ad_ - 1 >>> 0) break b; - var _ae_ = 1; + else if(56 < _ae_ - 1 >>> 0) break b; + var _af_ = 1; break a; } if(11 <= match){ @@ -5276,15 +5280,15 @@ } else if(8 <= match) break b; } - var _ae_ = 4; + var _af_ = 4; break a; } - var _ae_ = 2; + var _af_ = 2; } - n[1] = n[1] + _ae_ | 0; - /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; - if(_$_ === i$0) break; - var i$0 = _af_; + n[1] = n[1] + _af_ | 0; + /*<>*/ /*<>*/ var _ag_ = i$0 + 1 | 0; + if(_aa_ === i$0) break; + var i$0 = _ag_; } } if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; @@ -5292,10 +5296,10 @@ s$0 = /*<>*/ caml_create_bytes(n[1]); n[1] = 0; /*<>*/ var - _ab_ = caml_ml_bytes_length(s) - 1 | 0, - /*<>*/ _aa_ = 0; - if(_ab_ >= 0){ - var i = _aa_; + _ac_ = caml_ml_bytes_length(s) - 1 | 0, + /*<>*/ _ab_ = 0; + if(_ac_ >= 0){ + var i = _ab_; for(;;){ var c = caml_bytes_unsafe_get(s, i); a: @@ -5353,9 +5357,9 @@ caml_bytes_unsafe_set(s$0, n[1], c); } n[1]++; - /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; - if(_ab_ === i) break; - var i = _ac_; + /*<>*/ /*<>*/ var _ad_ = i + 1 | 0; + if(_ac_ === i) break; + var i = _ad_; } } /*<>*/ return s$0; @@ -5370,18 +5374,18 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _Y_ = l - 1 | 0, - /*<>*/ _X_ = 0; - if(_Y_ >= 0){ - var i = _X_; + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 0; + if(_Z_ >= 0){ + var i = _Y_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; - if(_Y_ === i) break; - var i = _Z_; + /*<>*/ /*<>*/ var ___ = i + 1 | 0; + if(_Z_ === i) break; + var i = ___; } } /*<>*/ return r; @@ -5392,18 +5396,18 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), - /*<>*/ _V_ = l - 1 | 0, - /*<>*/ _U_ = 0; - if(_V_ >= 0){ - var i = _U_; + /*<>*/ _W_ = l - 1 | 0, + /*<>*/ _V_ = 0; + if(_W_ >= 0){ + var i = _V_; for(;;){ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); - /*<>*/ /*<>*/ var _W_ = i + 1 | 0; - if(_V_ === i) break; - var i = _W_; + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + if(_W_ === i) break; + var i = _X_; } } /*<>*/ return r; @@ -5411,17 +5415,17 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _S_ = caml_ml_bytes_length(a) - 1 | 0, - /*<>*/ _R_ = 0; - if(_S_ >= 0){ - var i = _R_; + _T_ = caml_ml_bytes_length(a) - 1 | 0, + /*<>*/ _S_ = 0; + if(_T_ >= 0){ + var i = _S_; for(;;){ r[1] = /*<>*/ caml_call2 (f, r[1], caml_bytes_unsafe_get(a, i)); - /*<>*/ /*<>*/ var _T_ = i + 1 | 0; - if(_S_ === i) break; - var i = _T_; + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ === i) break; + var i = _U_; } } return r[1]; @@ -5429,17 +5433,17 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _P_ = + /*<>*/ _Q_ = /*<>*/ caml_ml_bytes_length(a) - 1 | 0; - if(_P_ >= 0){ - var i = _P_; + if(_Q_ >= 0){ + var i = _Q_; for(;;){ r[1] = /*<>*/ caml_call2 (f, caml_bytes_unsafe_get(a, i), r[1]); - /*<>*/ /*<>*/ var _Q_ = i - 1 | 0; + /*<>*/ /*<>*/ var _R_ = i - 1 | 0; if(0 === i) break; - var i = _Q_; + var i = _R_; } } return r[1]; @@ -5494,8 +5498,8 @@ /*<>*/ var len_s = caml_ml_bytes_length(s), len_pre = caml_ml_bytes_length(prefix), - _O_ = len_pre <= len_s ? 1 : 0; - if(! _O_) return _O_; + _P_ = len_pre <= len_s ? 1 : 0; + if(! _P_) return _P_; var i = 0; /*<>*/ for(;;){ if(i === len_pre) /*<>*/ return 1; @@ -5511,8 +5515,8 @@ len_s = caml_ml_bytes_length(s), len_suf = caml_ml_bytes_length(suffix), diff = len_s - len_suf | 0, - _N_ = 0 <= diff ? 1 : 0; - if(! _N_) return _N_; + _O_ = 0 <= diff ? 1 : 0; + if(! _O_) return _O_; var i = 0; /*<>*/ for(;;){ if(i === len_suf) /*<>*/ return 1; @@ -5611,13 +5615,13 @@ if(0 <= i && l >= i) /*<>*/ try{ /*<>*/ index_rec(s, l, i, c); - /*<>*/ /*<>*/ var _L_ = 1; - /*<>*/ return _L_; + /*<>*/ /*<>*/ var _M_ = 1; + /*<>*/ return _M_; } - catch(_M_){ - var _K_ = caml_wrap_exception(_M_); - if(_K_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_K_, 0); + catch(_N_){ + var _L_ = caml_wrap_exception(_N_); + if(_L_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_L_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_contains_from_Bytes); @@ -5629,13 +5633,13 @@ /*<>*/ if(0 <= i && caml_ml_bytes_length(s) > i) /*<>*/ try{ /*<>*/ rindex_rec(s, i, c); - /*<>*/ /*<>*/ var _I_ = 1; - /*<>*/ return _I_; + /*<>*/ /*<>*/ var _J_ = 1; + /*<>*/ return _J_; } - catch(_J_){ - var _H_ = caml_wrap_exception(_J_); - if(_H_ === Stdlib[8]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_H_, 0); + catch(_K_){ + var _I_ = caml_wrap_exception(_K_); + if(_I_ === Stdlib[8]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_I_, 0); } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_String_rcontains_from_Byte); @@ -5646,23 +5650,23 @@ /*<>*/ r = [0, 0], /*<>*/ j = [0, /*<>*/ caml_ml_bytes_length(s)], - /*<>*/ _D_ = + /*<>*/ _E_ = /*<>*/ caml_ml_bytes_length(s) - 1 | 0; - if(_D_ >= 0){ - var i = _D_; + if(_E_ >= 0){ + var i = _E_; for(;;){ if(caml_bytes_unsafe_get(s, i) === sep){ - var _F_ = r[1]; - r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _F_]; + var _G_ = r[1]; + r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _G_]; j[1] = i; } - /*<>*/ /*<>*/ var _G_ = i - 1 | 0; + /*<>*/ /*<>*/ var _H_ = i - 1 | 0; if(0 === i) break; - var i = _G_; + var i = _H_; } } - var _E_ = r[1]; - /*<>*/ return [0, sub(s, 0, j[1]), _E_]; + var _F_ = r[1]; + /*<>*/ return [0, sub(s, 0, j[1]), _F_]; /*<>*/ } function to_seq(s){ function aux(i, param){ @@ -5671,14 +5675,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _B_ = i + 1 | 0; + /*<>*/ _C_ = i + 1 | 0; /*<>*/ return [0, x, - function(_C_){ /*<>*/ return aux(_B_, _C_);}]; + function(_D_){ /*<>*/ return aux(_C_, _D_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _z_ = 0; - /*<>*/ return function(_A_){ - /*<>*/ return aux(_z_, _A_);}; + /*<>*/ /*<>*/ var _A_ = 0; + /*<>*/ return function(_B_){ + /*<>*/ return aux(_A_, _B_);}; /*<>*/ } function to_seqi(s){ function aux(i, param){ @@ -5687,20 +5691,20 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(s, i), - /*<>*/ _x_ = i + 1 | 0; + /*<>*/ _y_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_y_){ /*<>*/ return aux(_x_, _y_);}]; + function(_z_){ /*<>*/ return aux(_y_, _z_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _v_ = 0; - /*<>*/ return function(_w_){ - /*<>*/ return aux(_v_, _w_);}; + /*<>*/ /*<>*/ var _w_ = 0; + /*<>*/ return function(_x_){ + /*<>*/ return aux(_w_, _x_);}; /*<>*/ } function of_seq(i){ /*<>*/ var /*<>*/ n = [0, 0], /*<>*/ buf = [0, make(256, 0)]; - function _u_(c){ + function _v_(c){ /*<>*/ if(n[1] === caml_ml_bytes_length(buf[1])){ /*<>*/ /*<>*/ var new_len = @@ -5722,7 +5726,7 @@ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Seq[4], _u_, i); + (Stdlib_Seq[4], _v_, i); return sub(buf[1], 0, n[1]); /*<>*/ } function unsafe_get_uint16_le(b, i){ @@ -5739,9 +5743,9 @@ /*<>*/ } function get_int8(b, i){ /*<>*/ var - /*<>*/ _s_ = Stdlib_Sys[10] - 8 | 0, - _t_ = Stdlib_Sys[10] - 8 | 0; - return /*<>*/ caml_bytes_get(b, i) << _t_ >> _s_; + /*<>*/ _t_ = Stdlib_Sys[10] - 8 | 0, + _u_ = Stdlib_Sys[10] - 8 | 0; + return /*<>*/ caml_bytes_get(b, i) << _u_ >> _t_; /*<>*/ } function get_uint16_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5757,21 +5761,21 @@ /*<>*/ } function get_int16_ne(b, i){ /*<>*/ var - /*<>*/ _q_ = Stdlib_Sys[10] - 16 | 0, - _r_ = Stdlib_Sys[10] - 16 | 0; - return /*<>*/ caml_bytes_get16(b, i) << _r_ >> _q_; + /*<>*/ _r_ = Stdlib_Sys[10] - 16 | 0, + _s_ = Stdlib_Sys[10] - 16 | 0; + return /*<>*/ caml_bytes_get16(b, i) << _s_ >> _r_; /*<>*/ } function get_int16_le(b, i){ /*<>*/ var - /*<>*/ _o_ = Stdlib_Sys[10] - 16 | 0, - _p_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_le(b, i) << _p_ >> _o_; + /*<>*/ _p_ = Stdlib_Sys[10] - 16 | 0, + _q_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_le(b, i) << _q_ >> _p_; /*<>*/ } function get_int16_be(b, i){ /*<>*/ var - /*<>*/ _m_ = Stdlib_Sys[10] - 16 | 0, - _n_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_be(b, i) << _n_ >> _m_; + /*<>*/ _n_ = Stdlib_Sys[10] - 16 | 0, + _o_ = Stdlib_Sys[10] - 16 | 0; + return get_uint16_be(b, i) << _o_ >> _n_; /*<>*/ } function get_int32_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5798,14 +5802,22 @@ ( /*<>*/ caml_bytes_get64(b, i)); /*<>*/ } function unsafe_set_uint16_le(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)) - : /*<>*/ caml_bytes_set16(b, i, x); + /*<>*/ if(Stdlib_Sys[11]){ + /*<>*/ /*<>*/ caml_bytes_set16 + (b, i, caml_bswap16(x)); + /*<>*/ return; + } + /*<>*/ /*<>*/ caml_bytes_set16(b, i, x); + /*<>*/ return; /*<>*/ } function unsafe_set_uint16_be(b, i, x){ - /*<>*/ return Stdlib_Sys[11] - ? /*<>*/ caml_bytes_set16(b, i, x) - : /*<>*/ caml_bytes_set16(b, i, caml_bswap16(x)); + /*<>*/ if(Stdlib_Sys[11]){ + /*<>*/ /*<>*/ caml_bytes_set16(b, i, x); + /*<>*/ return; + } + /*<>*/ /*<>*/ caml_bytes_set16 + (b, i, caml_bswap16(x)); + /*<>*/ return; /*<>*/ } function set_int16_le(b, i, x){ /*<>*/ return Stdlib_Sys[11] @@ -5847,9 +5859,9 @@ dec_invalid = Stdlib_Uchar[22]; function dec_ret(n, u){ /*<>*/ /*<>*/ var - _l_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); + _m_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Uchar[21], n, _l_); + (Stdlib_Uchar[21], n, _m_); /*<>*/ } function not_in_x80_to_xBF(b){ /*<>*/ return 2 !== (b >>> 6 | 0) ? 1 : 0; @@ -5862,9 +5874,9 @@ /*<>*/ } function not_in_x90_to_xBF(b){ /*<>*/ var - _j_ = b < 144 ? 1 : 0, - _k_ = _j_ || (191 < b ? 1 : 0); - return _k_; + _k_ = b < 144 ? 1 : 0, + _l_ = _k_ || (191 < b ? 1 : 0); + return _l_; /*<>*/ } function not_in_x80_to_x8F(b){ /*<>*/ return 8 !== (b >>> 4 | 0) ? 1 : 0; @@ -6061,9 +6073,9 @@ (dec_invalid, 1); /*<>*/ } function set_utf_8_uchar(b, i, u){ - /*<>*/ function set(_i_, _h_, _g_){ - /*<>*/ caml_bytes_unsafe_set(_i_, _h_, _g_); - return 0; + /*<>*/ function set(_j_, _i_, _h_){ + /*<>*/ caml_bytes_unsafe_set(_j_, _i_, _h_); + return; } /*<>*/ var /*<>*/ max = @@ -7293,6 +7305,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } /*<>*/ var + _b_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Assert_failure = global_data.Assert_failure, @@ -7320,16 +7333,16 @@ /*<>*/ res = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, 0)), - /*<>*/ _ay_ = l - 1 | 0, - /*<>*/ _ax_ = 1; - if(_ay_ >= 1){ - var i = _ax_; + /*<>*/ _az_ = l - 1 | 0, + /*<>*/ _ay_ = 1; + if(_az_ >= 1){ + var i = _ay_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _az_ = i + 1 | 0; - if(_ay_ === i) break; - var i = _az_; + /*<>*/ /*<>*/ var _aA_ = i + 1 | 0; + if(_az_ === i) break; + var i = _aA_; } } /*<>*/ return res; @@ -7338,15 +7351,15 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_make_vect(sx, [0]), - /*<>*/ _av_ = sx - 1 | 0, - /*<>*/ _au_ = 0; - if(_av_ >= 0){ - var x = _au_; + /*<>*/ _aw_ = sx - 1 | 0, + /*<>*/ _av_ = 0; + if(_aw_ >= 0){ + var x = _av_; for(;;){ res[1 + x] = /*<>*/ caml_make_vect(sy, init); - /*<>*/ /*<>*/ var _aw_ = x + 1 | 0; - if(_av_ === x) break; - var x = _aw_; + /*<>*/ /*<>*/ var _ax_ = x + 1 | 0; + if(_aw_ === x) break; + var x = _ax_; } } /*<>*/ return res; @@ -7397,15 +7410,15 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _as_ = a.length - 1 - 1 | 0, - /*<>*/ _ar_ = 0; - if(_as_ >= 0){ - var i = _ar_; + _at_ = a.length - 1 - 1 | 0, + /*<>*/ _as_ = 0; + if(_at_ >= 0){ + var i = _as_; for(;;){ /*<>*/ /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _at_ = i + 1 | 0; - if(_as_ === i) break; - var i = _at_; + /*<>*/ /*<>*/ var _au_ = i + 1 | 0; + if(_at_ === i) break; + var i = _au_; } } return 0; @@ -7415,16 +7428,16 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_iter2_arrays_must_ha); /*<>*/ var - _ap_ = a.length - 1 - 1 | 0, - /*<>*/ _ao_ = 0; - if(_ap_ >= 0){ - var i = _ao_; + _aq_ = a.length - 1 - 1 | 0, + /*<>*/ _ap_ = 0; + if(_aq_ >= 0){ + var i = _ap_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; - if(_ap_ === i) break; - var i = _aq_; + /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; + if(_aq_ === i) break; + var i = _ar_; } } return 0; @@ -7436,48 +7449,48 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _am_ = l - 1 | 0, - /*<>*/ _al_ = 1; - if(_am_ >= 1){ - var i = _al_; + /*<>*/ _an_ = l - 1 | 0, + /*<>*/ _am_ = 1; + if(_an_ >= 1){ + var i = _am_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ === i) break; - var i = _an_; + /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; + if(_an_ === i) break; + var i = _ao_; } } /*<>*/ return r; /*<>*/ } function map_inplace(f, a){ /*<>*/ var - _aj_ = a.length - 1 - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + _ak_ = a.length - 1 - 1 | 0, + /*<>*/ _aj_ = 0; + if(_ak_ >= 0){ + var i = _aj_; for(;;){ /*<>*/ a[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; + /*<>*/ /*<>*/ var _al_ = i + 1 | 0; + if(_ak_ === i) break; + var i = _al_; } } return 0; /*<>*/ } function mapi_inplace(f, a){ /*<>*/ var - _ag_ = a.length - 1 - 1 | 0, - /*<>*/ _af_ = 0; - if(_ag_ >= 0){ - var i = _af_; + _ah_ = a.length - 1 - 1 | 0, + /*<>*/ _ag_ = 0; + if(_ah_ >= 0){ + var i = _ag_; for(;;){ /*<>*/ a[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_ag_ === i) break; - var i = _ah_; + /*<>*/ /*<>*/ var _ai_ = i + 1 | 0; + if(_ah_ === i) break; + var i = _ai_; } } return 0; @@ -7494,32 +7507,32 @@ /*<>*/ r = /*<>*/ caml_make_vect (la, /*<>*/ caml_call2(f, a[1], b[1])), - /*<>*/ _ad_ = la - 1 | 0, - /*<>*/ _ac_ = 1; - if(_ad_ >= 1){ - var i = _ac_; + /*<>*/ _ae_ = la - 1 | 0, + /*<>*/ _ad_ = 1; + if(_ae_ >= 1){ + var i = _ad_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ === i) break; - var i = _ae_; + /*<>*/ /*<>*/ var _af_ = i + 1 | 0; + if(_ae_ === i) break; + var i = _af_; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ /*<>*/ var - _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i = _$_; + _ab_ = a.length - 1 - 1 | 0, + /*<>*/ _aa_ = 0; + if(_ab_ >= 0){ + var i = _aa_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ === i) break; - var i = _ab_; + /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; + if(_ab_ === i) break; + var i = _ac_; } } return 0; @@ -7531,16 +7544,16 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call2(f, 0, a[1])), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 1; - if(_Z_ >= 1){ - var i = _Y_; + /*<>*/ ___ = l - 1 | 0, + /*<>*/ _Z_ = 1; + if(___ >= 1){ + var i = _Z_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ === i) break; - var i = ___; + /*<>*/ /*<>*/ var _$_ = i + 1 | 0; + if(___ === i) break; + var i = _$_; } } /*<>*/ return r; @@ -7589,15 +7602,15 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _W_ = a.length - 1 - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + _X_ = a.length - 1 - 1 | 0, + /*<>*/ _W_ = 0; + if(_X_ >= 0){ + var i = _W_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ === i) break; - var i = _X_; + /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; + if(_X_ === i) break; + var i = _Y_; } } return r[1]; @@ -7614,10 +7627,10 @@ /*<>*/ output_array = /*<>*/ caml_make_vect(len, elt), /*<>*/ acc$1 = [0, acc$0], - /*<>*/ _T_ = len - 1 | 0, - /*<>*/ _S_ = 1; - if(_T_ >= 1){ - var i = _S_; + /*<>*/ _U_ = len - 1 | 0, + /*<>*/ _T_ = 1; + if(_U_ >= 1){ + var i = _T_; for(;;){ /*<>*/ var /*<>*/ match$0 = @@ -7626,9 +7639,9 @@ acc$2 = match$0[1]; acc$1[1] = acc$2; /*<>*/ output_array[1 + i] = elt$0; - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ === i) break; - var i = _U_; + /*<>*/ /*<>*/ var _V_ = i + 1 | 0; + if(_U_ === i) break; + var i = _V_; } } /*<>*/ return [0, acc$1[1], output_array]; @@ -7636,14 +7649,14 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _Q_ = a.length - 1 - 1 | 0; - if(_Q_ >= 0){ - var i = _Q_; + /*<>*/ _R_ = a.length - 1 - 1 | 0; + if(_R_ >= 0){ + var i = _R_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _R_ = i - 1 | 0; + /*<>*/ /*<>*/ var _S_ = i - 1 | 0; if(0 === i) break; - var i = _R_; + var i = _S_; } } return r[1]; @@ -7787,17 +7800,17 @@ /*<>*/ caml_make_vect(n, a0), /*<>*/ b = /*<>*/ caml_make_vect(n, b0), - /*<>*/ _O_ = n - 1 | 0, - /*<>*/ _N_ = 1; - if(_O_ >= 1){ - var i = _N_; + /*<>*/ _P_ = n - 1 | 0, + /*<>*/ _O_ = 1; + if(_P_ >= 1){ + var i = _O_; for(;;){ var match$0 = x[1 + i], bi = match$0[2], ai = match$0[1]; /*<>*/ a[1 + i] = ai; /*<>*/ b[1 + i] = bi; - /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ === i) break; - var i = _P_; + /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; + if(_P_ === i) break; + var i = _Q_; } } /*<>*/ return [0, a, b]; @@ -7813,15 +7826,15 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), - /*<>*/ _L_ = na - 1 | 0, - /*<>*/ _K_ = 1; - if(_L_ >= 1){ - var i = _K_; + /*<>*/ _M_ = na - 1 | 0, + /*<>*/ _L_ = 1; + if(_M_ >= 1){ + var i = _L_; for(;;){ x[1 + i] = [0, a[1 + i], b[1 + i]]; - /*<>*/ /*<>*/ var _M_ = i + 1 | 0; - if(_L_ === i) break; - var i = _M_; + /*<>*/ /*<>*/ var _N_ = i + 1 | 0; + if(_M_ === i) break; + var i = _N_; } } /*<>*/ return x; @@ -7835,42 +7848,42 @@ /*<>*/ x = [0, i31]; if((i31 + 2 | 0) < l){ /*<>*/ var - /*<>*/ _D_ = i31 + 1 | 0, - /*<>*/ _E_ = caml_check_bound(a, _D_)[1 + _D_]; + /*<>*/ _E_ = i31 + 1 | 0, + /*<>*/ _F_ = caml_check_bound(a, _E_)[1 + _E_]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _E_) + (cmp, caml_check_bound(a, i31)[1 + i31], _F_) < 0) x[1] = i31 + 1 | 0; /*<>*/ var - /*<>*/ _F_ = i31 + 2 | 0, - /*<>*/ _G_ = caml_check_bound(a, _F_)[1 + _F_], - _H_ = x[1]; + /*<>*/ _G_ = i31 + 2 | 0, + /*<>*/ _H_ = caml_check_bound(a, _G_)[1 + _G_], + _I_ = x[1]; if ( /*<>*/ caml_call2 - (cmp, caml_check_bound(a, _H_)[1 + _H_], _G_) + (cmp, caml_check_bound(a, _I_)[1 + _I_], _H_) < 0) x[1] = i31 + 2 | 0; return x[1]; } if((i31 + 1 | 0) < l){ /*<>*/ var - _I_ = i31 + 1 | 0, - /*<>*/ _J_ = caml_check_bound(a, _I_)[1 + _I_]; + _J_ = i31 + 1 | 0, + /*<>*/ _K_ = caml_check_bound(a, _J_)[1 + _J_]; /*<>*/ if (0 > /*<>*/ caml_call2 - (cmp, caml_check_bound(a, i31)[1 + i31], _J_)) + (cmp, caml_check_bound(a, i31)[1 + i31], _K_)) /*<>*/ return i31 + 1 | 0; } if(i31 < l) /*<>*/ return i31; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _x_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_x_ >= 0){ - var i$6 = _x_; + var l = a.length - 1, _y_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_y_ >= 0){ + var i$6 = _y_; for(;;){ /*<>*/ /*<>*/ var e$1 = caml_check_bound(a, i$6)[1 + i$6]; @@ -7888,8 +7901,8 @@ break; } /*<>*/ /*<>*/ var - _u_ = caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; + _v_ = caml_check_bound(a, j)[1 + j]; + /*<>*/ caml_check_bound(a, i)[1 + i] = _v_; var i = j; } } @@ -7899,14 +7912,14 @@ var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } - /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _D_ = i$6 - 1 | 0; if(0 === i$6) break; - var i$6 = _C_; + var i$6 = _D_; } } - /*<>*/ /*<>*/ var _y_ = l - 1 | 0; - if(_y_ >= 2){ - var i$4 = _y_; + /*<>*/ /*<>*/ var _z_ = l - 1 | 0; + if(_z_ >= 2){ + var i$4 = _z_; a: for(;;){ /*<>*/ /*<>*/ var @@ -7918,8 +7931,8 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ j$0 = maxson(i$4, i$1), - /*<>*/ _v_ = caml_check_bound(a, j$0)[1 + j$0]; - /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _v_; + /*<>*/ _w_ = caml_check_bound(a, j$0)[1 + j$0]; + /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _w_; var i$1 = j$0; } } @@ -7940,30 +7953,30 @@ /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; else{ /*<>*/ /*<>*/ var - _w_ = caml_check_bound(a, father)[1 + father]; - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _w_; + _x_ = caml_check_bound(a, father)[1 + father]; + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _x_; if(0 < father){var i$3 = father; continue;} /*<>*/ caml_check_bound(a, 0)[1] = e$0; } - /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _C_ = i$4 - 1 | 0; if(2 === i$4) break a; - var i$4 = _B_; + var i$4 = _C_; break; } } } } - var _z_ = 1 < l ? 1 : 0; - if(_z_){ + var _A_ = 1 < l ? 1 : 0; + if(_A_){ /*<>*/ /*<>*/ var e = caml_check_bound(a, 1)[2]; /*<>*/ a[2] = caml_check_bound(a, 0)[1]; /*<>*/ a[1] = e; - var _A_ = 0; + var _B_ = 0; } else - var _A_ = _z_; - /*<>*/ return _A_; + var _B_ = _A_; + /*<>*/ return _B_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -8007,38 +8020,38 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _m_ = len - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var i = _l_; + _n_ = len - 1 | 0, + /*<>*/ _m_ = 0; + if(_n_ >= 0){ + var i = _m_; a: for(;;){ /*<>*/ var - _n_ = srcofs + i | 0, - /*<>*/ e = caml_check_bound(a, _n_)[1 + _n_], + _o_ = srcofs + i | 0, + /*<>*/ e = caml_check_bound(a, _o_)[1 + _o_], /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; for(;;){ if(dstofs <= j[1]){ - var _o_ = j[1]; + var _p_ = j[1]; /*<>*/ if (0 < /*<>*/ caml_call2 - (cmp, caml_check_bound(dst, _o_)[1 + _o_], e)){ + (cmp, caml_check_bound(dst, _p_)[1 + _p_], e)){ /*<>*/ var - _p_ = j[1], - /*<>*/ _q_ = caml_check_bound(dst, _p_)[1 + _p_], - _r_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _r_)[1 + _r_] = _q_; + _q_ = j[1], + /*<>*/ _r_ = caml_check_bound(dst, _q_)[1 + _q_], + _s_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = _r_; j[1] += -1; continue; } } - var _s_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; - /*<>*/ /*<>*/ var _t_ = i + 1 | 0; - if(_m_ === i) break a; - var i = _t_; + var _t_ = j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, _t_)[1 + _t_] = e; + /*<>*/ /*<>*/ var _u_ = i + 1 | 0; + if(_n_ === i) break a; + var i = _u_; break; } } @@ -8046,13 +8059,16 @@ return 0; /*<>*/ } function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5) - /*<>*/ return isortto(srcofs, dst, dstofs, len); + /*<>*/ if(len <= 5){ + /*<>*/ isortto(srcofs, dst, dstofs, len); + /*<>*/ return; + } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ return merge - (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ merge + (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ return; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -8071,14 +8087,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _j_ = i + 1 | 0; + /*<>*/ _k_ = i + 1 | 0; /*<>*/ return [0, x, - function(_k_){ /*<>*/ return aux(_j_, _k_);}]; + function(_l_){ /*<>*/ return aux(_k_, _l_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _h_ = 0; - /*<>*/ return function(_i_){ - /*<>*/ return aux(_h_, _i_);}; + /*<>*/ /*<>*/ var _i_ = 0; + /*<>*/ return function(_j_){ + /*<>*/ return aux(_i_, _j_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -8086,22 +8102,22 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _f_ = i + 1 | 0; + /*<>*/ _g_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_g_){ /*<>*/ return aux(_f_, _g_);}]; + function(_h_){ /*<>*/ return aux(_g_, _h_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _d_ = 0; - /*<>*/ return function(_e_){ - /*<>*/ return aux(_d_, _e_);}; + /*<>*/ /*<>*/ var _e_ = 0; + /*<>*/ return function(_f_){ + /*<>*/ return aux(_e_, _f_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _b_ = 0; - function _c_(acc, x){ + /*<>*/ var _c_ = 0; + function _d_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ /*<>*/ var - l = /*<>*/ caml_call3(Stdlib_Seq[5], _c_, _b_, i$2); + l = /*<>*/ caml_call3(Stdlib_Seq[5], _d_, _c_, i$2); if(! l) /*<>*/ return [0]; /*<>*/ var tl = l[2], @@ -8205,6 +8221,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } /*<>*/ var + _j_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Stdlib_List = global_data.Stdlib__List, @@ -8250,8 +8267,8 @@ pi = 3.141592653589793; function is_integer(x){ /*<>*/ var - _aw_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; - return _aw_ ? is_finite(x) : _aw_; + _ax_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; + return _ax_ ? is_finite(x) : _ax_; /*<>*/ } function succ(x){ /*<>*/ return /*<>*/ caml_nextafter_float @@ -8352,32 +8369,34 @@ (10, 100, 0, x); /*<>*/ } function unsafe_fill(a, ofs, len, v){ - /*<>*/ var _au_ = (ofs + len | 0) - 1 | 0; - if(_au_ >= ofs){ + /*<>*/ var _av_ = (ofs + len | 0) - 1 | 0; + if(_av_ >= ofs){ var i = ofs; for(;;){ /*<>*/ a[1 + i] = v; - /*<>*/ /*<>*/ var _av_ = i + 1 | 0; - if(_au_ === i) break; - var i = _av_; + /*<>*/ /*<>*/ var _aw_ = i + 1 | 0; + if(_av_ === i) break; + var i = _aw_; } } return 0; /*<>*/ } function check(a, ofs, len, msg){ - /*<>*/ var _aq_ = ofs < 0 ? 1 : 0; - if(_aq_) - var _ar_ = _aq_; + /*<>*/ var _ar_ = ofs < 0 ? 1 : 0; + if(_ar_) + var _as_ = _ar_; else{ - var _as_ = len < 0 ? 1 : 0; - if(_as_) - var _ar_ = _as_; + var _at_ = len < 0 ? 1 : 0; + if(_at_) + var _as_ = _at_; else var - _at_ = (ofs + len | 0) < 0 ? 1 : 0, - _ar_ = _at_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); + _au_ = (ofs + len | 0) < 0 ? 1 : 0, + _as_ = _au_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); } - return _ar_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _ar_; + if(! _as_) return _as_; + /*<>*/ /*<>*/ caml_call1(Stdlib[1], msg); + /*<>*/ return; /*<>*/ } function make(n, v){ /*<>*/ /*<>*/ var @@ -8392,16 +8411,16 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_floatarray_create(l), - /*<>*/ _ao_ = l - 1 | 0, - /*<>*/ _an_ = 0; - if(_ao_ >= 0){ - var i = _an_; + /*<>*/ _ap_ = l - 1 | 0, + /*<>*/ _ao_ = 0; + if(_ap_ >= 0){ + var i = _ao_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; - if(_ao_ === i) break; - var i = _ap_; + /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; + if(_ap_ === i) break; + var i = _aq_; } } /*<>*/ return res; @@ -8483,11 +8502,11 @@ (src, sofs, dst, dofs, len); /*<>*/ } function to_list(a){ - /*<>*/ function _al_(_am_){ - /*<>*/ return a[1 + _am_]; + /*<>*/ function _am_(_an_){ + /*<>*/ return a[1 + _an_]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[11], a.length - 1, _al_); + (Stdlib_List[11], a.length - 1, _am_); /*<>*/ } function of_list(l){ /*<>*/ var @@ -8508,16 +8527,16 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _aj_ = a.length - 1 - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + _ak_ = a.length - 1 - 1 | 0, + /*<>*/ _aj_ = 0; + if(_ak_ >= 0){ + var i = _aj_; for(;;){ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; + /*<>*/ /*<>*/ var _al_ = i + 1 | 0; + if(_ak_ === i) break; + var i = _al_; } } return 0; @@ -8527,16 +8546,16 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_iter2_arrays_m); /*<>*/ var - _ag_ = a.length - 1 - 1 | 0, - /*<>*/ _af_ = 0; - if(_ag_ >= 0){ - var i = _af_; + _ah_ = a.length - 1 - 1 | 0, + /*<>*/ _ag_ = 0; + if(_ah_ >= 0){ + var i = _ag_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_ag_ === i) break; - var i = _ah_; + /*<>*/ /*<>*/ var _ai_ = i + 1 | 0; + if(_ah_ === i) break; + var i = _ai_; } } return 0; @@ -8546,32 +8565,32 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _ad_ = l - 1 | 0, - /*<>*/ _ac_ = 0; - if(_ad_ >= 0){ - var i = _ac_; + /*<>*/ _ae_ = l - 1 | 0, + /*<>*/ _ad_ = 0; + if(_ae_ >= 0){ + var i = _ad_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ === i) break; - var i = _ae_; + /*<>*/ /*<>*/ var _af_ = i + 1 | 0; + if(_ae_ === i) break; + var i = _af_; } } /*<>*/ return r; /*<>*/ } function map_inplace(f, a){ /*<>*/ var - _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; - if(_aa_ >= 0){ - var i = _$_; + _ab_ = a.length - 1 - 1 | 0, + /*<>*/ _aa_ = 0; + if(_ab_ >= 0){ + var i = _aa_; for(;;){ /*<>*/ a[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ === i) break; - var i = _ab_; + /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; + if(_ab_ === i) break; + var i = _ac_; } } return 0; @@ -8586,32 +8605,32 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_floatarray_create(la), - /*<>*/ _Z_ = la - 1 | 0, - /*<>*/ _Y_ = 0; - if(_Z_ >= 0){ - var i = _Y_; + /*<>*/ ___ = la - 1 | 0, + /*<>*/ _Z_ = 0; + if(___ >= 0){ + var i = _Z_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ === i) break; - var i = ___; + /*<>*/ /*<>*/ var _$_ = i + 1 | 0; + if(___ === i) break; + var i = _$_; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ /*<>*/ var - _W_ = a.length - 1 - 1 | 0, - /*<>*/ _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + _X_ = a.length - 1 - 1 | 0, + /*<>*/ _W_ = 0; + if(_X_ >= 0){ + var i = _W_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ === i) break; - var i = _X_; + /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; + if(_X_ === i) break; + var i = _Y_; } } return 0; @@ -8621,32 +8640,32 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _T_ = l - 1 | 0, - /*<>*/ _S_ = 0; - if(_T_ >= 0){ - var i = _S_; + /*<>*/ _U_ = l - 1 | 0, + /*<>*/ _T_ = 0; + if(_U_ >= 0){ + var i = _T_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ === i) break; - var i = _U_; + /*<>*/ /*<>*/ var _V_ = i + 1 | 0; + if(_U_ === i) break; + var i = _V_; } } /*<>*/ return r; /*<>*/ } function mapi_inplace(f, a){ /*<>*/ var - _Q_ = a.length - 1 - 1 | 0, - /*<>*/ _P_ = 0; - if(_Q_ >= 0){ - var i = _P_; + _R_ = a.length - 1 - 1 | 0, + /*<>*/ _Q_ = 0; + if(_R_ >= 0){ + var i = _Q_; for(;;){ /*<>*/ a[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _R_ = i + 1 | 0; - if(_Q_ === i) break; - var i = _R_; + /*<>*/ /*<>*/ var _S_ = i + 1 | 0; + if(_R_ === i) break; + var i = _S_; } } return 0; @@ -8654,15 +8673,15 @@ function fold_left(f, x, a){ /*<>*/ var /*<>*/ r = [0, x], - _N_ = a.length - 1 - 1 | 0, - /*<>*/ _M_ = 0; - if(_N_ >= 0){ - var i = _M_; + _O_ = a.length - 1 - 1 | 0, + /*<>*/ _N_ = 0; + if(_O_ >= 0){ + var i = _N_; for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _O_ = i + 1 | 0; - if(_N_ === i) break; - var i = _O_; + /*<>*/ /*<>*/ var _P_ = i + 1 | 0; + if(_O_ === i) break; + var i = _P_; } } return r[1]; @@ -8670,14 +8689,14 @@ function fold_right(f, a, x){ /*<>*/ var /*<>*/ r = [0, x], - /*<>*/ _K_ = a.length - 1 - 1 | 0; - if(_K_ >= 0){ - var i = _K_; + /*<>*/ _L_ = a.length - 1 - 1 | 0; + if(_L_ >= 0){ + var i = _L_; for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _L_ = i - 1 | 0; + /*<>*/ /*<>*/ var _M_ = i - 1 | 0; if(0 === i) break; - var i = _L_; + var i = _M_; } } return r[1]; @@ -8813,9 +8832,9 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); /*<>*/ } - var l = a.length - 1, _E_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_E_ >= 0){ - var i$6 = _E_; + var l = a.length - 1, _F_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(_F_ >= 0){ + var i$6 = _F_; for(;;){ /*<>*/ /*<>*/ var e$1 = /*<>*/ caml_array_get(a, i$6); @@ -8845,14 +8864,14 @@ /*<>*/ /*<>*/ caml_array_set (a, i$0, e$1); } - /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _K_ = i$6 - 1 | 0; if(0 === i$6) break; - var i$6 = _J_; + var i$6 = _K_; } } - /*<>*/ /*<>*/ var _F_ = l - 1 | 0; - if(_F_ >= 2){ - var i$4 = _F_; + /*<>*/ /*<>*/ var _G_ = l - 1 | 0; + if(_G_ >= 2){ + var i$4 = _G_; a: for(;;){ /*<>*/ /*<>*/ var @@ -8893,25 +8912,25 @@ /*<>*/ /*<>*/ caml_array_set (a, 0, e$0); } - /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _J_ = i$4 - 1 | 0; if(2 === i$4) break a; - var i$4 = _I_; + var i$4 = _J_; break; } } } } - var _G_ = 1 < l ? 1 : 0; - if(_G_){ + var _H_ = 1 < l ? 1 : 0; + if(_H_){ /*<>*/ /*<>*/ var e = /*<>*/ caml_array_get(a, 1); /*<>*/ /*<>*/ caml_array_set (a, 1, /*<>*/ caml_array_get(a, 0)); - var _H_ = /*<>*/ caml_array_set(a, 0, e); + var _I_ = /*<>*/ caml_array_set(a, 0, e); } else - var _H_ = _G_; - /*<>*/ return _H_; + var _I_ = _H_; + /*<>*/ return _I_; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -8961,10 +8980,10 @@ /*<>*/ } function isortto(srcofs, dst, dstofs, len){ /*<>*/ var - _C_ = len - 1 | 0, - /*<>*/ _B_ = 0; - if(_C_ >= 0){ - var i = _B_; + _D_ = len - 1 | 0, + /*<>*/ _C_ = 0; + if(_D_ >= 0){ + var i = _C_; a: for(;;){ /*<>*/ var @@ -8988,9 +9007,9 @@ } /*<>*/ /*<>*/ caml_array_set (dst, j[1] + 1 | 0, e); - /*<>*/ /*<>*/ var _D_ = i + 1 | 0; - if(_C_ === i) break a; - var i = _D_; + /*<>*/ /*<>*/ var _E_ = i + 1 | 0; + if(_D_ === i) break a; + var i = _E_; break; } } @@ -8998,13 +9017,16 @@ return 0; /*<>*/ } function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5) - /*<>*/ return isortto(srcofs, dst, dstofs, len); + /*<>*/ if(len <= 5){ + /*<>*/ isortto(srcofs, dst, dstofs, len); + /*<>*/ return; + } var l1 = len / 2 | 0, l2 = len - l1 | 0; /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ return merge - (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ merge + (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); + /*<>*/ return; /*<>*/ } var l = a.length - 1; if(l <= 5) /*<>*/ return isortto(0, a, 0, l); @@ -9023,14 +9045,14 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _z_ = i + 1 | 0; + /*<>*/ _A_ = i + 1 | 0; /*<>*/ return [0, x, - function(_A_){ /*<>*/ return aux(_z_, _A_);}]; + function(_B_){ /*<>*/ return aux(_A_, _B_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ return function(_y_){ - /*<>*/ return aux(_x_, _y_);}; + /*<>*/ /*<>*/ var _y_ = 0; + /*<>*/ return function(_z_){ + /*<>*/ return aux(_y_, _z_);}; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -9038,23 +9060,23 @@ /*<>*/ return 0; /*<>*/ var /*<>*/ x = a[1 + i], - /*<>*/ _v_ = i + 1 | 0; + /*<>*/ _w_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_w_){ /*<>*/ return aux(_v_, _w_);}]; + function(_x_){ /*<>*/ return aux(_w_, _x_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _t_ = 0; - /*<>*/ return function(_u_){ - /*<>*/ return aux(_t_, _u_);}; + /*<>*/ /*<>*/ var _u_ = 0; + /*<>*/ return function(_v_){ + /*<>*/ return aux(_u_, _v_);}; /*<>*/ } function of_seq(i$2){ - /*<>*/ var _r_ = 0; - function _s_(acc, x){ + /*<>*/ var _s_ = 0; + function _t_(acc, x){ /*<>*/ return [0, x, acc]; /*<>*/ } /*<>*/ var /*<>*/ l = - /*<>*/ caml_call3(Stdlib_Seq[5], _s_, _r_, i$2), + /*<>*/ caml_call3(Stdlib_Seq[5], _t_, _s_, i$2), /*<>*/ len = /*<>*/ caml_call1(Stdlib_List[1], l), /*<>*/ a = @@ -9079,16 +9101,16 @@ /*<>*/ r = /*<>*/ runtime.caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _p_ = l - 1 | 0, - /*<>*/ _o_ = 1; - if(_p_ >= 1){ - var i = _o_; + /*<>*/ _q_ = l - 1 | 0, + /*<>*/ _p_ = 1; + if(_q_ >= 1){ + var i = _p_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(_p_ === i) break; - var i = _q_; + /*<>*/ /*<>*/ var _r_ = i + 1 | 0; + if(_q_ === i) break; + var i = _r_; } } /*<>*/ return r; @@ -9098,16 +9120,16 @@ l = a.length - 1, /*<>*/ r = /*<>*/ caml_floatarray_create(l), - /*<>*/ _m_ = l - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var i = _l_; + /*<>*/ _n_ = l - 1 | 0, + /*<>*/ _m_ = 0; + if(_n_ >= 0){ + var i = _m_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _n_ = i + 1 | 0; - if(_m_ === i) break; - var i = _n_; + /*<>*/ /*<>*/ var _o_ = i + 1 | 0; + if(_n_ === i) break; + var i = _o_; } } /*<>*/ return r; @@ -9118,7 +9140,7 @@ _e_ = caml_array_get, _f_ = [0, - function(_k_){ /*<>*/ return _k_.length - 1;}, + function(_l_){ /*<>*/ return _l_.length - 1;}, _e_, _d_, make, @@ -9194,7 +9216,7 @@ seeded_hash, hash, [0, - function(_j_){ /*<>*/ return _j_.length - 1;}, + function(_k_){ /*<>*/ return _k_.length - 1;}, _i_, _h_, make, @@ -10058,6 +10080,7 @@ 0, 0, 0], + _a_ = undefined, cst_syntax_error = "syntax error"; function grow_stacks(param){ /*<>*/ var @@ -10084,7 +10107,7 @@ (Stdlib_Array[8], env[4], 0, new_end, 0, oldsize); env[4] = new_end; env[5] = newsize; - return 0; + return; /*<>*/ } function clear_parser(param){ /*<>*/ /*<>*/ caml_call4 @@ -10137,17 +10160,17 @@ case 4: try{ /*<>*/ var - _i_ = env[13], - /*<>*/ _j_ = + _j_ = env[13], + /*<>*/ _k_ = /*<>*/ caml_call1 - (caml_check_bound(tables[1], _i_)[1 + _i_], env), - /*<>*/ _k_ = 4, - value = _j_, - action = _k_; + (caml_check_bound(tables[1], _j_)[1 + _j_], env), + /*<>*/ _l_ = 4, + value = _k_, + action = _l_; } - catch(_m_){ - var _h_ = caml_wrap_exception(_m_); - if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); + catch(_n_){ + var _i_ = caml_wrap_exception(_n_); + if(_i_ !== Parse_error) throw caml_maybe_attach_backtrace(_i_, 0); var value = 0, action = 5; } var cmd = action, arg = value; @@ -10183,9 +10206,9 @@ ? 1 : 0; /*<>*/ /*<>*/ var - _l_ = /*<>*/ runtime.caml_obj_tag(tok); - /*<>*/ return caml_check_bound(tables[3], _l_) - [1 + _l_] + _m_ = /*<>*/ runtime.caml_obj_tag(tok); + /*<>*/ return caml_check_bound(tables[3], _m_) + [1 + _m_] === curr_char ? 1 : 0; @@ -10195,21 +10218,21 @@ } /*<>*/ } function peek_val(env, n){ - /*<>*/ var _g_ = env[11] - n | 0; - /*<>*/ return caml_check_bound(env[2], _g_)[1 + _g_]; + /*<>*/ var _h_ = env[11] - n | 0; + /*<>*/ return caml_check_bound(env[2], _h_)[1 + _h_]; /*<>*/ } function symbol_start_pos(param){ /*<>*/ var i$1 = env[12], i = i$1; /*<>*/ for(;;){ if(0 >= i){ - var _f_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _f_)[1 + _f_]; + var _g_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _g_)[1 + _g_]; } /*<>*/ var - _d_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ st = caml_check_bound(env[3], _d_)[1 + _d_], _e_ = (env[11] - i | 0) + 1 | 0, - /*<>*/ en = caml_check_bound(env[4], _e_)[1 + _e_]; + /*<>*/ st = caml_check_bound(env[3], _e_)[1 + _e_], + _f_ = (env[11] - i | 0) + 1 | 0, + /*<>*/ en = caml_check_bound(env[4], _f_)[1 + _f_]; /*<>*/ if ( /*<>*/ runtime.caml_notequal(st, en)) /*<>*/ return st; @@ -10219,16 +10242,16 @@ } /*<>*/ } function symbol_end_pos(param){ - /*<>*/ var _c_ = env[11]; - /*<>*/ return caml_check_bound(env[4], _c_)[1 + _c_]; + /*<>*/ var _d_ = env[11]; + /*<>*/ return caml_check_bound(env[4], _d_)[1 + _d_]; /*<>*/ } function rhs_start_pos(n){ - /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[3], _b_)[1 + _b_]; + /*<>*/ var _c_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[3], _c_)[1 + _c_]; /*<>*/ } function rhs_end_pos(n){ - /*<>*/ var _a_ = env[11] - (env[12] - n | 0) | 0; - /*<>*/ return caml_check_bound(env[4], _a_)[1 + _a_]; + /*<>*/ var _b_ = env[11] - (env[12] - n | 0) | 0; + /*<>*/ return caml_check_bound(env[4], _b_)[1 + _b_]; /*<>*/ } function symbol_start(param){ /*<>*/ return symbol_start_pos(0)[4]; @@ -12663,6 +12686,7 @@ Stdlib = global_data.Stdlib, Stdlib_String = global_data.Stdlib__String, Assert_failure = global_data.Assert_failure, + _b_ = undefined, cst_Buffer_truncate = "Buffer.truncate", _a_ = [0, "buffer.ml", 220, 9], cst_Buffer_add_channel = "Buffer.add_channel", @@ -12751,7 +12775,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_Bytes[11], b[1][1], 0, new_buffer, 0, b[2]); b[1] = [0, new_buffer, new_len[1]]; - return 0; + return; } new_len[1] = 2 * new_len[1] | 0; } @@ -12813,14 +12837,14 @@ } /*<>*/ } function add_substring(b, s, offset, len){ - /*<>*/ var _r_ = offset < 0 ? 1 : 0; - if(_r_) - var _s_ = _r_; + /*<>*/ var _s_ = offset < 0 ? 1 : 0; + if(_s_) + var _t_ = _s_; else var - _t_ = len < 0 ? 1 : 0, - _s_ = _t_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); - if(_s_) + _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); /*<>*/ var @@ -12875,9 +12899,9 @@ /*<>*/ } function add_channel(b, ic, to_read$1){ /*<>*/ var - _p_ = to_read$1 < 0 ? 1 : 0, - _q_ = _p_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); - if(_q_) + _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(b[1][2] < (b[2] + to_read$1 | 0)) @@ -12923,8 +12947,8 @@ i$4 = 0; /*<>*/ for(;;){ if(i$4 >= lim$1){ - var _o_ = 92 === previous ? 1 : 0; - return _o_ ? add_char(b, previous) : _o_; + var _p_ = 92 === previous ? 1 : 0; + return _p_ ? add_char(b, previous) : _p_; } /*<>*/ /*<>*/ var previous$0 = /*<>*/ caml_string_get(s, i$4); @@ -13064,14 +13088,14 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _m_ = i + 1 | 0; + /*<>*/ _n_ = i + 1 | 0; /*<>*/ return [0, x, - function(_n_){ /*<>*/ return aux(_m_, _n_);}]; + function(_o_){ /*<>*/ return aux(_n_, _o_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _k_ = 0; - /*<>*/ return function(_l_){ - /*<>*/ return aux(_k_, _l_);}; + /*<>*/ /*<>*/ var _l_ = 0; + /*<>*/ return function(_m_){ + /*<>*/ return aux(_l_, _m_);}; /*<>*/ } function to_seqi(b){ function aux(i, param){ @@ -13080,21 +13104,21 @@ /*<>*/ var /*<>*/ x = /*<>*/ caml_bytes_get(b[1][1], i), - /*<>*/ _i_ = i + 1 | 0; + /*<>*/ _j_ = i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_j_){ /*<>*/ return aux(_i_, _j_);}]; + function(_k_){ /*<>*/ return aux(_j_, _k_);}]; /*<>*/ } - /*<>*/ /*<>*/ var _g_ = 0; - /*<>*/ return function(_h_){ - /*<>*/ return aux(_g_, _h_);}; + /*<>*/ /*<>*/ var _h_ = 0; + /*<>*/ return function(_i_){ + /*<>*/ return aux(_h_, _i_);}; /*<>*/ } function add_seq(b, seq){ - /*<>*/ function _e_(_f_){ - /*<>*/ return add_char(b, _f_); + /*<>*/ function _f_(_g_){ + /*<>*/ return add_char(b, _g_); } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _e_, seq); + (Stdlib_Seq[4], _f_, seq); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var b = create(32); @@ -13173,8 +13197,8 @@ return 0; /*<>*/ } function add_int16_le(b, x){ - /*<>*/ var _d_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; - return add_int16_ne(b, _d_); + /*<>*/ var _e_ = Stdlib_Sys[11] ? caml_bswap16(x) : x; + return add_int16_ne(b, _e_); /*<>*/ } function add_int16_be(b, x){ /*<>*/ var x$0 = Stdlib_Sys[11] ? x : caml_bswap16(x); @@ -13182,8 +13206,8 @@ /*<>*/ } function add_int32_le(b, x){ /*<>*/ var - _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; - /*<>*/ return add_int32_ne(b, _c_); + _d_ = Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; + /*<>*/ return add_int32_ne(b, _d_); /*<>*/ } function add_int32_be(b, x){ /*<>*/ var @@ -13192,8 +13216,8 @@ /*<>*/ } function add_int64_le(b, x){ /*<>*/ var - _b_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; - /*<>*/ return add_int64_ne(b, _b_); + _c_ = Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; + /*<>*/ return add_int64_ne(b, _c_); /*<>*/ } function add_int64_be(b, x){ /*<>*/ var @@ -13460,6 +13484,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var + _a_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_Mutex = global_data.Stdlib__Mutex, Stdlib_Condition = global_data.Stdlib__Condition, @@ -13478,8 +13503,8 @@ function create_dls(param){ /*<>*/ /*<>*/ var st = /*<>*/ caml_make_vect(8, unique_value); - /*<>*/ return /*<>*/ caml_domain_dls_set - (st); + /*<>*/ /*<>*/ caml_domain_dls_set(st); + /*<>*/ return; /*<>*/ } /*<>*/ create_dls(0); /*<>*/ var @@ -13568,7 +13593,7 @@ /*<>*/ first_spawn_function = [0, function(param){ - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }]; function before_first_spawn(f){ /*<>*/ if @@ -13589,7 +13614,7 @@ at_exit_key = new_key (0, - function(param, _e_){ + function(param, _f_){ /*<>*/ return 0; /*<>*/ }); function at_exit(f){ @@ -13624,8 +13649,8 @@ /*<>*/ }; } /*<>*/ /*<>*/ var - _a_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); - function _b_(param){ + _b_ = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); + function _c_(param){ /*<>*/ var split = param[2], k = param[1], idx = k[1]; /*<>*/ return [0, idx, @@ -13633,7 +13658,7 @@ /*<>*/ } /*<>*/ var /*<>*/ pk = - /*<>*/ caml_call2(Stdlib_List[20], _b_, _a_), + /*<>*/ caml_call2(Stdlib_List[20], _c_, _b_), /*<>*/ term_mutex = /*<>*/ caml_call1(Stdlib_Mutex[1], 0), /*<>*/ term_condition = @@ -13645,7 +13670,7 @@ /*<>*/ try{ /*<>*/ create_dls(0); var - _c_ = + _d_ = function(param){ /*<>*/ var v = param[2], @@ -13655,7 +13680,7 @@ /*<>*/ return 0; /*<>*/ }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[18], _c_, pk); + (Stdlib_List[18], _d_, pk); /*<>*/ /*<>*/ var res = /*<>*/ caml_call1(f, 0); } @@ -13672,8 +13697,8 @@ catch(ex){ /*<>*/ var ex$0 = caml_wrap_exception(ex), - /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, - result$0 = _d_; + /*<>*/ _e_ = 0 === result[0] ? [1, ex$0] : result, + result$0 = _e_; } /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], term_mutex); @@ -13804,6 +13829,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var + _$_ = undefined, global_data = runtime.caml_get_global_data(), cst$9 = "%{", cst$10 = "%}", @@ -14130,14 +14156,14 @@ /*<>*/ var str_ind = c >>> 3 | 0, mask = 1 << (c & 7), - /*<>*/ _dU_ = + /*<>*/ _dT_ = /*<>*/ runtime.caml_bytes_get (char_set, str_ind) | mask; /*<>*/ return /*<>*/ caml_bytes_set (char_set, str_ind, - /*<>*/ caml_call1(Stdlib[29], _dU_)); + /*<>*/ caml_call1(Stdlib[29], _dT_)); /*<>*/ } function freeze_char_set(char_set){ /*<>*/ return /*<>*/ caml_call1 @@ -14149,19 +14175,19 @@ i = 0; for(;;){ /*<>*/ /*<>*/ var - _dS_ = + _dR_ = /*<>*/ caml_string_get(char_set, i) ^ 255; /*<>*/ /*<>*/ caml_bytes_set (char_set$0, i, - /*<>*/ caml_call1(Stdlib[29], _dS_)); + /*<>*/ caml_call1(Stdlib[29], _dR_)); /*<>*/ /*<>*/ var - _dT_ = i + 1 | 0; + _dS_ = i + 1 | 0; if(31 === i) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], char_set$0); - var i = _dT_; + var i = _dS_; } /*<>*/ } function is_in_char_set(char_set, c){ @@ -14221,11 +14247,11 @@ case 6: var prec_opt = ign[2], pad_opt$5 = ign[1]; if(prec_opt) - var ndec = prec_opt[1], _dR_ = [0, ndec]; + var ndec = prec_opt[1], _dQ_ = [0, ndec]; else - var _dR_ = 0; + var _dQ_ = 0; /*<>*/ return [0, - [8, _a_, pad_of_pad_opt(pad_opt$5), _dR_, fmt]]; + [8, _a_, pad_of_pad_opt(pad_opt$5), _dQ_, fmt]]; case 7: var pad_opt$6 = ign[1]; /*<>*/ return [0, @@ -14258,9 +14284,8 @@ function buffer_check_size(buf, overhead){ /*<>*/ var len = runtime.caml_ml_bytes_length(buf[2]), - min_len = buf[1] + overhead | 0, - _dP_ = len < min_len ? 1 : 0; - if(_dP_){ + min_len = buf[1] + overhead | 0; + if(len < min_len){ /*<>*/ var /*<>*/ new_len = /*<>*/ caml_call2 @@ -14270,18 +14295,15 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_Bytes[11], buf[2], 0, new_str, 0, len); buf[2] = new_str; - var _dQ_ = 0; } - else - var _dQ_ = _dP_; - return _dQ_; + return; /*<>*/ } function buffer_add_char(buf, c){ /*<>*/ buffer_check_size(buf, 1); /*<>*/ /*<>*/ caml_bytes_set (buf[2], buf[1], c); buf[1] = buf[1] + 1 | 0; - return 0; + return; /*<>*/ } function buffer_add_string(buf, s){ /*<>*/ var @@ -14290,7 +14312,7 @@ /*<>*/ /*<>*/ caml_call5 (Stdlib_String[6], s, 0, buf[2], buf[1], str_len); buf[1] = buf[1] + str_len | 0; - return 0; + return; /*<>*/ } function buffer_contents(buf){ /*<>*/ return caml_call3 @@ -14346,68 +14368,78 @@ function bprint_padty(buf, padty){ /*<>*/ switch(padty){ case 0: - /*<>*/ return buffer_add_char(buf, 45); + /*<>*/ buffer_add_char(buf, 45); + /*<>*/ return; case 1: - /*<>*/ return 0; + /*<>*/ return; default: - /*<>*/ return buffer_add_char(buf, 48); + /*<>*/ buffer_add_char(buf, 48); + /*<>*/ return; } /*<>*/ } function bprint_ignored_flag(buf, ign_flag){ - /*<>*/ return ign_flag - ? buffer_add_char(buf, 95) - : ign_flag; + /*<>*/ if(! ign_flag) + /*<>*/ return ign_flag; + /*<>*/ buffer_add_char(buf, 95); + /*<>*/ return; /*<>*/ } function bprint_pad_opt(buf, pad_opt){ /*<>*/ if(! pad_opt) - /*<>*/ return 0; + /*<>*/ return; var width = pad_opt[1]; - /*<>*/ return buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], width)); + /*<>*/ buffer_add_string + (buf, + /*<>*/ caml_call1(Stdlib_Int[12], width)); + /*<>*/ return; /*<>*/ } function bprint_padding(buf, pad){ /*<>*/ if(typeof pad === "number") - /*<>*/ return 0; + /*<>*/ return; if(0 === pad[0]){ var n = pad[2], padty = pad[1]; /*<>*/ bprint_padty(buf, padty); - /*<>*/ return buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], n)); + /*<>*/ buffer_add_string + (buf, + /*<>*/ caml_call1(Stdlib_Int[12], n)); + /*<>*/ return; } var padty$0 = pad[1]; /*<>*/ bprint_padty(buf, padty$0); - /*<>*/ return buffer_add_char(buf, 42); + /*<>*/ buffer_add_char(buf, 42); + /*<>*/ return; /*<>*/ } function bprint_precision(buf, prec){ - /*<>*/ if(typeof prec === "number") - return prec ? buffer_add_string(buf, cst) : 0; - var n = prec[1]; - /*<>*/ buffer_add_char(buf, 46); - /*<>*/ return buffer_add_string - (buf, - /*<>*/ caml_call1 - (Stdlib_Int[12], n)); + /*<>*/ if(typeof prec !== "number"){ + var n = prec[1]; + /*<>*/ buffer_add_char(buf, 46); + /*<>*/ buffer_add_string + (buf, + /*<>*/ caml_call1(Stdlib_Int[12], n)); + /*<>*/ return; + } + if(! prec) /*<>*/ return; + /*<>*/ buffer_add_string(buf, cst); + /*<>*/ return; /*<>*/ } function bprint_iconv_flag(buf, iconv){ /*<>*/ switch(iconv){ case 1: case 4: - /*<>*/ return buffer_add_char(buf, 43); + /*<>*/ buffer_add_char(buf, 43); + /*<>*/ return; case 2: case 5: - /*<>*/ return buffer_add_char(buf, 32); + /*<>*/ buffer_add_char(buf, 32); + /*<>*/ return; case 7: case 9: case 11: case 13: case 14: case 15: - /*<>*/ return buffer_add_char(buf, 35); - default: /*<>*/ return 0; + /*<>*/ buffer_add_char(buf, 35); + /*<>*/ return; + default: /*<>*/ return; } /*<>*/ } function bprint_altint_fmt(buf, ign_flag, iconv, pad, prec, c){ @@ -14417,8 +14449,9 @@ /*<>*/ bprint_padding(buf, pad); /*<>*/ bprint_precision(buf, prec); /*<>*/ buffer_add_char(buf, c); - /*<>*/ return buffer_add_char - (buf, char_of_iconv(iconv)); + /*<>*/ buffer_add_char + (buf, char_of_iconv(iconv)); + /*<>*/ return; /*<>*/ } function bprint_fconv_flag(buf, fconv){ /*<>*/ switch(fconv[1]){ @@ -14427,7 +14460,9 @@ /*<>*/ buffer_add_char(buf, 43); break; default: /*<>*/ buffer_add_char(buf, 32); } - return 8 <= fconv[2] ? buffer_add_char(buf, 35) : 0; + if(8 > fconv[2]) /*<>*/ return; + /*<>*/ buffer_add_char(buf, 35); + /*<>*/ return; /*<>*/ } function string_of_formatting_lit(formatting_lit){ /*<>*/ if @@ -14457,40 +14492,43 @@ default: /*<>*/ var c = formatting_lit[1], - /*<>*/ _dO_ = + /*<>*/ _dP_ = /*<>*/ caml_call2 (Stdlib_String[1], 1, c); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _dO_); + (Stdlib[28], cst$7, _dP_); } /*<>*/ } function bprint_char_literal(buf, chr){ - /*<>*/ return 37 === chr - ? buffer_add_string(buf, cst$8) - : buffer_add_char(buf, chr); + /*<>*/ if(37 === chr){ + /*<>*/ buffer_add_string(buf, cst$8); + /*<>*/ return; + } + /*<>*/ buffer_add_char(buf, chr); + /*<>*/ return; /*<>*/ } function bprint_string_literal(buf, str){ /*<>*/ var - _dM_ = caml_ml_string_length(str) - 1 | 0, - /*<>*/ _dL_ = 0; - if(_dM_ >= 0){ - var i = _dL_; + _dN_ = caml_ml_string_length(str) - 1 | 0, + /*<>*/ _dM_ = 0; + if(_dN_ >= 0){ + var i = _dM_; for(;;){ /*<>*/ bprint_char_literal (buf, /*<>*/ caml_string_get(str, i)); /*<>*/ /*<>*/ var - _dN_ = i + 1 | 0; - if(_dM_ === i) break; - var i = _dN_; + _dO_ = i + 1 | 0; + if(_dN_ === i) break; + var i = _dO_; } } - return 0; + return; /*<>*/ } function bprint_fmtty(buf, fmtty){ /*<>*/ var fmtty$0 = fmtty; /*<>*/ for(;;){ if(typeof fmtty$0 === "number") - /*<>*/ return 0; + /*<>*/ return; switch(fmtty$0[0]){ case 0: var fmtty$1 = fmtty$0[1]; @@ -14587,7 +14625,7 @@ ign_flag$0 = ign_flag; /*<>*/ for(;;){ if(typeof fmt$0 === "number") - /*<>*/ return 0; + /*<>*/ return; switch(fmt$0[0]){ case 0: var rest = fmt$0[1]; @@ -14790,12 +14828,18 @@ c = /*<>*/ caml_call1 (Stdlib[29], i); - return 37 === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37)) - : 64 - === c - ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64)) - : buffer_add_char(buf, c); + if(37 === c){ + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ return; + } + if(64 === c){ + /*<>*/ buffer_add_char(buf, 37); + /*<>*/ buffer_add_char(buf, 64); + /*<>*/ return; + } + /*<>*/ buffer_add_char(buf, c); + /*<>*/ return; /*<>*/ }; /*<>*/ buffer_add_char(buf, 91); /*<>*/ var @@ -14813,18 +14857,18 @@ /*<>*/ before = /*<>*/ caml_call1 (Stdlib_Char[1], c - 1 | 0), - /*<>*/ _dH_ = + /*<>*/ _dI_ = is_in_char_set(set, c); - /*<>*/ if(_dH_) + /*<>*/ if(_dI_) /*<>*/ var - /*<>*/ _dI_ = - is_in_char_set(set, before), /*<>*/ _dJ_ = - _dI_ ? is_in_char_set(set, after) : _dI_, - _dK_ = 1 - _dJ_; + is_in_char_set(set, before), + /*<>*/ _dK_ = + _dJ_ ? is_in_char_set(set, after) : _dJ_, + _dL_ = 1 - _dK_; else - var _dK_ = _dH_; - /*<>*/ return _dK_; + var _dL_ = _dI_; + /*<>*/ return _dL_; /*<>*/ } return is_alone; }, @@ -14958,12 +15002,12 @@ (buf, ign_flag$0); switch(counter){ case 0: - var _dD_ = 108; break; + var _dE_ = 108; break; case 1: - var _dD_ = 110; break; - default: var _dD_ = 78; + var _dE_ = 110; break; + default: var _dE_ = 78; } - /*<>*/ buffer_add_char(buf, _dD_); + /*<>*/ buffer_add_char(buf, _dE_); var fmt$0 = rest$20, ign_flag$0 = 0; break; case 22: @@ -14987,20 +15031,20 @@ /*<>*/ var rest$23 = fmt$0[3], arity = fmt$0[1], - /*<>*/ _dF_ = + /*<>*/ _dG_ = int_of_custom_arity(arity), - _dE_ = 1; - if(_dF_ >= 1){ - var i$8 = _dE_; + _dF_ = 1; + if(_dG_ >= 1){ + var i$8 = _dF_; for(;;){ /*<>*/ buffer_add_char(buf, 37); /*<>*/ bprint_ignored_flag (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 63); /*<>*/ /*<>*/ var - _dG_ = i$8 + 1 | 0; - if(_dF_ === i$8) break; - var i$8 = _dG_; + _dH_ = i$8 + 1 | 0; + if(_dG_ === i$8) break; + var i$8 = _dH_; } } var fmt$0 = rest$23, ign_flag$0 = 0; @@ -15072,17 +15116,17 @@ ed = match[3], af = match[2], fa = match[1], - _di_ = + _dj_ = function(param){ /*<>*/ af(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _di_, + _dj_, ed, de]; case 1: @@ -15093,17 +15137,17 @@ ed$0 = match$0[3], af$0 = match$0[2], fa$0 = match$0[1], - _dj_ = + _dk_ = function(param){ /*<>*/ af$0(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$0(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dj_, + _dk_, ed$0, de$0]; case 2: @@ -15114,17 +15158,17 @@ ed$1 = match$1[3], af$1 = match$1[2], fa$1 = match$1[1], - _dk_ = + _dl_ = function(param){ /*<>*/ af$1(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$1(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dk_, + _dl_, ed$1, de$1]; case 3: @@ -15135,17 +15179,17 @@ ed$2 = match$2[3], af$2 = match$2[2], fa$2 = match$2[1], - _dl_ = + _dm_ = function(param){ /*<>*/ af$2(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$2(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dl_, + _dm_, ed$2, de$2]; case 4: @@ -15156,17 +15200,17 @@ ed$3 = match$3[3], af$3 = match$3[2], fa$3 = match$3[1], - _dm_ = + _dn_ = function(param){ /*<>*/ af$3(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$3(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dm_, + _dn_, ed$3, de$3]; case 5: @@ -15177,17 +15221,17 @@ ed$4 = match$4[3], af$4 = match$4[2], fa$4 = match$4[1], - _dn_ = + _do_ = function(param){ /*<>*/ af$4(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$4(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dn_, + _do_, ed$4, de$4]; case 6: @@ -15198,17 +15242,17 @@ ed$5 = match$5[3], af$5 = match$5[2], fa$5 = match$5[1], - _do_ = + _dp_ = function(param){ /*<>*/ af$5(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$5(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _do_, + _dp_, ed$5, de$5]; case 7: @@ -15219,17 +15263,17 @@ ed$6 = match$6[3], af$6 = match$6[2], fa$6 = match$6[1], - _dp_ = + _dq_ = function(param){ /*<>*/ af$6(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$6(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dp_, + _dq_, ed$6, de$6]; case 8: @@ -15240,17 +15284,17 @@ ed$7 = match$7[3], af$7 = match$7[2], fa$7 = match$7[1], - _dq_ = + _dr_ = function(param){ /*<>*/ af$7(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$7(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dq_, + _dr_, ed$7, de$7]; case 9: @@ -15269,33 +15313,33 @@ dj = match$9[3], ga = match$9[2], ag = match$9[1], - _dr_ = + _ds_ = function(param){ /*<>*/ jd(0); /*<>*/ de$8(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _ds_ = + _dt_ = function(param){ /*<>*/ ed$8(0); /*<>*/ dj(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dt_ = + _du_ = function(param){ /*<>*/ ga(0); /*<>*/ af$8(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$8(0); /*<>*/ ag(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, + _du_, _dt_, - _ds_, - _dr_]; + _ds_]; case 10: /*<>*/ var rest$9 = param[1], @@ -15305,17 +15349,17 @@ ed$9 = match$10[3], af$9 = match$10[2], fa$9 = match$10[1], - _du_ = + _dv_ = function(param){ /*<>*/ af$9(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$9(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _du_, + _dv_, ed$9, de$9]; case 11: @@ -15327,17 +15371,17 @@ ed$10 = match$11[3], af$10 = match$11[2], fa$10 = match$11[1], - _dv_ = + _dw_ = function(param){ /*<>*/ af$10(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$10(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dv_, + _dw_, ed$10, de$10]; case 12: @@ -15349,17 +15393,17 @@ ed$11 = match$12[3], af$11 = match$12[2], fa$11 = match$12[1], - _dw_ = + _dx_ = function(param){ /*<>*/ af$11(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$11(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dw_, + _dx_, ed$11, de$11]; case 13: @@ -15371,29 +15415,29 @@ ed$12 = match$13[3], af$12 = match$13[2], fa$12 = match$13[1], - /*<>*/ _dx_ = + /*<>*/ _dy_ = function(param){ /*<>*/ de$12(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dy_ = + _dz_ = function(param){ /*<>*/ ed$12(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dz_ = + _dA_ = function(param){ /*<>*/ af$12(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$12(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, + _dA_, _dz_, - _dy_, - _dx_]; + _dy_]; default: /*<>*/ var rest$13 = param[1], @@ -15403,46 +15447,46 @@ ed$13 = match$14[3], af$13 = match$14[2], fa$13 = match$14[1], - /*<>*/ _dA_ = + /*<>*/ _dB_ = function(param){ /*<>*/ de$13(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dB_ = + _dC_ = function(param){ /*<>*/ ed$13(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - _dC_ = + _dD_ = function(param){ /*<>*/ af$13(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }; /*<>*/ return [0, function(param){ /*<>*/ fa$13(0); - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, + _dD_, _dC_, - _dB_, - _dA_]; + _dB_]; } - /*<>*/ function _df_(param){ - /*<>*/ return 0; + /*<>*/ function _dg_(param){ + /*<>*/ return; /*<>*/ } - function _dg_(param){ - /*<>*/ return 0; - /*<>*/ } function _dh_(param){ - /*<>*/ return 0; + /*<>*/ return; + /*<>*/ } + function _di_(param){ + /*<>*/ return; /*<>*/ } /*<>*/ return [0, function(param){ - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, + _di_, _dh_, - _dg_, - _df_]; + _dg_]; } function trans(ty1, ty2){ /*<>*/ a: @@ -15661,11 +15705,11 @@ /*<>*/ var rest2$7 = ty2[2], ty2$0 = ty2[1], - /*<>*/ _de_ = + /*<>*/ _df_ = trans(rest1$7, rest2$7); /*<>*/ return [8, trans(ty1$0, ty2$0), - _de_]; + _df_]; case 10: break a; case 11: @@ -15955,13 +15999,13 @@ /*<>*/ var rest$13 = fmtty$0[2], formatting_gen = fmtty$0[1], - /*<>*/ _db_ = fmtty_of_fmt(rest$13); + /*<>*/ _dc_ = fmtty_of_fmt(rest$13); if(0 === formatting_gen[0]) - var fmt = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt); + var fmt = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt); else - var fmt$0 = formatting_gen[1][1], _dc_ = fmtty_of_fmt(fmt$0); + var fmt$0 = formatting_gen[1][1], _dd_ = fmtty_of_fmt(fmt$0); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], _dc_, _db_); + (CamlinternalFormatBasics[1], _dd_, _dc_); case 19: var rest$14 = fmtty$0[1]; /*<>*/ return [13, @@ -16014,10 +16058,10 @@ case 9: /*<>*/ var fmtty$6 = ign[2], - /*<>*/ _dd_ = + /*<>*/ _de_ = fmtty_of_fmt(fmtty$5); /*<>*/ return /*<>*/ caml_call2 - (CamlinternalFormatBasics[1], fmtty$6, _dd_); + (CamlinternalFormatBasics[1], fmtty$6, _de_); case 10: var fmtty$0 = fmtty$5; break; default: var fmtty$0 = fmtty$5; @@ -16073,11 +16117,11 @@ /*<>*/ } function type_format(fmt, fmtty){ /*<>*/ /*<>*/ var - _da_ = type_format_gen(fmt, fmtty); - if(typeof _da_[2] !== "number") + _db_ = type_format_gen(fmt, fmtty); + if(typeof _db_[2] !== "number") /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); - var fmt$0 = _da_[1]; + var fmt$0 = _db_[1]; /*<>*/ return fmt$0; /*<>*/ } function type_ignored_param_one(ign, fmt, fmtty){ @@ -16362,7 +16406,7 @@ fmt_rest$13 = fmt[3], sub_fmtty$1 = fmt[2], pad_opt$0 = fmt[1], - /*<>*/ _c__ = + /*<>*/ _c$_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty1)]; @@ -16371,7 +16415,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty$1)], - _c__)) + _c$_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -16541,12 +16585,12 @@ /*<>*/ var sub_fmtty$3 = ign[2], pad_opt$2 = ign[1], - /*<>*/ _c$_ = + /*<>*/ _da_ = type_ignored_format_substituti(sub_fmtty$3, rest, fmtty0), - match$43 = _c$_[2], + match$43 = _da_[2], fmtty$21 = match$43[2], fmt$22 = match$43[1], - sub_fmtty$4 = _c$_[1]; + sub_fmtty$4 = _da_[1]; /*<>*/ return [0, [23, [9, pad_opt$2, sub_fmtty$4], fmt$22], fmtty$21]; @@ -16738,7 +16782,7 @@ sub_fmtty_rest$17 = sub_fmtty[3], sub2_fmtty$2 = sub_fmtty[2], sub1_fmtty$0 = sub_fmtty[1], - /*<>*/ _c8_ = + /*<>*/ _c9_ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty)]; @@ -16747,11 +16791,11 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty$0)], - _c8_)) + _c9_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ /*<>*/ var - _c9_ = + _c__ = [0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$1)]; @@ -16760,7 +16804,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$2)], - _c9_)) + _c__)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Type_mismatch, 1); /*<>*/ var @@ -16852,11 +16896,11 @@ /*<>*/ } function recast(fmt, fmtty){ /*<>*/ /*<>*/ var - _c7_ = symm(fmtty); + _c8_ = symm(fmtty); /*<>*/ return type_format (fmt, /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _c7_)); + (CamlinternalFormatBasics[2], _c8_)); /*<>*/ } function fix_padding(padty, width, str){ /*<>*/ var @@ -16866,10 +16910,10 @@ /*<>*/ caml_call1(Stdlib[18], width); if(width$0 <= len) /*<>*/ return str; /*<>*/ var - _c6_ = 2 === padty$0 ? 48 : 32, + _c7_ = 2 === padty$0 ? 48 : 32, /*<>*/ res = /*<>*/ caml_call2 - (Stdlib_Bytes[1], width$0, _c6_); + (Stdlib_Bytes[1], width$0, _c7_); /*<>*/ switch(padty$0){ case 0: /*<>*/ /*<>*/ caml_call5 @@ -17061,16 +17105,16 @@ /*<>*/ return s; /*<>*/ var /*<>*/ n = [0, 0], - _c1_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c0_ = 0; - if(_c1_ >= 0){ - var i$0 = _c0_; + _c2_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c1_ = 0; + if(_c2_ >= 0){ + var i$0 = _c1_; for(;;){ if(9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) n[1]++; /*<>*/ /*<>*/ var - _c5_ = i$0 + 1 | 0; - if(_c1_ === i$0) break; - var i$0 = _c5_; + _c6_ = i$0 + 1 | 0; + if(_c2_ === i$0) break; + var i$0 = _c6_; } } /*<>*/ var @@ -17083,15 +17127,15 @@ /*<>*/ /*<>*/ caml_bytes_set (buf, pos[1], c); pos[1]++; - return 0; + return; /*<>*/ } /*<>*/ var /*<>*/ left = [0, ((digits - 1 | 0) % 3 | 0) + 1 | 0], - _c3_ = caml_ml_string_length(s) - 1 | 0, - /*<>*/ _c2_ = 0; - if(_c3_ >= 0){ - var i = _c2_; + _c4_ = caml_ml_string_length(s) - 1 | 0, + /*<>*/ _c3_ = 0; + if(_c4_ >= 0){ + var i = _c3_; for(;;){ var c = caml_string_unsafe_get(s, i); if(9 < c - 48 >>> 0) @@ -17105,9 +17149,9 @@ /*<>*/ put(c); } /*<>*/ /*<>*/ var - _c4_ = i + 1 | 0; - if(_c3_ === i) break; - var i = _c4_; + _c5_ = i + 1 | 0; + if(_c4_ === i) break; + var i = _c5_; } } /*<>*/ return /*<>*/ caml_call1 @@ -17116,139 +17160,139 @@ function convert_int(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cZ_ = cst_d$0; break; + var _c0_ = cst_d$0; break; case 2: - var _cZ_ = cst_d$1; break; + var _c0_ = cst_d$1; break; case 4: - var _cZ_ = cst_i$1; break; + var _c0_ = cst_i$1; break; case 5: - var _cZ_ = cst_i$2; break; + var _c0_ = cst_i$2; break; case 6: - var _cZ_ = cst_x; break; + var _c0_ = cst_x; break; case 7: - var _cZ_ = cst_x$0; break; + var _c0_ = cst_x$0; break; case 8: - var _cZ_ = cst_X; break; + var _c0_ = cst_X; break; case 9: - var _cZ_ = cst_X$0; break; + var _c0_ = cst_X$0; break; case 10: - var _cZ_ = cst_o; break; + var _c0_ = cst_o; break; case 11: - var _cZ_ = cst_o$0; break; + var _c0_ = cst_o$0; break; case 0: case 13: - var _cZ_ = cst_d; break; + var _c0_ = cst_d; break; case 3: case 14: - var _cZ_ = cst_i$0; break; - default: var _cZ_ = cst_u; + var _c0_ = cst_i$0; break; + default: var _c0_ = cst_u; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cZ_, n)); + /*<>*/ caml_format_int(_c0_, n)); /*<>*/ } function convert_int32(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cY_ = cst_ld$0; break; + var _cZ_ = cst_ld$0; break; case 2: - var _cY_ = cst_ld$1; break; + var _cZ_ = cst_ld$1; break; case 4: - var _cY_ = cst_li$1; break; + var _cZ_ = cst_li$1; break; case 5: - var _cY_ = cst_li$2; break; + var _cZ_ = cst_li$2; break; case 6: - var _cY_ = cst_lx; break; + var _cZ_ = cst_lx; break; case 7: - var _cY_ = cst_lx$0; break; + var _cZ_ = cst_lx$0; break; case 8: - var _cY_ = cst_lX; break; + var _cZ_ = cst_lX; break; case 9: - var _cY_ = cst_lX$0; break; + var _cZ_ = cst_lX$0; break; case 10: - var _cY_ = cst_lo; break; + var _cZ_ = cst_lo; break; case 11: - var _cY_ = cst_lo$0; break; + var _cZ_ = cst_lo$0; break; case 0: case 13: - var _cY_ = cst_ld; break; + var _cZ_ = cst_ld; break; case 3: case 14: - var _cY_ = cst_li$0; break; - default: var _cY_ = cst_lu; + var _cZ_ = cst_li$0; break; + default: var _cZ_ = cst_lu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cY_, n)); + /*<>*/ caml_format_int(_cZ_, n)); /*<>*/ } function convert_nativeint(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cX_ = cst_nd$0; break; + var _cY_ = cst_nd$0; break; case 2: - var _cX_ = cst_nd$1; break; + var _cY_ = cst_nd$1; break; case 4: - var _cX_ = cst_ni$1; break; + var _cY_ = cst_ni$1; break; case 5: - var _cX_ = cst_ni$2; break; + var _cY_ = cst_ni$2; break; case 6: - var _cX_ = cst_nx; break; + var _cY_ = cst_nx; break; case 7: - var _cX_ = cst_nx$0; break; + var _cY_ = cst_nx$0; break; case 8: - var _cX_ = cst_nX; break; + var _cY_ = cst_nX; break; case 9: - var _cX_ = cst_nX$0; break; + var _cY_ = cst_nX$0; break; case 10: - var _cX_ = cst_no; break; + var _cY_ = cst_no; break; case 11: - var _cX_ = cst_no$0; break; + var _cY_ = cst_no$0; break; case 0: case 13: - var _cX_ = cst_nd; break; + var _cY_ = cst_nd; break; case 3: case 14: - var _cX_ = cst_ni$0; break; - default: var _cX_ = cst_nu; + var _cY_ = cst_ni$0; break; + default: var _cY_ = cst_nu; } /*<>*/ return transform_int_alt (iconv, - /*<>*/ caml_format_int(_cX_, n)); + /*<>*/ caml_format_int(_cY_, n)); /*<>*/ } function convert_int64(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cW_ = cst_Ld$0; break; + var _cX_ = cst_Ld$0; break; case 2: - var _cW_ = cst_Ld$1; break; + var _cX_ = cst_Ld$1; break; case 4: - var _cW_ = cst_Li$1; break; + var _cX_ = cst_Li$1; break; case 5: - var _cW_ = cst_Li$2; break; + var _cX_ = cst_Li$2; break; case 6: - var _cW_ = cst_Lx; break; + var _cX_ = cst_Lx; break; case 7: - var _cW_ = cst_Lx$0; break; + var _cX_ = cst_Lx$0; break; case 8: - var _cW_ = cst_LX; break; + var _cX_ = cst_LX; break; case 9: - var _cW_ = cst_LX$0; break; + var _cX_ = cst_LX$0; break; case 10: - var _cW_ = cst_Lo; break; + var _cX_ = cst_Lo; break; case 11: - var _cW_ = cst_Lo$0; break; + var _cX_ = cst_Lo$0; break; case 0: case 13: - var _cW_ = cst_Ld; break; + var _cX_ = cst_Ld; break; case 3: case 14: - var _cW_ = cst_Li$0; break; - default: var _cW_ = cst_Lu; + var _cX_ = cst_Li$0; break; + default: var _cX_ = cst_Lu; } /*<>*/ return transform_int_alt (iconv, /*<>*/ runtime.caml_int64_format - (_cW_, n)); + (_cX_, n)); /*<>*/ } function convert_float(fconv, prec, x){ function hex(param){ @@ -17280,41 +17324,41 @@ i = 0; /*<>*/ for(;;){ if(i === len) - var _cT_ = 0; + var _cU_ = 0; else{ /*<>*/ /*<>*/ var - _cS_ = + _cT_ = /*<>*/ caml_string_get(str, i) - 46 | 0; a: { - if(23 < _cS_ >>> 0){ - if(55 === _cS_) break a; + if(23 < _cT_ >>> 0){ + if(55 === _cT_) break a; } - else if(21 < _cS_ - 1 >>> 0) break a; + else if(21 < _cT_ - 1 >>> 0) break a; /*<>*/ var /*<>*/ i$0 = i + 1 | 0, i = i$0; continue; } - var _cT_ = 1; + var _cU_ = 1; } /*<>*/ /*<>*/ var - _cU_ = - _cT_ + _cV_ = + _cU_ ? str : /*<>*/ caml_call2 (Stdlib[28], str, cst$17); - /*<>*/ return caml_special_val(_cU_); + /*<>*/ return caml_special_val(_cV_); } case 6: /*<>*/ return hex(0); case 7: /*<>*/ /*<>*/ var - _cV_ = hex(0); + _cW_ = hex(0); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_String[26], _cV_); + (Stdlib_String[26], _cW_); case 8: /*<>*/ return caml_special_val(hex(0)); default: @@ -17699,12 +17743,12 @@ /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _cR_ = recast(fmt, fmtty); + /*<>*/ _cS_ = recast(fmt, fmtty); /*<>*/ return make_printf (k$0, acc$0, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _cR_, rest$13)); /*<>*/ }; + (CamlinternalFormatBasics[3], _cS_, rest$13)); /*<>*/ }; case 15: var rest$14 = fmt$0[1]; /*<>*/ return function(f, x){ @@ -17731,11 +17775,11 @@ fmt$0 = rest$16; break; case 18: - var _cP_ = fmt$0[1]; - if(0 === _cP_[0]) + var _cQ_ = fmt$0[1]; + if(0 === _cQ_[0]) var rest$17 = fmt$0[2], - fmt$1 = _cP_[1][1], + fmt$1 = _cQ_[1][1], k$3 = function(acc, k, rest){ function k$0(kacc){ @@ -17751,7 +17795,7 @@ else var rest$18 = fmt$0[2], - fmt$2 = _cP_[1][1], + fmt$2 = _cQ_[1][1], k$4 = function(acc, k, rest){ function k$0(kacc){ @@ -17807,14 +17851,14 @@ rest$23 = fmt$0[3], f = fmt$0[2], arity = fmt$0[1], - /*<>*/ _cQ_ = + /*<>*/ _cR_ = /*<>*/ caml_call1(f, 0); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cQ_]); + (make_custom$0, [0, k$0, acc$0, rest$23, arity, _cR_]); var counter$0 = counter + 1 | 0; /*<>*/ return make_custom$0 - (counter$0, k$0, acc$0, rest$23, arity, _cQ_); + (counter$0, k$0, acc$0, rest$23, arity, _cR_); } } /*<>*/ } @@ -17997,7 +18041,7 @@ fmt); /*<>*/ }; case 10: var rest$9 = fmtty[1]; - /*<>*/ return function(param, _cO_){ + /*<>*/ return function(param, _cP_){ /*<>*/ return make_from_fmtty (k, acc, rest$9, fmt); /*<>*/ }; case 11: @@ -18026,13 +18070,13 @@ /*<>*/ } function make_invalid_arg(counter, k, acc, fmt){ /*<>*/ /*<>*/ var - _cN_ = [8, acc, cst_Printf_bad_conversion$0]; + _cO_ = [8, acc, cst_Printf_bad_conversion$0]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cN_, fmt]); + (make_printf$0, [0, k, _cO_, fmt]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cN_, fmt); + (counter$0, k, _cO_, fmt); /*<>*/ } function make_custom$0(counter, k, acc, rest, arity, f){ /*<>*/ if(arity){ @@ -18046,13 +18090,13 @@ /*<>*/ caml_call1(f, x)); /*<>*/ }; } /*<>*/ /*<>*/ var - _cM_ = [4, acc, f]; + _cN_ = [4, acc, f]; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (make_printf$0, [0, k, _cM_, rest]); + (make_printf$0, [0, k, _cN_, rest]); var counter$0 = counter + 1 | 0; /*<>*/ return make_printf$0 - (counter$0, k, _cM_, rest); + (counter$0, k, _cN_, rest); /*<>*/ } function make_printf(k, acc, fmt){ /*<>*/ return caml_trampoline(make_printf$0(0, k, acc, fmt)); @@ -18073,68 +18117,68 @@ /*<>*/ if(typeof pad === "number"){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cl_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cL_){ - /*<>*/ return _cl_;}; + _cm_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cM_){ + /*<>*/ return _cm_;}; } if(prec){ /*<>*/ var - /*<>*/ _ci_ = make_iprintf(k, o, fmt), - /*<>*/ _cj_ = - function(_cK_){ /*<>*/ return _ci_;}; - /*<>*/ return function(_cJ_){ - /*<>*/ return _cj_;}; + /*<>*/ _cj_ = make_iprintf(k, o, fmt), + /*<>*/ _ck_ = + function(_cL_){ /*<>*/ return _cj_;}; + /*<>*/ return function(_cK_){ + /*<>*/ return _ck_;}; } /*<>*/ /*<>*/ var - _ck_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cI_){ - /*<>*/ return _ck_;}; + _cl_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cJ_){ + /*<>*/ return _cl_;}; } if(0 === pad[0]){ if(typeof prec !== "number"){ /*<>*/ /*<>*/ var - _cp_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cH_){ - /*<>*/ return _cp_;}; + _cq_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cI_){ + /*<>*/ return _cq_;}; } if(prec){ /*<>*/ var - /*<>*/ _cm_ = make_iprintf(k, o, fmt), - /*<>*/ _cn_ = - function(_cG_){ /*<>*/ return _cm_;}; - /*<>*/ return function(_cF_){ - /*<>*/ return _cn_;}; + /*<>*/ _cn_ = make_iprintf(k, o, fmt), + /*<>*/ _co_ = + function(_cH_){ /*<>*/ return _cn_;}; + /*<>*/ return function(_cG_){ + /*<>*/ return _co_;}; } /*<>*/ /*<>*/ var - _co_ = make_iprintf(k, o, fmt); - /*<>*/ return function(_cE_){ - /*<>*/ return _co_;}; + _cp_ = make_iprintf(k, o, fmt); + /*<>*/ return function(_cF_){ + /*<>*/ return _cp_;}; } if(typeof prec !== "number"){ /*<>*/ var - /*<>*/ _cv_ = make_iprintf(k, o, fmt), - /*<>*/ _cw_ = - function(_cD_){ /*<>*/ return _cv_;}; - /*<>*/ return function(_cC_){ - /*<>*/ return _cw_;}; + /*<>*/ _cw_ = make_iprintf(k, o, fmt), + /*<>*/ _cx_ = + function(_cE_){ /*<>*/ return _cw_;}; + /*<>*/ return function(_cD_){ + /*<>*/ return _cx_;}; } if(prec){ /*<>*/ var - /*<>*/ _cq_ = make_iprintf(k, o, fmt), - /*<>*/ _cr_ = - function(_cB_){ /*<>*/ return _cq_;}, - /*<>*/ _cs_ = - function(_cA_){ /*<>*/ return _cr_;}; - /*<>*/ return function(_cz_){ - /*<>*/ return _cs_;}; + /*<>*/ _cr_ = make_iprintf(k, o, fmt), + /*<>*/ _cs_ = + function(_cC_){ /*<>*/ return _cr_;}, + /*<>*/ _ct_ = + function(_cB_){ /*<>*/ return _cs_;}; + /*<>*/ return function(_cA_){ + /*<>*/ return _ct_;}; } /*<>*/ /*<>*/ var - _ct_ = make_iprintf(k, o, fmt); - /*<>*/ function _cu_(_cy_){ - /*<>*/ return _ct_; + _cu_ = make_iprintf(k, o, fmt); + /*<>*/ function _cv_(_cz_){ + /*<>*/ return _cu_; } - /*<>*/ return function(_cx_){ - /*<>*/ return _cu_;}; + /*<>*/ return function(_cy_){ + /*<>*/ return _cv_;}; /*<>*/ } function make_iprintf$0(counter, k, o, fmt){ /*<>*/ var k$0 = k, fmt$0 = fmt; @@ -18146,69 +18190,69 @@ case 0: /*<>*/ var rest = fmt$0[1], - /*<>*/ _by_ = + /*<>*/ _bz_ = make_iprintf(k$0, o, rest); - /*<>*/ return function(_ch_){ - /*<>*/ return _by_;}; + /*<>*/ return function(_ci_){ + /*<>*/ return _bz_;}; case 1: /*<>*/ var rest$0 = fmt$0[1], - /*<>*/ _bz_ = + /*<>*/ _bA_ = make_iprintf(k$0, o, rest$0); - /*<>*/ return function(_cg_){ - /*<>*/ return _bz_;}; + /*<>*/ return function(_ch_){ + /*<>*/ return _bA_;}; case 2: - var _bA_ = fmt$0[1]; - if(typeof _bA_ === "number"){ + var _bB_ = fmt$0[1]; + if(typeof _bB_ === "number"){ /*<>*/ var rest$1 = fmt$0[2], - /*<>*/ _bB_ = + /*<>*/ _bC_ = make_iprintf(k$0, o, rest$1); - /*<>*/ return function(_cf_){ - /*<>*/ return _bB_;}; + /*<>*/ return function(_cg_){ + /*<>*/ return _bC_;}; } - if(0 === _bA_[0]){ + if(0 === _bB_[0]){ /*<>*/ var rest$2 = fmt$0[2], - /*<>*/ _bC_ = + /*<>*/ _bD_ = make_iprintf(k$0, o, rest$2); - /*<>*/ return function(_ce_){ - /*<>*/ return _bC_;}; + /*<>*/ return function(_cf_){ + /*<>*/ return _bD_;}; } /*<>*/ var rest$3 = fmt$0[2], - /*<>*/ _bD_ = + /*<>*/ _bE_ = make_iprintf(k$0, o, rest$3), - /*<>*/ _bE_ = - function(_cd_){ /*<>*/ return _bD_;}; - /*<>*/ return function(_cc_){ - /*<>*/ return _bE_;}; + /*<>*/ _bF_ = + function(_ce_){ /*<>*/ return _bE_;}; + /*<>*/ return function(_cd_){ + /*<>*/ return _bF_;}; case 3: - var _bF_ = fmt$0[1]; - if(typeof _bF_ === "number"){ + var _bG_ = fmt$0[1]; + if(typeof _bG_ === "number"){ /*<>*/ var rest$4 = fmt$0[2], - /*<>*/ _bG_ = + /*<>*/ _bH_ = make_iprintf(k$0, o, rest$4); - /*<>*/ return function(_cb_){ - /*<>*/ return _bG_;}; + /*<>*/ return function(_cc_){ + /*<>*/ return _bH_;}; } - if(0 === _bF_[0]){ + if(0 === _bG_[0]){ /*<>*/ var rest$5 = fmt$0[2], - /*<>*/ _bH_ = + /*<>*/ _bI_ = make_iprintf(k$0, o, rest$5); - /*<>*/ return function(_ca_){ - /*<>*/ return _bH_;}; + /*<>*/ return function(_cb_){ + /*<>*/ return _bI_;}; } /*<>*/ var rest$6 = fmt$0[2], - /*<>*/ _bI_ = + /*<>*/ _bJ_ = make_iprintf(k$0, o, rest$6), - /*<>*/ _bJ_ = - function(_b$_){ /*<>*/ return _bI_;}; - /*<>*/ return function(_b__){ - /*<>*/ return _bJ_;}; + /*<>*/ _bK_ = + function(_ca_){ /*<>*/ return _bJ_;}; + /*<>*/ return function(_b$_){ + /*<>*/ return _bK_;}; case 4: var rest$7 = fmt$0[4], prec = fmt$0[3], pad = fmt$0[2]; /*<>*/ return fn_of_padding_precision @@ -18230,31 +18274,31 @@ /*<>*/ return fn_of_padding_precision (k$0, o, rest$11, pad$3, prec$3); case 9: - var _bK_ = fmt$0[1]; - if(typeof _bK_ === "number"){ + var _bL_ = fmt$0[1]; + if(typeof _bL_ === "number"){ /*<>*/ var rest$12 = fmt$0[2], - /*<>*/ _bL_ = + /*<>*/ _bM_ = make_iprintf(k$0, o, rest$12); - /*<>*/ return function(_b9_){ - /*<>*/ return _bL_;}; + /*<>*/ return function(_b__){ + /*<>*/ return _bM_;}; } - if(0 === _bK_[0]){ + if(0 === _bL_[0]){ /*<>*/ var rest$13 = fmt$0[2], - /*<>*/ _bM_ = + /*<>*/ _bN_ = make_iprintf(k$0, o, rest$13); - /*<>*/ return function(_b8_){ - /*<>*/ return _bM_;}; + /*<>*/ return function(_b9_){ + /*<>*/ return _bN_;}; } /*<>*/ var rest$14 = fmt$0[2], - /*<>*/ _bN_ = + /*<>*/ _bO_ = make_iprintf(k$0, o, rest$14), - /*<>*/ _bO_ = - function(_b7_){ /*<>*/ return _bN_;}; - /*<>*/ return function(_b6_){ - /*<>*/ return _bO_;}; + /*<>*/ _bP_ = + function(_b8_){ /*<>*/ return _bO_;}; + /*<>*/ return function(_b7_){ + /*<>*/ return _bP_;}; case 10: var rest$15 = fmt$0[1], fmt$0 = rest$15; break; case 11: @@ -18264,45 +18308,45 @@ case 13: /*<>*/ var rest$18 = fmt$0[3], - /*<>*/ _bP_ = + /*<>*/ _bQ_ = make_iprintf(k$0, o, rest$18); - /*<>*/ return function(_b5_){ - /*<>*/ return _bP_;}; + /*<>*/ return function(_b6_){ + /*<>*/ return _bQ_;}; case 14: var rest$19 = fmt$0[3], fmtty = fmt$0[2]; /*<>*/ return function(param){ /*<>*/ var fmt = param[1], - /*<>*/ _b4_ = recast(fmt, fmtty); + /*<>*/ _b5_ = recast(fmt, fmtty); /*<>*/ return make_iprintf (k$0, o, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _b4_, rest$19)); /*<>*/ }; + (CamlinternalFormatBasics[3], _b5_, rest$19)); /*<>*/ }; case 15: /*<>*/ var rest$20 = fmt$0[1], - /*<>*/ _bQ_ = + /*<>*/ _bR_ = make_iprintf(k$0, o, rest$20), - /*<>*/ _bR_ = - function(_b3_){ /*<>*/ return _bQ_;}; - /*<>*/ return function(_b2_){ - /*<>*/ return _bR_;}; + /*<>*/ _bS_ = + function(_b4_){ /*<>*/ return _bR_;}; + /*<>*/ return function(_b3_){ + /*<>*/ return _bS_;}; case 16: /*<>*/ var rest$21 = fmt$0[1], - /*<>*/ _bS_ = + /*<>*/ _bT_ = make_iprintf(k$0, o, rest$21); - /*<>*/ return function(_b1_){ - /*<>*/ return _bS_;}; + /*<>*/ return function(_b2_){ + /*<>*/ return _bT_;}; case 17: var rest$22 = fmt$0[2], fmt$0 = rest$22; break; case 18: - var _bT_ = fmt$0[1]; - if(0 === _bT_[0]) + var _bU_ = fmt$0[1]; + if(0 === _bU_[0]) var rest$23 = fmt$0[2], - fmt$1 = _bT_[1][1], + fmt$1 = _bU_[1][1], k$3 = function(k, rest){ function k$0(koc){ @@ -18317,7 +18361,7 @@ else var rest$24 = fmt$0[2], - fmt$2 = _bT_[1][1], + fmt$2 = _bU_[1][1], k$4 = function(k, rest){ function k$0(koc){ @@ -18336,32 +18380,32 @@ case 20: /*<>*/ var rest$25 = fmt$0[3], - /*<>*/ _bU_ = + /*<>*/ _bV_ = make_iprintf(k$0, o, rest$25); - /*<>*/ return function(_b0_){ - /*<>*/ return _bU_;}; + /*<>*/ return function(_b1_){ + /*<>*/ return _bV_;}; case 21: /*<>*/ var rest$26 = fmt$0[2], - /*<>*/ _bV_ = + /*<>*/ _bW_ = make_iprintf(k$0, o, rest$26); - /*<>*/ return function(_bZ_){ - /*<>*/ return _bV_;}; + /*<>*/ return function(_b0_){ + /*<>*/ return _bW_;}; case 22: /*<>*/ var rest$27 = fmt$0[1], - /*<>*/ _bW_ = + /*<>*/ _bX_ = make_iprintf(k$0, o, rest$27); - /*<>*/ return function(_bY_){ - /*<>*/ return _bW_;}; + /*<>*/ return function(_bZ_){ + /*<>*/ return _bX_;}; case 23: - var rest$28 = fmt$0[2], ign = fmt$0[1], _bX_ = 0; + var rest$28 = fmt$0[2], ign = fmt$0[1], _bY_ = 0; /*<>*/ return make_ignored_param (function(param){ /*<>*/ return caml_call1 (k$0, o); /*<>*/ }, - _bX_, + _bY_, ign, rest$28); default: @@ -18379,10 +18423,10 @@ /*<>*/ if(param){ /*<>*/ var arity = param[1], - /*<>*/ _bw_ = + /*<>*/ _bx_ = fn_of_custom_arity(k, o, fmt, arity); - /*<>*/ return function(_bx_){ - /*<>*/ return _bw_;}; + /*<>*/ return function(_by_){ + /*<>*/ return _bx_;}; } /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -18553,9 +18597,9 @@ var f = acc$0[2], p$3 = acc$0[1]; /*<>*/ strput_acc(b, p$3); /*<>*/ /*<>*/ var - _bv_ = /*<>*/ caml_call1(f, 0); + _bw_ = /*<>*/ caml_call1(f, 0); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, _bv_); + (Stdlib_Buffer[16], b, _bw_); case 7: var acc$3 = acc$0[1], acc$0 = acc$3; break; case 8: @@ -18586,11 +18630,11 @@ function k(acc){ /*<>*/ strput_acc(buf, acc); /*<>*/ /*<>*/ var - _bu_ = + _bv_ = /*<>*/ caml_call1 (Stdlib_Buffer[2], buf); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _bu_); + (Stdlib[2], _bv_); /*<>*/ } /*<>*/ return make_printf(k, 0, fmt); } @@ -18665,15 +18709,15 @@ else /*<>*/ try{ /*<>*/ var - /*<>*/ _bs_ = + /*<>*/ _bt_ = /*<>*/ runtime.caml_int_of_string ( /*<>*/ caml_call3 (Stdlib_String[16], str, nstart, nend - nstart | 0)), - indent = _bs_; + indent = _bt_; } - catch(_bt_){ - var _br_ = caml_wrap_exception(_bt_); - if(_br_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_br_, 0); + catch(_bu_){ + var _bs_ = caml_wrap_exception(_bu_); + if(_bs_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_bs_, 0); var indent = invalid_box(0); } /*<>*/ /*<>*/ var @@ -18713,9 +18757,9 @@ /*<>*/ } function make_padprec_fmt_ebb(pad, prec, fmt){ /*<>*/ if(typeof prec === "number") - var match = prec ? [0, 1, fmt] : [0, 0, fmt]; + var match = prec ? [0, 1] : [0, 0]; else - var p = prec[1], match = [0, [0, p], fmt]; + var p = prec[1], match = [0, [0, p]]; var prec$0 = match[1]; /*<>*/ if(typeof pad === "number") /*<>*/ return [0, 0, prec$0, fmt]; @@ -18737,8 +18781,9 @@ /*<>*/ } /*<>*/ function unexpected_end_of_format (end_ind){ - /*<>*/ return invalid_format_message - (end_ind, cst_unexpected_end_of_format); + /*<>*/ invalid_format_message + (end_ind, cst_unexpected_end_of_format); + /*<>*/ return; /*<>*/ } function invalid_format_without(str_ind, c, s){ /*<>*/ return /*<>*/ caml_call4 @@ -18876,9 +18921,9 @@ b: try{ var - _bg_ = str_ind$3 === end_ind ? 1 : 0, - _bh_ = - _bg_ + _bh_ = str_ind$3 === end_ind ? 1 : 0, + _bi_ = + _bh_ || (60 !== @@ -18886,7 +18931,7 @@ (str, str_ind$3) ? 1 : 0); - if(_bh_) + if(_bi_) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -18925,12 +18970,12 @@ str, str_ind$3 - 2 | 0, (str_ind_3 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bi_ = - [0, s, width, 0], /*<>*/ _bj_ = + [0, s, width, 0], + /*<>*/ _bk_ = str_ind_3 + 1 | 0, - formatting_lit$0 = _bi_, - next_ind = _bj_; + formatting_lit$0 = _bj_, + next_ind = _bk_; break b; } } @@ -18956,21 +19001,21 @@ str, str_ind$3 - 2 | 0, (str_ind_5 - str_ind$3 | 0) + 3 | 0), - /*<>*/ _bk_ = - [0, s$0, width, offset], /*<>*/ _bl_ = + [0, s$0, width, offset], + /*<>*/ _bm_ = str_ind_5 + 1 | 0, - formatting_lit$0 = _bk_, - next_ind = _bl_; + formatting_lit$0 = _bl_, + next_ind = _bm_; break b; } /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); } - catch(_bq_){ - var _bf_ = caml_wrap_exception(_bq_); - if(_bf_ !== Stdlib[8] && _bf_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bf_, 0); + catch(_br_){ + var _bg_ = caml_wrap_exception(_br_); + if(_bg_ !== Stdlib[8] && _bg_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bg_, 0); var formatting_lit$0 = formatting_lit, next_ind = str_ind$3; } var @@ -18994,7 +19039,7 @@ if(58 > match$6) break c; } else if(45 === match$6) break c; - var _bo_ = 0; + var _bp_ = 0; break b; } /*<>*/ var @@ -19018,28 +19063,28 @@ str, str_ind$4 - 2 | 0, (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), - _bo_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; + _bp_ = [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; } - var _bn_ = _bo_; + var _bo_ = _bp_; } - catch(_bp_){ - var _bm_ = caml_wrap_exception(_bp_); - if(_bm_ !== Stdlib[8] && _bm_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bm_, 0); - var _bn_ = 0; + catch(_bq_){ + var _bn_ = caml_wrap_exception(_bq_); + if(_bn_ !== Stdlib[8] && _bn_[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(_bn_, 0); + var _bo_ = 0; } - if(_bn_) + if(_bo_) var - match$5 = _bn_[1], + match$5 = _bo_[1], formatting_lit$1 = match$5[2], next_ind$0 = match$5[1], fmt_rest$13 = parse(next_ind$0, end_ind)[1], - _be_ = [0, [17, formatting_lit$1, fmt_rest$13]]; + _bf_ = [0, [17, formatting_lit$1, fmt_rest$13]]; else var fmt_rest$14 = parse(str_ind$4, end_ind)[1], - _be_ = [0, [17, _Q_, fmt_rest$14]]; - var match$0 = _be_; + _bf_ = [0, [17, _Q_, fmt_rest$14]]; + var match$0 = _bf_; break a; case 31: var @@ -19197,29 +19242,29 @@ /*<>*/ var /*<>*/ ignored$2 = [9, get_pad_opt(95), sub_fmtty], - _aN_ = [0, [23, ignored$2, fmt_rest$7]]; + _aO_ = [0, [23, ignored$2, fmt_rest$7]]; else - var _aN_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; - var fmt_result = _aN_; + var _aO_ = [0, [14, get_pad_opt(40), sub_fmtty, fmt_rest$7]]; + var fmt_result = _aO_; break a; case 44: var fmt_result = parse(str_ind, end_ind); break a; case 67: /*<>*/ var fmt_rest$10 = parse(str_ind, end_ind)[1], - /*<>*/ _aP_ = + /*<>*/ _aQ_ = get_ign(0) ? [0, [23, 1, fmt_rest$10]] : [0, [1, fmt_rest$10]], - fmt_result = _aP_; + fmt_result = _aQ_; break a; case 78: var fmt_rest$14 = parse(str_ind, end_ind)[1], counter$0 = 2; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$6 = [11, counter$0], - _aV_ = [0, [23, ignored$6, fmt_rest$14]]; + _aW_ = [0, [23, ignored$6, fmt_rest$14]]; else - var _aV_ = [0, [21, counter$0, fmt_rest$14]]; - var fmt_result = _aV_; + var _aW_ = [0, [21, counter$0, fmt_rest$14]]; + var fmt_result = _aW_; break a; case 83: /*<>*/ var @@ -19230,15 +19275,15 @@ /*<>*/ var /*<>*/ ignored$7 = [1, get_padprec_opt(95)], - _aW_ = [0, [23, ignored$7, fmt_rest$15]]; + _aX_ = [0, [23, ignored$7, fmt_rest$15]]; else /*<>*/ var /*<>*/ match$5 = make_padding_fmt_ebb(pad$6, fmt_rest$15), fmt_rest$16 = match$5[2], pad$7 = match$5[1], - _aW_ = [0, [3, pad$7, fmt_rest$16]]; - var fmt_result = _aW_; + _aX_ = [0, [3, pad$7, fmt_rest$16]]; + var fmt_result = _aX_; break a; case 91: if(str_ind === end_ind) @@ -19249,8 +19294,9 @@ create_char_set(0), add_char = function(c){ - /*<>*/ return add_in_char_set - (char_set, c); + /*<>*/ add_in_char_set + (char_set, c); + /*<>*/ return; /*<>*/ }, add_range = function(c$0, c){ @@ -19262,12 +19308,12 @@ /*<>*/ caml_call1 (Stdlib[29], i)); /*<>*/ /*<>*/ var - _bd_ = i + 1 | 0; + _be_ = i + 1 | 0; if(c === i) break; - var i = _bd_; + var i = _be_; } } - return 0; + return; /*<>*/ }, fail_single_percent = function(str_ind){ @@ -19289,13 +19335,13 @@ if(93 === c) /*<>*/ return str_ind$0 + 1 | 0; - var _bc_ = str_ind$0 + 1 | 0; + var _bd_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_after_char$0, [0, _bc_, end_ind, c]); + (parse_char_set_after_char$0, [0, _bd_, end_ind, c]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_after_char$0 - (counter$0, _bc_, end_ind, c); + (counter$0, _bd_, end_ind, c); } /*<>*/ add_char(45); var str_ind$1 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$1; @@ -19346,13 +19392,13 @@ /*<>*/ return fail_single_percent (str_ind$2); /*<>*/ add_range(c$0, c$3); - var _ba_ = str_ind$2 + 2 | 0; + var _bb_ = str_ind$2 + 2 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _ba_, end_ind]); + (parse_char_set_content, [0, _bb_, end_ind]); var counter$2 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$2, _ba_, end_ind); + (counter$2, _bb_, end_ind); } if(93 === c$2){ /*<>*/ add_char(c$0); @@ -19361,23 +19407,23 @@ | 0; } /*<>*/ add_range(c$0, c$2); - var _bb_ = str_ind$2 + 1 | 0; + var _bc_ = str_ind$2 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _bb_, end_ind]); + (parse_char_set_content, [0, _bc_, end_ind]); var counter$1 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$1, _bb_, end_ind); + (counter$1, _bc_, end_ind); } if(37 === c$0){ /*<>*/ add_char(c$1); - var _a$_ = str_ind$0 + 1 | 0; + var _ba_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (parse_char_set_content, [0, _a$_, end_ind]); + (parse_char_set_content, [0, _ba_, end_ind]); var counter$0 = counter + 1 | 0; /*<>*/ return parse_char_set_content - (counter$0, _a$_, end_ind); + (counter$0, _ba_, end_ind); } } if(37 === c$0) @@ -19427,10 +19473,10 @@ /*<>*/ var /*<>*/ ignored$9 = [10, get_pad_opt(95), char_set$1], - _a1_ = [0, [23, ignored$9, fmt_rest$19]]; + _a2_ = [0, [23, ignored$9, fmt_rest$19]]; else - var _a1_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; - var fmt_result = _a1_; + var _a2_ = [0, [20, get_pad_opt(91), char_set$1, fmt_rest$19]]; + var fmt_result = _a2_; break a; case 97: var @@ -19450,28 +19496,28 @@ if(match$7){ if(0 === match$7[1]) /*<>*/ var - /*<>*/ _a2_ = + /*<>*/ _a3_ = get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], - _a3_ = _a2_; + _a4_ = _a3_; else var - _a3_ = + _a4_ = legacy_behavior$0 ? char_format(fmt_rest$21) : invalid_format_message (str_ind, cst_non_zero_widths_are_unsupp); - var _a4_ = _a3_; + var _a5_ = _a4_; } else - var _a4_ = char_format(fmt_rest$21); - var fmt_result = _a4_; + var _a5_ = char_format(fmt_rest$21); + var fmt_result = _a5_; break a; case 114: /*<>*/ var fmt_rest$22 = parse(str_ind, end_ind)[1], - /*<>*/ _a5_ = + /*<>*/ _a6_ = get_ign(0) ? [0, [23, 2, fmt_rest$22]] : [0, [19, fmt_rest$22]], - fmt_result = _a5_; + fmt_result = _a6_; break a; case 115: /*<>*/ var @@ -19482,15 +19528,15 @@ /*<>*/ var /*<>*/ ignored$10 = [0, get_padprec_opt(95)], - _a6_ = [0, [23, ignored$10, fmt_rest$23]]; + _a7_ = [0, [23, ignored$10, fmt_rest$23]]; else /*<>*/ var /*<>*/ match$8 = make_padding_fmt_ebb(pad$9, fmt_rest$23), fmt_rest$24 = match$8[2], pad$10 = match$8[1], - _a6_ = [0, [2, pad$10, fmt_rest$24]]; - var fmt_result = _a6_; + _a7_ = [0, [2, pad$10, fmt_rest$24]]; + var fmt_result = _a7_; break a; case 116: var @@ -19509,10 +19555,10 @@ /*<>*/ var /*<>*/ ignored$11 = [8, get_pad_opt(95), sub_fmtty$0], - _a7_ = [0, [23, ignored$11, fmt_rest$26]]; + _a8_ = [0, [23, ignored$11, fmt_rest$26]]; else - var _a7_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; - var fmt_result = _a7_; + var _a8_ = [0, [13, get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; + var fmt_result = _a8_; break a; case 66: case 98: @@ -19524,15 +19570,15 @@ /*<>*/ var /*<>*/ ignored$3 = [7, get_padprec_opt(95)], - _aO_ = [0, [23, ignored$3, fmt_rest$8]]; + _aP_ = [0, [23, ignored$3, fmt_rest$8]]; else /*<>*/ var /*<>*/ match$3 = make_padding_fmt_ebb(pad$3, fmt_rest$8), fmt_rest$9 = match$3[2], pad$4 = match$3[1], - _aO_ = [0, [9, pad$4, fmt_rest$9]]; - var fmt_result = _aO_; + _aP_ = [0, [9, pad$4, fmt_rest$9]]; + var fmt_result = _aP_; break a; case 37: case 64: @@ -19548,22 +19594,22 @@ /*<>*/ symb$0 = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _a8_ = symb$0 - 88 | 0; + /*<>*/ _a9_ = symb$0 - 88 | 0; b: { - if(32 >= _a8_ >>> 0) - switch(_a8_){ + if(32 >= _a9_ >>> 0) + switch(_a9_){ case 0: case 12: case 17: case 23: case 29: case 32: - var _aU_ = 1; break b; + var _aV_ = 1; break b; } - var _aU_ = 0; + var _aV_ = 0; } - /*<>*/ if(_aU_) break; + /*<>*/ if(_aV_) break; } var fmt_rest$13 = parse(str_ind, end_ind)[1]; b: @@ -19584,10 +19630,10 @@ /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$5 = [11, counter], - _aT_ = [0, [23, ignored$5, fmt_rest$13]]; + _aU_ = [0, [23, ignored$5, fmt_rest$13]]; else - var _aT_ = [0, [21, counter, fmt_rest$13]]; - var fmt_result = _aT_; + var _aU_ = [0, [21, counter, fmt_rest$13]]; + var fmt_result = _aU_; break a; case 32: case 35: @@ -19606,26 +19652,26 @@ case 117: case 120: /*<>*/ var - /*<>*/ _aX_ = get_space(0), - /*<>*/ _aY_ = get_hash(0), + /*<>*/ _aY_ = get_space(0), + /*<>*/ _aZ_ = get_hash(0), /*<>*/ iconv$2 = - compute_int_conv(pct_ind, str_ind, get_plus(0), _aY_, _aX_, symb), + compute_int_conv(pct_ind, str_ind, get_plus(0), _aZ_, _aY_, symb), fmt_rest$17 = parse(str_ind, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$8 = [2, iconv$2, get_pad_opt(95)], - _aZ_ = [0, [23, ignored$8, fmt_rest$17]]; + _a0_ = [0, [23, ignored$8, fmt_rest$17]]; else /*<>*/ var - /*<>*/ _a0_ = get_prec(0), + /*<>*/ _a1_ = get_prec(0), /*<>*/ match$6 = - make_padprec_fmt_ebb(get_int_pad(0), _a0_, fmt_rest$17), + make_padprec_fmt_ebb(get_int_pad(0), _a1_, fmt_rest$17), fmt_rest$18 = match$6[3], prec$4 = match$6[2], pad$8 = match$6[1], - _aZ_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; - var fmt_result = _aZ_; + _a0_ = [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; + var fmt_result = _a0_; break a; case 69: case 70: @@ -19655,28 +19701,28 @@ if(3 >= switcher >>> 0){ switch(switcher){ case 0: - var _a9_ = 1; break; + var _a__ = 1; break; case 1: - var _a9_ = 0; break; + var _a__ = 0; break; case 2: - var _a9_ = 3; break; - default: var _a9_ = 6; + var _a__ = 3; break; + default: var _a__ = 6; } - var kind = _a9_; + var kind = _a__; break b; } } else if(69 <= symb){ switch(symb - 69 | 0){ case 0: - var _a__ = 2; break; + var _a$_ = 2; break; case 1: break c; case 2: - var _a__ = 4; break; - default: var _a__ = 7; + var _a$_ = 4; break; + default: var _a$_ = 7; } - var kind = _a__; + var kind = _a$_; break b; } if(hash$1){ @@ -19694,25 +19740,25 @@ match = get_prec(0); if(typeof match === "number") var - _aQ_ = + _aR_ = match ? incompatible_flag(pct_ind, str_ind, 95, cst$26) : 0; else - var ndec = match[1], _aQ_ = [0, ndec]; + var ndec = match[1], _aR_ = [0, ndec]; /*<>*/ var /*<>*/ ignored$4 = - [6, get_pad_opt(95), _aQ_], - _aR_ = [0, [23, ignored$4, fmt_rest$11]]; + [6, get_pad_opt(95), _aR_], + _aS_ = [0, [23, ignored$4, fmt_rest$11]]; } else /*<>*/ var - /*<>*/ _aS_ = get_prec(0), + /*<>*/ _aT_ = get_prec(0), /*<>*/ match$4 = - make_padprec_fmt_ebb(get_pad(0), _aS_, fmt_rest$11), + make_padprec_fmt_ebb(get_pad(0), _aT_, fmt_rest$11), fmt_rest$12 = match$4[3], prec$3 = match$4[2], pad$5 = match$4[1], - _aR_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; - var fmt_result = _aR_; + _aS_ = [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; + var fmt_result = _aS_; break a; } b: @@ -19721,89 +19767,89 @@ switch(symb - 108 | 0){ case 0: /*<>*/ var - /*<>*/ _ax_ = + /*<>*/ _ay_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _ay_ = get_space(0), - /*<>*/ _az_ = get_hash(0), + /*<>*/ _az_ = get_space(0), + /*<>*/ _aA_ = get_hash(0), /*<>*/ iconv = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _az_, _ay_, _ax_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aA_, _az_, _ay_), fmt_rest = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored = [3, iconv, get_pad_opt(95)], - _aA_ = [0, [23, ignored, fmt_rest]]; + _aB_ = [0, [23, ignored, fmt_rest]]; else /*<>*/ var - /*<>*/ _aC_ = get_prec(0), + /*<>*/ _aD_ = get_prec(0), /*<>*/ match$0 = - make_padprec_fmt_ebb(get_int_pad(0), _aC_, fmt_rest), + make_padprec_fmt_ebb(get_int_pad(0), _aD_, fmt_rest), fmt_rest$0 = match$0[3], prec$0 = match$0[2], pad$0 = match$0[1], - _aA_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; - var _aB_ = _aA_; + _aB_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; + var _aC_ = _aB_; break; case 1: break b; default: /*<>*/ var - /*<>*/ _aD_ = + /*<>*/ _aE_ = /*<>*/ caml_string_get (str, str_ind), - /*<>*/ _aE_ = get_space(0), - /*<>*/ _aF_ = get_hash(0), + /*<>*/ _aF_ = get_space(0), + /*<>*/ _aG_ = get_hash(0), /*<>*/ iconv$0 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aF_, _aE_, _aD_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aG_, _aF_, _aE_), fmt_rest$1 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$0 = [4, iconv$0, get_pad_opt(95)], - _aG_ = [0, [23, ignored$0, fmt_rest$1]]; + _aH_ = [0, [23, ignored$0, fmt_rest$1]]; else /*<>*/ var - /*<>*/ _aH_ = get_prec(0), + /*<>*/ _aI_ = get_prec(0), /*<>*/ match$1 = - make_padprec_fmt_ebb(get_int_pad(0), _aH_, fmt_rest$1), + make_padprec_fmt_ebb(get_int_pad(0), _aI_, fmt_rest$1), fmt_rest$2 = match$1[3], prec$1 = match$1[2], pad$1 = match$1[1], - _aG_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; - var _aB_ = _aG_; + _aH_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; + var _aC_ = _aH_; } - var fmt_result = _aB_; + var fmt_result = _aC_; break a; } } else if(76 === symb){ /*<>*/ var - /*<>*/ _aI_ = + /*<>*/ _aJ_ = /*<>*/ caml_string_get(str, str_ind), - /*<>*/ _aJ_ = get_space(0), - /*<>*/ _aK_ = get_hash(0), + /*<>*/ _aK_ = get_space(0), + /*<>*/ _aL_ = get_hash(0), /*<>*/ iconv$1 = compute_int_conv - (pct_ind, str_ind + 1 | 0, get_plus(0), _aK_, _aJ_, _aI_), + (pct_ind, str_ind + 1 | 0, get_plus(0), _aL_, _aK_, _aJ_), fmt_rest$3 = parse(str_ind + 1 | 0, end_ind)[1]; /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$1 = [5, iconv$1, get_pad_opt(95)], - _aL_ = [0, [23, ignored$1, fmt_rest$3]]; + _aM_ = [0, [23, ignored$1, fmt_rest$3]]; else /*<>*/ var - /*<>*/ _aM_ = get_prec(0), + /*<>*/ _aN_ = get_prec(0), /*<>*/ match$2 = - make_padprec_fmt_ebb(get_int_pad(0), _aM_, fmt_rest$3), + make_padprec_fmt_ebb(get_int_pad(0), _aN_, fmt_rest$3), fmt_rest$4 = match$2[3], prec$2 = match$2[2], pad$2 = match$2[1], - _aL_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; - var fmt_result = _aL_; + _aM_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; + var fmt_result = _aM_; break a; } var @@ -19812,46 +19858,46 @@ (failwith_message(_J_), str, str_ind - 1 | 0, symb); } if(1 - legacy_behavior$0){ - var _ao_ = 1 - plus_used[1], plus$0 = _ao_ ? plus : _ao_; + var _ap_ = 1 - plus_used[1], plus$0 = _ap_ ? plus : _ap_; if(plus$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$27); - var _ap_ = 1 - hash_used[1], hash$0 = _ap_ ? hash : _ap_; + var _aq_ = 1 - hash_used[1], hash$0 = _aq_ ? hash : _aq_; if(hash$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$28); - var _aq_ = 1 - space_used[1], space$0 = _aq_ ? space : _aq_; + var _ar_ = 1 - space_used[1], space$0 = _ar_ ? space : _ar_; if(space$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$29); var - _ar_ = 1 - pad_used[1], - _as_ = - _ar_ + _as_ = 1 - pad_used[1], + _at_ = + _as_ ? /*<>*/ caml_notequal ([0, pad], _K_) - : _ar_; - /*<>*/ if(_as_) + : _as_; + /*<>*/ if(_at_) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst_padding$0); var - _at_ = 1 - prec_used[1], - _au_ = - _at_ + _au_ = 1 - prec_used[1], + _av_ = + _au_ ? /*<>*/ caml_notequal ([0, prec], _L_) - : _at_; - /*<>*/ if(_au_){ - var _av_ = ign ? 95 : symb; + : _au_; + /*<>*/ if(_av_){ + var _aw_ = ign ? 95 : symb; /*<>*/ incompatible_flag - (pct_ind, str_ind, _av_, cst_precision$2); + (pct_ind, str_ind, _aw_, cst_precision$2); } var plus$1 = ign ? plus : ign; if(plus$1) /*<>*/ incompatible_flag (pct_ind, str_ind, 95, cst$30); } - var _aw_ = 1 - ign_used[1], ign$0 = _aw_ ? ign : _aw_; + var _ax_ = 1 - ign_used[1], ign$0 = _ax_ ? ign : _ax_; a: if(ign$0){ b: @@ -19968,10 +20014,10 @@ case 3: if(legacy_behavior$0){ /*<>*/ var - /*<>*/ _an_ = str_ind$0 + 1 | 0, + /*<>*/ _ao_ = str_ind$0 + 1 | 0, minus$0 = minus || (45 === symb$0 ? 1 : 0); /*<>*/ return parse_literal - (minus$0, _an_); + (minus$0, _ao_); } break; } @@ -19998,17 +20044,17 @@ /*<>*/ hash = [0, 0]; function set_flag(str_ind, flag){ /*<>*/ var - _ak_ = flag[1], - _al_ = _ak_ ? 1 - legacy_behavior$0 : _ak_; - if(_al_){ + _al_ = flag[1], + _am_ = _al_ ? 1 - legacy_behavior$0 : _al_; + if(_am_){ /*<>*/ /*<>*/ var - _am_ = + _an_ = /*<>*/ caml_string_get(str, str_ind); /*<>*/ /*<>*/ caml_call3 - (failwith_message(_C_), str, str_ind, _am_); + (failwith_message(_C_), str, str_ind, _an_); } flag[1] = 1; - return 0; + return; /*<>*/ } var str_ind$0 = str_ind; /*<>*/ for(;;){ @@ -20178,13 +20224,13 @@ [0, sub_fmt, sub_str], /*<>*/ formatting$0 = is_open_tag ? [0, sub_format$0] : [1, sub_format$0], - /*<>*/ _ai_ = + /*<>*/ _aj_ = [0, [18, formatting$0, fmt_rest$0]]; - /*<>*/ return _ai_; + /*<>*/ return _aj_; } - catch(_aj_){ - var _ah_ = caml_wrap_exception(_aj_); - if(_ah_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ah_, 0); + catch(_ak_){ + var _ai_ = caml_wrap_exception(_ak_); + if(_ai_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ai_, 0); /*<>*/ var fmt_rest = parse(str_ind, end_ind)[1], /*<>*/ formatting = @@ -20224,9 +20270,9 @@ var new_acc = (acc$0 * 10 | 0) + (c - 48 | 0) | 0; if(Stdlib_Sys[12] < new_acc){ /*<>*/ /*<>*/ var - _ag_ = Stdlib_Sys[12]; + _ah_ = Stdlib_Sys[12]; /*<>*/ return /*<>*/ caml_call3 - (failwith_message(_S_), str, new_acc, _ag_); + (failwith_message(_S_), str, new_acc, _ah_); } var str_ind$1 = str_ind$0 + 1 | 0, @@ -20480,16 +20526,16 @@ fmt = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _ae_ = [0, type_format(fmt, fmtty), str]; - /*<>*/ return _ae_; + _af_ = [0, type_format(fmt, fmtty), str]; + /*<>*/ return _af_; } - catch(_af_){ - var _ac_ = caml_wrap_exception(_af_); - if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); + catch(_ag_){ + var _ad_ = caml_wrap_exception(_ag_); + if(_ad_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ad_, 0); /*<>*/ /*<>*/ var - _ad_ = string_of_fmtty(fmtty); + _ae_ = string_of_fmtty(fmtty); /*<>*/ return /*<>*/ caml_call2 - (failwith_message(_Z_), str, _ad_); + (failwith_message(_Z_), str, _ae_); } /*<>*/ } function format_of_string_format(str, param){ @@ -20499,15 +20545,15 @@ fmt$0 = fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ /*<>*/ /*<>*/ var - _aa_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; - /*<>*/ return _aa_; + _ab_ = [0, type_format(fmt$0, fmtty_of_fmt(fmt)), str]; + /*<>*/ return _ab_; } - catch(_ab_){ - var _$_ = caml_wrap_exception(_ab_); - if(_$_ === Type_mismatch) + catch(_ac_){ + var _aa_ = caml_wrap_exception(_ac_); + if(_aa_ === Type_mismatch) /*<>*/ return /*<>*/ caml_call2 (failwith_message(___), str, str$0); - throw caml_maybe_attach_backtrace(_$_, 0); + throw caml_maybe_attach_backtrace(_aa_, 0); } } var @@ -20715,6 +20761,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5]); } /*<>*/ var + _y_ = undefined, global_data = runtime.caml_get_global_data(), cst$7 = "\n", cst$4 = cst$8, @@ -20807,18 +20854,18 @@ /*<>*/ var t = l[2], h = l[1], - /*<>*/ _aD_ = + /*<>*/ _aE_ = /*<>*/ caml_call2(Stdlib[28], prefix, h); - function _aE_(x, y){ + function _aF_(x, y){ /*<>*/ /*<>*/ var - _aG_ = /*<>*/ caml_call2(Stdlib[28], sep, y); + _aH_ = /*<>*/ caml_call2(Stdlib[28], sep, y); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], x, _aG_); + (Stdlib[28], x, _aH_); /*<>*/ } /*<>*/ /*<>*/ var - _aF_ = /*<>*/ caml_call3(Stdlib_List[26], _aE_, _aD_, t); + _aG_ = /*<>*/ caml_call3(Stdlib_List[26], _aF_, _aE_, t); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _aF_, suffix); + (Stdlib[28], _aG_, suffix); /*<>*/ } function help_action(param){ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -20827,11 +20874,11 @@ function add_help(speclist){ /*<>*/ try{ /*<>*/ assoc3(cst_help$2, speclist); - /*<>*/ var /*<>*/ _aA_ = 0, add1 = _aA_; + /*<>*/ var /*<>*/ _aB_ = 0, add1 = _aB_; } - catch(_aC_){ - var _aw_ = caml_wrap_exception(_aC_); - if(_aw_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_aw_, 0); + catch(_aD_){ + var _ax_ = caml_wrap_exception(_aD_); + if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); var add1 = [0, @@ -20840,11 +20887,11 @@ } try{ /*<>*/ assoc3(cst_help$1, speclist); - /*<>*/ var /*<>*/ _az_ = 0, add2 = _az_; + /*<>*/ var /*<>*/ _aA_ = 0, add2 = _aA_; } - catch(_aB_){ - var _ax_ = caml_wrap_exception(_aB_); - if(_ax_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ax_, 0); + catch(_aC_){ + var _ay_ = caml_wrap_exception(_aC_); + if(_ay_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ay_, 0); var add2 = [0, @@ -20852,33 +20899,34 @@ 0]; } /*<>*/ /*<>*/ var - _ay_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); + _az_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[37], speclist, _ay_); + (Stdlib[37], speclist, _az_); /*<>*/ } function usage_b(buf, speclist, errmsg){ /*<>*/ /*<>*/ caml_call3 (Stdlib_Printf[5], buf, _d_, errmsg); /*<>*/ /*<>*/ var - _as_ = add_help(speclist); - /*<>*/ function _at_(param){ + _at_ = add_help(speclist); + /*<>*/ function _au_(param){ var doc = param[3], spec = param[2], key = param[1], - _au_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; - if(! _au_) return _au_; + _av_ = 0 < /*<>*/ caml_ml_string_length(doc) ? 1 : 0; + if(! _av_) return _av_; if(11 !== spec[0]) /*<>*/ return /*<>*/ caml_call4 (Stdlib_Printf[5], buf, _a_, key, doc); /*<>*/ var l = spec[1], - /*<>*/ _av_ = make_symlist(cst$1, cst$0, cst, l); + /*<>*/ _aw_ = make_symlist(cst$1, cst$0, cst, l); /*<>*/ return /*<>*/ caml_call5 - (Stdlib_Printf[5], buf, _b_, key, _av_, doc); + (Stdlib_Printf[5], buf, _b_, key, _aw_, doc); } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[18], _at_, _as_); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_List[18], _au_, _at_); + /*<>*/ return; /*<>*/ } function usage_string(speclist, errmsg){ /*<>*/ /*<>*/ var @@ -20889,33 +20937,33 @@ /*<>*/ } function usage(speclist, errmsg){ /*<>*/ /*<>*/ var - _ar_ = usage_string(speclist, errmsg); + _as_ = usage_string(speclist, errmsg); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Printf[3], _e_, _ar_); + (Stdlib_Printf[3], _e_, _as_); /*<>*/ } /*<>*/ /*<>*/ var current = [0, 0]; function int_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _ap_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; - /*<>*/ return _ap_; + _aq_ = [0, /*<>*/ runtime.caml_int_of_string(x)]; + /*<>*/ return _aq_; } - catch(_aq_){ - var _ao_ = caml_wrap_exception(_aq_); - if(_ao_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_ao_, 0); + catch(_ar_){ + var _ap_ = caml_wrap_exception(_ar_); + if(_ap_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_ap_, 0); } /*<>*/ } function float_of_string_opt(x){ /*<>*/ try{ /*<>*/ /*<>*/ var - _am_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; - /*<>*/ return _am_; + _an_ = [0, /*<>*/ runtime.caml_float_of_string(x)]; + /*<>*/ return _an_; } - catch(_an_){ - var _al_ = caml_wrap_exception(_an_); - if(_al_[1] === Stdlib[7]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_al_, 0); + catch(_ao_){ + var _am_ = caml_wrap_exception(_ao_); + if(_am_[1] === Stdlib[7]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_am_, 0); } /*<>*/ } function parse_and_expand_argv_dynamic_ @@ -20970,20 +21018,20 @@ if(current[1] >= argv[1].length - 1) return 0; /*<>*/ try{ /*<>*/ var - _Y_ = current[1], - /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_]; + _Z_ = current[1], + /*<>*/ s = caml_check_bound(argv[1], _Z_)[1 + _Z_]; /*<>*/ if ( /*<>*/ caml_call2(Stdlib_String[11], cst$3, s)){ try{ /*<>*/ var follow$1 = 0, - /*<>*/ _aa_ = assoc3(s, speclist[1]), + /*<>*/ _ab_ = assoc3(s, speclist[1]), follow$0 = follow$1, - action = _aa_; + action = _ab_; } - catch(_aj_){ - var _Z_ = caml_wrap_exception(_aj_); - if(_Z_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Z_, 0); + catch(_ak_){ + var ___ = caml_wrap_exception(_ak_); + if(___ !== Stdlib[8]) throw caml_maybe_attach_backtrace(___, 0); /*<>*/ try{ /*<>*/ var /*<>*/ i = @@ -20996,24 +21044,23 @@ /*<>*/ keyword = /*<>*/ caml_call3(Stdlib_String[16], s, 0, i), /*<>*/ follow = [0, arg], - /*<>*/ _$_ = assoc3(keyword, speclist[1]), + /*<>*/ _aa_ = assoc3(keyword, speclist[1]), follow$0 = follow, - action = _$_; + action = _aa_; } - catch(_ak_){ - var ___ = caml_wrap_exception(_ak_); - if(___ === Stdlib[8]) + catch(_al_){ + var _$_ = caml_wrap_exception(_al_); + if(_$_ === Stdlib[8]) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [0, s]], 1); - throw caml_maybe_attach_backtrace(___, 0); + throw caml_maybe_attach_backtrace(_$_, 0); } } var no_arg$0 = function(s, follow){ function no_arg(param){ - /*<>*/ if(! follow) - /*<>*/ return 0; + /*<>*/ if(! follow) /*<>*/ return; var arg = follow[1]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [1, s, arg, cst_no_argument]], 1); @@ -21031,9 +21078,9 @@ if((current[1] + 1 | 0) >= argv[1].length - 1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [2, s]], 1); - var _ai_ = current[1] + 1 | 0; - /*<>*/ return caml_check_bound(argv[1], _ai_) - [1 + _ai_]; + var _aj_ = current[1] + 1 | 0; + /*<>*/ return caml_check_bound(argv[1], _aj_) + [1 + _aj_]; /*<>*/ } return get_arg; }, @@ -21061,14 +21108,14 @@ /*<>*/ arg = get_arg(0); /*<>*/ try{ /*<>*/ var - /*<>*/ _ac_ = + /*<>*/ _ad_ = [0, /*<>*/ caml_call1(Stdlib[32], arg)], - match = _ac_; + match = _ad_; } - catch(_ah_){ - var _ab_ = caml_wrap_exception(_ah_); - if(_ab_[1] !== Stdlib[6]) - throw caml_maybe_attach_backtrace(_ab_, 0); + catch(_ai_){ + var _ac_ = caml_wrap_exception(_ai_); + if(_ac_[1] !== Stdlib[6]) + throw caml_maybe_attach_backtrace(_ac_, 0); var match = 0; } if(! match) @@ -21163,7 +21210,7 @@ /*<>*/ return consume_arg(0); } /*<>*/ /*<>*/ var - _ad_ = make_symlist(cst$6, cst$5, cst$4, symb); + _ae_ = make_symlist(cst$6, cst$5, cst$4, symb); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, @@ -21171,16 +21218,16 @@ s, arg$5, /*<>*/ caml_call2 - (Stdlib[28], cst_one_of, _ad_)]], + (Stdlib[28], cst_one_of, _ae_)]], 1); case 12: var f$5 = param[1]; /*<>*/ no_arg(0); /*<>*/ for(;;){ if(current[1] >= (argv[1].length - 1 - 1 | 0)) return 0; - var _ae_ = current[1] + 1 | 0; + var _af_ = current[1] + 1 | 0; /*<>*/ /*<>*/ caml_call1 - (f$5, caml_check_bound(argv[1], _ae_)[1 + _ae_]); + (f$5, caml_check_bound(argv[1], _af_)[1 + _af_]); /*<>*/ consume_arg(0); } break; @@ -21193,8 +21240,8 @@ /*<>*/ return /*<>*/ caml_call1 (f$6, /*<>*/ caml_call1(Stdlib_List[10], acc[1])); - var _ag_ = current[1] + 1 | 0, _af_ = acc[1]; - acc[1] = [0, caml_check_bound(argv[1], _ag_)[1 + _ag_], _af_]; + var _ah_ = current[1] + 1 | 0, _ag_ = acc[1]; + acc[1] = [0, caml_check_bound(argv[1], _ah_)[1 + _ah_], _ag_]; /*<>*/ consume_arg(0); } break; @@ -21271,8 +21318,8 @@ function parse(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _X_ = parse_argv(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _X_; + _Y_ = parse_argv(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _Y_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -21294,8 +21341,8 @@ function parse_dynamic(l, f, msg){ /*<>*/ try{ /*<>*/ /*<>*/ var - _W_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); - /*<>*/ return _W_; + _X_ = parse_argv_dynamic(0, caml_sys_argv(0), l, f, msg); + /*<>*/ return _X_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -21320,9 +21367,9 @@ /*<>*/ argv = [0, caml_sys_argv(0)], /*<>*/ spec = [0, l], /*<>*/ current$0 = [0, current[1]], - /*<>*/ _V_ = + /*<>*/ _W_ = parse_and_expand_argv_dynamic(current$0, argv, spec, f, msg); - /*<>*/ return _V_; + /*<>*/ return _W_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -21359,17 +21406,17 @@ /*<>*/ /*<>*/ var n$0 = /*<>*/ caml_call2(Stdlib_String[36], s, 9); } - catch(_T_){ - var _R_ = caml_wrap_exception(_T_); - if(_R_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_R_, 0); + catch(_U_){ + var _S_ = caml_wrap_exception(_U_); + if(_S_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_S_, 0); /*<>*/ try{ /*<>*/ /*<>*/ var n = /*<>*/ caml_call2(Stdlib_String[36], s, 32); } - catch(_U_){ - var _S_ = caml_wrap_exception(_U_); - if(_S_ === Stdlib[8]) /*<>*/ return len; - throw caml_maybe_attach_backtrace(_S_, 0); + catch(_V_){ + var _T_ = caml_wrap_exception(_V_); + if(_T_ === Stdlib[8]) /*<>*/ return len; + throw caml_maybe_attach_backtrace(_T_, 0); } /*<>*/ return loop(n + 1 | 0); } @@ -21379,12 +21426,12 @@ var doc = param[3], spec = param[2], kwd = param[1]; /*<>*/ if(11 === spec[0]) return caml_call2(Stdlib_Int[11], cur, caml_ml_string_length(kwd)); - var _Q_ = caml_ml_string_length(kwd) + second_word(doc) | 0; - return caml_call2(Stdlib_Int[11], cur, _Q_); + var _R_ = caml_ml_string_length(kwd) + second_word(doc) | 0; + return caml_call2(Stdlib_Int[11], cur, _R_); } function replace_leading_tab(s){ /*<>*/ /*<>*/ var seen = [0, 0]; - function _P_(c){ + function _Q_(c){ /*<>*/ if(9 === c && ! seen[1]){ seen[1] = 1; /*<>*/ return 32; @@ -21392,7 +21439,7 @@ /*<>*/ return c; /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[18], _P_, s); + (Stdlib_String[18], _Q_, s); /*<>*/ } function align(opt, speclist){ /*<>*/ if(opt) @@ -21406,7 +21453,7 @@ (Stdlib_List[26], max_arg_len, 0, completed), /*<>*/ len$0 = /*<>*/ caml_call2(Stdlib_Int[10], len, limit); - /*<>*/ function _J_(ksd){ + /*<>*/ function _K_(ksd){ var kwd = ksd[1], spec = ksd[2]; if(! caml_string_notequal(ksd[3], cst$8)) /*<>*/ return ksd; @@ -21414,20 +21461,20 @@ /*<>*/ var msg$0 = ksd[3], /*<>*/ cutcol$0 = second_word(msg$0), - /*<>*/ _M_ = + /*<>*/ _N_ = /*<>*/ caml_call2 (Stdlib_Int[11], 0, len$0 - cutcol$0 | 0) + 3 | 0, /*<>*/ spaces$0 = - /*<>*/ caml_call2(Stdlib_String[1], _M_, 32), - /*<>*/ _N_ = replace_leading_tab(msg$0), - /*<>*/ _O_ = - /*<>*/ caml_call2(Stdlib[28], spaces$0, _N_); + /*<>*/ caml_call2(Stdlib_String[1], _N_, 32), + /*<>*/ _O_ = replace_leading_tab(msg$0), + /*<>*/ _P_ = + /*<>*/ caml_call2(Stdlib[28], spaces$0, _O_); /*<>*/ return [0, kwd, spec, - /*<>*/ caml_call2(Stdlib[28], cst$7, _O_)]; + /*<>*/ caml_call2(Stdlib[28], cst$7, _P_)]; } /*<>*/ var msg = ksd[3], @@ -21441,24 +21488,24 @@ /*<>*/ var /*<>*/ spaces = /*<>*/ caml_call2(Stdlib_String[1], diff, 32), - /*<>*/ _K_ = replace_leading_tab(msg), + /*<>*/ _L_ = replace_leading_tab(msg), /*<>*/ prefix = - /*<>*/ caml_call3(Stdlib_String[16], _K_, 0, cutcol), + /*<>*/ caml_call3(Stdlib_String[16], _L_, 0, cutcol), /*<>*/ suffix = /*<>*/ caml_call3 (Stdlib_String[16], msg, cutcol, caml_ml_string_length(msg) - cutcol | 0), - /*<>*/ _L_ = + /*<>*/ _M_ = /*<>*/ caml_call2(Stdlib[28], spaces, suffix); /*<>*/ return [0, kwd, spec$0, - /*<>*/ caml_call2(Stdlib[28], prefix, _L_)]; + /*<>*/ caml_call2(Stdlib[28], prefix, _M_)]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[20], _J_, completed); + (Stdlib_List[20], _K_, completed); /*<>*/ } function read_aux(trim, sep, file){ /*<>*/ var @@ -21478,20 +21525,21 @@ (0 < len && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ var - _I_ = + _J_ = /*<>*/ caml_call3 (Stdlib_String[16], word, 0, len - 1 | 0); break a; } - var _I_ = word; + var _J_ = word; } - var word$0 = _I_; + var word$0 = _J_; } else var word$0 = word; words[1] = [0, word$0, words[1]]; - /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Buffer[8], buf); + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Buffer[8], buf); + /*<>*/ return; /*<>*/ } /*<>*/ try{ for(;;){ @@ -21504,45 +21552,45 @@ (Stdlib_Buffer[12], buf, c); } } - catch(_H_){ - var _F_ = caml_wrap_exception(_H_); - if(_F_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_F_, 0); + catch(_I_){ + var _G_ = caml_wrap_exception(_I_); + if(_G_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_G_, 0); if(0 < /*<>*/ caml_call1(Stdlib_Buffer[7], buf)) /*<>*/ stash(0); /*<>*/ /*<>*/ caml_call1(Stdlib[93], ic); /*<>*/ /*<>*/ var - _G_ = /*<>*/ caml_call1(Stdlib_List[10], words[1]); + _H_ = /*<>*/ caml_call1(Stdlib_List[10], words[1]); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Array[10], _G_); + (Stdlib_Array[10], _H_); } /*<>*/ } var _r_ = 10, _s_ = 1; - /*<>*/ function read_arg(_E_){ - /*<>*/ return read_aux(_s_, _r_, _E_); + /*<>*/ function read_arg(_F_){ + /*<>*/ return read_aux(_s_, _r_, _F_); } /*<>*/ var /*<>*/ _t_ = 0, _u_ = 0; - /*<>*/ function read_arg0(_D_){ - /*<>*/ return read_aux(_u_, _t_, _D_); + /*<>*/ function read_arg0(_E_){ + /*<>*/ return read_aux(_u_, _t_, _E_); } function write_aux(sep, file, args){ /*<>*/ /*<>*/ var oc = /*<>*/ caml_call1(Stdlib[61], file); - function _C_(s){ + function _D_(s){ /*<>*/ return caml_call4 (Stdlib_Printf[1], oc, _v_, s, sep); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _C_, args); + (Stdlib_Array[11], _D_, args); /*<>*/ return /*<>*/ caml_call1 (Stdlib[76], oc); /*<>*/ } var _w_ = 10; - /*<>*/ function write_arg(_A_, _B_){ - /*<>*/ return write_aux(_w_, _A_, _B_); + /*<>*/ function write_arg(_B_, _C_){ + /*<>*/ return write_aux(_w_, _B_, _C_); } /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ function write_arg0(_y_, _z_){ - /*<>*/ return write_aux(_x_, _y_, _z_); + /*<>*/ function write_arg0(_z_, _A_){ + /*<>*/ return write_aux(_x_, _z_, _A_); } var Stdlib_Arg = @@ -22208,6 +22256,7 @@ global_data = runtime.caml_get_global_data(), Stdlib_Printexc = global_data.Stdlib__Printexc, Stdlib = global_data.Stdlib, + _b_ = undefined, cst_Fun_Finally_raised = "Fun.Finally_raised: ", cst_Stdlib_Fun_Finally_raised = "Stdlib.Fun.Finally_raised"; function const$0(c, param){ @@ -22238,9 +22287,8 @@ function protect(finally$0, work){ function finally_no_exn(param){ /*<>*/ try{ - /*<>*/ /*<>*/ var - _b_ = /*<>*/ caml_call1(finally$0, 0); - /*<>*/ return _b_; + /*<>*/ /*<>*/ caml_call1(finally$0, 0); + /*<>*/ return; } catch(e$0){ /*<>*/ var @@ -22700,6 +22748,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var + _a_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Array = global_data.Stdlib__Array, @@ -22756,45 +22805,49 @@ } var c_layout = 0, fortran_layout = 1; function cloop(arr, idx, f, col, max){ - /*<>*/ if(col === idx.length - 1) - /*<>*/ return /*<>*/ caml_ba_set_generic - (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ if(col === idx.length - 1){ + /*<>*/ /*<>*/ caml_ba_set_generic + (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ return; + } /*<>*/ var - /*<>*/ _am_ = + /*<>*/ _an_ = caml_check_bound(max, col)[1 + col] - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var j = _al_; + /*<>*/ _am_ = 0; + if(_an_ >= 0){ + var j = _am_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); /*<>*/ /*<>*/ var - _an_ = j + 1 | 0; - if(_am_ === j) break; - var j = _an_; + _ao_ = j + 1 | 0; + if(_an_ === j) break; + var j = _ao_; } } - return 0; + return; /*<>*/ } function floop(arr, idx, f, col, max){ - /*<>*/ if(0 > col) - /*<>*/ return /*<>*/ caml_ba_set_generic - (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ if(0 > col){ + /*<>*/ /*<>*/ caml_ba_set_generic + (arr, idx, /*<>*/ caml_call1(f, idx)); + /*<>*/ return; + } /*<>*/ var - /*<>*/ _aj_ = caml_check_bound(max, col)[1 + col], - /*<>*/ _ai_ = 1; - if(_aj_ >= 1){ - var j = _ai_; + /*<>*/ _ak_ = caml_check_bound(max, col)[1 + col], + /*<>*/ _aj_ = 1; + if(_ak_ >= 1){ + var j = _aj_; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ floop(arr, idx, f, col - 1 | 0, max); /*<>*/ /*<>*/ var - _ak_ = j + 1 | 0; - if(_aj_ === j) break; - var j = _ak_; + _al_ = j + 1 | 0; + if(_ak_ === j) break; + var j = _al_; } } - return 0; + return; /*<>*/ } function init(kind, layout, dims, f){ /*<>*/ var @@ -22823,31 +22876,31 @@ /*<>*/ caml_ba_num_dims(a), /*<>*/ d = /*<>*/ caml_make_vect(n, 0), - /*<>*/ _af_ = n - 1 | 0, - /*<>*/ _ae_ = 0; - if(_af_ >= 0){ - var i = _ae_; + /*<>*/ _ag_ = n - 1 | 0, + /*<>*/ _af_ = 0; + if(_ag_ >= 0){ + var i = _af_; for(;;){ /*<>*/ /*<>*/ var - _ag_ = /*<>*/ runtime.caml_ba_dim(a, i); - /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; + _ah_ = /*<>*/ runtime.caml_ba_dim(a, i); + /*<>*/ caml_check_bound(d, i)[1 + i] = _ah_; /*<>*/ /*<>*/ var - _ah_ = i + 1 | 0; - if(_af_ === i) break; - var i = _ah_; + _ai_ = i + 1 | 0; + if(_ag_ === i) break; + var i = _ai_; } } /*<>*/ return d; /*<>*/ } function size_in_bytes(arr){ /*<>*/ var - /*<>*/ _ac_ = dims(arr), - /*<>*/ _ad_ = + /*<>*/ _ad_ = dims(arr), + /*<>*/ _ae_ = /*<>*/ caml_call3 - (Stdlib_Array[17], caml_mul, 1, _ac_); + (Stdlib_Array[17], caml_mul, 1, _ad_); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _ad_); + _ae_); /*<>*/ } function create(kind, layout){ /*<>*/ return /*<>*/ caml_ba_create @@ -22858,9 +22911,9 @@ (arr, [0]); /*<>*/ } function set(arr){ - /*<>*/ /*<>*/ var _aa_ = [0]; - /*<>*/ return function(_ab_){ - /*<>*/ return caml_ba_set_generic(arr, _aa_, _ab_);}; + /*<>*/ /*<>*/ var _ab_ = [0]; + /*<>*/ return function(_ac_){ + /*<>*/ return caml_ba_set_generic(arr, _ab_, _ac_);}; /*<>*/ } function size_in_bytes$0(arr){ /*<>*/ return kind_size_in_bytes @@ -22878,10 +22931,10 @@ /*<>*/ } function size_in_bytes$1(arr){ /*<>*/ /*<>*/ var - _$_ = /*<>*/ caml_ba_dim_1(arr); + _aa_ = /*<>*/ caml_ba_dim_1(arr); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), - _$_); + _aa_); /*<>*/ } function slice(a, n){ /*<>*/ return /*<>*/ runtime.caml_ba_layout @@ -22893,32 +22946,32 @@ /*<>*/ /*<>*/ var arr = create$0(kind, layout, dim); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _Z_ = 1; + /*<>*/ /*<>*/ var ___ = 1; if(dim >= 1){ - var i$0 = _Z_; + var i$0 = ___; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i$0, /*<>*/ caml_call1(f, i$0)); /*<>*/ /*<>*/ var - ___ = i$0 + 1 | 0; + _$_ = i$0 + 1 | 0; if(dim === i$0) break; - var i$0 = ___; + var i$0 = _$_; } } /*<>*/ return arr; } /*<>*/ var - _X_ = dim - 1 | 0, - /*<>*/ _W_ = 0; - if(_X_ >= 0){ - var i = _W_; + _Y_ = dim - 1 | 0, + /*<>*/ _X_ = 0; + if(_Y_ >= 0){ + var i = _X_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var - _Y_ = i + 1 | 0; - if(_X_ === i) break; - var i = _Y_; + _Z_ = i + 1 | 0; + if(_Y_ === i) break; + var i = _Z_; } } /*<>*/ return arr; @@ -22927,17 +22980,17 @@ /*<>*/ var /*<>*/ ba = create$0(kind, layout, data.length - 1), /*<>*/ ofs = layout ? 1 : 0, - _U_ = data.length - 1 - 1 | 0, - _T_ = 0; - if(_U_ >= 0){ - var i = _T_; + _V_ = data.length - 1 - 1 | 0, + _U_ = 0; + if(_V_ >= 0){ + var i = _U_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); /*<>*/ /*<>*/ var - _V_ = i + 1 | 0; - if(_U_ === i) break; - var i = _V_; + _W_ = i + 1 | 0; + if(_V_ === i) break; + var i = _W_; } } /*<>*/ return ba; @@ -22948,16 +23001,16 @@ /*<>*/ } function size_in_bytes$2(arr){ /*<>*/ var - /*<>*/ _R_ = + /*<>*/ _S_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _S_ = + /*<>*/ _T_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _S_), - _R_); + _T_), + _S_); /*<>*/ } function slice_left(a, n){ /*<>*/ return /*<>*/ caml_ba_slice @@ -22971,54 +23024,54 @@ /*<>*/ /*<>*/ var arr = create$1(kind, layout, dim1, dim2); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _N_ = 1; + /*<>*/ /*<>*/ var _O_ = 1; if(dim2 >= 1){ - var j$0 = _N_; + var j$0 = _O_; for(;;){ - /*<>*/ /*<>*/ var _O_ = 1; + /*<>*/ /*<>*/ var _P_ = 1; if(dim1 >= 1){ - var i$0 = _O_; + var i$0 = _P_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); /*<>*/ /*<>*/ var - _Q_ = i$0 + 1 | 0; + _R_ = i$0 + 1 | 0; if(dim1 === i$0) break; - var i$0 = _Q_; + var i$0 = _R_; } } /*<>*/ /*<>*/ var - _P_ = j$0 + 1 | 0; + _Q_ = j$0 + 1 | 0; if(dim2 === j$0) break; - var j$0 = _P_; + var j$0 = _Q_; } } /*<>*/ return arr; } /*<>*/ var - _I_ = dim1 - 1 | 0, - /*<>*/ _H_ = 0; - if(_I_ >= 0){ - var i = _H_; + _J_ = dim1 - 1 | 0, + /*<>*/ _I_ = 0; + if(_J_ >= 0){ + var i = _I_; for(;;){ /*<>*/ var - _K_ = dim2 - 1 | 0, - /*<>*/ _J_ = 0; - if(_K_ >= 0){ - var j = _J_; + _L_ = dim2 - 1 | 0, + /*<>*/ _K_ = 0; + if(_L_ >= 0){ + var j = _K_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i, j, /*<>*/ caml_call2(f, i, j)); /*<>*/ /*<>*/ var - _M_ = j + 1 | 0; - if(_K_ === j) break; - var j = _M_; + _N_ = j + 1 | 0; + if(_L_ === j) break; + var j = _N_; } } /*<>*/ /*<>*/ var - _L_ = i + 1 | 0; - if(_I_ === i) break; - var i = _L_; + _M_ = i + 1 | 0; + if(_J_ === i) break; + var i = _M_; } } /*<>*/ return arr; @@ -23030,10 +23083,10 @@ 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, /*<>*/ ba = create$1(kind, layout, dim1, dim2), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _C_ = dim1 - 1 | 0, - _B_ = 0; - if(_C_ >= 0){ - var i = _B_; + /*<>*/ _D_ = dim1 - 1 | 0, + _C_ = 0; + if(_D_ >= 0){ + var i = _C_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -23041,23 +23094,23 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array2_of_array_n); /*<>*/ var - /*<>*/ _E_ = dim2 - 1 | 0, - /*<>*/ _D_ = 0; - if(_E_ >= 0){ - var j = _D_; + /*<>*/ _F_ = dim2 - 1 | 0, + /*<>*/ _E_ = 0; + if(_F_ >= 0){ + var j = _E_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (ba, i + ofs | 0, j + ofs | 0, caml_check_bound(row, j)[1 + j]); /*<>*/ /*<>*/ var - _G_ = j + 1 | 0; - if(_E_ === j) break; - var j = _G_; + _H_ = j + 1 | 0; + if(_F_ === j) break; + var j = _H_; } } /*<>*/ /*<>*/ var - _F_ = i + 1 | 0; - if(_C_ === i) break; - var i = _F_; + _G_ = i + 1 | 0; + if(_D_ === i) break; + var i = _G_; } } /*<>*/ return ba; @@ -23068,20 +23121,20 @@ /*<>*/ } function size_in_bytes$3(arr){ /*<>*/ var - /*<>*/ _y_ = + /*<>*/ _z_ = /*<>*/ runtime.caml_ba_dim_3(arr), - /*<>*/ _z_ = + /*<>*/ _A_ = /*<>*/ caml_ba_dim_2(arr), - /*<>*/ _A_ = + /*<>*/ _B_ = /*<>*/ caml_ba_dim_1(arr); return caml_mul (caml_mul ( /*<>*/ caml_mul (kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _A_), - _z_), - _y_); + _B_), + _A_), + _z_); /*<>*/ } function slice_left_1(a, n, m){ /*<>*/ return /*<>*/ caml_ba_slice @@ -23103,17 +23156,17 @@ /*<>*/ /*<>*/ var arr = create$2(kind, layout, dim1, dim2, dim3); /*<>*/ if(layout){ - /*<>*/ /*<>*/ var _s_ = 1; + /*<>*/ /*<>*/ var _t_ = 1; if(dim3 >= 1){ - var k$0 = _s_; + var k$0 = _t_; for(;;){ - /*<>*/ /*<>*/ var _t_ = 1; + /*<>*/ /*<>*/ var _u_ = 1; if(dim2 >= 1){ - var j$0 = _t_; + var j$0 = _u_; for(;;){ - /*<>*/ /*<>*/ var _v_ = 1; + /*<>*/ /*<>*/ var _w_ = 1; if(dim1 >= 1){ - var i$0 = _v_; + var i$0 = _w_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, @@ -23122,61 +23175,61 @@ k$0, /*<>*/ caml_call3(f, i$0, j$0, k$0)); /*<>*/ /*<>*/ var - _x_ = i$0 + 1 | 0; + _y_ = i$0 + 1 | 0; if(dim1 === i$0) break; - var i$0 = _x_; + var i$0 = _y_; } } /*<>*/ /*<>*/ var - _w_ = j$0 + 1 | 0; + _x_ = j$0 + 1 | 0; if(dim2 === j$0) break; - var j$0 = _w_; + var j$0 = _x_; } } /*<>*/ /*<>*/ var - _u_ = k$0 + 1 | 0; + _v_ = k$0 + 1 | 0; if(dim3 === k$0) break; - var k$0 = _u_; + var k$0 = _v_; } } /*<>*/ return arr; } /*<>*/ var - _k_ = dim1 - 1 | 0, - /*<>*/ _j_ = 0; - if(_k_ >= 0){ - var i = _j_; + _l_ = dim1 - 1 | 0, + /*<>*/ _k_ = 0; + if(_l_ >= 0){ + var i = _k_; for(;;){ /*<>*/ var - _m_ = dim2 - 1 | 0, - /*<>*/ _l_ = 0; - if(_m_ >= 0){ - var j = _l_; + _n_ = dim2 - 1 | 0, + /*<>*/ _m_ = 0; + if(_n_ >= 0){ + var j = _m_; for(;;){ /*<>*/ var - _p_ = dim3 - 1 | 0, - /*<>*/ _o_ = 0; - if(_p_ >= 0){ - var k = _o_; + _q_ = dim3 - 1 | 0, + /*<>*/ _p_ = 0; + if(_q_ >= 0){ + var k = _p_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); /*<>*/ /*<>*/ var - _r_ = k + 1 | 0; - if(_p_ === k) break; - var k = _r_; + _s_ = k + 1 | 0; + if(_q_ === k) break; + var k = _s_; } } /*<>*/ /*<>*/ var - _q_ = j + 1 | 0; - if(_m_ === j) break; - var j = _q_; + _r_ = j + 1 | 0; + if(_n_ === j) break; + var j = _r_; } } /*<>*/ /*<>*/ var - _n_ = i + 1 | 0; - if(_k_ === i) break; - var i = _n_; + _o_ = i + 1 | 0; + if(_l_ === i) break; + var i = _o_; } } /*<>*/ return arr; @@ -23192,10 +23245,10 @@ : caml_check_bound(caml_check_bound(data, 0)[1], 0)[1].length - 1, /*<>*/ ba = create$2(kind, layout, dim1, dim2, dim3), /*<>*/ ofs = layout ? 1 : 0, - /*<>*/ _b_ = dim1 - 1 | 0, - _a_ = 0; - if(_b_ >= 0){ - var i = _a_; + /*<>*/ _c_ = dim1 - 1 | 0, + _b_ = 0; + if(_c_ >= 0){ + var i = _b_; for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; @@ -23203,10 +23256,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n); /*<>*/ var - /*<>*/ _d_ = dim2 - 1 | 0, - /*<>*/ _c_ = 0; - if(_d_ >= 0){ - var j = _c_; + /*<>*/ _e_ = dim2 - 1 | 0, + /*<>*/ _d_ = 0; + if(_e_ >= 0){ + var j = _d_; for(;;){ /*<>*/ /*<>*/ var col = caml_check_bound(row, j)[1 + j]; @@ -23214,10 +23267,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n$0); /*<>*/ var - /*<>*/ _g_ = dim3 - 1 | 0, - /*<>*/ _f_ = 0; - if(_g_ >= 0){ - var k = _f_; + /*<>*/ _h_ = dim3 - 1 | 0, + /*<>*/ _g_ = 0; + if(_h_ >= 0){ + var k = _g_; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (ba, @@ -23226,21 +23279,21 @@ k + ofs | 0, caml_check_bound(col, k)[1 + k]); /*<>*/ /*<>*/ var - _i_ = k + 1 | 0; - if(_g_ === k) break; - var k = _i_; + _j_ = k + 1 | 0; + if(_h_ === k) break; + var k = _j_; } } /*<>*/ /*<>*/ var - _h_ = j + 1 | 0; - if(_d_ === j) break; - var j = _h_; + _i_ = j + 1 | 0; + if(_e_ === j) break; + var j = _i_; } } /*<>*/ /*<>*/ var - _e_ = i + 1 | 0; - if(_b_ === i) break; - var i = _e_; + _f_ = i + 1 | 0; + if(_c_ === i) break; + var i = _f_; } } /*<>*/ return ba; @@ -24931,6 +24984,7 @@ Stdlib_Int = global_data.Stdlib__Int, Stdlib_Array = global_data.Stdlib__Array, Stdlib_Obj = global_data.Stdlib__Obj, + _a_ = undefined, cst_Weak_Make_hash_bucket_cann = "Weak.Make: hash bucket cannot grow more", cst_Weak_fill = "Weak.fill", cst_Weak_blit = "Weak.blit", @@ -24941,9 +24995,9 @@ cst_Weak_create = "Weak.create"; function create(l){ /*<>*/ var - _Z_ = 0 <= l ? 1 : 0, - ___ = _Z_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _Z_; - if(1 - ___) + ___ = 0 <= l ? 1 : 0, + _$_ = ___ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : ___; + if(1 - _$_) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Weak_create); /*<>*/ return /*<>*/ runtime.caml_weak_create @@ -24954,10 +25008,12 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _W_ = 0 <= o ? 1 : 0, - _X_ = _W_ ? o < length(e) ? 1 : 0 : _W_, - _Y_ = 1 - _X_; - return _Y_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _Y_; + _X_ = 0 <= o ? 1 : 0, + _Y_ = _X_ ? o < length(e) ? 1 : 0 : _X_, + _Z_ = 1 - _Y_; + if(! _Z_) return _Z_; + /*<>*/ /*<>*/ caml_call1(Stdlib[1], msg); + /*<>*/ return; /*<>*/ } function set(e, o, x){ /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); @@ -24990,13 +25046,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _U_ = 0 !== l ? 1 : 0, - _V_ = - _U_ + _V_ = 0 !== l ? 1 : 0, + _W_ = + _V_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _U_; - /*<>*/ return _V_; + : _V_; + /*<>*/ return _W_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Weak_blit); @@ -25004,14 +25060,14 @@ function fill(ar, ofs, len, x){ /*<>*/ if (0 <= ofs && 0 <= len && (length(ar) - len | 0) >= ofs){ - var _S_ = (ofs + len | 0) - 1 | 0; - if(_S_ >= ofs){ + var _T_ = (ofs + len | 0) - 1 | 0; + if(_T_ >= ofs){ var i = ofs; for(;;){ /*<>*/ set(ar, i, x); - /*<>*/ /*<>*/ var _T_ = i + 1 | 0; - if(_S_ === i) break; - var i = _T_; + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + if(_T_ === i) break; + var i = _U_; } } return 0; @@ -25039,16 +25095,16 @@ /*<>*/ } function clear(t){ /*<>*/ var - _Q_ = t[1].length - 1 - 1 | 0, - /*<>*/ _P_ = 0; - if(_Q_ >= 0){ - var i = _P_; + _R_ = t[1].length - 1 - 1 | 0, + /*<>*/ _Q_ = 0; + if(_R_ >= 0){ + var i = _Q_; for(;;){ /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; - /*<>*/ /*<>*/ var _R_ = i + 1 | 0; - if(_Q_ === i) break; - var i = _R_; + /*<>*/ /*<>*/ var _S_ = i + 1 | 0; + if(_R_ === i) break; + var i = _S_; } } t[3] = limit; @@ -25056,8 +25112,8 @@ return 0; /*<>*/ } function fold(f, t, init){ - /*<>*/ var _N_ = t[1], i = 0; - /*<>*/ function _O_(b, accu$1){ + /*<>*/ var _O_ = t[1], i = 0; + /*<>*/ function _P_(b, accu$1){ var i$0 = i, accu = accu$1; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu; @@ -25076,11 +25132,11 @@ } } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[19], _O_, _N_, init); + (Stdlib_Array[19], _P_, _O_, init); /*<>*/ } function iter(f, t){ - /*<>*/ var _L_ = t[1], i = 0; - /*<>*/ function _M_(b){ + /*<>*/ var _M_ = t[1], i = 0; + /*<>*/ function _N_(b){ var i$0 = i; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return 0; @@ -25096,15 +25152,15 @@ } } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Array[11], _M_, _L_); + (Stdlib_Array[11], _N_, _M_); /*<>*/ } function count_bucket(i, b, accu){ /*<>*/ var i$0 = i, accu$0 = accu; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu$0; /*<>*/ var - /*<>*/ _K_ = check(b, i$0) ? 1 : 0, - accu$1 = accu$0 + _K_ | 0, + /*<>*/ _L_ = check(b, i$0) ? 1 : 0, + accu$1 = accu$0 + _L_ | 0, i$1 = i$0 + 1 | 0, i$0 = i$1, accu$0 = accu$1; @@ -25112,14 +25168,14 @@ /*<>*/ } function count(t){ /*<>*/ var - /*<>*/ _E_ = 0, - _F_ = t[1], - _G_ = 0; - /*<>*/ function _H_(_I_, _J_){ - /*<>*/ return count_bucket(_G_, _I_, _J_); + /*<>*/ _F_ = 0, + _G_ = t[1], + _H_ = 0; + /*<>*/ function _I_(_J_, _K_){ + /*<>*/ return count_bucket(_H_, _J_, _K_); } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[19], _H_, _F_, _E_); + (Stdlib_Array[19], _I_, _G_, _F_); /*<>*/ } function add_aux(t, setter, d, h, index){ /*<>*/ var @@ -25152,18 +25208,18 @@ /*<>*/ caml_check_bound(newhashes, sz)[1 + sz] = h; /*<>*/ caml_check_bound(t[1], index)[1 + index] = newbucket$0; /*<>*/ caml_check_bound(t[2], index)[1 + index] = newhashes; - var _A_ = sz <= t[3] ? 1 : 0, _B_ = _A_ ? t[3] < newsz ? 1 : 0 : _A_; - if(_B_){ + var _B_ = sz <= t[3] ? 1 : 0, _C_ = _B_ ? t[3] < newsz ? 1 : 0 : _B_; + if(_C_){ t[4] = t[4] + 1 | 0; var i$4 = 0; for(;;){ /*<>*/ var - _q_ = t[5], + _r_ = t[5], /*<>*/ bucket = - caml_check_bound(t[1], _q_)[1 + _q_], - /*<>*/ _r_ = t[5], + caml_check_bound(t[1], _r_)[1 + _r_], + /*<>*/ _s_ = t[5], /*<>*/ hbucket = - caml_check_bound(t[2], _r_)[1 + _r_], + caml_check_bound(t[2], _s_)[1 + _s_], /*<>*/ len = length(bucket), prev_len = (((len - 3 | 0) * 2 | 0) + 2 | 0) / 3 | 0, /*<>*/ live = count_bucket(0, bucket, 0); @@ -25175,28 +25231,28 @@ /*<>*/ for(;;){ if(prev_len > j){ if(0 === prev_len){ - var _t_ = t[5]; - /*<>*/ caml_check_bound(t[1], _t_)[1 + _t_] = emptybucket; var _u_ = t[5]; - /*<>*/ caml_check_bound(t[2], _u_)[1 + _u_] = [0]; + /*<>*/ caml_check_bound(t[1], _u_)[1 + _u_] = emptybucket; + var _v_ = t[5]; + /*<>*/ caml_check_bound(t[2], _v_)[1 + _v_] = [0]; } else{ /*<>*/ /*<>*/ var newbucket = create(prev_len); /*<>*/ blit(bucket, 0, newbucket, 0, prev_len); - var _x_ = t[5]; - /*<>*/ caml_check_bound(t[1], _x_)[1 + _x_] = newbucket; + var _y_ = t[5]; + /*<>*/ caml_check_bound(t[1], _y_)[1 + _y_] = newbucket; /*<>*/ var - /*<>*/ _y_ = + /*<>*/ _z_ = /*<>*/ caml_call3 (Stdlib_Array[5], hbucket, 0, prev_len), - _z_ = t[5]; - /*<>*/ caml_check_bound(t[2], _z_)[1 + _z_] = _y_; + _A_ = t[5]; + /*<>*/ caml_check_bound(t[2], _A_)[1 + _A_] = _z_; } var - _v_ = t[3] < len ? 1 : 0, - _w_ = _v_ ? prev_len <= t[3] ? 1 : 0 : _v_; - if(_w_) t[4] = t[4] - 1 | 0; + _w_ = t[3] < len ? 1 : 0, + _x_ = _w_ ? prev_len <= t[3] ? 1 : 0 : _w_; + if(_x_) t[4] = t[4] - 1 | 0; break; } /*<>*/ if(check(bucket, i$0)) @@ -25204,8 +25260,8 @@ else if(check(bucket, j)){ /*<>*/ blit(bucket, j, bucket, i$0, 1); /*<>*/ /*<>*/ var - _s_ = caml_check_bound(hbucket, j)[1 + j]; - /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _s_; + _t_ = caml_check_bound(hbucket, j)[1 + j]; + /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _t_; /*<>*/ var /*<>*/ j$0 = j - 1 | 0, i$2 = i$0 + 1 | 0, @@ -25220,13 +25276,13 @@ } t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); /*<>*/ /*<>*/ var - _D_ = i$4 + 1 | 0; + _E_ = i$4 + 1 | 0; if(2 === i$4) break; - var i$4 = _D_; + var i$4 = _E_; } } - var _C_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; - if(! _C_) return _C_; + var _D_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; + if(! _D_) return _D_; /*<>*/ var oldlen = t[1].length - 1, /*<>*/ newlen = @@ -25237,9 +25293,9 @@ if(oldlen < newlen){ /*<>*/ var /*<>*/ newt = create$0(newlen), - _o_ = t[1], + _p_ = t[1], i = 0, - /*<>*/ _p_ = + /*<>*/ _q_ = function(j, ob){ var oi = i; /*<>*/ for(;;){ @@ -25265,7 +25321,7 @@ } }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[12], _p_, _o_); + (Stdlib_Array[12], _q_, _p_); t[1] = newt[1]; t[2] = newt[2]; t[3] = newt[3]; @@ -25329,7 +25385,7 @@ } /*<>*/ } function find_opt(t, d){ - /*<>*/ function _n_(h, i){ + /*<>*/ function _o_(h, i){ /*<>*/ return 0; /*<>*/ } /*<>*/ return find_aux @@ -25338,10 +25394,10 @@ function(b, i, o, v){ /*<>*/ return o; /*<>*/ }, - _n_); + _o_); /*<>*/ } function merge(t, d){ - function _m_(h, i){ + function _n_(h, i){ /*<>*/ add_aux(t, set, [0, d], h, i); /*<>*/ return d; /*<>*/ } @@ -25351,10 +25407,10 @@ function(b, i, o, v){ /*<>*/ return v; /*<>*/ }, - _m_); + _n_); /*<>*/ } function find(t, d){ - /*<>*/ function _l_(h, i){ + /*<>*/ function _m_(h, i){ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ } @@ -25364,10 +25420,10 @@ function(b, i, o, v){ /*<>*/ return v; /*<>*/ }, - _l_); + _m_); /*<>*/ } function remove(t, d){ - /*<>*/ function _k_(h, i){ + /*<>*/ function _l_(h, i){ /*<>*/ return 0; /*<>*/ } /*<>*/ return find_aux @@ -25376,10 +25432,10 @@ function(b, i, o, v){ /*<>*/ return set(b, i, 0); /*<>*/ }, - _k_); + _l_); /*<>*/ } function mem(t, d){ - /*<>*/ function _j_(h, i){ + /*<>*/ function _k_(h, i){ /*<>*/ return 0; /*<>*/ } /*<>*/ return find_aux @@ -25388,7 +25444,7 @@ function(b, i, o, v){ /*<>*/ return 1; /*<>*/ }, - _j_); + _k_); /*<>*/ } function find_all(t, d){ /*<>*/ var @@ -25431,17 +25487,17 @@ /*<>*/ caml_call2(Stdlib_Array[13], length, t[1]); /*<>*/ /*<>*/ caml_call2 (Stdlib_Array[34], runtime.caml_int_compare, lens); - var _a_ = 0; - function _b_(_i_, _h_){ /*<>*/ return _i_ + _h_ | 0;} + var _b_ = 0; + function _c_(_j_, _i_){ /*<>*/ return _j_ + _i_ | 0;} /*<>*/ var /*<>*/ totlen = - /*<>*/ caml_call3(Stdlib_Array[17], _b_, _a_, lens), - /*<>*/ _c_ = len - 1 | 0, - _e_ = len / 2 | 0, - /*<>*/ _d_ = caml_check_bound(lens, _c_)[1 + _c_], - /*<>*/ _f_ = caml_check_bound(lens, _e_)[1 + _e_], - /*<>*/ _g_ = caml_check_bound(lens, 0)[1]; - /*<>*/ return [0, len, count(t), totlen, _g_, _f_, _d_]; + /*<>*/ caml_call3(Stdlib_Array[17], _c_, _b_, lens), + /*<>*/ _d_ = len - 1 | 0, + _f_ = len / 2 | 0, + /*<>*/ _e_ = caml_check_bound(lens, _d_)[1 + _d_], + /*<>*/ _g_ = caml_check_bound(lens, _f_)[1 + _f_], + /*<>*/ _h_ = caml_check_bound(lens, 0)[1]; + /*<>*/ return [0, len, count(t), totlen, _h_, _g_, _e_]; /*<>*/ } /*<>*/ return [0, create$0, @@ -25498,6 +25554,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var + _m_ = undefined, global_data = runtime.caml_get_global_data(), cst$14 = ".", cst$11 = cst$15, @@ -25547,25 +25604,28 @@ /*<>*/ } var pp_infinity = 1000000010; function pp_output_string(state, s){ - /*<>*/ return caml_call3 - (state[17], s, 0, caml_ml_string_length(s)); + /*<>*/ caml_call3 + (state[17], s, 0, caml_ml_string_length(s)); + return; /*<>*/ } function pp_output_newline(state){ - /*<>*/ return /*<>*/ caml_call1 - (state[19], 0); + /*<>*/ /*<>*/ caml_call1 + (state[19], 0); + /*<>*/ return; /*<>*/ } function format_pp_text(state, size, text){ /*<>*/ state[9] = state[9] - size | 0; /*<>*/ pp_output_string(state, text); state[11] = 0; - return 0; + return; /*<>*/ } function format_string(state, s){ /*<>*/ /*<>*/ var - _bQ_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); - /*<>*/ return _bQ_ - ? format_pp_text(state, caml_ml_string_length(s), s) - : _bQ_; + _bO_ = /*<>*/ runtime.caml_string_notequal(s, cst$16); + /*<>*/ if(! _bO_) /*<>*/ return _bO_; + /*<>*/ format_pp_text + (state, caml_ml_string_length(s), s); + /*<>*/ return; /*<>*/ } function break_new_line(state, param, width){ var after = param[3], offset = param[2], before = param[1]; @@ -25581,10 +25641,12 @@ var n = state[10]; /*<>*/ /*<>*/ caml_call1 (state[21], n); - /*<>*/ return format_string(state, after); + /*<>*/ format_string(state, after); + /*<>*/ return; } function break_line(state, width){ - /*<>*/ return break_new_line(state, _a_, width); + /*<>*/ break_new_line(state, _a_, width); + /*<>*/ return; /*<>*/ } function break_same_line(state, param){ var after = param[3], width = param[2], before = param[1]; @@ -25592,7 +25654,8 @@ state[9] = state[9] - width | 0; /*<>*/ /*<>*/ caml_call1 (state[20], width); - /*<>*/ return format_string(state, after); + /*<>*/ format_string(state, after); + /*<>*/ return; } function format_pp_token(state, size$0, param){ /*<>*/ if(typeof param === "number") @@ -25601,7 +25664,7 @@ /*<>*/ /*<>*/ var match$3 = /*<>*/ caml_call1(Stdlib_Stack[8], state[3]); - if(! match$3) /*<>*/ return 0; + if(! match$3) /*<>*/ return; /*<>*/ var tabs = match$3[1][1], /*<>*/ add_tab = @@ -25614,49 +25677,54 @@ : [0, x, add_tab(n, l)]; }; tabs[1] = add_tab(state[6] - state[9] | 0, tabs[1]); - return 0; + return; case 1: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[2]); - /*<>*/ return 0; + /*<>*/ return; case 2: /*<>*/ /*<>*/ caml_call1 (Stdlib_Stack[5], state[3]); - /*<>*/ return 0; + /*<>*/ return; case 3: /*<>*/ /*<>*/ var match$4 = /*<>*/ caml_call1(Stdlib_Stack[8], state[2]); - if(! match$4) - /*<>*/ return pp_output_newline(state); - var width$0 = match$4[1][2]; - /*<>*/ return break_line(state, width$0); + if(match$4){ + var width$0 = match$4[1][2]; + /*<>*/ break_line(state, width$0); + /*<>*/ return; + } + /*<>*/ pp_output_newline(state); + /*<>*/ return; case 4: - var _bO_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; - if(! _bO_) return _bO_; + var _bM_ = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; + if(! _bM_) return _bM_; /*<>*/ /*<>*/ var match$1 = /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); - if(! match$1) /*<>*/ return 0; + if(! match$1) /*<>*/ return; var match$2 = match$1[1], size = match$2[1], length = match$2[3]; state[12] = state[12] - length | 0; state[9] = state[9] + size | 0; - return 0; + return; default: /*<>*/ /*<>*/ var match$5 = /*<>*/ caml_call1(Stdlib_Stack[5], state[5]); - if(! match$5) /*<>*/ return 0; + if(! match$5) /*<>*/ return; /*<>*/ var tag_name = match$5[1], /*<>*/ marker = /*<>*/ caml_call1(state[25], tag_name); - /*<>*/ return pp_output_string(state, marker); + /*<>*/ pp_output_string(state, marker); + /*<>*/ return; } switch(param[0]){ case 0: var s = param[1]; - /*<>*/ return format_pp_text(state, size$0, s); + /*<>*/ format_pp_text(state, size$0, s); + /*<>*/ return; case 1: /*<>*/ var breaks = param[2], @@ -25665,42 +25733,46 @@ before = breaks[1], /*<>*/ match$6 = /*<>*/ caml_call1(Stdlib_Stack[8], state[2]); - if(! match$6) /*<>*/ return 0; + if(! match$6) /*<>*/ return; var match$7 = match$6[1], width$1 = match$7[2], box_type$0 = match$7[1]; /*<>*/ switch(box_type$0){ case 0: - /*<>*/ return break_same_line(state, fits); + /*<>*/ break_same_line(state, fits); + /*<>*/ return; case 1: - /*<>*/ return break_new_line - (state, breaks, width$1); + /*<>*/ break_new_line(state, breaks, width$1); + /*<>*/ return; case 2: - /*<>*/ return break_new_line - (state, breaks, width$1); + /*<>*/ break_new_line(state, breaks, width$1); + /*<>*/ return; case 3: - return state[9] < (size$0 + caml_ml_string_length(before) | 0) - ? break_new_line(state, breaks, width$1) - : break_same_line(state, fits); + if(state[9] < (size$0 + caml_ml_string_length(before) | 0)){ + /*<>*/ break_new_line(state, breaks, width$1); + /*<>*/ return; + } + /*<>*/ break_same_line(state, fits); + /*<>*/ return; case 4: - return state[11] - ? break_same_line(state, fits) - : state - [9] - < (size$0 + caml_ml_string_length(before) | 0) - ? break_new_line(state, breaks, width$1) - : ((state - [6] - - width$1 - | 0) - + off - | 0) - < state[10] - ? break_new_line(state, breaks, width$1) - : break_same_line(state, fits); + if(state[11]){ + /*<>*/ break_same_line(state, fits); + /*<>*/ return; + } + if(state[9] < (size$0 + caml_ml_string_length(before) | 0)){ + /*<>*/ break_new_line(state, breaks, width$1); + /*<>*/ return; + } + if(((state[6] - width$1 | 0) + off | 0) < state[10]){ + /*<>*/ break_new_line(state, breaks, width$1); + /*<>*/ return; + } + /*<>*/ break_same_line(state, fits); + /*<>*/ return; default: - /*<>*/ return break_same_line(state, fits); + /*<>*/ break_same_line(state, fits); + /*<>*/ return; } case 2: /*<>*/ var @@ -25709,7 +25781,7 @@ insertion_point = state[6] - state[9] | 0, /*<>*/ match$8 = /*<>*/ caml_call1(Stdlib_Stack[8], state[3]); - if(! match$8) /*<>*/ return 0; + if(! match$8) /*<>*/ return; /*<>*/ var tabs$0 = match$8[1][1], /*<>*/ match$9 = tabs$0[1]; @@ -25719,21 +25791,25 @@ if(param$0){ var tail = param$0[2], head = param$0[1]; if(insertion_point > head){var param$0 = tail; continue;} - var _bP_ = head; + var _bN_ = head; } else - var _bP_ = first; - var tab = _bP_; + var _bN_ = first; + var tab = _bN_; break; } } else var tab = insertion_point; var offset = tab - insertion_point | 0; - /*<>*/ return 0 <= offset - ? break_same_line(state, [0, cst$0, offset + n | 0, cst]) - : break_new_line - (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]); + /*<>*/ if(0 <= offset){ + /*<>*/ break_same_line + (state, [0, cst$0, offset + n | 0, cst]); + /*<>*/ return; + } + /*<>*/ break_new_line + (state, [0, cst$2, tab + off$0 | 0, cst$1], state[6]); + /*<>*/ return; case 3: var ty = param[2], @@ -25755,19 +25831,22 @@ 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]); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); + /*<>*/ return; case 4: var tbox = param[1]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Stack[3], tbox, state[3]); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Stack[3], tbox, state[3]); + /*<>*/ return; 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]); + caml_call2(Stdlib_Stack[3], tag_name$0, state[5]); + return; } } function advance_left(state){ @@ -25781,10 +25860,10 @@ length = match$0[3], token = match$0[2], pending_count = state[13] - state[12] | 0, - /*<>*/ _bM_ = 0 <= size ? 1 : 0, - /*<>*/ _bN_ = - _bM_ || (state[9] <= pending_count ? 1 : 0); - if(! _bN_) /*<>*/ return _bN_; + /*<>*/ _bK_ = 0 <= size ? 1 : 0, + /*<>*/ _bL_ = + _bK_ || (state[9] <= pending_count ? 1 : 0); + if(! _bL_) /*<>*/ return _bL_; /*<>*/ /*<>*/ caml_call1 (Stdlib_Queue[5], state[28]); /*<>*/ /*<>*/ var @@ -25806,48 +25885,40 @@ (Stdlib_Stack[9], stack); /*<>*/ /*<>*/ var queue_elem = [0, unknown, _b_, 0]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Stack[3], [0, -1, queue_elem], stack); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Stack[3], [0, -1, queue_elem], stack); + /*<>*/ return; /*<>*/ } function set_size(state, ty){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[8], state[1]); - if(! match) /*<>*/ return 0; + if(! match) /*<>*/ return; /*<>*/ var match$0 = match[1], queue_elem = match$0[2], left_total = match$0[1], /*<>*/ size = queue_elem[1]; - if(left_total < state[12]) return initialize_scan_stack(state[1]); - var _bI_ = queue_elem[2]; - if(typeof _bI_ !== "number") - switch(_bI_[0]){ + if(left_total < state[12]){initialize_scan_stack(state[1]); return;} + var _bJ_ = queue_elem[2]; + if(typeof _bJ_ !== "number") + switch(_bJ_[0]){ case 3: - var - _bK_ = 1 - ty, - _bL_ = - _bK_ - ? (queue_elem - [1] - = state[13] + size | 0, - /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), - 0) - : _bK_; - /*<>*/ return _bL_; + if(1 - ty){ + queue_elem[1] = state[13] + size | 0; + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[5], state[1]); + } + /*<>*/ return; case 1: case 2: - var - _bJ_ = - ty - ? (queue_elem - [1] - = state[13] + size | 0, - /*<>*/ caml_call1(Stdlib_Stack[5], state[1]), - 0) - : ty; - /*<>*/ return _bJ_; + if(ty){ + queue_elem[1] = state[13] + size | 0; + /*<>*/ /*<>*/ caml_call1 + (Stdlib_Stack[5], state[1]); + } + /*<>*/ return; } - /*<>*/ return 0; + /*<>*/ return; /*<>*/ } function scan_push(state, b, token){ /*<>*/ pp_enqueue(state, token); @@ -25865,26 +25936,26 @@ /*<>*/ elem = [0, size, [3, indent, br_ty], 0]; /*<>*/ return scan_push(state, 0, elem); } - var _bH_ = state[14] === state[15] ? 1 : 0; - if(! _bH_) return _bH_; + var _bI_ = state[14] === state[15] ? 1 : 0; + if(! _bI_) return _bI_; var s = state[16]; /*<>*/ return enqueue_string_as (state, caml_ml_string_length(s), s); /*<>*/ } function pp_close_box(state, param){ - /*<>*/ var _bF_ = 1 < state[14] ? 1 : 0; - if(_bF_){ + /*<>*/ var _bG_ = 1 < state[14] ? 1 : 0; + if(_bG_){ 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 _bG_ = 0; + var _bH_ = 0; } else - var _bG_ = _bF_; - return _bG_; + var _bH_ = _bG_; + return _bH_; /*<>*/ } function pp_open_stag(state, tag_name){ /*<>*/ if(state[22]){ @@ -25893,8 +25964,8 @@ /*<>*/ /*<>*/ caml_call1 (state[26], tag_name); } - var _bE_ = state[23]; - if(! _bE_) return _bE_; + var _bF_ = state[23]; + if(! _bF_) return _bF_; /*<>*/ /*<>*/ var token = [5, tag_name]; /*<>*/ return pp_enqueue(state, [0, zero, token, 0]); @@ -25902,8 +25973,8 @@ function pp_close_stag(state, param){ /*<>*/ if(state[23]) /*<>*/ pp_enqueue(state, [0, zero, 5, 0]); - var _bC_ = state[22]; - if(_bC_){ + var _bD_ = state[22]; + if(_bD_){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(Stdlib_Stack[5], state[4]); if(match){ @@ -25911,11 +25982,11 @@ /*<>*/ return /*<>*/ caml_call1 (state[27], tag_name); } - var _bD_ = 0; + var _bE_ = 0; } else - var _bD_ = _bC_; - /*<>*/ return _bD_; + var _bE_ = _bD_; + /*<>*/ return _bE_; /*<>*/ } function pp_set_print_tags(state, b){ /*<>*/ state[22] = b; @@ -25969,25 +26040,26 @@ /*<>*/ return pp_open_box_gen(state, 0, 3); /*<>*/ } function pp_flush_queue(state, end_with_newline){ - /*<>*/ var _bA_ = state[4]; - function _bB_(param){ + /*<>*/ var _bB_ = state[4]; + function _bC_(param){ /*<>*/ return pp_close_stag(state, 0); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[13], _bB_, _bA_); + (Stdlib_Stack[13], _bC_, _bB_); /*<>*/ for(;;){ if(1 >= state[14]){ state[13] = pp_infinity; /*<>*/ advance_left(state); if(end_with_newline) /*<>*/ pp_output_newline(state); - /*<>*/ return pp_rinit(state); + /*<>*/ pp_rinit(state); + /*<>*/ return; } /*<>*/ pp_close_box(state, 0); } /*<>*/ } function pp_print_as_size(state, size, s){ - /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; - return _bz_ ? enqueue_string_as(state, size, s) : _bz_; + /*<>*/ var _bA_ = state[14] < state[15] ? 1 : 0; + return _bA_ ? enqueue_string_as(state, size, s) : _bA_; /*<>*/ } function pp_print_as(state, isize, s){ /*<>*/ return pp_print_as_size(state, isize, s); @@ -26046,20 +26118,20 @@ (state[18], 0); /*<>*/ } function pp_force_newline(state, param){ - /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; - return _by_ ? enqueue_advance(state, [0, zero, 3, 0]) : _by_; + /*<>*/ var _bz_ = state[14] < state[15] ? 1 : 0; + return _bz_ ? enqueue_advance(state, [0, zero, 3, 0]) : _bz_; /*<>*/ } function pp_print_if_newline(state, param){ - /*<>*/ var _bx_ = state[14] < state[15] ? 1 : 0; - return _bx_ ? enqueue_advance(state, [0, zero, 4, 0]) : _bx_; + /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; + return _by_ ? enqueue_advance(state, [0, zero, 4, 0]) : _by_; /*<>*/ } function pp_print_custom_break(state, fits, breaks){ /*<>*/ var after = fits[3], width = fits[2], before = fits[1], - _bw_ = state[14] < state[15] ? 1 : 0; - if(! _bw_) return _bw_; + _bx_ = state[14] < state[15] ? 1 : 0; + if(! _bx_) return _bx_; /*<>*/ var size = - state[13] | 0, /*<>*/ token = [1, fits, breaks], @@ -26082,33 +26154,33 @@ /*<>*/ } function pp_open_tbox(state, param){ /*<>*/ state[14] = state[14] + 1 | 0; - var _bv_ = state[14] < state[15] ? 1 : 0; - if(! _bv_) return _bv_; + var _bw_ = state[14] < state[15] ? 1 : 0; + if(! _bw_) return _bw_; /*<>*/ /*<>*/ var elem = [0, zero, [4, [0, [0, 0]]], 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_close_tbox(state, param){ - /*<>*/ var _bs_ = 1 < state[14] ? 1 : 0; - if(_bs_){ - var _bt_ = state[14] < state[15] ? 1 : 0; - if(_bt_){ + /*<>*/ var _bt_ = 1 < state[14] ? 1 : 0; + if(_bt_){ + var _bu_ = state[14] < state[15] ? 1 : 0; + if(_bu_){ /*<>*/ /*<>*/ var elem = [0, zero, 2, 0]; /*<>*/ enqueue_advance(state, elem); state[14] = state[14] - 1 | 0; - var _bu_ = 0; + var _bv_ = 0; } else - var _bu_ = _bt_; + var _bv_ = _bu_; } else - var _bu_ = _bs_; - return _bu_; + var _bv_ = _bt_; + return _bv_; /*<>*/ } function pp_print_tbreak(state, width, offset){ - /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; - if(! _br_) return _br_; + /*<>*/ var _bs_ = state[14] < state[15] ? 1 : 0; + if(! _bs_) return _bs_; /*<>*/ var size = - state[13] | 0, /*<>*/ elem = [0, size, [2, width, offset], width]; @@ -26118,17 +26190,17 @@ /*<>*/ return pp_print_tbreak(state, 0, 0); /*<>*/ } function pp_set_tab(state, param){ - /*<>*/ var _bq_ = state[14] < state[15] ? 1 : 0; - if(! _bq_) return _bq_; + /*<>*/ var _br_ = state[14] < state[15] ? 1 : 0; + if(! _br_) return _br_; /*<>*/ /*<>*/ var elem = [0, zero, 0, 0]; /*<>*/ return enqueue_advance(state, elem); /*<>*/ } function pp_set_max_boxes(state, n){ /*<>*/ var - _bo_ = 1 < n ? 1 : 0, - _bp_ = _bo_ ? (state[15] = n, 0) : _bo_; - return _bp_; + _bp_ = 1 < n ? 1 : 0, + _bq_ = _bp_ ? (state[15] = n, 0) : _bp_; + return _bq_; /*<>*/ } function pp_get_max_boxes(state, param){ /*<>*/ return state[15]; @@ -26147,10 +26219,10 @@ /*<>*/ return n < 1000000010 ? n : 1000000009; /*<>*/ } function pp_set_max_indent(state, n$0){ - /*<>*/ var _bn_ = 1 < n$0 ? 1 : 0; + /*<>*/ var _bo_ = 1 < n$0 ? 1 : 0; + if(! _bo_) return _bo_; + var n$1 = state[6] - n$0 | 0, _bn_ = 1 <= n$1 ? 1 : 0; if(! _bn_) return _bn_; - var n$1 = state[6] - n$0 | 0, _bm_ = 1 <= n$1 ? 1 : 0; - if(! _bm_) return _bm_; /*<>*/ /*<>*/ var n = pp_limit(n$1); state[7] = n; state[8] = state[6] - state[7] | 0; @@ -26160,19 +26232,19 @@ /*<>*/ return state[8]; /*<>*/ } function pp_set_margin(state, n){ - /*<>*/ var _bk_ = 1 <= n ? 1 : 0; - if(! _bk_) return _bk_; + /*<>*/ var _bl_ = 1 <= n ? 1 : 0; + if(! _bl_) return _bl_; /*<>*/ /*<>*/ var n$0 = pp_limit(n); state[6] = n$0; if(state[8] <= state[6]) var new_max_indent = state[8]; else /*<>*/ var - /*<>*/ _bl_ = + /*<>*/ _bm_ = /*<>*/ caml_call2 (Stdlib_Int[11], state[6] - state[7] | 0, state[6] / 2 | 0), new_max_indent = - /*<>*/ caml_call2(Stdlib_Int[11], _bl_, 1); + /*<>*/ caml_call2(Stdlib_Int[11], _bm_, 1); /*<>*/ return pp_set_max_indent(state, new_max_indent); /*<>*/ } function validate_geometry(param){ @@ -26203,11 +26275,11 @@ /*<>*/ return pp_set_full_geometry(state, geometry); /*<>*/ var msg = match[1], - /*<>*/ _bj_ = + /*<>*/ _bk_ = /*<>*/ caml_call2 (Stdlib[28], cst_Format_pp_set_geometry, msg); /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], _bj_], 1); + ([0, Stdlib[6], _bk_], 1); /*<>*/ } function pp_safe_set_geometry(state, max_indent, margin){ /*<>*/ /*<>*/ var @@ -26260,8 +26332,8 @@ function display_blanks(state, n){ /*<>*/ var n$0 = n; /*<>*/ for(;;){ - var _bi_ = 0 < n$0 ? 1 : 0; - if(! _bi_) return _bi_; + var _bj_ = 0 < n$0 ? 1 : 0; + if(! _bj_) return _bj_; if(80 >= n$0) /*<>*/ return /*<>*/ caml_call3 (state[17], blank_line, 0, n$0); @@ -26281,9 +26353,9 @@ (Stdlib[63], oc); /*<>*/ }; state[19] = - function(_bh_){ /*<>*/ return display_newline(state, _bh_);}; - state[20] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; - state[21] = function(_bf_){ /*<>*/ return display_blanks(state, _bf_);}; + function(_bi_){ /*<>*/ return display_newline(state, _bi_);}; + state[20] = function(_bh_){ /*<>*/ return display_blanks(state, _bh_);}; + state[21] = function(_bg_){ /*<>*/ return display_blanks(state, _bg_);}; return 0; /*<>*/ } function default_pp_mark_open_tag(param){ @@ -26291,23 +26363,23 @@ /*<>*/ return cst$10; /*<>*/ var s = param[2], - /*<>*/ _be_ = + /*<>*/ _bf_ = /*<>*/ caml_call2(Stdlib[28], s, cst$8); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$9, _be_); + (Stdlib[28], cst$9, _bf_); /*<>*/ } function default_pp_mark_close_tag(param){ /*<>*/ if(param[1] !== String_tag) /*<>*/ return cst$13; /*<>*/ var s = param[2], - /*<>*/ _bd_ = + /*<>*/ _be_ = /*<>*/ caml_call2(Stdlib[28], s, cst$11); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$12, _bd_); + (Stdlib[28], cst$12, _be_); /*<>*/ } - function default_pp_print_open_tag(_bc_){ /*<>*/ return 0;} - function default_pp_print_close_tag(_bb_){ /*<>*/ return 0;} + function default_pp_print_open_tag(_bd_){ /*<>*/ return 0;} + function default_pp_print_close_tag(_bc_){ /*<>*/ return 0;} function pp_make_formatter(f, g, h, i, j){ /*<>*/ var /*<>*/ pp_queue = @@ -26321,19 +26393,19 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, 1, sys_tok], scan_stack); /*<>*/ var - _a9_ = Stdlib[19], - /*<>*/ _a__ = + _a__ = Stdlib[19], + /*<>*/ _a$_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _a$_ = + /*<>*/ _ba_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - /*<>*/ _ba_ = + /*<>*/ _bb_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0); /*<>*/ return [0, scan_stack, /*<>*/ caml_call1(Stdlib_Stack[2], 0), + _bb_, _ba_, _a$_, - _a__, 78, 10, 68, @@ -26343,7 +26415,7 @@ 1, 1, 1, - _a9_, + _a__, cst$14, f, g, @@ -26363,30 +26435,30 @@ (out_funs[1], out_funs[2], out_funs[3], out_funs[4], out_funs[5]); /*<>*/ } function make_formatter(output, flush){ - function _a1_(_a8_){ /*<>*/ return 0;} - function _a2_(_a7_){ /*<>*/ return 0;} + function _a2_(_a9_){ /*<>*/ return 0;} + function _a3_(_a8_){ /*<>*/ return 0;} /*<>*/ /*<>*/ var ppf = pp_make_formatter - (output, flush, function(_a6_){ /*<>*/ return 0;}, _a2_, _a1_); - ppf[19] = function(_a5_){ /*<>*/ return display_newline(ppf, _a5_);}; - ppf[20] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; - ppf[21] = function(_a3_){ /*<>*/ return display_blanks(ppf, _a3_);}; + (output, flush, function(_a7_){ /*<>*/ return 0;}, _a3_, _a2_); + ppf[19] = function(_a6_){ /*<>*/ return display_newline(ppf, _a6_);}; + ppf[20] = function(_a5_){ /*<>*/ return display_blanks(ppf, _a5_);}; + ppf[21] = function(_a4_){ /*<>*/ return display_blanks(ppf, _a4_);}; /*<>*/ return ppf; /*<>*/ } function formatter_of_out_channel(oc){ - function _a0_(param){ + function _a1_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _a0_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _a1_); /*<>*/ } function formatter_of_buffer(b){ - /*<>*/ function _aY_(_aZ_){ /*<>*/ return 0;} + /*<>*/ function _aZ_(_a0_){ /*<>*/ return 0;} /*<>*/ return make_formatter ( /*<>*/ caml_call1(Stdlib_Buffer[18], b), - _aY_); + _aZ_); /*<>*/ } var pp_buffer_size = 512; function pp_make_buffer(param){ @@ -26417,9 +26489,9 @@ (Stdlib_Domain[10][3], str_formatter_key, str_formatter); /*<>*/ function buffered_out_string(key, str, ofs, len){ /*<>*/ /*<>*/ var - _aX_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); + _aY_ = /*<>*/ caml_call1(Stdlib_Domain[10][2], key); /*<>*/ return /*<>*/ caml_call4 - (Stdlib_Buffer[18], _aX_, str, ofs, len); + (Stdlib_Buffer[18], _aY_, str, ofs, len); /*<>*/ } function buffered_out_flush(oc, key, param){ /*<>*/ var @@ -26451,31 +26523,31 @@ err_buf_key = /*<>*/ caml_call2(Stdlib_Domain[10][1], 0, _i_); function _j_(param){ - function _aG_(_aW_){ /*<>*/ return 0;} - function _aH_(_aV_){ /*<>*/ return 0;} - function _aI_(_aU_){ /*<>*/ return 0;} - var _aJ_ = Stdlib[39]; - /*<>*/ function _aK_(_aT_){ - /*<>*/ return buffered_out_flush(_aJ_, std_buf_key, _aT_); + function _aH_(_aX_){ /*<>*/ return 0;} + function _aI_(_aW_){ /*<>*/ return 0;} + function _aJ_(_aV_){ /*<>*/ return 0;} + var _aK_ = Stdlib[39]; + /*<>*/ function _aL_(_aU_){ + /*<>*/ return buffered_out_flush(_aK_, std_buf_key, _aU_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_aQ_, _aR_, _aS_){ - /*<>*/ return buffered_out_string(std_buf_key, _aQ_, _aR_, _aS_); + (function(_aR_, _aS_, _aT_){ + /*<>*/ return buffered_out_string(std_buf_key, _aR_, _aS_, _aT_); }, - _aK_, + _aL_, + _aJ_, _aI_, - _aH_, - _aG_); - ppf[19] = function(_aP_){ /*<>*/ return display_newline(ppf, _aP_);}; - ppf[20] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; - ppf[21] = function(_aN_){ /*<>*/ return display_blanks(ppf, _aN_);}; - /*<>*/ function _aL_(_aM_){ - /*<>*/ return pp_print_flush(ppf, _aM_); + _aH_); + ppf[19] = function(_aQ_){ /*<>*/ return display_newline(ppf, _aQ_);}; + ppf[20] = function(_aP_){ /*<>*/ return display_blanks(ppf, _aP_);}; + ppf[21] = function(_aO_){ /*<>*/ return display_blanks(ppf, _aO_);}; + /*<>*/ function _aM_(_aN_){ + /*<>*/ return pp_print_flush(ppf, _aN_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _aL_); + (Stdlib_Domain[6], _aM_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -26484,31 +26556,31 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Domain[10][3], std_formatter_key, std_formatter); function _k_(param){ - function _ap_(_aF_){ /*<>*/ return 0;} - function _aq_(_aE_){ /*<>*/ return 0;} - function _ar_(_aD_){ /*<>*/ return 0;} - var _as_ = Stdlib[40]; - /*<>*/ function _at_(_aC_){ - /*<>*/ return buffered_out_flush(_as_, err_buf_key, _aC_); + function _aq_(_aG_){ /*<>*/ return 0;} + function _ar_(_aF_){ /*<>*/ return 0;} + function _as_(_aE_){ /*<>*/ return 0;} + var _at_ = Stdlib[40]; + /*<>*/ function _au_(_aD_){ + /*<>*/ return buffered_out_flush(_at_, err_buf_key, _aD_); } /*<>*/ /*<>*/ var ppf = pp_make_formatter - (function(_az_, _aA_, _aB_){ - /*<>*/ return buffered_out_string(err_buf_key, _az_, _aA_, _aB_); + (function(_aA_, _aB_, _aC_){ + /*<>*/ return buffered_out_string(err_buf_key, _aA_, _aB_, _aC_); }, - _at_, + _au_, + _as_, _ar_, - _aq_, - _ap_); - ppf[19] = function(_ay_){ /*<>*/ return display_newline(ppf, _ay_);}; - ppf[20] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; - ppf[21] = function(_aw_){ /*<>*/ return display_blanks(ppf, _aw_);}; - /*<>*/ function _au_(_av_){ - /*<>*/ return pp_print_flush(ppf, _av_); + _aq_); + ppf[19] = function(_az_){ /*<>*/ return display_newline(ppf, _az_);}; + ppf[20] = function(_ay_){ /*<>*/ return display_blanks(ppf, _ay_);}; + ppf[21] = function(_ax_){ /*<>*/ return display_blanks(ppf, _ax_);}; + /*<>*/ function _av_(_aw_){ + /*<>*/ return pp_print_flush(ppf, _aw_); } /*<>*/ /*<>*/ caml_call1 - (Stdlib_Domain[6], _au_); + (Stdlib_Domain[6], _av_); /*<>*/ return ppf; /*<>*/ } /*<>*/ /*<>*/ var @@ -26551,7 +26623,7 @@ (stdbuf, str_formatter); /*<>*/ } function make_synchronized_formatter(output, flush){ - function _an_(param){ + function _ao_(param){ /*<>*/ var /*<>*/ buf = /*<>*/ caml_call1 @@ -26560,12 +26632,12 @@ /*<>*/ caml_call1(Stdlib_Buffer[18], buf); function flush$0(param){ /*<>*/ /*<>*/ var - _ao_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); + _ap_ = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); /*<>*/ /*<>*/ caml_call3 (output, /*<>*/ caml_call1(Stdlib_Buffer[2], buf), 0, - _ao_); + _ap_); /*<>*/ /*<>*/ caml_call1 (Stdlib_Buffer[8], buf); /*<>*/ return /*<>*/ caml_call1 @@ -26574,15 +26646,15 @@ /*<>*/ return make_formatter(output$0, flush$0); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Domain[10][1], 0, _an_); + (Stdlib_Domain[10][1], 0, _ao_); /*<>*/ } function synchronized_formatter_of_out_(oc){ - function _am_(param){ + function _an_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[63], oc); /*<>*/ } /*<>*/ return make_synchronized_formatter - ( /*<>*/ caml_call1(Stdlib[69], oc), _am_); + ( /*<>*/ caml_call1(Stdlib[69], oc), _an_); /*<>*/ } function make_symbolic_output_buffer(param){ /*<>*/ return [0, 0]; /*<>*/ } @@ -26611,10 +26683,10 @@ /*<>*/ caml_call3 (Stdlib_String[16], s, i, n)]); } - /*<>*/ function g(_al_){ + /*<>*/ function g(_am_){ /*<>*/ return add_symbolic_output_item(sob, 0); } - /*<>*/ function h(_ak_){ + /*<>*/ function h(_al_){ /*<>*/ return add_symbolic_output_item(sob, 1); } /*<>*/ function i(n){ @@ -26996,8 +27068,8 @@ /*<>*/ } for(;;){ if(right[1] === len){ - var _aj_ = left[1] !== len ? 1 : 0; - return _aj_ ? flush(0) : _aj_; + var _ak_ = left[1] !== len ? 1 : 0; + return _ak_ ? flush(0) : _ak_; } /*<>*/ /*<>*/ var match = /*<>*/ runtime.caml_string_get(s, right[1]); @@ -27019,7 +27091,7 @@ else var none = - function(param, _ai_){ + function(param, _aj_){ /*<>*/ return 0; /*<>*/ }; /*<>*/ if(! param) @@ -27118,56 +27190,56 @@ var acc$1 = match[1]; /*<>*/ output_acc(ppf, p$0); /*<>*/ var - /*<>*/ _$_ = compute_tag(output_acc, acc$1), + /*<>*/ _aa_ = compute_tag(output_acc, acc$1), /*<>*/ match$0 = /*<>*/ caml_call1 - (CamlinternalFormat[20], _$_), + (CamlinternalFormat[20], _aa_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _aa_ = acc[1]; - if(typeof _aa_ !== "number" && 0 === _aa_[0]){ - var _ab_ = _aa_[2]; - if(typeof _ab_ !== "number" && 1 === _ab_[0]){ - var s$0 = acc[2], size = _ab_[2], p$2 = _aa_[1]; + var _ab_ = acc[1]; + if(typeof _ab_ !== "number" && 0 === _ab_[0]){ + var _ac_ = _ab_[2]; + if(typeof _ac_ !== "number" && 1 === _ac_[0]){ + var s$0 = acc[2], size = _ac_[2], p$2 = _ab_[1]; break b; } } - var s = acc[2], p$1 = _aa_; + var s = acc[2], p$1 = _ab_; break a; case 3: - var _ac_ = acc[1]; - if(typeof _ac_ !== "number" && 0 === _ac_[0]){ - var _ad_ = _ac_[2]; - if(typeof _ad_ !== "number" && 1 === _ad_[0]){ - var c$0 = acc[2], size$0 = _ad_[2], p$4 = _ac_[1]; + var _ad_ = acc[1]; + if(typeof _ad_ !== "number" && 0 === _ad_[0]){ + var _ae_ = _ad_[2]; + if(typeof _ae_ !== "number" && 1 === _ae_[0]){ + var c$0 = acc[2], size$0 = _ae_[2], p$4 = _ad_[1]; break; } } - var c = acc[2], p$3 = _ac_; + var c = acc[2], p$3 = _ad_; break c; case 4: - var _ae_ = acc[1]; - if(typeof _ae_ !== "number" && 0 === _ae_[0]){ - var _af_ = _ae_[2]; - if(typeof _af_ !== "number" && 1 === _af_[0]){ - var s$0 = acc[2], size = _af_[2], p$2 = _ae_[1]; + var _af_ = acc[1]; + if(typeof _af_ !== "number" && 0 === _af_[0]){ + var _ag_ = _af_[2]; + if(typeof _ag_ !== "number" && 1 === _ag_[0]){ + var s$0 = acc[2], size = _ag_[2], p$2 = _af_[1]; break b; } } - var s = acc[2], p$1 = _ae_; + var s = acc[2], p$1 = _af_; break a; case 5: - var _ag_ = acc[1]; - if(typeof _ag_ !== "number" && 0 === _ag_[0]){ - var _ah_ = _ag_[2]; - if(typeof _ah_ !== "number" && 1 === _ah_[0]){ - var c$0 = acc[2], size$0 = _ah_[2], p$4 = _ag_[1]; + var _ah_ = acc[1]; + if(typeof _ah_ !== "number" && 0 === _ah_[0]){ + var _ai_ = _ah_[2]; + if(typeof _ai_ !== "number" && 1 === _ai_[0]){ + var c$0 = acc[2], size$0 = _ai_[2], p$4 = _ah_[1]; break; } } - var c = acc[2], p$3 = _ag_; + var c = acc[2], p$3 = _ah_; break c; case 6: var f$0 = acc[2], p$5 = acc[1]; @@ -27225,56 +27297,56 @@ var acc$1 = match[1]; /*<>*/ strput_acc(ppf, p$0); /*<>*/ var - /*<>*/ _S_ = compute_tag(strput_acc, acc$1), + /*<>*/ _T_ = compute_tag(strput_acc, acc$1), /*<>*/ match$0 = /*<>*/ caml_call1 - (CamlinternalFormat[20], _S_), + (CamlinternalFormat[20], _T_), bty = match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: - var _T_ = acc[1]; - if(typeof _T_ !== "number" && 0 === _T_[0]){ - var _U_ = _T_[2]; - if(typeof _U_ !== "number" && 1 === _U_[0]){ - var s$0 = acc[2], size = _U_[2], p$2 = _T_[1]; + var _U_ = acc[1]; + if(typeof _U_ !== "number" && 0 === _U_[0]){ + var _V_ = _U_[2]; + if(typeof _V_ !== "number" && 1 === _V_[0]){ + var s$0 = acc[2], size = _V_[2], p$2 = _U_[1]; break b; } } - var s = acc[2], p$1 = _T_; + var s = acc[2], p$1 = _U_; break a; case 3: - var _V_ = acc[1]; - if(typeof _V_ !== "number" && 0 === _V_[0]){ - var _W_ = _V_[2]; - if(typeof _W_ !== "number" && 1 === _W_[0]){ - var c$0 = acc[2], size$0 = _W_[2], p$4 = _V_[1]; + var _W_ = acc[1]; + if(typeof _W_ !== "number" && 0 === _W_[0]){ + var _X_ = _W_[2]; + if(typeof _X_ !== "number" && 1 === _X_[0]){ + var c$0 = acc[2], size$0 = _X_[2], p$4 = _W_[1]; break; } } - var c = acc[2], p$3 = _V_; + var c = acc[2], p$3 = _W_; break c; case 4: - var _X_ = acc[1]; - if(typeof _X_ !== "number" && 0 === _X_[0]){ - var _Y_ = _X_[2]; - if(typeof _Y_ !== "number" && 1 === _Y_[0]){ - var s$0 = acc[2], size = _Y_[2], p$2 = _X_[1]; + var _Y_ = acc[1]; + if(typeof _Y_ !== "number" && 0 === _Y_[0]){ + var _Z_ = _Y_[2]; + if(typeof _Z_ !== "number" && 1 === _Z_[0]){ + var s$0 = acc[2], size = _Z_[2], p$2 = _Y_[1]; break b; } } - var s = acc[2], p$1 = _X_; + var s = acc[2], p$1 = _Y_; break a; case 5: - var _Z_ = acc[1]; - if(typeof _Z_ !== "number" && 0 === _Z_[0]){ - var ___ = _Z_[2]; - if(typeof ___ !== "number" && 1 === ___[0]){ - var c$0 = acc[2], size$0 = ___[2], p$4 = _Z_[1]; + var ___ = acc[1]; + if(typeof ___ !== "number" && 0 === ___[0]){ + var _$_ = ___[2]; + if(typeof _$_ !== "number" && 1 === _$_[0]){ + var c$0 = acc[2], size$0 = _$_[2], p$4 = ___[1]; break; } } - var c = acc[2], p$3 = _Z_; + var c = acc[2], p$3 = ___; break c; case 6: var p$5 = acc[1]; @@ -27320,13 +27392,13 @@ function kfprintf(k, ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _Q_ = 0; - function _R_(acc){ + /*<>*/ _R_ = 0; + function _S_(acc){ /*<>*/ output_acc(ppf, acc); return caml_call1(k, ppf); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _R_, _Q_, fmt); + (CamlinternalFormat[7], _S_, _R_, fmt); } function ikfprintf(k, ppf, param){ var fmt = param[1]; @@ -27336,47 +27408,47 @@ function ifprintf(ppf, param){ /*<>*/ var fmt = param[1], - /*<>*/ _N_ = 0; - function _O_(_P_){ /*<>*/ return 0;} + /*<>*/ _O_ = 0; + function _P_(_Q_){ /*<>*/ return 0;} /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[8], _O_, _N_, fmt); + (CamlinternalFormat[8], _P_, _O_, fmt); } function fprintf(ppf){ - function _K_(_M_){ /*<>*/ return 0;} - /*<>*/ return function(_L_){ - /*<>*/ return kfprintf(_K_, ppf, _L_);}; + function _L_(_N_){ /*<>*/ return 0;} + /*<>*/ return function(_M_){ + /*<>*/ return kfprintf(_L_, ppf, _M_);}; /*<>*/ } function printf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _I_ = 0; - function _J_(acc){ + /*<>*/ _J_ = 0; + function _K_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], std_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _J_, _I_, fmt); + (CamlinternalFormat[7], _K_, _J_, fmt); } function eprintf(param){ /*<>*/ var fmt = param[1], - /*<>*/ _G_ = 0; - function _H_(acc){ + /*<>*/ _H_ = 0; + function _I_(acc){ /*<>*/ return output_acc ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], err_formatter_key), acc); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _H_, _G_, fmt); + (CamlinternalFormat[7], _I_, _H_, fmt); } function kdprintf(k, param){ /*<>*/ var fmt = param[1], - /*<>*/ _E_ = 0; - function _F_(acc){ + /*<>*/ _F_ = 0; + function _G_(acc){ /*<>*/ return /*<>*/ caml_call1 (k, function(ppf){ @@ -27384,7 +27456,7 @@ /*<>*/ }); /*<>*/ } /*<>*/ return /*<>*/ caml_call3 - (CamlinternalFormat[7], _F_, _E_, fmt); + (CamlinternalFormat[7], _G_, _F_, fmt); } function dprintf(fmt){ /*<>*/ return kdprintf @@ -27442,44 +27514,44 @@ /*<>*/ var /*<>*/ fs = pp_get_formatter_out_functions(std_formatter, 0), - _m_ = fs[5], - _n_ = fs[4], - _o_ = fs[3], - _p_ = Stdlib[39]; - /*<>*/ function _q_(_D_){ - /*<>*/ return buffered_out_flush(_p_, std_buf_key, _D_); + _n_ = fs[5], + _o_ = fs[4], + _p_ = fs[3], + _q_ = Stdlib[39]; + /*<>*/ function _r_(_E_){ + /*<>*/ return buffered_out_flush(_q_, std_buf_key, _E_); } /*<>*/ pp_set_formatter_out_functions (std_formatter, [0, - function(_A_, _B_, _C_){ - /*<>*/ return buffered_out_string(std_buf_key, _A_, _B_, _C_); + function(_B_, _C_, _D_){ + /*<>*/ return buffered_out_string(std_buf_key, _B_, _C_, _D_); }, - _q_, + _r_, + _p_, _o_, - _n_, - _m_]); + _n_]); /*<>*/ var /*<>*/ fs$0 = pp_get_formatter_out_functions(err_formatter, 0), - _r_ = fs$0[5], - _s_ = fs$0[4], - _t_ = fs$0[3], - _u_ = Stdlib[40]; - /*<>*/ function _v_(_z_){ - /*<>*/ return buffered_out_flush(_u_, err_buf_key, _z_); + _s_ = fs$0[5], + _t_ = fs$0[4], + _u_ = fs$0[3], + _v_ = Stdlib[40]; + /*<>*/ function _w_(_A_){ + /*<>*/ return buffered_out_flush(_v_, err_buf_key, _A_); } /*<>*/ return pp_set_formatter_out_functions (err_formatter, [0, - function(_w_, _x_, _y_){ + function(_x_, _y_, _z_){ /*<>*/ return buffered_out_string - (err_buf_key, _w_, _x_, _y_); + (err_buf_key, _x_, _y_, _z_); }, - _v_, + _w_, + _u_, _t_, - _s_, - _r_]); + _s_]); /*<>*/ } /*<>*/ /*<>*/ caml_call1 (Stdlib_Domain[5], _l_); @@ -27682,6 +27754,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var + _u_ = undefined, global_data = runtime.caml_get_global_data(), cst$3 = cst$5, cst$4 = cst$5, @@ -27805,9 +27878,9 @@ if(10 === c) ib[5] = ib[5] + 1 | 0; /*<>*/ return c; } - catch(_bb_){ - var _ba_ = caml_wrap_exception(_bb_); - if(_ba_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_ba_, 0); + catch(_bc_){ + var _bb_ = caml_wrap_exception(_bc_); + if(_bb_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_bb_, 0); ib[2] = null_char; ib[3] = 0; ib[1] = 1; @@ -27900,8 +27973,8 @@ /*<>*/ return create(1, next); /*<>*/ } var _a_ = 0; - /*<>*/ function from_function(_a$_){ - /*<>*/ return create(_a_, _a$_); + /*<>*/ function from_function(_ba_){ + /*<>*/ return create(_a_, _ba_); } /*<>*/ /*<>*/ var len = 1024; function scan_close_at_end(ic){ @@ -27948,12 +28021,12 @@ return from_ic(scan_close_at_end, [1, fname, ic], ic); /*<>*/ } var _b_ = Stdlib[79]; - /*<>*/ function open_in(_a__){ - /*<>*/ return open_in_file(_b_, _a__); + /*<>*/ function open_in(_a$_){ + /*<>*/ return open_in_file(_b_, _a$_); } /*<>*/ /*<>*/ var _c_ = Stdlib[80]; - /*<>*/ function open_in_bin(_a9_){ - /*<>*/ return open_in_file(_c_, _a9_); + /*<>*/ function open_in_bin(_a__){ + /*<>*/ return open_in_file(_c_, _a__); } function from_channel(ic){ /*<>*/ return from_ic(scan_raise_at_end, [0, ic], ic); @@ -28016,15 +28089,15 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _a7_ = 1 - ib[1]; - if(! _a7_) /*<>*/ return _a7_; - /*<>*/ /*<>*/ var _a8_ = c - 9 | 0; + /*<>*/ _a8_ = 1 - ib[1]; + if(! _a8_) /*<>*/ return _a8_; + /*<>*/ /*<>*/ var _a9_ = c - 9 | 0; a: { - if(4 < _a8_ >>> 0){ - if(23 === _a8_) break a; + if(4 < _a9_ >>> 0){ + if(23 === _a9_) break a; } - else if(1 < _a8_ - 2 >>> 0) break a; + else if(1 < _a9_ - 2 >>> 0) break a; /*<>*/ return 0; } /*<>*/ invalidate_current_char(ib); @@ -28070,23 +28143,23 @@ /*<>*/ switch(conv){ case 0: /*<>*/ var - /*<>*/ _a3_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a3_); + /*<>*/ _a4_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0b, _a4_); break; case 3: /*<>*/ var - /*<>*/ _a4_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a4_); + /*<>*/ _a5_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0o, _a5_); break; case 4: /*<>*/ var - /*<>*/ _a5_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a5_); + /*<>*/ _a6_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0u, _a6_); break; case 5: /*<>*/ var - /*<>*/ _a6_ = token_string(ib), - tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a6_); + /*<>*/ _a7_ = token_string(ib), + tok = /*<>*/ caml_call2(Stdlib[28], cst_0x, _a7_); break; default: var tok = token_string(ib); } @@ -28171,31 +28244,31 @@ function is_binary_digit(param){ /*<>*/ return 1 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_binary_int(_a1_, _a2_){ - /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a1_, _a2_); + /*<>*/ function scan_binary_int(_a2_, _a3_){ + /*<>*/ return scan_digit_plus(cst_binary, is_binary_digit, _a2_, _a3_); } function is_octal_digit(param){ /*<>*/ return 7 < param - 48 >>> 0 ? 0 : 1; /*<>*/ } - /*<>*/ function scan_octal_int(_aZ_, _a0_){ - /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _aZ_, _a0_); + /*<>*/ function scan_octal_int(_a0_, _a1_){ + /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _a0_, _a1_); } function is_hexa_digit(param){ /*<>*/ /*<>*/ var - _aY_ = param - 48 | 0; + _aZ_ = param - 48 | 0; a: { - if(22 < _aY_ >>> 0){ - if(5 < _aY_ - 49 >>> 0) break a; + if(22 < _aZ_ >>> 0){ + if(5 < _aZ_ - 49 >>> 0) break a; } - else if(6 >= _aY_ - 10 >>> 0) break a; + else if(6 >= _aZ_ - 10 >>> 0) break a; /*<>*/ return 1; } /*<>*/ return 0; /*<>*/ } - /*<>*/ function scan_hexadecimal_int(_aW_, _aX_){ + /*<>*/ function scan_hexadecimal_int(_aX_, _aY_){ /*<>*/ return scan_digit_plus - (cst_hexadecimal, is_hexa_digit, _aW_, _aX_); + (cst_hexadecimal, is_hexa_digit, _aX_, _aY_); } function scan_sign(width, ib){ /*<>*/ var @@ -28315,38 +28388,38 @@ /*<>*/ len = /*<>*/ caml_ml_string_length(str), /*<>*/ width$0 = [0, width], - /*<>*/ _aT_ = len - 1 | 0, - /*<>*/ _aS_ = 0; - if(_aT_ >= 0){ - var i = _aS_; + /*<>*/ _aU_ = len - 1 | 0, + /*<>*/ _aT_ = 0; + if(_aU_ >= 0){ + var i = _aT_; for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - /*<>*/ _aU_ = + /*<>*/ _aV_ = lowercase( /*<>*/ caml_string_get(str, i)); - if(lowercase(c) !== _aU_) + if(lowercase(c) !== _aV_) /*<>*/ /*<>*/ caml_call1(error, 0); if(0 === width$0[1]) /*<>*/ /*<>*/ caml_call1(error, 0); width$0[1] = store_char(width$0[1], ib, c); - /*<>*/ /*<>*/ var _aV_ = i + 1 | 0; - if(_aT_ === i) break; - var i = _aV_; + /*<>*/ /*<>*/ var _aW_ = i + 1 | 0; + if(_aU_ === i) break; + var i = _aW_; } } return width$0[1]; /*<>*/ } function scan_hex_float(width, precision, ib){ /*<>*/ var - _aF_ = 0 === width ? 1 : 0, - _aG_ = _aF_ || end_of_input(ib); - /*<>*/ if(_aG_) + _aG_ = 0 === width ? 1 : 0, + _aH_ = _aG_ || end_of_input(ib); + /*<>*/ if(_aH_) /*<>*/ bad_hex_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _aH_ = 0 === width$0 ? 1 : 0, - _aI_ = _aH_ || end_of_input(ib); - /*<>*/ if(_aI_) + _aI_ = 0 === width$0 ? 1 : 0, + _aJ_ = _aI_ || end_of_input(ib); + /*<>*/ if(_aJ_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); a: @@ -28358,9 +28431,9 @@ if(32 <= switcher) break a; /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _aJ_ = 0 === width$1 ? 1 : 0, - _aK_ = _aJ_ || end_of_input(ib); - /*<>*/ if(_aK_) + _aK_ = 0 === width$1 ? 1 : 0, + _aL_ = _aK_ || end_of_input(ib); + /*<>*/ if(_aL_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$1, ib, bad_hex_float, cst_an); @@ -28371,24 +28444,24 @@ if(48 === c){ /*<>*/ var /*<>*/ width$3 = store_char(width$0, ib, c), - _aN_ = 0 === width$3 ? 1 : 0, - _aO_ = _aN_ || end_of_input(ib); - /*<>*/ if(_aO_) + _aO_ = 0 === width$3 ? 1 : 0, + _aP_ = _aO_ || end_of_input(ib); + /*<>*/ if(_aP_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ var width$4 = check_case_insensitive_string(width$3, ib, bad_hex_float, cst_x); /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var - _aP_ = peek_char(ib) - 46 | 0; + _aQ_ = peek_char(ib) - 46 | 0; b: { c: { - if(34 < _aP_ >>> 0){ - if(66 === _aP_) break c; + if(34 < _aQ_ >>> 0){ + if(66 === _aQ_) break c; } - else if(32 < _aP_ - 1 >>> 0) break c; + else if(32 < _aQ_ - 1 >>> 0) break c; var width$5 = scan_hexadecimal_int(width$4, ib); break b; } @@ -28436,9 +28509,9 @@ /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$1), - _aQ_ = 0 === width$9 ? 1 : 0, - _aR_ = _aQ_ || end_of_input(ib); - /*<>*/ if(_aR_) + _aR_ = 0 === width$9 ? 1 : 0, + _aS_ = _aR_ || end_of_input(ib); + /*<>*/ if(_aS_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -28453,9 +28526,9 @@ } /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _aL_ = 0 === width$2 ? 1 : 0, - _aM_ = _aL_ || end_of_input(ib); - /*<>*/ if(_aM_) + _aM_ = 0 === width$2 ? 1 : 0, + _aN_ = _aM_ || end_of_input(ib); + /*<>*/ if(_aN_) /*<>*/ bad_hex_float(0); /*<>*/ return check_case_insensitive_string (width$2, ib, bad_hex_float, cst_nfinity); @@ -28464,14 +28537,14 @@ /*<>*/ } function scan_caml_float_rest(width, precision, ib){ /*<>*/ var - _aB_ = 0 === width ? 1 : 0, - _aC_ = _aB_ || end_of_input(ib); - /*<>*/ if(_aC_) /*<>*/ bad_float(0); + _aC_ = 0 === width ? 1 : 0, + _aD_ = _aC_ || end_of_input(ib); + /*<>*/ if(_aD_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_decimal_digit_star(width, ib), - _aD_ = 0 === width$0 ? 1 : 0, - _aE_ = _aD_ || end_of_input(ib); - /*<>*/ if(_aE_) /*<>*/ bad_float(0); + _aE_ = 0 === width$0 ? 1 : 0, + _aF_ = _aE_ || end_of_input(ib); + /*<>*/ if(_aF_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c = peek_char(ib), /*<>*/ switcher = c - 69 | 0; @@ -28495,22 +28568,22 @@ /*<>*/ } function scan_caml_float(width, precision, ib){ /*<>*/ var - _an_ = 0 === width ? 1 : 0, - _ao_ = _an_ || end_of_input(ib); - /*<>*/ if(_ao_) /*<>*/ bad_float(0); + _ao_ = 0 === width ? 1 : 0, + _ap_ = _ao_ || end_of_input(ib); + /*<>*/ if(_ap_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _ap_ = 0 === width$0 ? 1 : 0, - _aq_ = _ap_ || end_of_input(ib); - /*<>*/ if(_aq_) /*<>*/ bad_float(0); + _aq_ = 0 === width$0 ? 1 : 0, + _ar_ = _aq_ || end_of_input(ib); + /*<>*/ if(_ar_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); if(49 <= c){ if(58 > c){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _ar_ = 0 === width$1 ? 1 : 0, - _as_ = _ar_ || end_of_input(ib); - /*<>*/ if(_as_) /*<>*/ bad_float(0); + _as_ = 0 === width$1 ? 1 : 0, + _at_ = _as_ || end_of_input(ib); + /*<>*/ if(_at_) /*<>*/ bad_float(0); /*<>*/ return scan_caml_float_rest (width$1, precision, ib); } @@ -28518,9 +28591,9 @@ else if(48 <= c){ /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _at_ = 0 === width$2 ? 1 : 0, - _au_ = _at_ || end_of_input(ib); - /*<>*/ if(_au_) /*<>*/ bad_float(0); + _au_ = 0 === width$2 ? 1 : 0, + _av_ = _au_ || end_of_input(ib); + /*<>*/ if(_av_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c$0 = peek_char(ib); if(88 !== c$0 && 120 !== c$0) @@ -28528,14 +28601,14 @@ (width$2, precision, ib); /*<>*/ var /*<>*/ width$3 = store_char(width$2, ib, c$0), - _av_ = 0 === width$3 ? 1 : 0, - _aw_ = _av_ || end_of_input(ib); - /*<>*/ if(_aw_) /*<>*/ bad_float(0); + _aw_ = 0 === width$3 ? 1 : 0, + _ax_ = _aw_ || end_of_input(ib); + /*<>*/ if(_ax_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$4 = scan_hexadecimal_int(width$3, ib), - _ax_ = 0 === width$4 ? 1 : 0, - _ay_ = _ax_ || end_of_input(ib); - /*<>*/ if(_ay_) /*<>*/ bad_float(0); + _ay_ = 0 === width$4 ? 1 : 0, + _az_ = _ay_ || end_of_input(ib); + /*<>*/ if(_az_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c$1 = peek_char(ib), /*<>*/ switcher = c$1 - 80 | 0; @@ -28588,9 +28661,9 @@ if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$2), - _az_ = 0 === width$9 ? 1 : 0, - _aA_ = _az_ || end_of_input(ib); - /*<>*/ if(_aA_) + _aA_ = 0 === width$9 ? 1 : 0, + _aB_ = _aA_ || end_of_input(ib); + /*<>*/ if(_aB_) /*<>*/ bad_hex_float(0); /*<>*/ return scan_optionally_signed_decimal (width$9, ib); @@ -28607,13 +28680,13 @@ /*<>*/ if(ib[1]) /*<>*/ return width$0; if(! stp){ - /*<>*/ /*<>*/ var _am_ = c - 9 | 0; + /*<>*/ /*<>*/ var _an_ = c - 9 | 0; a: { - if(4 < _am_ >>> 0){ - if(23 === _am_) break a; + if(4 < _an_ >>> 0){ + if(23 === _an_) break a; } - else if(1 < _am_ - 2 >>> 0) break a; + else if(1 < _an_ - 2 >>> 0) break a; /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), width$0 = width$2; @@ -28643,11 +28716,11 @@ (Stdlib_Printf[4], _f_, message)) : c; /*<>*/ } - /*<>*/ function check_next_char_for_char(_ak_, _al_){ - /*<>*/ return check_next_char(cst_a_Char, _ak_, _al_); + /*<>*/ function check_next_char_for_char(_al_, _am_){ + /*<>*/ return check_next_char(cst_a_Char, _al_, _am_); } - /*<>*/ function check_next_char_for_string(_ai_, _aj_){ - /*<>*/ return check_next_char(cst_a_String, _ai_, _aj_); + /*<>*/ function check_next_char_for_string(_aj_, _ak_){ + /*<>*/ return check_next_char(cst_a_String, _aj_, _ak_); } function scan_backslash_char(width, ib){ /*<>*/ /*<>*/ var @@ -28673,16 +28746,16 @@ b: { if(0 <= c && 255 >= c){ - var _ag_ = /*<>*/ caml_call1(Stdlib[29], c); + var _ah_ = /*<>*/ caml_call1(Stdlib[29], c); break b; } var - _ag_ = + _ah_ = bad_input ( /*<>*/ caml_call4 (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); } - /*<>*/ return store_char(width - 2 | 0, ib, _ag_); + /*<>*/ return store_char(width - 2 | 0, ib, _ah_); } /*<>*/ /*<>*/ var switcher = c0 - 92 | 0; @@ -28694,34 +28767,34 @@ function(param){ /*<>*/ var /*<>*/ c = next_char(ib), - /*<>*/ _ah_ = c - 48 | 0; + /*<>*/ _ai_ = c - 48 | 0; a: { - if(22 < _ah_ >>> 0){ - if(5 < _ah_ - 49 >>> 0) break a; + if(22 < _ai_ >>> 0){ + if(5 < _ai_ - 49 >>> 0) break a; } - else if(6 >= _ah_ - 10 >>> 0) break a; + else if(6 >= _ai_ - 10 >>> 0) break a; /*<>*/ return c; } /*<>*/ return bad_input_escape(c); /*<>*/ }, /*<>*/ c1 = get_digit(0), /*<>*/ c2 = get_digit(0), - /*<>*/ _ad_ = hexadecimal_value_of_char(c2), - c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ad_ | 0; + /*<>*/ _ae_ = hexadecimal_value_of_char(c2), + c$0 = (16 * hexadecimal_value_of_char(c1) | 0) + _ae_ | 0; b: { if(0 <= c$0 && 255 >= c$0){ - var _af_ = /*<>*/ caml_call1(Stdlib[29], c$0); + var _ag_ = /*<>*/ caml_call1(Stdlib[29], c$0); break b; } var - _af_ = + _ag_ = bad_input ( /*<>*/ caml_call3 (Stdlib_Printf[4], _m_, c1, c2)); } - /*<>*/ return store_char(width - 2 | 0, ib, _af_); + /*<>*/ return store_char(width - 2 | 0, ib, _ag_); case 0: case 6: case 18: @@ -28737,17 +28810,17 @@ if(117 > c0) switch(c0 - 110 | 0){ case 0: - var _ae_ = 10; break b; + var _af_ = 10; break b; case 4: - var _ae_ = 13; break b; + var _af_ = 13; break b; case 6: - var _ae_ = 9; break b; + var _af_ = 9; break b; } } - else if(98 === c0){var _ae_ = 8; break b;} - var _ae_ = c0; + else if(98 === c0){var _af_ = 8; break b;} + var _af_ = c0; } - /*<>*/ return store_char(width, ib, _ae_); + /*<>*/ return store_char(width, ib, _af_); } /*<>*/ return bad_input_escape(c0); /*<>*/ } @@ -28765,24 +28838,24 @@ check_next_char_for_string(width$1, ib); if(10 === match){ /*<>*/ /*<>*/ var - _ab_ = ignore_char(width$1, ib); + _ac_ = ignore_char(width$1, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ab_]); + (skip_spaces, [0, _ac_]); var counter$0 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$0, _ab_); + /*<>*/ return skip_spaces(counter$0, _ac_); } if(13 === match){ /*<>*/ /*<>*/ var width$3 = ignore_char(width$1, ib); if(10 === check_next_char_for_string(width$3, ib)){ /*<>*/ /*<>*/ var - _ac_ = ignore_char(width$3, ib); + _ad_ = ignore_char(width$3, ib); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (skip_spaces, [0, _ac_]); + (skip_spaces, [0, _ad_]); var counter$1 = counter + 1 | 0; - /*<>*/ return skip_spaces(counter$1, _ac_); + /*<>*/ return skip_spaces(counter$1, _ad_); } /*<>*/ var /*<>*/ width$5 = store_char(width$3, ib, 13), @@ -28829,34 +28902,42 @@ /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), - _Z_ = 0 < i$0 ? 1 : 0; - if(_Z_){ + ___ = 0 < i$0 ? 1 : 0; + if(___){ /*<>*/ /*<>*/ var - ___ = 1 - ib[1]; - if(___) + _$_ = 1 - ib[1]; + if(_$_) /*<>*/ var - /*<>*/ _$_ = + /*<>*/ _aa_ = /*<>*/ caml_call2 (CamlinternalFormat[1], char_set, c), - /*<>*/ _aa_ = _$_ ? c !== stp ? 1 : 0 : _$_; + /*<>*/ _ab_ = _aa_ ? c !== stp ? 1 : 0 : _aa_; else - var _aa_ = ___; + var _ab_ = _$_; } else - var _aa_ = _Z_; - if(! _aa_) return _aa_; + var _ab_ = ___; + if(! _ab_) return _ab_; /*<>*/ store_char(Stdlib[19], ib, c); var i$1 = i$0 - 1 | 0, i$0 = i$1; } /*<>*/ } - if(! scan_indic) /*<>*/ return scan_chars(width, -1); + if(! scan_indic){ + /*<>*/ scan_chars(width, -1); + /*<>*/ return; + } var c = scan_indic[1]; /*<>*/ scan_chars(width, c); - /*<>*/ /*<>*/ var _Y_ = 1 - ib[1]; - if(! _Y_) /*<>*/ return _Y_; + /*<>*/ /*<>*/ var _Z_ = 1 - ib[1]; + if(! _Z_) /*<>*/ return _Z_; /*<>*/ /*<>*/ var ci = peek_char(ib); - return c === ci ? invalidate_current_char(ib) : character_mismatch(c, ci); + if(c === ci){ + /*<>*/ invalidate_current_char(ib); + /*<>*/ return; + } + /*<>*/ character_mismatch(c, ci); + /*<>*/ return; /*<>*/ } function scanf_bad_input(ib, x){ /*<>*/ if(x[1] === Scan_failure) @@ -28933,17 +29014,17 @@ /*<>*/ var rest$13 = fmt$0[3], fmtty = fmt$0[2], - /*<>*/ _V_ = + /*<>*/ _W_ = /*<>*/ caml_call1(CamlinternalFormat[21], fmtty), - /*<>*/ _W_ = + /*<>*/ _X_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _V_); + (CamlinternalFormatBasics[2], _W_); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (take_fmtty_format_readers$0, [0, k, _W_, rest$13]); + (take_fmtty_format_readers$0, [0, k, _X_, rest$13]); var counter$0 = counter + 1 | 0; /*<>*/ return take_fmtty_format_readers$0 - (counter$0, k, _W_, rest$13); + (counter$0, k, _X_, rest$13); case 15: var rest$14 = fmt$0[1], fmt$0 = rest$14; break; case 16: @@ -28951,11 +29032,11 @@ case 17: var rest$16 = fmt$0[2], fmt$0 = rest$16; break; case 18: - var _X_ = fmt$0[1]; - if(0 === _X_[0]) + var _Y_ = fmt$0[1]; + if(0 === _Y_[0]) /*<>*/ var rest$17 = fmt$0[2], - fmt$1 = _X_[1][1], + fmt$1 = _Y_[1][1], /*<>*/ fmt$2 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$1, rest$17), @@ -28963,7 +29044,7 @@ else /*<>*/ var rest$18 = fmt$0[2], - fmt$3 = _X_[1][1], + fmt$3 = _Y_[1][1], /*<>*/ fmt$4 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$3, rest$18), @@ -29073,11 +29154,11 @@ rest = fmtty$0[3], ty2 = fmtty$0[2], ty1 = fmtty$0[1], - /*<>*/ _U_ = + /*<>*/ _V_ = /*<>*/ caml_call1(CamlinternalFormat[21], ty1), /*<>*/ ty = /*<>*/ caml_call2 - (CamlinternalFormat[22], _U_, ty2), + (CamlinternalFormat[22], _V_, ty2), /*<>*/ fmtty$10 = /*<>*/ caml_call2 (CamlinternalFormatBasics[1], ty, rest), @@ -29181,9 +29262,12 @@ function(width){ /*<>*/ /*<>*/ var c = check_next_char_for_char(width, ib); - return 39 === c - ? ignore_char(width, ib) - : character_mismatch(39, c); + if(39 === c){ + /*<>*/ ignore_char(width, ib); + /*<>*/ return; + } + /*<>*/ character_mismatch(39, c); + /*<>*/ return; /*<>*/ }, /*<>*/ c = checked_peek_char(ib); if(39 === c){ @@ -29224,11 +29308,11 @@ /*<>*/ return pad_prec_scanf (ib, str_rest, readers, pad, 0, scan$0, token_string); case 18: - var _G_ = match[1]; - if(0 === _G_[0]){ + var _H_ = match[1]; + if(0 === _H_[0]){ /*<>*/ var rest$3 = match[2], - fmt$1 = _G_[1][1], + fmt$1 = _H_[1][1], /*<>*/ scan$1 = function(width, param, ib){ /*<>*/ return scan_string(_q_, width, ib); @@ -29245,7 +29329,7 @@ } /*<>*/ var rest$4 = match[2], - fmt$2 = _G_[1][1], + fmt$2 = _H_[1][1], /*<>*/ scan$2 = function(width, param, ib){ /*<>*/ return scan_string(_r_, width, ib); @@ -29422,7 +29506,7 @@ rest$13 = fmt$0[2], pad$8 = fmt$0[1], /*<>*/ scan$8 = - function(param, _T_, ib){ + function(param, _U_, ib){ /*<>*/ var /*<>*/ c = checked_peek_char(ib), /*<>*/ m = @@ -29448,10 +29532,10 @@ /*<>*/ var rest$15 = fmt$0[2], str$0 = fmt$0[1], - /*<>*/ _H_ = - function(_S_){ /*<>*/ return check_char(ib, _S_);}; + /*<>*/ _I_ = + function(_T_){ /*<>*/ return check_char(ib, _T_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[30], _H_, str$0); + (Stdlib_String[30], _I_, str$0); var fmt$0 = rest$15; break; case 12: @@ -29467,10 +29551,10 @@ s = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _I_ = + /*<>*/ _J_ = /*<>*/ caml_call2 (CamlinternalFormat[14], s, fmtty), - fmt$3 = _I_; + fmt$3 = _J_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -29496,23 +29580,23 @@ /*<>*/ caml_call2 (CamlinternalFormat[13], 0, s$0) [1], - /*<>*/ _K_ = + /*<>*/ _L_ = /*<>*/ caml_call1 (CamlinternalFormat[21], fmtty$0), - /*<>*/ _L_ = + /*<>*/ _M_ = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _K_), + (CamlinternalFormatBasics[2], _L_), /*<>*/ fmt$8 = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$7, _L_), - /*<>*/ _M_ = + (CamlinternalFormat[12], fmt$7, _M_), + /*<>*/ _N_ = /*<>*/ caml_call1 (CamlinternalFormatBasics[2], fmtty$0), - /*<>*/ _N_ = + /*<>*/ _O_ = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$6, _M_), + (CamlinternalFormat[12], fmt$6, _N_), fmt$5 = fmt$8, - fmt$4 = _N_; + fmt$4 = _O_; } catch(exn){ var exn$0 = caml_wrap_exception(exn); @@ -29520,9 +29604,9 @@ throw caml_maybe_attach_backtrace(exn$0, 0); var msg$0 = exn$0[2], - _J_ = bad_input(msg$0), - fmt$5 = _J_[2], - fmt$4 = _J_[1]; + _K_ = bad_input(msg$0), + fmt$5 = _K_[2], + fmt$4 = _K_[1]; } /*<>*/ return [0, [0, fmt$4, s$0], @@ -29541,19 +29625,19 @@ /*<>*/ var rest$19 = fmt$0[2], formatting_lit = fmt$0[1], - /*<>*/ _O_ = + /*<>*/ _P_ = /*<>*/ caml_call1 (CamlinternalFormat[17], formatting_lit), - /*<>*/ _P_ = - function(_R_){ /*<>*/ return check_char(ib, _R_);}; + /*<>*/ _Q_ = + function(_S_){ /*<>*/ return check_char(ib, _S_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[30], _P_, _O_); + (Stdlib_String[30], _Q_, _P_); var fmt$0 = rest$19; break; case 18: - var _Q_ = fmt$0[1]; - if(0 === _Q_[0]){ - var rest$20 = fmt$0[2], fmt$9 = _Q_[1][1]; + var _R_ = fmt$0[1]; + if(0 === _R_[0]){ + var rest$20 = fmt$0[2], fmt$9 = _R_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 123); /*<>*/ var @@ -29563,7 +29647,7 @@ fmt$0 = fmt$10; } else{ - var rest$21 = fmt$0[2], fmt$11 = _Q_[1][1]; + var rest$21 = fmt$0[2], fmt$11 = _R_[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 91); /*<>*/ var @@ -29672,16 +29756,16 @@ if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); /*<>*/ var msg = exc[2], - /*<>*/ _C_ = - /*<>*/ caml_call1(Stdlib_String[25], str), /*<>*/ _D_ = - /*<>*/ caml_call2(Stdlib[28], _C_, cst$0), - /*<>*/ _E_ = - /*<>*/ caml_call2(Stdlib[28], cst_in_format, _D_), - /*<>*/ _F_ = - /*<>*/ caml_call2(Stdlib[28], msg, _E_); + /*<>*/ caml_call1(Stdlib_String[25], str), + /*<>*/ _E_ = + /*<>*/ caml_call2(Stdlib[28], _D_, cst$0), + /*<>*/ _F_ = + /*<>*/ caml_call2(Stdlib[28], cst_in_format, _E_), + /*<>*/ _G_ = + /*<>*/ caml_call2(Stdlib[28], msg, _F_); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], _F_); + (Stdlib[1], _G_); } /*<>*/ return /*<>*/ caml_call2 (ef, ib, exc); @@ -29712,15 +29796,15 @@ fmt); /*<>*/ } function kscanf_opt(ib, fmt){ - function _A_(x){ + function _B_(x){ /*<>*/ return [0, x]; /*<>*/ } /*<>*/ return kscanf_gen (ib, - function(param, _B_){ + function(param, _C_){ /*<>*/ return 0; /*<>*/ }, - _A_, + _B_, fmt); /*<>*/ } function bscanf(ib, fmt){ @@ -29751,10 +29835,10 @@ str = token_string(ib); /*<>*/ try{ /*<>*/ var - /*<>*/ _z_ = + /*<>*/ _A_ = /*<>*/ caml_call2 (CamlinternalFormat[15], str, format), - fmt = _z_; + fmt = _A_; } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -29768,30 +29852,30 @@ /*<>*/ return bscanf_format(from_string(s), format, f); /*<>*/ } function format_from_string(s, fmt){ - /*<>*/ function _w_(x){ + /*<>*/ function _x_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ var - /*<>*/ _x_ = - /*<>*/ caml_call1(Stdlib_String[25], s), /*<>*/ _y_ = - /*<>*/ caml_call2(Stdlib[28], _x_, cst$1); + /*<>*/ caml_call1(Stdlib_String[25], s), + /*<>*/ _z_ = + /*<>*/ caml_call2(Stdlib[28], _y_, cst$1); /*<>*/ return sscanf_format - ( /*<>*/ caml_call2(Stdlib[28], cst$2, _y_), + ( /*<>*/ caml_call2(Stdlib[28], cst$2, _z_), fmt, - _w_); + _x_); /*<>*/ } function unescaped(s){ - /*<>*/ function _u_(x){ + /*<>*/ function _v_(x){ /*<>*/ return x; /*<>*/ } /*<>*/ /*<>*/ var - _v_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); + _w_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); /*<>*/ return /*<>*/ caml_call1 (sscanf - ( /*<>*/ caml_call2(Stdlib[28], cst$4, _v_), + ( /*<>*/ caml_call2(Stdlib[28], cst$4, _w_), _t_), - _u_); + _v_); /*<>*/ } var Stdlib_Scanf = @@ -31156,6 +31240,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2]); } var + _d_ = undefined, global_data = runtime.caml_get_global_data(), Stdlib_List = global_data.Stdlib__List, Stdlib = global_data.Stdlib, @@ -31174,7 +31259,7 @@ /*<>*/ /*<>*/ var prng = [246, - function(_aM_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; + function(_aN_){ /*<>*/ return caml_call1(Stdlib_Random[15][2], 0);}]; function create(opt, initial_size){ /*<>*/ if(opt) var sth = opt[1], random = sth; @@ -31185,17 +31270,17 @@ /*<>*/ for(;;){ if(initial_size > x && Stdlib_Sys[13] >= (x * 2 | 0)){var x$0 = x * 2 | 0, x = x$0; continue;} /*<>*/ if(random){ - var _aK_ = runtime.caml_obj_tag(prng); + var _aL_ = runtime.caml_obj_tag(prng); a: - if(250 === _aK_) - var _aL_ = prng[1]; + if(250 === _aL_) + var _aM_ = prng[1]; else{ - if(246 !== _aK_ && 244 !== _aK_){var _aL_ = prng; break a;} - var _aL_ = caml_call1(CamlinternalLazy[2], prng); + if(246 !== _aL_ && 244 !== _aL_){var _aM_ = prng; break a;} + var _aM_ = caml_call1(CamlinternalLazy[2], prng); } var seed = - /*<>*/ caml_call1(Stdlib_Random[15][4], _aL_); + /*<>*/ caml_call1(Stdlib_Random[15][4], _aM_); } else var seed = 0; @@ -31210,16 +31295,16 @@ /*<>*/ h[1] = 0; /*<>*/ var len = h[2].length - 1, - /*<>*/ _aI_ = len - 1 | 0, - _aH_ = 0; - if(_aI_ >= 0){ - var i = _aH_; + /*<>*/ _aJ_ = len - 1 | 0, + _aI_ = 0; + if(_aJ_ >= 0){ + var i = _aI_; for(;;){ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var - _aJ_ = i + 1 | 0; - if(_aI_ === i) break; - var i = _aJ_; + _aK_ = i + 1 | 0; + if(_aJ_ === i) break; + var i = _aK_; } } return 0; @@ -31236,11 +31321,11 @@ /*<>*/ } function copy(h){ /*<>*/ var - _aE_ = h[4], - _aF_ = h[3], - /*<>*/ _aG_ = + _aF_ = h[4], + _aG_ = h[3], + /*<>*/ _aH_ = /*<>*/ caml_call1(Stdlib_Array[6], h[2]); - /*<>*/ return [0, h[1], _aG_, _aF_, _aE_]; + /*<>*/ return [0, h[1], _aH_, _aG_, _aF_]; /*<>*/ } function key_index(h, hkey){ /*<>*/ return hkey & (h[2].length - 1 - 1 | 0); @@ -31260,16 +31345,16 @@ var param$0 = rest; } /*<>*/ } - var d = h[2], _aC_ = d.length - 1 - 1 | 0, _aB_ = 0; - if(_aC_ >= 0){ - var i = _aB_; + var d = h[2], _aD_ = d.length - 1 - 1 | 0, _aC_ = 0; + if(_aD_ >= 0){ + var i = _aC_; for(;;){ /*<>*/ d[1 + i] = do_bucket(caml_check_bound(d, i)[1 + i]); /*<>*/ /*<>*/ var - _aD_ = i + 1 | 0; - if(_aC_ === i) break; - var i = _aD_; + _aE_ = i + 1 | 0; + if(_aD_ === i) break; + var i = _aE_; } } return 0; @@ -31281,9 +31366,9 @@ nsize = osize * 2 | 0; /*<>*/ clean(h); var - _av_ = nsize < Stdlib_Sys[13] ? 1 : 0, - _aw_ = _av_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _av_; - if(_aw_){ + _aw_ = nsize < Stdlib_Sys[13] ? 1 : 0, + _ax_ = _aw_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _aw_; + if(_ax_){ /*<>*/ /*<>*/ var ndata = /*<>*/ caml_make_vect(nsize, 0); h[2] = ndata; @@ -31291,33 +31376,33 @@ insert_bucket = function(param){ /*<>*/ if(! param) - /*<>*/ return 0; + /*<>*/ return; var rest = param[3], data = param[2], hkey = param[1]; /*<>*/ insert_bucket(rest); /*<>*/ /*<>*/ var nidx = key_index(h, hkey); /*<>*/ ndata[1 + nidx] = [0, hkey, data, caml_check_bound(ndata, nidx)[1 + nidx]]; - /*<>*/ return 0; + /*<>*/ return; /*<>*/ }, - /*<>*/ _ay_ = osize - 1 | 0, - /*<>*/ _ax_ = 0; - if(_ay_ >= 0){ - var i = _ax_; + /*<>*/ _az_ = osize - 1 | 0, + /*<>*/ _ay_ = 0; + if(_az_ >= 0){ + var i = _ay_; for(;;){ /*<>*/ insert_bucket (caml_check_bound(odata, i)[1 + i]); /*<>*/ /*<>*/ var - _aA_ = i + 1 | 0; - if(_ay_ === i) break; - var i = _aA_; + _aB_ = i + 1 | 0; + if(_az_ === i) break; + var i = _aB_; } } - var _az_ = 0; + var _aA_ = 0; } else - var _az_ = _aw_; - return _az_; + var _aA_ = _ax_; + return _aA_; /*<>*/ } function add(h, key, info){ /*<>*/ var @@ -31330,8 +31415,8 @@ [0, hkey, container, caml_check_bound(h[2], i)[1 + i]]; /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; h[1] = h[1] + 1 | 0; - var _au_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _au_ ? resize(h) : _au_; + var _av_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _av_ ? resize(h) : _av_; /*<>*/ } function remove(h, key){ /*<>*/ /*<>*/ var @@ -31359,17 +31444,17 @@ /*<>*/ } /*<>*/ var /*<>*/ i = key_index(h, hkey), - /*<>*/ _at_ = + /*<>*/ _au_ = remove_bucket(caml_check_bound(h[2], i)[1 + i]); - /*<>*/ caml_check_bound(h[2], i)[1 + i] = _at_; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = _au_; /*<>*/ return 0; /*<>*/ } function find(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _as_ = key_index(h, hkey), - param = caml_check_bound(h[2], _as_)[1 + _as_]; + /*<>*/ _at_ = key_index(h, hkey), + param = caml_check_bound(h[2], _at_)[1 + _at_]; for(;;){ if(! param) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace @@ -31395,8 +31480,8 @@ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _ar_ = key_index(h, hkey), - param = caml_check_bound(h[2], _ar_)[1 + _ar_]; + /*<>*/ _as_ = key_index(h, hkey), + param = caml_check_bound(h[2], _as_)[1 + _as_]; for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -31444,9 +31529,9 @@ } /*<>*/ } /*<>*/ /*<>*/ var - _aq_ = key_index(h, hkey); + _ar_ = key_index(h, hkey); /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _aq_)[1 + _aq_]); + (caml_check_bound(h[2], _ar_)[1 + _ar_]); /*<>*/ } function replace(h, key, info){ /*<>*/ var @@ -31464,8 +31549,8 @@ if(hkey === hk){ if(! /*<>*/ caml_call2(H[3], c, key)){ /*<>*/ /*<>*/ var - _am_ = /*<>*/ caml_call3(H[5], c, key, info); - /*<>*/ return _am_; + _an_ = /*<>*/ caml_call3(H[5], c, key, info); + /*<>*/ return _an_; } var param = next; } @@ -31473,23 +31558,23 @@ var next$0 = param[3], param = next$0; } } - catch(_ap_){ - var _an_ = caml_wrap_exception(_ap_); - if(_an_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_an_, 0); + catch(_aq_){ + var _ao_ = caml_wrap_exception(_aq_); + if(_ao_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ao_, 0); /*<>*/ /*<>*/ var container = /*<>*/ caml_call2(H[1], key, info); /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, hkey, container, l]; h[1] = h[1] + 1 | 0; - var _ao_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _ao_ ? resize(h) : _ao_; + var _ap_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; + return _ap_ ? resize(h) : _ap_; } /*<>*/ } function mem(h, key){ /*<>*/ var /*<>*/ hkey = /*<>*/ caml_call2(H[2], h[3], key), - /*<>*/ _al_ = key_index(h, hkey), - param = caml_check_bound(h[2], _al_)[1 + _al_]; + /*<>*/ _am_ = key_index(h, hkey), + param = caml_check_bound(h[2], _am_)[1 + _am_]; /*<>*/ for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; @@ -31517,21 +31602,21 @@ } } function stats(h){ - /*<>*/ var _af_ = h[2], _ag_ = 0; - function _ah_(m, b){ + /*<>*/ var _ag_ = h[2], _ah_ = 0; + function _ai_(m, b){ /*<>*/ /*<>*/ var - _ak_ = bucket_length(0, b); + _al_ = bucket_length(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _ak_); + (Stdlib_Int[11], m, _al_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[17], _ah_, _ag_, _af_), + (Stdlib_Array[17], _ai_, _ah_, _ag_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ai_ = h[2]; - function _aj_(b){ + /*<>*/ _aj_ = h[2]; + function _ak_(b){ /*<>*/ /*<>*/ var l = bucket_length(0, b); /*<>*/ histo[1 + l] = @@ -31539,7 +31624,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _aj_, _ai_); + (Stdlib_Array[11], _ak_, _aj_); /*<>*/ return [0, h[1], h[2].length - 1, mbl, histo]; /*<>*/ } function bucket_length_alive(accu, param){ @@ -31557,22 +31642,22 @@ function stats_alive(h){ /*<>*/ var /*<>*/ size = [0, 0], - /*<>*/ _$_ = h[2], - _aa_ = 0; - function _ab_(m, b){ + /*<>*/ _aa_ = h[2], + _ab_ = 0; + function _ac_(m, b){ /*<>*/ /*<>*/ var - _ae_ = bucket_length_alive(0, b); + _af_ = bucket_length_alive(0, b); /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Int[11], m, _ae_); + (Stdlib_Int[11], m, _af_); /*<>*/ } /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[17], _ab_, _aa_, _$_), + (Stdlib_Array[17], _ac_, _ab_, _aa_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), - /*<>*/ _ac_ = h[2]; - function _ad_(b){ + /*<>*/ _ad_ = h[2]; + function _ae_(b){ /*<>*/ /*<>*/ var l = bucket_length_alive(0, b); size[1] = size[1] + l | 0; @@ -31581,7 +31666,7 @@ /*<>*/ return 0; /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[11], _ad_, _ac_); + (Stdlib_Array[11], _ae_, _ad_); /*<>*/ return [0, size[1], h[2].length - 1, @@ -31589,20 +31674,20 @@ histo]; /*<>*/ } function add_seq(tbl, i){ - function ___(param){ + function _$_(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return add(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], ___, i); + (Stdlib_Seq[4], _$_, i); /*<>*/ } function replace_seq(tbl, i){ - function _Z_(param){ + function ___(param){ /*<>*/ var v = param[2], k = param[1]; /*<>*/ return replace(tbl, k, v); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[4], _Z_, i); + (Stdlib_Seq[4], ___, i); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31639,8 +31724,9 @@ (Stdlib_Obj[24][3], t, 0); /*<>*/ } function set_key(t, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ return; /*<>*/ } function check_key(t){ /*<>*/ return /*<>*/ caml_call2 @@ -31726,10 +31812,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _Y_ = include[1]; + _Z_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_Y_, _a_, sz); + (_Z_, _a_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31762,8 +31848,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add(b, k, d){ - /*<>*/ var _X_ = b[1]; - b[1] = [0, make(k, d), _X_]; + /*<>*/ var _Y_ = b[1]; + b[1] = [0, make(k, d), _Y_]; return 0; /*<>*/ } function test_key(k, e){ @@ -31792,13 +31878,13 @@ } /*<>*/ } function find(b, k){ - /*<>*/ var _U_ = b[1]; - /*<>*/ function _V_(_W_){ - /*<>*/ return test_key(k, _W_); + /*<>*/ var _V_ = b[1]; + /*<>*/ function _W_(_X_){ + /*<>*/ return test_key(k, _X_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[40], _V_, _U_); + /*<>*/ caml_call2(Stdlib_List[40], _W_, _V_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data(e); @@ -31819,16 +31905,18 @@ (Stdlib_Obj[24][3], t, 0); /*<>*/ } function set_key1(t, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 0, k); + /*<>*/ return; /*<>*/ } function get_key2(t){ /*<>*/ return /*<>*/ caml_call2 (Stdlib_Obj[24][3], t, 1); /*<>*/ } function set_key2(t, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, 1, k); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, 1, k); + /*<>*/ return; /*<>*/ } function get_data$0(t){ /*<>*/ return /*<>*/ caml_call1 @@ -31873,11 +31961,11 @@ /*<>*/ var k2 = param[2], k1 = param[1], - /*<>*/ _T_ = + /*<>*/ _U_ = /*<>*/ caml_call2(H2[2], seed, k2) * 65599 | 0; /*<>*/ return /*<>*/ caml_call2 (H1[2], seed, k1) - + _T_ + + _U_ | 0; } function equal(c, param){ @@ -31906,11 +31994,11 @@ } function check_key(c){ /*<>*/ /*<>*/ var - _S_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); - /*<>*/ return _S_ + _T_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, 0); + /*<>*/ return _T_ ? /*<>*/ caml_call2 (Stdlib_Obj[24][7], c, 1) - : _S_; + : _T_; /*<>*/ } /*<>*/ return MakeSeeded ([0, @@ -31929,13 +32017,13 @@ /*<>*/ } /*<>*/ var equal$0 = H1[1], - /*<>*/ _Q_ = [0, equal, seeded_hash]; + /*<>*/ _R_ = [0, equal, seeded_hash]; function seeded_hash$0(seed, x){ /*<>*/ return /*<>*/ caml_call1 (H1[2], x); /*<>*/ } var - include = MakeSeeded$1([0, equal$0, seeded_hash$0], _Q_), + include = MakeSeeded$1([0, equal$0, seeded_hash$0], _R_), clear = include[2], reset = include[3], copy = include[4], @@ -31952,10 +32040,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _R_ = include[1]; + _S_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_R_, _b_, sz); + (_S_, _b_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -31988,8 +32076,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$0(b, k1, k2, d){ - /*<>*/ var _P_ = b[1]; - b[1] = [0, make$1(k1, k2, d), _P_]; + /*<>*/ var _Q_ = b[1]; + b[1] = [0, make$1(k1, k2, d), _Q_]; return 0; /*<>*/ } function test_keys(k1, k2, e){ @@ -32019,13 +32107,13 @@ } /*<>*/ } function find$0(b, k1, k2){ - /*<>*/ var _M_ = b[1]; - /*<>*/ function _N_(_O_){ - /*<>*/ return test_keys(k1, k2, _O_); + /*<>*/ var _N_ = b[1]; + /*<>*/ function _O_(_P_){ + /*<>*/ return test_keys(k1, k2, _P_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[40], _N_, _M_); + /*<>*/ caml_call2(Stdlib_List[40], _O_, _N_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$0(e); @@ -32050,8 +32138,9 @@ (Stdlib_Obj[24][3], t, n); /*<>*/ } function set_key$0(t, n, k){ - /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Obj[24][5], t, n, k); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Obj[24][5], t, n, k); + /*<>*/ return; /*<>*/ } function get_data$1(t){ /*<>*/ return /*<>*/ caml_call1 @@ -32067,17 +32156,17 @@ /*<>*/ eph = create$1(l); /*<>*/ set_data$1(eph, data); /*<>*/ var - _K_ = l - 1 | 0, - /*<>*/ _J_ = 0; - if(_K_ >= 0){ - var i = _J_; + _L_ = l - 1 | 0, + /*<>*/ _K_ = 0; + if(_L_ >= 0){ + var i = _K_; for(;;){ /*<>*/ set_key$0 (eph, i, caml_check_bound(keys, i)[1 + i]); /*<>*/ /*<>*/ var - _L_ = i + 1 | 0; - if(_K_ === i) break; - var i = _L_; + _M_ = i + 1 | 0; + if(_L_ === i) break; + var i = _M_; } } /*<>*/ return eph; @@ -32090,10 +32179,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - /*<>*/ _F_ = l - 1 | 0, - /*<>*/ _E_ = 0; - if(_F_ >= 0){ - var i = _E_; + /*<>*/ _G_ = l - 1 | 0, + /*<>*/ _F_ = 0; + if(_G_ >= 0){ + var i = _F_; for(;;){ /*<>*/ /*<>*/ var match = get_key$0(eph, i); @@ -32105,19 +32194,19 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ /*<>*/ var - _H_ = i + 1 | 0; - if(_F_ === i) break; - var i = _H_; + _I_ = i + 1 | 0; + if(_G_ === i) break; + var i = _I_; } } /*<>*/ /*<>*/ var - _G_ = get_data$1(eph); - /*<>*/ return _G_; + _H_ = get_data$1(eph); + /*<>*/ return _H_; } - catch(_I_){ - var _D_ = caml_wrap_exception(_I_); - if(_D_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_D_, 0); + catch(_J_){ + var _E_ = caml_wrap_exception(_J_); + if(_E_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_E_, 0); } /*<>*/ } function MakeSeeded$2(H){ @@ -32126,17 +32215,17 @@ c = create$1(k.length - 1); /*<>*/ set_data$1(c, d); /*<>*/ var - _B_ = k.length - 1 - 1 | 0, - /*<>*/ _A_ = 0; - if(_B_ >= 0){ - var i = _A_; + _C_ = k.length - 1 - 1 | 0, + /*<>*/ _B_ = 0; + if(_C_ >= 0){ + var i = _B_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _C_ = i + 1 | 0; - if(_B_ === i) break; - var i = _C_; + _D_ = i + 1 | 0; + if(_C_ === i) break; + var i = _D_; } } /*<>*/ return c; @@ -32144,22 +32233,22 @@ function seeded_hash(seed, k){ /*<>*/ var /*<>*/ h = [0, 0], - _w_ = k.length - 1 - 1 | 0, - /*<>*/ _v_ = 0; - if(_w_ >= 0){ - var i = _v_; + _x_ = k.length - 1 - 1 | 0, + /*<>*/ _w_ = 0; + if(_x_ >= 0){ + var i = _w_; for(;;){ /*<>*/ var - _x_ = h[1], - /*<>*/ _y_ = caml_check_bound(k, i)[1 + i]; + _y_ = h[1], + /*<>*/ _z_ = caml_check_bound(k, i)[1 + i]; h[1] = - ( /*<>*/ caml_call2(H[2], seed, _y_) * 65599 | 0) - + _x_ + ( /*<>*/ caml_call2(H[2], seed, _z_) * 65599 | 0) + + _y_ | 0; /*<>*/ /*<>*/ var - _z_ = i + 1 | 0; - if(_w_ === i) break; - var i = _z_; + _A_ = i + 1 | 0; + if(_x_ === i) break; + var i = _A_; } } return h[1]; @@ -32179,9 +32268,9 @@ if(! match) /*<>*/ return 2; /*<>*/ var ki = match[1], - /*<>*/ _u_ = caml_check_bound(k, i)[1 + i]; + /*<>*/ _v_ = caml_check_bound(k, i)[1 + i]; /*<>*/ if - (! /*<>*/ caml_call2(H[1], _u_, ki)) + (! /*<>*/ caml_call2(H[1], _v_, ki)) /*<>*/ return 1; /*<>*/ var /*<>*/ i$0 = i - 1 | 0, @@ -32192,17 +32281,17 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Obj[24][12], c); /*<>*/ var - _s_ = k.length - 1 - 1 | 0, - /*<>*/ _r_ = 0; - if(_s_ >= 0){ - var i = _r_; + _t_ = k.length - 1 - 1 | 0, + /*<>*/ _s_ = 0; + if(_t_ >= 0){ + var i = _s_; for(;;){ /*<>*/ set_key$0 (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var - _t_ = i + 1 | 0; - if(_s_ === i) break; - var i = _t_; + _u_ = i + 1 | 0; + if(_t_ === i) break; + var i = _u_; } } /*<>*/ return set_data$1(c, d); @@ -32212,19 +32301,19 @@ /*<>*/ i$1 = length$1(c) - 1 | 0, i = i$1; /*<>*/ for(;;){ - var _p_ = i < 0 ? 1 : 0; - if(_p_) - var _q_ = _p_; + var _q_ = i < 0 ? 1 : 0; + if(_q_) + var _r_ = _q_; else{ /*<>*/ /*<>*/ var - _o_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); - /*<>*/ if(_o_){ + _p_ = /*<>*/ caml_call2(Stdlib_Obj[24][7], c, i); + /*<>*/ if(_p_){ var i$0 = i - 1 | 0, i = i$0; continue; } - var _q_ = _o_; + var _r_ = _p_; } - return _q_; + return _r_; } /*<>*/ } /*<>*/ return MakeSeeded @@ -32260,10 +32349,10 @@ replace_seq = include[15], clean = include[17], stats_alive = include[18], - _n_ = include[1]; + _o_ = include[1]; function create(sz){ /*<>*/ return /*<>*/ caml_call2 - (_n_, _c_, sz); + (_o_, _c_, sz); /*<>*/ } function of_seq(i){ /*<>*/ /*<>*/ var @@ -32296,8 +32385,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$1(b, k, d){ - /*<>*/ var _m_ = b[1]; - b[1] = [0, make$3(k, d), _m_]; + /*<>*/ var _n_ = b[1]; + b[1] = [0, make$3(k, d), _n_]; return 0; /*<>*/ } function test_keys$0(k, e){ @@ -32306,10 +32395,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var - _i_ = k.length - 1 - 1 | 0, - /*<>*/ _h_ = 0; - if(_i_ >= 0){ - var i = _h_; + _j_ = k.length - 1 - 1 | 0, + /*<>*/ _i_ = 0; + if(_j_ >= 0){ + var i = _i_; for(;;){ /*<>*/ /*<>*/ var match = get_key$0(e, i); @@ -32317,9 +32406,9 @@ var x = match[1]; if(x === caml_check_bound(k, i)[1 + i]){ /*<>*/ /*<>*/ var - _k_ = i + 1 | 0; - if(_i_ === i) break; - var i = _k_; + _l_ = i + 1 | 0; + if(_j_ === i) break; + var i = _l_; continue; } } @@ -32327,13 +32416,13 @@ (Stdlib[3], 1); } } - /*<>*/ /*<>*/ var _j_ = 1; - /*<>*/ return _j_; + /*<>*/ /*<>*/ var _k_ = 1; + /*<>*/ return _k_; } - catch(_l_){ - var _g_ = caml_wrap_exception(_l_); - if(_g_ === Stdlib[3]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_g_, 0); + catch(_m_){ + var _h_ = caml_wrap_exception(_m_); + if(_h_ === Stdlib[3]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_h_, 0); } /*<>*/ } function remove$1(b, k){ @@ -32353,13 +32442,13 @@ } /*<>*/ } function find$1(b, k){ - /*<>*/ var _d_ = b[1]; - /*<>*/ function _e_(_f_){ - /*<>*/ return test_keys$0(k, _f_); + /*<>*/ var _e_ = b[1]; + /*<>*/ function _f_(_g_){ + /*<>*/ return test_keys$0(k, _g_); } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[40], _e_, _d_); + /*<>*/ caml_call2(Stdlib_List[40], _f_, _e_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$1(e); @@ -32424,8 +32513,6 @@ caml_string_get = runtime.caml_string_get, caml_string_notequal = runtime.caml_string_notequal, caml_sys_getenv = runtime.caml_sys_getenv, - 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 @@ -32448,6 +32535,7 @@ : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } var + _m_ = undefined, global_data = runtime.caml_get_global_data(), cst$18 = cst$19, cst$17 = cst$19, @@ -32584,39 +32672,39 @@ /*<>*/ } function is_relative(n){ /*<>*/ var - _aM_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _aN_ = - _aM_ + _aK_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _aL_ = + _aK_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - return _aN_; + return _aL_; /*<>*/ } function is_implicit(n){ /*<>*/ /*<>*/ var - _aH_ = is_relative(n); - /*<>*/ if(_aH_){ + _aF_ = is_relative(n); + /*<>*/ if(_aF_){ var - _aI_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aJ_ = - _aI_ + _aG_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aH_ = + _aG_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2), cst$27); - /*<>*/ if(_aJ_) + /*<>*/ if(_aH_) var - _aK_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aL_ = - _aK_ + _aI_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aJ_ = + _aI_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 3), cst$28); else - var _aL_ = _aJ_; + var _aJ_ = _aH_; } else - var _aL_ = _aH_; - /*<>*/ return _aL_; + var _aJ_ = _aF_; + /*<>*/ return _aJ_; /*<>*/ } function check_suffix(name, suff){ /*<>*/ return /*<>*/ caml_call2 @@ -32644,8 +32732,8 @@ /*<>*/ caml_sys_getenv("TMPDIR"), temp_dir_name = _l_; } - catch(_aG_){ - var _a_ = caml_wrap_exception(_aG_); + catch(_aE_){ + var _a_ = caml_wrap_exception(_aE_); if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); var temp_dir_name = cst_tmp; } @@ -32657,10 +32745,10 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 39); /*<>*/ var - _aD_ = l - 1 | 0, - /*<>*/ _aC_ = 0; - if(_aD_ >= 0){ - var i = _aC_; + _aB_ = l - 1 | 0, + /*<>*/ _aA_ = 0; + if(_aB_ >= 0){ + var i = _aA_; for(;;){ /*<>*/ if (39 === /*<>*/ caml_string_get(s, i)) @@ -32668,14 +32756,14 @@ (Stdlib_Buffer[16], b, quotequote); else{ /*<>*/ /*<>*/ var - _aF_ = /*<>*/ caml_string_get(s, i); + _aD_ = /*<>*/ caml_string_get(s, i); /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, _aF_); + (Stdlib_Buffer[12], b, _aD_); } /*<>*/ /*<>*/ var - _aE_ = i + 1 | 0; - if(_aD_ === i) break; - var i = _aE_; + _aC_ = i + 1 | 0; + if(_aB_ === i) break; + var i = _aC_; } } /*<>*/ /*<>*/ caml_call2 @@ -32688,47 +32776,47 @@ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _ar_ = cst_2_1; + var _ap_ = cst_2_1; else /*<>*/ var - /*<>*/ _aB_ = quote(f), - _ar_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _aB_); - var _as_ = _ar_; + /*<>*/ _az_ = quote(f), + _ap_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _az_); + var _aq_ = _ap_; } else - var _as_ = cst$4; + var _aq_ = cst$4; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _at_ = quote(f$0), - _au_ = /*<>*/ caml_call2(Stdlib[28], cst, _at_); + /*<>*/ _ar_ = quote(f$0), + _as_ = /*<>*/ caml_call2(Stdlib[28], cst, _ar_); else - var _au_ = cst$3; + var _as_ = cst$3; /*<>*/ /*<>*/ var - _av_ = /*<>*/ caml_call2(Stdlib[28], _au_, _as_); + _at_ = /*<>*/ caml_call2(Stdlib[28], _as_, _aq_); if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _aw_ = quote(f$1), - _ax_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _aw_); + /*<>*/ _au_ = quote(f$1), + _av_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _au_); else - var _ax_ = cst$2; + var _av_ = cst$2; /*<>*/ var - /*<>*/ _ay_ = - /*<>*/ caml_call2(Stdlib[28], _ax_, _av_), - /*<>*/ _az_ = + /*<>*/ _aw_ = + /*<>*/ caml_call2(Stdlib[28], _av_, _at_), + /*<>*/ _ax_ = /*<>*/ caml_call2 (Stdlib_List[20], quote, [0, cmd, args]), - /*<>*/ _aA_ = - /*<>*/ caml_call2(Stdlib_String[7], cst$1, _az_); + /*<>*/ _ay_ = + /*<>*/ caml_call2(Stdlib_String[7], cst$1, _ax_); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _aA_, _ay_); + (Stdlib[28], _ay_, _aw_); /*<>*/ } - /*<>*/ function basename(_aq_){ - /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _aq_); + /*<>*/ function basename(_ao_){ + /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _ao_); } - /*<>*/ function dirname(_ap_){ - /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _ap_); + /*<>*/ function dirname(_an_){ + /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _an_); } /*<>*/ /*<>*/ var Unix = @@ -32751,96 +32839,96 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _am_ = 47 === c ? 1 : 0; - if(_am_) - var _an_ = _am_; + _ak_ = 47 === c ? 1 : 0; + if(_ak_) + var _al_ = _ak_; else - var _ao_ = 92 === c ? 1 : 0, _an_ = _ao_ || (58 === c ? 1 : 0); - return _an_; + var _am_ = 92 === c ? 1 : 0, _al_ = _am_ || (58 === c ? 1 : 0); + return _al_; /*<>*/ } function is_relative$0(n){ /*<>*/ var - _ag_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ah_ = - _ag_ + _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _af_ = + _ae_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ah_){ + if(_af_){ var - _ai_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _aj_ = - _ai_ + _ag_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ah_ = + _ag_ || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_aj_) + if(_ah_) var - _ak_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _al_ = - _ak_ + _ai_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aj_ = + _ai_ || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else - var _al_ = _aj_; + var _aj_ = _ah_; } else - var _al_ = _ah_; - return _al_; + var _aj_ = _af_; + return _aj_; /*<>*/ } function is_implicit$0(n){ /*<>*/ /*<>*/ var - _Z_ = is_relative$0(n); - /*<>*/ if(_Z_){ + _X_ = is_relative$0(n); + /*<>*/ if(_X_){ var - ___ = caml_ml_string_length(n) < 2 ? 1 : 0, - _$_ = - ___ + _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _Z_ = + _Y_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2), cst$27); - /*<>*/ if(_$_){ + /*<>*/ if(_Z_){ var - _aa_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _ab_ = - _aa_ + ___ = caml_ml_string_length(n) < 2 ? 1 : 0, + _$_ = + ___ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2), ".\\"); - /*<>*/ if(_ab_){ + /*<>*/ if(_$_){ var - _ac_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _ad_ = - _ac_ + _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _ab_ = + _aa_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[16], n, 0, 3), cst$28); - /*<>*/ if(_ad_) + /*<>*/ if(_ab_) var - _ae_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _af_ = - _ae_ + _ac_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _ad_ = + _ac_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 (Stdlib_String[16], n, 0, 3), "..\\"); else - var _af_ = _ad_; + var _ad_ = _ab_; } else - var _af_ = _ab_; + var _ad_ = _$_; } else - var _af_ = _$_; + var _ad_ = _Z_; } else - var _af_ = _Z_; - /*<>*/ return _af_; + var _ad_ = _X_; + /*<>*/ return _ad_; /*<>*/ } function check_suffix$0(name, suff){ /*<>*/ var - _W_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_W_) + _U_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; + if(_U_) /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 @@ -32848,14 +32936,14 @@ name, caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, caml_ml_string_length(suff)), - /*<>*/ _X_ = + /*<>*/ _V_ = /*<>*/ caml_call1(Stdlib_String[27], suff), - _Y_ = + _W_ = /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[27], s), _X_); + ( /*<>*/ caml_call1(Stdlib_String[27], s), _V_); else - var _Y_ = _W_; - /*<>*/ return _Y_; + var _W_ = _U_; + /*<>*/ return _W_; /*<>*/ } function chop_suffix_opt$0(suffix, filename){ /*<>*/ var @@ -32866,11 +32954,11 @@ /*<>*/ r = /*<>*/ caml_call3 (Stdlib_String[16], filename, len_f - len_s | 0, len_s), - /*<>*/ _V_ = + /*<>*/ _T_ = /*<>*/ caml_call1(Stdlib_String[27], suffix); /*<>*/ return /*<>*/ caml_string_equal ( /*<>*/ caml_call1(Stdlib_String[27], r), - _V_) + _T_) ? [0, /*<>*/ caml_call3 (Stdlib_String[16], filename, 0, len_f - len_s | 0)] @@ -32882,8 +32970,8 @@ /*<>*/ caml_sys_getenv("TEMP"), temp_dir_name$0 = _k_; } - catch(_U_){ - var _b_ = caml_wrap_exception(_U_); + catch(_S_){ + var _b_ = caml_wrap_exception(_S_); if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); var temp_dir_name$0 = cst$5; } @@ -32894,44 +32982,23 @@ /*<>*/ caml_call1(Stdlib_Buffer[1], l + 20 | 0); /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - function add_bs(n){ - /*<>*/ /*<>*/ var _S_ = 1; - if(n >= 1){ - var j = _S_; - for(;;){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 92); - /*<>*/ /*<>*/ var - _T_ = j + 1 | 0; - if(n === j) break; - var j = _T_; - } - } - return 0; - /*<>*/ } - function loop$0(counter, i){ + function loop(i){ /*<>*/ var i$0 = i; /*<>*/ for(;;){ - if(i$0 === l) - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 34); + if(i$0 === l){ + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 34); + /*<>*/ return; + } /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); if(34 === c){ - var _Q_ = 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop_bs, [0, _Q_, i$0]); - var counter$1 = counter + 1 | 0; - /*<>*/ return loop_bs(counter$1, _Q_, i$0); + /*<>*/ loop_bs(0, i$0); + /*<>*/ return; } if(92 === c){ - var _R_ = 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop_bs, [0, _R_, i$0]); - var counter$0 = counter + 1 | 0; - /*<>*/ return loop_bs(counter$0, _R_, i$0); + /*<>*/ loop_bs(0, i$0); + /*<>*/ return; } /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, c); @@ -32940,13 +33007,14 @@ i$0 = i$1; } /*<>*/ } - function loop_bs(counter, n, i){ + function loop_bs(n, i){ /*<>*/ var n$0 = n, i$0 = i; /*<>*/ for(;;){ if(i$0 === l){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - /*<>*/ return add_bs(n$0); + /*<>*/ add_bs(n$0); + /*<>*/ return; } /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(s, i$0); @@ -32954,21 +33022,13 @@ /*<>*/ add_bs((2 * n$0 | 0) + 1 | 0); /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); - /*<>*/ /*<>*/ var - _P_ = i$0 + 1 | 0; - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop$0, [0, _P_]); - var counter$1 = counter + 1 | 0; - /*<>*/ return loop$0(counter$1, _P_); + /*<>*/ loop(i$0 + 1 | 0); + /*<>*/ return; } if(92 !== match){ /*<>*/ add_bs(n$0); - /*<>*/ if(counter >= 50) - /*<>*/ return /*<>*/ caml_trampoline_return - (loop$0, [0, i$0]); - var counter$0 = counter + 1 | 0; - /*<>*/ return loop$0(counter$0, i$0); + /*<>*/ loop(i$0); + /*<>*/ return; } /*<>*/ var /*<>*/ i$1 = i$0 + 1 | 0, @@ -32977,76 +33037,90 @@ i$0 = i$1; } /*<>*/ } - function loop(i){ /*<>*/ return caml_trampoline(loop$0(0, i));} + function add_bs(n){ + /*<>*/ /*<>*/ var _Q_ = 1; + if(n >= 1){ + var j = _Q_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 92); + /*<>*/ /*<>*/ var + _R_ = j + 1 | 0; + if(n === j) break; + var j = _R_; + } + } + return; + /*<>*/ } /*<>*/ loop(0); /*<>*/ return /*<>*/ caml_call1 (Stdlib_Buffer[2], b); /*<>*/ } function quote_cmd_filename(f){ - function _N_(param){ + function _O_(param){ /*<>*/ if(34 !== param && 37 !== param) /*<>*/ return 0; /*<>*/ return 1; /*<>*/ } /*<>*/ if - (! /*<>*/ caml_call2(Stdlib_String[23], _N_, f)) + (! /*<>*/ caml_call2(Stdlib_String[23], _O_, f)) /*<>*/ return /*<>*/ caml_call2 (Stdlib_String[15], f, 32) ? /*<>*/ caml_call2 (Stdlib_String[7], cst$7, [0, cst$6, [0, f, _c_]]) : f; /*<>*/ /*<>*/ var - _O_ = + _P_ = /*<>*/ caml_call2 (Stdlib[28], cst_Filename_quote_command_bad, f); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _O_); + (Stdlib[2], _P_); /*<>*/ } function quote_command$0(cmd, stdin, stdout, stderr, args){ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _z_ = cst_2_1$0; + var _A_ = cst_2_1$0; else /*<>*/ var - /*<>*/ _L_ = quote_cmd_filename(f), - _z_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _L_); - var _A_ = _z_; + /*<>*/ _M_ = quote_cmd_filename(f), + _A_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _M_); + var _B_ = _A_; } else - var _A_ = cst$16; - var _B_ = [0, _A_, _d_]; + var _B_ = cst$16; + var _C_ = [0, _B_, _d_]; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _C_ = quote_cmd_filename(f$0), - _D_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _C_); + /*<>*/ _D_ = quote_cmd_filename(f$0), + _E_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _D_); else - var _D_ = cst$15; - var _E_ = [0, _D_, _B_]; + var _E_ = cst$15; + var _F_ = [0, _E_, _C_]; if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _F_ = quote_cmd_filename(f$1), - _G_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _F_); + /*<>*/ _G_ = quote_cmd_filename(f$1), + _H_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _G_); else - var _G_ = cst$14; + var _H_ = cst$14; /*<>*/ var - /*<>*/ _I_ = + /*<>*/ _J_ = /*<>*/ caml_call2(Stdlib_List[20], quote$0, args), /*<>*/ s = - /*<>*/ caml_call2(Stdlib_String[7], cst$10, _I_), + /*<>*/ caml_call2(Stdlib_String[7], cst$10, _J_), /*<>*/ b = /*<>*/ caml_call1 (Stdlib_Buffer[1], caml_ml_string_length(s) + 20 | 0), - _H_ = [0, _G_, _E_]; - function _y_(c){ + _I_ = [0, _H_, _F_]; + function _z_(c){ /*<>*/ a: { if(62 <= c){ - var _M_ = c - 63 | 0; - if(60 < _M_ >>> 0){if(62 <= _M_) break a;} else if(31 !== _M_) break a; + var _N_ = c - 63 | 0; + if(60 < _N_ >>> 0){if(62 <= _N_) break a;} else if(31 !== _N_) break a; } else if(42 <= c){ @@ -33066,21 +33140,21 @@ (Stdlib_Buffer[12], b, c); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[30], _y_, s); + (Stdlib_String[30], _z_, s); /*<>*/ var - _J_ = + _K_ = [0, cst$11, - [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _H_]], - /*<>*/ _K_ = - [0, cst$12, [0, quote_cmd_filename(cmd), _J_]]; + [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _I_]], + /*<>*/ _L_ = + [0, cst$12, [0, quote_cmd_filename(cmd), _K_]]; /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[7], cst$13, _K_); + (Stdlib_String[7], cst$13, _L_); /*<>*/ } function drive_and_path(s){ /*<>*/ var - _u_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; - if(_u_){ + _v_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; + if(_v_){ /*<>*/ /*<>*/ var param = /*<>*/ caml_string_get(s, 0); a: @@ -33091,28 +33165,28 @@ if(25 < param - 97 >>> 0) break b; } else if(65 > param) break b; - var _v_ = 1; + var _w_ = 1; break a; } - var _v_ = 0; + var _w_ = 0; } /*<>*/ /*<>*/ var - _w_ = - _v_ + _x_ = + _w_ ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 - : _v_; + : _w_; } else - var _w_ = _u_; - /*<>*/ if(! _w_) + var _x_ = _v_; + /*<>*/ if(! _x_) /*<>*/ return [0, cst$17, s]; /*<>*/ /*<>*/ var - _x_ = + _y_ = /*<>*/ caml_call3 (Stdlib_String[16], s, 2, caml_ml_string_length(s) - 2 | 0); /*<>*/ return [0, /*<>*/ caml_call3(Stdlib_String[16], s, 0, 2), - _x_]; + _y_]; /*<>*/ } function dirname$0(s){ /*<>*/ var @@ -33146,11 +33220,11 @@ quote_command$0, basename$0, dirname$0]; - /*<>*/ function basename$1(_t_){ - /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _t_); + /*<>*/ function basename$1(_u_){ + /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _u_); } - /*<>*/ function dirname$1(_s_){ - /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _s_); + /*<>*/ function dirname$1(_t_){ + /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _t_); } /*<>*/ var /*<>*/ Cygwin = @@ -33193,11 +33267,11 @@ /*<>*/ if (0 !== l && ! is_dir_sep$1(dirname, l - 1 | 0)){ /*<>*/ /*<>*/ var - _r_ = + _s_ = /*<>*/ caml_call2 (Stdlib[28], dir_sep$2, filename); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], dirname, _r_); + (Stdlib[28], dirname, _s_); } /*<>*/ return /*<>*/ caml_call2 (Stdlib[28], dirname, filename); @@ -33300,7 +33374,7 @@ /*<>*/ } /*<>*/ var /*<>*/ _h_ = - [0, function(_q_){ /*<>*/ return _q_;}], + [0, function(_r_){ /*<>*/ return _r_;}], /*<>*/ current_temp_dir_name = /*<>*/ caml_call2(Stdlib_Domain[10][1], _h_, _g_); function set_temp_dir_name(s){ @@ -33340,17 +33414,17 @@ } } /*<>*/ } - function open_temp_file(opt, _o_, _n_, prefix, suffix){ + function open_temp_file(opt, _p_, _o_, prefix, suffix){ /*<>*/ if(opt) var sth = opt[1], mode = sth; else var mode = _j_; - /*<>*/ if(_o_) - var sth$0 = _o_[1], perms = sth$0; + /*<>*/ if(_p_) + var sth$0 = _p_[1], perms = sth$0; else var perms = 384; - /*<>*/ if(_n_) - var sth$1 = _n_[1], temp_dir = sth$1; + /*<>*/ if(_o_) + var sth$1 = _o_[1], temp_dir = sth$1; else var temp_dir = @@ -33362,12 +33436,12 @@ name = temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ /*<>*/ /*<>*/ var - _p_ = + _q_ = [0, name, /*<>*/ caml_call3 (Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; - /*<>*/ return _p_; + /*<>*/ return _q_; } catch(e$0){ var e = caml_wrap_exception(e$0); @@ -33381,7 +33455,7 @@ } } /*<>*/ } - function temp_dir(opt, _m_, prefix, suffix){ + function temp_dir(opt, _n_, prefix, suffix){ /*<>*/ if(opt) var sth = opt[1], temp_dir = sth; else @@ -33389,8 +33463,8 @@ temp_dir = /*<>*/ caml_call1 (Stdlib_Domain[10][2], current_temp_dir_name); - /*<>*/ if(_m_) - var sth$0 = _m_[1], perms = sth$0; + /*<>*/ if(_n_) + var sth$0 = _n_[1], perms = sth$0; else var perms = 448; var counter = 0; From a18be46c71a2496f39c65538caf6731965d943a8 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Sat, 11 Nov 2023 09:31:18 +0100 Subject: [PATCH 112/112] doc --- CHANGES.md | 2 +- TODO.txt | 4 ---- manual/options.wiki | 31 ++++++++++++++++--------------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 49c5187624..cbe1489c7a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,7 @@ # Dev (2023-??-??) - ?? ## Features/Changes -* Compiler: global dead code elimination (#1503) +* Compiler: global dead code elimination (Micah Cantor, #1503) * Compiler: change control-flow compilation strategy (#1496) * Compiler: Dead code elimination of unused references (#2076) * Compiler: reduce memory consumption (#1516) diff --git a/TODO.txt b/TODO.txt index c099243943..4df3b95cf8 100644 --- a/TODO.txt +++ b/TODO.txt @@ -12,10 +12,6 @@ Compiler optimizations - cross-function optimizations -- deadcode elimination inside blocks - (for instance, elimination of function which are defined in a - functor but are not used) - - should we rebind variables from a deeper level ? (only if used more than once...) diff --git a/manual/options.wiki b/manual/options.wiki index f5af01bb05..b8cc16db16 100644 --- a/manual/options.wiki +++ b/manual/options.wiki @@ -32,18 +32,19 @@ various optimizations until a fix-point is reached ==List of option to "--disable" or "--enable" -|= Option name |= Default |= Description | -| pretty | false | Pretty print the javascript output | -| effects | false | Enable support for effect handlers | -| debuginfo | false | Output debug information (location) | -| deadcode | true | Deadcode elimination | -| inline | true | Code inlining | -| shortvar | true | Shorten variable names | -| staticeval | true | Static evaluation of constants | -| share | true | Share string and number constants | -| strict | true | Enable strict mode | -| debugger | true | Keep debugger statements. - Stripped otherwise | -| genprim | true | Generate dummy primitives when missing | -| excwrap | true | Wrap js exception into ocaml ones | -| optcall | true | Javascript optimizations | +|= Option name |= Default |= Description | +| pretty | false | Pretty print the javascript output | +| effects | false | Enable support for effect handlers | +| debuginfo | false | Output debug information (location) | +| deadcode | true | Deadcode elimination | +| glboaldeadcode | true | Global deadcode elimination | +| inline | true | Code inlining | +| shortvar | true | Shorten variable names | +| staticeval | true | Static evaluation of constants | +| share | true | Share string and number constants | +| strict | true | Enable strict mode | +| debugger | true | Keep debugger statements. + Stripped otherwise | +| genprim | true | Generate dummy primitives when missing | +| excwrap | true | Wrap js exception into ocaml ones | +| optcall | true | Javascript optimizations |