From 78fdbc7110fe94d72411b4249bc8649650845b83 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Tue, 25 Jul 2023 11:28:47 +0200 Subject: [PATCH 1/3] Compiler: refactor control flow compilation --- CHANGES.md | 4 + compiler/lib/generate.ml | 712 +- compiler/lib/js_simpl.ml | 2 +- compiler/lib/structure.ml | 163 + compiler/lib/structure.mli | 24 + compiler/tests-compiler/cond.ml | 38 +- compiler/tests-compiler/exceptions.ml | 12 +- compiler/tests-compiler/gh1007.ml | 39 +- compiler/tests-compiler/gh747.ml | 4 +- compiler/tests-compiler/lazy.ml | 6 +- compiler/tests-compiler/loops.ml | 290 +- compiler/tests-compiler/match_with_exn.ml | 43 +- compiler/tests-compiler/mutable_closure.ml | 18 +- .../variable_declaration_output.ml | 28 +- compiler/tests-full/stdlib.cma.expected.js | 8595 +++++++++-------- 15 files changed, 4990 insertions(+), 4988 deletions(-) create mode 100644 compiler/lib/structure.ml create mode 100644 compiler/lib/structure.mli diff --git a/CHANGES.md b/CHANGES.md index d640ae8ee9..85186a9f4f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Dev (2023-??-??) - ?? +## Features/Changes +* Compiler: change control-flow compilation strategy (#1496) + +## Bug fixes * Runtime: fix Dom_html.onIE (#1493) * Compiler: fix global flow analysis (#1494) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index f4ef8b65ae..42797e3b8e 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -63,6 +63,10 @@ let list_group f g l = (****) +type fall_through = + | Block of Addr.t + | Return + type application_description = { arity : int ; exact : bool @@ -303,6 +307,12 @@ module Ctx = struct } end +type edge_kind = + | Loop + | Exit_loop of bool ref + | Exit_switch of bool ref + | Forward + let var x = J.EVar (J.V x) let int n = J.ENum (J.Num.of_int32 (Int32.of_int n)) @@ -567,80 +577,14 @@ let enqueue expr_queue prop x ce loc cardinal acc = (****) -module Interm : sig - type elt = - { pc : Addr.t - ; var : Var.t - ; value : int - ; default : bool - } - - type t - - val empty : t - - val mem : Addr.t -> t -> bool - - val find : Addr.t -> t -> elt - - val add : t -> idx:Addr.t -> var:Var.t -> (Addr.t * int * bool) list -> t - - val resolve_nodes : t -> Addr.Set.t -> Addr.Set.t -end = struct - type elt = - { pc : Addr.t - ; var : Var.t - ; value : int - ; default : bool - } - - type t = elt Addr.Map.t - - let empty = Addr.Map.empty - - let mem pc t = Addr.Map.mem pc t - - let find pc t = Addr.Map.find pc t - - let add t ~idx ~var members = - List.fold_left members ~init:t ~f:(fun acc (pc, value, default) -> - Addr.Map.add pc { pc = idx; var; value; default } acc) - - let rec resolve_node interm pc = - try - let int = find pc interm in - resolve_node interm int.pc - with Not_found -> pc - - let resolve_nodes interm s = - Addr.Set.fold (fun pc s' -> Addr.Set.add (resolve_node interm pc) s') s Addr.Set.empty -end - type state = - { succs : - (Addr.t, int list) Hashtbl.t (* List of forward successors for a given block *) - ; backs : (Addr.t, Addr.Set.t) Hashtbl.t (* Set of back edges for a given block *) - ; preds : (Addr.t, int) Hashtbl.t (* Number of predecessors for a given block *) - ; seen : (Addr.t, int) Hashtbl.t - (* For blocks that are member of a frontier, it's the number of predecessor already compiled *) - ; loops : Addr.Set.t - (* Set of blocks that are start a loop / have incoming back edges *) + { structure : Structure.t + ; dom : Structure.graph ; visited_blocks : Addr.Set.t ref - ; dominance_frontier_cache : (Addr.t, int Addr.Map.t) Hashtbl.t - (* dominance_frontier of a block. The frontier is a map containing number of edges to each member of the frontier. *) - ; last_interm_idx : int ref ; ctx : Ctx.t ; blocks : Code.block Addr.Map.t } -let get_preds st pc = Hashtbl.find st.preds pc - -let get_succs st pc = Hashtbl.find st.succs pc - -let get_seen st pc = try Hashtbl.find st.seen pc with Not_found -> 0 - -let incr_seen st pc = Hashtbl.replace st.seen pc (get_seen st pc + 1) - module DTree = struct (* This as to be kept in sync with the way we build conditionals and switches! *) @@ -669,7 +613,7 @@ module DTree = struct let build_if b1 b2 = If (IsTrue, Branch ([ 1 ], b1), Branch ([ 0 ], b2)) - let build_switch (a : cont array) : 'a t = + let build_switch (a : cont array) : cont t = let m = Config.Param.switch_max_case () in let ai = Array.mapi a ~f:(fun i x -> x, i) in (* group the contiguous cases with the same continuation *) @@ -726,14 +670,18 @@ module DTree = struct assert (len > 0); loop 0 (len - 1) - let rec fold_cont f b acc = - match b with - | If (_, b1, b2) -> - let acc = fold_cont f b1 acc in - let acc = fold_cont f b2 acc in - acc - | Switch a -> Array.fold_left a ~init:acc ~f:(fun acc (_, (pc, _)) -> f pc acc) - | Branch (_, (pc, _)) -> f pc acc + let nbbranch (a : cont t) pc = + let rec loop c : cont t -> int = function + | Branch (_, (pc', _)) -> if pc' = pc then succ c else c + | If (_, a, b) -> + let c = loop c a in + let c = loop c b in + c + | Switch a -> + Array.fold_left a ~init:c ~f:(fun acc (_, (pc', _)) -> + if pc' = pc then succ acc else acc) + in + loop 0 a let nbcomp a = let rec loop c = function @@ -747,156 +695,16 @@ module DTree = struct let c = succ c in c in + loop 0 a end -let fold_children blocks pc f accu = - let block = Addr.Map.find pc blocks in - match fst block.branch with - | Return _ | Raise _ | Stop -> accu - | Branch (pc', _) | Poptrap (pc', _) -> f pc' accu - | Pushtrap ((pc1, _), _, (pc2, _), _) -> - let accu = f pc1 accu in - let accu = f pc2 accu in - accu - | Cond (_, cont1, cont2) -> DTree.fold_cont f (DTree.build_if cont1 cont2) accu - | Switch (_, a1, a2) -> - let switch a acc = - match a with - | [||] -> acc - | _ -> DTree.fold_cont f (DTree.build_switch a) acc - in - let accu = switch a1 accu in - let accu = switch a2 accu in - accu - let build_graph ctx pc = let visited_blocks = ref Addr.Set.empty in - let loops = ref Addr.Set.empty in - let succs = Hashtbl.create 17 in - let poptrap = Hashtbl.create 17 in - let backs = Hashtbl.create 17 in - let preds = Hashtbl.create 17 in - let seen = Hashtbl.create 17 in let blocks = ctx.Ctx.blocks in - let dominance_frontier_cache = Hashtbl.create 17 in - let incr_prec pc = - match Hashtbl.find preds pc with - | exception Not_found -> Hashtbl.add preds pc 1 - | n -> Hashtbl.replace preds pc (succ n) - in - let add_cf_frontier pc front = - let prev = Hashtbl.find succs pc in - Addr.Set.iter incr_prec front; - Hashtbl.replace succs pc (Addr.Set.elements front @ prev) - in - let rec loop pc anc pushtrap = - if not (Addr.Set.mem pc !visited_blocks) - then ( - visited_blocks := Addr.Set.add pc !visited_blocks; - let anc = Addr.Set.add pc anc in - let s = Code.fold_children blocks pc Addr.Set.add Addr.Set.empty in - let pc_backs = Addr.Set.inter s anc in - Hashtbl.add backs pc pc_backs; - let s = fold_children blocks pc (fun x l -> x :: l) [] in - let pc_succs = List.filter s ~f:(fun pc -> not (Addr.Set.mem pc anc)) in - let b = Addr.Map.find pc blocks in - Hashtbl.add succs pc pc_succs; - Addr.Set.iter (fun pc' -> loops := Addr.Set.add pc' !loops) pc_backs; - List.iter pc_succs ~f:(fun pc' -> - let pushtrap = - match fst b.branch with - | Pushtrap ((pc1, _), _, (pc2, _), _remove) -> - if pc' = pc1 - then ( - Hashtbl.add poptrap pc Addr.Set.empty; - pc :: pushtrap) - else ( - assert (pc' = pc2); - pushtrap) - | Poptrap (pc1, _) -> ( - match pushtrap with - | [] -> assert false - | p :: rest -> - let old = Hashtbl.find poptrap p in - Hashtbl.replace poptrap p (Addr.Set.add pc1 old); - rest) - | _ -> pushtrap - in - loop pc' anc pushtrap); - List.iter pc_succs ~f:incr_prec) - in - loop pc Addr.Set.empty []; - Hashtbl.add preds pc 1; - let () = - (* Create an artificial frontier when we pop an exception handler *) - let rec keep_front pc = - if Hashtbl.find preds pc > 1 - then (* already part of a merge node *) false - else - match Addr.Map.find pc blocks with - | { body = []; branch = Return _, _; _ } -> false - | { body = []; branch = Stop, _; _ } -> false - | { body = []; branch = Branch (pc', _), _; _ } -> keep_front pc' - | _ -> true - in - Hashtbl.iter - (fun pc_pushtrap pc3 -> - let pc3 = Addr.Set.filter keep_front pc3 in - add_cf_frontier pc_pushtrap pc3) - poptrap - in - { visited_blocks - ; dominance_frontier_cache - ; seen - ; loops = !loops - ; succs - ; backs - ; preds - ; last_interm_idx = ref (-1) - ; ctx - ; blocks - } - -let rec frontier_of_pc st pc = - match Hashtbl.find st.dominance_frontier_cache pc with - | d -> d - | exception Not_found -> - let visited = frontier_of_succs st (get_succs st pc) in - Hashtbl.add st.dominance_frontier_cache pc visited; - visited - -and frontier_of_succs st succs = - let visited = ref Addr.Map.empty in - let q = Queue.create () in - let incr pc n = Queue.add (Addr.Map.singleton pc n) q in - List.iter succs ~f:(fun pc -> incr pc 1); - while not (Queue.is_empty q) do - visited := - Addr.Map.merge - (fun k a b -> - let sum = Option.value ~default:0 a + Option.value ~default:0 b in - if get_preds st k = sum - then ( - Queue.add (frontier_of_pc st k) q; - None) - else Some sum) - !visited - (Queue.take q) - done; - !visited - -(* [seen] can be used to specify how many predecessor have been - handled already. It is used when compiling merge_nodes. *) -let dominance_frontier ?(seen = 1) st pc = - let pred = get_preds st pc in - assert (pred >= seen); - if pred > seen - then Addr.Set.singleton pc - else - (* pred = seen *) - let grey = frontier_of_pc st pc in - Addr.Map.fold (fun k _ acc -> Addr.Set.add k acc) grey Addr.Set.empty + let structure = Structure.build_graph blocks pc in + let dom = Structure.dominator_tree structure in + { visited_blocks; structure; dom; ctx; blocks } (****) @@ -1205,6 +1013,11 @@ let throw_statement ctx cx k loc = , loc ) ] +let next_label scope_stack = + match scope_stack with + | (_, (l, _, _)) :: _ -> J.Label.succ l + | [] -> J.Label.zero + let rec translate_expr ctx queue loc x e level : _ * J.statement_list = match e with | Apply { f; args; exact } -> @@ -1384,14 +1197,14 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = -> let (po, co), queue = access_queue queue o in J.EUn (J.Delete, J.dot co f), or_p po mutator_p, queue - (* + (* This is only useful for debugging: - {[ + {[ | Extern "caml_js_get", [ _; Pc (String _) ] -> assert false | Extern "caml_js_set", [ _; Pc (String s); _ ] -> assert false | Extern "caml_js_delete", [ _; Pc (String _) ] -> assert false - ]} - *) + ]} + *) | Extern "%overrideMod", [ Pc (String m); Pc (String f) ] -> runtime_fun ctx (Printf.sprintf "caml_%s_%s" m f), const_p, queue | Extern "%overrideMod", _ -> assert false @@ -1574,49 +1387,34 @@ and translate_instrs ctx expr_queue instr last = st @ instrs, expr_queue (* Compile loops. *) -and compile_block st queue (pc : Addr.t) loop_stack frontier interm = +and compile_block st queue (pc : Addr.t) scope_stack ~fall_through = if (not (List.is_empty queue)) - && (Addr.Set.mem pc st.loops || not (Config.Flag.inline ())) + && (Structure.is_loop_header st.structure pc || not (Config.Flag.inline ())) then - let never, code = compile_block st [] pc loop_stack frontier interm in + let never, code = compile_block st [] pc scope_stack ~fall_through in never, flush_all queue code else - match Addr.Set.mem pc st.loops with - | false -> compile_block_no_loop st queue pc loop_stack frontier interm + match Structure.is_loop_header st.structure pc with + | false -> compile_block_no_loop st queue pc scope_stack ~fall_through | true -> if debug () then Format.eprintf "@[for(;;) {@,"; let never_body, body = - let lab = - match loop_stack with - | (_, (l, _)) :: _ -> J.Label.succ l - | [] -> J.Label.zero - in + let lab = next_label scope_stack in let lab_used = ref false in - let loop_stack = (pc, (lab, lab_used)) :: loop_stack in - let never_body, body = - compile_block_no_loop st queue pc loop_stack frontier interm + let exit_branch_used = ref false in + let scope_stack = (pc, (lab, lab_used, Loop)) :: scope_stack in + let scope_stack = + match fall_through with + | Block fall_through -> + (fall_through, (lab, lab_used, Exit_loop exit_branch_used)) :: scope_stack + | Return -> scope_stack in - let body = - let rec remove_tailing_continue acc = function - | [] -> body - | [ (J.Continue_statement None, _) ] -> List.rev acc - | x :: xs -> remove_tailing_continue (x :: acc) xs - in - remove_tailing_continue [] body + let never_body, body = + compile_block_no_loop st queue pc scope_stack ~fall_through:(Block pc) in + if debug () then Format.eprintf "}@]@,"; let for_loop = - ( J.For_statement - ( J.Left None - , None - , None - , Js_simpl.block - (if never_body - then ( - if debug () then Format.eprintf "}@]@,"; - body) - else ( - if debug () then Format.eprintf "break;@;}@]@,"; - body @ [ J.Break_statement None, J.N ])) ) + ( J.For_statement (J.Left None, None, None, Js_simpl.block body) , source_location st.ctx (Code.location_of_pc pc) ) in let label = if !lab_used then Some lab else None in @@ -1625,166 +1423,66 @@ and compile_block st queue (pc : Addr.t) loop_stack frontier interm = | None -> for_loop | Some label -> J.Labelled_statement (label, for_loop), J.N in - never_body, [ for_loop ] + (not !exit_branch_used) && never_body, [ for_loop ] in never_body, body (* Compile block. Loops have already been handled. *) -and compile_block_no_loop st queue (pc : Addr.t) loop_stack frontier interm = +and compile_block_no_loop st queue (pc : Addr.t) ~fall_through scope_stack = if pc < 0 then assert false; if Addr.Set.mem pc !(st.visited_blocks) then ( Format.eprintf "Trying to compile a block twice !!!! %d@." pc; assert false); - let seen = get_seen st pc and pred = get_preds st pc in - if seen > pred - then ( - Format.eprintf "This block has too many incoming edges. !!!! %d@." pc; - assert false); - if seen < pred - then ( - Format.eprintf - "Trying to compile %d, but some (%d) of its predecessors have not been compiled \ - yet. !!!!." - pc - (pred - seen); - assert false); - assert (seen = pred); + if debug () then Format.eprintf "Compiling block %d@;" pc; st.visited_blocks := Addr.Set.add pc !(st.visited_blocks); - if debug () then Format.eprintf "block %d; frontier: %s;@," pc (string_of_set frontier); let block = Addr.Map.find pc st.blocks in let seq, queue = translate_instrs st.ctx queue block.body block.branch in - let new_frontier = - List.fold_left - (get_succs st pc) - ~f:(fun acc pc -> - let grey = dominance_frontier st pc in - Addr.Set.union acc grey) - ~init:Addr.Set.empty - in - let prefix, frontier_cont, new_interm, merge_node = - colapse_frontier "default" st new_frontier interm + let nbbranch = + match fst block.branch with + | Switch (_, a, b) -> + (* Build an artifical dtree with the correct layout so that + [Dtree.nbbranch dtree pc] is correct *) + let dtree = + match a, b with + | [||], _ -> DTree.build_switch b + | _, [||] -> DTree.build_switch a + | _ -> DTree.If (IsTrue, DTree.build_switch a, DTree.build_switch b) + in + fun pc -> DTree.nbbranch dtree pc + | Cond (_, a, b) -> + let dtree = DTree.build_if a b in + fun pc -> DTree.nbbranch dtree pc + | _ -> fun _pc -> 0 in - List.iter (get_succs st pc) ~f:(fun pc -> incr_seen st pc); - (* Beware evaluation order! *) - let never_cond, cond = - compile_conditional - st - queue - block.branch - loop_stack - (Hashtbl.find st.backs pc) - (Addr.Set.union frontier frontier_cont) - new_interm + + let new_scopes = + Structure.get_edges st.dom pc + |> Addr.Set.elements + |> List.filter ~f:(fun pc' -> + nbbranch pc' >= 2 || Structure.is_merge_node st.structure pc') + |> Structure.sort_in_post_order st.structure in - let never_after, after = - compile_merge_node st frontier_cont loop_stack frontier interm merge_node + let rec loop ~scope_stack ~fall_through l = + match l with + | [] -> compile_conditional st queue ~fall_through block.branch scope_stack + | x :: xs -> ( + let l = next_label scope_stack in + let used = ref false in + let scope_stack = (x, (l, used, Forward)) :: scope_stack in + let _never_inner, inner = loop ~scope_stack ~fall_through:(Block x) xs in + let never, code = compile_block st [] x scope_stack ~fall_through in + match !used with + | true -> never, [ J.Labelled_statement (l, (J.Block inner, J.N)), J.N ] @ code + | false -> never, inner @ code) in - never_cond || never_after, seq @ prefix @ cond @ after - -(* Compile a merge_node if present *) -and compile_merge_node - st - (pc : Addr.Set.t) - loop_stack - (frontier : Addr.Set.t) - interm - merge_node = - assert (Addr.Set.cardinal pc <= 1); - match Addr.Set.choose_opt pc, merge_node with - | None, Some _ -> assert false - | None, None -> (* Nothing to compile *) false, [] - | Some pc, None -> - (* merge node with a one block frontier *) - compile_branch st [] (pc, []) loop_stack Addr.Set.empty frontier interm - | Some _, Some (members, branch) -> - (* merge node *) - let new_frontier = - members - |> List.map ~f:(fun pc -> - if Addr.Set.mem pc frontier - then Addr.Set.singleton pc - else - let seen = get_seen st pc in - dominance_frontier ~seen st pc) - |> List.fold_left ~init:Addr.Set.empty ~f:Addr.Set.union - in - (* The frontier has to move when compiling a merge node. Fail early instead of infinite recursion. *) - if List.for_all members ~f:(fun pc -> Addr.Set.mem pc new_frontier) - then assert false; - let prefix, frontier_cont, new_interm, merge_node = - colapse_frontier "merge_node" st new_frontier interm - in - let never_cond, cond = - compile_conditional - st - [] - branch - loop_stack - Addr.Set.empty - (Addr.Set.union frontier frontier_cont) - new_interm - in - let never_after, after = - compile_merge_node st frontier_cont loop_stack frontier interm merge_node - in - never_cond || never_after, prefix @ cond @ after - -and colapse_frontier name st (new_frontier' : Addr.Set.t) interm = - let new_frontier = Interm.resolve_nodes interm new_frontier' in - if debug () - then - Format.eprintf - "Resolve %s to %s;@," - (string_of_set new_frontier') - (string_of_set new_frontier); - if Addr.Set.cardinal new_frontier <= 1 - then [], new_frontier, interm, None - else - let idx = - decr st.last_interm_idx; - !(st.last_interm_idx) - in - if debug () - then - Format.eprintf - "colapse frontier(%s) into %d: %s@," - name - idx - (string_of_set new_frontier); - let x = Code.Var.fresh_n "switch" in - let a = - Addr.Set.elements new_frontier - |> List.map ~f:(fun pc -> pc, get_preds st pc - get_seen st pc) - |> List.sort ~cmp:(fun (pc1, (c1 : int)) (pc2, (c2 : int)) -> - match compare c2 c1 with - | 0 -> compare pc1 pc2 - | c -> c) - |> List.map ~f:fst - in - if debug () then Format.eprintf "var %a;@," Code.Var.print x; - Hashtbl.add st.succs idx a; - Hashtbl.add st.preds idx (List.length a); - let pc_i = List.mapi a ~f:(fun i pc -> pc, i) in - let default = 0 in - let interm = - Interm.add interm ~idx ~var:x (List.map pc_i ~f:(fun (pc, i) -> pc, i, default = i)) - in - let branch = - let cases = Array.of_list (List.map a ~f:(fun pc -> pc, [])) in - if Array.length cases > 2 - then Code.Switch (x, cases, [||]), Code.noloc - else Code.Cond (x, cases.(1), cases.(0)), Code.noloc - in - ( [ J.variable_declaration [ J.V x, (int default, J.N) ], J.N ] - , Addr.Set.singleton idx - , interm - , Some (a, branch) ) + let never_after, after = loop ~scope_stack ~fall_through (List.rev new_scopes) in + never_after, seq @ after -and compile_decision_tree kind st loop_stack backs frontier interm loc cx dtree = +and compile_decision_tree kind st scope_stack loc cx dtree ~fall_through = (* Some changes here may require corresponding changes in function [DTree.fold_cont] above. *) - let rec loop cx : _ -> bool * _ = function + let rec loop cx scope_stack : _ -> bool * _ = function | DTree.Branch (l, cont) -> if debug () then @@ -1796,13 +1494,12 @@ and compile_decision_tree kind st loop_stack backs frontier interm loc cx dtree ~pp_sep:(fun fmt () -> Format.pp_print_string fmt ", ") (fun fmt pc -> Format.fprintf fmt "%d" pc)) l; - - let never, code = compile_branch st [] cont loop_stack backs frontier interm in + let never, code = compile_branch st [] cont scope_stack ~fall_through in if debug () then Format.eprintf "}@]@;"; never, code | DTree.If (cond, cont1, cont2) -> - let never1, iftrue = loop cx cont1 in - let never2, iffalse = loop cx cont2 in + let never1, iftrue = loop cx scope_stack cont1 in + let never2, iffalse = loop cx scope_stack cont2 in let e' = match cond with | IsTrue -> cx @@ -1822,25 +1519,48 @@ and compile_decision_tree kind st loop_stack backs frontier interm loc cx dtree let all_never = ref true in let len = Array.length a in let last_index = len - 1 in - let arr = - Array.mapi a ~f:(fun i ((ints, _) as branch) -> - let never, cont = loop cx (Branch branch) in - if not never then all_never := false; - let cont = - if never || (* default case *) i = last_index - then cont - else cont @ [ J.Break_statement None, J.N ] - in - ints, cont) + let lab = next_label scope_stack in + let label_used = ref false in + let exit_branch_used = ref false in + let scope_stack = + match fall_through with + | Block fall_through -> + (fall_through, (lab, label_used, Exit_switch exit_branch_used)) + :: scope_stack + | Return -> scope_stack + in + let last = + let case = a.(last_index) in + let never, code = loop cx scope_stack (Branch case) in + if not never then all_never := false; + code + in + let rec loop_cases pos acc = + let ((ints, _cont) as case) = a.(pos) in + let never, code = loop cx scope_stack (Branch case) in + if not never then all_never := false; + let _, acc = + List.fold_right ints ~init:(true, acc) ~f:(fun i (first, acc) -> + ( false + , ( int i + , if first + then if not never then code @ [ Break_statement None, J.N ] else code + else [] ) + :: acc )) + in + if pos = 0 then acc else loop_cases (pred pos) acc in - let _, last = arr.(last_index) in - let l = Array.to_list (Array.sub arr ~pos:0 ~len:(len - 1)) in - let l = - List.flatten - (List.map l ~f:(fun (ints, br) -> - List.map_last ~f:(fun last i -> int i, if last then br else []) ints)) + let l = loop_cases (last_index - 1) [] in + let code = + if !label_used + then + [ ( J.Labelled_statement + (lab, (J.Switch_statement (cx, l, Some last, []), loc)) + , loc ) + ] + else [ J.Switch_statement (cx, l, Some last, []), loc ] in - !all_never, [ J.Switch_statement (cx, l, Some last, []), loc ] + (not !exit_branch_used) && !all_never, code in let cx, binds = match cx with @@ -1849,10 +1569,10 @@ and compile_decision_tree kind st loop_stack backs frontier interm loc cx dtree let v = J.V (Code.Var.fresh ()) in J.EVar v, [ J.variable_declaration [ v, (cx, J.N) ], J.N ] in - let never, code = loop cx dtree in + let never, code = loop cx scope_stack dtree in never, binds @ code -and compile_conditional st queue last loop_stack backs frontier interm = +and compile_conditional st queue ~fall_through last scope_stack : _ * _ = let last, pc = last in (if debug () then @@ -1878,13 +1598,11 @@ and compile_conditional st queue last loop_stack backs frontier interm = if st.ctx.Ctx.should_export then Some (s_var Constant.exports) else None in true, flush_all queue [ J.Return_statement e_opt, loc ] - | Branch cont -> compile_branch st queue cont loop_stack backs frontier interm + | Branch cont -> compile_branch st queue cont scope_stack ~fall_through | Pushtrap (c1, x, e1, _) -> - let never_body, body = compile_branch st [] c1 loop_stack backs frontier interm in + let never_body, body = compile_branch st [] c1 scope_stack ~fall_through in if debug () then Format.eprintf "@,}@]@,@[catch {@;"; - let never_handler, handler = - compile_branch st [] e1 loop_stack backs frontier interm - in + let never_handler, handler = compile_branch st [] e1 scope_stack ~fall_through in let exn_var, handler = assert (not (List.mem x ~set:(snd e1))); let wrap_exn x = @@ -1909,7 +1627,7 @@ and compile_conditional st queue last loop_stack backs frontier interm = , loc ) ] ) | Poptrap cont -> - let never, code = compile_branch st [] cont loop_stack backs frontier interm in + let never, code = compile_branch st [] cont scope_stack ~fall_through in never, flush_all queue code | Cond (x, c1, c2) -> let (_px, cx), queue = access_queue queue x in @@ -1917,10 +1635,8 @@ and compile_conditional st queue last loop_stack backs frontier interm = compile_decision_tree "Bool" st - loop_stack - backs - frontier - interm + scope_stack + ~fall_through loc cx (DTree.build_if c1 c2) @@ -1932,10 +1648,8 @@ and compile_conditional st queue last loop_stack backs frontier interm = compile_decision_tree "Tag" st - loop_stack - backs - frontier - interm + scope_stack + ~fall_through loc (Mlvalue.Block.tag cx) (DTree.build_switch a2) @@ -1947,10 +1661,8 @@ and compile_conditional st queue last loop_stack backs frontier interm = compile_decision_tree "Int" st - loop_stack - backs - frontier - interm + scope_stack + ~fall_through loc cx (DTree.build_switch a1) @@ -1963,10 +1675,8 @@ and compile_conditional st queue last loop_stack backs frontier interm = compile_decision_tree "Int" st - loop_stack - backs - frontier - interm + scope_stack + ~fall_through loc (var x) (DTree.build_switch a1) @@ -1975,10 +1685,8 @@ and compile_conditional st queue last loop_stack backs frontier interm = compile_decision_tree "Tag" st - loop_stack - backs - frontier - interm + scope_stack + ~fall_through loc (Mlvalue.Block.tag (var x)) (DTree.build_switch a2) @@ -2001,62 +1709,82 @@ and compile_conditional st queue last loop_stack backs frontier interm = | Switch _ | Cond _ | Pushtrap _ -> Format.eprintf "}@]@;"); res -and compile_argument_passing ctx queue (pc, args) _backs continuation = +and compile_argument_passing ctx queue (pc, args) continuation = if List.is_empty args then continuation queue else let block = Addr.Map.find pc ctx.Ctx.blocks in parallel_renaming block.params args continuation queue -and compile_branch st queue ((pc, _) as cont) loop_stack backs frontier interm : bool * _ - = - compile_argument_passing st.ctx queue cont backs (fun queue -> - if Addr.Set.mem pc backs - then ( - let label = - match loop_stack with - | [] -> assert false - | (pc', _) :: rem -> - if pc = pc' +and compile_branch st queue ((pc, _) as cont) scope_stack ~fall_through : bool * _ = + compile_argument_passing st.ctx queue cont (fun queue -> + if match fall_through with + | Block pc' -> pc' = pc + | Return -> false + then false, flush_all queue [] + else + match List.assoc_opt pc scope_stack with + | Some (l, used, Loop) -> + (* Loop back to the beginning of the loop using continue. + We can skip the label if we're not inside a nested loop. *) + let rec can_skip_label scope_stack = + match scope_stack with + | [] -> assert false + | (_, (_, _, (Forward | Exit_switch _))) :: rem -> can_skip_label rem + | (pc', (l', _, (Loop | Exit_loop _))) :: rem -> + Poly.(l' = l) && (pc = pc' || can_skip_label rem) + in + let label = + if can_skip_label scope_stack then None - else - let lab, used = List.assoc pc rem in + else ( used := true; - Some lab - in - if debug () - then - if Option.is_none label - then Format.eprintf "continue;@," - else Format.eprintf "continue (%d);@," pc; - true, flush_all queue [ J.Continue_statement label, J.N ]) - else if Addr.Set.mem pc frontier || Interm.mem pc interm - then ( - if debug () then Format.eprintf "(br %d)@;" pc; - false, flush_all queue (compile_branch_selection pc interm)) - else compile_block st queue pc loop_stack frontier interm) - -and compile_branch_selection pc interm = - try - let { Interm.pc; var = x; value = i; default } = Interm.find pc interm in - if debug () then Format.eprintf "%a=%d;@;" Code.Var.print x i; - let branch = compile_branch_selection pc interm in - if default - then branch - else (J.Expression_statement (EBin (Eq, EVar (J.V x), int i)), J.N) :: branch - with Not_found -> [] + Some l) + in + if debug () + then + if Option.is_none label + then Format.eprintf "continue;@," + else Format.eprintf "continue (%d);@," pc; + true, flush_all queue [ J.Continue_statement label, J.N ] + | Some (l, used, (Exit_loop branch_used | Exit_switch branch_used)) -> + (* Break out of a loop or switch (using Break) + We can skip the label if we're not inside a nested loop or switch. + *) + branch_used := true; + let rec can_skip_label scope_stack = + match scope_stack with + | [] -> assert false + | (_, (_, _, Forward)) :: rem -> can_skip_label rem + | (pc', (l', _, (Loop | Exit_loop _ | Exit_switch _))) :: rem -> + Poly.(l' = l) && (pc = pc' || can_skip_label rem) + in + let label = + if can_skip_label scope_stack + then None + else ( + used := true; + Some l) + in + if debug () + then + if Option.is_none label + then Format.eprintf "break;@," + else Format.eprintf "break (%d);@," pc; + true, flush_all queue [ J.Break_statement label, J.N ] + | Some (l, used, Forward) -> + (* break outside a labelled statement. The label is mandatory in this case. *) + if debug () then Format.eprintf "(br %d)@;" pc; + used := true; + true, flush_all queue [ J.Break_statement (Some l), J.N ] + | None -> compile_block st queue pc scope_stack ~fall_through) and compile_closure ctx (pc, args) = let st = build_graph ctx pc in - let current_blocks = !(st.visited_blocks) in - st.visited_blocks := Addr.Set.empty; + let current_blocks = Structure.get_nodes st.structure in if debug () then Format.eprintf "@[closure {@;"; - let backs = Addr.Set.empty in - let loop_stack = [] in - incr_seen st pc; - let _never, res = - compile_branch st [] (pc, args) loop_stack backs Addr.Set.empty Interm.empty - in + let scope_stack = [] in + let _never, res = compile_branch st [] (pc, args) scope_stack ~fall_through:Return in if Addr.Set.cardinal !(st.visited_blocks) <> Addr.Set.cardinal current_blocks then ( let missing = Addr.Set.diff current_blocks !(st.visited_blocks) in diff --git a/compiler/lib/js_simpl.ml b/compiler/lib/js_simpl.ml index 536dc00bbd..24c78d7558 100644 --- a/compiler/lib/js_simpl.ml +++ b/compiler/lib/js_simpl.ml @@ -216,7 +216,7 @@ let rec if_statement_2 e loc iftrue truestop iffalse falsestop = if Poly.(e1 = e) then J.EBin (J.Or, e, e2) else J.ECond (e, e1, e2) in [ J.Variable_statement (Var, [ DeclPattern (p1, (exp, loc)) ]), loc ] - | _ -> assert false + | _ -> raise Not_assignment with Not_assignment -> ( try let e1 = expression_of_statement iftrue in diff --git a/compiler/lib/structure.ml b/compiler/lib/structure.ml new file mode 100644 index 0000000000..8d6b59940b --- /dev/null +++ b/compiler/lib/structure.ml @@ -0,0 +1,163 @@ +open Stdlib +open Code + +let get_edges g src = try Hashtbl.find g src with Not_found -> Addr.Set.empty + +let add_edge g src dst = Hashtbl.replace g src (Addr.Set.add dst (get_edges g src)) + +let reverse_tree t = + let g = Hashtbl.create 16 in + Hashtbl.iter (fun child parent -> add_edge g parent child) t; + g + +let reverse_graph g = + let g' = Hashtbl.create 16 in + Hashtbl.iter + (fun child parents -> Addr.Set.iter (fun parent -> add_edge g' parent child) parents) + g; + g' + +let rec leave_try_body blocks pc = + match Addr.Map.find pc blocks with + | { body = []; branch = (Return _ | Stop), _; _ } -> false + | { body = []; branch = Branch (pc', _), _; _ } -> leave_try_body blocks pc' + | _ -> true + +type graph = (Addr.t, Addr.Set.t) Hashtbl.t + +type t = + { succs : (Addr.t, Addr.Set.t) Hashtbl.t + ; preds : (Addr.t, Addr.Set.t) Hashtbl.t + ; reverse_post_order : Addr.t list + ; block_order : (Addr.t, int) Hashtbl.t + } + +let get_nodes g = + List.fold_left + ~init:Addr.Set.empty + ~f:(fun s pc -> Addr.Set.add pc s) + g.reverse_post_order + +let block_order g pc = Hashtbl.find g.block_order pc + +let is_backward g pc pc' = Hashtbl.find g.block_order pc >= Hashtbl.find g.block_order pc' + +let is_forward g pc pc' = Hashtbl.find g.block_order pc < Hashtbl.find g.block_order pc' + +let build_graph blocks pc = + let succs = Hashtbl.create 16 in + let l = ref [] in + let visited = Hashtbl.create 16 in + let rec traverse ~englobing_exn_handlers pc = + if not (Hashtbl.mem visited pc) + then ( + Hashtbl.add visited pc (); + let successors = Code.fold_children blocks pc Addr.Set.add Addr.Set.empty in + Hashtbl.add succs pc successors; + let block = Addr.Map.find pc blocks in + Addr.Set.iter + (fun pc' -> + let englobing_exn_handlers = + match fst block.branch with + | Pushtrap ((body_pc, _), _, _, _) when pc' = body_pc -> + pc :: englobing_exn_handlers + | Poptrap (leave_pc, _) -> ( + match englobing_exn_handlers with + | [] -> assert false + | enter_pc :: rem -> + if leave_try_body blocks leave_pc + then + (* Add an edge to limit the [try] body *) + Hashtbl.add + succs + enter_pc + (Addr.Set.add leave_pc (Hashtbl.find succs enter_pc)); + rem) + | _ -> englobing_exn_handlers + in + traverse ~englobing_exn_handlers pc') + successors; + l := pc :: !l) + in + traverse ~englobing_exn_handlers:[] pc; + let block_order = Hashtbl.create 16 in + List.iteri !l ~f:(fun i pc -> Hashtbl.add block_order pc i); + let preds = reverse_graph succs in + { succs; preds; reverse_post_order = !l; block_order } + +let dominator_tree g = + (* A Simple, Fast Dominance Algorithm + Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy *) + let dom = Hashtbl.create 16 in + let rec inter pc pc' = + (* Compute closest common ancestor *) + if pc = pc' + then pc + else if is_forward g pc pc' + then inter pc (Hashtbl.find dom pc') + else inter (Hashtbl.find dom pc) pc' + in + List.iter g.reverse_post_order ~f:(fun pc -> + let l = Hashtbl.find g.succs pc in + Addr.Set.iter + (fun pc' -> + if is_forward g pc pc' + then + let d = try inter pc (Hashtbl.find dom pc') with Not_found -> pc in + Hashtbl.replace dom pc' d) + l); + (* Check we have reached a fixed point (reducible graph) *) + List.iter g.reverse_post_order ~f:(fun pc -> + let l = Hashtbl.find g.succs pc in + Addr.Set.iter + (fun pc' -> + if is_forward g pc pc' + then + let d = Hashtbl.find dom pc' in + assert (inter pc d = d)) + l); + reverse_tree dom + +(* pc has at least two forward edges moving into it *) +let is_merge_node g pc = + let s = try Hashtbl.find g.preds pc with Not_found -> Addr.Set.empty in + let o = Hashtbl.find g.block_order pc in + let n = + Addr.Set.fold + (fun pc' n -> if Hashtbl.find g.block_order pc' < o then n + 1 else n) + s + 0 + in + n > 1 + +let is_loop_header g pc = + let s = try Hashtbl.find g.preds pc with Not_found -> Addr.Set.empty in + let o = Hashtbl.find g.block_order pc in + Addr.Set.exists (fun pc' -> Hashtbl.find g.block_order pc' >= o) s + +let sort_in_post_order t l = + List.sort ~cmp:(fun a b -> compare (block_order t a) (block_order t b)) l + +(* + +(* pc dominates pc' *) +let rec dominates g idom pc pc' = + pc = pc' || (is_forward g pc pc' && dominates g idom pc (Hashtbl.find idom pc')) + +let dominance_frontier g idom = + let frontiers = Hashtbl.create 16 in + Hashtbl.iter + (fun pc preds -> + if Addr.Set.cardinal preds > 1 + then + let dom = Hashtbl.find idom pc in + let rec loop runner = + if runner <> dom + then ( + add_edge frontiers runner pc; + loop (Hashtbl.find idom runner)) + in + Addr.Set.iter loop preds) + g.preds; + frontiers +*) diff --git a/compiler/lib/structure.mli b/compiler/lib/structure.mli new file mode 100644 index 0000000000..6278174c6f --- /dev/null +++ b/compiler/lib/structure.mli @@ -0,0 +1,24 @@ +open! Stdlib +open Code + +type graph + +type t + +val get_edges : graph -> Addr.t -> Addr.Set.t + +val is_backward : t -> Addr.t -> Addr.t -> bool + +val is_forward : t -> Addr.t -> Addr.t -> bool + +val build_graph : block Addr.Map.t -> Addr.t -> t + +val dominator_tree : t -> graph + +val is_merge_node : t -> Addr.t -> bool + +val is_loop_header : t -> Addr.t -> bool + +val sort_in_post_order : t -> Addr.t list -> Addr.t list + +val get_nodes : t -> Addr.Set.t diff --git a/compiler/tests-compiler/cond.ml b/compiler/tests-compiler/cond.ml index 350e548379..04ce3d0f07 100644 --- a/compiler/tests-compiler/cond.ml +++ b/compiler/tests-compiler/cond.ml @@ -43,25 +43,27 @@ let%expect_test "conditional" = [%expect {| function f(a, b, c, d, e, f){ - var switch$0 = 0; - if(a){ - if(! b && ! c && ! d && ! e && ! f){var x = 1; switch$0 = 1;} + a: + { + b: + if(a){ + if(! b && ! c && ! d && ! e && ! f){var x = 1; break a;} + } + else if(b){ + if(! c && ! d){if(e) break b; if(f) break b; var x = 2; break a;} + } + else if(c){ + if(! d && ! e && ! f){var x = 3; break a;} + } + else if(d){ + if(! e && ! f){var x = 4; break a;} + } + else{ + if(! e){if(f){var x = 6; break a;} var x = 100; break a;} + if(! f){var x = 5; break a;} + } + var x = - 1; } - else if(b){ - var switch$1 = 0; - if(c || d) switch$1 = 1; else if(! e && ! f){var x = 2; switch$0 = 1;} - } - else if(c){ - if(! d && ! e && ! f){var x = 3; switch$0 = 1;} - } - else if(d){ - if(! e && ! f){var x = 4; switch$0 = 1;} - } - else if(e){ - if(! f){var x = 5; switch$0 = 1;} - } - else if(f){var x = 6; switch$0 = 1;} else{var x = 100; switch$0 = 1;} - if(! switch$0) var x = - 1; return x + 2 | 0; } //end |}] diff --git a/compiler/tests-compiler/exceptions.ml b/compiler/tests-compiler/exceptions.ml index 5383e0a1e6..c90bd5f4de 100644 --- a/compiler/tests-compiler/exceptions.ml +++ b/compiler/tests-compiler/exceptions.ml @@ -33,11 +33,15 @@ let prevent_inline = some_name [%expect {| function some_name(param){ - try{ - try{throw caml_maybe_attach_backtrace(Stdlib[8], 1);} - catch(x$0){var x = caml_wrap_exception(x$0), i$0 = x;} + a: + { + try{ + try{throw caml_maybe_attach_backtrace(Stdlib[8], 1);} + catch(x$0){var x = caml_wrap_exception(x$0);} + } + catch(i$1){var i = caml_wrap_exception(i$1), i$0 = i; break a;} + var i$0 = x; } - catch(i$1){var i = caml_wrap_exception(i$1), i$0 = i;} throw caml_maybe_attach_backtrace(i$0, 1); } //end |}]; diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 4b96b037f1..e4971515a8 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -156,7 +156,6 @@ let () = M.myfun M.x {| function myfun(x){ var x$0 = x; - a: for(;;){ if(! x$0) return 0; var @@ -320,13 +319,8 @@ let () = M.myfun M.x len = 0, param = l; for(;;){ - if(param){ - var l$0 = param[2], len$0 = len + 1 | 0, len = len$0, param = l$0; - continue; - } - if(2 <= len) sort(len, l); - var x$0 = next; - continue a; + if(! param){if(2 <= len) sort(len, l); var x$0 = next; break;} + var l$0 = param[2], len$0 = len + 1 | 0, len = len$0, param = l$0; } } } @@ -496,11 +490,13 @@ let () = M.run () even = closures$0[1]; even(i); var _e_ = i + 1 | 0; - if(4 !== i){var i = _e_; 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_); + 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_); + } + var i = _e_; } } //end |}] @@ -566,7 +562,6 @@ let () = M.run () {| function run(param){ var i = 0; - a: for(;;){ var closures = @@ -618,13 +613,15 @@ let () = M.run () even = closures$0[1], param$0 = even(i); for(;;){ - if(759635106 > param$0[1]){var f = param$0[2], param$0 = f(0); continue;} - var _g_ = i + 1 | 0; - if(4 !== i){var i = _g_; continue a;} - var - _e_ = caml_call1(Stdlib_List[9], delayed[1]), - _f_ = function(f){return caml_call1(f, 0);}; - return caml_call2(Stdlib_List[17], _f_, _e_); + if(759635106 <= param$0[1]){ + var _g_ = i + 1 | 0; + if(4 !== i){var i = _g_; break;} + var + _e_ = caml_call1(Stdlib_List[9], delayed[1]), + _f_ = function(f){return caml_call1(f, 0);}; + return caml_call2(Stdlib_List[17], _f_, _e_); + } + var f = param$0[2], param$0 = f(0); } } } diff --git a/compiler/tests-compiler/gh747.ml b/compiler/tests-compiler/gh747.ml index b8b9b1fc3d..bf8ed7a038 100644 --- a/compiler/tests-compiler/gh747.ml +++ b/compiler/tests-compiler/gh747.ml @@ -353,8 +353,8 @@ end 128: (Stdlib_Printf[1], outchan, _c_, str); 129: } 130: /*<>*/ /*<>*/ var _g_ = i + 1 | 0; - 131: if(_f_ !== i){var i = _g_; continue;} - 132: break; + 131: if(_f_ === i) break; + 132: var i = _g_; 133: } 134: } 135: return 0; diff --git a/compiler/tests-compiler/lazy.ml b/compiler/tests-compiler/lazy.ml index 4369b43673..1ec728acd6 100644 --- a/compiler/tests-compiler/lazy.ml +++ b/compiler/tests-compiler/lazy.ml @@ -36,12 +36,12 @@ let%expect_test "static eval of string get" = function do_the_lazy_rec(n){ if(0 === n) return 0; var _b_ = do_the_lazy_rec(n - 1 | 0), _c_ = runtime.caml_obj_tag(lz); + a: if(250 === _c_) var _d_ = lz[1]; else{ - var switch$0 = 0; - if(246 !== _c_ && 244 !== _c_){var _d_ = lz; switch$0 = 1;} - if(! switch$0) var _d_ = caml_call1(CamlinternalLazy[2], lz); + if(246 !== _c_ && 244 !== _c_){var _d_ = lz; break a;} + var _d_ = caml_call1(CamlinternalLazy[2], lz); } return [0, _d_, _b_]; } diff --git a/compiler/tests-compiler/loops.ml b/compiler/tests-compiler/loops.ml index 14332852da..4cd3e5af87 100644 --- a/compiler/tests-compiler/loops.ml +++ b/compiler/tests-compiler/loops.ml @@ -34,19 +34,18 @@ let%expect_test "rec-fun" = function fun_with_loop(acc, param){ var acc$0 = acc, param$0 = param; for(;;){ - if(param$0){ + if(! param$0){ var - xs = param$0[2], - x = param$0[1], - acc$1 = [0, x, acc$0], - acc$0 = acc$1, - param$0 = xs; - continue; + _a_ = caml_call1(Stdlib_List[9], acc$0), + _b_ = caml_call1(Stdlib_List[9], _a_); + return caml_call1(Stdlib_List[9], _b_); } var - _a_ = caml_call1(Stdlib_List[9], acc$0), - _b_ = caml_call1(Stdlib_List[9], _a_); - return caml_call1(Stdlib_List[9], _b_); + xs = param$0[2], + x = param$0[1], + acc$1 = [0, x, acc$0], + acc$0 = acc$1, + param$0 = xs; } } //end |}] @@ -76,7 +75,6 @@ let rec fun_with_loop acc = function {| function fun_with_loop(acc, param){ var acc$0 = acc, param$0 = param; - a: for(;;){ if(! param$0){ var @@ -98,9 +96,8 @@ let rec fun_with_loop acc = function for(;;){ a[1] = [0, 1, a[1]]; var _a_ = i + 1 | 0; - if(10 !== i){var i = _a_; continue;} - var acc$1 = [0, x, a[1]], acc$0 = acc$1, param$0 = xs; - continue a; + if(10 === i){var acc$1 = [0, x, a[1]], acc$0 = acc$1, param$0 = xs; break;} + var i = _a_; } } } @@ -127,19 +124,20 @@ let for_for_while () = {| function for_for_while(param){ var k = 1; - a: for(;;){ var j = 1; - b: + a: for(;;) for(;;){ - if(10 > runtime.caml_mul(k, j)){id[1]++; continue;} - var _b_ = j + 1 | 0; - if(10 !== j){var j = _b_; continue b;} - var _a_ = k + 1 | 0; - if(10 === k) return 0; - var k = _a_; - continue a; + if(10 <= runtime.caml_mul(k, j)){ + var _b_ = j + 1 | 0; + if(10 !== j){var j = _b_; break;} + var _a_ = k + 1 | 0; + if(10 === k) return 0; + var k = _a_; + break a; + } + id[1]++; } } } @@ -166,24 +164,22 @@ let for_for_while () = {| function for_for_while(param){ var k = 1; - a: for(;;){ var j = 1; - b: + a: for(;;) for(;;){ - if(10 > caml_div(k, j)){ - try{caml_div(k, j);} - catch(_c_){throw caml_maybe_attach_backtrace(Stdlib[8], 1);} - id[1]++; - continue; + if(10 <= caml_div(k, j)){ + var _b_ = j + 1 | 0; + if(10 !== j){var j = _b_; break;} + var _a_ = k + 1 | 0; + if(10 === k) return 0; + var k = _a_; + break a; } - var _b_ = j + 1 | 0; - if(10 !== j){var j = _b_; continue b;} - var _a_ = k + 1 | 0; - if(10 === k) return 0; - var k = _a_; - continue a; + try{caml_div(k, j);} + catch(_c_){throw caml_maybe_attach_backtrace(Stdlib[8], 1);} + id[1]++; } } } @@ -263,22 +259,22 @@ let f t x = if(val$0 && ! val$0[2]){ var x$1 = val$0[1], x$0 = x$1; for(;;){ - var switch$0 = 0; - try{var val = caml_call2(Stdlib_Hashtbl[6], t, x$0); switch$0 = 1;} - catch(_e_){ - var _a_ = caml_wrap_exception(_e_); - if(_a_ !== Stdlib[3]) throw caml_maybe_attach_backtrace(_a_, 0); - var _d_ = 0; - } - if(switch$0){ - var switch$1 = 0; + a: + { + try{var val = caml_call2(Stdlib_Hashtbl[6], t, x$0);} + catch(_e_){ + var _a_ = caml_wrap_exception(_e_); + if(_a_ !== Stdlib[3]) throw caml_maybe_attach_backtrace(_a_, 0); + var _d_ = 0; + break a; + } if(val && ! val[2]){ var y = val[1], _b_ = y === (x$0 + 1 | 0) ? 1 : 0; - if(! _b_){var x$0 = y; continue;} - var _d_ = _b_; - switch$1 = 1; + if(_b_){var _d_ = _b_; break a;} + var x$0 = y; + continue; } - if(! switch$1) var _d_ = 0; + var _d_ = 0; } return _d_ ? 1 : 2; } @@ -314,25 +310,26 @@ in loop x var x$1 = x; for(;;){ if(0 === x$1) return 1; - if(1 !== x$1){var x$2 = x$1 + 1 | 0, x$1 = x$2; continue;} - var x$0 = 2; - for(;;){ - var switch$0 = 0; - if(3 < x$0 >>> 0) - switch$0 = 1; - else - switch(x$0){ - case 0: - var _a_ = 1; break; - case 2: - var n = caml_call1(Stdlib_Random[5], 2), _a_ = n + n | 0; break; - case 3: - var n$0 = caml_call1(Stdlib_Random[5], 2), x$0 = n$0; continue; - default: switch$0 = 1; + if(1 === x$1){ + var x$0 = 2; + for(;;){ + a: + { + if(3 >= x$0 >>> 0) + switch(x$0){ + case 0: + var _a_ = 1; break a; + case 2: + var n = caml_call1(Stdlib_Random[5], 2), _a_ = n + n | 0; break a; + case 3: + var n$0 = caml_call1(Stdlib_Random[5], 2), x$0 = n$0; continue; + } + var _a_ = 2; } - if(switch$0) var _a_ = 2; - return _a_ + 2 | 0; + return _a_ + 2 | 0; + } } + var x$2 = x$1 + 1 | 0, x$1 = x$2; } } //end |}] @@ -435,94 +432,99 @@ let add_substitute = return _b_ ? caml_call2(add_char, b, previous) : _b_; } var previous$0 = caml_string_get(s, i$4); - if(36 !== previous$0){ + if(36 === previous$0) if(92 === previous){ - caml_call2(add_char, b, 92); caml_call2(add_char, b, previous$0); - var i$6 = i$4 + 1 | 0, previous = 32, i$4 = i$6; - continue; - } - if(92 === previous$0){ - var i$7 = i$4 + 1 | 0, previous = previous$0, i$4 = i$7; - continue; + var i$5 = i$4 + 1 | 0, previous = 32, i$4 = i$5; } - caml_call2(add_char, b, previous$0); - var i$8 = i$4 + 1 | 0, previous = previous$0, i$4 = i$8; - continue; - } - if(92 === previous){ - caml_call2(add_char, b, previous$0); - var i$5 = i$4 + 1 | 0, previous = 32, i$4 = i$5; - continue; - } - 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), switch$0 = 0; - if(40 !== opening && 123 !== opening){ - var start = start$0 + 1 | 0, lim$0 = caml_ml_string_length(s), i$2 = start; - for(;;){ - if(lim$0 <= i$2) - var stop$0 = lim$0; - else{ - var match = caml_string_get(s, i$2), switch$1 = 0; - if(91 <= match){ - if(97 <= match){ - if(123 > match) switch$1 = 1; + 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; } - else if(95 === match) switch$1 = 1; } - else if(58 <= match){ - if(65 <= match) switch$1 = 1; + 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; } - else if(48 <= match) switch$1 = 1; - if(switch$1){var i$3 = i$2 + 1 | 0, i$2 = i$3; continue;} - var stop$0 = i$2; } - var - match$0 = - [0, - caml_call3(Stdlib_String[15], s, start$0, stop$0 - start$0 | 0), - stop$0]; - switch$0 = 1; - break; + var next_i = match$0[2], ident = match$0[1]; + caml_call2(add_string, b, caml_call1(f, ident)); + var previous = 32, i$4 = next_i; } + else if(92 === previous){ + caml_call2(add_char, b, 92); + caml_call2(add_char, b, previous$0); + var i$6 = i$4 + 1 | 0, previous = 32, i$4 = i$6; } - if(! switch$0){ - 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; - continue; - } - if(caml_string_get(s, stop) !== closing){ - var i$1 = stop + 1 | 0, stop = i$1; - continue; - } - if(0 !== k){ - var i$0 = stop + 1 | 0, k$1 = k - 1 | 0, k = k$1, stop = i$0; - continue; - } - var - match$0 = - [0, - caml_call3 - (Stdlib_String[15], s, new_start, (stop - start$0 | 0) - 1 | 0), - stop + 1 | 0]; - break; - } + else if(92 === previous$0) + var i$7 = i$4 + 1 | 0, previous = previous$0, i$4 = i$7; + else{ + caml_call2(add_char, b, previous$0); + var i$8 = i$4 + 1 | 0, previous = previous$0, i$4 = i$8; } - var next_i = match$0[2], ident = match$0[1]; - caml_call2(add_string, b, caml_call1(f, ident)); - var previous = 32, i$4 = next_i; } } //end |}] diff --git a/compiler/tests-compiler/match_with_exn.ml b/compiler/tests-compiler/match_with_exn.ml index 060cc93a21..73d2be5761 100644 --- a/compiler/tests-compiler/match_with_exn.ml +++ b/compiler/tests-compiler/match_with_exn.ml @@ -73,34 +73,35 @@ let fun2 () = [%expect {| function fun1(param){ - var switch$0 = 0; - try{var i$1 = caml_call1(Stdlib_Random[5], 2);} - catch(_e_){ - var _d_ = caml_wrap_exception(_e_); - if(_d_[1] !== A) throw caml_maybe_attach_backtrace(_d_, 0); - var i = _d_[2]; - if(2 !== i) return i + 2 | 0; - var i$0 = i; - switch$0 = 1; + a: + { + try{var i$1 = caml_call1(Stdlib_Random[5], 2);} + catch(_e_){ + var _d_ = caml_wrap_exception(_e_); + if(_d_[1] !== A) throw caml_maybe_attach_backtrace(_d_, 0); + var i = _d_[2]; + if(2 !== i) return i + 2 | 0; + var i$0 = i; + break a; + } + if(0 !== i$1) return i$1 + 1 | 0; + var i$0 = i$1; } - if(! switch$0){if(0 !== i$1) return i$1 + 1 | 0; var i$0 = i$1;} return i$0; } //end function fun2(param){ - var switch$0 = 0; - try{var i$0 = caml_call1(Stdlib_Random[5], 2);} - catch(_c_){ - var _a_ = caml_wrap_exception(_c_), switch$1 = 0; - if(_a_[1] === A){ - var _b_ = _a_[2]; - if(2 === _b_){var i = _b_; switch$0 = 1;} else switch$1 = 1; + a: + { + try{var i$0 = caml_call1(Stdlib_Random[5], 2);} + catch(_c_){ + var _a_ = caml_wrap_exception(_c_); + if(_a_[1] === A){var _b_ = _a_[2]; if(2 === _b_){var i = _b_; break a;}} + throw caml_maybe_attach_backtrace(_a_, 0); } - else - switch$1 = 1; - if(switch$1) throw caml_maybe_attach_backtrace(_a_, 0); + if(0 !== i$0) return i$0 + 1 | 0; + var i = i$0; } - if(! switch$0){if(0 !== i$0) return i$0 + 1 | 0; var i = i$0;} return i; } //end |}] diff --git a/compiler/tests-compiler/mutable_closure.ml b/compiler/tests-compiler/mutable_closure.ml index 68a56a6f06..e8c34e902b 100644 --- a/compiler/tests-compiler/mutable_closure.ml +++ b/compiler/tests-compiler/mutable_closure.ml @@ -158,14 +158,16 @@ let%expect_test _ = indirect[1] = [0, function(i, f){return function(param){return f(i);};}(i, f), _f_]; var _g_ = i + 1 | 0; - if(3 !== i){var i = _g_; continue;} - var - _c_ = indirect[1], - _d_ = function(f){return caml_call1(f, 0);}, - indirect$0 = caml_call2(Stdlib_List[19], _d_, _c_), - direct$0 = direct[1]; - if(runtime.caml_equal(indirect$0, direct$0)) return 0; - throw caml_maybe_attach_backtrace([0, Assert_failure, _b_], 1); + if(3 === i){ + var + _c_ = indirect[1], + _d_ = function(f){return caml_call1(f, 0);}, + indirect$0 = caml_call2(Stdlib_List[19], _d_, _c_), + direct$0 = direct[1]; + if(runtime.caml_equal(indirect$0, direct$0)) return 0; + throw caml_maybe_attach_backtrace([0, Assert_failure, _b_], 1); + } + var i = _g_; } } //end|}] diff --git a/compiler/tests-compiler/variable_declaration_output.ml b/compiler/tests-compiler/variable_declaration_output.ml index 70bd6e38bf..f4275e9d77 100644 --- a/compiler/tests-compiler/variable_declaration_output.ml +++ b/compiler/tests-compiler/variable_declaration_output.ml @@ -124,10 +124,10 @@ let%expect_test _ = [%expect {| function match_expr(param){ - var switch$1, switch$0, _c_, _b_, _a_; + var _c_, _b_, _a_; + a: if(param){ _a_ = param[1]; - switch$0 = 0; if(_a_){ _b_ = _a_[1]; if(_b_){ @@ -135,13 +135,10 @@ let%expect_test _ = } else if(! param[2]) return 2; } - else if(! param[2]) switch$0 = 1; - if(! switch$0){ - _c_ = param[2]; - switch$1 = 0; - if(_c_ && ! _c_[1]) switch$1 = 1; - if(! switch$1) return 4; - } + else if(! param[2]) break a; + _c_ = param[2]; + if(_c_ && ! _c_[1]) break a; + return 4; } return 1; } @@ -150,8 +147,9 @@ let%expect_test _ = [%expect {| function match_expr(param){ + a: if(param){ - var _a_ = param[1], switch$0 = 0; + var _a_ = param[1]; if(_a_){ var _b_ = _a_[1]; if(_b_){ @@ -159,12 +157,10 @@ let%expect_test _ = } else if(! param[2]) return 2; } - else if(! param[2]) switch$0 = 1; - if(! switch$0){ - var _c_ = param[2], switch$1 = 0; - if(_c_ && ! _c_[1]) switch$1 = 1; - if(! switch$1) return 4; - } + else if(! param[2]) break a; + var _c_ = param[2]; + if(_c_ && ! _c_[1]) break a; + return 4; } return 1; } diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 498240028e..1d720ab560 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -481,15 +481,13 @@ /*<>*/ 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), - switch$0 = 0; - if(48 <= match){ - if(58 > match) switch$0 = 1; + /*<>*/ /*<>*/ 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; } - else if(45 === match) switch$0 = 1; - if(! switch$0) /*<>*/ return s; /*<>*/ var /*<>*/ i$0 = i + 1 | 0, i = i$0; @@ -544,12 +542,13 @@ /*<>*/ for(;;){ if(! param$0) /*<>*/ return 0; var l = param$0[2], a = param$0[1]; - /*<>*/ try{ - /*<>*/ /*<>*/ caml_ml_flush(a); + a: + 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); + if(_v_[1] === Sys_error) break a; + throw caml_maybe_attach_backtrace(_v_, 0); } var param$0 = l; } @@ -586,10 +585,9 @@ (oc); /*<>*/ } function close_out_noerr(oc){ - /*<>*/ try{ - /*<>*/ /*<>*/ caml_ml_flush(oc); - } - catch(_u_){} + /*<>*/ b: + try{ /*<>*/ /*<>*/ caml_ml_flush(oc);} + catch(_u_){break b;} /*<>*/ try{ /*<>*/ /*<>*/ var _s_ = /*<>*/ caml_ml_close_channel(oc); @@ -831,8 +829,7 @@ 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_) continue; - /*<>*/ return _m_; + if(! _m_) /*<>*/ return _m_; } /*<>*/ } /*<>*/ /*<>*/ var @@ -1301,18 +1298,21 @@ /*<>*/ return [0, arity, start_env]; /*<>*/ } function of_val(x){ - /*<>*/ var switch$0 = 0; - if - (is_block(x) - && /*<>*/ caml_obj_tag(x) !== 248 && 1 <= x.length - 1){var slot = x[1]; switch$0 = 1;} - if(! switch$0) var slot = x; - var switch$1 = 0; - if(is_block(slot) && /*<>*/ caml_obj_tag(slot) === 248){var name = slot[1]; switch$1 = 1;} - if(! switch$1) + /*<>*/ b: + { + if + (is_block(x) + && /*<>*/ caml_obj_tag(x) !== 248 && 1 <= x.length - 1){var slot = x[1]; break b;} + 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 @@ -1615,12 +1615,12 @@ /*<>*/ return [246, function(_f_){ var _g_ = caml_obj_tag(x); + b: if(250 === _g_) var _h_ = x[1]; else{ - var switch$0 = 0; - if(246 !== _g_ && 244 !== _g_){var _h_ = x; switch$0 = 1;} - if(! switch$0) var _h_ = caml_call1(CamlinternalLazy[2], x); + if(246 !== _g_ && 244 !== _g_){var _h_ = x; break b;} + var _h_ = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return /*<>*/ caml_call1 (f, _h_); @@ -1631,23 +1631,23 @@ /*<>*/ return [246, function(_c_){ var _d_ = caml_obj_tag(x); + b: if(250 === _d_) var _e_ = x[1]; else{ - var switch$0 = 0; - if(246 !== _d_ && 244 !== _d_){var _e_ = x; switch$0 = 1;} - if(! switch$0) var _e_ = caml_call1(CamlinternalLazy[2], x); + if(246 !== _d_ && 244 !== _d_){var _e_ = x; break b;} + var _e_ = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return /*<>*/ caml_call1 (f, _e_); }]; var _a_ = caml_obj_tag(x); + b: if(250 === _a_) var _b_ = x[1]; else{ - var switch$0 = 0; - if(246 !== _a_ && 244 !== _a_){var _b_ = x; switch$0 = 1;} - if(! switch$0) var _b_ = caml_call1(CamlinternalLazy[2], x); + if(246 !== _a_ && 244 !== _a_){var _b_ = x; break b;} + var _b_ = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return from_val ( /*<>*/ caml_call1(f, _b_)); @@ -2404,13 +2404,15 @@ xs$1 = match[2], x = match[1], /*<>*/ match$0 = /*<>*/ caml_call1(f, x); - if(0 === match$0[0]){var xs$0 = xs$1; continue;} - var z = match$0[1]; - /*<>*/ return [0, - z, - function(_A_){ - /*<>*/ return filter_map_find_right_map(f, xs$1, _A_); - }]; + 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){ @@ -2966,39 +2968,38 @@ (Stdlib[1], cst_Char_chr); /*<>*/ } function escaped(c){ - /*<>*/ var switch$0 = 0; - if(40 <= c){ - if(92 === c) /*<>*/ return cst; - if(127 > c) switch$0 = 1; - } - else if(32 <= c){ - if(39 <= c) /*<>*/ return cst$0; - switch$0 = 1; - } - else 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; - } - if(switch$0){ - /*<>*/ /*<>*/ var - s$0 = /*<>*/ caml_create_bytes(1); - caml_bytes_unsafe_set(s$0, 0, c); - return caml_string_of_bytes(s$0); - } - /*<>*/ /*<>*/ 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); + /*<>*/ b: + { + if(40 <= c){ + if(92 === c) /*<>*/ return cst; + if(127 > c) break b; + } + else{ + if(32 <= c){if(39 <= c) /*<>*/ return cst$0; break b;} + 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; @@ -3707,14 +3708,13 @@ for(;;){ if(! param) /*<>*/ return rev(accu$0); var l = param[2], x = param[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)){ + /*<>*/ if( /*<>*/ caml_call1(p, x)) /*<>*/ var /*<>*/ accu$1 = [0, x, accu$0], accu$0 = accu$1, param = l; - continue; - } - var param = l; + else + var param = l; }}; /*<>*/ } function filteri(p, l){ @@ -3743,15 +3743,14 @@ x = param[1], /*<>*/ match = /*<>*/ caml_call1(f, x); - if(match){ + if(match) /*<>*/ var v = match[1], /*<>*/ accu$1 = [0, v, accu$0], accu$0 = accu$1, param = l; - continue; - } - var param = l; + else + var param = l; }}; /*<>*/ } function concat_map(f, l){ @@ -3792,17 +3791,16 @@ /*<>*/ return [0, rev(yes), _A_]; } var l$0 = param[2], x = param[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)){ + /*<>*/ if( /*<>*/ caml_call1(p, x)) /*<>*/ var /*<>*/ yes$0 = [0, x, yes], yes = yes$0, param = l$0; - continue; - } - /*<>*/ var - /*<>*/ no$0 = [0, x, no], - no = no$0, - param = l$0; + else + /*<>*/ var + /*<>*/ no$0 = [0, x, no], + no = no$0, + param = l$0; } /*<>*/ } function partition_map(p, l){ @@ -3816,19 +3814,18 @@ l$0 = param[2], x = param[1], /*<>*/ match = /*<>*/ caml_call1(p, x); - if(0 === match[0]){ + if(0 === match[0]) /*<>*/ var v = match[1], /*<>*/ left$0 = [0, v, left], left = left$0, param = l$0; - continue; - } - /*<>*/ var - v$0 = match[1], - /*<>*/ right$0 = [0, v$0, right], - right = right$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){ @@ -4602,8 +4599,8 @@ for(;;){ caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; - if(_aq_ !== i){var i = _ar_; continue;} - break; + if(_aq_ === i) break; + var i = _ar_; } } /*<>*/ return s; @@ -4646,15 +4643,14 @@ /*<>*/ var c = a + b | 0, _ao_ = b < 0 ? 1 : 0, - match = c < 0 ? 1 : 0, - switch$0 = 0; - if(a < 0){ - if(_ao_ && ! match) switch$0 = 1; - } - else if(! _ao_ && match) switch$0 = 1; - return switch$0 - ? /*<>*/ caml_call1(Stdlib[1], cst_Bytes_extend) - : c; + match = c < 0 ? 1 : 0; + b: + { + if(a < 0){if(_ao_ && ! match) break b;} else if(! _ao_ && match) break b; + /*<>*/ return c; + } + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Bytes_extend); /*<>*/ } function extend(s, left, right){ /*<>*/ var @@ -4721,8 +4717,8 @@ /*<>*/ /*<>*/ caml_call1 (f, caml_bytes_unsafe_get(a, i)); /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ !== i){var i = _an_; continue;} - break; + if(_am_ === i) break; + var i = _an_; } } return 0; @@ -4737,8 +4733,8 @@ /*<>*/ /*<>*/ caml_call2 (f, i, caml_bytes_unsafe_get(a, i)); /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ !== i){var i = _ak_; continue;} - break; + if(_aj_ === i) break; + var i = _ak_; } } return 0; @@ -4773,25 +4769,20 @@ for(;;){ if(! param$0) /*<>*/ return dst; var hd$0 = param$0[1]; - if(param$0[2]){ - 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; - continue; + if(! param$0[2]){ + /*<>*/ /*<>*/ caml_blit_bytes + (hd$0, 0, dst, pos, caml_ml_bytes_length(hd$0)); + /*<>*/ return dst; } - /*<>*/ /*<>*/ 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; } } } @@ -4809,14 +4800,14 @@ /*<>*/ return r; /*<>*/ } function is_space(param){ - /*<>*/ var - /*<>*/ _ag_ = param - 9 | 0, - switch$0 = 0; - if(4 < _ag_ >>> 0){ - if(23 === _ag_) switch$0 = 1; - } - else if(2 !== _ag_) switch$0 = 1; - return switch$0 ? 1 : 0; + /*<>*/ /*<>*/ var + _ag_ = param - 9 | 0; + b: + { + if(4 < _ag_ >>> 0){if(23 !== _ag_) break b;} else if(2 === _ag_) break b; + /*<>*/ return 1; + } + /*<>*/ return 0; /*<>*/ } function trim(s){ /*<>*/ var @@ -4842,30 +4833,36 @@ if(_$_ >= 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; - } - else if(56 < _ad_ - 1 >>> 0) switch$0 = 1; else switch$1 = 1; - if(switch$1){var _ae_ = 1; switch$0 = 2;} - } - else - if(11 <= match){ - if(13 === match) switch$0 = 1; + var match = caml_bytes_unsafe_get(s, i$0); + c: + { + d: + { + e: + { + if(32 <= match){ + var _ad_ = match - 34 | 0; + if(58 < _ad_ >>> 0){ + if(93 <= _ad_) break e; + } + else if(56 < _ad_ - 1 >>> 0) break d; + var _ae_ = 1; + break c; + } + if(11 <= match){ + if(13 === match) break d; + } + else if(8 <= match) break d; + } + var _ae_ = 4; + break c; } - else if(8 <= match) switch$0 = 1; - switch(switch$0){ - case 0: - var _ae_ = 4; break; - case 1: - var _ae_ = 2; break; + var _ae_ = 2; } n[1] = n[1] + _ae_ | 0; /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; - if(_$_ !== i$0){var i$0 = _af_; continue;} - break; + if(_$_ === i$0) break; + var i$0 = _af_; } } if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; @@ -4878,61 +4875,65 @@ if(_ab_ >= 0){ var i = _aa_; for(;;){ - var c = caml_bytes_unsafe_get(s, i), switch$2 = 0; - if(35 <= c) - if(92 === c) - switch$2 = 2; - else if(127 <= c) switch$2 = 1; else switch$2 = 3; - else if(32 <= c) - if(34 <= c) switch$2 = 2; else switch$2 = 3; - else if(14 <= c) - switch$2 = 1; - else - 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; - case 9: - caml_bytes_unsafe_set(s$0, n[1], 92); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 116); - break; - case 10: - caml_bytes_unsafe_set(s$0, n[1], 92); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 110); - break; - case 13: - caml_bytes_unsafe_set(s$0, n[1], 92); - n[1]++; - caml_bytes_unsafe_set(s$0, n[1], 114); - break; - default: switch$2 = 1; - } - switch(switch$2){ - case 1: - 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; - case 2: + var c = caml_bytes_unsafe_get(s, i); + d: + { + e: + { + f: + { + if(35 <= c){ + if(92 !== c){if(127 <= c) break f; break e;} + } + else{ + if(32 > c){ + if(14 <= c) break f; + 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 d; + case 9: + caml_bytes_unsafe_set(s$0, n[1], 92); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 116); + break d; + case 10: + caml_bytes_unsafe_set(s$0, n[1], 92); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 110); + break d; + case 13: + caml_bytes_unsafe_set(s$0, n[1], 92); + n[1]++; + caml_bytes_unsafe_set(s$0, n[1], 114); + break d; + default: break f; + } + } + if(34 > c) break e; + } caml_bytes_unsafe_set(s$0, n[1], 92); n[1]++; caml_bytes_unsafe_set(s$0, n[1], c); - break; - case 3: - caml_bytes_unsafe_set(s$0, n[1], c); break; + break d; + } + 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 d; + } + caml_bytes_unsafe_set(s$0, n[1], c); } n[1]++; /*<>*/ /*<>*/ var _ac_ = i + 1 | 0; - if(_ab_ !== i){var i = _ac_; continue;} - break; + if(_ab_ === i) break; + var i = _ac_; } } /*<>*/ return s$0; @@ -4957,8 +4958,8 @@ i, /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; - if(_Y_ !== i){var i = _Z_; continue;} - break; + if(_Y_ === i) break; + var i = _Z_; } } /*<>*/ return r; @@ -4979,8 +4980,8 @@ i, /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); /*<>*/ /*<>*/ var _W_ = i + 1 | 0; - if(_V_ !== i){var i = _W_; continue;} - break; + if(_V_ === i) break; + var i = _W_; } } /*<>*/ return r; @@ -4997,8 +4998,8 @@ /*<>*/ caml_call2 (f, r[1], caml_bytes_unsafe_get(a, i)); /*<>*/ /*<>*/ var _T_ = i + 1 | 0; - if(_S_ !== i){var i = _T_; continue;} - break; + if(_S_ === i) break; + var i = _T_; } } return r[1]; @@ -5015,8 +5016,8 @@ /*<>*/ caml_call2 (f, caml_bytes_unsafe_get(a, i), r[1]); /*<>*/ /*<>*/ var _Q_ = i - 1 | 0; - if(0 !== i){var i = _Q_; continue;} - break; + if(0 === i) break; + var i = _Q_; } } return r[1]; @@ -5234,8 +5235,8 @@ j[1] = i; } /*<>*/ /*<>*/ var _G_ = i - 1 | 0; - if(0 !== i){var i = _G_; continue;} - break; + if(0 === i) break; + var i = _G_; } } var _E_ = r[1]; @@ -5460,10 +5461,11 @@ /*<>*/ caml_bytes_get(b, i), /*<>*/ max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; - /*<>*/ if(224 <= b0){ - var switch$0 = 0; - if(237 <= b0){ - if(245 > b0) + b: + { + /*<>*/ if(224 <= b0){ + if(237 <= b0){ + if(245 <= b0) break b; switch(b0 - 237 | 0){ case 0: /*<>*/ /*<>*/ var i$0 = i + 1 | 0; @@ -5547,8 +5549,7 @@ ? /*<>*/ caml_call1(dec_invalid, 3) : dec_ret(4, utf_8_uchar_4(b0, b1$3, b2$3, b3$1)); case 1: - case 2: - switch$0 = 1; break; + case 2: break; default: /*<>*/ /*<>*/ var i$7 = i + 1 | 0; if(max < i$7) @@ -5580,9 +5581,8 @@ ? /*<>*/ caml_call1(dec_invalid, 3) : dec_ret(4, utf_8_uchar_4(b0, b1$2, b2$2, b3$0)); } - } - else{ - if(225 > b0){ + } + else if(225 > b0){ /*<>*/ /*<>*/ var i$13 = i + 1 | 0; if(max < i$13) /*<>*/ return /*<>*/ caml_call1 @@ -5603,9 +5603,6 @@ ? /*<>*/ caml_call1(dec_invalid, 2) : dec_ret(3, utf_8_uchar_3(b0, b1$4, b2$4)); } - switch$0 = 1; - } - if(switch$0){ /*<>*/ /*<>*/ var i$2 = i + 1 | 0; if(max < i$2) /*<>*/ return /*<>*/ caml_call1 @@ -5625,8 +5622,6 @@ ? /*<>*/ caml_call1(dec_invalid, 2) : dec_ret(3, utf_8_uchar_3(b0, b1$0, b2$0)); } - } - else{ if(128 > b0) /*<>*/ return dec_ret(1, b0); if(194 <= b0){ /*<>*/ /*<>*/ var i$15 = i + 1 | 0; @@ -5698,10 +5693,11 @@ if(max < i) /*<>*/ return 1; /*<>*/ /*<>*/ var match = /*<>*/ caml_bytes_unsafe_get(b, i); - if(224 <= match){ - var switch$0 = 0; - if(237 <= match){ - if(245 > match) + a: + { + if(224 <= match){ + if(237 <= match){ + if(245 <= match) break a; switch(match - 237 | 0){ case 0: /*<>*/ /*<>*/ var @@ -5769,8 +5765,7 @@ } /*<>*/ return 0; case 1: - case 2: - switch$0 = 1; break; + case 2: break; default: /*<>*/ /*<>*/ var last$2 = i + 3 | 0; @@ -5795,9 +5790,8 @@ } /*<>*/ return 0; } - } - else{ - if(225 > match){ + } + else if(225 > match){ /*<>*/ /*<>*/ var last$4 = i + 2 | 0; /*<>*/ if @@ -5817,9 +5811,6 @@ } /*<>*/ return 0; } - switch$0 = 1; - } - if(switch$0){ /*<>*/ /*<>*/ var last$0 = i + 2 | 0; /*<>*/ if (max >= last$0 @@ -5838,8 +5829,6 @@ } /*<>*/ return 0; } - } - else{ if(128 > match){ /*<>*/ var /*<>*/ i$7 = i + 1 | 0, @@ -6262,8 +6251,8 @@ /*<>*/ /*<>*/ caml_call1 (f, caml_string_unsafe_get(s, i)); /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ !== i){var i = _V_; continue;} - break; + if(_U_ === i) break; + var i = _V_; } } return 0; @@ -6278,8 +6267,8 @@ /*<>*/ /*<>*/ caml_call2 (f, i, caml_string_unsafe_get(s, i)); /*<>*/ /*<>*/ var _S_ = i + 1 | 0; - if(_R_ !== i){var i = _S_; continue;} - break; + if(_R_ === i) break; + var i = _S_; } } return 0; @@ -6323,14 +6312,13 @@ (Stdlib_Bytes[21], f, _K_); /*<>*/ } function is_space(param){ - /*<>*/ var - /*<>*/ _J_ = param - 9 | 0, - switch$0 = 0; - if(4 < _J_ >>> 0){ - if(23 === _J_) switch$0 = 1; - } - else if(2 !== _J_) switch$0 = 1; - return switch$0 ? 1 : 0; + /*<>*/ /*<>*/ var _J_ = param - 9 | 0; + b: + { + if(4 < _J_ >>> 0){if(23 !== _J_) break b;} else if(2 === _J_) break b; + /*<>*/ return 1; + } + /*<>*/ return 0; /*<>*/ } function trim(s){ /*<>*/ if @@ -6549,8 +6537,8 @@ j[1] = i; } /*<>*/ /*<>*/ var _v_ = i - 1 | 0; - if(0 !== i){var i = _v_; continue;} - break; + if(0 === i) break; + var i = _v_; } } var _t_ = r[1]; @@ -6902,8 +6890,8 @@ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); /*<>*/ /*<>*/ var _at_ = i + 1 | 0; - if(_as_ !== i){var i = _at_; continue;} - break; + if(_as_ === i) break; + var i = _at_; } } /*<>*/ return res; @@ -6919,8 +6907,8 @@ for(;;){ res[1 + x] = /*<>*/ caml_make_vect(sy, init); /*<>*/ /*<>*/ var _aq_ = x + 1 | 0; - if(_ap_ !== x){var x = _aq_; continue;} - break; + if(_ap_ === x) break; + var x = _aq_; } } /*<>*/ return res; @@ -6978,8 +6966,8 @@ for(;;){ /*<>*/ /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ !== i){var i = _an_; continue;} - break; + if(_am_ === i) break; + var i = _an_; } } return 0; @@ -6997,8 +6985,8 @@ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ !== i){var i = _ak_; continue;} - break; + if(_aj_ === i) break; + var i = _ak_; } } return 0; @@ -7018,8 +7006,8 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_ag_ !== i){var i = _ah_; continue;} - break; + if(_ag_ === i) break; + var i = _ah_; } } /*<>*/ return r; @@ -7044,8 +7032,8 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ !== i){var i = _ae_; continue;} - break; + if(_ad_ === i) break; + var i = _ae_; } } /*<>*/ return r; @@ -7060,8 +7048,8 @@ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ !== i){var i = _ab_; continue;} - break; + if(_aa_ === i) break; + var i = _ab_; } } return 0; @@ -7081,8 +7069,8 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ !== i){var i = ___; continue;} - break; + if(_Z_ === i) break; + var i = ___; } } /*<>*/ return r; @@ -7138,8 +7126,8 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ !== i){var i = _X_; continue;} - break; + if(_W_ === i) break; + var i = _X_; } } return r[1]; @@ -7169,8 +7157,8 @@ acc$1[1] = acc$2; /*<>*/ output_array[1 + i] = elt$0; /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ !== i){var i = _U_; continue;} - break; + if(_T_ === i) break; + var i = _U_; } } /*<>*/ return [0, acc$1[1], output_array]; @@ -7184,8 +7172,8 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); /*<>*/ /*<>*/ var _R_ = i - 1 | 0; - if(0 !== i){var i = _R_; continue;} - break; + if(0 === i) break; + var i = _R_; } } return r[1]; @@ -7314,8 +7302,8 @@ /*<>*/ a[1 + i] = ai; /*<>*/ b[1 + i] = bi; /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ !== i){var i = _P_; continue;} - break; + if(_O_ === i) break; + var i = _P_; } } /*<>*/ return [0, a, b]; @@ -7338,8 +7326,8 @@ for(;;){ x[1 + i] = [0, a[1 + i], b[1 + i]]; /*<>*/ /*<>*/ var _M_ = i + 1 | 0; - if(_L_ !== i){var i = _M_; continue;} - break; + if(_L_ === i) break; + var i = _M_; } } /*<>*/ return x; @@ -7392,24 +7380,24 @@ for(;;){ /*<>*/ /*<>*/ var e$1 = caml_check_bound(a, i$6)[1 + i$6]; - /*<>*/ try{ + c: + 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)){ - /*<>*/ /*<>*/ var - _u_ = caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; - var i = j; - continue; + /*<>*/ caml_check_bound(a, i)[1 + i] = e$1; + break; } - /*<>*/ 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){ @@ -7417,16 +7405,17 @@ 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; + break c; } /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; - if(0 !== i$6){var i$6 = _C_; continue;} - break; + if(0 === i$6) break; + var i$6 = _C_; } } /*<>*/ /*<>*/ var _y_ = l - 1 | 0; if(_y_ >= 2){ var i$4 = _y_; - a: + c: for(;;){ /*<>*/ /*<>*/ var e$0 = caml_check_bound(a, i$4)[1 + i$4]; @@ -7465,11 +7454,11 @@ /*<>*/ caml_check_bound(a, 0)[1] = e$0; } /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; - if(2 !== i$4){var i$4 = _B_; continue a;} + if(2 === i$4) break c; + var i$4 = _B_; break; } } - break; } } var _z_ = 1 < l ? 1 : 0; @@ -7498,7 +7487,7 @@ i2 = src2ofs, s2 = s2$1, d = dstofs; - /*<>*/ for(;;){ + /*<>*/ for(;;) /*<>*/ if (0 < /*<>*/ caml_call2(cmp, s1, s2)){ /*<>*/ caml_check_bound(dst, d)[1 + d] = s2; @@ -7510,18 +7499,19 @@ i2 = i2$0, s2 = s2$0, d = d$0; - continue; } - /*<>*/ 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; - } + 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 @@ -7555,10 +7545,10 @@ 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;} + if(_m_ === i) break a; + var i = _t_; break; } - break; } } return 0; @@ -7775,65 +7765,65 @@ /*<>*/ return 0 === caml_float_compare(x, y) ? 1 : 0; /*<>*/ } function min(x, y){ - /*<>*/ if(! (x < y)){ - var switch$0 = 0; + /*<>*/ b: + if(! (x < y)){ /*<>*/ if (! /*<>*/ caml_signbit_float(y) && /*<>*/ caml_signbit_float(x)) - switch$0 = 1; - if(! switch$0) /*<>*/ return x != x ? x : y; + break b; + /*<>*/ return x != x ? x : y; } /*<>*/ return y != y ? y : x; /*<>*/ } function max(x, y){ - /*<>*/ if(! (x < y)){ - var switch$0 = 0; + /*<>*/ b: + if(! (x < y)){ /*<>*/ if (! /*<>*/ caml_signbit_float(y) && /*<>*/ caml_signbit_float(x)) - switch$0 = 1; - if(! switch$0) /*<>*/ return y != y ? y : x; + break b; + /*<>*/ return y != y ? y : x; } /*<>*/ return x != x ? x : y; /*<>*/ } function min_max(x, y){ /*<>*/ if(x == x && y == y){ + a: if(! (x < y)){ - var switch$0 = 0; /*<>*/ if (! /*<>*/ caml_signbit_float(y) && /*<>*/ caml_signbit_float(x)) - switch$0 = 1; - if(! switch$0) /*<>*/ return [0, y, x]; + break a; + /*<>*/ return [0, y, x]; } /*<>*/ return [0, x, y]; } /*<>*/ return [0, nan, nan]; /*<>*/ } function min_num(x, y){ - /*<>*/ if(! (x < y)){ - var switch$0 = 0; + /*<>*/ b: + if(! (x < y)){ /*<>*/ if (! /*<>*/ caml_signbit_float(y) && /*<>*/ caml_signbit_float(x)) - switch$0 = 1; - if(! switch$0) /*<>*/ return y != y ? x : y; + break b; + /*<>*/ return y != y ? x : y; } /*<>*/ return x != x ? y : x; /*<>*/ } function max_num(x, y){ - /*<>*/ if(! (x < y)){ - var switch$0 = 0; + /*<>*/ b: + if(! (x < y)){ /*<>*/ if (! /*<>*/ caml_signbit_float(y) && /*<>*/ caml_signbit_float(x)) - switch$0 = 1; - if(! switch$0) /*<>*/ return x != x ? y : x; + break b; + /*<>*/ return x != x ? y : x; } /*<>*/ return y != y ? x : y; /*<>*/ } @@ -7842,14 +7832,14 @@ /*<>*/ return [0, y, y]; /*<>*/ if(y != y) /*<>*/ return [0, x, x]; + b: if(! (x < y)){ - var switch$0 = 0; /*<>*/ if (! /*<>*/ caml_signbit_float(y) && /*<>*/ caml_signbit_float(x)) - switch$0 = 1; - if(! switch$0) /*<>*/ return [0, y, x]; + break b; + /*<>*/ return [0, y, x]; } /*<>*/ return [0, x, y]; /*<>*/ } @@ -7864,8 +7854,8 @@ for(;;){ /*<>*/ a[1 + i] = v; /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; - if(_ao_ !== i){var i = _ap_; continue;} - break; + if(_ao_ === i) break; + var i = _ap_; } } return 0; @@ -7906,8 +7896,8 @@ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; - if(_ai_ !== i){var i = _aj_; continue;} - break; + if(_ai_ === i) break; + var i = _aj_; } } /*<>*/ return res; @@ -7926,8 +7916,8 @@ /*<>*/ } function concat(l){ /*<>*/ var acc = 0, param = l; - for(;;){ - if(param){ + for(;;) + if(param) var tl = param[2], hd = param[1], @@ -7939,15 +7929,18 @@ (Stdlib[1], cst_Float_Array_concat), acc = acc$0, param = tl; - continue; - } - /*<>*/ var - /*<>*/ result = - /*<>*/ caml_floatarray_create(acc), - l$0 = l, - i = 0; - /*<>*/ for(;;){ - if(l$0){ + 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], @@ -7955,13 +7948,8 @@ /*<>*/ /*<>*/ caml_floatarray_blit (hd$0, 0, result, i, hlen); var i$0 = i + hlen | 0, l$0 = tl$0, i = i$0; - continue; } - if(i === acc) /*<>*/ return result; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); } - } /*<>*/ } function sub(a, ofs, len){ /*<>*/ check(a, ofs, len, cst_Float_Array_sub); @@ -8024,8 +8012,8 @@ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ !== i){var i = _ae_; continue;} - break; + if(_ad_ === i) break; + var i = _ae_; } } return 0; @@ -8043,8 +8031,8 @@ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ !== i){var i = _ab_; continue;} - break; + if(_aa_ === i) break; + var i = _ab_; } } return 0; @@ -8062,8 +8050,8 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ !== i){var i = ___; continue;} - break; + if(_Z_ === i) break; + var i = ___; } } /*<>*/ return r; @@ -8086,8 +8074,8 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ !== i){var i = _X_; continue;} - break; + if(_W_ === i) break; + var i = _X_; } } /*<>*/ return r; @@ -8102,8 +8090,8 @@ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ !== i){var i = _U_; continue;} - break; + if(_T_ === i) break; + var i = _U_; } } return 0; @@ -8121,8 +8109,8 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var _R_ = i + 1 | 0; - if(_Q_ !== i){var i = _R_; continue;} - break; + if(_Q_ === i) break; + var i = _R_; } } /*<>*/ return r; @@ -8137,8 +8125,8 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); /*<>*/ /*<>*/ var _O_ = i + 1 | 0; - if(_N_ !== i){var i = _O_; continue;} - break; + if(_N_ === i) break; + var i = _O_; } } return r[1]; @@ -8152,8 +8140,8 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); /*<>*/ /*<>*/ var _L_ = i - 1 | 0; - if(0 !== i){var i = _L_; continue;} - break; + if(0 === i) break; + var i = _L_; } } return r[1]; @@ -8247,24 +8235,24 @@ for(;;){ /*<>*/ /*<>*/ var e$1 = /*<>*/ caml_array_get(a, i$6); - /*<>*/ try{ + c: + 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, /*<>*/ caml_array_get(a, j)); - var i = j; - continue; + /*<>*/ /*<>*/ caml_array_set + (a, i, e$1); + break; } - /*<>*/ /*<>*/ caml_array_set - (a, i, e$1); - break; + /*<>*/ /*<>*/ caml_array_set + (a, i, /*<>*/ caml_array_get(a, j)); + var i = j; } } catch(exn$0){ @@ -8273,16 +8261,17 @@ var i$0 = exn[2]; /*<>*/ /*<>*/ caml_array_set (a, i$0, e$1); + break c; } /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; - if(0 !== i$6){var i$6 = _J_; continue;} - break; + if(0 === i$6) break; + var i$6 = _J_; } } /*<>*/ /*<>*/ var _F_ = l - 1 | 0; if(_F_ >= 2){ var i$4 = _F_; - a: + c: for(;;){ /*<>*/ /*<>*/ var e$0 = /*<>*/ caml_array_get(a, i$4); @@ -8323,11 +8312,11 @@ (a, 0, e$0); } /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; - if(2 !== i$4){var i$4 = _I_; continue a;} + if(2 === i$4) break c; + var i$4 = _I_; break; } } - break; } } var _G_ = 1 < l ? 1 : 0; @@ -8356,7 +8345,7 @@ i2 = src2ofs, s2 = s2$1, d = dstofs; - /*<>*/ for(;;){ + /*<>*/ for(;;) /*<>*/ if (0 < /*<>*/ caml_call2(cmp, s1, s2)){ /*<>*/ /*<>*/ caml_array_set @@ -8371,20 +8360,22 @@ i2 = i2$0, s2 = s2$0, d = d$0; - continue; } - /*<>*/ /*<>*/ 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; - } + 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 @@ -8416,10 +8407,10 @@ /*<>*/ /*<>*/ caml_array_set (dst, j[1] + 1 | 0, e); /*<>*/ /*<>*/ var _D_ = i + 1 | 0; - if(_C_ !== i){var i = _D_; continue a;} + if(_C_ === i) break a; + var i = _D_; break; } - break; } } return 0; @@ -8514,8 +8505,8 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(_p_ !== i){var i = _q_; continue;} - break; + if(_p_ === i) break; + var i = _q_; } } /*<>*/ return r; @@ -8533,8 +8524,8 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _n_ = i + 1 | 0; - if(_m_ !== i){var i = _n_; continue;} - break; + if(_m_ === i) break; + var i = _n_; } } /*<>*/ return r; @@ -9214,8 +9205,8 @@ /*<>*/ caml_check_bound(t, i)[1 + i] = v - s | 0; /*<>*/ /*<>*/ var _B_ = i + 1 | 0; - if(_A_ !== i){var i = _B_; continue;} - break; + if(_A_ === i) break; + var i = _B_; } } } @@ -9501,41 +9492,43 @@ env[9] = lexbuf[11]; env[10] = lexbuf[12]; var cmd = 1, arg = arg$0; - continue; + break; case 1: /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Parse_error, 1); case 2: /*<>*/ grow_stacks(0); var cmd = 2, arg = 0; - continue; + break; case 3: /*<>*/ grow_stacks(0); var cmd = 3, arg = 0; - continue; + 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; + c: + { + try{ + /*<>*/ var + _i_ = env[13], + /*<>*/ _j_ = + /*<>*/ caml_call1 + (caml_check_bound(tables[1], _i_)[1 + _i_], env), + /*<>*/ _k_ = 4; + } + catch(_m_){ + var _h_ = caml_wrap_exception(_m_); + if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); + var value = 0, action = 5; + break c; + } + var value = _j_, action = _k_; } var cmd = action, arg = value; - continue; + break; default: /*<>*/ /*<>*/ caml_call1 (tables[14], cst_syntax_error); var cmd = 5, arg = 0; - continue; } } catch(exn$0){ @@ -9814,9 +9807,8 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var l = param$0[1]; - if(l){var param$0 = l; continue;} - var v = param$0[2]; - /*<>*/ return v; + if(! l){var v = param$0[2]; /*<>*/ return v;} + var param$0 = l; } /*<>*/ } function min_elt_opt(param){ @@ -9824,9 +9816,8 @@ /*<>*/ for(;;){ if(! param$0) /*<>*/ return 0; var l = param$0[1]; - if(l){var param$0 = l; continue;} - var v = param$0[2]; - /*<>*/ return [0, v]; + if(! l){var v = param$0[2]; /*<>*/ return [0, v];} + var param$0 = l; } /*<>*/ } function max_elt(param){ @@ -9835,18 +9826,22 @@ if(! param$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(param$0[3]){var r = param$0[3], param$0 = r; continue;} - var v = param$0[2]; - /*<>*/ return v; + 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 r = param$0[3], param$0 = r; continue;} - var v = param$0[2]; - /*<>*/ return [0, v]; + 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){ @@ -10119,19 +10114,19 @@ _F_ = subset(l1, l2); /*<>*/ if(! _F_) /*<>*/ return _F_; var s1$0 = r1, s2$0 = r2; - continue; } - if(0 <= c){ + else if(0 <= c){ /*<>*/ /*<>*/ var _G_ = subset([0, 0, v1, r1, 0], r2); /*<>*/ if(! _G_) /*<>*/ return _G_; var s1$0 = l1; - continue; } - /*<>*/ /*<>*/ var - _H_ = subset([0, l1, v1, 0, 0], l2); - /*<>*/ if(! _H_) /*<>*/ return _H_; - var s1$0 = r1; + else{ + /*<>*/ /*<>*/ var + _H_ = subset([0, l1, v1, 0, 0], l2); + /*<>*/ if(! _H_) /*<>*/ return _H_; + var s1$0 = r1; + } } /*<>*/ } function iter(f, param){ @@ -10284,15 +10279,20 @@ (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 param$1 = r$0; continue;} - 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; continue;} - var param = r; + ( /*<>*/ 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){ @@ -10301,15 +10301,20 @@ 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 param$1 = r$0; continue;} - 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; continue;} - var param = r; + ( /*<>*/ 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){ @@ -10320,15 +10325,20 @@ (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 param$1 = l$0; continue;} - 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; continue;} - var param = l; + ( /*<>*/ 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){ @@ -10337,15 +10347,20 @@ 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 param$1 = l$0; continue;} - 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; continue;} - var param = l; + ( /*<>*/ 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){ @@ -10364,22 +10379,21 @@ } } function try_join(l, v, r){ - /*<>*/ var switch$0 = 0; - if(0 !== l){ - /*<>*/ /*<>*/ var _v_ = max_elt(l); - /*<>*/ if - (0 <= /*<>*/ caml_call2(Ord[1], _v_, v)) - switch$0 = 1; - } - if(! switch$0){ - var switch$1 = 0; + /*<>*/ b: + { + if(0 !== l){ + /*<>*/ /*<>*/ var _v_ = max_elt(l); + /*<>*/ if + (0 <= /*<>*/ caml_call2(Ord[1], _v_, v)) + break b; + } if(0 !== r){ /*<>*/ /*<>*/ var _u_ = min_elt(r); /*<>*/ if (0 <= /*<>*/ caml_call2(Ord[1], v, _u_)) - switch$1 = 1; + break b; } - if(! switch$1) /*<>*/ return join(l, v, r); + /*<>*/ return join(l, v, r); } /*<>*/ return union(l, add(v, r)); /*<>*/ } @@ -10801,18 +10815,20 @@ v0$1 = param$1[2], l$0 = param$1[1]; /*<>*/ if - (! /*<>*/ caml_call1(f, v0$1)){var param$1 = r$0; continue;} - 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; - continue; + ( /*<>*/ 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; } - var param = r; } + else + var param$1 = r$0; } } function find_first_opt(f, param$0){ @@ -10825,18 +10841,20 @@ v0$1 = param$1[2], l$0 = param$1[1]; /*<>*/ if - (! /*<>*/ caml_call1(f, v0$1)){var param$1 = r$0; continue;} - 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; - continue; + ( /*<>*/ 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; } - var param = r; } + else + var param$1 = r$0; } } function find_last(f, param$0){ @@ -10851,18 +10869,20 @@ v0$1 = param$1[2], l$0 = param$1[1]; /*<>*/ if - (! /*<>*/ caml_call1(f, v0$1)){var param$1 = l$0; continue;} - 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; - continue; + ( /*<>*/ 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; } - var param = l; } + else + var param$1 = l$0; } } function find_last_opt(f, param$0){ @@ -10875,18 +10895,20 @@ v0$1 = param$1[2], l$0 = param$1[1]; /*<>*/ if - (! /*<>*/ caml_call1(f, v0$1)){var param$1 = l$0; continue;} - 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; - continue; + ( /*<>*/ 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; } - var param = l; } + else + var param$1 = l$0; } } function find_opt(x, param){ @@ -10927,9 +10949,11 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var l = param$0[1]; - if(l){var param$0 = l; continue;} - var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, v, d]; + if(! l){ + var d = param$0[3], v = param$0[2]; + /*<>*/ return [0, v, d]; + } + var param$0 = l; } /*<>*/ } function min_binding_opt(param){ @@ -10937,9 +10961,11 @@ /*<>*/ for(;;){ if(! param$0) /*<>*/ return 0; var l = param$0[1]; - if(l){var param$0 = l; continue;} - var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, [0, v, d]]; + if(! l){ + var d = param$0[3], v = param$0[2]; + /*<>*/ return [0, [0, v, d]]; + } + var param$0 = l; } /*<>*/ } function max_binding(param){ @@ -10948,18 +10974,22 @@ if(! param$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(param$0[4]){var r = param$0[4], param$0 = r; continue;} - var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, v, d]; + 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 r = param$0[4], param$0 = r; continue;} - var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, [0, v, d]]; + 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){ @@ -12049,22 +12079,21 @@ old_len = b[1][2], /*<>*/ new_len = [0, old_len]; for(;;){ - if(new_len[1] < (old_pos + more | 0)){ - new_len[1] = 2 * new_len[1] | 0; - continue; + 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; } - 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){ @@ -12093,12 +12122,8 @@ n = /*<>*/ caml_call3 (Stdlib_Bytes[51], b[1][1], pos, u); - /*<>*/ if(0 === n){ - /*<>*/ resize(b, uchar_utf_8_byte_length_max); - continue; - } - b[2] = pos + n | 0; - return 0; + /*<>*/ 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){ @@ -12110,12 +12135,8 @@ n = /*<>*/ caml_call3 (Stdlib_Bytes[54], b[1][1], pos, u); - /*<>*/ if(0 === n){ - /*<>*/ resize(b, uchar_utf_16_byte_length_max); - continue; - } - b[2] = pos + n | 0; - return 0; + /*<>*/ 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){ @@ -12127,12 +12148,8 @@ n = /*<>*/ caml_call3 (Stdlib_Bytes[57], b[1][1], pos, u); - /*<>*/ if(0 === n){ - /*<>*/ resize(b, uchar_utf_16_byte_length_max); - continue; - } - b[2] = pos + n | 0; - return 0; + /*<>*/ 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){ @@ -12251,123 +12268,128 @@ } /*<>*/ /*<>*/ var previous$0 = /*<>*/ caml_string_get(s, i$4); - if(36 !== previous$0){ - /*<>*/ if(92 === previous){ - /*<>*/ add_char(b, 92); - /*<>*/ add_char(b, previous$0); - /*<>*/ var - /*<>*/ i$6 = i$4 + 1 | 0, + if(36 === previous$0) + if(92 === previous){ + /*<>*/ add_char(b, previous$0); + /*<>*/ var + /*<>*/ i$5 = i$4 + 1 | 0, previous = 32, - i$4 = i$6; - continue; + i$4 = i$5; } - if(92 === previous$0){ - /*<>*/ var - /*<>*/ i$7 = i$4 + 1 | 0, - previous = previous$0, - i$4 = i$7; - continue; + 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(;;){ + e: + { + if(lim$0 > i$2){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_string_get(s, i$2); + f: + { + if(91 <= match){ + if(97 <= match){ + if(123 > match) break f; + } + else if(95 === match) break f; + } + else + if(58 <= match){ + if(65 <= match) break f; + } + else if(48 <= match) break f; + var stop$0 = i$2; + break e; + } + 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; - continue; - } - if(92 === previous){ - /*<>*/ add_char(b, previous$0); - /*<>*/ var - /*<>*/ i$5 = i$4 + 1 | 0, - previous = 32, - i$4 = i$5; - continue; } - /*<>*/ /*<>*/ 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), - switch$0 = 0; - if(40 !== opening && 123 !== opening){ - /*<>*/ var - /*<>*/ start = start$0 + 1 | 0, - lim$0 = caml_ml_string_length(s), - i$2 = start; - /*<>*/ for(;;){ - if(lim$0 <= i$2) - var stop$0 = lim$0; - else{ - /*<>*/ var - /*<>*/ match = - /*<>*/ caml_string_get(s, i$2), - switch$1 = 0; - if(91 <= match){ - if(97 <= match){ - if(123 > match) switch$1 = 1; - } - else if(95 === match) switch$1 = 1; - } - else - if(58 <= match){ - if(65 <= match) switch$1 = 1; - } - else if(48 <= match) switch$1 = 1; - if(switch$1){var i$3 = i$2 + 1 | 0, i$2 = i$3; continue;} - var stop$0 = i$2; - } - var - match$0 = - [0, - /*<>*/ caml_call3 - (Stdlib_String[15], s, start$0, stop$0 - start$0 | 0), - stop$0]; - switch$0 = 1; - break; - } - } - if(! switch$0){ - /*<>*/ 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; - continue; - } - if( /*<>*/ caml_string_get(s, stop) !== closing){var i$1 = stop + 1 | 0, stop = i$1; continue;} - if(0 !== k){ - var i$0 = stop + 1 | 0, k$1 = k - 1 | 0, k = k$1, stop = i$0; - continue; - } - var - match$0 = - [0, - /*<>*/ caml_call3 - (Stdlib_String[15], s, new_start, (stop - start$0 | 0) - 1 | 0), - stop + 1 | 0]; - break; - } - } - var next_i = match$0[2], ident = match$0[1]; - /*<>*/ add_string - (b, /*<>*/ caml_call1(f, ident)); - var previous = 32, i$4 = next_i; } /*<>*/ } function truncate(b, len){ @@ -12653,13 +12675,12 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); /*<>*/ for(;;){ - if(0 === s[2]){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Condition[2], s[3], s[1]); - continue; + if(0 !== s[2]){ + s[2] = s[2] - 1 | 0; + return caml_call1(Stdlib_Mutex[4], s[1]); } - 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){ @@ -12697,13 +12718,9 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); /*<>*/ for(;;){ - if(0 === s[2]){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Condition[2], s[3], s[1]); - continue; - } - s[2] = 0; - return caml_call1(Stdlib_Mutex[4], s[1]); + 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){ @@ -12797,12 +12814,12 @@ /*<>*/ /*<>*/ var l = /*<>*/ caml_call1(Stdlib_Atomic[2], parent_keys); if - (1 + (! + (1 - /*<>*/ caml_call3 - (Stdlib_Atomic[5], parent_keys, l, [0, ki, l])) - continue; - break; + (Stdlib_Atomic[5], parent_keys, l, [0, ki, l]))) + break; } } /*<>*/ return k; @@ -12937,38 +12954,42 @@ /*<>*/ caml_call1(Stdlib_Condition[1], 0), /*<>*/ term_state = [0, 0]; function body(param){ - /*<>*/ var switch$0 = 0; - /*<>*/ 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]; - switch$0 = 1; - } - if(! switch$0) var result = [0, res]; - /*<>*/ try{ - /*<>*/ do_at_exit(0); - var result$0 = result; + /*<>*/ b: + { + /*<>*/ 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 b; + } + var result = [0, res]; } - catch(ex){ - /*<>*/ var - ex$0 = caml_wrap_exception(ex), - /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, - result$0 = _d_; + a: + { + /*<>*/ try{ /*<>*/ do_at_exit(0);} + catch(ex){ + /*<>*/ var + ex$0 = caml_wrap_exception(ex), + /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, + result$0 = _d_; + break a; + } + var result$0 = result; } /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], term_mutex); @@ -12997,18 +13018,17 @@ (Stdlib_Mutex[2], term_mutex); /*<>*/ for(;;){ var match = term_state[1]; - if(! match){ - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Condition[2], term_condition, term_mutex); - continue; + 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); } - 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 @@ -13776,8 +13796,8 @@ (buf, /*<>*/ caml_string_get(str, i)); /*<>*/ /*<>*/ var _dN_ = i + 1 | 0; - if(_dM_ !== i){var i = _dN_; continue;} - break; + if(_dM_ === i) break; + var i = _dN_; } } return 0; @@ -13792,81 +13812,80 @@ var fmtty$1 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_c); var fmtty$0 = fmtty$1; - continue; + break; case 1: var fmtty$2 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_s); var fmtty$0 = fmtty$2; - continue; + break; case 2: var fmtty$3 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_i); var fmtty$0 = fmtty$3; - continue; + break; case 3: var fmtty$4 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_li); var fmtty$0 = fmtty$4; - continue; + break; case 4: var fmtty$5 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_ni); var fmtty$0 = fmtty$5; - continue; + break; case 5: var fmtty$6 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_Li); var fmtty$0 = fmtty$6; - continue; + break; case 6: var fmtty$7 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_f); var fmtty$0 = fmtty$7; - continue; + break; case 7: var fmtty$8 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_B); var fmtty$0 = fmtty$8; - continue; + 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; - continue; + 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; - continue; + break; case 10: var fmtty$11 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_a); var fmtty$0 = fmtty$11; - continue; + break; case 11: var fmtty$12 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_t); var fmtty$0 = fmtty$12; - continue; + break; case 12: var fmtty$13 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst$13); var fmtty$0 = fmtty$13; - continue; + break; case 13: var fmtty$14 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_r); var fmtty$0 = fmtty$14; - continue; + break; default: var fmtty$15 = fmtty$0[1]; /*<>*/ buffer_add_string(buf, cst_r$0); var fmtty$0 = fmtty$15; - continue; } } /*<>*/ } @@ -13883,7 +13902,6 @@ /*<>*/ var fmt$0 = fmt, ign_flag$0 = ign_flag; - a: /*<>*/ for(;;){ if(typeof fmt$0 === "number") /*<>*/ return 0; @@ -13895,7 +13913,7 @@ (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 99); var fmt$0 = rest, ign_flag$0 = 0; - continue; + break; case 1: var rest$0 = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -13903,7 +13921,7 @@ (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 67); var fmt$0 = rest$0, ign_flag$0 = 0; - continue; + break; case 2: var rest$1 = fmt$0[2], pad = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -13912,7 +13930,7 @@ /*<>*/ bprint_padding(buf, pad); /*<>*/ buffer_add_char(buf, 115); var fmt$0 = rest$1, ign_flag$0 = 0; - continue; + break; case 3: var rest$2 = fmt$0[2], pad$0 = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -13921,7 +13939,7 @@ /*<>*/ bprint_padding(buf, pad$0); /*<>*/ buffer_add_char(buf, 83); var fmt$0 = rest$2, ign_flag$0 = 0; - continue; + break; case 4: var rest$3 = fmt$0[4], @@ -13937,7 +13955,7 @@ /*<>*/ buffer_add_char (buf, char_of_iconv(iconv)); var fmt$0 = rest$3, ign_flag$0 = 0; - continue; + break; case 5: var rest$4 = fmt$0[4], @@ -13947,7 +13965,7 @@ /*<>*/ bprint_altint_fmt (buf, ign_flag$0, iconv$0, pad$2, prec$0, 108); var fmt$0 = rest$4, ign_flag$0 = 0; - continue; + break; case 6: var rest$5 = fmt$0[4], @@ -13957,7 +13975,7 @@ /*<>*/ bprint_altint_fmt (buf, ign_flag$0, iconv$1, pad$3, prec$1, 110); var fmt$0 = rest$5, ign_flag$0 = 0; - continue; + break; case 7: var rest$6 = fmt$0[4], @@ -13967,7 +13985,7 @@ /*<>*/ bprint_altint_fmt (buf, ign_flag$0, iconv$2, pad$4, prec$2, 76); var fmt$0 = rest$6, ign_flag$0 = 0; - continue; + break; case 8: var rest$7 = fmt$0[4], @@ -13983,7 +14001,7 @@ /*<>*/ buffer_add_char (buf, char_of_fconv(0, fconv)); var fmt$0 = rest$7, ign_flag$0 = 0; - continue; + break; case 9: var rest$8 = fmt$0[2], pad$6 = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -13992,22 +14010,22 @@ /*<>*/ bprint_padding(buf, pad$6); /*<>*/ buffer_add_char(buf, 66); var fmt$0 = rest$8, ign_flag$0 = 0; - continue; + break; case 10: var rest$9 = fmt$0[1]; /*<>*/ buffer_add_string(buf, cst$14); var fmt$0 = rest$9; - continue; + break; case 11: var rest$10 = fmt$0[2], str = fmt$0[1]; /*<>*/ bprint_string_literal(buf, str); var fmt$0 = rest$10; - continue; + break; case 12: var rest$11 = fmt$0[2], chr = fmt$0[1]; /*<>*/ bprint_char_literal(buf, chr); var fmt$0 = rest$11; - continue; + break; case 13: var rest$12 = fmt$0[3], fmtty = fmt$0[2], pad_opt = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -14019,7 +14037,7 @@ /*<>*/ buffer_add_char(buf, 37); /*<>*/ buffer_add_char(buf, 125); var fmt$0 = rest$12, ign_flag$0 = 0; - continue; + 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); @@ -14031,7 +14049,7 @@ /*<>*/ buffer_add_char(buf, 37); /*<>*/ buffer_add_char(buf, 41); var fmt$0 = rest$13, ign_flag$0 = 0; - continue; + break; case 15: var rest$14 = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -14039,7 +14057,7 @@ (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 97); var fmt$0 = rest$14, ign_flag$0 = 0; - continue; + break; case 16: var rest$15 = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -14047,13 +14065,13 @@ (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 116); var fmt$0 = rest$15, ign_flag$0 = 0; - continue; + 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; - continue; + break; case 18: var rest$17 = fmt$0[2], fmting_gen = fmt$0[1]; /*<>*/ if(0 === fmting_gen[0]){ @@ -14067,7 +14085,7 @@ /*<>*/ buffer_add_string(buf, str$1); } var fmt$0 = rest$17; - continue; + break; case 19: var rest$18 = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -14075,7 +14093,7 @@ (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 114); var fmt$0 = rest$18, ign_flag$0 = 0; - continue; + break; case 20: var rest$19 = fmt$0[3], char_set = fmt$0[2], width_opt = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -14131,8 +14149,9 @@ /*<>*/ if(is_alone(93)) /*<>*/ buffer_add_char(buf, 93); var i = 1; - b: + e: /*<>*/ for(;;){ + f: if(i < 256){ /*<>*/ if (! @@ -14144,122 +14163,111 @@ i = i$0; continue; } - /*<>*/ var - /*<>*/ switcher = + /*<>*/ /*<>*/ var + switcher = /*<>*/ caml_call1(Stdlib[29], i) - 45 - | 0, - switch$0 = 0; - if(48 < switcher >>> 0) - if(210 <= switcher) + | 0; + if(48 < switcher >>> 0){ + if(210 <= switcher){ /*<>*/ print_char(buf, 255); - else - switch$0 = 1; - else{ - if(46 < switcher - 1 >>> 0){ - /*<>*/ var - /*<>*/ i$2 = i + 1 | 0, - i = i$2; - continue; + break f; } - switch$0 = 1; } - if(switch$0){ - /*<>*/ /*<>*/ var - i$1 = i + 1 | 0; - /*<>*/ if - (! + 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 f; + } + } + else if + (46 < switcher$0 - 1 >>> 0 + && + ! 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, - switch$1 = 0; - if(48 < switcher$0 >>> 0){ - if(210 <= switcher$0){ - /*<>*/ print_char(buf, 254); - /*<>*/ print_char(buf, 255); - switch$1 = 1; - } - } - else if - (46 < switcher$0 - 1 >>> 0 + /*<>*/ 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], i$1 + 1 | 0))){ - /*<>*/ print_char(buf, i$1 - 1 | 0); - /*<>*/ var - /*<>*/ i$5 = i$1 + 1 | 0, - i = i$5; + /*<>*/ caml_call1 + (Stdlib[29], j$0))){ + /*<>*/ var + /*<>*/ j$1 = j$0 + 1 | 0, + j$0 = j$1; continue; } - if(! switch$1){ - /*<>*/ 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){ - /*<>*/ var - /*<>*/ i$7 = j$0 + 1 | 0, - i = i$7; - continue b; - } - break; - } - } + /*<>*/ 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 e; } } /*<>*/ if(is_alone(45)) /*<>*/ buffer_add_char(buf, 45); /*<>*/ buffer_add_char(buf, 93); var fmt$0 = rest$19, ign_flag$0 = 0; - continue a; + break; } + break; case 21: var rest$20 = fmt$0[2], counter = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -14274,7 +14282,7 @@ } /*<>*/ buffer_add_char(buf, _dD_); var fmt$0 = rest$20, ign_flag$0 = 0; - continue; + break; case 22: var rest$21 = fmt$0[1]; /*<>*/ buffer_add_char(buf, 37); @@ -14283,7 +14291,7 @@ /*<>*/ bprint_string_literal (buf, cst_0c); var fmt$0 = rest$21, ign_flag$0 = 0; - continue; + break; case 23: var rest$22 = fmt$0[2], @@ -14291,7 +14299,7 @@ fmt$1 = param_format_of_ignored_format(ign, rest$22)[1], fmt$0 = fmt$1, ign_flag$0 = 1; - continue; + break; default: /*<>*/ var rest$23 = fmt$0[3], @@ -14308,12 +14316,11 @@ /*<>*/ buffer_add_char(buf, 63); /*<>*/ /*<>*/ var _dG_ = i$8 + 1 | 0; - if(_dF_ !== i$8){var i$8 = _dG_; continue;} - break; + if(_dF_ === i$8) break; + var i$8 = _dG_; } } var fmt$0 = rest$23, ign_flag$0 = 0; - continue; } } /*<>*/ } @@ -14755,431 +14762,395 @@ _df_]; /*<>*/ } function trans(ty1, ty2){ - /*<>*/ var switch$0 = 0; - if(typeof ty1 === "number"){ - if(typeof ty2 === "number") - /*<>*/ return 0; - switch(ty2[0]){ - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - case 8: - switch$0 = 5; break; - case 9: - switch$0 = 6; break; - default: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); - } - } - else - switch(ty1[0]){ - case 0: - var rest1 = ty1[1], switch$1 = 0; - if(typeof ty2 === "number") - switch$1 = 1; - else - switch(ty2[0]){ - case 0: - var rest2 = ty2[1]; - /*<>*/ return [0, - trans(rest1, rest2)]; - case 8: - switch$0 = 5; break; - case 9: - switch$0 = 6; break; - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$1 = 1; - } - if(switch$1) switch$0 = 7; - break; - case 1: - var rest1$0 = ty1[1], switch$2 = 0; - if(typeof ty2 === "number") - switch$2 = 1; - else - switch(ty2[0]){ - case 1: - var rest2$0 = ty2[1]; - /*<>*/ return [1, - trans(rest1$0, rest2$0)]; - case 8: - switch$0 = 5; break; - case 9: - switch$0 = 6; break; - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$2 = 1; - } - if(switch$2) switch$0 = 7; - break; - case 2: - var rest1$1 = ty1[1], switch$3 = 0; - if(typeof ty2 === "number") - switch$3 = 1; - else - switch(ty2[0]){ - case 2: - var rest2$1 = ty2[1]; - /*<>*/ return [2, - trans(rest1$1, rest2$1)]; - case 8: - switch$0 = 5; break; - case 9: - switch$0 = 6; break; - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$3 = 1; - } - if(switch$3) switch$0 = 7; - break; - case 3: - var rest1$2 = ty1[1], switch$4 = 0; - if(typeof ty2 === "number") - switch$4 = 1; - else - switch(ty2[0]){ - case 3: - var rest2$2 = ty2[1]; - /*<>*/ return [3, - trans(rest1$2, rest2$2)]; - case 8: - switch$0 = 5; break; - case 9: - switch$0 = 6; break; - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$4 = 1; - } - if(switch$4) switch$0 = 7; - break; - case 4: - var rest1$3 = ty1[1], switch$5 = 0; - if(typeof ty2 === "number") - switch$5 = 1; - else - switch(ty2[0]){ - case 4: - var rest2$3 = ty2[1]; - /*<>*/ return [4, - trans(rest1$3, rest2$3)]; - case 8: - switch$0 = 5; break; - case 9: - switch$0 = 6; break; - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$5 = 1; - } - if(switch$5) switch$0 = 7; - break; - case 5: - var rest1$4 = ty1[1], switch$6 = 0; - if(typeof ty2 === "number") - switch$6 = 1; - else - switch(ty2[0]){ - case 5: - var rest2$4 = ty2[1]; - /*<>*/ return [5, - trans(rest1$4, rest2$4)]; - case 8: - switch$0 = 5; break; - case 9: - switch$0 = 6; break; - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$6 = 1; - } - if(switch$6) switch$0 = 7; - break; - case 6: - var rest1$5 = ty1[1], switch$7 = 0; - if(typeof ty2 === "number") - switch$7 = 1; - else - switch(ty2[0]){ - case 6: - var rest2$5 = ty2[1]; - /*<>*/ return [6, - trans(rest1$5, rest2$5)]; - case 8: - switch$0 = 5; break; - case 9: - switch$0 = 6; break; - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$7 = 1; - } - if(switch$7) switch$0 = 7; - break; - case 7: - var rest1$6 = ty1[1], switch$8 = 0; - if(typeof ty2 === "number") - switch$8 = 1; - else - switch(ty2[0]){ - case 7: - var rest2$6 = ty2[1]; - /*<>*/ return [7, - trans(rest1$6, rest2$6)]; - case 8: - switch$0 = 5; break; - case 9: - switch$0 = 6; break; - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$8 = 1; - } - if(switch$8) switch$0 = 7; - break; - case 8: - var rest1$7 = ty1[2], ty1$0 = ty1[1], switch$9 = 0; - if(typeof ty2 === "number") - switch$9 = 1; - else - 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; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$9 = 1; - } - if(switch$9) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _k_], 1); - break; - case 9: - var rest1$8 = ty1[3], ty12 = ty1[2], ty11 = ty1[1], switch$10 = 0; - if(typeof ty2 === "number") - switch$10 = 1; - else - switch(ty2[0]){ - case 8: - switch$0 = 5; break; - 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; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - switch$0 = 4; break; - default: switch$10 = 1; + /*<>*/ b: + { + a: + { + c: + { + d: + { + e: + { + f: + { + g: + { + if(typeof ty1 === "number"){ + if(typeof ty2 === "number") + /*<>*/ return 0; + switch(ty2[0]){ + case 10: + break b; + case 11: + break a; + case 12: + break c; + case 13: + break d; + case 14: + break e; + case 8: + break f; + case 9: + break g; + default: + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + } + } + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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 b; + case 11: + break a; + 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); + } + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _d_], 1); } - if(switch$10) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _l_], 1); - break; - 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, _c_], 1); } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _m_], 1); - case 11: - var rest1$10 = ty1[1], switch$11 = 0; - if(typeof ty2 === "number") - switch$11 = 1; - else - switch(ty2[0]){ - case 10: break; - case 11: - var rest2$10 = ty2[1]; - /*<>*/ return [11, - trans(rest1$10, rest2$10)]; - default: switch$11 = 1; - } - if(switch$11) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _n_], 1); - break; - case 12: - var rest1$11 = ty1[1], switch$12 = 0; - if(typeof ty2 === "number") - switch$12 = 1; - else - switch(ty2[0]){ - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - var rest2$11 = ty2[1]; - /*<>*/ return [12, - trans(rest1$11, rest2$11)]; - default: switch$12 = 1; - } - if(switch$12) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _o_], 1); - break; - case 13: - var rest1$12 = ty1[1], switch$13 = 0; - if(typeof ty2 === "number") - switch$13 = 1; - else - switch(ty2[0]){ - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - var rest2$12 = ty2[1]; - /*<>*/ return [13, - trans(rest1$12, rest2$12)]; - default: switch$13 = 1; - } - if(switch$13) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _p_], 1); - break; - default: - var rest1$13 = ty1[1], switch$14 = 0; - if(typeof ty2 === "number") - switch$14 = 1; - else - switch(ty2[0]){ - case 10: break; - case 11: - switch$0 = 1; break; - case 12: - switch$0 = 2; break; - case 13: - switch$0 = 3; break; - case 14: - var rest2$13 = ty2[1]; - /*<>*/ return [14, - trans(rest1$13, rest2$13)]; - default: switch$14 = 1; - } - if(switch$14) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _q_], 1); - } - switch(switch$0){ - case 0: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _e_], 1); - case 1: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _f_], 1); - case 2: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _g_], 1); - case 3: + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _i_], 1); + } /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _h_], 1); - case 4: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _i_], 1); - case 5: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); - case 6: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); - default: - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _j_], 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" @@ -15272,11 +15243,11 @@ /*<>*/ 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; continue; + var fmtty$1 = fmtty$0[1], fmtty$0 = fmtty$1; break; case 11: - var fmtty$2 = fmtty$0[2], fmtty$0 = fmtty$2; continue; + var fmtty$2 = fmtty$0[2], fmtty$0 = fmtty$2; break; case 12: - var fmtty$3 = fmtty$0[2], fmtty$0 = fmtty$3; continue; + 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, @@ -15297,7 +15268,7 @@ /*<>*/ return [11, fmtty_of_fmt(rest$12)]; case 17: - var fmtty$4 = fmtty$0[2], fmtty$0 = fmtty$4; continue; + var fmtty$4 = fmtty$0[2], fmtty$0 = fmtty$4; break; case 18: /*<>*/ var rest$13 = fmtty$0[2], @@ -15330,43 +15301,46 @@ if(typeof ign === "number") switch(ign){ case 0: - var fmtty$0 = fmtty$5; continue; + var fmtty$0 = fmtty$5; break; case 1: - var fmtty$0 = fmtty$5; continue; + var fmtty$0 = fmtty$5; break; case 2: /*<>*/ return [14, fmtty_of_fmt(fmtty$5)]; - default: var fmtty$0 = fmtty$5; continue; + default: var fmtty$0 = fmtty$5; } - switch(ign[0]){ - case 0: - var fmtty$0 = fmtty$5; continue; - case 1: - var fmtty$0 = fmtty$5; continue; - case 2: - var fmtty$0 = fmtty$5; continue; - case 3: - var fmtty$0 = fmtty$5; continue; - case 4: - var fmtty$0 = fmtty$5; continue; - case 5: - var fmtty$0 = fmtty$5; continue; - case 6: - var fmtty$0 = fmtty$5; continue; - case 7: - var fmtty$0 = fmtty$5; continue; - case 8: - var fmtty$0 = fmtty$5; continue; - 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; continue; - default: var fmtty$0 = fmtty$5; continue; - } + 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 @@ -16224,9 +16198,8 @@ (Stdlib_String[48], str, 0, res, width$0 - len | 0, len); break; default: - var switch$0 = 0; + e: if(0 < len){ - var switch$1 = 0; /*<>*/ if (43 !== /*<>*/ caml_string_get(str, 0) @@ -16235,57 +16208,49 @@ !== /*<>*/ caml_string_get(str, 0) && 32 - !== /*<>*/ caml_string_get(str, 0)){switch$0 = 1; switch$1 = 1;} - if(! switch$1){ - /*<>*/ /*<>*/ 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); - } + !== /*<>*/ caml_string_get(str, 0)) + break e; + /*<>*/ /*<>*/ 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; } - else - switch$0 = 1; - if(switch$0){ - var switch$2 = 0; - /*<>*/ if - (1 < len + f: + if + (1 < len + && + 48 + === /*<>*/ caml_string_get(str, 0)){ + /*<>*/ if + (120 + !== /*<>*/ caml_string_get(str, 1) && - 48 - === /*<>*/ caml_string_get(str, 0)){ - var switch$3 = 0; - /*<>*/ if - (120 - === /*<>*/ caml_string_get(str, 1) - || - 88 - === /*<>*/ caml_string_get(str, 1)) - switch$3 = 1; - if(switch$3){ - /*<>*/ /*<>*/ 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); - switch$2 = 1; - } - } - if(! switch$2) - /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], str, 0, res, width$0 - len | 0, len); + 88 + !== /*<>*/ caml_string_get(str, 1)) + break f; + /*<>*/ /*<>*/ 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); @@ -16297,88 +16262,84 @@ /*<>*/ len = /*<>*/ caml_ml_string_length(str), /*<>*/ c = - /*<>*/ caml_string_get(str, 0), - switch$0 = 0; - if(58 <= c){ - if(71 <= c){ - if(5 >= c - 97 >>> 0) switch$0 = 1; - } - else if(65 <= c) switch$0 = 1; - } - else{ - var switch$1 = 0; - if(32 === c) - switch$1 = 1; - else if(43 <= c) - switch(c - 43 | 0){ - case 5: - if(len < (prec$0 + 2 | 0) && 1 < len){ - var switch$2 = 0; - /*<>*/ if - (120 - !== /*<>*/ caml_string_get(str, 1) - && - 88 - !== - /*<>*/ caml_string_get(str, 1)) - switch$2 = 1; - if(! switch$2){ - /*<>*/ /*<>*/ 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); - } - } - switch$0 = 1; - break; - case 0: - case 2: - switch$1 = 1; break; - case 1: - case 3: - case 4: break; - default: switch$0 = 1; + /*<>*/ caml_string_get(str, 0); + b: + { + a: + { + if(58 > c){ + if(32 !== c){ + if(43 > c) break b; + switch(c - 43 | 0){ + case 5: + e: + if(len < (prec$0 + 2 | 0) && 1 < len){ + /*<>*/ if + (120 + !== + /*<>*/ caml_string_get(str, 1) + && + 88 + !== + /*<>*/ caml_string_get(str, 1)) + break e; + /*<>*/ /*<>*/ 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 a; + case 0: + case 2: break; + case 1: + case 3: + case 4: + break b; + default: break a; + } + } + if(len >= (prec$0 + 1 | 0)) break b; + /*<>*/ /*<>*/ 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(switch$1 && len < (prec$0 + 1 | 0)){ - /*<>*/ /*<>*/ 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(switch$0 && 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); + if(71 <= c){if(5 < c - 97 >>> 0) break b;} else if(65 > c) break b; + } + 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; /*<>*/ } @@ -16426,8 +16387,8 @@ 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;} - break; + if(_c1_ === i$0) break; + var i$0 = _c5_; } } /*<>*/ var @@ -16463,8 +16424,8 @@ } /*<>*/ /*<>*/ var _c4_ = i + 1 | 0; - if(_c3_ !== i){var i = _c4_; continue;} - break; + if(_c3_ === i) break; + var i = _c4_; } } /*<>*/ return /*<>*/ caml_call1 @@ -16639,17 +16600,17 @@ if(i === len) var _cT_ = 0; else{ - /*<>*/ var - /*<>*/ _cS_ = + /*<>*/ /*<>*/ var + _cS_ = /*<>*/ caml_string_get(str, i) - 46 - | 0, - switch$0 = 0; - if(23 < _cS_ >>> 0){ - if(55 === _cS_) switch$0 = 1; - } - else if(21 < _cS_ - 1 >>> 0) switch$0 = 1; - if(! switch$0){ + | 0; + c: + { + if(23 < _cS_ >>> 0){ + if(55 === _cS_) break c; + } + else if(21 < _cS_ - 1 >>> 0) break c; /*<>*/ var /*<>*/ i$0 = i + 1 | 0, i = i$0; @@ -17025,7 +16986,7 @@ /*<>*/ acc$1 = [7, acc$0], acc$0 = acc$1, fmt$0 = rest$9; - continue; + break; case 11: /*<>*/ var rest$10 = fmt$0[2], @@ -17033,7 +16994,7 @@ /*<>*/ acc$2 = [2, acc$0, str], acc$0 = acc$2, fmt$0 = rest$10; - continue; + break; case 12: /*<>*/ var rest$11 = fmt$0[2], @@ -17041,7 +17002,7 @@ /*<>*/ acc$3 = [3, acc$0, chr], acc$0 = acc$3, fmt$0 = rest$11; - continue; + break; case 13: /*<>*/ var rest$12 = fmt$0[3], @@ -17086,10 +17047,10 @@ /*<>*/ acc$4 = [0, acc$0, fmting_lit], acc$0 = acc$4, fmt$0 = rest$16; - continue; + break; case 18: var _cP_ = fmt$0[1]; - if(0 === _cP_[0]){ + if(0 === _cP_[0]) var rest$17 = fmt$0[2], fmt$1 = _cP_[1][1], @@ -17105,24 +17066,23 @@ k$0 = k$1, acc$0 = 0, fmt$0 = fmt$1; - continue; - } - 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; - continue; + 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); @@ -17614,11 +17574,11 @@ /*<>*/ return function(_b6_){ /*<>*/ return _bO_;}; case 10: - var rest$15 = fmt$0[1], fmt$0 = rest$15; continue; + var rest$15 = fmt$0[1], fmt$0 = rest$15; break; case 11: - var rest$16 = fmt$0[2], fmt$0 = rest$16; continue; + var rest$16 = fmt$0[2], fmt$0 = rest$16; break; case 12: - var rest$17 = fmt$0[2], fmt$0 = rest$17; continue; + var rest$17 = fmt$0[2], fmt$0 = rest$17; break; case 13: /*<>*/ var rest$18 = fmt$0[3], @@ -17654,10 +17614,10 @@ /*<>*/ return function(_b1_){ /*<>*/ return _bS_;}; case 17: - var rest$22 = fmt$0[2], fmt$0 = rest$22; continue; + var rest$22 = fmt$0[2], fmt$0 = rest$22; break; case 18: var _bT_ = fmt$0[1]; - if(0 === _bT_[0]){ + if(0 === _bT_[0]) var rest$23 = fmt$0[2], fmt$1 = _bT_[1][1], @@ -17672,23 +17632,22 @@ k$1 = k$3(k$0, rest$23), k$0 = k$1, fmt$0 = fmt$1; - continue; - } - 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; - continue; + 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); @@ -17780,14 +17739,15 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib[66], o, cst$18); var acc$0 = acc$1; - continue; } - var acc$2 = match[1]; - /*<>*/ output_acc(o, p$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib[66], o, cst$19); - var acc$0 = acc$2; - continue; + 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); @@ -17840,21 +17800,22 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[16], b, cst$20); var acc$0 = acc$1; - continue; } - var acc$2 = match[1]; - /*<>*/ bufput_acc(b, p$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$21); - var acc$0 = acc$2; - continue; + 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; continue; + 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); @@ -17897,14 +17858,15 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[16], b, cst$22); var acc$0 = acc$1; - continue; } - var acc$2 = match[1]; - /*<>*/ strput_acc(b, p$0); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[16], b, cst$23); - var acc$0 = acc$2; - continue; + 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); @@ -17913,7 +17875,7 @@ /*<>*/ return /*<>*/ caml_call2 (Stdlib_Buffer[16], b, _bv_); case 7: - var acc$3 = acc$0[1], acc$0 = acc$3; continue; + 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); @@ -17998,60 +17960,64 @@ /*<>*/ nstart = parse_spaces(wend), nend = nstart; /*<>*/ for(;;){ + d: if(nend !== len){ - /*<>*/ var - /*<>*/ match = - /*<>*/ caml_string_get(str, nend), - switch$0 = 0; - if(48 <= match){ - if(58 > match) switch$0 = 1; - } - else if(45 === match) switch$0 = 1; - if(switch$0){ - /*<>*/ var - /*<>*/ j$0 = nend + 1 | 0, - nend = j$0; - continue; + /*<>*/ /*<>*/ var + match = + /*<>*/ caml_string_get(str, nend); + e: + { + if(48 <= match){ + if(58 > match) break e; + } + else if(45 === match) break e; + break d; } + /*<>*/ var + /*<>*/ j$0 = nend + 1 | 0, + nend = j$0; + continue; } + e: if(nstart === nend) var indent = 0; - else + else{ /*<>*/ try{ - /*<>*/ var - /*<>*/ _bs_ = + /*<>*/ /*<>*/ var + _bs_ = /*<>*/ runtime.caml_int_of_string ( /*<>*/ caml_call3 - (Stdlib_String[15], str, nstart, nend - nstart | 0)), - indent = _bs_; + (Stdlib_String[15], str, nstart, nend - nstart | 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); + break e; } + var indent = _bs_; + } /*<>*/ /*<>*/ var exp_end = parse_spaces(nend); if(exp_end !== len) /*<>*/ invalid_box(0); - var switch$1 = 0; - if - (caml_string_notequal(box_name, cst$43) - && caml_string_notequal(box_name, "b")) - var - box_type = - caml_string_notequal(box_name, "h") - ? caml_string_notequal - (box_name, "hov") - ? caml_string_notequal - (box_name, "hv") - ? caml_string_notequal(box_name, "v") ? invalid_box(0) : 1 - : 2 - : 3 - : 0; - else - switch$1 = 1; - if(switch$1) var box_type = 4; + g: + { + 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 g;} + if(! caml_string_notequal(box_name, "hov")){var box_type = 3; break g;} + if(! caml_string_notequal(box_name, "hv")){var box_type = 2; break g;} + if(caml_string_notequal(box_name, "v")){ + var box_type = invalid_box(0); + break g; + } + var box_type = 1; + break g; + } + var box_type = 4; + } /*<>*/ return [0, indent, box_type]; } } @@ -18147,276 +18113,286 @@ /*<>*/ return add_literal (lit_start, str_ind, fmt_rest); } - if(64 !== match){ - var str_ind$1 = str_ind + 1 | 0, str_ind = str_ind$1; - continue; - } - var str_ind$0 = str_ind + 1 | 0; - if(str_ind$0 === end_ind) - var match$0 = _N_; - else{ - /*<>*/ var - /*<>*/ c = - /*<>*/ caml_string_get - (str, str_ind$0), - switch$0 = 0; - if(65 <= c) - if(94 <= c){ - /*<>*/ /*<>*/ var - switcher = c - 123 | 0; - if(2 < switcher >>> 0) - switch$0 = 1; - else - switch(switcher){ + 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(1, str_ind$0 + 1 | 0, end_ind); break; - case 1: - switch$0 = 1; break; + var match$0 = parse_tag(0, 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]]; + fmt_rest$3 = parse(str_ind$0 + 1 | 0, end_ind)[1], + match$0 = [0, [17, 0, fmt_rest$3]]; + 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; - case 1: - switch$0 = 1; break; - default: - var - fmt_rest$3 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 0, fmt_rest$3]]; + 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; } - else - switch$0 = 1; - 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]]; - else 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; - case 5: - var switch$1 = 0; - /*<>*/ 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]]; - else - switch$1 = 1; - if(switch$1) - var - fmt_rest$7 = parse(str_ind$0, end_ind)[1], - match$0 = [0, [12, 64, fmt_rest$7]]; - break; - case 12: - var - fmt_rest$8 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, _P_, fmt_rest$8]]; - break; - case 14: - var - fmt_rest$9 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 4, fmt_rest$9]]; - break; - case 27: - var str_ind$3 = str_ind$0 + 1 | 0; - try{ - var - _bg_ = str_ind$3 === end_ind ? 1 : 0, - _bh_ = - _bg_ - || - (60 + 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; + e: + { + f: + { + g: + 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); + h: + { + if(48 <= match$2){ + if(58 > match$2) break h; + } + else if(45 === match$2) break h; + /*<>*/ 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; + break g; + } + } + 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; + break f; + } + /*<>*/ 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; + break e; + } + var formatting_lit$0 = _bi_, next_ind = _bj_; + break e; + } + var formatting_lit$0 = _bk_, next_ind = _bl_; + } + 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; + e: + { + /*<>*/ try{ + /*<>*/ var + /*<>*/ str_ind_1$0 = + parse_spaces(str_ind$4, end_ind), + /*<>*/ match$6 = + /*<>*/ caml_string_get + (str, str_ind_1$0); + g: + { + i: + { + if(48 <= match$6){ + if(58 > match$6) break i; + } + else if(45 === match$6) break i; + var _bo_ = 0; + break g; + } + /*<>*/ 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) - ? 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), - switch$2 = 0; - if(48 <= match$2){ - if(58 > match$2) switch$2 = 1; - } - else if(45 === match$2) switch$2 = 1; - if(! switch$2) - /*<>*/ 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, - switch$3 = 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_; + /*<>*/ 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]]]; + } + } + 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; + break e; + } + var _bn_ = _bo_; + } + 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 - switch$3 = 1; - 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_; - } - else - switch$3 = 1; - if(switch$3) - /*<>*/ 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; - 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), - switch$4 = 0; - if(48 <= match$6){ - if(58 > match$6) switch$4 = 1; - } - else if(45 === match$6) switch$4 = 1; - if(switch$4){ - /*<>*/ 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]]]; - } - else - var _bo_ = 0; - 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; - case 31: - var - fmt_rest$10 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 2, fmt_rest$10]]; - break; - case 32: - var - fmt_rest$11 = parse(str_ind$0 + 1 | 0, end_ind)[1], - match$0 = [0, [17, 5, fmt_rest$11]]; - break; - default: switch$0 = 1; + 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; + } } - else - switch$0 = 1; - if(switch$0) 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 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 @@ -18531,409 +18507,411 @@ /*<>*/ return opt_of_pad (c, get_padprec(0)); /*<>*/ } - var switch$0 = 0; - /*<>*/ if(124 <= symb) - switch$0 = 1; - else - switch(symb){ - case 33: - var - fmt_rest$5 = parse(str_ind, end_ind)[1], - fmt_result = [0, [10, fmt_rest$5]]; - break; - 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; - case 44: - var fmt_result = parse(str_ind, end_ind); break; - 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; - 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; - 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; - 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){var i = _bd_; continue;} - break; + b: + { + /*<>*/ 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 b; + 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 b; + case 44: + var fmt_result = parse(str_ind, end_ind); break b; + 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 b; + 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 b; + 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 b; + 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){ + 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; - continue; - } - 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); - } - /*<>*/ }, - 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), - switch$0 = 0; - if(46 <= c$1){ - if(64 === c$1) - switch$0 = 1; - else if(93 === c$1){ - /*<>*/ add_char(c$0); - /*<>*/ return str_ind$0 + 1 | 0; - } } - else if(37 === c$1) - switch$0 = 1; - else if(45 <= c$1){ - var str_ind$2 = str_ind$0 + 1 | 0; - if(str_ind$2 === end_ind) - /*<>*/ unexpected_end_of_format + /*<>*/ }, + 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$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; + /*<>*/ /*<>*/ var + c$1 = + /*<>*/ caml_string_get + (str, str_ind$0); + c: + { + if(46 <= c$1){ + if(64 !== c$1){ + if(93 !== c$1) break c; + /*<>*/ add_char(c$0); + /*<>*/ return str_ind$0 + 1 + | 0; + } + } + else if(37 !== c$1){ + if(45 > c$1) break c; + 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); + } } - /*<>*/ 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(switch$0 && 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; } - 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; - case 97: - var - fmt_rest$20 = parse(str_ind, end_ind)[1], - fmt_result = [0, [15, fmt_rest$20]]; - break; - 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 + /*<>*/ }, + 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 - _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; - 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; - 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; - case 116: - var - fmt_rest$25 = parse(str_ind, end_ind)[1], - fmt_result = [0, [16, fmt_rest$25]]; - break; - 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; - 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; - case 37: - case 64: - var - fmt_rest$6 = parse(str_ind, end_ind)[1], - fmt_result = [0, [12, symb, fmt_rest$6]]; - break; - case 76: - case 108: - case 110: - var switch$1 = 0; - if(str_ind === end_ind) - switch$1 = 1; - else{ - /*<>*/ var - /*<>*/ symb$0 = - /*<>*/ caml_string_get - (str, str_ind), - /*<>*/ _a8_ = symb$0 - 88 | 0, - switch$2 = 0; - if(32 >= _a8_ >>> 0) - switch(_a8_){ - case 0: - case 12: - case 17: - case 23: - case 29: - case 32: - var _aU_ = 1; switch$2 = 1; break; - } - if(! switch$2) var _aU_ = 0; - /*<>*/ if(_aU_) - switch$0 = 1; + str_ind$0 = str_ind + 1 | 0, + reverse = 1, + str_ind$1 = str_ind$0; else - switch$1 = 1; - } - if(switch$1){ - var fmt_rest$13 = parse(str_ind, end_ind)[1], switch$3 = 0; - if(108 <= symb){ - if(111 > symb) - switch(symb - 108 | 0){ - case 0: - var counter = 0; switch$3 = 1; break; - case 1: break; - default: var counter = 1; switch$3 = 1; - } + 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 b; + case 97: + var + fmt_rest$20 = parse(str_ind, end_ind)[1], + fmt_result = [0, [15, fmt_rest$20]]; + break b; + 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 b; + 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 b; + 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 b; + case 116: + var + fmt_rest$25 = parse(str_ind, end_ind)[1], + fmt_result = [0, [16, fmt_rest$25]]; + break b; + 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 b; + 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 b; + case 37: + case 64: + var + fmt_rest$6 = parse(str_ind, end_ind)[1], + fmt_result = [0, [12, symb, fmt_rest$6]]; + break b; + 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; + e: + { + if(32 >= _a8_ >>> 0) + switch(_a8_){ + case 0: + case 12: + case 17: + case 23: + case 29: + case 32: + var _aU_ = 1; break e; + } + var _aU_ = 0; + } + /*<>*/ if(_aU_) break; } - else if(76 === symb){var counter = 2; switch$3 = 1;} - if(! switch$3) + var fmt_rest$13 = parse(str_ind, end_ind)[1]; + e: + { + if(108 <= symb){ + if(111 > symb) + switch(symb - 108 | 0){ + case 0: + var counter = 0; break e; + case 1: break; + default: var counter = 1; break e; + } + } + else if(76 === symb){var counter = 2; break e;} /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _V_], 1); + } /*<>*/ if(get_ign(0)) /*<>*/ var /*<>*/ ignored$5 = [11, counter], @@ -18941,143 +18919,136 @@ else var _aT_ = [0, [21, counter, fmt_rest$13]]; var fmt_result = _aT_; - } - break; - case 32: - case 35: - case 43: - case 45: - case 95: - var - fmt_result = - /*<>*/ caml_call3 - (failwith_message(_M_), str, pct_ind, symb); - break; - 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; - 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, - switch$4 = 0; - /*<>*/ if(73 <= symb){ - var switcher = symb - 101 | 0; - if(3 < switcher >>> 0) - switch$4 = 1; - else{ - switch(switcher){ - case 0: - var _a9_ = 1; break; - case 1: - var _a9_ = 0; break; - case 2: - var _a9_ = 3; break; - default: var _a9_ = 6; + break b; + case 32: + case 35: + case 43: + case 45: + case 95: + var + fmt_result = + /*<>*/ caml_call3 + (failwith_message(_M_), str, pct_ind, symb); + break b; + 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 b; + 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; + e: + { + f: + 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 e; + } } - var kind = _a9_; - } - } - else if(69 <= symb){ - var switch$5 = 0; - switch(symb - 69 | 0){ - case 0: - var _a__ = 2; break; - case 1: - switch$4 = 1; switch$5 = 1; break; - case 2: - var _a__ = 4; break; - default: var _a__ = 7; - } - if(! switch$5) var kind = _a__; - } - else - switch$4 = 1; - if(switch$4){ - var switch$6 = 0; - if(hash$1){ - if(70 === symb){var kind = 8; switch$6 = 1;} - } - else if(70 === symb){var kind = 5; switch$6 = 1;} - if(! switch$6) + else if(69 <= symb){ + switch(symb - 69 | 0){ + case 0: + var _a__ = 2; break; + case 1: + break f; + case 2: + var _a__ = 4; break; + default: var _a__ = 7; + } + var kind = _a__; + break e; + } + if(hash$1){ + if(70 === symb){var kind = 8; break e;} + } + else if(70 === symb){var kind = 5; break e;} /*<>*/ 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; + } + /*<>*/ 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 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; - default: switch$0 = 1; - } - if(switch$0){ - var switch$7 = 0; + /*<>*/ 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 b; + } + c: if(108 <= symb){ if(111 > symb){ - var switch$8 = 0; switch(symb - 108 | 0){ case 0: /*<>*/ var @@ -19105,9 +19076,9 @@ pad$0 = match$0[1], _aA_ = [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; var _aB_ = _aA_; - switch$8 = 1; break; - case 1: break; + case 1: + break c; default: /*<>*/ var /*<>*/ _aD_ = @@ -19134,9 +19105,9 @@ pad$1 = match$1[1], _aG_ = [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; var _aB_ = _aG_; - switch$8 = 1; } - if(switch$8){var fmt_result = _aB_; switch$7 = 1;} + var fmt_result = _aB_; + break b; } } else if(76 === symb){ @@ -19164,13 +19135,12 @@ pad$2 = match$2[1], _aL_ = [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; var fmt_result = _aL_; - switch$7 = 1; + break b; } - if(! switch$7) - var - fmt_result = - /*<>*/ caml_call3 - (failwith_message(_J_), str, str_ind - 1 | 0, symb); + 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_; @@ -19213,17 +19183,18 @@ (pct_ind, str_ind, 95, cst$30); } var _aw_ = 1 - ign_used[1], ign$0 = _aw_ ? ign : _aw_; + d: if(ign$0){ - var switch$9 = 0; - if(38 <= symb){ - if(44 !== symb && 64 !== symb) switch$9 = 1; + e: + { + if(38 <= symb){ + if(44 !== symb && 64 !== symb) break e; + } + else if(33 !== symb && 37 > symb) break e; + if(legacy_behavior$0) break d; } - else if(33 !== symb && 37 > symb) switch$9 = 1; - var switch$10 = 0; - if(switch$9 || ! legacy_behavior$0) switch$10 = 1; - if(switch$10) - /*<>*/ incompatible_flag - (pct_ind, str_ind, symb, cst$31); + /*<>*/ incompatible_flag + (pct_ind, str_ind, symb, cst$31); } /*<>*/ return fmt_result; } @@ -19634,84 +19605,86 @@ (failwith_message(_U_), str, c, end_ind); if (37 - !== + === /*<>*/ caml_string_get (str, str_ind$0)){ - var str_ind$7 = str_ind$0 + 1 | 0, str_ind$0 = str_ind$7; - continue; - } - 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); + 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; } - } - 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; + 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; } - 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; + } + 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; } - 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); } - 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; } - 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){ @@ -19728,62 +19701,60 @@ hash$0 = hash, space$0 = space; /*<>*/ for(;;){ - var switch$0 = 0; - if(plus$0){ - if(hash$0) - switch$0 = 1; - else if(! space$0){ - if(100 === symb) /*<>*/ return 1; - if(105 === symb) /*<>*/ return 4; + 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) - switch$0 = 1; else{ - var switcher$0 = symb - 88 | 0; - if(32 < switcher$0 >>> 0) - switch$0 = 1; - else - switch(switcher$0){ + 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 9; + /*<>*/ return 8; case 12: - /*<>*/ return 13; + /*<>*/ return 0; case 17: - /*<>*/ return 14; + /*<>*/ return 3; case 23: - /*<>*/ return 11; + /*<>*/ return 10; case 29: - /*<>*/ return 15; + /*<>*/ return 12; case 32: - /*<>*/ return 7; - default: switch$0 = 1; + /*<>*/ return 6; + default: break a; } - } - else if(space$0){ - if(100 === symb) /*<>*/ return 2; - if(105 === symb) /*<>*/ return 5; - } - else{ - var switcher$1 = symb - 88 | 0; - if(32 >= switcher$1 >>> 0) - 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; } - } - if(switch$0){ + 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){ @@ -19809,7 +19780,20 @@ continue; } } - if(! plus$0){ + 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); @@ -19817,19 +19801,7 @@ /*<>*/ return incompatible_flag (pct_ind, str_ind, symb, cst$34); var space$0 = 0; - continue; - } - if(space$0){ - if(! legacy_behavior$0) - /*<>*/ return incompatible_flag - (pct_ind, str_ind, 32, cst$32); - var space$0 = 0; - continue; } - if(! legacy_behavior$0) - /*<>*/ return incompatible_flag - (pct_ind, str_ind, symb, cst$33); - var plus$0 = 0; } /*<>*/ } return parse(0, caml_ml_string_length(str)); @@ -20182,31 +20154,41 @@ ([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_; + /*<>*/ b: + { + /*<>*/ try{ + /*<>*/ assoc3(cst_help$2, speclist); + /*<>*/ /*<>*/ var _aA_ = 0; + } + 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]; + break b; + } + var add1 = _aA_; } - 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]; + a: + { + try{ + /*<>*/ assoc3(cst_help$1, speclist); + /*<>*/ /*<>*/ var _az_ = 0; + } + 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]; + break a; + } + var add2 = _az_; } /*<>*/ /*<>*/ var _ay_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); @@ -20328,267 +20310,277 @@ /*<>*/ try{ /*<>*/ var _Y_ = current[1], - /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_], - switch$0 = 0; - /*<>*/ 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); + /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_]; + c: + { + /*<>*/ if + (1 <= /*<>*/ caml_ml_string_length(s) + && 45 === /*<>*/ caml_string_get(s, 0)){ + e: + { + try{ + /*<>*/ var + follow$1 = 0, + /*<>*/ _aa_ = assoc3(s, speclist[1]); + } + 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]); + } + 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 follow$0 = follow, action = _$_; + break e; + } + var follow$0 = follow$1, action = _aa_; } - } - 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 + no_arg$0 = + function(s, follow){ + function no_arg(param){ + /*<>*/ if(! follow) + /*<>*/ return 0; 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); - } - 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); - } - 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); - switch$0 = 1; - } - if(! switch$0) + /*<>*/ 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); + b: + { + /*<>*/ try{ + /*<>*/ /*<>*/ var + _ac_ = + [0, /*<>*/ caml_call1(Stdlib[32], arg)]; + } + catch(_ah_){ + var _ab_ = caml_wrap_exception(_ah_); + if(_ab_[1] !== Stdlib[6]) + throw caml_maybe_attach_backtrace(_ab_, 0); + var match = 0; + break b; + } + var match = _ac_; + } + 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 c; + } /*<>*/ /*<>*/ caml_call1(anonfun, s); + } } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20829,17 +20821,20 @@ /*<>*/ /*<>*/ var word = /*<>*/ caml_call1(Stdlib_Buffer[2], buf); /*<>*/ if(trim){ - var len = caml_ml_string_length(word), switch$0 = 0; - /*<>*/ if - (0 < len - && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ - var - _I_ = - /*<>*/ caml_call3 - (Stdlib_String[15], word, 0, len - 1 | 0); - switch$0 = 1; + 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; } - if(! switch$0) var _I_ = word; var word$0 = _I_; } else @@ -21103,15 +21098,15 @@ param = /*<>*/ caml_call1(Stdlib_Atomic[2], printers); /*<>*/ for(;;){ if(! param) /*<>*/ return 0; - var tl = param[2], hd = param[1], switch$0 = 0; - /*<>*/ try{ - /*<>*/ /*<>*/ var - val = /*<>*/ caml_call1(hd, x); - } - catch(_ai_){switch$0 = 1;} - if(! switch$0 && val){ - var s = val[1]; - /*<>*/ return [0, s]; + 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; } @@ -21291,8 +21286,8 @@ } /*<>*/ /*<>*/ var _T_ = i + 1 | 0; - if(_S_ !== i){var i = _T_; continue;} - break; + if(_S_ === i) break; + var i = _T_; } } return 0; @@ -21325,8 +21320,8 @@ } /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(_P_ !== i){var i = _Q_; continue;} - break; + if(_P_ === i) break; + var i = _Q_; } } /*<>*/ return /*<>*/ caml_call1 @@ -21388,8 +21383,7 @@ /*<>*/ caml_call3 (Stdlib_Atomic[5], printers, old_printers, new_printers), /*<>*/ _L_ = 1 - success; - if(_L_) continue; - /*<>*/ return _L_; + if(! _L_) /*<>*/ return _L_; } /*<>*/ } function exn_slot(x){ @@ -21437,52 +21431,61 @@ 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_; + b: + { + /*<>*/ try{ + var + raw_backtrace = + debugger_in_use + ? empty_backtrace + : /*<>*/ caml_get_exception_raw_backtra(0); + d: + try{ + /*<>*/ /*<>*/ caml_call1 + (Stdlib[103], 0); + } + catch(_H_){break d;} + e: + { + /*<>*/ try{ + /*<>*/ /*<>*/ var + _D_ = + /*<>*/ caml_call2 + (uncaught_exception_handler[1], exn$0, raw_backtrace); + } + 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]); + break e; + } + var _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); + catch(_G_){ + var _z_ = caml_wrap_exception(_G_); + if(_z_ !== Stdlib[9]) throw caml_maybe_attach_backtrace(_z_, 0); var - _C_ = /*<>*/ caml_call1(Stdlib[63], Stdlib[40]); + _E_ = + /*<>*/ caml_call1 + (Stdlib[53], cst_Fatal_error_out_of_memory_); + break b; } 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_; } @@ -22126,8 +22129,8 @@ /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); /*<>*/ /*<>*/ var _an_ = j + 1 | 0; - if(_am_ !== j){var j = _an_; continue;} - break; + if(_am_ === j) break; + var j = _an_; } } return 0; @@ -22146,8 +22149,8 @@ /*<>*/ floop(arr, idx, f, col - 1 | 0, max); /*<>*/ /*<>*/ var _ak_ = j + 1 | 0; - if(_aj_ !== j){var j = _ak_; continue;} - break; + if(_aj_ === j) break; + var j = _ak_; } } return 0; @@ -22189,8 +22192,8 @@ /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_af_ !== i){var i = _ah_; continue;} - break; + if(_af_ === i) break; + var i = _ah_; } } /*<>*/ return d; @@ -22257,8 +22260,8 @@ (arr, i$0, /*<>*/ caml_call1(f, i$0)); /*<>*/ /*<>*/ var ___ = i$0 + 1 | 0; - if(dim !== i$0){var i$0 = ___; continue;} - break; + if(dim === i$0) break; + var i$0 = ___; } } /*<>*/ return arr; @@ -22273,8 +22276,8 @@ (arr, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; - if(_X_ !== i){var i = _Y_; continue;} - break; + if(_X_ === i) break; + var i = _Y_; } } /*<>*/ return arr; @@ -22292,8 +22295,8 @@ (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ !== i){var i = _V_; continue;} - break; + if(_U_ === i) break; + var i = _V_; } } /*<>*/ return ba; @@ -22339,14 +22342,14 @@ (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;} - break; + if(dim1 === i$0) break; + var i$0 = _Q_; } } /*<>*/ /*<>*/ var _P_ = j$0 + 1 | 0; - if(dim2 !== j$0){var j$0 = _P_; continue;} - break; + if(dim2 === j$0) break; + var j$0 = _P_; } } /*<>*/ return arr; @@ -22367,14 +22370,14 @@ (arr, i, j, /*<>*/ caml_call2(f, i, j)); /*<>*/ /*<>*/ var _M_ = j + 1 | 0; - if(_K_ !== j){var j = _M_; continue;} - break; + if(_K_ === j) break; + var j = _M_; } } /*<>*/ /*<>*/ var _L_ = i + 1 | 0; - if(_I_ !== i){var i = _L_; continue;} - break; + if(_I_ === i) break; + var i = _L_; } } /*<>*/ return arr; @@ -22406,14 +22409,14 @@ (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;} - break; + if(_E_ === j) break; + var j = _G_; } } /*<>*/ /*<>*/ var _F_ = i + 1 | 0; - if(_C_ !== i){var i = _F_; continue;} - break; + if(_C_ === i) break; + var i = _F_; } } /*<>*/ return ba; @@ -22479,20 +22482,20 @@ /*<>*/ caml_call3(f, i$0, j$0, k$0)); /*<>*/ /*<>*/ var _x_ = i$0 + 1 | 0; - if(dim1 !== i$0){var i$0 = _x_; continue;} - break; + if(dim1 === i$0) break; + var i$0 = _x_; } } /*<>*/ /*<>*/ var _w_ = j$0 + 1 | 0; - if(dim2 !== j$0){var j$0 = _w_; continue;} - break; + if(dim2 === j$0) break; + var j$0 = _w_; } } /*<>*/ /*<>*/ var _u_ = k$0 + 1 | 0; - if(dim3 !== k$0){var k$0 = _u_; continue;} - break; + if(dim3 === k$0) break; + var k$0 = _u_; } } /*<>*/ return arr; @@ -22519,20 +22522,20 @@ (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); /*<>*/ /*<>*/ var _r_ = k + 1 | 0; - if(_p_ !== k){var k = _r_; continue;} - break; + if(_p_ === k) break; + var k = _r_; } } /*<>*/ /*<>*/ var _q_ = j + 1 | 0; - if(_m_ !== j){var j = _q_; continue;} - break; + if(_m_ === j) break; + var j = _q_; } } /*<>*/ /*<>*/ var _n_ = i + 1 | 0; - if(_k_ !== i){var i = _n_; continue;} - break; + if(_k_ === i) break; + var i = _n_; } } /*<>*/ return arr; @@ -22583,20 +22586,20 @@ caml_check_bound(col, k)[1 + k]); /*<>*/ /*<>*/ var _i_ = k + 1 | 0; - if(_g_ !== k){var k = _i_; continue;} - break; + if(_g_ === k) break; + var k = _i_; } } /*<>*/ /*<>*/ var _h_ = j + 1 | 0; - if(_d_ !== j){var j = _h_; continue;} - break; + if(_d_ === j) break; + var j = _h_; } } /*<>*/ /*<>*/ var _e_ = i + 1 | 0; - if(_b_ !== i){var i = _e_; continue;} - break; + if(_b_ === i) break; + var i = _e_; } } /*<>*/ return ba; @@ -22818,8 +22821,8 @@ /*<>*/ /*<>*/ caml_call3 (Stdlib_Bytes[86], b, i * 8 | 0, _t_); /*<>*/ /*<>*/ var _u_ = i + 1 | 0; - if(_p_ !== i){var i = _u_; continue;} - break; + if(_p_ === i) break; + var i = _u_; } } /*<>*/ /*<>*/ caml_bytes_set @@ -22863,8 +22866,8 @@ /*<>*/ var /*<>*/ r = bits(s), v = caml_mod(r, n); - if(((1073741823 - n | 0) + 1 | 0) < (r - v | 0)) continue; - /*<>*/ return v; + if(((1073741823 - n | 0) + 1 | 0) >= (r - v | 0)) + /*<>*/ return v; } /*<>*/ } function int$0(s, bound){ @@ -22886,8 +22889,8 @@ ( /*<>*/ caml_lxm_next(s)) & _n_, v = caml_mod(r, bound); - if(((Stdlib[19] - bound | 0) + 1 | 0) < (r - v | 0)) continue; - /*<>*/ return v; + if(((Stdlib[19] - bound | 0) + 1 | 0) >= (r - v | 0)) + /*<>*/ return v; } /*<>*/ } function bits32(s){ @@ -22905,10 +22908,10 @@ /*<>*/ v = /*<>*/ caml_mod(r, bound); /*<>*/ if - ( /*<>*/ caml_greaterthan + (! + /*<>*/ caml_greaterthan (r - v | 0, (Stdlib_Int32[9] - bound | 0) + 1 | 0)) - continue; - /*<>*/ return v; + /*<>*/ return v; } /*<>*/ } var bits64 = caml_lxm_next; @@ -22925,13 +22928,13 @@ /*<>*/ v = /*<>*/ runtime.caml_int64_mod(r, bound); /*<>*/ if - ( /*<>*/ caml_greaterthan + (! + /*<>*/ caml_greaterthan ( /*<>*/ caml_int64_sub(r, v), /*<>*/ runtime.caml_int64_add ( /*<>*/ caml_int64_sub(Stdlib_Int64[9], bound), _f_))) - continue; - /*<>*/ return v; + /*<>*/ return v; } /*<>*/ } var @@ -23182,27 +23185,33 @@ /*<>*/ 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; + b: + { + try{ + /*<>*/ /*<>*/ var + _f_ = /*<>*/ caml_sys_getenv("OCAMLRUNPARAM"); + } + catch(_az_){ + var _a_ = caml_wrap_exception(_az_); + if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); + c: + { + /*<>*/ try{ + /*<>*/ /*<>*/ var + _e_ = /*<>*/ caml_sys_getenv("CAMLRUNPARAM"); + } + catch(_aA_){ + var _b_ = caml_wrap_exception(_aA_); + if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); + var _c_ = cst; + break c; + } + var _c_ = _e_; + } + var params = _c_; + break b; } - var params = _c_; + var params = _f_; } /*<>*/ var /*<>*/ randomized_default = @@ -23322,31 +23331,30 @@ caml_check_bound(odata, i$0)[1 + i$0], cell = cell$1; /*<>*/ for(;;){ - if(cell){ - /*<>*/ 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; - continue; + if(! cell){ + /*<>*/ /*<>*/ var + _at_ = i$0 + 1 | 0; + if(_ao_ === i$0) break a; + var i$0 = _at_; + break; } - /*<>*/ /*<>*/ var - _at_ = i$0 + 1 | 0; - if(_ao_ !== i$0){var i$0 = _at_; continue a;} - 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; } - break; } } if(inplace){ @@ -23361,8 +23369,8 @@ if(match$0) match$0[3] = 0; /*<>*/ /*<>*/ var _as_ = i + 1 | 0; - if(_aq_ !== i){var i = _as_; continue;} - break; + if(_aq_ === i) break; + var i = _as_; } } var _ar_ = 0; @@ -23397,23 +23405,22 @@ var d = h[2], _ai_ = d.length - 1 - 1 | 0, _ah_ = 0; if(_ai_ >= 0){ var i = _ah_; - a: + c: for(;;){ var param = caml_check_bound(d, i)[1 + i]; /*<>*/ for(;;){ - if(param){ - var key = param[1], data = param[2], next = param[3]; - /*<>*/ /*<>*/ caml_call2 - (f, key, data); - var param = next; - continue; + if(! param){ + /*<>*/ /*<>*/ var + _al_ = i + 1 | 0; + if(_ai_ === i) break c; + var i = _al_; + break; } - /*<>*/ /*<>*/ var - _al_ = i + 1 | 0; - if(_ai_ !== i){var i = _al_; continue a;} - break; + var key = param[1], data = param[2], next = param[3]; + /*<>*/ /*<>*/ caml_call2 + (f, key, data); + var param = next; } - break; } } var _aj_ = 1 - old_trav, _ak_ = _aj_ ? flip_ongoing_traversal(h) : _aj_; @@ -23437,21 +23444,31 @@ var _ad_ = d.length - 1 - 1 | 0, _ac_ = 0; if(_ad_ >= 0){ var i = _ac_; - a: + c: for(;;){ /*<>*/ var /*<>*/ slot$0 = caml_check_bound(h[2], i)[1 + i], prec = 0, slot = slot$0; for(;;){ - if(slot){ - /*<>*/ var - key = slot[1], - data = slot[2], - next = slot[3], - /*<>*/ match = - /*<>*/ caml_call2(f, key, data); - if(! match){h[1] = h[1] - 1 | 0; var slot = next; continue;} + 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 c; + 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; @@ -23459,18 +23476,9 @@ /*<>*/ caml_check_bound(h[2], i)[1 + i] = slot; slot[2] = data$0; var prec = slot, slot = next; - continue; } - if(prec) - prec[3] = 0; - else - /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; - /*<>*/ /*<>*/ var - _ag_ = i + 1 | 0; - if(_ad_ !== i){var i = _ag_; continue a;} - break; + else{h[1] = h[1] - 1 | 0; var slot = next;} } - break; } } var _ae_ = 1 - old_trav, _af_ = _ae_ ? flip_ongoing_traversal(h) : _ae_; @@ -23497,7 +23505,7 @@ /*<>*/ ___ = 0; if(_$_ >= 0){ var i = ___; - a: + c: for(;;){ /*<>*/ var accu$2 = accu$1[1], @@ -23505,24 +23513,23 @@ b = b$0, accu = accu$2; /*<>*/ for(;;){ - if(b){ - /*<>*/ var - key = b[1], - data = b[2], - next = b[3], - /*<>*/ accu$0 = - /*<>*/ caml_call3(f, key, data, accu), - b = next, - accu = accu$0; - continue; + if(! b){ + accu$1[1] = accu; + /*<>*/ /*<>*/ var + _ab_ = i + 1 | 0; + if(_$_ === i) break c; + var i = _ab_; + break; } - accu$1[1] = accu; - /*<>*/ /*<>*/ var - _ab_ = i + 1 | 0; - if(_$_ !== i){var i = _ab_; continue a;} - break; + /*<>*/ var + key = b[1], + data = b[2], + next = b[3], + /*<>*/ accu$0 = + /*<>*/ caml_call3(f, key, data, accu), + b = next, + accu = accu$0; } - break; } } if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); @@ -24262,8 +24269,8 @@ for(;;){ /*<>*/ set(ar, i, x); /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(_P_ !== i){var i = _Q_; continue;} - break; + if(_P_ === i) break; + var i = _Q_; } } return 0; @@ -24299,8 +24306,8 @@ /*<>*/ 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;} - break; + if(_N_ === i) break; + var i = _O_; } } t[3] = limit; @@ -24315,7 +24322,7 @@ if(length(b) <= i$0) /*<>*/ return accu; /*<>*/ /*<>*/ var match = get(b, i$0); - if(match){ + if(match) /*<>*/ var v = match[1], /*<>*/ accu$0 = @@ -24323,9 +24330,8 @@ i$1 = i$0 + 1 | 0, i$0 = i$1, accu = accu$0; - continue; - } - var i$2 = i$0 + 1 | 0, i$0 = i$2; + else + var i$2 = i$0 + 1 | 0, i$0 = i$2; } } /*<>*/ return /*<>*/ caml_call3 @@ -24343,9 +24349,9 @@ var v = match[1]; /*<>*/ /*<>*/ caml_call1(f, v); var i$1 = i$0 + 1 | 0, i$0 = i$1; - continue; } - var i$2 = i$0 + 1 | 0, i$0 = i$2; + else + var i$2 = i$0 + 1 | 0, i$0 = i$2; } } /*<>*/ return /*<>*/ caml_call2 @@ -24383,65 +24389,78 @@ /*<>*/ sz = length(bucket$0), i$3 = 0; /*<>*/ for(;;){ - if(sz > i$3){ - /*<>*/ if(check(bucket$0, i$3)){ - /*<>*/ var - /*<>*/ i$5 = i$3 + 1 | 0, - i$3 = i$5; - continue; - } - /*<>*/ /*<>*/ caml_call3 - (setter, bucket$0, i$3, d); - /*<>*/ caml_check_bound(hashes, i$3)[1 + i$3] = h; - /*<>*/ return 0; - } - /*<>*/ /*<>*/ 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(check(bucket, i$0)){ - var i$1 = i$0 + 1 | 0, i$0 = i$1; - continue; + 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, j)){ + /*<>*/ 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]; @@ -24451,94 +24470,81 @@ i$2 = i$0 + 1 | 0, i$0 = i$2, j = j$0; - continue; } - /*<>*/ var - /*<>*/ j$1 = j - 1 | 0, - j = j$1; - 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]; - } - 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_; + else + /*<>*/ var + /*<>*/ j$1 = j - 1 | 0, + j = j$1; } - 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; } + 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_; } - 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;} - break; } - } - 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; - continue; + 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; } - 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); + }; + /*<>*/ /*<>*/ 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; } - 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){ @@ -24561,30 +24567,33 @@ if(sz <= i) /*<>*/ return /*<>*/ caml_call2 (ifnotfound, h, index); - if(h !== caml_check_bound(hashes, i)[1 + i]){ + 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; - continue; - } - /*<>*/ /*<>*/ 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; } /*<>*/ } function merge(t, d){ @@ -24617,30 +24626,30 @@ i = 0; /*<>*/ for(;;){ if(sz <= i) /*<>*/ return 0; - if(h !== caml_check_bound(hashes, i)[1 + i]){ + 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; - continue; - } - /*<>*/ /*<>*/ 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; } /*<>*/ } function find_shadow(t, d, iffound, ifnotfound){ @@ -24655,24 +24664,24 @@ i = 0; /*<>*/ for(;;){ if(sz <= i) return ifnotfound; - if(h !== caml_check_bound(hashes, i)[1 + i]){ + 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; - continue; - } - /*<>*/ /*<>*/ 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; } /*<>*/ } function remove(t, d){ @@ -24708,29 +24717,32 @@ accu = 0; /*<>*/ for(;;){ if(sz <= i) /*<>*/ return accu; - if(h !== caml_check_bound(hashes, i)[1 + i]){var i$3 = i + 1 | 0, i = i$3; continue;} - /*<>*/ /*<>*/ 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; + 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$1 = i + 1 | 0, i = i$1; - continue; } + var i$2 = i + 1 | 0, i = i$2; } - var i$2 = i + 1 | 0, i = i$2; + else + var i$3 = i + 1 | 0, i = i$3; } /*<>*/ } function stats(t){ @@ -25283,14 +25295,13 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[12], _bB_, _bA_); /*<>*/ for(;;){ - if(1 < state[14]){ - /*<>*/ pp_close_box(state, 0); - continue; + if(1 >= state[14]){ + state[13] = pp_infinity; + /*<>*/ advance_left(state); + if(b) /*<>*/ pp_output_newline(state); + /*<>*/ return pp_rinit(state); } - 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){ @@ -26407,240 +26418,226 @@ } /*<>*/ } function output_acc(ppf, acc){ - /*<>*/ var switch$0 = 0; - if(typeof acc === "number") /*<>*/ return 0; - 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], switch$1 = 0; - if(typeof _aa_ === "number" || ! (0 === _aa_[0])) - switch$1 = 1; - else{ - var _ab_ = _aa_[2], switch$2 = 0; - if(typeof _ab_ === "number" || ! (1 === _ab_[0])) - switch$2 = 1; - else - var s$0 = acc[2], size = _ab_[2], p$2 = _aa_[1]; - if(switch$2) switch$1 = 1; - } - if(switch$1){var s = acc[2], p$1 = _aa_; switch$0 = 2;} - break; - case 3: - var _ac_ = acc[1], switch$3 = 0; - if(typeof _ac_ === "number" || ! (0 === _ac_[0])) - switch$3 = 1; - else{ - var _ad_ = _ac_[2], switch$4 = 0; - if(typeof _ad_ === "number" || ! (1 === _ad_[0])) - switch$4 = 1; - else{var c$0 = acc[2], size$0 = _ad_[2], p$4 = _ac_[1]; switch$0 = 1;} - if(switch$4) switch$3 = 1; - } - if(switch$3){var c = acc[2], p$3 = _ac_; switch$0 = 3;} - break; - case 4: - var _ae_ = acc[1], switch$5 = 0; - if(typeof _ae_ === "number" || ! (0 === _ae_[0])) - switch$5 = 1; - else{ - var _af_ = _ae_[2], switch$6 = 0; - if(typeof _af_ === "number" || ! (1 === _af_[0])) - switch$6 = 1; - else - var s$0 = acc[2], size = _af_[2], p$2 = _ae_[1]; - if(switch$6) switch$5 = 1; - } - if(switch$5){var s = acc[2], p$1 = _ae_; switch$0 = 2;} - break; - case 5: - var _ag_ = acc[1], switch$7 = 0; - if(typeof _ag_ === "number" || ! (0 === _ag_[0])) - switch$7 = 1; - else{ - var _ah_ = _ag_[2], switch$8 = 0; - if(typeof _ah_ === "number" || ! (1 === _ah_[0])) - switch$8 = 1; - else{var c$0 = acc[2], size$0 = _ah_[2], p$4 = _ag_[1]; switch$0 = 1;} - if(switch$8) switch$7 = 1; + /*<>*/ b: + { + a: + { + c: + { + if(typeof acc === "number") /*<>*/ return 0; + 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 a; + } + } + var s = acc[2], p$1 = _aa_; + break b; + 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 a; + } + } + var s = acc[2], p$1 = _ae_; + break b; + 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); } - if(switch$7){var c = acc[2], p$3 = _ag_; switch$0 = 3;} - break; - 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); - } - switch(switch$0){ - case 0: - /*<>*/ output_acc(ppf, p$2); - /*<>*/ return pp_print_as_size(ppf, size, s$0); - case 1: /*<>*/ output_acc(ppf, p$4); /*<>*/ return pp_print_as_size (ppf, size$0, /*<>*/ caml_call2 (Stdlib_String[1], 1, c$0)); - case 2: - /*<>*/ output_acc(ppf, p$1); - /*<>*/ return pp_print_string(ppf, s); - default: - /*<>*/ output_acc(ppf, p$3); - /*<>*/ return pp_print_char(ppf, c); + } + /*<>*/ 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){ - /*<>*/ var switch$0 = 0; - if(typeof acc === "number") /*<>*/ return 0; - 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], switch$1 = 0; - if(typeof _T_ === "number" || ! (0 === _T_[0])) - switch$1 = 1; - else{ - var _U_ = _T_[2], switch$2 = 0; - if(typeof _U_ === "number" || ! (1 === _U_[0])) - switch$2 = 1; - else - var s$0 = acc[2], size = _U_[2], p$2 = _T_[1]; - if(switch$2) switch$1 = 1; - } - if(switch$1){var s = acc[2], p$1 = _T_; switch$0 = 2;} - break; - case 3: - var _V_ = acc[1], switch$3 = 0; - if(typeof _V_ === "number" || ! (0 === _V_[0])) - switch$3 = 1; - else{ - var _W_ = _V_[2], switch$4 = 0; - if(typeof _W_ === "number" || ! (1 === _W_[0])) - switch$4 = 1; - else{var c$0 = acc[2], size$0 = _W_[2], p$4 = _V_[1]; switch$0 = 1;} - if(switch$4) switch$3 = 1; - } - if(switch$3){var c = acc[2], p$3 = _V_; switch$0 = 3;} - break; - case 4: - var _X_ = acc[1], switch$5 = 0; - if(typeof _X_ === "number" || ! (0 === _X_[0])) - switch$5 = 1; - else{ - var _Y_ = _X_[2], switch$6 = 0; - if(typeof _Y_ === "number" || ! (1 === _Y_[0])) - switch$6 = 1; - else - var s$0 = acc[2], size = _Y_[2], p$2 = _X_[1]; - if(switch$6) switch$5 = 1; - } - if(switch$5){var s = acc[2], p$1 = _X_; switch$0 = 2;} - break; - case 5: - var _Z_ = acc[1], switch$7 = 0; - if(typeof _Z_ === "number" || ! (0 === _Z_[0])) - switch$7 = 1; - else{ - var ___ = _Z_[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;} - if(switch$8) switch$7 = 1; - } - if(switch$7){var c = acc[2], p$3 = _Z_; switch$0 = 3;} - break; - 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)); - } + /*<>*/ b: + { + a: + { + c: + { + if(typeof acc === "number") /*<>*/ return 0; + 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 a; + } + } + var s = acc[2], p$1 = _T_; + break b; + 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 a; + } + } + var s = acc[2], p$1 = _X_; + break b; + 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); } - 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); - } - switch(switch$0){ - case 0: - /*<>*/ strput_acc(ppf, p$2); - /*<>*/ return pp_print_as_size(ppf, size, s$0); - case 1: /*<>*/ strput_acc(ppf, p$4); /*<>*/ return pp_print_as_size (ppf, size$0, /*<>*/ caml_call2 (Stdlib_String[1], 1, c$0)); - case 2: - /*<>*/ strput_acc(ppf, p$1); - /*<>*/ return pp_print_string(ppf, s); - default: - /*<>*/ strput_acc(ppf, p$3); - /*<>*/ return pp_print_char(ppf, c); + } + /*<>*/ 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 @@ -27341,14 +27338,15 @@ /*<>*/ c = peek_char(ib), /*<>*/ _a7_ = 1 - ib[1]; if(! _a7_) /*<>*/ return _a7_; - /*<>*/ var - /*<>*/ _a8_ = c - 9 | 0, - switch$0 = 0; - if(4 < _a8_ >>> 0){ - if(23 === _a8_) switch$0 = 1; - } - else if(1 < _a8_ - 2 >>> 0) switch$0 = 1; - if(! switch$0) /*<>*/ return 0; + /*<>*/ /*<>*/ 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); } /*<>*/ } @@ -27478,16 +27476,16 @@ /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width; /*<>*/ if - ( /*<>*/ caml_call1(digitp, c)){ + ( /*<>*/ caml_call1(digitp, c)) /*<>*/ var /*<>*/ width$0 = store_char(width, ib, c), width = width$0; - continue; + else{ + if(95 !== c) /*<>*/ return width; + /*<>*/ var + /*<>*/ width$1 = ignore_char(width, ib), + width = width$1; } - if(95 !== c) /*<>*/ return width; - /*<>*/ var - /*<>*/ width$1 = ignore_char(width, ib), - width = width$1; } /*<>*/ } function is_binary_digit(param){ @@ -27503,14 +27501,17 @@ /*<>*/ return scan_digit_plus(cst_octal, is_octal_digit, _aZ_, _a0_); } function is_hexa_digit(param){ - /*<>*/ var - /*<>*/ _aY_ = param - 48 | 0, - switch$0 = 0; - if(22 < _aY_ >>> 0){ - if(5 >= _aY_ - 49 >>> 0) switch$0 = 1; - } - else if(6 < _aY_ - 10 >>> 0) switch$0 = 1; - return switch$0 ? 1 : 0; + /*<>*/ /*<>*/ var + _aY_ = param - 48 | 0; + b: + { + if(22 < _aY_ >>> 0){ + if(5 < _aY_ - 49 >>> 0) break b; + } + else if(6 >= _aY_ - 10 >>> 0) break b; + /*<>*/ return 1; + } + /*<>*/ return 0; /*<>*/ } /*<>*/ function scan_hexadecimal_int(_aW_, _aX_){ /*<>*/ return scan_digit_plus @@ -27555,21 +27556,24 @@ c$0 = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width; - var switch$0 = 0; - if(99 <= c$0){ - if(111 === c$0) - /*<>*/ return scan_octal_int - (store_char(width, ib, c$0), ib); - if(120 === c$0) switch$0 = 1; + b: + { + if(99 <= c$0){ + if(111 === c$0) + /*<>*/ return scan_octal_int + (store_char(width, ib, c$0), ib); + if(120 === c$0) break b; + } + else{ + if(88 === c$0) break b; + if(98 <= c$0) + /*<>*/ return scan_binary_int + (store_char(width, ib, c$0), ib); + } + /*<>*/ return scan_decimal_digit_star(width, ib); } - else if(88 === c$0) - switch$0 = 1; - else if(98 <= c$0) - /*<>*/ return scan_binary_int - (store_char(width, ib, c$0), ib); - return switch$0 - ? scan_hexadecimal_int(store_char(width, ib, c$0), ib) - : 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: @@ -27646,8 +27650,8 @@ /*<>*/ /*<>*/ 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;} - break; + if(_aT_ === i) break; + var i = _aV_; } } return width$0[1]; @@ -27664,14 +27668,14 @@ _aI_ = _aH_ || end_of_input(ib); /*<>*/ if(_aI_) /*<>*/ bad_hex_float(0); - /*<>*/ var - /*<>*/ c = peek_char(ib), - switch$0 = 0; - if(78 <= c){ - /*<>*/ /*<>*/ var - switcher = c - 79 | 0; - if(30 < switcher >>> 0){ - if(32 > switcher){ + /*<>*/ /*<>*/ var c = peek_char(ib); + e: + { + if(78 <= c){ + /*<>*/ /*<>*/ var + switcher = c - 79 | 0; + if(30 < switcher >>> 0){ + if(32 <= switcher) break e; /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), _aJ_ = 0 === width$1 ? 1 : 0, @@ -27681,91 +27685,102 @@ /*<>*/ return check_case_insensitive_string (width$1, ib, bad_hex_float, cst_an); } + if(26 !== switcher) break e; } - else if(26 === switcher) switch$0 = 1; - } - 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, - switch$1 = 0; - if(34 < _aP_ >>> 0){ - if(66 === _aP_) switch$1 = 1; - } - else if(32 < _aP_ - 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 - c$0 = peek_char(ib); - if(46 === c$0){ - /*<>*/ var - /*<>*/ width$6 = store_char(width$5, ib, c$0), - switch$2 = 0; - /*<>*/ if(0 !== width$6 && ! end_of_input(ib)){ - /*<>*/ var - /*<>*/ match = peek_char(ib), - switch$3 = 0; - 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; - switch$3 = 1; + 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; + j: + { + k: + { + if(34 < _aP_ >>> 0){ + if(66 === _aP_) break k; } - if(! switch$3) var width$10 = width$6; - var width$7 = width$10; - switch$2 = 1; + else if(32 < _aP_ - 1 >>> 0) break k; + var width$5 = scan_hexadecimal_int(width$4, ib); + break j; } - if(! switch$2) var width$7 = width$6; - var width$8 = width$7; + var width$5 = width$4; } - 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); + /*<>*/ 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); + l: + { + /*<>*/ if(0 !== width$6 && ! end_of_input(ib)){ + /*<>*/ /*<>*/ var + match = peek_char(ib); + m: + { + 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 m; + } + var width$10 = width$6; + } + var width$7 = width$10; + break l; + } + 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$8; + /*<>*/ return width$5; } - /*<>*/ return width$5; + /*<>*/ return width$4; } - /*<>*/ return width$4; - } - if(73 === c) switch$0 = 1; - } - 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_) - /*<>*/ bad_hex_float(0); - /*<>*/ return check_case_insensitive_string - (width$2, ib, bad_hex_float, cst_nfinity); + if(73 !== c) break e; + } + /*<>*/ 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 @@ -27843,42 +27858,50 @@ /*<>*/ if(_ay_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ c$1 = peek_char(ib), - /*<>*/ switcher = c$1 - 80 | 0, - switch$0 = 0; - if(32 < switcher >>> 0) - if(-34 === switcher){ - /*<>*/ var - /*<>*/ width$5 = store_char(width$4, ib, c$1), - switch$1 = 0; - /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ - /*<>*/ var - /*<>*/ match = peek_char(ib), - switch$2 = 0; - 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; - switch$2 = 1; + /*<>*/ switcher = c$1 - 80 | 0; + l: + { + n: + { + if(32 < switcher >>> 0){ + if(-34 === switcher){ + /*<>*/ /*<>*/ var + width$5 = store_char(width$4, ib, c$1); + o: + { + /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ + /*<>*/ /*<>*/ var + match = peek_char(ib); + p: + { + 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 p; + } + var width$10 = width$5; + } + var width$6 = width$10; + break o; + } + var width$6 = width$5; + } + var width$7 = width$6; + break n; } - if(! switch$2) var width$10 = width$5; - var width$6 = width$10; - switch$1 = 1; } - if(! switch$1) var width$6 = width$5; - var width$7 = width$6; + else if(30 < switcher - 1 >>> 0){var width$7 = width$4; break n;} + var width$8 = bad_float(0); + break l; } - else - switch$0 = 1; - else if(30 < switcher - 1 >>> 0) - var width$7 = width$4; - else - switch$0 = 1; - var width$8 = switch$0 ? bad_float(0) : width$7; + var width$8 = width$7; + } /*<>*/ if(0 !== width$8 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$2 = peek_char(ib); @@ -27903,25 +27926,26 @@ /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width$0; - if(stp){ - 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; - continue; - } - /*<>*/ var - /*<>*/ _am_ = c - 9 | 0, - switch$0 = 0; - if(4 < _am_ >>> 0){ - if(23 === _am_) switch$0 = 1; + 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; } - else if(1 < _am_ - 2 >>> 0) switch$0 = 1; - if(switch$0) /*<>*/ return width$0; - /*<>*/ var - /*<>*/ width$2 = store_char(width$0, ib, c), - width$0 = width$2; + 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){ @@ -27946,100 +27970,106 @@ /*<>*/ return check_next_char(cst_a_String, _ai_, _aj_); } function scan_backslash_char(width, ib){ - /*<>*/ var - /*<>*/ c0 = check_next_char_for_char(width, ib), - switch$0 = 0; - if(40 <= c0){ - if(58 <= c0){ + /*<>*/ /*<>*/ var + c0 = check_next_char_for_char(width, ib); + b: + { + if(40 <= c0){ + if(58 > c0){ + if(48 > c0) break b; + /*<>*/ 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; + c: + { + if(0 <= c && 255 >= c){ + var _ag_ = /*<>*/ caml_call1(Stdlib[29], c); + break c; + } + 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) - switch(switcher){ - case 28: - /*<>*/ var - get_digit = - function(param){ - /*<>*/ var - /*<>*/ c = next_char(ib), - /*<>*/ _ah_ = c - 48 | 0, - switch$0 = 0; + if(28 < switcher >>> 0) break b; + switch(switcher){ + case 28: + /*<>*/ var + get_digit = + function(param){ + /*<>*/ var + /*<>*/ c = next_char(ib), + /*<>*/ _ah_ = c - 48 | 0; + b: + { if(22 < _ah_ >>> 0){ - if(5 >= _ah_ - 49 >>> 0) switch$0 = 1; + if(5 < _ah_ - 49 >>> 0) break b; } - else if(6 < _ah_ - 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, - switch$1 = 0; + else if(6 >= _ah_ - 10 >>> 0) break b; + /*<>*/ 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; + d: + { if(0 <= c$0 && 255 >= c$0){ - var _af_ = /*<>*/ caml_call1(Stdlib[29], c$0); - switch$1 = 1; - } - if(! switch$1) - 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: - switch$0 = 1; break; - } - } - else if(48 <= c0){ - /*<>*/ 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, - switch$2 = 0; - if(0 <= c && 255 >= c){ - var _ag_ = /*<>*/ caml_call1(Stdlib[29], c); - switch$2 = 1; - } - if(! switch$2) - var - _ag_ = - bad_input - ( /*<>*/ caml_call4 - (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); - /*<>*/ return store_char(width - 2 | 0, ib, _ag_); - } - } - else if(34 === c0 || 39 <= c0) switch$0 = 1; - if(! switch$0) /*<>*/ return bad_input_escape(c0); - var switch$3 = 0; - if(110 <= c0) - if(117 <= c0) - switch$3 = 1; - else - switch(c0 - 110 | 0){ + var _af_ = /*<>*/ caml_call1(Stdlib[29], c$0); + break d; + } + var + _af_ = + bad_input + ( /*<>*/ caml_call3 + (Stdlib_Printf[4], _m_, c1, c2)); + } + /*<>*/ return store_char(width - 2 | 0, ib, _af_); case 0: - var _ae_ = 10; break; - case 4: - var _ae_ = 13; break; case 6: - var _ae_ = 9; break; - default: switch$3 = 1; + case 18: + case 22: + case 24: break; + default: break b; + } + } + else if(34 !== c0 && 39 > c0) break b; + c: + { + if(110 <= c0){ + if(117 > c0) + switch(c0 - 110 | 0){ + case 0: + var _ae_ = 10; break c; + case 4: + var _ae_ = 13; break c; + case 6: + var _ae_ = 9; break c; + } } - 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 _ae_ = 8; break c;} + 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){ @@ -28048,62 +28078,60 @@ /*<>*/ /*<>*/ var c = check_next_char_for_string(width$0, ib); if(34 === c) /*<>*/ return ignore_char(width$0, ib); - if(92 !== c){ + 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; - continue; - } - /*<>*/ 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$4 = scan_backslash_char(width$1, ib), - width$0 = width$4; - continue; - } - /*<>*/ /*<>*/ var - width$3 = ignore_char(width$1, ib); - if(10 !== check_next_char_for_string(width$3, ib)){ - /*<>*/ var - /*<>*/ width$5 = store_char(width$3, ib, 13), - width$0 = width$5; - continue; - } - /*<>*/ /*<>*/ 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_); } /*<>*/ } function skip_spaces(counter, width){ /*<>*/ var width$0 = width; /*<>*/ for(;;){ - if(32 === check_next_char_for_string(width$0, ib)){ - /*<>*/ var - /*<>*/ width$1 = ignore_char(width$0, ib), - width$0 = width$1; - continue; + 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); } - /*<>*/ 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){ @@ -28194,33 +28222,33 @@ (k, 0); switch(fmt$0[0]){ case 0: - var rest = fmt$0[1], fmt$0 = rest; continue; + var rest = fmt$0[1], fmt$0 = rest; break; case 1: - var rest$0 = fmt$0[1], fmt$0 = rest$0; continue; + var rest$0 = fmt$0[1], fmt$0 = rest$0; break; case 2: - var rest$1 = fmt$0[2], fmt$0 = rest$1; continue; + var rest$1 = fmt$0[2], fmt$0 = rest$1; break; case 3: - var rest$2 = fmt$0[2], fmt$0 = rest$2; continue; + var rest$2 = fmt$0[2], fmt$0 = rest$2; break; case 4: - var rest$3 = fmt$0[4], fmt$0 = rest$3; continue; + var rest$3 = fmt$0[4], fmt$0 = rest$3; break; case 5: - var rest$4 = fmt$0[4], fmt$0 = rest$4; continue; + var rest$4 = fmt$0[4], fmt$0 = rest$4; break; case 6: - var rest$5 = fmt$0[4], fmt$0 = rest$5; continue; + var rest$5 = fmt$0[4], fmt$0 = rest$5; break; case 7: - var rest$6 = fmt$0[4], fmt$0 = rest$6; continue; + var rest$6 = fmt$0[4], fmt$0 = rest$6; break; case 8: - var rest$7 = fmt$0[4], fmt$0 = rest$7; continue; + var rest$7 = fmt$0[4], fmt$0 = rest$7; break; case 9: - var rest$8 = fmt$0[2], fmt$0 = rest$8; continue; + var rest$8 = fmt$0[2], fmt$0 = rest$8; break; case 10: - var rest$9 = fmt$0[1], fmt$0 = rest$9; continue; + var rest$9 = fmt$0[1], fmt$0 = rest$9; break; case 11: - var rest$10 = fmt$0[2], fmt$0 = rest$10; continue; + var rest$10 = fmt$0[2], fmt$0 = rest$10; break; case 12: - var rest$11 = fmt$0[2], fmt$0 = rest$11; continue; + var rest$11 = fmt$0[2], fmt$0 = rest$11; break; case 13: - var rest$12 = fmt$0[3], fmt$0 = rest$12; continue; + var rest$12 = fmt$0[3], fmt$0 = rest$12; break; case 14: /*<>*/ var rest$13 = fmt$0[3], @@ -28237,14 +28265,14 @@ /*<>*/ return take_fmtty_format_readers$0 (counter$0, k, _W_, rest$13); case 15: - var rest$14 = fmt$0[1], fmt$0 = rest$14; continue; + var rest$14 = fmt$0[1], fmt$0 = rest$14; break; case 16: - var rest$15 = fmt$0[1], fmt$0 = rest$15; continue; + var rest$15 = fmt$0[1], fmt$0 = rest$15; break; case 17: - var rest$16 = fmt$0[2], fmt$0 = rest$16; continue; + var rest$16 = fmt$0[2], fmt$0 = rest$16; break; case 18: var _X_ = fmt$0[1]; - if(0 === _X_[0]){ + if(0 === _X_[0]) /*<>*/ var rest$17 = fmt$0[2], fmt$1 = _X_[1][1], @@ -28252,16 +28280,15 @@ /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$1, rest$17), fmt$0 = fmt$2; - continue; - } - /*<>*/ 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; - continue; + 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){ @@ -28271,19 +28298,19 @@ /*<>*/ } /*<>*/ return take_format_readers(new_k, fmt_rest); /*<>*/ }; case 20: - var rest$19 = fmt$0[3], fmt$0 = rest$19; continue; + var rest$19 = fmt$0[3], fmt$0 = rest$19; break; case 21: - var rest$20 = fmt$0[2], fmt$0 = rest$20; continue; + var rest$20 = fmt$0[2], fmt$0 = rest$20; break; case 22: - var rest$21 = fmt$0[1], fmt$0 = rest$21; continue; + 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; continue; + var fmt$0 = rest$22; break; case 1: - var fmt$0 = rest$22; continue; + var fmt$0 = rest$22; break; case 2: /*<>*/ return function(reader){ function new_k(readers_rest){ @@ -28292,111 +28319,115 @@ /*<>*/ } /*<>*/ return take_format_readers (new_k, rest$22); /*<>*/ }; - default: var fmt$0 = rest$22; continue; + default: var fmt$0 = rest$22; } - switch(ign[0]){ - case 0: - var fmt$0 = rest$22; continue; - case 1: - var fmt$0 = rest$22; continue; - case 2: - var fmt$0 = rest$22; continue; - case 3: - var fmt$0 = rest$22; continue; - case 4: - var fmt$0 = rest$22; continue; - case 5: - var fmt$0 = rest$22; continue; - case 6: - var fmt$0 = rest$22; continue; - case 7: - var fmt$0 = rest$22; continue; - case 8: - var fmt$0 = rest$22; continue; - 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; continue; - default: var fmt$0 = rest$22; continue; - } - default: var rest$23 = fmt$0[3], fmt$0 = rest$23; continue; + 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") - switch(fmtty$0[0]){ - case 0: - var fmtty$1 = fmtty$0[1], fmtty$0 = fmtty$1; continue; - case 1: - var fmtty$2 = fmtty$0[1], fmtty$0 = fmtty$2; continue; - case 2: - var fmtty$3 = fmtty$0[1], fmtty$0 = fmtty$3; continue; - case 3: - var fmtty$4 = fmtty$0[1], fmtty$0 = fmtty$4; continue; - case 4: - var fmtty$5 = fmtty$0[1], fmtty$0 = fmtty$5; continue; - case 5: - var fmtty$6 = fmtty$0[1], fmtty$0 = fmtty$6; continue; - case 6: - var fmtty$7 = fmtty$0[1], fmtty$0 = fmtty$7; continue; - case 7: - var fmtty$8 = fmtty$0[1], fmtty$0 = fmtty$8; continue; - case 8: - var fmtty$9 = fmtty$0[2], fmtty$0 = fmtty$9; continue; - 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; - continue; - case 10: - var fmtty$11 = fmtty$0[1], fmtty$0 = fmtty$11; continue; - case 11: - var fmtty$12 = fmtty$0[1], fmtty$0 = fmtty$12; continue; - case 12: - var fmtty$13 = fmtty$0[1], fmtty$0 = fmtty$13; continue; - 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); /*<>*/ }; - } - /*<>*/ 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); + 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){ @@ -28732,7 +28763,7 @@ /*<>*/ if(! end_of_input(ib)) /*<>*/ return bad_input(cst_end_of_input_not_found); var fmt$0 = rest$14; - continue; + break; case 11: /*<>*/ var rest$15 = fmt$0[2], @@ -28742,29 +28773,33 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_String[29], _H_, str$0); var fmt$0 = rest$15; - continue; + break; case 12: var rest$16 = fmt$0[2], chr = fmt$0[1]; /*<>*/ check_char(ib, chr); var fmt$0 = rest$16; - continue; + 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); + c: + { + /*<>*/ try{ + /*<>*/ /*<>*/ var + _I_ = + /*<>*/ caml_call2 + (CamlinternalFormat[14], s, fmtty); + } + 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); + break c; + } + var fmt$3 = _I_; } /*<>*/ return [0, fmt$3, @@ -28775,43 +28810,46 @@ (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]; + c: + { + 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_); + } + 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]; + break c; + } + var fmt$5 = fmt$8, fmt$4 = _N_; } /*<>*/ return [0, [0, fmt$4, s$0], @@ -28838,7 +28876,7 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_String[29], _P_, _O_); var fmt$0 = rest$19; - continue; + break; case 18: var _Q_ = fmt$0[1]; if(0 === _Q_[0]){ @@ -28850,17 +28888,18 @@ /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$9, rest$20), fmt$0 = fmt$10; - continue; } - 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; - continue; + 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) @@ -29037,17 +29076,21 @@ /*<>*/ 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); + b: + { + /*<>*/ try{ + /*<>*/ /*<>*/ var + _z_ = + /*<>*/ caml_call2 + (CamlinternalFormat[15], str, format); + } + 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); + break b; + } + var fmt = _z_; } /*<>*/ return /*<>*/ caml_call1 (f, fmt); @@ -29218,8 +29261,8 @@ accu[1] = (223 * accu[1] | 0) + _aF_ | 0; /*<>*/ /*<>*/ var _aG_ = i + 1 | 0; - if(_aE_ !== i){var i = _aG_; continue;} - break; + if(_aE_ === i) break; + var i = _aG_; } } accu[1] = accu[1] & 2147483647; @@ -29276,8 +29319,8 @@ = _aA_; /*<>*/ /*<>*/ var _aC_ = i + 1 | 0; - if(_az_ !== i){var i = _aC_; continue;} - break; + if(_az_ === i) break; + var i = _aC_; } } /*<>*/ return [0, @@ -29416,18 +29459,22 @@ /*<>*/ 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; + b: + { + var _af_ = by_label[1]; + try{ + /*<>*/ /*<>*/ var + _ai_ = + /*<>*/ caml_call2 + (Labs[28], label, table[4]); + } + catch(_aj_){ + var _ag_ = caml_wrap_exception(_aj_); + if(_ag_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ag_, 0); + var _ah_ = 1; + break b; + } + var _ah_ = _ai_; } by_label[1] = /*<>*/ caml_call3(Labs[4], label, _ah_, _af_); @@ -29543,8 +29590,8 @@ /*<>*/ caml_check_bound(res, i$0)[1 + i$0] = _O_; /*<>*/ /*<>*/ var _P_ = i$0 + 1 | 0; - if(_I_ !== i$0){var i$0 = _P_; continue;} - break; + if(_I_ === i$0) break; + var i$0 = _P_; } } /*<>*/ var @@ -29560,8 +29607,8 @@ /*<>*/ caml_check_bound(res, _M_)[1 + _M_] = _L_; /*<>*/ /*<>*/ var _N_ = i + 1 | 0; - if(_K_ !== i){var i = _N_; continue;} - break; + if(_K_ === i) break; + var i = _N_; } } /*<>*/ return res; @@ -29760,8 +29807,8 @@ r[1] = [0, caml_check_bound(keys, i)[1 + i], _p_, 0]; /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(n !== i){var i = _q_; continue;} - break; + if(n === i) break; + var i = _q_; } } var v = r[1]; @@ -29778,7 +29825,6 @@ /*<>*/ 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; - a: /*<>*/ for(;;){ if(0 > i) /*<>*/ return tables$0; /*<>*/ var @@ -29795,35 +29841,43 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _g_], 1); var i$0 = i - 1 | 0, i = i$0, tables$0 = tables_data; - continue a; + break; } if(! tables$1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _f_], 1); /*<>*/ /*<>*/ var tables = tables$1[3]; - if(tables){var tables$1 = tables; continue;} - /*<>*/ /*<>*/ 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); + 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), - switch$0 = 0; - 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); switch$0 = 1;} + /*<>*/ /*<>*/ var + n = new_method(table); + b: + { + 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 b; + } + } + var n$0 = n; } - if(! switch$0) var n$0 = n; /*<>*/ caml_check_bound(table[2], n$0)[1 + n$0] = 0; /*<>*/ return n$0; @@ -30328,8 +30382,8 @@ /*<>*/ modu[1 + i] = init; /*<>*/ /*<>*/ var _i_ = i + 1 | 0; - if(_h_ !== i){var i = _i_; continue;} - break; + if(_h_ === i) break; + var i = _i_; } } /*<>*/ return modu; @@ -30357,9 +30411,9 @@ /*<>*/ n$0 = n[1 + i], /*<>*/ shape = caml_check_bound(comps$0, i)[1 + i]; - if(typeof shape === "number") + d: + if(typeof shape === "number"){ if(2 === shape){ - var switch$0 = 0; if (0 === /*<>*/ caml_obj_tag(n$0) && 4 === n$0.length - 1){ @@ -30370,18 +30424,15 @@ /*<>*/ cl[1 + j] = n$0[1 + j]; /*<>*/ /*<>*/ var _c_ = j + 1 | 0; - if(3 !== j){var j = _c_; continue;} - break; + if(3 === j) break d; + var j = _c_; } } - else - switch$0 = 1; - if(switch$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _a_], 1); } - else - /*<>*/ modu[1 + i] = n$0; + /*<>*/ modu[1 + i] = n$0; + } else if(0 === shape[0]){ var comps = shape[1]; /*<>*/ update_mod_block @@ -30389,8 +30440,8 @@ } /*<>*/ /*<>*/ var _f_ = i + 1 | 0; - if(_e_ !== i){var i = _f_; continue;} - break; + if(_e_ === i) break; + var i = _f_; } } return 0; @@ -30470,12 +30521,12 @@ 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); + e: if(250 === _aK_) var _aL_ = 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 !== _aK_ && 244 !== _aK_){var _aL_ = prng; break e;} + var _aL_ = caml_call1(CamlinternalLazy[2], prng); } var seed = @@ -30502,8 +30553,8 @@ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var _aJ_ = i + 1 | 0; - if(_aI_ !== i){var i = _aJ_; continue;} - break; + if(_aI_ === i) break; + var i = _aJ_; } } return 0; @@ -30552,8 +30603,8 @@ do_bucket(caml_check_bound(d, i)[1 + i]); /*<>*/ /*<>*/ var _aD_ = i + 1 | 0; - if(_aC_ !== i){var i = _aD_; continue;} - break; + if(_aC_ === i) break; + var i = _aD_; } } return 0; @@ -30593,8 +30644,8 @@ (caml_check_bound(odata, i)[1 + i]); /*<>*/ /*<>*/ var _aA_ = i + 1 | 0; - if(_ay_ !== i){var i = _aA_; continue;} - break; + if(_ay_ === i) break; + var i = _aA_; } } var _az_ = 0; @@ -30625,16 +30676,20 @@ /*<>*/ for(;;){ if(! param$0) /*<>*/ return 0; var hk = param$0[1], next = param$0[3], c = param$0[2]; - if(hkey === hk) - 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; continue; - } - var next$0 = param$0[3], c$0 = param$0[2]; - /*<>*/ return [0, hk, c$0, remove_bucket(next$0)]; + 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 @@ -30655,18 +30710,20 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var hk = param[1], rest = param[3], c = param[2]; - if(hkey !== hk){var rest$0 = param[3], param = rest$0; continue;} - 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; - continue; - case 1: - var param = rest; continue; - default: var param = rest; continue; - } + 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){ @@ -30685,12 +30742,13 @@ d = /*<>*/ caml_call1(H[4], c); if(d) /*<>*/ return d; var param = rest; - continue; + break; case 1: - var param = rest; continue; - default: var param = rest; continue; + var param = rest; break; + default: var param = rest; } - var rest$0 = param[3], param = rest$0; + else + var rest$0 = param[3], param = rest$0; } /*<>*/ } function find_all(h, key){ @@ -30701,21 +30759,23 @@ /*<>*/ for(;;){ if(! param$0) /*<>*/ return 0; var hk = param$0[1], rest = param$0[3], c = param$0[2]; - if(hkey !== hk){var rest$0 = param$0[3], param$0 = rest$0; continue;} - 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; - continue; - case 1: - var param$0 = rest; continue; - default: var param$0 = rest; continue; - } + 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 @@ -30736,11 +30796,16 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var hk = param[1], next = param[3], c = param[2]; - 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_; + 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_){ @@ -30763,10 +30828,13 @@ /*<>*/ for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; - if(hk !== hkey){var rest$0 = param[3], param = rest$0; continue;} - if(! /*<>*/ caml_call2(H[3], c, key)) - /*<>*/ return 1; - var param = rest; + 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){ @@ -30815,11 +30883,10 @@ if(! param$0) /*<>*/ return accu$0; var rest = param$0[3], c = param$0[2]; /*<>*/ if - ( /*<>*/ caml_call1(H[6], c)){ + ( /*<>*/ caml_call1(H[6], c)) var accu$1 = accu$0 + 1 | 0, accu$0 = accu$1, param$0 = rest; - continue; - } - var rest$0 = param$0[3], param$0 = rest$0; + else + var rest$0 = param$0[3], param$0 = rest$0; } } function stats_alive(h){ @@ -31344,8 +31411,8 @@ (eph, i, caml_check_bound(keys, i)[1 + i]); /*<>*/ /*<>*/ var _L_ = i + 1 | 0; - if(_K_ !== i){var i = _L_; continue;} - break; + if(_K_ === i) break; + var i = _L_; } } /*<>*/ return eph; @@ -31374,8 +31441,8 @@ (Stdlib[3], 1); /*<>*/ /*<>*/ var _H_ = i + 1 | 0; - if(_F_ !== i){var i = _H_; continue;} - break; + if(_F_ === i) break; + var i = _H_; } } /*<>*/ /*<>*/ var @@ -31403,8 +31470,8 @@ (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var _C_ = i + 1 | 0; - if(_B_ !== i){var i = _C_; continue;} - break; + if(_B_ === i) break; + var i = _C_; } } /*<>*/ return c; @@ -31426,8 +31493,8 @@ | 0; /*<>*/ /*<>*/ var _z_ = i + 1 | 0; - if(_w_ !== i){var i = _z_; continue;} - break; + if(_w_ === i) break; + var i = _z_; } } return h[1]; @@ -31469,8 +31536,8 @@ (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var _t_ = i + 1 | 0; - if(_s_ !== i){var i = _t_; continue;} - break; + if(_s_ === i) break; + var i = _t_; } } /*<>*/ return set_data$1(c, d); @@ -31579,22 +31646,20 @@ if(_i_ >= 0){ var i = _h_; for(;;){ - /*<>*/ var - /*<>*/ match = get_key$0(e, i), - switch$0 = 0; + /*<>*/ /*<>*/ 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){var i = _k_; continue;} - switch$0 = 1; + if(_i_ === i) break; + var i = _k_; + continue; } } - if(! switch$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[3], 1); - break; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[3], 1); } } /*<>*/ /*<>*/ var _j_ = 1; @@ -31782,24 +31847,24 @@ /*<>*/ return /*<>*/ caml_call3 (Stdlib_String[15], name, 0, 1); /*<>*/ if - ( /*<>*/ caml_call2(is_dir_sep, name, n)){ + ( /*<>*/ caml_call2(is_dir_sep, name, n)) /*<>*/ var /*<>*/ n$0 = n - 1 | 0, n = n$0; - continue; - } - /*<>*/ 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; + 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; + } } } /*<>*/ } @@ -31813,34 +31878,34 @@ /*<>*/ return /*<>*/ caml_call3 (Stdlib_String[15], name, 0, 1); /*<>*/ if - ( /*<>*/ caml_call2(is_dir_sep, name, n)){ + ( /*<>*/ caml_call2(is_dir_sep, name, n)) /*<>*/ var /*<>*/ n$0 = n - 1 | 0, n = n$0; - continue; - } - var n$1 = n; - /*<>*/ for(;;){ - if(0 > n$1) return current_dir_name; - /*<>*/ if - (! /*<>*/ caml_call2(is_dir_sep, name, n$1)){ - /*<>*/ var - /*<>*/ n$2 = n$1 - 1 | 0, - n$1 = n$2; - continue; - } - 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$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; } } } @@ -31907,16 +31972,19 @@ (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; + b: + { + try{ + /*<>*/ /*<>*/ var + _k_ = /*<>*/ caml_sys_getenv("TMPDIR"); + } + 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; + break b; + } + var temp_dir_name = _k_; } /*<>*/ function quote(s){ /*<>*/ var @@ -31943,8 +32011,8 @@ } /*<>*/ /*<>*/ var _aC_ = i + 1 | 0; - if(_aB_ !== i){var i = _aC_; continue;} - break; + if(_aB_ === i) break; + var i = _aC_; } } /*<>*/ /*<>*/ caml_call2 @@ -32145,16 +32213,19 @@ (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; + a: + { + try{ + /*<>*/ /*<>*/ var + _j_ = /*<>*/ caml_sys_getenv("TEMP"); + } + 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; + break a; + } + var temp_dir_name$0 = _j_; } function quote$0(s){ /*<>*/ var @@ -32172,8 +32243,8 @@ (Stdlib_Buffer[12], b, 92); /*<>*/ /*<>*/ var _R_ = j + 1 | 0; - if(n !== j){var j = _R_; continue;} - break; + if(n === j) break; + var j = _R_; } } return 0; @@ -32194,20 +32265,19 @@ var counter$1 = counter + 1 | 0; /*<>*/ return loop_bs(counter$1, _O_, i$0); } - 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){ + 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); } - 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){ @@ -32232,20 +32302,19 @@ var counter$1 = counter + 1 | 0; /*<>*/ return loop$0(counter$1, _N_); } - if(92 === match){ - /*<>*/ var - /*<>*/ i$1 = i$0 + 1 | 0, - n$1 = n$0 + 1 | 0, - n$0 = n$1, - i$0 = i$1; - continue; + 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); } - /*<>*/ 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));} @@ -32313,25 +32382,28 @@ (Stdlib_Buffer[1], caml_ml_string_length(s) + 20 | 0), _F_ = [0, _E_, _C_]; function _w_(c){ - /*<>*/ var switch$0 = 0; - if(62 <= c){ - var _K_ = c - 63 | 0; - if(60 < _K_ >>> 0){ - if(62 > _K_) switch$0 = 1; + /*<>*/ b: + { + if(62 <= c){ + var _K_ = c - 63 | 0; + if(60 < _K_ >>> 0){if(62 <= _K_) break b;} else if(31 !== _K_) break b; } - else if(31 === _K_) switch$0 = 1; + else + if(42 <= c){ + if(60 !== c) break b; + } + else{ + if(33 > c) break b; + switch(c - 33 | 0){case 2:case 3:case 6: break b; + } + } + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, 94); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, c); } - else - if(42 <= c){ - if(60 === c) switch$0 = 1; - } - else if(33 <= c) - switch(c - 33 | 0){case 2:case 3:case 6: break;default: switch$0 = 1;} - return switch$0 - ? ( /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, 94), - /*<>*/ caml_call2(Stdlib_Buffer[12], b, c)) - : /*<>*/ caml_call2(Stdlib_Buffer[12], b, c); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_Buffer[12], b, c); /*<>*/ } /*<>*/ /*<>*/ caml_call2 (Stdlib_String[29], _w_, s); @@ -32349,17 +32421,23 @@ /*<>*/ var _s_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; if(_s_){ - /*<>*/ var - /*<>*/ param = - /*<>*/ caml_string_get(s, 0), - switch$0 = 0; - if(91 <= param){ - if(25 >= param - 97 >>> 0) switch$0 = 1; - } - else if(65 <= param) switch$0 = 1; - /*<>*/ var - _t_ = switch$0 ? 1 : 0, - /*<>*/ _u_ = + /*<>*/ /*<>*/ var + param = /*<>*/ caml_string_get(s, 0); + a: + { + c: + { + if(91 <= param){ + if(25 < param - 97 >>> 0) break c; + } + else if(65 > param) break c; + var _t_ = 1; + break a; + } + var _t_ = 0; + } + /*<>*/ /*<>*/ var + _u_ = _t_ ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 : _t_; @@ -32599,7 +32677,6 @@ /*<>*/ var /*<>*/ counter$0 = counter + 1 | 0, counter = counter$0; - continue; } } /*<>*/ } @@ -32641,7 +32718,6 @@ /*<>*/ var /*<>*/ counter$0 = counter + 1 | 0, counter = counter$0; - continue; } } /*<>*/ } @@ -33565,42 +33641,45 @@ /*<>*/ /*<>*/ var new_len = [0, len]; for(;;){ - if(new_len[1] < (ofs + n | 0)){ - new_len[1] = (2 * new_len[1] | 0) + 1 | 0; - continue; - } - /*<>*/ 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; + 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; + /*<>*/ b: + { + /*<>*/ /*<>*/ var + chunk_size = 65536; + /*<>*/ try{ + /*<>*/ var + /*<>*/ _d_ = + /*<>*/ caml_call1(Stdlib[91], ic), + /*<>*/ _e_ = + /*<>*/ caml_call1(Stdlib[92], ic) - _d_ | 0; + } + catch(_g_){ + var _b_ = caml_wrap_exception(_g_); + if(_b_[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(_b_, 0); + var initial_size = -1; + break b; + } + var initial_size = _e_; } /*<>*/ var /*<>*/ initial_size$0 = From bfd2c7527191a934b3eb3699569fd94ea8714126 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Tue, 1 Aug 2023 15:21:40 +0200 Subject: [PATCH 2/3] Compiler: improve dominator tree for try-catch --- compiler/lib/structure.ml | 51 +- compiler/tests-compiler/exceptions.ml | 12 +- compiler/tests-full/stdlib.cma.expected.js | 920 ++++++++++----------- 3 files changed, 453 insertions(+), 530 deletions(-) diff --git a/compiler/lib/structure.ml b/compiler/lib/structure.ml index 8d6b59940b..88d799023b 100644 --- a/compiler/lib/structure.ml +++ b/compiler/lib/structure.ml @@ -17,12 +17,6 @@ let reverse_graph g = g; g' -let rec leave_try_body blocks pc = - match Addr.Map.find pc blocks with - | { body = []; branch = (Return _ | Stop), _; _ } -> false - | { body = []; branch = Branch (pc', _), _; _ } -> leave_try_body blocks pc' - | _ -> true - type graph = (Addr.t, Addr.Set.t) Hashtbl.t type t = @@ -44,10 +38,30 @@ let is_backward g pc pc' = Hashtbl.find g.block_order pc >= Hashtbl.find g.block let is_forward g pc pc' = Hashtbl.find g.block_order pc < Hashtbl.find g.block_order pc' +(* pc has at least two forward edges moving into it *) +let is_merge_node' block_order preds pc = + let s = try Hashtbl.find preds pc with Not_found -> Addr.Set.empty in + let o = Hashtbl.find block_order pc in + let n = + Addr.Set.fold (fun pc' n -> if Hashtbl.find block_order pc' < o then n + 1 else n) s 0 + in + n > 1 + +let rec leave_try_body block_order preds blocks pc = + if is_merge_node' block_order preds pc + then false + else + match Addr.Map.find pc blocks with + | { body = []; branch = (Return _ | Stop), _; _ } -> false + | { body = []; branch = Branch (pc', _), _; _ } -> + leave_try_body block_order preds blocks pc' + | _ -> true + let build_graph blocks pc = let succs = Hashtbl.create 16 in let l = ref [] in let visited = Hashtbl.create 16 in + let poptraps = ref [] in let rec traverse ~englobing_exn_handlers pc = if not (Hashtbl.mem visited pc) then ( @@ -65,13 +79,7 @@ let build_graph blocks pc = match englobing_exn_handlers with | [] -> assert false | enter_pc :: rem -> - if leave_try_body blocks leave_pc - then - (* Add an edge to limit the [try] body *) - Hashtbl.add - succs - enter_pc - (Addr.Set.add leave_pc (Hashtbl.find succs enter_pc)); + poptraps := (enter_pc, leave_pc) :: !poptraps; rem) | _ -> englobing_exn_handlers in @@ -83,6 +91,12 @@ let build_graph blocks pc = let block_order = Hashtbl.create 16 in List.iteri !l ~f:(fun i pc -> Hashtbl.add block_order pc i); let preds = reverse_graph succs in + List.iter !poptraps ~f:(fun (enter_pc, leave_pc) -> + if leave_try_body block_order preds blocks leave_pc + then + (* Add an edge to limit the [try] body *) + Hashtbl.add succs enter_pc (Addr.Set.add leave_pc (Hashtbl.find succs enter_pc))); + let preds = reverse_graph succs in { succs; preds; reverse_post_order = !l; block_order } let dominator_tree g = @@ -119,16 +133,7 @@ let dominator_tree g = reverse_tree dom (* pc has at least two forward edges moving into it *) -let is_merge_node g pc = - let s = try Hashtbl.find g.preds pc with Not_found -> Addr.Set.empty in - let o = Hashtbl.find g.block_order pc in - let n = - Addr.Set.fold - (fun pc' n -> if Hashtbl.find g.block_order pc' < o then n + 1 else n) - s - 0 - in - n > 1 +let is_merge_node g pc = is_merge_node' g.block_order g.preds pc let is_loop_header g pc = let s = try Hashtbl.find g.preds pc with Not_found -> Addr.Set.empty in diff --git a/compiler/tests-compiler/exceptions.ml b/compiler/tests-compiler/exceptions.ml index c90bd5f4de..5383e0a1e6 100644 --- a/compiler/tests-compiler/exceptions.ml +++ b/compiler/tests-compiler/exceptions.ml @@ -33,15 +33,11 @@ let prevent_inline = some_name [%expect {| function some_name(param){ - a: - { - try{ - try{throw caml_maybe_attach_backtrace(Stdlib[8], 1);} - catch(x$0){var x = caml_wrap_exception(x$0);} - } - catch(i$1){var i = caml_wrap_exception(i$1), i$0 = i; break a;} - var i$0 = x; + try{ + try{throw caml_maybe_attach_backtrace(Stdlib[8], 1);} + catch(x$0){var x = caml_wrap_exception(x$0), i$0 = x;} } + catch(i$1){var i = caml_wrap_exception(i$1), i$0 = i;} throw caml_maybe_attach_backtrace(i$0, 1); } //end |}]; diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 1d720ab560..4c5a981f51 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -542,13 +542,12 @@ /*<>*/ for(;;){ if(! param$0) /*<>*/ return 0; var l = param$0[2], a = param$0[1]; - a: - try{ /*<>*/ /*<>*/ caml_ml_flush(a); + /*<>*/ try{ + /*<>*/ /*<>*/ caml_ml_flush(a); } catch(_w_){ var _v_ = caml_wrap_exception(_w_); - if(_v_[1] === Sys_error) break a; - throw caml_maybe_attach_backtrace(_v_, 0); + if(_v_[1] !== Sys_error) throw caml_maybe_attach_backtrace(_v_, 0); } var param$0 = l; } @@ -585,9 +584,10 @@ (oc); /*<>*/ } function close_out_noerr(oc){ - /*<>*/ b: - try{ /*<>*/ /*<>*/ caml_ml_flush(oc);} - catch(_u_){break b;} + /*<>*/ try{ + /*<>*/ /*<>*/ caml_ml_flush(oc); + } + catch(_u_){} /*<>*/ try{ /*<>*/ /*<>*/ var _s_ = /*<>*/ caml_ml_close_channel(oc); @@ -7380,8 +7380,7 @@ for(;;){ /*<>*/ /*<>*/ var e$1 = caml_check_bound(a, i$6)[1 + i$6]; - c: - try{ + /*<>*/ try{ var i = i$6; /*<>*/ for(;;){ /*<>*/ /*<>*/ var @@ -7405,7 +7404,6 @@ 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; - break c; } /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; if(0 === i$6) break; @@ -8235,8 +8233,7 @@ for(;;){ /*<>*/ /*<>*/ var e$1 = /*<>*/ caml_array_get(a, i$6); - c: - try{ + /*<>*/ try{ var i = i$6; /*<>*/ for(;;){ /*<>*/ /*<>*/ var @@ -8261,7 +8258,6 @@ var i$0 = exn[2]; /*<>*/ /*<>*/ caml_array_set (a, i$0, e$1); - break c; } /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; if(0 === i$6) break; @@ -9505,23 +9501,20 @@ var cmd = 3, arg = 0; break; case 4: - c: - { - try{ - /*<>*/ var - _i_ = env[13], - /*<>*/ _j_ = - /*<>*/ caml_call1 - (caml_check_bound(tables[1], _i_)[1 + _i_], env), - /*<>*/ _k_ = 4; - } - catch(_m_){ - var _h_ = caml_wrap_exception(_m_); - if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); - var value = 0, action = 5; - break c; - } - var value = _j_, action = _k_; + 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; @@ -12979,17 +12972,15 @@ } var result = [0, res]; } - a: - { - /*<>*/ try{ /*<>*/ do_at_exit(0);} - catch(ex){ - /*<>*/ var - ex$0 = caml_wrap_exception(ex), - /*<>*/ _d_ = 0 === result[0] ? [1, ex$0] : result, - result$0 = _d_; - break a; - } + /*<>*/ 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); @@ -17978,25 +17969,22 @@ nend = j$0; continue; } - e: if(nstart === nend) var indent = 0; - else{ + else /*<>*/ try{ - /*<>*/ /*<>*/ var - _bs_ = + /*<>*/ var + /*<>*/ _bs_ = /*<>*/ runtime.caml_int_of_string ( /*<>*/ caml_call3 - (Stdlib_String[15], str, nstart, nend - nstart | 0)); + (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); - break e; } - var indent = _bs_; - } /*<>*/ /*<>*/ var exp_end = parse_spaces(nend); if(exp_end !== len) @@ -18195,110 +18183,104 @@ case 27: var str_ind$3 = str_ind$0 + 1 | 0; e: - { - f: + 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); + g: { - g: - 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); - h: - { - if(48 <= match$2){ - if(58 > match$2) break h; - } - else if(45 === match$2) break h; - /*<>*/ 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; - break g; - } - } - 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; - break f; - } - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); + if(48 <= match$2){ + if(58 > match$2) break g; } - 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; + else if(45 === match$2) break g; + /*<>*/ 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 e; } - var formatting_lit$0 = _bi_, next_ind = _bj_; + } + 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 e; } - var formatting_lit$0 = _bk_, next_ind = _bl_; + /*<>*/ 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], @@ -18306,59 +18288,55 @@ break a; case 28: var str_ind$4 = str_ind$0 + 1 | 0; - e: - { - /*<>*/ try{ - /*<>*/ var - /*<>*/ str_ind_1$0 = - parse_spaces(str_ind$4, end_ind), - /*<>*/ match$6 = - /*<>*/ caml_string_get - (str, str_ind_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); + f: + { g: { - i: - { - if(48 <= match$6){ - if(58 > match$6) break i; - } - else if(45 === match$6) break i; - var _bo_ = 0; - break g; + if(48 <= match$6){ + if(58 > match$6) break g; } - /*<>*/ 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]]]; + else if(45 === match$6) break g; + var _bo_ = 0; + break f; } - } - 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; - break e; + /*<>*/ 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], @@ -20154,41 +20132,31 @@ ([0, Stop, _c_], 1); /*<>*/ } function add_help(speclist){ - /*<>*/ b: - { - /*<>*/ try{ - /*<>*/ assoc3(cst_help$2, speclist); - /*<>*/ /*<>*/ var _aA_ = 0; - } - 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]; - break b; - } - var add1 = _aA_; + /*<>*/ try{ + /*<>*/ assoc3(cst_help$2, speclist); + /*<>*/ var /*<>*/ _aA_ = 0, add1 = _aA_; } - a: - { - try{ - /*<>*/ assoc3(cst_help$1, speclist); - /*<>*/ /*<>*/ var _az_ = 0; - } - 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]; - break a; - } - var add2 = _az_; + 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); @@ -20316,41 +20284,39 @@ /*<>*/ if (1 <= /*<>*/ caml_ml_string_length(s) && 45 === /*<>*/ caml_string_get(s, 0)){ - e: - { - try{ - /*<>*/ var - follow$1 = 0, - /*<>*/ _aa_ = assoc3(s, speclist[1]); + 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(_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]); - } - 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 follow$0 = follow, action = _$_; - break e; + 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 follow$0 = follow$1, action = _aa_; } var no_arg$0 = @@ -20403,21 +20369,17 @@ /*<>*/ var f$0 = param[1], /*<>*/ arg = get_arg(0); - b: - { - /*<>*/ try{ - /*<>*/ /*<>*/ var - _ac_ = - [0, /*<>*/ caml_call1(Stdlib[32], arg)]; - } - catch(_ah_){ - var _ab_ = caml_wrap_exception(_ah_); - if(_ab_[1] !== Stdlib[6]) - throw caml_maybe_attach_backtrace(_ab_, 0); - var match = 0; - break b; - } - var match = _ac_; + /*<>*/ 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 @@ -21431,61 +21393,52 @@ var empty_backtrace = [0]; function handle_uncaught_exception(exn$0, debugger_in_use){ /*<>*/ try{ - b: - { - /*<>*/ try{ - var - raw_backtrace = - debugger_in_use - ? empty_backtrace - : /*<>*/ caml_get_exception_raw_backtra(0); - d: - try{ - /*<>*/ /*<>*/ caml_call1 - (Stdlib[103], 0); - } - catch(_H_){break d;} - e: - { - /*<>*/ try{ - /*<>*/ /*<>*/ var - _D_ = - /*<>*/ caml_call2 - (uncaught_exception_handler[1], exn$0, raw_backtrace); - } - 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]); - break e; - } - var _C_ = _D_; - } + /*<>*/ try{ + var + raw_backtrace = + debugger_in_use + ? empty_backtrace + : /*<>*/ caml_get_exception_raw_backtra(0); + /*<>*/ try{ + /*<>*/ /*<>*/ caml_call1 + (Stdlib[103], 0); } - catch(_G_){ - var _z_ = caml_wrap_exception(_G_); - if(_z_ !== Stdlib[9]) throw caml_maybe_attach_backtrace(_z_, 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 - _E_ = - /*<>*/ caml_call1 - (Stdlib[53], cst_Fatal_error_out_of_memory_); - break b; + _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_; } @@ -23185,33 +23138,27 @@ /*<>*/ h[4] = - h[4] | 0; return 0; /*<>*/ } - b: - { - try{ - /*<>*/ /*<>*/ var - _f_ = /*<>*/ caml_sys_getenv("OCAMLRUNPARAM"); - } - catch(_az_){ - var _a_ = caml_wrap_exception(_az_); - if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); - c: - { - /*<>*/ try{ - /*<>*/ /*<>*/ var - _e_ = /*<>*/ caml_sys_getenv("CAMLRUNPARAM"); - } - catch(_aA_){ - var _b_ = caml_wrap_exception(_aA_); - if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); - var _c_ = cst; - break c; - } - var _c_ = _e_; - } - var params = _c_; - break b; + 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 = _f_; + var params = _c_; } /*<>*/ var /*<>*/ randomized_default = @@ -27701,16 +27648,16 @@ /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var _aP_ = peek_char(ib) - 46 | 0; - j: + h: { - k: + i: { if(34 < _aP_ >>> 0){ - if(66 === _aP_) break k; + if(66 === _aP_) break i; } - else if(32 < _aP_ - 1 >>> 0) break k; + else if(32 < _aP_ - 1 >>> 0) break i; var width$5 = scan_hexadecimal_int(width$4, ib); - break j; + break h; } var width$5 = width$4; } @@ -27720,12 +27667,12 @@ if(46 === c$0){ /*<>*/ /*<>*/ var width$6 = store_char(width$5, ib, c$0); - l: + j: { /*<>*/ if(0 !== width$6 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var match = peek_char(ib); - m: + k: { if(80 !== match && 112 !== match){ /*<>*/ var @@ -27736,12 +27683,12 @@ width$6 - (precision$0 - scan_hexadecimal_int(precision$0, ib) | 0) | 0; - break m; + break k; } var width$10 = width$6; } var width$7 = width$10; - break l; + break j; } var width$7 = width$6; } @@ -27859,20 +27806,20 @@ /*<>*/ var /*<>*/ c$1 = peek_char(ib), /*<>*/ switcher = c$1 - 80 | 0; - l: + j: { - n: + l: { if(32 < switcher >>> 0){ if(-34 === switcher){ /*<>*/ /*<>*/ var width$5 = store_char(width$4, ib, c$1); - o: + m: { /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var match = peek_char(ib); - p: + n: { if(80 !== match && 112 !== match){ /*<>*/ var @@ -27883,22 +27830,22 @@ width$5 - (precision$0 - scan_hexadecimal_int(precision$0, ib) | 0) | 0; - break p; + break n; } var width$10 = width$5; } var width$6 = width$10; - break o; + break m; } var width$6 = width$5; } var width$7 = width$6; - break n; + break l; } } - else if(30 < switcher - 1 >>> 0){var width$7 = width$4; break n;} + else if(30 < switcher - 1 >>> 0){var width$7 = width$4; break l;} var width$8 = bad_float(0); - break l; + break j; } var width$8 = width$7; } @@ -28785,21 +28732,17 @@ (width_of_pad_opt(pad_opt), ib); /*<>*/ /*<>*/ var s = token_string(ib); - c: - { - /*<>*/ try{ - /*<>*/ /*<>*/ var - _I_ = - /*<>*/ caml_call2 - (CamlinternalFormat[14], s, fmtty); - } - 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); - break c; - } - var fmt$3 = _I_; + /*<>*/ 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, @@ -28810,46 +28753,43 @@ (width_of_pad_opt(pad_opt$0), ib); /*<>*/ /*<>*/ var s$0 = token_string(ib); - c: - { - 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_); - } - 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]; - break c; - } - var fmt$5 = fmt$8, fmt$4 = _N_; + 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], @@ -29076,21 +29016,17 @@ /*<>*/ scan_caml_string(Stdlib[19], ib); /*<>*/ /*<>*/ var str = token_string(ib); - b: - { - /*<>*/ try{ - /*<>*/ /*<>*/ var - _z_ = - /*<>*/ caml_call2 - (CamlinternalFormat[15], str, format); - } - 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); - break b; - } - var fmt = _z_; + /*<>*/ 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); @@ -29459,22 +29395,18 @@ /*<>*/ by_name[1] = /*<>*/ caml_call3 (Meths[4], met, label, by_name[1]); - b: - { - var _af_ = by_label[1]; - try{ - /*<>*/ /*<>*/ var - _ai_ = - /*<>*/ caml_call2 - (Labs[28], label, table[4]); - } - catch(_aj_){ - var _ag_ = caml_wrap_exception(_aj_); - if(_ag_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ag_, 0); - var _ah_ = 1; - break b; - } - var _ah_ = _ai_; + 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_); @@ -31972,19 +31904,16 @@ (Stdlib_String[15], filename, 0, len_f - len_s | 0)] : 0; /*<>*/ } - b: - { - try{ - /*<>*/ /*<>*/ var - _k_ = /*<>*/ caml_sys_getenv("TMPDIR"); - } - 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; - break b; - } - var temp_dir_name = _k_; + 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 @@ -32213,19 +32142,16 @@ (Stdlib_String[15], filename, 0, len_f - len_s | 0)] : 0; /*<>*/ } - a: - { - try{ - /*<>*/ /*<>*/ var - _j_ = /*<>*/ caml_sys_getenv("TEMP"); - } - 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; - break a; - } - var temp_dir_name$0 = _j_; + 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 @@ -33662,24 +33588,20 @@ } /*<>*/ } function input_all(ic){ - /*<>*/ b: - { - /*<>*/ /*<>*/ var - chunk_size = 65536; - /*<>*/ try{ - /*<>*/ var - /*<>*/ _d_ = - /*<>*/ caml_call1(Stdlib[91], ic), - /*<>*/ _e_ = - /*<>*/ caml_call1(Stdlib[92], ic) - _d_ | 0; - } - catch(_g_){ - var _b_ = caml_wrap_exception(_g_); - if(_b_[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(_b_, 0); - var initial_size = -1; - break b; - } - var initial_size = _e_; + /*<>*/ /*<>*/ 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 = From a8aeeeb987606c7694fde943ee550ea49d640ed3 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 3 Aug 2023 08:21:08 +0200 Subject: [PATCH 3/3] Compiler: structure, not need to recompute the whole preds --- compiler/lib/structure.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/lib/structure.ml b/compiler/lib/structure.ml index 88d799023b..e0a637f0ab 100644 --- a/compiler/lib/structure.ml +++ b/compiler/lib/structure.ml @@ -93,10 +93,10 @@ let build_graph blocks pc = let preds = reverse_graph succs in List.iter !poptraps ~f:(fun (enter_pc, leave_pc) -> if leave_try_body block_order preds blocks leave_pc - then + then ( (* Add an edge to limit the [try] body *) - Hashtbl.add succs enter_pc (Addr.Set.add leave_pc (Hashtbl.find succs enter_pc))); - let preds = reverse_graph succs in + Hashtbl.add succs enter_pc (Addr.Set.add leave_pc (Hashtbl.find succs enter_pc)); + Hashtbl.add preds leave_pc (Addr.Set.add enter_pc (Hashtbl.find preds leave_pc)))); { succs; preds; reverse_post_order = !l; block_order } let dominator_tree g =