From 9c7424327b1df48c651eda600e6ec3b2a417344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Fri, 5 Sep 2025 11:05:04 +0200 Subject: [PATCH 01/13] Benchmark updates --- bench.Dockerfile | 44 +- benchmarks/.ocamlformat-ignore | 4 + benchmarks/Makefile | 7 + benchmarks/benchmark-camlboy/Makefile | 7 +- benchmarks/benchmark-fiat-crypto/Makefile | 8 +- benchmarks/benchmark-ocamlc/Makefile | 5 +- benchmarks/benchmark-others/Makefile | 8 + .../benchmark-others/bigarrays/Makefile | 19 + .../benchmark-others/bigarrays/bench.ml | 36 + benchmarks/benchmark-others/bin_prot/Makefile | 20 + benchmarks/benchmark-others/bin_prot/bench.ml | 83 +++ benchmarks/benchmark-others/bin_prot/dune | 10 + .../benchmark-others/bin_prot/dune-project | 1 + benchmarks/benchmark-others/dune | 3 + .../benchmark-others/lexifi-g2pp/COPYING | 674 ++++++++++++++++++ .../benchmark-others/lexifi-g2pp/Makefile | 18 + .../benchmark-others/lexifi-g2pp/README.txt | 41 ++ .../benchmark-others/lexifi-g2pp/date.ml | 124 ++++ .../benchmark-others/lexifi-g2pp/date.mli | 25 + benchmarks/benchmark-others/lexifi-g2pp/dune | 7 + .../benchmark-others/lexifi-g2pp/dune-project | 1 + .../lexifi-g2pp/g2pp_calibration.ml | 294 ++++++++ .../lexifi-g2pp/g2pp_calibration.mli | 63 ++ .../benchmark-others/lexifi-g2pp/main.ml | 263 +++++++ .../benchmark-others/lexifi-g2pp/math.ml | 96 +++ .../benchmark-others/lexifi-g2pp/math.mli | 49 ++ .../lexifi-g2pp/optimization.ml | 254 +++++++ .../lexifi-g2pp/optimization.mli | 124 ++++ .../benchmark-partial-render-table/Makefile | 7 +- benchmarks/report.ml | 3 +- benchmarks/run.config | 4 +- benchmarks/run.ml | 2 +- benchmarks/sources/js/binary_trees.js | 2 +- benchmarks/sources/js/fft.js | 2 +- benchmarks/sources/js/raytrace.js | 2 +- benchmarks/sources/ml/binary_trees.ml | 27 +- benchmarks/sources/ml/fft.ml | 2 +- benchmarks/sources/ml/quicksort.ml | 4 +- benchmarks/sources/ml/raytrace.ml | 2 +- benchmarks/sources/ml/soli.ml | 74 +- benchmarks/utils/compilation_metrics.ml | 26 +- benchmarks/utils/format_metrics.sh | 2 +- 42 files changed, 2348 insertions(+), 99 deletions(-) create mode 100644 benchmarks/.ocamlformat-ignore create mode 100644 benchmarks/benchmark-others/Makefile create mode 100644 benchmarks/benchmark-others/bigarrays/Makefile create mode 100644 benchmarks/benchmark-others/bigarrays/bench.ml create mode 100644 benchmarks/benchmark-others/bin_prot/Makefile create mode 100644 benchmarks/benchmark-others/bin_prot/bench.ml create mode 100644 benchmarks/benchmark-others/bin_prot/dune create mode 100644 benchmarks/benchmark-others/bin_prot/dune-project create mode 100644 benchmarks/benchmark-others/dune create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/COPYING create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/Makefile create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/README.txt create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/date.ml create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/date.mli create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/dune create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/dune-project create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/g2pp_calibration.ml create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/g2pp_calibration.mli create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/main.ml create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/math.ml create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/math.mli create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/optimization.ml create mode 100644 benchmarks/benchmark-others/lexifi-g2pp/optimization.mli diff --git a/bench.Dockerfile b/bench.Dockerfile index 8524376927..e7712c34eb 100644 --- a/bench.Dockerfile +++ b/bench.Dockerfile @@ -1,4 +1,4 @@ -FROM ocaml/opam:debian-ocaml-5.2 +FROM ocaml/opam:debian-ocaml-5.3 WORKDIR /bench-dir RUN sudo apt-get update \ @@ -29,40 +29,30 @@ RUN mkdir janestreet \ && cd janestreet \ && git clone --depth 20 https://github.com/janestreet/opam-repository \ && cd opam-repository \ - && git checkout 41c89c7824533f6b63cc5b6d75e6ddb1441d1520 \ + && git checkout 2819773f29b6f6c14b918eae3cb40c8ff6b22d0e \ && opam remote add js . # Install dependencies WORKDIR /bench-dir/js_of_ocaml -COPY --chown=opam:opam ./*.opam ./ -RUN opam pin -yn --with-version=dev . -RUN opam install -y --deps-only js_of_ocaml-compiler \ - && opam install opam-format stringext uucp cstruct bigstringaf \ +COPY --chown=opam:opam js_of_ocaml-compiler.opam . +RUN opam install -y --deps-only ./js_of_ocaml-compiler.opam \ + && opam install opam-format stringext uucp cstruct \ + && opam pin add ppxlib -n 0.35.0 \ && opam clean -# Install js_of_ocaml / wasm_of_ocaml -COPY --chown=opam:opam . ./ -RUN opam install -y wasm_of_ocaml-compiler \ +# Prepare partial render table benchmark +COPY --chown=opam:opam dune-project ./ +COPY --chown=opam:opam tools ./tools +RUN opam exec -- dune exec tools/ci_setup.exe ../janestreet . \ + && opam exec -- dune build --root ../janestreet --profile release lib/bonsai_web_components/partial_render_table/bench/bin/main.bc-for-jsoo \ + && opam remove js_of_ocaml-compiler ojs \ && opam clean -# Compile partial render table benchmark -#RUN opam exec -- dune exec tools/ci_setup.exe ../janestreet . \ -# && opam install ppxlib.0.35.0 # temporary workaround \ -# && opam clean - -RUN opam exec -- dune exec tools/ci_setup.exe ../janestreet . \ - && opam install ppxlib.0.35.0 \ - && eval $(opam env) \ - && dune build --root ../janestreet --profile release lib/bonsai_web_components/partial_render_table/bench/bin/main.bc.wasm.js lib/bonsai_web_components/partial_render_table/bench/bin/main.bc.js \ - && cp -r ../janestreet/_build/default/lib/bonsai_web_components/partial_render_table/bench/bin/main.bc* ./benchmarks/benchmark-partial-render-table/ \ - && rm -rf ../janestreet +# Bin_prot packages +RUN opam pin add -n https://github.com/janestreet/bin_prot.git#125e336faacd2e2e8c7a1fed2231bde1cebfebdd \ + && opam install ppx_bin_prot -# CAMLBOY -WORKDIR /bench-dir -RUN opam install brr \ - && opam clean \ - && git clone --depth 1 https://github.com/ocaml-wasm/CAMLBOY -b node \ - && cd CAMLBOY \ - && opam exec -- dune build --root . --profile release ./bin/web +# Copy sources +COPY --chown=opam:opam . ./ WORKDIR /bench-dir/js_of_ocaml/benchmarks diff --git a/benchmarks/.ocamlformat-ignore b/benchmarks/.ocamlformat-ignore new file mode 100644 index 0000000000..e000c6c415 --- /dev/null +++ b/benchmarks/.ocamlformat-ignore @@ -0,0 +1,4 @@ +benchmark-camlboy/* +benchmark-fiat-crypto/* +benchmark-ocamlc/* +benchmark-partial-render-table/* diff --git a/benchmarks/Makefile b/benchmarks/Makefile index 2038e6d9ae..3d12c8b96a 100644 --- a/benchmarks/Makefile +++ b/benchmarks/Makefile @@ -14,19 +14,26 @@ all: _perf graphsnopr graphspr graphseff _noperf # see https://github.com/ocurrent/current-bench .PHONY: bench microbenchmarks bench: + @date -u +"%FT%TZ - Installing dependencies" + opam pin -yn --with-version=dev .. + opam install -y wasm_of_ocaml-compiler js_of_ocaml-ppx gen_js_api brr $(MAKE) microbenchmarks $(MAKE) -C benchmark-fiat-crypto bench $(MAKE) -C benchmark-ocamlc bench $(MAKE) -C benchmark-partial-render-table bench $(MAKE) -C benchmark-camlboy bench + $(MAKE) -C benchmark-others bench microbenchmarks: + @date -u +"%FT%TZ - Microbenchmarks: starting" make _noprecomp + @date -u +"%FT%TZ - Microbenchmarks: compiler" $(RUN) ./report-wasm-cb.config ./report-jsoo-cb.config $(REPORT) -format current-bench -config report-wasm-cb.config \ -ylabel "Wasm_of_ocaml" | sh utils/aggregate.sh wasm $(REPORT) -format current-bench -config report-jsoo-cb.config \ -ylabel "Js_of_ocaml" | sh utils/aggregate.sh js + @date -u +"%FT%TZ - Microbenchmarks: done" graphsnopr: _noprecomp $(GRAPHSNOPR) diff --git a/benchmarks/benchmark-camlboy/Makefile b/benchmarks/benchmark-camlboy/Makefile index da5a2f8431..85d29d8218 100644 --- a/benchmarks/benchmark-camlboy/Makefile +++ b/benchmarks/benchmark-camlboy/Makefile @@ -4,13 +4,18 @@ export NAME=Camlboy SHELL=/bin/bash -o pipefail -DIR=../../../CAMLBOY +DIR=CAMLBOY SCRIPT=$(DIR)/_build/default/bin/web/bench_node.bc ROM=$(DIR)/resource/games/tobu.gb bench: + @date -u +"%FT%TZ - $(NAME): starting" + git clone --depth 1 https://github.com/ocaml-wasm/CAMLBOY -b node + cd $(DIR) && opam exec -- dune build --root . --profile release ./bin/web + @date -u +"%FT%TZ - $(NAME): compiled" $(MAKE) perform COMPILER=Js_of_ocaml SUFFIX=.js KIND=js $(MAKE) perform COMPILER=Wasm_of_ocaml SUFFIX=.wasm.js KIND=wasm + @date -u +"%FT%TZ - $(NAME): done" perform: node $(SCRIPT)$(SUFFIX) $(ROM) | \ diff --git a/benchmarks/benchmark-fiat-crypto/Makefile b/benchmarks/benchmark-fiat-crypto/Makefile index c2a43c1b13..cfff448c45 100644 --- a/benchmarks/benchmark-fiat-crypto/Makefile +++ b/benchmarks/benchmark-fiat-crypto/Makefile @@ -5,12 +5,14 @@ export NAME=Fiat-Crypto SHELL=/bin/bash -o pipefail bench: - $(MAKE) perform COMPILER=js_of_ocaml EXTRA_ARGS="--enable effects" KIND=js + @date -u +"%FT%TZ - $(NAME): starting" + $(MAKE) perform COMPILER=js_of_ocaml EXTRA_ARGS="--effects cps" KIND=js $(MAKE) perform COMPILER=wasm_of_ocaml EXTRA_ARGS="" KIND=wasm + @date -u +"%FT%TZ - $(NAME): done" perform: bedrock2_fiat_crypto.byte - /usr/bin/time -f "%E %R" $(COMPILER) --debug times --source-map $(EXTRA_ARGS) $< 2>&1 | \ - ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER) $(NAME) | \ + /usr/bin/time -f "%E %R" $(COMPILER) --debug times --source-map $(EXTRA_ARGS) $< -o out.js 2>&1 | \ + ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER) $(NAME) out.js | \ sh ../utils/aggregate.sh $(KIND) bedrock2_fiat_crypto.byte: bedrock2_fiat_crypto.ml diff --git a/benchmarks/benchmark-ocamlc/Makefile b/benchmarks/benchmark-ocamlc/Makefile index 2e7f8a978a..be6f814711 100644 --- a/benchmarks/benchmark-ocamlc/Makefile +++ b/benchmarks/benchmark-ocamlc/Makefile @@ -5,17 +5,18 @@ export NAME=Ocamlc SHELL=/bin/bash -o pipefail bench: + @date -u +"%FT%TZ - $(NAME): starting" cp -r ../sources/ml . $(MAKE) perform COMPILER=js_of_ocaml SCRIPT=ocamlc.js KIND=js $(MAKE) perform COMPILER=wasm_of_ocaml SCRIPT=ocamlc.wasm.js KIND=wasm + @date -u +"%FT%TZ - $(NAME): done" ARGS=ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml perform: /usr/bin/time -f "%E %R" $(COMPILER) --debug times --opt 2 --pretty `which ocamlc.byte` -o $(SCRIPT) 2>&1 | \ - ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER) $(NAME) | \ + ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER) $(NAME) $(SCRIPT) | \ sh ../utils/aggregate.sh $(KIND) /usr/bin/time -f '{"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT) -c $(ARGS) 2>&1 | \ sh ../utils/format_metrics.sh exec | \ sh ../utils/aggregate.sh $(KIND) - diff --git a/benchmarks/benchmark-others/Makefile b/benchmarks/benchmark-others/Makefile new file mode 100644 index 0000000000..daf6c02879 --- /dev/null +++ b/benchmarks/benchmark-others/Makefile @@ -0,0 +1,8 @@ +SUBDIRS := $(wildcard */.) + +bench: $(SUBDIRS) + +$(SUBDIRS): + $(MAKE) -C $@ + +.PHONY: all $(SUBDIRS) diff --git a/benchmarks/benchmark-others/bigarrays/Makefile b/benchmarks/benchmark-others/bigarrays/Makefile new file mode 100644 index 0000000000..dd5b69e3c4 --- /dev/null +++ b/benchmarks/benchmark-others/bigarrays/Makefile @@ -0,0 +1,19 @@ +.PHONY: bench perform + +export NAME=Others +export SUBNAME=bigarrays + +SHELL=/bin/bash -o pipefail + +bench: + @date -u +"%FT%TZ - $(NAME)/$(SUBNAME): starting" + ocamlc bench.ml -o bench + $(MAKE) perform COMPILER=js_of_ocaml SCRIPT=bench.js KIND=js + $(MAKE) perform COMPILER=wasm_of_ocaml SCRIPT=bench.wasm.js KIND=wasm + @date -u +"%FT%TZ - $(NAME)/$(SUBNAME): done" + +perform: + $(COMPILER) --opt 2 --pretty bench -o $(SCRIPT) + /usr/bin/time -f '{"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT) 2>&1 | \ + sh ../../utils/format_metrics.sh exec | \ + sh ../../utils/aggregate.sh $(KIND) diff --git a/benchmarks/benchmark-others/bigarrays/bench.ml b/benchmarks/benchmark-others/bigarrays/bench.ml new file mode 100644 index 0000000000..6107c0661c --- /dev/null +++ b/benchmarks/benchmark-others/bigarrays/bench.ml @@ -0,0 +1,36 @@ +let pi = 4. *. atan 1. + +let deltay = 40_000. /. 360. /. 3600. *. 1000. + +let deltax = deltay *. cos (44. *. pi /. 180.) + +let precompute tile_height tile_width tile = + let normals = + Bigarray.(Array3.create Int8_signed C_layout) (tile_height - 2) (tile_width - 2) 3 + in + let heights = + Bigarray.(Array2.create Float32 C_layout) (tile_height - 2) (tile_width - 2) + in + for y = 1 to tile_height - 2 do + for x = 1 to tile_width - 2 do + let nx = (tile.{y, x - 1} -. tile.{y, x + 1}) *. deltay in + let ny = (tile.{y - 1, x} -. tile.{y + 1, x}) *. deltax in + let nz = 2. *. deltax *. deltay in + let n = 127. /. sqrt ((nx *. nx) +. (ny *. ny) +. (nz *. nz)) in + normals.{tile_height - 2 - y, x - 1, 0} <- truncate (nx *. n); + normals.{tile_height - 2 - y, x - 1, 1} <- truncate (ny *. n); + normals.{tile_height - 2 - y, x - 1, 2} <- truncate (nz *. n); + heights.{tile_height - 2 - y, x - 1} <- tile.{y, x} + done + done + +let tile_height = 1024 + +let tile_width = 1024 + +let tile = Bigarray.(Array2.create Float32 C_layout) tile_height tile_width + +let () = + for _ = 1 to 30 do + precompute tile_height tile_width tile + done diff --git a/benchmarks/benchmark-others/bin_prot/Makefile b/benchmarks/benchmark-others/bin_prot/Makefile new file mode 100644 index 0000000000..51effc0579 --- /dev/null +++ b/benchmarks/benchmark-others/bin_prot/Makefile @@ -0,0 +1,20 @@ +.PHONY: bench perform + +export NAME=Others +export SUBNAME=bin_prot + +SHELL=/bin/bash -o pipefail + +bench: + @date -u +"%FT%TZ - $(NAME)/$(SUBNAME): starting" + dune build --profile release --root . + node _build/default/bench.bc.js 400000 + $(MAKE) perform COMPILER=js_of_ocaml SCRIPT=_build/default/bench.bc.js KIND=js + $(MAKE) perform COMPILER=wasm_of_ocaml SCRIPT=_build/default/bench.bc.wasm.js KIND=wasm + @date -u +"%FT%TZ - $(NAME)/$(SUBNAME): done" + +perform: + /usr/bin/time -f '{"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT) 2>&1 1> /dev/null | \ + tee /dev/stderr | \ + sh ../../utils/format_metrics.sh exec | \ + sh ../../utils/aggregate.sh $(KIND) diff --git a/benchmarks/benchmark-others/bin_prot/bench.ml b/benchmarks/benchmark-others/bin_prot/bench.ml new file mode 100644 index 0000000000..b5dbfe58d6 --- /dev/null +++ b/benchmarks/benchmark-others/bin_prot/bench.ml @@ -0,0 +1,83 @@ +open Bin_prot.Std + +type element = + { a : string + ; b : string + ; c : string + ; d : bool + ; e : bool + ; f : bool + ; g : string option + ; h : bool + ; i : bool + ; j : bool + ; k : bool + ; l : bool + ; m : bool + ; n : bool + ; o : string option + ; p : bool + ; q : bool + ; r : int + ; s : int + ; t : int + ; u : int + ; v : string list (* these are small - 1-5 *) + } +[@@deriving bin_io] + +let s = "abcdefabcdefabcdef" + +let v = [ s; s; s; s ] + +let x = + { a = s + ; b = s + ; c = s + ; d = true + ; e = true + ; f = true + ; g = Some s + ; h = true + ; i = true + ; j = true + ; k = true + ; l = true + ; m = true + ; n = true + ; o = Some s + ; p = true + ; q = true + ; r = 65537 + ; s = 65537 + ; t = 65537 + ; u = 65537 + ; v + } + +type t = element list [@@deriving bin_io] + +let rec f acc n = if n = 0 then acc else f (x :: acc) (n - 1) + +let () = + if Array.length Sys.argv > 1 + then ( + let count = int_of_string Sys.argv.(1) in + let l = f [] count in + let len = [%bin_size: t] l in + let b = Bin_prot.Common.create_buf len in + ignore ([%bin_write: t] b ~pos:0 l : int); + let s = Bytes.create len in + Bin_prot.Common.blit_buf_string ~src_pos:0 b ~dst_pos:0 s ~len; + Out_channel.with_open_bin "data" @@ fun ch -> Out_channel.output_bytes ch s) + else + let s = In_channel.with_open_bin "data" @@ In_channel.input_all in + let len = String.length s in + let b = Bin_prot.Common.create_buf len in + Bin_prot.Common.blit_string_buf ~src_pos:0 s ~dst_pos:0 b ~len; + let t = Unix.gettimeofday () in + for _ = 0 to 4 do + ignore ([%bin_read: t] b ~pos_ref:(ref 0) : t) + done; + let t' = Unix.gettimeofday () in + Format.printf "%.2f@." (t' -. t) diff --git a/benchmarks/benchmark-others/bin_prot/dune b/benchmarks/benchmark-others/bin_prot/dune new file mode 100644 index 0000000000..3f60080847 --- /dev/null +++ b/benchmarks/benchmark-others/bin_prot/dune @@ -0,0 +1,10 @@ +(executables + (names bench) + (modes js wasm) + (js_of_ocaml + (flags --opt 2)) + (wasm_of_ocaml + (flags --opt 2)) + (preprocess + (pps ppx_bin_prot)) + (libraries unix)) diff --git a/benchmarks/benchmark-others/bin_prot/dune-project b/benchmarks/benchmark-others/bin_prot/dune-project new file mode 100644 index 0000000000..6ffa24dd94 --- /dev/null +++ b/benchmarks/benchmark-others/bin_prot/dune-project @@ -0,0 +1 @@ +(lang dune 3.19) diff --git a/benchmarks/benchmark-others/dune b/benchmarks/benchmark-others/dune new file mode 100644 index 0000000000..1ae7058fd2 --- /dev/null +++ b/benchmarks/benchmark-others/dune @@ -0,0 +1,3 @@ +; Ignore subdirectories + +(dirs) diff --git a/benchmarks/benchmark-others/lexifi-g2pp/COPYING b/benchmarks/benchmark-others/lexifi-g2pp/COPYING new file mode 100644 index 0000000000..94a9ed024d --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/benchmarks/benchmark-others/lexifi-g2pp/Makefile b/benchmarks/benchmark-others/lexifi-g2pp/Makefile new file mode 100644 index 0000000000..c7358d6037 --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/Makefile @@ -0,0 +1,18 @@ +.PHONY: bench perform + +export NAME=Others +export SUBNAME=lexifi-g2pp + +SHELL=/bin/bash -o pipefail + +bench: + @date -u +"%FT%TZ - $(NAME)/$(SUBNAME): starting" + dune build --profile release --root . + $(MAKE) perform COMPILER=js_of_ocaml SCRIPT=_build/default/main.bc.js KIND=js + $(MAKE) perform COMPILER=wasm_of_ocaml SCRIPT=_build/default/main.bc.wasm.js KIND=wasm + @date -u +"%FT%TZ - $(NAME)/$(SUBNAME): done" + +perform: + /usr/bin/time -f '{"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT) 2>&1 1> /dev/null | \ + sh ../../utils/format_metrics.sh exec | \ + sh ../../utils/aggregate.sh $(KIND) diff --git a/benchmarks/benchmark-others/lexifi-g2pp/README.txt b/benchmarks/benchmark-others/lexifi-g2pp/README.txt new file mode 100644 index 0000000000..8b7a131bd1 --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/README.txt @@ -0,0 +1,41 @@ +########################################################################### +# Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published # +# by the Free Software Foundation, either version 3 of the License, # +# or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +########################################################################### + +This directory contains a simplified and stripped down version of +LexiFi's calibration routine for the G2++ model, as defined in Theorem +6.14 of http://web.mst.edu/~bohner/fim-10/fim-chap6.pdf. + +This program is released as an example of typical numerical code +implemented in OCaml, in order to provide a realistic benchmark to +people working on optimizing the OCaml compiler. + +Usage: simply type 'make'. This will compile and run a test program. +The code requires OCaml 4.00 or above. + +The calibration routine is based on least-square optimization, using +the DE algorithm (in LexiFi's version, this global optimizer is +followed by a local one). The optimizer is implemented in the +Optimization module. + +The Math module provides: + - an approximation formula for the cumulative distribution function + for a normal variate + - a root finder (using Brent's algorithm) + - coefficients for a Gaussian quadrature (for quick integral based + on sampling a few points of the integrand) + +The G2pp_calibration module implements the core calibration routine. diff --git a/benchmarks/benchmark-others/lexifi-g2pp/date.ml b/benchmarks/benchmark-others/lexifi-g2pp/date.ml new file mode 100644 index 0000000000..5508cf17fa --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/date.ml @@ -0,0 +1,124 @@ +(***************************************************************************) +(* Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. *) +(* *) +(* This program is free software: you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published *) +(* by the Free Software Foundation, either version 3 of the License, *) +(* or (at your option) any later version. *) +(* *) +(* This program is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU General Public License for more details. *) +(* *) +(* You should have received a copy of the GNU General Public License *) +(* along with this program. If not, see . *) +(***************************************************************************) + +type date = int + +type gregorian = { + year : int; + month : int; + day : int; + hour : int; + minute : int + } + +let hours_in_day = 24 +let minutes_in_day = hours_in_day * 60 +let fminutes_in_day = float minutes_in_day +let minutes_to_noon = (hours_in_day / 2) * 60 + +(* + Communications of the ACM by Henry F. Fliegel and Thomas C. Van Flandern, + ``A Machine Algorithm for Processing Calendar Dates'', + CACM, volume 11, number 10, October 1968, p. 657 +*) +let date_of_gregorian {year = y; month = m; day = d; hour = hr; minute = mn} = + ( + (match m with + | 1 | 2 -> + ( 1461 * ( y + 4800 - 1 ) ) / 4 + + ( 367 * ( m + 10 ) ) / 12 - + ( 3 * ( ( y + 4900 - 1 ) / 100 ) ) / 4 + | _ -> + ( 1461 * ( y + 4800 ) ) / 4 + + ( 367 * ( m - 2 ) ) / 12 - + ( 3 * ( ( y + 4900 ) / 100 ) ) / 4) + + d - 32075 - 2444238) * minutes_in_day + + hr * 60 + mn + +let gregorian_of_date minutes_since_epoch = + let jul = minutes_since_epoch / minutes_in_day in + let l = jul + 68569 + 2444238 in + let n = ( 4 * l ) / 146097 in + let l = l - ( 146097 * n + 3 ) / 4 in + let i = ( 4000 * ( l + 1 ) ) / 1461001 in + let l = l - ( 1461 * i ) / 4 + 31 in + let j = ( 80 * l ) / 2447 in + let d = l - ( 2447 * j ) / 80 in + let l = j / 11 in + let m = j + 2 - ( 12 * l ) in + let y = 100 * ( n - 49 ) + i + l in + let daytime = minutes_since_epoch mod minutes_in_day in + if daytime = minutes_to_noon + then {year = y; month = m; day = d; hour = 12; minute = 0} + else {year = y; month = m; day = d; hour = daytime / 60; minute = daytime mod 60} + +let check_date ~year ~month ~day = + 1 <= day && + 1 <= month && month <= 12 && + 1980 <= year && year <= 2299 && + begin + day <= 28 || + match month with + | 2 -> day = 29 && year mod 4 = 0 && (year = 2000 || (year mod 100 <> 0)) + (* we don't check y mod 400 because 2000 is ok and we don't support + neither 1600 nor 2400. *) + | 4 | 6 | 9 | 11 -> day <= 30 + | _ -> day <= 31 + end + +let of_string s : date = + let sub ofs len = + let rec sub acc ofs len = + if len = 0 + then acc + else sub (acc * 10 + int_of_char(String.unsafe_get s ofs) - 48) (ofs + 1) (len - 1) + in + sub (int_of_char(String.unsafe_get s ofs) - 48) (ofs + 1) (len - 1) + in + if String.length s < 10 then invalid_arg "date_of_string"; + let year = sub 0 4 in + let month = sub 5 2 in + let day = sub 8 2 in + (* minimal coherence check of the date, just what is needed more than what the lexer is doing *) + if check_date ~year ~month ~day then + if String.length s < 16 + then date_of_gregorian{year; month; day; hour=12; minute=0} + else date_of_gregorian{year; month; day; hour=sub 11 2; minute=sub 14 2} + else invalid_arg "date_of_string" + +let days_between t1 t2 = + float (t1 - t2) /. fminutes_in_day + +let act_365 t1 t2 = (days_between t1 t2) /. 365. + +let leap y = (y mod 4 = 0) && ((y mod 100 <> 0) || (y mod 400 = 0)) +let end_of_month year month = + match month with + | 2 when leap year -> 29 + | 2 -> 28 + | 4 | 6 | 9 | 11 -> 30 + | _ -> 31 +let add_months date nbmonths = + let {year = y; month = m; day = d; hour = _; minute = _;} as date = gregorian_of_date date in + let m = m + nbmonths in + let y, m = y + (m-1) / 12, ((m-1) mod 12) + 1 in + let y, m = if m <= 0 then y - 1, m + 12 else y, m in + date_of_gregorian {date with year = y; month = m; day = min d (end_of_month y m)} +let add_years date nbyears = add_months date (nbyears * 12) + +let max_date = of_string "2299-12-31T23:59:59" +let min_date = of_string "1980-01-01T12:00:00" diff --git a/benchmarks/benchmark-others/lexifi-g2pp/date.mli b/benchmarks/benchmark-others/lexifi-g2pp/date.mli new file mode 100644 index 0000000000..ab8dd9ad1a --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/date.mli @@ -0,0 +1,25 @@ +(***************************************************************************) +(* Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. *) +(* *) +(* This program is free software: you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published *) +(* by the Free Software Foundation, either version 3 of the License, *) +(* or (at your option) any later version. *) +(* *) +(* This program is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU General Public License for more details. *) +(* *) +(* You should have received a copy of the GNU General Public License *) +(* along with this program. If not, see . *) +(***************************************************************************) + +type date +val max_date: date +val min_date: date +val of_string: string -> date +val days_between: date -> date -> float +val act_365: date -> date -> float +val add_months: date -> int -> date +val add_years: date -> int -> date diff --git a/benchmarks/benchmark-others/lexifi-g2pp/dune b/benchmarks/benchmark-others/lexifi-g2pp/dune new file mode 100644 index 0000000000..a7292ca365 --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/dune @@ -0,0 +1,7 @@ +(executable + (name main) + (js_of_ocaml + (flags --opt 2)) + (wasm_of_ocaml + (flags --opt 2)) + (modes js wasm)) diff --git a/benchmarks/benchmark-others/lexifi-g2pp/dune-project b/benchmarks/benchmark-others/lexifi-g2pp/dune-project new file mode 100644 index 0000000000..6ffa24dd94 --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/dune-project @@ -0,0 +1 @@ +(lang dune 3.19) diff --git a/benchmarks/benchmark-others/lexifi-g2pp/g2pp_calibration.ml b/benchmarks/benchmark-others/lexifi-g2pp/g2pp_calibration.ml new file mode 100644 index 0000000000..8c70e96456 --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/g2pp_calibration.ml @@ -0,0 +1,294 @@ +(***************************************************************************) +(* Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. *) +(* *) +(* This program is free software: you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published *) +(* by the Free Software Foundation, either version 3 of the License, *) +(* or (at your option) any later version. *) +(* *) +(* This program is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU General Public License for more details. *) +(* *) +(* You should have received a copy of the GNU General Public License *) +(* along with this program. If not, see . *) +(***************************************************************************) + +(* A 2-factor interest-rate model. Reference book: Brigo and Mercurio "Interest Rate Models" 2005 *) + +open Date + +let pi = 2. *. asin 1. + +type extended_swaption = + { + maturity: date; + strike: float; + swap_schedule: (date * date) list; + } + +type swap_frequency = + | Freq_3M + | Freq_6M + | Freq_1Y + +type swaption = + { + swaption_maturity_in_year: int; + swap_frequency: swap_frequency; + swap_term_in_year: int; + } + +let extended_swaption_of_swaption ~today ~zc {swaption_maturity_in_year; swap_frequency; swap_term_in_year} = + let maturity = add_years today swaption_maturity_in_year in + let frq = + match swap_frequency with + | Freq_3M -> 3 + | Freq_6M -> 6 + | Freq_1Y -> 12 + in + let nschedule = 12 * swap_term_in_year / frq in + let swap_schedule = Array.init nschedule (fun i -> add_months maturity (i * frq), add_months maturity ((i + 1) * frq)) in + let swap_schedule = Array.to_list swap_schedule in + let lvl, t0, tn = + List.fold_left + (fun (acc_lvl, acc_t0, acc_tn) (tf, tp) -> + acc_lvl +. zc tp *. (act_365 tp tf), min acc_t0 tf, max acc_tn tp + ) (0., max_date, min_date) swap_schedule + in + let strike = (zc t0 -. zc tn) /. lvl in (* atm strike *) + {maturity; swap_schedule; strike} + + +type parameters = + { + g_a : float; + g_b : float; + g_sigma : float; + g_nu : float;(* nu is eta in Brigo and Mercurio *) + g_rho : float; + } + +(* Places with ** comments should take account of sigma=0 case *) + +let b_fun z tau = (* ** *) + (1. -. exp (-. z *. tau)) /. z + +exception Sdomain + +(* \var(\int_t^T [x(u)+y(u)]du) *) +let bigv {g_a; g_b; g_rho; g_nu; g_sigma} tau = (* 4.10 p 135 *) + let t sigma x = + let expxtau = exp (-. x *. tau) in (* ** *) + let exp2xtau = expxtau *. expxtau in (* ** *) + sigma *. sigma /. (x *. x) *. + (tau +. 2. /. x *. expxtau -. 1. /. (2. *. x) *. exp2xtau -. 3. /. (2. *. x)) + in + let t1 = t g_sigma g_a in + let t2 = t g_nu g_b in + let ba = b_fun g_a tau in + let bb = b_fun g_b tau in + let t3 = (* ** *) + 2. *. g_rho *. g_nu *. g_sigma /. (g_a *. g_b) *. + (tau -. ba -. bb +. b_fun (g_a +. g_b) tau) + in + t1 +. t2 +. t3, ba, bb + +(* x drift term in tmat-forward measure *) +let bigmx {g_a; g_b; g_rho; g_nu; g_sigma} today tmat s t = + let ts = act_365 t s in + let tmatt = act_365 tmat t in + let tmat0 = act_365 tmat today in + let tmats = act_365 tmat s in + let t0 = act_365 t today in + let s0 = act_365 s today in + (g_sigma *. g_sigma /. (g_a *. g_a) +. g_sigma *. g_rho *. g_nu /. (g_a *. g_b)) *. (1. -. exp (-. g_a *. ts)) -. + (g_sigma *. g_sigma /. (2. *. g_a *. g_a) *. (exp (-. g_a *. tmatt) -. exp (-. g_a *. (tmats +. ts)))) -. + g_rho *. g_sigma *. g_nu /. (g_b *. (g_a +. g_b)) *. (exp (-. g_b *. tmatt) -. exp (-. g_b *. tmat0 -. g_a *. t0 +. (g_a +. g_b) *. s0)) + +(* y drift term in tmat-forward measure *) +let bigmy {g_a; g_b; g_rho; g_nu; g_sigma} today tmat s t = + let ts = act_365 t s in + let tmatt = act_365 tmat t in + let tmat0 = act_365 tmat today in + let tmats = act_365 tmat s in + let t0 = act_365 t today in + let s0 = act_365 s today in + (g_nu *. g_nu /. (g_b *. g_b) +. g_sigma *. g_rho *. g_nu /. (g_a *. g_b)) *. (1. -. exp (-. g_b *. ts)) -. + (g_nu *. g_nu /. (2. *. g_b *. g_b) *. (exp (-. g_b *. tmatt) -. exp (-. g_b *. (tmats +. ts)))) -. + g_rho *. g_sigma *. g_nu /. (g_a *. (g_a +. g_b)) *. (exp (-. g_a *. tmatt) -. exp (-. g_a *. tmat0 -. g_b *. t0 +. (g_a +. g_b) *. s0)) + +let x_quadrature, w_quadrature = Math.Gaussian_quadrature.gauss_hermite_coefficients +let nquadrature = Array.length x_quadrature + +let pricer_of_swaption ~today ~zc swaption = + let swaption = extended_swaption_of_swaption ~today ~zc swaption in + let maturity = swaption.maturity in + let strike = swaption.strike in + let tmat0 = act_365 maturity today in + let schedulei = Array.of_list swaption.swap_schedule in + let lastindex = Array.length schedulei - 1 in + let taui = Array.map (fun (start_date, end_date) -> act_365 end_date start_date) schedulei in + let ci = + Array.mapi + (fun i tau -> if i = lastindex then 1. +. tau *. strike else tau *. strike) + taui + in + let n_schedi = Array.length schedulei in + let bai = Array.make n_schedi 0. in + let bbi = Array.make n_schedi 0. in + let aici = Array.make n_schedi 0. in + let log_aici = Array.make n_schedi 0. in + let scales = Array.make n_schedi 0. in + let t1_cst = Array.make n_schedi 0. in + let scale = Array.make n_schedi 0. in + fun params -> + let {g_a; g_b; g_rho; g_nu; g_sigma} = params in + let v0_mat, _, _ = bigv params (act_365 maturity today) in + let zc_mat = zc maturity in + let a_fun end_date = (* defined top p138 *) + let v0_end, _, _ = bigv params (act_365 end_date today) in + let vt_end, ba, bb = bigv params (act_365 end_date maturity) in + zc end_date /. zc_mat *. exp (0.5 *. (vt_end -. v0_end +. v0_mat)), ba, bb + in + let sigmax = g_sigma *. sqrt (b_fun (2. *. g_a) tmat0) in + let sigmay = g_nu *. sqrt (b_fun (2. *. g_b) tmat0) in + let rhoxy = g_rho *. g_sigma *. g_nu /. (sigmax *. sigmay) *. (b_fun (g_a +. g_b) tmat0) in + let rhoxyc = 1. -. rhoxy *. rhoxy in + let rhoxycs = sqrt rhoxyc in + let t2 = rhoxy /. (sigmax *. rhoxycs) in + let sigmay_rhoxycs = sigmay *. rhoxycs in + let t4 = rhoxy *. sigmay /. sigmax in + let mux = -. bigmx params today maturity today maturity in + let muy = -. bigmy params today maturity today maturity in + for i = 0 to n_schedi - 1 do + let a, ba, bb = a_fun (snd schedulei.(i)) in + let x = ci.(i) *. a in + let log_ac = log x in + aici.(i) <- x; + log_aici.(i) <- log_ac; + bai.(i) <- ba; + bbi.(i) <- bb; + + let t3 = muy -. 0.5 *. rhoxyc *. sigmay *. sigmay *. bb in + let cst = bb *. (mux *. t4 -. t3) in + t1_cst.(i) <- x *. exp cst; + scale.(i) <- -. (ba +. bb *. t4); + done; + + let k = (-3.71901648545568) in (* ugaussian_Pinv 1e-4 *) + let exact_yhat x = + (* y_lo x <= yhat x <= y_up x*) + let lo = ref neg_infinity in + let up = ref 0. in + for i = 0 to n_schedi - 1 do + let baix = bai.(i) *. x in + lo := max !lo ((log_aici.(i) -. baix) /. bbi.(i)); + up := !up +. aici.(i) *. exp (-. baix) + done; + let lo = !lo and s_up = !up in + if n_schedi = 1 then lo + else + let open Math.Rootfinder in + let up = + let log_s = log s_up in + let tmp = log_s /. bbi.(n_schedi - 1) in + if tmp <= 0. then tmp + else let tmp = log_s /. bbi.(0) in if 0. <= tmp then tmp + (* This case happens when all ai * ci are too close to 0. or x to high => to_solve x y is close to -1 for all y, + thus the root is reached for y negative with high absolute value (tosolve x is a decreasing function of y) *) + else neg_infinity + in + let yl = lo -. 1e-5 in + let yu = up +. 1e-5 in + (* y01 x = y0, y1 / phi(h_i(x, y0)) <= epsilon, 1 - phi(h_i(x, y1)) <= epsilon *) + let y0 = sigmay *. (rhoxy *. (x -. mux) /. sigmax +. k *. rhoxycs) -. rhoxyc /. g_b +. muy in + let y1 = sigmay *. (rhoxy *. (x -. mux) /. sigmax -. k *. rhoxycs) +. muy in + if y1 <= yl then y1 +. 1. (* yhat is greater than y1 => 1 - phi(h_i(x, yhat)) < epsilon *) + else if yu <= y0 then y0 -. 1. (* yhat is lower than y0 => phi(h_i(x, yhat)) < epsilon *) + else try + for i = 0 to n_schedi - 1 do + scales.(i) <- aici.(i) *. exp (-. bai.(i) *. x); + done; + let to_solve yhat = (* eqn at bottom p148 *) + let sum = ref (-1.) in + for i = 0 to n_schedi - 1 do + sum := !sum +. scales.(i) *. exp (-. bbi.(i) *. yhat); + done; + assert(!sum = !sum); + !sum + in + brent (max yl y0) (min yu y1) to_solve 1e-4 + with + | Rootfinder NotbracketedBelow -> y0 -. 1. + | Rootfinder NotbracketedAbove -> y1 +. 1. + in + let yhat = + let eps = 0.5 *. sigmax in + let f = exact_yhat mux in + let df = 0.5 *. (exact_yhat (mux +. eps) -. exact_yhat (mux -. eps)) /. eps in + fun x -> f +. df *. (x -. mux) + in + + let integrand x = + let t1 = exp (-. 0.5 *. ((x -. mux) /. sigmax) ** 2.) in + let yhat = yhat x in + let h1 = + let t1 = (yhat -. muy) /. sigmay_rhoxycs in + t1 -. t2 *. (x -. mux) + in + let t2 = Math.ugaussian_P (-.h1) in + let acc = ref 0. in + for i = 0 to n_schedi - 1 do + let h2 = h1 +. bbi.(i) *. sigmay_rhoxycs in + acc := !acc +. t1_cst.(i) *. exp (scale.(i) *. x) *. Math.ugaussian_P (-.h2) + done; + t1 *. (t2 -. !acc) + in + let integral = + let sqrt2sigmax = sqrt 2. *. sigmax in + let sum = ref 0. in + for i = 0 to nquadrature - 1 do + sum := !sum +. w_quadrature.(i) *. integrand (sqrt2sigmax *. x_quadrature.(i) +. mux) + done; + !sum /. (sqrt pi) + in + zc_mat *. integral + +let black_price ~today ~zc swaption vol = + let swaption = extended_swaption_of_swaption ~today ~zc swaption in + let {swap_schedule; strike; maturity; _} = swaption in + let sqrtt = act_365 maturity today in + let lvl, t0, tn = + List.fold_left + (fun (acc_lvl, acc_t0, acc_tn) (tf, tp) -> + acc_lvl +. zc tp *. (act_365 tp tf), min acc_t0 tf, max acc_tn tp + ) (0., max_date, min_date) swap_schedule + in + let s0 = (zc t0 -. zc tn) /. lvl in + let d1 = log (s0 /. strike) /. (vol *. sqrtt) +. 0.5 *. vol *. sqrtt in + let d2 = d1 -. vol *. sqrtt in + lvl *. (s0 *. Math.ugaussian_P d1 -. strike *. Math.ugaussian_P d2) + +let calibrate ?feedback ~max_global ~today ~swaption_quotes ~variables ~zc () = + assert(Array.length variables = 5); + let quotes = Array.map (fun (sw, q) -> black_price ~today ~zc sw q) swaption_quotes in + let parameters_of_vector x = + let g_a = x.(0) in + let g_b = x.(1) in + let g_sigma = x.(2) in + let g_nu = x.(3) in + let g_rho = x.(4) in + {g_a; g_b; g_sigma; g_nu; g_rho} + in + let pricers = Array.map (fun (sw, _) -> pricer_of_swaption ~today ~zc sw) swaption_quotes in + + let pricer params h = + try + for i = 0 to Array.length pricers - 1 do + h.(i) <- pricers.(i) params + done + with Sdomain -> raise Optimization.Infeasible + in + Optimization.least_squares ?feedback ~max_global ~parameters_of_vector ~pricer ~variables quotes diff --git a/benchmarks/benchmark-others/lexifi-g2pp/g2pp_calibration.mli b/benchmarks/benchmark-others/lexifi-g2pp/g2pp_calibration.mli new file mode 100644 index 0000000000..a88d7e228c --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/g2pp_calibration.mli @@ -0,0 +1,63 @@ +(***************************************************************************) +(* Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. *) +(* *) +(* This program is free software: you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published *) +(* by the Free Software Foundation, either version 3 of the License, *) +(* or (at your option) any later version. *) +(* *) +(* This program is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU General Public License for more details. *) +(* *) +(* You should have received a copy of the GNU General Public License *) +(* along with this program. If not, see . *) +(***************************************************************************) + +(** G2++ 2-factors affine interest rate model. See Brigo and Mercurio + (2006), chapter 4.2 p142 for more details. *) + +open Date + +type swap_frequency = + | Freq_3M + | Freq_6M + | Freq_1Y + +type swaption = + { + swaption_maturity_in_year: int; + swap_frequency: swap_frequency; + swap_term_in_year: int; + } + +type parameters = + { + g_a : float; + g_b : float; + g_sigma : float; + g_nu : float; + g_rho : float; + } +(** A point in the calibration space of the G2++ model. + The model parameters of the G2++ model, with mean reversion parameters + [a] and [b], volatility parameters [sigma] and [nu] and correlation + coefficient [rho]. *) + +exception Sdomain +(** This exception is raised by [swaption] if the numerical integration used in the + price calculation does not converge (indicating that the model parameters are + malformed). *) + +val pricer_of_swaption: today: date -> zc:(date -> float) -> swaption -> (parameters -> float) +val black_price: today: date -> zc: (date -> float) -> swaption -> (float -> float) + +val calibrate: + ?feedback:(string -> unit) -> + max_global:int -> + today: date -> + swaption_quotes: (swaption * float) array -> + variables:Optimization.optimization_variable array -> + zc: (date -> float) -> + unit -> parameters Optimization.calibration_result diff --git a/benchmarks/benchmark-others/lexifi-g2pp/main.ml b/benchmarks/benchmark-others/lexifi-g2pp/main.ml new file mode 100644 index 0000000000..b7c5928ce7 --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/main.ml @@ -0,0 +1,263 @@ +(***************************************************************************) +(* Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. *) +(* *) +(* This program is free software: you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published *) +(* by the Free Software Foundation, either version 3 of the License, *) +(* or (at your option) any later version. *) +(* *) +(* This program is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU General Public License for more details. *) +(* *) +(* You should have received a copy of the GNU General Public License *) +(* along with this program. If not, see . *) +(***************************************************************************) + +open G2pp_calibration +open Date + +let swaption_quotes = + [| + {swaption_maturity_in_year = 1; swap_term_in_year = 1; swap_frequency = Freq_6M}, 1.052; + {swaption_maturity_in_year = 2; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.81485; + {swaption_maturity_in_year = 3; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.6165; + {swaption_maturity_in_year = 4; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.46995; + {swaption_maturity_in_year = 5; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.38295; + {swaption_maturity_in_year = 6; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.3325; + {swaption_maturity_in_year = 7; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.3016; + {swaption_maturity_in_year = 8; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.2815; + {swaption_maturity_in_year = 9; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.26435; + {swaption_maturity_in_year = 10; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.2496; + {swaption_maturity_in_year = 15; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.2516; + {swaption_maturity_in_year = 20; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.28835; + {swaption_maturity_in_year = 25; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.27155; + {swaption_maturity_in_year = 30; swap_term_in_year = 1; swap_frequency = Freq_6M}, 0.23465; + {swaption_maturity_in_year = 1; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.61445; + {swaption_maturity_in_year = 2; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.54805; + {swaption_maturity_in_year = 3; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.46795; + {swaption_maturity_in_year = 4; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.3919; + {swaption_maturity_in_year = 5; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.3434; + {swaption_maturity_in_year = 6; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.3083; + {swaption_maturity_in_year = 7; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.28655; + {swaption_maturity_in_year = 8; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.2697; + {swaption_maturity_in_year = 9; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.25775; + {swaption_maturity_in_year = 10; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.2443; + {swaption_maturity_in_year = 15; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.26495; + {swaption_maturity_in_year = 20; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.28195; + {swaption_maturity_in_year = 25; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.26845; + {swaption_maturity_in_year = 30; swap_term_in_year = 2; swap_frequency = Freq_6M}, 0.20995; + {swaption_maturity_in_year = 1; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.5835; + {swaption_maturity_in_year = 2; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.49255; + {swaption_maturity_in_year = 3; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.42825; + {swaption_maturity_in_year = 4; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.3695; + {swaption_maturity_in_year = 5; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.329; + {swaption_maturity_in_year = 6; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.3022; + {swaption_maturity_in_year = 7; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.28165; + {swaption_maturity_in_year = 8; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.26615; + {swaption_maturity_in_year = 9; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.25485; + {swaption_maturity_in_year = 10; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.24375; + {swaption_maturity_in_year = 15; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.2718; + {swaption_maturity_in_year = 20; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.28135; + {swaption_maturity_in_year = 25; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.26865; + {swaption_maturity_in_year = 30; swap_term_in_year = 3; swap_frequency = Freq_6M}, 0.2131; + {swaption_maturity_in_year = 1; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.5415; + {swaption_maturity_in_year = 2; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.46235; + {swaption_maturity_in_year = 3; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.403; + {swaption_maturity_in_year = 4; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.3559; + {swaption_maturity_in_year = 5; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.3232; + {swaption_maturity_in_year = 6; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.29675; + {swaption_maturity_in_year = 7; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.27715; + {swaption_maturity_in_year = 8; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.26385; + {swaption_maturity_in_year = 9; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.254; + {swaption_maturity_in_year = 10; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.2454; + {swaption_maturity_in_year = 15; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.27845; + {swaption_maturity_in_year = 20; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.2821; + {swaption_maturity_in_year = 25; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.2678; + {swaption_maturity_in_year = 30; swap_term_in_year = 4; swap_frequency = Freq_6M}, 0.2131; + {swaption_maturity_in_year = 1; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.517; + {swaption_maturity_in_year = 2; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.446; + {swaption_maturity_in_year = 3; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.3903; + {swaption_maturity_in_year = 4; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.34755; + {swaption_maturity_in_year = 5; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.3166; + {swaption_maturity_in_year = 6; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.29305; + {swaption_maturity_in_year = 7; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.2745; + {swaption_maturity_in_year = 8; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.2639; + {swaption_maturity_in_year = 9; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.2534; + {swaption_maturity_in_year = 10; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.2499; + {swaption_maturity_in_year = 15; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.28315; + {swaption_maturity_in_year = 20; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.2825; + {swaption_maturity_in_year = 25; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.277; + {swaption_maturity_in_year = 30; swap_term_in_year = 5; swap_frequency = Freq_6M}, 0.21175; + {swaption_maturity_in_year = 1; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.478; + {swaption_maturity_in_year = 2; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.42105; + {swaption_maturity_in_year = 3; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.37715; + {swaption_maturity_in_year = 4; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.3378; + {swaption_maturity_in_year = 5; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.311; + {swaption_maturity_in_year = 6; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.2895; + {swaption_maturity_in_year = 7; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.2745; + {swaption_maturity_in_year = 8; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.264; + {swaption_maturity_in_year = 9; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.2573; + {swaption_maturity_in_year = 10; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.25475; + {swaption_maturity_in_year = 15; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.28815; + {swaption_maturity_in_year = 20; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.28195; + {swaption_maturity_in_year = 25; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.26015; + {swaption_maturity_in_year = 30; swap_term_in_year = 6; swap_frequency = Freq_6M}, 0.2097; + {swaption_maturity_in_year = 1; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.452; + {swaption_maturity_in_year = 2; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.4074; + {swaption_maturity_in_year = 3; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.368; + {swaption_maturity_in_year = 4; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.3307; + {swaption_maturity_in_year = 5; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.30645; + {swaption_maturity_in_year = 6; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.2877; + {swaption_maturity_in_year = 7; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.27475; + {swaption_maturity_in_year = 8; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.2664; + {swaption_maturity_in_year = 9; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.26155; + {swaption_maturity_in_year = 10; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.26035; + {swaption_maturity_in_year = 15; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.292; + {swaption_maturity_in_year = 20; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.2825; + {swaption_maturity_in_year = 25; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.25685; + {swaption_maturity_in_year = 30; swap_term_in_year = 7; swap_frequency = Freq_6M}, 0.2081; + {swaption_maturity_in_year = 1; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.43395; + {swaption_maturity_in_year = 2; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.39445; + {swaption_maturity_in_year = 3; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.35885; + {swaption_maturity_in_year = 4; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.3281; + {swaption_maturity_in_year = 5; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.30395; + {swaption_maturity_in_year = 6; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.28745; + {swaption_maturity_in_year = 7; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.2767; + {swaption_maturity_in_year = 8; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.27065; + {swaption_maturity_in_year = 9; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.26625; + {swaption_maturity_in_year = 10; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.26625; + {swaption_maturity_in_year = 15; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.2921; + {swaption_maturity_in_year = 20; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.2814; + {swaption_maturity_in_year = 25; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.25265; + {swaption_maturity_in_year = 30; swap_term_in_year = 8; swap_frequency = Freq_6M}, 0.2083; + {swaption_maturity_in_year = 1; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.42285; + {swaption_maturity_in_year = 2; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.3857; + {swaption_maturity_in_year = 3; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.3521; + {swaption_maturity_in_year = 4; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.3239; + {swaption_maturity_in_year = 5; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.30285; + {swaption_maturity_in_year = 6; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.2895; + {swaption_maturity_in_year = 7; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.2799; + {swaption_maturity_in_year = 8; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.27485; + {swaption_maturity_in_year = 9; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.2712; + {swaption_maturity_in_year = 10; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.27205; + {swaption_maturity_in_year = 15; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.29205; + {swaption_maturity_in_year = 20; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.27855; + {swaption_maturity_in_year = 25; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.24945; + {swaption_maturity_in_year = 30; swap_term_in_year = 9; swap_frequency = Freq_6M}, 0.219; + {swaption_maturity_in_year = 1; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.41765; + {swaption_maturity_in_year = 2; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.38095; + {swaption_maturity_in_year = 3; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.34795; + {swaption_maturity_in_year = 4; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.3217; + {swaption_maturity_in_year = 5; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.30365; + {swaption_maturity_in_year = 6; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.2916; + {swaption_maturity_in_year = 7; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.2842; + {swaption_maturity_in_year = 8; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.27985; + {swaption_maturity_in_year = 9; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.2769; + {swaption_maturity_in_year = 10; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.2775; + {swaption_maturity_in_year = 15; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.306; + {swaption_maturity_in_year = 20; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.2763; + {swaption_maturity_in_year = 25; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.2458; + {swaption_maturity_in_year = 30; swap_term_in_year = 10; swap_frequency = Freq_6M}, 0.22; + {swaption_maturity_in_year = 1; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.37905; + {swaption_maturity_in_year = 2; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.35465; + {swaption_maturity_in_year = 3; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.33505; + {swaption_maturity_in_year = 4; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.31725; + {swaption_maturity_in_year = 5; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.3008; + {swaption_maturity_in_year = 6; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.29075; + {swaption_maturity_in_year = 7; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.28365; + {swaption_maturity_in_year = 8; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.2787; + {swaption_maturity_in_year = 9; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.27385; + {swaption_maturity_in_year = 10; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.2709; + {swaption_maturity_in_year = 15; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.2689; + {swaption_maturity_in_year = 20; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.24225; + {swaption_maturity_in_year = 25; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.2096; + {swaption_maturity_in_year = 30; swap_term_in_year = 15; swap_frequency = Freq_6M}, 0.18285; + {swaption_maturity_in_year = 1; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.37975; + {swaption_maturity_in_year = 2; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.3605; + {swaption_maturity_in_year = 3; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.3407; + {swaption_maturity_in_year = 4; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.321; + {swaption_maturity_in_year = 5; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.3063; + {swaption_maturity_in_year = 6; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.29315; + {swaption_maturity_in_year = 7; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.28395; + {swaption_maturity_in_year = 8; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.2777; + {swaption_maturity_in_year = 9; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.27205; + {swaption_maturity_in_year = 10; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.26675; + {swaption_maturity_in_year = 15; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.24875; + {swaption_maturity_in_year = 20; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.21735; + {swaption_maturity_in_year = 25; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.1939; + {swaption_maturity_in_year = 30; swap_term_in_year = 20; swap_frequency = Freq_6M}, 0.17205; + {swaption_maturity_in_year = 1; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.38115; + {swaption_maturity_in_year = 2; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.3627; + {swaption_maturity_in_year = 3; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.34425; + {swaption_maturity_in_year = 4; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.3222; + {swaption_maturity_in_year = 5; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.3084; + {swaption_maturity_in_year = 6; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.2941; + {swaption_maturity_in_year = 7; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.28285; + {swaption_maturity_in_year = 8; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.2751; + {swaption_maturity_in_year = 9; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.2663; + {swaption_maturity_in_year = 10; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.26055; + {swaption_maturity_in_year = 15; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.2338; + {swaption_maturity_in_year = 20; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.20735; + {swaption_maturity_in_year = 25; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.1823; + {swaption_maturity_in_year = 30; swap_term_in_year = 25; swap_frequency = Freq_6M}, 0.1686; + {swaption_maturity_in_year = 1; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.38285; + {swaption_maturity_in_year = 2; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.3633; + {swaption_maturity_in_year = 3; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.34125; + {swaption_maturity_in_year = 4; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.3188; + {swaption_maturity_in_year = 5; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.30305; + {swaption_maturity_in_year = 6; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.2888; + {swaption_maturity_in_year = 7; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.2748; + {swaption_maturity_in_year = 8; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.26725; + {swaption_maturity_in_year = 9; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.25985; + {swaption_maturity_in_year = 10; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.25165; + {swaption_maturity_in_year = 15; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.2267; + {swaption_maturity_in_year = 20; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.1989; + {swaption_maturity_in_year = 25; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.18115; + {swaption_maturity_in_year = 30; swap_term_in_year = 30; swap_frequency = Freq_6M}, 0.16355; + |] + +let named_variables = + let open Optimization in + [| + ("a", Optimize_value {lower_bound = 0.; upper_bound = 1.; initial_value = 0.02}); + ("b", Optimize_value {lower_bound = 0.; upper_bound = 1.; initial_value = 0.02}); + ("sigma", Optimize_value {lower_bound = 0.; upper_bound = 0.2; initial_value = 0.04}); + ("nu", Optimize_value {lower_bound = 0.; upper_bound = 0.2; initial_value = 0.01}); + ("rho", Optimize_value {lower_bound = -1.; upper_bound = 1.; initial_value = 0.0}); + |] + +let variables = Array.map snd named_variables + +let r = 0.03 +let today = Date.of_string "2012-01-01" + +let zc t = exp (-.0.03 *. (act_365 t today)) +let sq x = x *. x + +let () = + let {Optimization.cr_parameters = params; cr_root_mean_squared_error; cr_quoted_prices = _; cr_calibrated_prices = _} = + calibrate ~feedback: print_endline ~max_global: 2000 ~today ~swaption_quotes ~variables ~zc () + in + let {g_a; g_b; g_sigma; g_nu; g_rho} = params in + let l = Array.to_list swaption_quotes in + let rms = + List.fold_left + (fun acc (swaption, quote) -> + let g2pp_price = pricer_of_swaption ~today ~zc swaption params in + let market_price = black_price ~today ~zc swaption quote in + Printf.printf "%dY%dY Swaption Calibrated Price: %.2f Market Price: %.2f\n" swaption.swaption_maturity_in_year swaption.swap_term_in_year (10000. *. g2pp_price) (10000. *. market_price); + acc +. sq ((g2pp_price -. market_price) /. market_price) + ) 0. l; + in + let rms = 100. *. sqrt (rms /. (float (List.length l))) in + Printf.printf "a = %.5f, b = %.5f, sigma = %.5f, nu = %.5f, rho = %.5f\n" g_a g_b g_sigma g_nu g_rho; + Printf.printf "RMS = %.5f%%, re calculated RMS = %.5f%%\n" cr_root_mean_squared_error rms + +let () = + try + let fn = Sys.getenv "OCAML_GC_STATS" in + let oc = open_out fn in + Gc.print_stat oc + with _ -> () diff --git a/benchmarks/benchmark-others/lexifi-g2pp/math.ml b/benchmarks/benchmark-others/lexifi-g2pp/math.ml new file mode 100644 index 0000000000..281582493b --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/math.ml @@ -0,0 +1,96 @@ +(***************************************************************************) +(* Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. *) +(* *) +(* This program is free software: you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published *) +(* by the Free Software Foundation, either version 3 of the License, *) +(* or (at your option) any later version. *) +(* *) +(* This program is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU General Public License for more details. *) +(* *) +(* You should have received a copy of the GNU General Public License *) +(* along with this program. If not, see . *) +(***************************************************************************) + +let p, a1, a2, a3, a4, a5 = 0.3275911, 0.254829592, (-0.284496736), 1.421413741, (-1.453152027), 1.061405429 +let erf x = + let t = 1. /. (1. +. p *. x) in + let t2 = t *. t in + let t3 = t *. t2 in + let t4 = t *.t3 in + let t5 = t *. t4 in + 1. -. (a1 *. t +. a2 *. t2 +. a3 *. t3 +. a4 *. t4 +. a5 *. t5) *. exp (-.x *. x) + +(** Unit gaussian CDF. *) +let ugaussian_P x = + let u = x /. sqrt 2. in + let erf = if u < 0. then -.erf (-.u) else erf u in + 0.5 *. (1. +. erf) + +module Rootfinder = struct + type error = + | NotbracketedBelow + | NotbracketedAbove + + let string_of_error = function + | NotbracketedBelow -> "Interval borders have both negative values." + | NotbracketedAbove -> "Interval borders have both positive values." + + exception Rootfinder of error + + let brent a b eval eps = + if a > b then invalid_arg "Math.brent: arguments should verify xlo <= xhi."; + let fa, fb = eval a, eval b in + if 0. < fa *. fb then raise(Rootfinder(if fa < 0. then NotbracketedBelow else NotbracketedAbove)); + assert (0. <= eps); + let maxit = 10_000 in + + let a, fa, b, fb = if abs_float fa < abs_float fb then b, fb, a, fa else a, fa, b, fb in + + (* The root is between a and b, such that |f(b)| < |f(a)| *) + let rec iter i ~a ~b ~c ~d ~fa ~fb ~fc mflag = + if abs_float (b -. a) < eps || fb = 0. || maxit < i then b (* stop condition *) + else + let s = + if fa <> fc && fb <> fc then + a *. fb *. fc /. ((fa -. fb) *. (fa -. fc)) +. b *. fa *. fc /. ((fb -. fa) *. (fb -. fc)) +. c *. fa *. fb /. ((fc -. fa) *. (fc -. fb)) (* inverse quadratic interpolation *) + else + b -. fb *. (b -. a) /. (fb -. fa) (* secant rule *) + in + let s, mflag = + if + (4. *. s < 3. *. a +. b || b < s) || + (mflag && 2. *. abs_float (s -. b) >= abs_float (b -. c)) || + (not mflag && 2. *. abs_float (s -. b) >= abs_float (c -. d)) || + (mflag && abs_float (b -. c) < eps) || + (not mflag && abs_float (c -. d) < eps) + then 0.5 *. (a +. b), true else s, false + in + let fs = eval s in + (* d <- c; c <- b; *) + if fa *. fs < 0. then (* in this case, b <- s *) + if abs_float fa < abs_float fs then iter (i + 1) ~a: s ~b: a ~c: b ~d: c ~fa: fs ~fb: fa ~fc: fb mflag (* switch a, b *) + else iter (i + 1) ~a ~b: s ~c: b ~d: c ~fa ~fb: fs ~fc: fb mflag + else (* in this case, a <- s *) + if abs_float fs < abs_float fb then iter (i + 1) ~a: b ~b: s ~c: b ~d: c ~fa: fb ~fb: fs ~fc: fb mflag (* switch a, b *) + else iter (i + 1) ~a: s ~b ~c: b ~d: c ~fa: fs ~fb ~fc: fb mflag + in + iter 0 ~a ~b ~c: a ~d: nan ~fa ~fb ~fc: fa true + +end + +module Gaussian_quadrature = + struct + let gauss_hermite_coefficients = + [| + 0.; 0.6568095668820999044613; -0.6568095668820997934390; -1.3265570844949334805563; 1.3265570844949330364670; 2.0259480158257567872226; + -2.0259480158257558990442; -2.7832900997816496513337; 2.7832900997816474308877; 3.6684708465595856630159; -3.6684708465595838866591 + |], + [| + 0.6547592869145917315876; 0.6609604194409607336169; 0.6609604194409606225946; 0.6812118810666693002887; 0.6812118810666689672217; 0.7219536247283847574252; + 0.7219536247283852015144; 0.8025168688510405656800; 0.8025168688510396775015; 1.0065267861723647957461; 1.0065267861723774522886 + |] + end diff --git a/benchmarks/benchmark-others/lexifi-g2pp/math.mli b/benchmarks/benchmark-others/lexifi-g2pp/math.mli new file mode 100644 index 0000000000..af7c3f122a --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/math.mli @@ -0,0 +1,49 @@ +(***************************************************************************) +(* Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. *) +(* *) +(* This program is free software: you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published *) +(* by the Free Software Foundation, either version 3 of the License, *) +(* or (at your option) any later version. *) +(* *) +(* This program is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU General Public License for more details. *) +(* *) +(* You should have received a copy of the GNU General Public License *) +(* along with this program. If not, see . *) +(***************************************************************************) + +val ugaussian_P : float -> float +(** The cumulative distribution function for a normal variate with mean 0 and + variance 1. [ugaussian_P x] returns the probability that a variate takes a + value less than or equal to [x]. *) + +module Rootfinder: sig + type error = + | NotbracketedBelow (** The function is below zero on both the given brackets. *) + | NotbracketedAbove (** The function is above zero on both the given brackets. *) + + val string_of_error: error -> string + (** Pretty-printing of error. *) + + exception Rootfinder of error + + val brent: float -> float -> (float -> float) -> float -> float +(** [brent xlo xhi f eps] finds a root of function [f] given that + it is bracketed by [xlo, xhi]. [eps] is the absolute error on the + returned root. Raises {!Rootfinder.Rootfinder} exception when an error is encountered. + The root is found using brent's method (http://en.wikipedia.org/wiki/Brent's_method). + Requires [xlo < xhi]. *) +end + +module Gaussian_quadrature: + sig + val gauss_hermite_coefficients: float array * float array + (** [gauss_hermite_coefficients nb_points] returns two arrays [x] and [w] such that + for all [f], the integral of [f] over \]-infty; infty\[ is approximated by \sum w_i f(x_i). + the approximation is good if [f(x)] is close to [exp(-x^2) * P(x)] with [P] a polynomial, and is exact + if [P] is a polynomial of degree less or equal to [2 * nb_points - 1] + *) + end diff --git a/benchmarks/benchmark-others/lexifi-g2pp/optimization.ml b/benchmarks/benchmark-others/lexifi-g2pp/optimization.ml new file mode 100644 index 0000000000..4df649285e --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/optimization.ml @@ -0,0 +1,254 @@ +(***************************************************************************) +(* Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. *) +(* *) +(* This program is free software: you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published *) +(* by the Free Software Foundation, either version 3 of the License, *) +(* or (at your option) any later version. *) +(* *) +(* This program is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU General Public License for more details. *) +(* *) +(* You should have received a copy of the GNU General Public License *) +(* along with this program. If not, see . *) +(***************************************************************************) + +(* Optimizations algorithm. *) + +type termination = + { + maxit: int; + maxf: int; + target: float; + } + +type status = + | Maxit_reached + | Maxf_reached + | Target_reached + +type result = + { + x0: float array; + f: float; + nb_feval: int; + status: status; + } + +let ( ** ) (x, f) r = match x with | None -> r | Some x -> f r x + +exception Infeasible + +let f_incr f ncalls x = + let f = + try + f x + with + | Infeasible -> infinity + in + incr ncalls; + f + +module Rand = Random.State + +module DE = + struct + type t = + { + np: int; (* Population size *) + cr: float; (* Crossover probability, in [0; 1] *) + } + + let default_parameters n = {np = min (10 * n) 40; cr = 0.9;} + + let parameters ?np ?cr n = + (cr, fun r cr -> {r with cr}) ** + (np, fun r np -> {r with np}) ** + default_parameters n + + let optimize {np; cr;} ~f ~lower_bounds ~upper_bounds ~call_back ~termination = + let n = Array.length lower_bounds in + let rng = Rand.make [| 0 |] in + let ncalls = ref 0 in + let f = f_incr f ncalls in + let {maxit; maxf; target;} = termination in + let fx = Array.make np 0. in + let fx0 = ref infinity in (* current min *) + let v = Array.make_matrix np n 0. in (* potential mutations *) + let best_idx = ref 0 in (* index of x0 in x *) + + (* initialize current population *) + let x = + Array.init np + (fun i -> + let x_i = Array.init n + (fun j -> + let blo = lower_bounds.(j) in + let db = upper_bounds.(j) -. blo in + blo +. db *. Rand.float rng 1.) + in + let f = f x_i in + fx.(i) <- f; + if f < !fx0 then + begin + best_idx := i; + fx0 := f; + call_back !ncalls f + end; + x_i) + in + + let x0 = Array.copy x.(!best_idx) in + let mutation difw i x_i v_i = + (* draw successively _different_ random integers in [0; np - 1] \ {i} *) + let drawn = ref [i] in + let range = ref (np - 1) in + let rand () = + let res = ref 0 in + let rec adjust v = function + | drawn :: others when drawn <= v -> drawn :: adjust (v + 1) others + | drawn -> res := v; v :: drawn + in + drawn := adjust (Rand.int rng !range) !drawn; + decr range; + x.(!res) + in + let x_r1 = if Rand.float rng 1. <= 0.5 then x.(!best_idx) else rand () in + let x_r2 = rand () in + let x_r3 = rand () in + let j0 = Rand.int rng n in + for j = 0 to n - 1 do + let v = + let aux = x_r1.(j) +. difw *. (x_r2.(j) -. x_r3.(j)) in + if (j = j0 || Rand.float rng 1. <= cr) && lower_bounds.(j) <= aux && aux <= upper_bounds.(j) then + aux + else + x_i.(j) + in + v_i.(j) <- v + done + in + let recombination () = + Array.iteri + (fun i v_i -> + let f = f v_i in + if f < fx.(i) then + begin + fx.(i) <- f; + Array.blit v_i 0 x.(i) 0 n; + if f < !fx0 then + begin + best_idx := i; + fx0 := f; + call_back !ncalls f; + Array.blit v_i 0 x0 0 n + end; + end; + ) + v + in + let rec iter nb_it = + let differential_weight = 0.5 +. Rand.float rng 0.5 in (* As recommanded on http://www.icsi.berkeley.edu/~storn/code.html#prac *) + Array.iteri (fun i x_i -> mutation differential_weight i x_i v.(i)) x; + recombination (); + let res status = {x0; f = !fx0; nb_feval = !ncalls; status} in + if !fx0 <= target then res Target_reached + else if maxf < !ncalls then res Maxf_reached + else if nb_it = 0 then res Maxit_reached + else iter (nb_it - 1) + in + iter maxit + end + +type range = + { + lower_bound: float; + upper_bound: float; + initial_value: float; + } + +type optimization_variable = + | Fixed_value of float + | Optimize_value of range + +type 'a calibration_result = + { + cr_parameters: 'a; + cr_root_mean_squared_error: float; (* Calibrated rms. *) + cr_quoted_prices: float array; (* i.e. quoted_prices. *) + cr_calibrated_prices: float array; (* Closed-form prices obtained with calibrated parameters. *) + } + +let least_squares + ?absolute + ?feedback + ~max_global + ~parameters_of_vector + ~pricer + ~variables + quotes + = + begin + match feedback with + | Some feedback -> feedback "Calibrating" + | _ -> () + end; + let free_var_index_to_var_index, strict_subset, x, lower_bounds, upper_bounds = + let _i, free_vars_to_vars, strict_subset, x, lo, up = + Array.fold_left + (fun (i, free_vars_to_vars, strict_subset, x, lo, up) -> function + | Fixed_value _ -> i + 1, free_vars_to_vars, true, x, lo, up + | Optimize_value{initial_value; lower_bound; upper_bound} -> i + 1, i :: free_vars_to_vars, strict_subset, initial_value :: x, lower_bound :: lo, upper_bound :: up + ) + (0, [], false, [], [], []) + variables + in + Array.of_list(List.rev free_vars_to_vars), strict_subset, x, Array.of_list(List.rev lo), Array.of_list(List.rev up) + in + let parameters_of_active_vars = match strict_subset with + | false -> parameters_of_vector + | true -> + let all_vars = Array.map (function | Fixed_value x -> x | Optimize_value _ -> nan) variables in + fun x -> + Array.iteri (fun i x -> all_vars.(free_var_index_to_var_index.(i)) <- x) x; + parameters_of_vector all_vars + in + let m = Array.length quotes in + let prices = Array.make m 0. in + let norm = match absolute with + | None -> fun acc price quote -> let rel = (price -. quote) /. quote in acc +. rel *. rel + | Some() -> fun acc price quote -> let dif = price -. quote in acc +. dif *. dif + in + let quotes_idx = Array.(init (length quotes) (fun i -> i)) in + let distance prices = Array.fold_left (fun acc i -> norm acc prices.(i) quotes.(i)) 0. quotes_idx in (* objective is L_2 norm *) + let rms_of_error = + let div = 10000. /. float_of_int m in + fun err -> sqrt (err *. div) in + (* Initial guess either from global optimization or argument of the calibration routine. *) + let x = + if max_global > 0 then + let call_back = + match feedback with + | None -> fun _ _ -> () + | Some f -> (fun evals dist -> Printf.ksprintf f "Global Optimizer Evals: %5i RMS: %12.8g%%" evals (rms_of_error dist)) + in + let f x = + pricer (parameters_of_active_vars x) prices; + distance prices + in + let {x0; _} = DE.optimize (DE.default_parameters (Array.length lower_bounds)) ~f ~lower_bounds ~upper_bounds ~call_back ~termination: {maxit = max_int; maxf = max_global; target = 0.;} in + x0 + else + Array.of_list(List.rev x) + in + let cr_quoted_prices = quotes in + let cr_parameters = parameters_of_active_vars x in + pricer cr_parameters prices; + { + cr_parameters; + cr_root_mean_squared_error = rms_of_error (distance prices); + cr_quoted_prices; + cr_calibrated_prices = prices; + } diff --git a/benchmarks/benchmark-others/lexifi-g2pp/optimization.mli b/benchmarks/benchmark-others/lexifi-g2pp/optimization.mli new file mode 100644 index 0000000000..5b7e1c1c61 --- /dev/null +++ b/benchmarks/benchmark-others/lexifi-g2pp/optimization.mli @@ -0,0 +1,124 @@ +(***************************************************************************) +(* Copyright (C) 2000-2013 LexiFi SAS. All rights reserved. *) +(* *) +(* This program is free software: you can redistribute it and/or modify *) +(* it under the terms of the GNU General Public License as published *) +(* by the Free Software Foundation, either version 3 of the License, *) +(* or (at your option) any later version. *) +(* *) +(* This program is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU General Public License for more details. *) +(* *) +(* You should have received a copy of the GNU General Public License *) +(* along with this program. If not, see . *) +(***************************************************************************) + +type termination = + { + maxit: int; + maxf: int; + target: float; + } + +type status = + | Maxit_reached + | Maxf_reached + | Target_reached + +type result = + { + x0: float array; + f: float; + nb_feval: int; + status: status; + } + +module DE: + (** Implementation based on Differential Evolution - A Simple and Efficient Heuristic for Global Optimization over Continuous Spaces, + Rainer Storn and Kenneth Price. + Implemented srategies is a mixture of DE/rand/1/bin and DE/best/1/bin. The mutatant is lambda *. DE/rand/1/bin +. (1. -. lambda) *. DE/best/1/bin + where lambda is randomly choosen for each generation. + *) + sig + type t + + val default_parameters: int -> t + + val parameters: ?np: int -> ?cr: float -> int -> t + end + +(** {2 Least Square Minimization} *) + +exception Infeasible +(** To be raised by optimization callback functions to indicate that a point is infeasible. *) + +type 'a calibration_result = + { + cr_parameters: 'a; + cr_root_mean_squared_error: float; + cr_quoted_prices: float array; + cr_calibrated_prices: float array; + } + (** General calibration result. It contains the model parameters of type ['a] + and some optional additional informations: + + - [cr_parameters]. The optimal model parameter set + + - [cr_root_mean_squared_error]. Root-mean-squared error of optimal fit + + - [cr_quoted_prices]. Quotes to be fitted + + - [cr_calibrated_prices]. Optimal model price of each quote + *) + +type range = { + lower_bound: float; + upper_bound: float; + initial_value: float; +} + +type optimization_variable = + | Fixed_value of float + | Optimize_value of range + +val least_squares: + ?absolute: unit -> + ?feedback: (string -> unit) -> + max_global:int -> + parameters_of_vector:(float array -> 'parameters) -> + pricer:('parameters -> float array -> unit) -> + variables:optimization_variable array -> + float array -> + 'parameters calibration_result +(** [least_squares ~pricer ~lo ~up quotes] outputs a vector of calibrated parameters. These calibrated parameters +correspond to the least square fitting of quotes from the [quotes] list and results of applying the [price] function. +This optimization is done first using Direct as a global optimizer then using Minpack as a local optimizer. +The input are: + + - [pricer] is the pricer function; it takes as input a vector of parameters (to be optimized) and a price vector. + The price vector is filled by this function in order to be compared to quotes from the [quotes] list. + + - [x] is the original value for the parameters. This is only used if no global optimization is performed, i.e. if [max_global] is 0. + + - [lo] contains lower bounds for each parameters. + + - [up] contains upper bounds for each parameters. + + - [quotes] is the list of quotes to be matched by the least-square algorithm. + + Optional parameters are: + + - [absolute] is an optional parameter. If set, the distance is the absolute difference, not the default relative one. + + - [feedback] is a feedback function that can be used to print the current RMS. + + - [max_global] is the maximum number of steps performed in the global optimization (DE). + + - [max_local] is the maximum number of steps performed in the local optimization (Minpack). + + Note that [x], [lo], and [up] must have the same size. This size is the number of parameters, it is also equal to the size of + the vector in the output and should be equal to the size of the vector used as the first argument of the [price] function. + The size of the second argument of the [price] function should be equal to the length of the [quotes] list. +*) diff --git a/benchmarks/benchmark-partial-render-table/Makefile b/benchmarks/benchmark-partial-render-table/Makefile index 21c2ac2ad6..92889796d5 100644 --- a/benchmarks/benchmark-partial-render-table/Makefile +++ b/benchmarks/benchmark-partial-render-table/Makefile @@ -5,13 +5,18 @@ export NAME=Partial Render Table SHELL=/bin/bash -o pipefail bench: + @date -u +"%FT%TZ - $(NAME): starting" + dune build --root ../../../janestreet --profile release lib/bonsai_web_components/partial_render_table/bench/bin/main.bc.wasm.js lib/bonsai_web_components/partial_render_table/bench/bin/main.bc.js + cp -r ../../../janestreet/_build/default/lib/bonsai_web_components/partial_render_table/bench/bin/main.bc* . + @date -u +"%FT%TZ - $(NAME): compiled" $(MAKE) perform COMPILER=js_of_ocaml SCRIPT=main.bc.js KIND=js $(MAKE) perform COMPILER=wasm_of_ocaml SCRIPT=main.bc.wasm.js KIND=wasm + @date -u +"%FT%TZ - $(NAME): done" perform: /usr/bin/time -f "%E %R" $(COMPILER) --debug times --opt 2 --pretty main.bc-for-jsoo -o out.js 2>&1 | \ tee /dev/stderr | \ - ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER) "$(NAME)" | \ + ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER) "$(NAME)" out.js | \ sh ../utils/aggregate.sh $(KIND) node $(SCRIPT) | \ tee /dev/stderr | \ diff --git a/benchmarks/report.ml b/benchmarks/report.ml index 025fefdf48..ef52639b78 100644 --- a/benchmarks/report.ml +++ b/benchmarks/report.ml @@ -326,7 +326,8 @@ let current_bench_output let json = `Assoc [ "name", `String suite_name; "results", `List (summary :: results) ] in - Yojson.Basic.to_channel ch json + Yojson.Basic.to_channel ch json; + output_char ch '\n' let output ~format conf = let output_function, close = diff --git a/benchmarks/run.config b/benchmarks/run.config index f1339f1f31..b202194a3d 100644 --- a/benchmarks/run.config +++ b/benchmarks/run.config @@ -1,6 +1,8 @@ # #interpreter v8 / node: apt-get install nodejs -interpreter node /usr/bin/env node +# We disable the Wasm baseline compiler since we are interested in the +# performance of optimized code +interpreter node /usr/bin/env node --no-liftoff # #SpiderMonkey: apt-get install libmozjs-91-dev interpreter sm /usr/bin/env js91 -f diff --git a/benchmarks/run.ml b/benchmarks/run.ml index 8d5d5fdf1f..dbafe01d30 100644 --- a/benchmarks/run.ml +++ b/benchmarks/run.ml @@ -248,7 +248,7 @@ let _ = "js_of_ocaml -q --target-env browser --debug mark-runtime-gen %s %s" opts (match effects with - | `None -> "" + | `None -> "--effects=disabled" | `Cps -> "--effects=cps" | `Double_translation -> "--effects=double-translation")) in diff --git a/benchmarks/sources/js/binary_trees.js b/benchmarks/sources/js/binary_trees.js index d04e8e1147..2ef9e34f15 100644 --- a/benchmarks/sources/js/binary_trees.js +++ b/benchmarks/sources/js/binary_trees.js @@ -28,7 +28,7 @@ function bottomUpTree(item,depth){ var minDepth = 4; -var n = 0; //arguments[0]; +var n = 17; //arguments[0]; var maxDepth = Math.max(minDepth + 2, n); var stretchDepth = maxDepth + 1; diff --git a/benchmarks/sources/js/fft.js b/benchmarks/sources/js/fft.js index 1c3444b553..b6473fbdfb 100644 --- a/benchmarks/sources/js/fft.js +++ b/benchmarks/sources/js/fft.js @@ -174,4 +174,4 @@ function test (np) { if (Math.abs( zr) <= 1e-8 && Math.abs( zi) <= 1e-8) {} else throw "ERROR"; } -var np = 16; for (var i = 1; i<= 16; i++) { test (np); np = np*2; } +var np = 16; for (var i = 1; i<= 19; i++) { test (np); np = np*2; } diff --git a/benchmarks/sources/js/raytrace.js b/benchmarks/sources/js/raytrace.js index 40d1fb4a87..e4d74ef2b3 100644 --- a/benchmarks/sources/js/raytrace.js +++ b/benchmarks/sources/js/raytrace.js @@ -903,4 +903,4 @@ function renderScene(){ raytracer.renderScene(scene, null, 0); } -for (var i = 1; i <= 100; i++) { renderScene(); }; +for (var i = 1; i <= 2000; i++) { renderScene(); }; diff --git a/benchmarks/sources/ml/binary_trees.ml b/benchmarks/sources/ml/binary_trees.ml index 653b79bd65..36362fd93f 100644 --- a/benchmarks/sources/ml/binary_trees.ml +++ b/benchmarks/sources/ml/binary_trees.ml @@ -24,7 +24,7 @@ let rec check = function let min_depth = 4 let max_depth = - let n = try int_of_string Sys.argv.(1) with _ -> 10 in + let n = try int_of_string Sys.argv.(1) with _ -> 17 in max (min_depth + 2) n let stretch_depth = max_depth + 1 @@ -38,25 +38,26 @@ let () = let long_lived_tree = make 0 max_depth -let loop_depths d = - for i = 0 to ((max_depth - d) / 2) + 1 - 1 do - let d = d + (i * 2) in - let niter = 1 lsl (max_depth - d + min_depth) in +let rec loop_depths depth max_depth = + if depth <= max_depth + then ( + let niter = 1 lsl (max_depth - depth + min_depth) in let c = ref 0 in for i = 1 to niter do - c := !c + check (make i d) + check (make (-i) d) + c := !c + check (make i depth) + check (make (-i) depth) done; ( (* Printf.printf "%i\t trees of depth %i\t check: %i\n" (2 * niter) d !c; - *) ) - done + *) ); + loop_depths (depth + 2) max_depth) let () = (* flush stdout; *) - loop_depths min_depth; - ( (* - Printf.printf "long lived tree of depth %i\t check: %i\n" - max_depth (check long_lived_tree) - *) ) + loop_depths min_depth max_depth +(* Printf.printf + "long lived tree of depth %i\t check: %i\n" + max_depth + (check long_lived_tree) + *) diff --git a/benchmarks/sources/ml/fft.ml b/benchmarks/sources/ml/fft.ml index a8f29d8ffe..4ce81b8ae9 100644 --- a/benchmarks/sources/ml/fft.ml +++ b/benchmarks/sources/ml/fft.ml @@ -173,7 +173,7 @@ let test np = let _ = let np = ref 16 in - for _ = 1 to 16 do + for _ = 1 to 19 do test !np; np := !np * 2 done diff --git a/benchmarks/sources/ml/quicksort.ml b/benchmarks/sources/ml/quicksort.ml index 0ed0403e47..37f383654a 100644 --- a/benchmarks/sources/ml/quicksort.ml +++ b/benchmarks/sources/ml/quicksort.ml @@ -102,8 +102,8 @@ let test_sort sort_fun size = (*print_string "failed"; print_newline()*) let main () = - test_sort qsort 500000; - test_sort qsort2 500000 + test_sort qsort 2_000_000; + test_sort qsort2 2_000_000 let _ = main () diff --git a/benchmarks/sources/ml/raytrace.ml b/benchmarks/sources/ml/raytrace.ml index 9b27e2df02..c88b162f82 100644 --- a/benchmarks/sources/ml/raytrace.ml +++ b/benchmarks/sources/ml/raytrace.ml @@ -510,6 +510,6 @@ let render_scene () = Engine.render_scene engine scene None let _ = - for _ = 0 to 99 do + for _ = 1 to 2000 do render_scene () done diff --git a/benchmarks/sources/ml/soli.ml b/benchmarks/sources/ml/soli.ml index 9f378e0eb6..31e597c8f2 100644 --- a/benchmarks/sources/ml/soli.ml +++ b/benchmarks/sources/ml/soli.ml @@ -17,33 +17,18 @@ type peg = | Empty | Peg -let board = - [| [| Out; Out; Out; Out; Out; Out; Out; Out; Out |] - ; [| Out; Out; Out; Peg; Peg; Peg; Out; Out; Out |] - ; [| Out; Out; Out; Peg; Peg; Peg; Out; Out; Out |] - ; [| Out; Peg; Peg; Peg; Peg; Peg; Peg; Peg; Out |] - ; [| Out; Peg; Peg; Peg; Empty; Peg; Peg; Peg; Out |] - ; [| Out; Peg; Peg; Peg; Peg; Peg; Peg; Peg; Out |] - ; [| Out; Out; Out; Peg; Peg; Peg; Out; Out; Out |] - ; [| Out; Out; Out; Peg; Peg; Peg; Out; Out; Out |] - ; [| Out; Out; Out; Out; Out; Out; Out; Out; Out |] - |] - -(* let print_peg = function - Out -> print_string "." + | Out -> print_string "." | Empty -> print_string " " | Peg -> print_string "$" - let print_board board = - for i=0 to 8 do - for j=0 to 8 do - print_peg board.(i).(j) - done; - print_newline() - done -*) + for i = 0 to 8 do + for j = 0 to 8 do + print_peg board.(i).(j) + done; + print_newline () + done type direction = { dx : int @@ -60,13 +45,9 @@ type move = ; y2 : int } -let moves = Array.make 31 { x1 = 0; y1 = 0; x2 = 0; y2 = 0 } - -let counter = ref 0 - exception Found -let rec solve m = +let rec solve board moves counter m = counter := !counter + 1; if m = 31 then @@ -75,11 +56,6 @@ let rec solve m = | _ -> false else try - (* - if !counter mod 500 = 0 then begin - print_int !counter; print_newline() - end; -*) for i = 1 to 7 do for j = 1 to 7 do match board.(i).(j) with @@ -95,15 +71,10 @@ let rec solve m = | Peg -> ( match board.(i2).(j2) with | Empty -> - (* - print_int i; print_string ", "; - print_int j; print_string ") dir "; - print_int k; print_string "\n"; -*) board.(i).(j) <- Empty; board.(i1).(j1) <- Empty; board.(i2).(j2) <- Peg; - if solve (m + 1) + if solve board moves counter (m + 1) then ( moves.(m) <- { x1 = i; y1 = j; x2 = i2; y2 = j2 }; raise Found); @@ -119,4 +90,29 @@ let rec solve m = false with Found -> true -let _ = if solve 0 then ( (*print_string "\n"; print_board board*) ) else assert false +let solve () = + let board = + [| [| Out; Out; Out; Out; Out; Out; Out; Out; Out |] + ; [| Out; Out; Out; Peg; Peg; Peg; Out; Out; Out |] + ; [| Out; Out; Out; Peg; Peg; Peg; Out; Out; Out |] + ; [| Out; Peg; Peg; Peg; Peg; Peg; Peg; Peg; Out |] + ; [| Out; Peg; Peg; Peg; Empty; Peg; Peg; Peg; Out |] + ; [| Out; Peg; Peg; Peg; Peg; Peg; Peg; Peg; Out |] + ; [| Out; Out; Out; Peg; Peg; Peg; Out; Out; Out |] + ; [| Out; Out; Out; Peg; Peg; Peg; Out; Out; Out |] + ; [| Out; Out; Out; Out; Out; Out; Out; Out; Out |] + |] + in + let moves = Array.make 31 { x1 = 0; y1 = 0; x2 = 0; y2 = 0 } in + let counter = ref 0 in + solve board moves counter 0, board + +let _ = + for _ = 0 to 200 do + let solved, board = solve () in + if solved + then () + else ( + print_string "Failed:\n"; + print_board board) + done diff --git a/benchmarks/utils/compilation_metrics.ml b/benchmarks/utils/compilation_metrics.ml index ee002de5fa..8333a691d6 100644 --- a/benchmarks/utils/compilation_metrics.ml +++ b/benchmarks/utils/compilation_metrics.ml @@ -1,3 +1,9 @@ +let compiler = Sys.argv.(1) + +let benchmark_name = Sys.argv.(2) + +let output = Sys.argv.(3) + let time_re = Str.regexp "^ \\([^ ].*\\): \\([0-9.]+\\)$" let () = @@ -14,6 +20,21 @@ let () = last_line := l done with End_of_file -> ()); + let file_size = + let file = + match compiler with + | "js_of_ocaml" -> output + | "wasm_of_ocaml" -> + let dir = Filename.chop_suffix output ".js" ^ ".assets" in + let contents = Sys.readdir dir in + let code = + Array.find_opt (fun nm -> Filename.check_suffix nm ".wasm") contents + in + Filename.concat dir (Option.get code) + | _ -> assert false + in + In_channel.(with_open_bin file length) + in let l = Hashtbl.fold (fun nm v rem -> (nm, v) :: rem) times [] in let l = List.filter (fun (_, v) -> v > 0.2) l in let l = List.map (fun (nm, v) -> "Compilation phases/" ^ nm, "s", v) l in @@ -21,6 +42,7 @@ let () = Scanf.sscanf !last_line "%f:%f %f" (fun m s mem -> [ "Compilation time", "s", (m *. 60.) +. s ; "Compilation memory usage", "KiB", mem + ; "Code size", "KiB", float (Int64.to_int file_size / 1024) ]) in Format.printf @@ -28,8 +50,8 @@ let () = "results": [ { "name": "%s", "metrics":@.|} - (String.capitalize_ascii Sys.argv.(1)) - Sys.argv.(2); + (String.capitalize_ascii compiler) + benchmark_name; Format.printf " [ @["; List.iteri (fun i (nm, u, v) -> diff --git a/benchmarks/utils/format_metrics.sh b/benchmarks/utils/format_metrics.sh index ecd9a50d33..aaa7c1bf17 100644 --- a/benchmarks/utils/format_metrics.sh +++ b/benchmarks/utils/format_metrics.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ "$1" = "exec" ]; then - jq '{name: ((.compiler[:1] | ascii_upcase) + .compiler[1:]), results: [{name: "'$NAME'", metrics: [{name: "Execution time", "units":"s", value: (.time | split(":") | map(tonumber) | .[0] * 60 + .[1])}]}]}' + jq '{name: ((.compiler[:1] | ascii_upcase) + .compiler[1:]), results: [{name: "'$NAME'", metrics: [{name: "'"${SUBNAME:-Execution time}"'", "units":"s", value: (.time | split(":") | map(tonumber) | .[0] * 60 + .[1])}]}]}' else jq '{name: ((.compiler[:1] | ascii_upcase) + .compiler[1:]), results: [{name: "'$NAME'", metrics: [{name: "Compilation time", "units":"s", value: (.time | split(":") | map(tonumber) | .[0] * 60 + .[1])}, {name: "Memory usage", "units":"KiB", value:(.mem)}]}]}' fi From 3b45786c4c0dd38d516f55c2dd85abe6763fd5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Fri, 5 Sep 2025 11:06:01 +0200 Subject: [PATCH 02/13] Update to Github workflows --- .github/ISSUE_TEMPLATE/bug_report.md | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 1 + .github/workflows/js_of_ocaml.yml | 198 +++++++++++++++ .github/workflows/lint.yml | 10 +- .github/workflows/wasm_of_ocaml.yml | 236 ++++++++++++++++++ tools/ci_setup.ml | 283 +++++++++++++--------- 6 files changed, 614 insertions(+), 115 deletions(-) create mode 100644 .github/workflows/js_of_ocaml.yml create mode 100644 .github/workflows/wasm_of_ocaml.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c8ce436786..2c8d41036f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -3,6 +3,7 @@ name: Bug report about: Create a report title: "[BUG]" labels: bug +type: Bug assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 16ad655c05..0eb6c3f7df 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -3,6 +3,7 @@ name: Feature request about: Suggest an idea title: "[FEATURE REQUEST]" labels: enhancement +type: Feature assignees: '' --- diff --git a/.github/workflows/js_of_ocaml.yml b/.github/workflows/js_of_ocaml.yml new file mode 100644 index 0000000000..19c8c76af1 --- /dev/null +++ b/.github/workflows/js_of_ocaml.yml @@ -0,0 +1,198 @@ +name: js_of_ocaml + +on: + pull_request: + push: + branches: + - master + schedule: + # Prime the caches every Monday + - cron: 0 1 * * MON + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + os-name: + - Ubuntu + ocaml-name: + - "" + ocaml-compiler: + - "4.13" + - "5.0" + - "5.1" + - "5.2" + skip-test: + - true + skip-doc: + - true + skip-effects: + - true + include: + - os: ubuntu-latest + os-name: Ubuntu + ocaml-compiler: "4.14" + skip-effects: true + skip-test: false + skip-doc: true + - os: ubuntu-latest + os-name: Ubuntu + ocaml-name: "4.14.2+32bit" + ocaml-compiler: "ocaml-variants.4.14.2+options,ocaml-option-32bit" + skip-effects: true + skip-test: false + skip-doc: true + - os: macos-latest + os-name: Macos + ocaml-compiler: "4.14" + skip-effects: true + skip-test: false + skip-doc: true + - os: windows-latest + os-name: Windows + ocaml-compiler: "4.14" + skip-effects: true + skip-test: false + skip-doc: true + - os: ubuntu-latest + os-name: Ubuntu + ocaml-compiler: "5.3" + skip-effects: false + skip-test: false + skip-doc: false + - os: ubuntu-latest + os-name: Ubuntu + ocaml-compiler: "5.1" + skip-effects: false + skip-test: false + skip-doc: true + # Note this OCaml compiler is bytecode only + - os: ubuntu-latest + os-name: Ubuntu + ocaml-name: "5.3.0+32bit" + ocaml-compiler: "ocaml-variants.5.3.0+options,ocaml-option-32bit" + skip-effects: true # disabled for the same reason than `skip-test` + skip-test: true # the `time_now.0.17` package is pulled and doesn't work in 32 bits :( + skip-doc: true + - os: macos-latest + os-name: MacOS + ocaml-compiler: "5.3" + skip-effects: true + skip-test: false + skip-doc: true + - os: windows-latest + os-name: Windows + ocaml-compiler: "5.3" + skip-effects: false + skip-test: false + skip-doc: true + - os: ubuntu-latest + os-name: Ubuntu + ocaml-name: "5.4-alpha1" + ocaml-compiler: "ocaml-compiler.5.4.0~alpha1" + skip-effects: true + skip-test: true + skip-doc: true + + runs-on: ${{ matrix.os }} + + name: + ${{ matrix.ocaml-name != '' && matrix.ocaml-name || matrix.ocaml-compiler}} / ${{ matrix.os-name }}${{ ! matrix.skip-test && ' / Tests' || ''}}${{ ! matrix.skip-effects && ' / Effects' || ''}}${{ ! matrix.skip-doc && ' / Docs' || ''}} + + + steps: + - name: Update apt cache + if: ${{ matrix.os == 'ubuntu-latest' }} + run: sudo apt-get update + + - name: Set git to use LF + if: ${{ matrix.os == 'windows-latest' && matrix.ocaml-compiler < 5.2 }} + run: | + git config --global core.autocrlf false + git config --global core.eol lf + git config --global core.ignorecase false + + - name: Checkout tree + uses: actions/checkout@v5 + + # EJGA: Note that I tried to fix this upstream as depext is + # getting much better, but no luck yet, c.f: + # https://github.com/ocaml/opam-repository/pull/26626 + - name: Install apt 32-bit dependencies + if: contains( matrix.ocaml-compiler, 'ocaml-option-32bit') + run: | + sudo apt-get install aptitude + sudo dpkg --add-architecture i386 + sudo aptitude -o Acquire::Retries=30 update -q + # Note we also install the 64-bit versions here as opam will + # try to install them anyways, so we save an apt-roundtrip. + sudo aptitude -o Acquire::Retries=30 install gcc-multilib g++-multilib pkg-config libgmp-dev libgmp-dev:i386 libx11-dev libx11-dev:i386 libxft-dev libxft-dev:i386 -y + + - name: Set-up Node.js + uses: actions/setup-node@v5 + with: + node-version: latest + + - name: Set-up OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + + # Work-around a race between reinstalling mingw-w64-shims + # (because of conf-pkg-config optional dep) and installing other + # packages that implicitly depend on mingw-w64-shims. + - run: opam install conf-pkg-config conf-mingw-w64-g++-i686 conf-mingw-w64-g++-x86_64 + if: runner.os == 'Windows' + + - name: Set-up Binaryen + uses: Aandreba/setup-binaryen@v1.0.0 + with: + token: ${{ github.token }} + + - name: Install faked binaryen-bin package + # It's faster to use a cached version + run: opam install --fake binaryen-bin + + - run: opam install . --best-effort --solver builtin-mccs+glpk + if: ${{ matrix.skip-test }} + + - run: opam install . --deps-only --with-test + # Install the test dependencies + if: ${{ !matrix.skip-test }} + + - run: opam install . + # Install the packages (without running the tests) + if: ${{ !matrix.skip-test }} + + - run: opam exec -- make all + if: ${{ !matrix.skip-test }} + + - run: opam exec -- make tests + if: ${{ !matrix.skip-test }} + + - run: opam exec -- dune build @all @runtest @runtest-js --profile with-effects + if: ${{ !matrix.skip-effects }} + + - run: opam exec -- dune build @all @runtest @runtest-js --profile with-effects-double-translation + if: ${{ !matrix.skip-effects }} + + - run: opam exec -- git diff --exit-code + if: ${{ !matrix.skip-test }} + + - name: build doc + if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master'}} + run: | + opam install odoc lwt_log yojson ocp-indent graphics higlo + opam exec -- make doc + + - name: synchronize doc + if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master' }} + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: wikidoc + folder: doc-dev + clean: true + target-folder: doc/dev/ diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 19e09b8133..b6e729abe9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,8 +10,10 @@ jobs: lint-opam: runs-on: ubuntu-latest steps: + - name: Update apt cache + run: sudo apt-get update - name: Checkout tree - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set-up OCaml uses: ocaml/setup-ocaml@v3 with: @@ -29,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout tree - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set-up OCaml uses: ocaml/setup-ocaml@v3 with: @@ -40,8 +42,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout tree - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set-up Biome uses: biomejs/setup-biome@v2 + with: + version: 1.9.4 - name: Run biome run: biome ci diff --git a/.github/workflows/wasm_of_ocaml.yml b/.github/workflows/wasm_of_ocaml.yml new file mode 100644 index 0000000000..06f5a074b5 --- /dev/null +++ b/.github/workflows/wasm_of_ocaml.yml @@ -0,0 +1,236 @@ +name: wasm_of_ocaml + +on: + pull_request: + push: + branches: + - master + +jobs: + build: + env: + WASM_OF_OCAML: true + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + os-name: + - Ubuntu + ocaml-compiler: + - "4.14" + - "5.0" + - "5.1" + - "5.2" + separate_compilation: + - true + jane_street_tests: + - false + all_jane_street_tests: + - false + include: + - os: macos-latest + os-name: MacOS + ocaml-compiler: "5.3" + separate_compilation: true + jane_street_tests: false + all_jane_street_tests: false + - os: windows-latest + os-name: Windows + ocaml-compiler: "5.3" + separate_compilation: true + # Jane Street tests disabled for now (basement only works on Linux) + jane_street_tests: false + all_jane_street_tests: false + - os: ubuntu-latest + os-name: Ubuntu + ocaml-compiler: "5.3" + separate_compilation: true + jane_street_tests: true + all_jane_street_tests: true + - os: ubuntu-latest + os-name: Ubuntu + ocaml-compiler: "5.3" + separate_compilation: false + jane_street_tests: true + all_jane_street_tests: false + + runs-on: ${{ matrix.os }} + + name: + ${{ (! matrix.separate_compilation) && 'Whole program / ' || ''}}${{ matrix.ocaml-compiler }} / ${{ matrix.os-name }}${{ matrix.all_jane_street_tests && ' / Jane Street tests' || ''}} + + steps: + - name: Update apt cache + if: ${{ matrix.os == 'ubuntu-latest' }} + run: sudo apt-get update + + - name: Set git to use LF + if: ${{ matrix.os == 'windows-latest' && matrix.ocaml-compiler < 5.2 }} + run: | + git config --global core.autocrlf false + git config --global core.eol lf + git config --global core.ignorecase false + + - name: Checkout tree + uses: actions/checkout@v5 + with: + path: wasm_of_ocaml + + - name: Checkout Jane Street opam repository + if: matrix.jane_street_tests + uses: actions/checkout@v5 + with: + repository: janestreet/opam-repository + ref: 2819773f29b6f6c14b918eae3cb40c8ff6b22d0e + path: janestreet/opam-repository + + - name: Set-up Node.js + uses: actions/setup-node@v5 + with: + node-version: latest + + - name: Set-up OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + + - name: Set-up Binaryen + uses: Aandreba/setup-binaryen@v1.0.0 + with: + token: ${{ github.token }} + + - name: Pin faked binaryen-bin package + # It's faster to use a cached version + run: opam install --fake binaryen-bin + + # Work-around a race between reinstalling mingw-w64-shims + # (because of conf-pkg-config optional dep) and installing other + # packages that implicitly depend on mingw-w64-shims. + - run: opam install conf-pkg-config conf-mingw-w64-gcc-i686 conf-mingw-w64-g++-x86_64 + if: runner.os == 'Windows' + + - name: Pin wasm_of_ocaml + working-directory: ./wasm_of_ocaml + run: opam pin . -n --with-version dev + + - name: Pin dune + run: opam pin add dune https://github.com/ocaml/dune.git + + - name: Checkout Jane Street packages + if: matrix.jane_street_tests + run: | + opam repo add js janestreet/opam-repository + opam install opam-format + opam pin add ppxlib -n 0.35.0 + opam exec -- dune exec --root wasm_of_ocaml tools/ci_setup.exe + + - name: Pin Jane Street packages + if: ${{ ! matrix.jane_street_tests }} + run: | + opam pin add -n base.v0.16.1 https://github.com/ocaml-wasm/base.git#wasm + opam pin add -n time_now.v0.16.1 https://github.com/ocaml-wasm/time_now.git#wasm + opam pin add -n ppx_inline_test.v0.16.1 https://github.com/ocaml-wasm/ppx_inline_test.git#wasm + opam pin add -n ppx_expect.v0.16.1 https://github.com/ocaml-wasm/ppx_expect.git#wasm + + - name: Install wasm_of_ocaml and its test dependencies + working-directory: ./wasm_of_ocaml + run: | + opam install . -t + + - name: Run tests + if: ${{ matrix.separate_compilation }} + working-directory: ./wasm_of_ocaml + run: opam exec -- dune build @runtest-wasm + + # we continue-on-error on windows because we seem to often hit + # an internal assert inside libuv. + # See https://github.com/libuv/libuv/issues/3622 + + - name: Run tests with CPS effects + if: ${{ matrix.ocaml-compiler >= '5.' && matrix.separate_compilation }} + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./wasm_of_ocaml + run: opam exec -- dune build @runtest-wasm --profile with-effects + + - name: Run Base tests + if: matrix.all_jane_street_tests + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/base + run: opam exec -- dune runtest + + - name: Run Base bigstring tests + if: matrix.all_jane_street_tests + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/base_bigstring + run: opam exec -- dune runtest + + - name: Run Core tests + if: matrix.all_jane_street_tests + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/core + run: opam exec -- dune runtest + + - name: Run Bignum tests + if: matrix.all_jane_street_tests + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/bignum + run: opam exec -- dune runtest + + - name: Run Bin_prot tests + if: matrix.all_jane_street_tests + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/bin_prot + run: opam exec -- dune runtest + + - name: Run String_dict tests + if: matrix.all_jane_street_tests + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/string_dict + run: opam exec -- dune runtest + + - name: Run Zarith tests + if: matrix.all_jane_street_tests + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/zarith_stubs_js + run: opam exec -- dune runtest + + - name: Run Virtual_dom tests + if: matrix.all_jane_street_tests + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/virtual_dom + run: opam exec -- dune runtest + + - name: Run Bonsai tests + if: ${{ matrix.all_jane_street_tests && matrix.os != 'windows-latest' }} + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/bonsai_test + run: opam exec -- dune runtest + + - name: Run Bonsai web tests + if: ${{ matrix.all_jane_street_tests && matrix.os != 'windows-latest' }} + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/bonsai_web_test + run: opam exec -- dune runtest + + - name: Run Bonsai web components' tests + if: ${{ matrix.all_jane_street_tests && matrix.os != 'windows-latest' }} + continue-on-error: ${{ matrix.os == 'windows-latest' }} + working-directory: ./janestreet/lib/bonsai_web_components + run: opam exec -- dune runtest + + - name: Run Bonsai tests (release profile) + if: ${{ ! matrix.separate_compilation }} + working-directory: ./janestreet/lib/bonsai_test + run: opam exec -- dune runtest --profile release + + - name: Run Bonsai web tests (release profile) + if: ${{ ! matrix.separate_compilation }} + working-directory: ./janestreet/lib/bonsai_web_test + run: opam exec -- dune runtest --profile release + + - name: Run Bonsai web components' tests (release profile) + if: ${{ ! matrix.separate_compilation }} + working-directory: ./janestreet/lib/bonsai_web_components + run: opam exec -- dune runtest --profile release diff --git a/tools/ci_setup.ml b/tools/ci_setup.ml index 4cb1867dea..3a665d38bf 100644 --- a/tools/ci_setup.ml +++ b/tools/ci_setup.ml @@ -9,43 +9,28 @@ let jane_root, wasmoo_root = let repo = Filename.concat jane_root "opam-repository/packages" -let roots = [ "bonsai_web_components"; "string_dict"; "ppx_html"; "bonsai_bench" ] +let roots = + [ "bonsai_web_components"; "string_dict"; "ppx_html"; "bonsai_bench"; "float_array" ] let omitted_others = StringSet.of_list [] -let omitted_js = StringSet.of_list [ "sexplib0" ] +let omitted_js = StringSet.of_list [ "basement"; "sexplib0" ] let do_pin = StringSet.of_list - [ "base" - ; "ppx_expect" - ; "ppx_inline_test" - ; "time_now" - ; "ocaml_intrinsics_kernel" - ; "bigstringaf" - ] + [ "basement" (* https://github.com/janestreet/basement/pull/3 *); "bigstringaf" ] let forked_packages = StringSet.of_list - [ "async_js" - ; "base" - ; "base_bigstring" - ; "bin_prot" - ; "bonsai" + [ "base" + ; "core" + ; "bonsai" (* Compatibility with effect syntax *) ; "bonsai_test" + ; "bonsai_web" (* Compatibility with effect syntax *) ; "bonsai_web_components" ; "bonsai_web_test" - ; "core" - ; "core_kernel" - ; "ocaml_intrinsics_kernel" - ; "ppx_expect" - ; "ppx_inline_test" - ; "ppx_module_timer" - ; "string_dict" - ; "time_now" - ; "virtual_dom" - ; "virtual_dom_toplayer" - ; "zarith_stubs_js" + ; "virtual_dom" (* Compatibility with effect syntax *) + ; "typerep" (* https://github.com/janestreet/typerep/pull/7 *) ] let dune_workspace = @@ -54,7 +39,7 @@ let dune_workspace = (_ (env-vars (TESTING_FRAMEWORK inline-test)) (js_of_ocaml (enabled_if false)) - (flags :standard -alert -all -warn-error -7-8-27-30-32-34-37-49-52-55 -w -7-27-30-32-34-37-49-52-55-58-67-69))) + (flags :standard -alert -all -warn-error -7-8-27-30-32-34-37-49-52-55 -w -7-27-30-32-34-37-49-52-55-56-58-67-69))) |} let node_wrapper = @@ -89,20 +74,13 @@ index 91933ec..849e4d7 100644 ) ; ( "bignum" , {bignum| -diff --git a/dune-project b/dune-project -index e563d7e..b87e356 100644 ---- a/dune-project -+++ b/dune-project -@@ -1 +1 @@ --(lang dune 3.11) -+(lang dune 3.17) diff --git a/test/src/dune b/test/src/dune index f93ae3f..3f00557 100644 --- a/test/src/dune +++ b/test/src/dune @@ -2,5 +2,6 @@ (name bignum_test) - (libraries bigint bignum core expect_test_helpers_core + (libraries bigint bignum core expect_test_helpers_core expectable sexp_grammar_validation zarith) + (inline_tests (flags -drop-tag no-js -drop-tag no-wasm -drop-tag 64-bits-only) (modes js wasm)) (preprocess @@ -126,100 +104,171 @@ index c6d09fb..61b1e5b 100644 |bignum} ) ; ( "bin_prot" - , {| + , {bp| diff --git a/test/dune b/test/dune -index 6c0ef2f..9968f59 100644 +index bd88b8d..29b3604 100644 --- a/test/dune +++ b/test/dune -@@ -5,11 +5,3 @@ +@@ -1,15 +1,8 @@ + (library + (name bin_prot_test) + (libraries base base_bigstring bin_prot +- expect_test_helpers_core.expect_test_helpers_base expect_test_patterns ++ expect_test_helpers_core.expect_test_helpers_base ; expect_test_patterns float_array base.md5 sexplib splittable_random stdio) ++ (inline_tests (flags -drop-tag no-js -drop-tag 64-bits-only -drop-tag 32-bits-only -drop-tag no-wasm) (modes js wasm)) (preprocess (pps ppx_jane))) - -(rule -- (alias runtest) - (deps core/blob_stability_tests.ml integers_repr_tests_64bit.ml - integers_repr_tests_js.ml integers_repr_tests_wasm.ml) - (action - (bash -- "diff <(\necho '869e6b3143f14201f406eac9c05c4cdb core/blob_stability_tests.ml'\necho '2db396dfced6ae8d095f308acb4c80eb integers_repr_tests_64bit.ml'\necho '9f7b6332177a4ae9547d37d17008d7ef integers_repr_tests_js.ml'\necho '22f653bfba79ce30c22fe378c596df54 integers_repr_tests_wasm.ml'\n ) <(md5sum %{deps})"))) - |} +- "diff <(\necho '869e6b3143f14201f406eac9c05c4cdb core/blob_stability_tests.ml'\necho 'a9ed028fa16f307982c196f647d05afa integers_repr_tests_64bit.ml'\necho 'a17ffcd3bf1e15dbca0ee54ec5b95c58 integers_repr_tests_js.ml'\necho 'e747bd85320575c771fc62a0d3085d29 integers_repr_tests_wasm.ml'\n ) <(md5sum %{deps})")) +- (alias runtest)) +diff --git a/test/non_integers_repr.ml b/test/non_integers_repr.ml +index cbb9bd5..b5b5a03 100644 +--- a/test/non_integers_repr.ml ++++ b/test/non_integers_repr.ml +@@ -811,11 +811,12 @@ let%expect_test "Non-integer bin_prot size tests" = + 00 00 00 00 00 00 00 00 -> 0 + |}]; + gen_tests Tests.float_nan; ++ [%expect ++ {| 7f f8 00 00 00 00 00 01 -> NAN |}]; ++(* + Expect_test_patterns.require_match + [%here] +- {| +- 7f f{8,0} 00 00 00 00 00 01 -> NAN (glob) +- |}; ++*) + gen_tests Tests.vec; + [%expect + {| + |bp} ) ; ( "base_bigstring" , {| -diff --git a/src/base_bigstring_stubs.c b/src/base_bigstring_stubs.c -index 164c393..6cf4835 100644 ---- a/src/base_bigstring_stubs.c -+++ b/src/base_bigstring_stubs.c -@@ -17,6 +17,50 @@ - #include - #include +diff --git a/test/dune b/test/dune +index 8d23f86..21e83ba 100644 +--- a/test/dune ++++ b/test/dune +@@ -2,5 +2,6 @@ + (name base_bigstring_test) + (libraries base_bigstring core.base_for_tests core expect_test_helpers_core + stdio) ++ (inline_tests (flags -drop-tag no-js -drop-tag 64-bits-only -drop-tag no-wasm) (modes js wasm)) + (preprocess + (pps ppx_jane))) +|} + ) + ; ( "core_kernel" + , {| +diff --git a/version_util/src/dune b/version_util/src/dune +index 4b2b8bb..f7eb7ba 100644 +--- a/version_util/src/dune ++++ b/version_util/src/dune +@@ -10,4 +10,5 @@ + (preprocess + (pps ppx_jane)) + (wasm_of_ocaml +- (javascript_files version_util.js))) ++ (javascript_files version_util.js) ++ (wasm_files version_util.wat))) +|} + ) + ; ( "string_dict" + , {| +diff --git a/test/dune b/test/dune +index b145cb3..e5fc412 100644 +--- a/test/dune ++++ b/test/dune +@@ -1,5 +1,6 @@ + (library + (name string_dict_test) + (libraries base core expect_test_helpers_core string_dict) ++ (inline_tests (flags -drop-tag no-js -drop-tag 64-bits-only -drop-tag no-wasm) (modes js wasm)) + (preprocess + (pps ppx_jane))) +|} + ) + ; ( "zarith_stubs_js" + , {zs| +diff --git a/test/bitwise.ml b/test/bitwise.ml +index 5fd0ddc..4833923 100644 +--- a/test/bitwise.ml ++++ b/test/bitwise.ml +@@ -86,7 +86,7 @@ module Ml_z_popcount = struct + Static.quickcheck ~f:(fun x -> [%message (x : t) (popcount x : int)]) (); + (* Compression rate is low because our quickcheck implementation generates + integers with a bounded bitcount. *) +- [%expect {| ((hash 1e429706c701b111d98b6e6e858bbea4) (uniqueness_rate 42.96875)) |}] ++ [%expect {| ((hash d937e61f530ab9c27544e392922d286d) (uniqueness_rate 42.96875)) |}] + ;; + end -+ -+static inline void * mymemrchr(const void * s, int c, size_t n) -+{ -+ const unsigned char * p = (const unsigned char *)s + n; -+ -+ while (n--) { -+ if (*(--p) == (unsigned char) c) { -+ return (void *)p; -+ } -+ } -+ -+ return NULL; -+} -+static inline void *mymemmem(const void *haystack, size_t haystack_len, -+ const void *needle, size_t needle_len) -+{ -+ const char *begin = haystack; -+ const char *last_possible = begin + haystack_len - needle_len; -+ const char *tail = needle; -+ char point; -+ -+ /* -+ * The first occurrence of the empty string is deemed to occur at -+ * the beginning of the string. -+ */ -+ if (needle_len == 0) -+ return (void *)begin; -+ -+ /* -+ * Sanity check, otherwise the loop might search through the whole -+ * memory. -+ */ -+ if (haystack_len < needle_len) -+ return NULL; -+ -+ point = *tail++; -+ for (; begin <= last_possible; begin++) { -+ if (*begin == point && !memcmp(begin + 1, tail, needle_len - 1)) -+ return (void *)begin; -+ } -+ -+ return NULL; -+} -+ - #ifdef __APPLE__ - #include - #define bswap_16 OSSwapInt16 -@@ -239,7 +283,7 @@ CAMLprim value bigstring_rfind(value v_str, value v_needle, - char *start, *r; +@@ -102,7 +102,7 @@ module Ml_z_hamdist = struct + (); + (* Compression rate is low because our quickcheck implementation generates + integers with a bounded bitcount. *) +- [%expect {| ((hash 0a270232628736ee7d47c8b403250989) (uniqueness_rate 33.284457)) |}] ++ [%expect {| ((hash 0d36530b39292e2c31f13d10ec004a38) (uniqueness_rate 33.284457)) |}] + ;; + end - start = get_bstr(v_str, v_pos); -- r = (char*) memrchr(start, Int_val(v_needle), Long_val(v_len)); -+ r = (char*) mymemrchr(start, Int_val(v_needle), Long_val(v_len)); +diff --git a/test/dune b/test/dune +index 7996514..d0b463a 100644 +--- a/test/dune ++++ b/test/dune +@@ -1,7 +1,9 @@ + (library + (name zarith_stubs_js_test) +- (libraries zarith core base.md5 zarith_stubs_js) ++ (libraries zarith_wrapper core base.md5 zarith_stubs_js) + (flags :standard -w -60) ++ (inline_tests (flags -drop-tag no-js -drop-tag 64-bits-only -drop-tag no-wasm) (modes js wasm)) ++ (modules (:standard \ zarith)) + (preprocess + (pps ppx_jane))) - return ptr_to_offset(start, v_pos, r); - } -@@ -250,7 +294,7 @@ CAMLprim value bigstring_memmem(value v_haystack, value v_needle, - { - const char *haystack = get_bstr(v_haystack, v_haystack_pos); - const char *needle = get_bstr(v_needle, v_needle_pos); -- const char *result = memmem(haystack, Long_val(v_haystack_len), -+ const char *result = mymemmem(haystack, Long_val(v_haystack_len), - needle, Long_val(v_needle_len)); +@@ -35,10 +37,16 @@ + (deps implemented_externals.txt tested_externals.txt) + (action + (bash "diff %{deps}")) +- (alias runtest)) ++ (alias runtest-)) - return ptr_to_offset(haystack, v_haystack_pos, result); + (rule + (deps implemented_externals.txt zarith_externals.txt) + (action + (bash "diff %{deps}")) +- (alias runtest)) ++ (alias runtest-)) ++ ++(subdir zarith ++ (copy_files (files ../zarith.ml)) ++ (library (name zarith_wrapper) ++ (wrapped false) ++ (libraries zarith))) +|zs} + ) + ; ( "ppx_css" + , {| +diff --git a/css_parser/lexer/ident.ml b/css_parser/lexer/ident.ml +index fdf9926..d0ccf6a 100644 +--- a/css_parser/lexer/ident.ml ++++ b/css_parser/lexer/ident.ml +@@ -6,7 +6,7 @@ let css_newline_single_char = [%sedlex.regexp? '\n' | '\r' | "\u{000C}"] + let css_newline = [%sedlex.regexp? "\r\n" | css_newline_single_char] + let css_whitespace = [%sedlex.regexp? css_newline | '\t' | " "] + let css_whitespace_single_char = [%sedlex.regexp? css_newline_single_char | '\t' | " "] +-let ascii = [%sedlex.regexp? '\000' .. '\177'] ++let ascii = [%sedlex.regexp? Latin1 '\000' .. '\177'] + let non_ascii = [%sedlex.regexp? Compl ascii] + let ident_start_code_point = [%sedlex.regexp? 'a' .. 'z' | 'A' .. 'Z' | '_' | non_ascii] + let ident_code_point = [%sedlex.regexp? ident_start_code_point | '0' .. '9' | '-'] |} ) ] @@ -251,7 +300,17 @@ let packages = repo |> Sys.readdir |> Array.to_list - |> List.map (fun s -> String.sub s 0 (String.index s '.'), read_opam_file s) + |> List.map (fun s -> + if String.contains s '.' + then String.sub s 0 (String.index s '.'), read_opam_file s + else + ( s + , read_opam_file + (Filename.concat + s + (List.find + (fun f -> String.starts_with ~prefix:s f) + (Array.to_list (Sys.readdir (Filename.concat repo s))))) )) let rec traverse visited p = if StringSet.mem p visited @@ -279,7 +338,7 @@ let sync_exec f l = let pin nm = exec_async (Printf.sprintf - "opam pin add -n %s https://github.com/ocaml-wasm/%s.git#wasm-v0.18" + "opam pin add -n %s https://github.com/ocaml-wasm/%s.git#wasm-latest" nm nm) @@ -337,7 +396,7 @@ let () = sync_exec (fun () -> exec_async "opam install uri --deps-only") [ () ]; sync_exec (fun nm -> - let branch = if is_forked nm then Some "wasm-v0.18" else None in + let branch = if is_forked nm then Some "wasm-latest" else None in let commit = if is_forked nm then None From 354170724ca455060553aa5ba62bcd09393062ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Fri, 30 May 2025 12:46:41 +0200 Subject: [PATCH 03/13] Wasm_of_ocaml: make it possible to disable effects with `--effects disabled` There can be a significant cost to call a JavaScript function from Wasm due to stack switching when JSPI is enabled (which will happen with node 25). --- compiler/bin-js_of_ocaml/cmd_arg.ml | 34 ++++++++++++++++++++------- compiler/bin-wasm_of_ocaml/cmd_arg.ml | 14 +++++------ compiler/bin-wasm_of_ocaml/compile.ml | 4 ++-- compiler/lib-wasm/generate.ml | 6 ++--- compiler/lib-wasm/link.ml | 10 +++++++- compiler/lib/driver.ml | 5 ++-- runtime/wasm/runtime.js | 6 +++-- 7 files changed, 53 insertions(+), 26 deletions(-) diff --git a/compiler/bin-js_of_ocaml/cmd_arg.ml b/compiler/bin-js_of_ocaml/cmd_arg.ml index 31be9f99e2..add76f5c74 100644 --- a/compiler/bin-js_of_ocaml/cmd_arg.ml +++ b/compiler/bin-js_of_ocaml/cmd_arg.ml @@ -39,8 +39,8 @@ let trim_trailing_dir_sep s = let normalize_include_dirs dirs = List.map dirs ~f:trim_trailing_dir_sep -let normalize_effects (effects : [ `Cps | `Double_translation ] option) common : - Config.effects_backend = +let normalize_effects (effects : [ `Disabled | `Cps | `Double_translation ] option) common + : Config.effects_backend = match effects with | None -> (* For backward compatibility, consider that [--enable effects] alone means @@ -48,7 +48,7 @@ let normalize_effects (effects : [ `Cps | `Double_translation ] option) common : if List.mem "effects" ~set:common.Jsoo_cmdline.Arg.optim.enable then `Cps else `Disabled - | Some ((`Cps | `Double_translation) as e) -> (e :> Config.effects_backend) + | Some ((`Disabled | `Cps | `Double_translation) as e) -> e type t = { common : Jsoo_cmdline.Arg.t @@ -267,12 +267,20 @@ let options = in let effects = let doc = - "Select an implementation of effect handlers. [$(docv)] should be one of $(b,cps) \ - or $(b,double-translation). Effects won't be supported if unspecified." + "Select an implementation of effect handlers. [$(docv)] should be one of $(b,cps), \ + $(b,double-translation) or $(b,disabled) (the default). Effects won't be \ + supported if unspecified." in Arg.( value - & opt (some (enum [ "cps", `Cps; "double-translation", `Double_translation ])) None + & opt + (some + (enum + [ "cps", `Cps + ; "double-translation", `Double_translation + ; "disabled", `Disabled + ])) + None & info [ "effects" ] ~docv:"KIND" ~doc) in let build_t @@ -524,12 +532,20 @@ let options_runtime_only = in let effects = let doc = - "Select an implementation of effect handlers. [$(docv)] should be one of $(b,cps) \ - or $(b,double-translation). Effects won't be supported if unspecified." + "Select an implementation of effect handlers. [$(docv)] should be one of $(b,cps), \ + $(b,double-translation), or $(b,disabled) (the default). Effects won't be \ + supported if unspecified." in Arg.( value - & opt (some (enum [ "cps", `Cps; "double-translation", `Double_translation ])) None + & opt + (some + (enum + [ "cps", `Cps + ; "double-translation", `Double_translation + ; "disabled", `Disabled + ])) + None & info [ "effects" ] ~docv:"KIND" ~doc) in let build_t diff --git a/compiler/bin-wasm_of_ocaml/cmd_arg.ml b/compiler/bin-wasm_of_ocaml/cmd_arg.ml index f079595690..81b0e00086 100644 --- a/compiler/bin-wasm_of_ocaml/cmd_arg.ml +++ b/compiler/bin-wasm_of_ocaml/cmd_arg.ml @@ -38,14 +38,14 @@ let trim_trailing_dir_sep s = let normalize_include_dirs dirs = List.map dirs ~f:trim_trailing_dir_sep -let normalize_effects (effects : [ `Cps | `Jspi ] option) common : Config.effects_backend - = +let normalize_effects (effects : [ `Disabled | `Cps | `Jspi ] option) common : + Config.effects_backend = match effects with | None -> (* For backward compatibility, consider that [--enable effects] alone means [--effects cps] *) if List.mem "effects" ~set:common.Jsoo_cmdline.Arg.optim.enable then `Cps else `Jspi - | Some ((`Cps | `Jspi) as e) -> e + | Some ((`Disabled | `Cps | `Jspi) as e) -> e type t = { common : Jsoo_cmdline.Arg.t @@ -116,11 +116,11 @@ let options () = let effects = let doc = "Select an implementation of effect handlers. [$(docv)] should be one of $(b,jspi) \ - (the default) or $(b,cps)." + (the default), $(b,cps), or $(b,disabled)." in Arg.( value - & opt (some (enum [ "jspi", `Jspi; "cps", `Cps ])) None + & opt (some (enum [ "jspi", `Jspi; "cps", `Cps; "disabled", `Disabled ])) None & info [ "effects" ] ~docv:"KIND" ~doc) in let build_t @@ -231,11 +231,11 @@ let options_runtime_only () = let effects = let doc = "Select an implementation of effect handlers. [$(docv)] should be one of $(b,jspi) \ - (the default) or $(b,cps)." + (the default), $(b,cps), or $(b,disabled)." in Arg.( value - & opt (some (enum [ "jspi", `Jspi; "cps", `Cps ])) None + & opt (some (enum [ "jspi", `Jspi; "cps", `Cps; "disabled", `Disabled ])) None & info [ "effects" ] ~docv:"KIND" ~doc) in let build_t diff --git a/compiler/bin-wasm_of_ocaml/compile.ml b/compiler/bin-wasm_of_ocaml/compile.ml index 6f8373f629..7bdb0628ba 100644 --- a/compiler/bin-wasm_of_ocaml/compile.ml +++ b/compiler/bin-wasm_of_ocaml/compile.ml @@ -89,9 +89,9 @@ let build_runtime ~runtime_file = [ ( "effects" , Wat_preprocess.String (match Config.effects () with - | `Jspi -> "jspi" + | `Disabled | `Jspi -> "jspi" | `Cps -> "cps" - | `Disabled | `Double_translation -> assert false) ) + | `Double_translation -> assert false) ) ] in match diff --git a/compiler/lib-wasm/generate.ml b/compiler/lib-wasm/generate.ml index cd3d3f64a6..9ab79079da 100644 --- a/compiler/lib-wasm/generate.ml +++ b/compiler/lib-wasm/generate.ml @@ -25,9 +25,9 @@ let times = Debug.find "times" let effects_cps () = match Config.effects () with - | `Cps | `Double_translation -> true - | `Jspi -> false - | `Disabled -> assert false + | `Cps -> true + | `Disabled | `Jspi -> false + | `Double_translation -> assert false module Generate (Target : Target_sig.S) = struct open Target diff --git a/compiler/lib-wasm/link.ml b/compiler/lib-wasm/link.ml index 083b4cd51e..f064f30cff 100644 --- a/compiler/lib-wasm/link.ml +++ b/compiler/lib-wasm/link.ml @@ -532,7 +532,7 @@ let build_runtime_arguments [ EVar (Javascript.ident Global_constant.global_object_) ] N in - obj + let props : (string * Javascript.expression) list = [ ( "link" , EArr (List.map @@ -558,6 +558,14 @@ let build_runtime_arguments ; "generated", generated_js ; "src", EStr (Utf8_string.of_string_exn (Filename.basename wasm_dir)) ] + in + let props = + match Config.effects () with + | `Disabled -> ("disable_effects", Javascript.EBool true) :: props + | `Jspi | `Cps -> props + | `Double_translation -> assert false + in + obj props let source_name i j file = let prefix = diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index be4a489896..3e4798fb29 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -703,8 +703,9 @@ let optimize ~profile p = +> map_fst (match Config.target (), Config.effects () with | `JavaScript, `Disabled -> Generate_closure.f - | `JavaScript, (`Cps | `Double_translation) | `Wasm, (`Jspi | `Cps) -> Fun.id - | `JavaScript, `Jspi | `Wasm, (`Disabled | `Double_translation) -> assert false) + | `JavaScript, (`Cps | `Double_translation) | `Wasm, (`Disabled | `Jspi | `Cps) + -> Fun.id + | `JavaScript, `Jspi | `Wasm, `Double_translation -> assert false) +> map_fst deadcode' in if times () then Format.eprintf "Start Optimizing...@."; diff --git a/runtime/wasm/runtime.js b/runtime/wasm/runtime.js index bc946b5c7a..8139b75663 100644 --- a/runtime/wasm/runtime.js +++ b/runtime/wasm/runtime.js @@ -18,7 +18,7 @@ (js) => async (args) => { // biome-ignore lint/suspicious/noRedundantUseStrict: "use strict"; - const { link, src, generated } = args; + const { link, src, generated, disable_effects } = args; const isNode = globalThis.process?.versions?.node; @@ -124,7 +124,9 @@ return WebAssembly?.Suspending ? new WebAssembly.Suspending(f) : f; } function make_promising(f) { - return WebAssembly?.promising && f ? WebAssembly.promising(f) : f; + return !disable_effects && WebAssembly?.promising && f + ? WebAssembly.promising(f) + : f; } const decoder = new TextDecoder("utf-8", { ignoreBOM: 1 }); From 412bb0cfc2f11aff55dc89ac536aab907ca00930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Fri, 5 Sep 2025 12:02:33 +0200 Subject: [PATCH 04/13] Remove old github workflows --- .github/workflows/build-wasm_of_ocaml.yml | 225 ---------------------- .github/workflows/build.yml | 173 ----------------- 2 files changed, 398 deletions(-) delete mode 100644 .github/workflows/build-wasm_of_ocaml.yml delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build-wasm_of_ocaml.yml b/.github/workflows/build-wasm_of_ocaml.yml deleted file mode 100644 index 70f4c5ab10..0000000000 --- a/.github/workflows/build-wasm_of_ocaml.yml +++ /dev/null @@ -1,225 +0,0 @@ -name: Build wasm_of_ocaml - -on: - pull_request: - push: - branches: - - master - -jobs: - build: - env: - WASM_OF_OCAML: true - - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - ocaml-compiler: - - "4.14" - - "5.0" - - "5.1" - - "5.3" - separate_compilation: - - true - jane_street_tests: - - false - all_jane_street_tests: - - false - include: - - os: macos-latest - ocaml-compiler: "5.3" - separate_compilation: true - jane_street_tests: false - all_jane_street_tests: false - - os: windows-latest - ocaml-compiler: "5.2" - separate_compilation: true - jane_street_tests: true - all_jane_street_tests: true - - os: ubuntu-latest - ocaml-compiler: "5.2" - separate_compilation: true - jane_street_tests: true - all_jane_street_tests: true - - os: ubuntu-latest - ocaml-compiler: "5.2" - separate_compilation: false - jane_street_tests: true - all_jane_street_tests: false - - runs-on: ${{ matrix.os }} - - steps: - - name: Set git to use LF - if: ${{ matrix.os == 'windows-latest' && matrix.ocaml-compiler < 5.2 }} - run: | - git config --global core.autocrlf false - git config --global core.eol lf - git config --global core.ignorecase false - - - name: Checkout tree - uses: actions/checkout@v4 - with: - path: wasm_of_ocaml - - - name: Checkout Jane Street opam repository - if: matrix.jane_street_tests - uses: actions/checkout@v4 - with: - repository: janestreet/opam-repository - ref: 41c89c7824533f6b63cc5b6d75e6ddb1441d1520 - path: janestreet/opam-repository - - - name: Set-up Node.js - uses: actions/setup-node@v4 - with: - node-version: latest - - - name: Set-up OCaml ${{ matrix.ocaml-compiler }} - uses: ocaml/setup-ocaml@v3 - with: - ocaml-compiler: ${{ matrix.ocaml-compiler }} - - - name: Set-up Binaryen - uses: Aandreba/setup-binaryen@v1.0.0 - with: - token: ${{ github.token }} - - - name: Pin faked binaryen-bin package - # It's faster to use a cached version - run: opam install --fake binaryen-bin - - # Work-around a race between reinstalling mingw-w64-shims - # (because of conf-pkg-config optional dep) and installing other - # packages that implicitly depend on mingw-w64-shims. - - run: opam install conf-pkg-config conf-mingw-w64-gcc-i686 conf-mingw-w64-g++-x86_64 - if: runner.os == 'Windows' - - - name: Pin dune - if: runner.os == 'Windows' - run: opam pin add -n dune https://github.com/hhugo/dune.git#shorter-path-jsoo - - - name: Install dune - run: opam install dune - - - name: Pin wasm_of_ocaml - working-directory: ./wasm_of_ocaml - run: opam pin . -n --with-version dev - - - name: Checkout Jane Street packages - if: matrix.jane_street_tests - run: | - opam repo add js janestreet/opam-repository - opam install opam-format - opam exec -- dune exec --root wasm_of_ocaml tools/ci_setup.exe - - - name: Pin Jane Street packages - if: ${{ ! matrix.jane_street_tests }} - run: | - opam pin add -n base.v0.16.1 https://github.com/ocaml-wasm/base.git#wasm - opam pin add -n time_now.v0.16.1 https://github.com/ocaml-wasm/time_now.git#wasm - opam pin add -n ppx_inline_test.v0.16.1 https://github.com/ocaml-wasm/ppx_inline_test.git#wasm - opam pin add -n ppx_expect.v0.16.1 https://github.com/ocaml-wasm/ppx_expect.git#wasm - - - name: Install wasm_of_ocaml and its test dependencies - working-directory: ./wasm_of_ocaml - run: | - opam install . -t - - - name: Run tests - if: ${{ matrix.separate_compilation }} - working-directory: ./wasm_of_ocaml - run: opam exec -- dune build @runtest-wasm - - # we continue-on-error on windows because we seem to often hit - # an internal assert inside libuv. - # See https://github.com/libuv/libuv/issues/3622 - - - name: Run tests with CPS effects - if: ${{ matrix.ocaml-compiler >= '5.' && matrix.separate_compilation }} - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./wasm_of_ocaml - run: opam exec -- dune build @runtest-wasm --profile with-effects - - - name: Run Base tests - if: matrix.all_jane_street_tests - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/base - run: opam exec -- dune runtest - - - name: Run Base bigstring tests - if: matrix.all_jane_street_tests - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/base_bigstring - run: opam exec -- dune runtest - - - name: Run Core tests - if: matrix.all_jane_street_tests - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/core - run: opam exec -- dune runtest - - - name: Run Bignum tests - if: matrix.all_jane_street_tests - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/bignum - run: opam exec -- dune runtest - - - name: Run Bin_prot tests - if: matrix.all_jane_street_tests - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/bin_prot - run: opam exec -- dune runtest - - - name: Run String_dict tests - if: matrix.all_jane_street_tests - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/string_dict - run: opam exec -- dune runtest - - - name: Run Zarith tests - if: matrix.all_jane_street_tests - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/zarith_stubs_js - run: opam exec -- dune runtest - - - name: Run Virtual_dom tests - if: matrix.all_jane_street_tests - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/virtual_dom - run: opam exec -- dune runtest - - - name: Run Bonsai tests - if: ${{ matrix.all_jane_street_tests && matrix.os != 'windows-latest' }} - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/bonsai_test - run: opam exec -- dune runtest - - - name: Run Bonsai web tests - if: ${{ matrix.all_jane_street_tests && matrix.os != 'windows-latest' }} - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/bonsai_web_test - run: opam exec -- dune runtest - - - name: Run Bonsai web components' tests - if: ${{ matrix.all_jane_street_tests && matrix.os != 'windows-latest' }} - continue-on-error: ${{ matrix.os == 'windows-latest' }} - working-directory: ./janestreet/lib/bonsai_web_components - run: opam exec -- dune runtest - - - name: Run Bonsai tests (release profile) - if: ${{ ! matrix.separate_compilation }} - working-directory: ./janestreet/lib/bonsai_test - run: opam exec -- dune runtest --profile release - - - name: Run Bonsai web tests (release profile) - if: ${{ ! matrix.separate_compilation }} - working-directory: ./janestreet/lib/bonsai_web_test - run: opam exec -- dune runtest --profile release - - - name: Run Bonsai web components' tests (release profile) - if: ${{ ! matrix.separate_compilation }} - working-directory: ./janestreet/lib/bonsai_web_components - run: opam exec -- dune runtest --profile release diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 461bb5691c..0000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,173 +0,0 @@ -name: build - -on: - pull_request: - push: - branches: - - master - schedule: - # Prime the caches every Monday - - cron: 0 1 * * MON - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - ocaml-compiler: - - "4.13" - - "5.0" - - "5.1" - - "5.2" - skip-test: - - true - skip-doc: - - true - skip-effects: - - true - include: - - os: ubuntu-latest - ocaml-compiler: "4.14" - skip-effects: true - skip-test: false - skip-doc: true - - os: ubuntu-latest - ocaml-compiler: "ocaml-variants.4.14.2+options,ocaml-option-32bit" - skip-effects: true - skip-test: false - skip-doc: true - - os: macos-latest - ocaml-compiler: "4.14" - skip-effects: true - skip-test: false - skip-doc: true - - os: windows-latest - ocaml-compiler: "4.14" - skip-effects: true - skip-test: false - skip-doc: true - - os: ubuntu-latest - ocaml-compiler: "5.3" - skip-effects: false - skip-test: false - skip-doc: false - - os: ubuntu-latest - ocaml-compiler: "5.1" - skip-effects: false - skip-test: false - skip-doc: true - # Note this OCaml compiler is bytecode only - - os: ubuntu-latest - ocaml-compiler: "ocaml-variants.5.3.0+options,ocaml-option-32bit" - skip-effects: true # disabled for the same reason than `skip-test` - skip-test: true # the `time_now.0.17` package is pulled and doesn't work in 32 bits :( - skip-doc: true - - os: macos-latest - ocaml-compiler: "5.3" - skip-effects: true - skip-test: false - skip-doc: true - - os: windows-latest - ocaml-compiler: "5.3" - skip-effects: false - skip-test: false - skip-doc: true - - runs-on: ${{ matrix.os }} - - steps: - - name: Set git to use LF - if: ${{ matrix.os == 'windows-latest' && matrix.ocaml-compiler < 5.2 }} - run: | - git config --global core.autocrlf false - git config --global core.eol lf - git config --global core.ignorecase false - - - name: Checkout tree - uses: actions/checkout@v4 - - # EJGA: Note that I tried to fix this upstream as depext is - # getting much better, but no luck yet, c.f: - # https://github.com/ocaml/opam-repository/pull/26626 - - name: Install apt 32-bit dependencies - if: contains( matrix.ocaml-compiler, 'ocaml-option-32bit') - run: | - sudo apt-get install aptitude - sudo dpkg --add-architecture i386 - sudo aptitude -o Acquire::Retries=30 update -q - # Note we also install the 64-bit versions here as opam will - # try to install them anyways, so we save an apt-roundtrip. - sudo aptitude -o Acquire::Retries=30 install gcc-multilib g++-multilib pkg-config libgmp-dev libgmp-dev:i386 libx11-dev libx11-dev:i386 -y - - - name: Set-up Node.js - uses: actions/setup-node@v4 - with: - node-version: latest - - - name: Set-up OCaml ${{ matrix.ocaml-compiler }} - uses: ocaml/setup-ocaml@v3 - with: - ocaml-compiler: ${{ matrix.ocaml-compiler }} - - # Pin Dune to a version which supports the new --effects flag - # (https://github.com/ocaml/dune/pull/11222). - - name: Pin Dune - run: opam pin add --no-action dune https://github.com/OlivierNicole/dune.git#jsoo-effects - - # Work-around a race between reinstalling mingw-w64-shims - # (because of conf-pkg-config optional dep) and installing other - # packages that implicitly depend on mingw-w64-shims. - - run: opam install conf-pkg-config conf-mingw-w64-g++-i686 conf-mingw-w64-g++-x86_64 - if: runner.os == 'Windows' - - - name: Set-up Binaryen - uses: Aandreba/setup-binaryen@v1.0.0 - with: - token: ${{ github.token }} - - - name: Install faked binaryen-bin package - # It's faster to use a cached version - run: opam install --fake binaryen-bin - - - run: opam install . --best-effort - if: ${{ matrix.skip-test }} - - - run: opam install . --deps-only --with-test - # Install the test dependencies - if: ${{ !matrix.skip-test }} - - - run: opam install . - # Install the packages (without running the tests) - if: ${{ !matrix.skip-test }} - - - run: opam exec -- make all - if: ${{ !matrix.skip-test }} - - - run: opam exec -- make tests - if: ${{ !matrix.skip-test }} - - - run: opam exec -- dune build @all @runtest @runtest-js --profile with-effects - if: ${{ !matrix.skip-effects }} - - - run: opam exec -- dune build @all @runtest @runtest-js --profile with-effects-double-translation - if: ${{ !matrix.skip-effects }} - - - run: opam exec -- git diff --exit-code - if: ${{ !matrix.skip-test }} - - - name: build doc - if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master'}} - run: | - opam install odoc lwt_log yojson ocp-indent graphics higlo - opam exec -- make doc - - - name: synchronize doc - if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master' }} - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: wikidoc - folder: doc-dev - clean: true - target-folder: doc/dev/ From 0b39cc5f958b639795c25a51b6e897a71dfa991c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Wed, 18 Jun 2025 10:54:18 +0200 Subject: [PATCH 05/13] Runtime/wasm: add caml_bigstring_strncmp --- runtime/wasm/bigstring.wat | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/runtime/wasm/bigstring.wat b/runtime/wasm/bigstring.wat index 1d9afd2ae9..120eabd52f 100644 --- a/runtime/wasm/bigstring.wat +++ b/runtime/wasm/bigstring.wat @@ -225,6 +225,48 @@ (br $loop)))) (ref.i31 (i32.const -1))) + (func (export "caml_bigstring_strncmp") + (param $vs1 (ref eq)) + (param $vpos1 (ref eq)) + (param $vs2 (ref eq)) + (param $vpos2 (ref eq)) + (param $vlen (ref eq)) + (result (ref eq)) + + (local $v1 (ref extern)) + (local $v2 (ref extern)) + (local $pos1 i32) + (local $pos2 i32) + (local $len i32) + + (local $i i32) + (local $c1 i32) + (local $c2 i32) + + (local.set $v1 (call $caml_ba_get_view (local.get $vs1))) + (local.set $v2 (call $caml_ba_get_view (local.get $vs2))) + (local.set $pos1 (i31.get_s (ref.cast (ref i31) (local.get $vpos1)))) + (local.set $pos2 (i31.get_s (ref.cast (ref i31) (local.get $vpos2)))) + (local.set $len (i31.get_s (ref.cast (ref i31) (local.get $vlen)))) + (loop $loop + (if (i32.lt_u (local.get $i) (local.get $len)) + (then + (local.set $c1 + (call $dv_get_ui8 (local.get $v1) + (i32.add (local.get $pos1) (local.get $i)))) + (local.set $c2 + (call $dv_get_ui8 (local.get $v2) + (i32.add (local.get $pos2) (local.get $i)))) + (local.set $i (i32.add (local.get $i) (i32.const 1))) + (if (i32.lt_u (local.get $c1) (local.get $c2)) + (then (return (ref.i31 (i32.const -1))))) + (if (i32.gt_u (local.get $c1) (local.get $c2)) + (then (return (ref.i31 (i32.const 1))))) + (if (i32.eq (local.get $c1) (i32.const 0)) + (then (return (ref.i31 (i32.const 0))))) + (br $loop)))) + (ref.i31 (i32.const 0))) + (export "caml_bigstring_blit_string_to_ba" (func $caml_bigstring_blit_bytes_to_ba)) (func $caml_bigstring_blit_bytes_to_ba From 01dae16dc0401f85a9bf3cb66ee8f8ffe1f18fbe Mon Sep 17 00:00:00 2001 From: hhugo Date: Fri, 29 Aug 2025 12:10:49 +0200 Subject: [PATCH 06/13] Fix CI (#2095) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --------- Co-authored-by: Jérôme Vouillon --- dune-project | 2 +- js_of_ocaml-lwt.opam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dune-project b/dune-project index dcb969ad65..9ca8945745 100644 --- a/dune-project +++ b/dune-project @@ -46,7 +46,7 @@ (ocaml (>= 4.13)) (js_of_ocaml (= :version)) (js_of_ocaml-ppx (= :version)) - (lwt (>= 2.4.4)) + (lwt (and (>= 2.4.4) (<> 5.9.2))) (num :with-test) (ppx_expect (and (>= v0.14.2) :with-test)) (ppxlib (and (>= 0.22.0) :with-test)) diff --git a/js_of_ocaml-lwt.opam b/js_of_ocaml-lwt.opam index b8f1f4fe92..e210220301 100644 --- a/js_of_ocaml-lwt.opam +++ b/js_of_ocaml-lwt.opam @@ -16,7 +16,7 @@ depends: [ "ocaml" {>= "4.13"} "js_of_ocaml" {= version} "js_of_ocaml-ppx" {= version} - "lwt" {>= "2.4.4"} + "lwt" {>= "2.4.4" & != "5.9.2"} "num" {with-test} "ppx_expect" {>= "v0.14.2" & with-test} "ppxlib" {>= "0.22.0" & with-test} From 8a3f3961386c9a1340764c01058d6597b913d1d0 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 15 May 2025 09:15:54 +0200 Subject: [PATCH 07/13] Compiler: rewrite of js_assign --- compiler/lib/js_assign.ml | 189 ++++++++++++++++++++--------------- compiler/lib/var_printer.mli | 2 + 2 files changed, 110 insertions(+), 81 deletions(-) diff --git a/compiler/lib/js_assign.ml b/compiler/lib/js_assign.ml index 20d2e71f90..6e4a5ec9e6 100644 --- a/compiler/lib/js_assign.ml +++ b/compiler/lib/js_assign.ml @@ -83,9 +83,11 @@ while compiling the OCaml toplevel: type alloc = { mutable first_free : int ; used : BitSet.t + ; existing_names : StringSet.t } - let make_alloc_table () = { first_free = 0; used = BitSet.create () } + let make_alloc_table existing_names = + { first_free = 0; used = BitSet.create (); existing_names } let next_available a i = BitSet.next_free a.used (max i a.first_free) @@ -93,7 +95,9 @@ while compiling the OCaml toplevel: BitSet.set a.used i; if a.first_free = i then a.first_free <- BitSet.next_free a.used a.first_free - let is_available l i = List.for_all l ~f:(fun a -> not (BitSet.mem a.used i)) + let is_available l name i = + List.for_all l ~f:(fun a -> + (not (BitSet.mem a.used i)) && not (StringSet.mem name a.existing_names)) let first_available l = let rec find_rec n l = @@ -105,16 +109,16 @@ while compiling the OCaml toplevel: let mark_allocated l i = List.iter l ~f:(fun a -> allocate a i) type t = - { constr : alloc list array - ; (* Constraints on variables *) - mutable parameters : Var.t list array - ; (* Function parameters *) - mutable constraints : S.t list + { constr : alloc list array (* Constraints on variables *) + ; mutable parameters : Var.t list array (* Function parameters *) + ; printer : Var_printer.t } - (* For debugging *) - - let create nv = { constr = Array.make nv []; parameters = [| [] |]; constraints = [] } + let create nv = + { constr = Array.make nv [] + ; parameters = [| [] |] + ; printer = Var_printer.create Var_printer.Alphabet.javascript + } let allocate_variables t ~count = let weight v = try IdentMap.find (V (Var.of_idx v)) count with Not_found -> 0 in @@ -125,7 +129,7 @@ while compiling the OCaml toplevel: idx.(i) <- i done; Array.stable_sort idx ~cmp:(fun i j -> compare (weight j) (weight i)); - let name = Array.make len "" in + let names = Array.make len "" in let n0 = ref 0 in let n1 = ref 0 in let n2 = ref 0 in @@ -138,22 +142,19 @@ while compiling the OCaml toplevel: n2 := !n2 + weight i); n3 := !n3 + weight i in - let nm ~origin n = - let n = Var.to_string ~origin:(Var.of_idx origin) (Var.of_idx n) in - name.(origin) <- n - in let total = ref 0 in let bad = ref 0 in for i = 0 to Array.length t.parameters - 1 do + let name = Var_printer.to_string t.printer i in List.iter (List.rev t.parameters.(i)) ~f:(fun x -> incr total; let idx = Var.idx x in let l = constr.(idx) in - if is_available l i + if is_available l name i then ( - nm ~origin:idx i; + names.(idx) <- name; mark_allocated l i; stats idx i) else incr bad) @@ -165,29 +166,49 @@ while compiling the OCaml toplevel: (!total - !bad) !total; for i = 0 to len - 1 do - let l = constr.(idx.(i)) in - if (not (List.is_empty l)) && String.length name.(idx.(i)) = 0 - then ( - let n = first_available l in - let idx = idx.(i) in - nm ~origin:idx n; - mark_allocated l n; - stats idx n); - if List.is_empty l then assert (weight idx.(i) = 0) + let idx = idx.(i) in + let l = constr.(idx) in + (if (not (List.is_empty l)) && String.length names.(idx) = 0 + then + let rec loop () = + let n = first_available l in + let name = Var_printer.to_string t.printer n in + if List.for_all l ~f:(fun a -> not (StringSet.mem name a.existing_names)) + then ( + names.(idx) <- name; + mark_allocated l n; + stats idx n) + else ( + mark_allocated l n; + loop ()) + in + loop ()); + if List.is_empty l then assert (weight idx = 0) done; if debug_shortvar () then ( Format.eprintf "short variable count: %d/%d@." !n1 !n0; Format.eprintf "short variable occurrences: %d/%d@." !n2 !n3); - name + names let add_constraints global u ~offset (params : ident list) = let constr = global.constr in - let c = make_alloc_table () in - S.iter - (fun v -> - let i = Var.idx v in - constr.(i) <- c :: constr.(i)) + let existing_names = + Javascript.IdentSet.fold + (fun x acc -> + match x with + | V _ -> acc + | S { name = Utf8 name; _ } -> StringSet.add name acc) + u + StringSet.empty + in + let c = make_alloc_table existing_names in + Javascript.IdentSet.iter + (function + | S _ -> () + | V v -> + let i = Var.idx v in + constr.(i) <- c :: constr.(i)) u; let params = Array.of_list params in let len = Array.length params in @@ -206,8 +227,7 @@ while compiling the OCaml toplevel: match params.(i) with | V x -> global.parameters.(i + offset) <- x :: global.parameters.(i + offset) | _ -> () - done; - global.constraints <- u :: global.constraints + done let record_block state scope (block : Js_traverse.block) = let all = @@ -223,15 +243,6 @@ while compiling the OCaml toplevel: let ids = bound_idents_of_binding p in List.fold_left ids ~init:all ~f:(fun all i -> Javascript.IdentSet.add i all) in - let all = - Javascript.IdentSet.fold - (fun x acc -> - match x with - | V i -> S.add i acc - | S _ -> acc) - all - S.empty - in match block with | Normal -> add_constraints state all ~offset:0 [] | Catch (v, _) -> add_constraints state all ~offset:5 (bound_idents_of_binding v) @@ -249,7 +260,7 @@ module Preserve : Strategy = struct type t = { size : int - ; mutable scopes : (S.t * Js_traverse.t) list + ; mutable scopes : (S.t * Javascript.IdentSet.t) list } let create size = { size; scopes = [] } @@ -265,6 +276,11 @@ module Preserve : Strategy = struct Javascript.IdentSet.elements (IdentSet.union scope.Js_traverse.def_var scope.Js_traverse.def_local) in + let all = + Javascript.IdentSet.union + (Javascript.IdentSet.union scope.Js_traverse.def_var scope.Js_traverse.def_local) + scope.Js_traverse.use + in let defs = List.fold_left ~init:S.empty @@ -274,13 +290,12 @@ module Preserve : Strategy = struct | S _ -> acc) defs in - - t.scopes <- (defs, scope) :: t.scopes + t.scopes <- (defs, all) :: t.scopes let allocate_variables t ~count:_ = let names = Array.make t.size "" in - List.iter t.scopes ~f:(fun (defs, state) -> - let assigned = + List.iter t.scopes ~f:(fun (defs, all) -> + let reserved = IdentSet.fold (fun var acc -> match var with @@ -288,35 +303,51 @@ module Preserve : Strategy = struct | V v -> let name = names.(Var.idx v) in if not (String.is_empty name) then StringSet.add name acc else acc) - (IdentSet.union - state.Js_traverse.use - (IdentSet.union state.Js_traverse.def_var state.Js_traverse.def_local)) - Reserved.keyword + all + StringSet.empty in - let _assigned = + let unamed = ref 0 in + let _reserved = S.fold - (fun var assigned -> + (fun var reserved -> assert (String.is_empty names.(Var.idx var)); let name = match Var.get_name var with | Some expected_name -> assert (not (String.is_empty expected_name)); - if not (StringSet.mem expected_name assigned) + assert (not (StringSet.mem expected_name Reserved.keyword)); + if not (StringSet.mem expected_name reserved) then expected_name else + let expected_name = + if Char.equal expected_name.[String.length expected_name - 1] '$' + then expected_name + else expected_name ^ "$" + in let i = ref 0 in while - StringSet.mem (Printf.sprintf "%s$%d" expected_name !i) assigned + StringSet.mem (Printf.sprintf "%s%d" expected_name !i) reserved do incr i done; - Printf.sprintf "%s$%d" expected_name !i - | None -> Var.to_string var + Printf.sprintf "%s%d" expected_name !i + | None -> + while + let name = + Var_printer.Alphabet.to_string + Var_printer.Alphabet.javascript + !unamed + in + StringSet.mem name reserved || StringSet.mem name Reserved.keyword + do + incr unamed + done; + Var_printer.Alphabet.to_string Var_printer.Alphabet.javascript !unamed in names.(Var.idx var) <- name; - StringSet.add name assigned) + StringSet.add name reserved) defs - assigned + reserved in ()); names @@ -352,7 +383,9 @@ class traverse_labels h = class name ident label = object (m) - inherit Js_traverse.subst ident as super + inherit Js_traverse.map as super + + method ident x = ident x method statement = function @@ -374,24 +407,22 @@ let program' (module Strategy : Strategy) p = o#program p in mapper#record_block Normal; - let free = - IdentSet.filter - (function - | V _ -> true - | S _ -> false) + let freevar = + IdentSet.fold + (fun ident acc -> + match ident with + | V v -> Var.Set.add v acc + | S _ -> acc) mapper#get_free + Var.Set.empty in - let has_free_var = IdentSet.cardinal free <> 0 in + let has_free_var = not (Var.Set.is_empty freevar) in let unallocated_names = ref Var.Set.empty in let names = Strategy.allocate_variables state ~count:mapper#get_count in (* ignore the choosen name for escaping/free [V _] variables *) - IdentSet.iter - (function - | S _ -> () - | V x -> names.(Var.idx x) <- "") - free; + Var.Set.iter (fun x -> names.(Var.idx x) <- "") freevar; let ident = function - | V v -> ( + | V v as x -> ( if Config.Flag.stable_var () then ident ~var:v (Utf8_string.of_string_exn (Printf.sprintf "v%d" (Code.Var.idx v))) @@ -400,9 +431,9 @@ let program' (module Strategy : Strategy) p = match name with | "" -> unallocated_names := Var.Set.add v !unallocated_names; - V v + x | _ -> ident ~var:v (Utf8_string.of_string_exn name)) - | x -> x + | S _ as x -> x in let label_printer = Var_printer.create Var_printer.Alphabet.javascript in let max_label_depth = Hashtbl.fold (fun _ d acc -> max d acc) labels 0 in @@ -423,7 +454,7 @@ let program' (module Strategy : Strategy) p = then Format.eprintf "Some variables escaped (#%d). Use [--debug js_assign] for more info.@." - (IdentSet.cardinal free) + (Var.Set.cardinal freevar) else let (_ : Source_map.info) = Js_output.program @@ -432,11 +463,7 @@ let program' (module Strategy : Strategy) p = p in Format.eprintf "Some variables escaped:"; - IdentSet.iter - (function - | S _ -> () - | V v -> Format.eprintf " <%s>" (Var.to_string v)) - free; + Var.Set.iter (fun v -> Format.eprintf " <%a>" Var.print v) freevar; Format.eprintf "@." in assert false); diff --git a/compiler/lib/var_printer.mli b/compiler/lib/var_printer.mli index 4071b8adc0..79cd36b429 100644 --- a/compiler/lib/var_printer.mli +++ b/compiler/lib/var_printer.mli @@ -23,6 +23,8 @@ module Alphabet : sig type t val javascript : t + + val to_string : t -> int -> string end type t From d38a4ace149128ea926c6a271c57235f79ca3037 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 15 May 2025 10:32:38 +0200 Subject: [PATCH 08/13] Compiler: cleanup deadcode and small refactoring --- compiler/bin-jsoo_minify/jsoo_minify.ml | 12 -- compiler/bin-wasm_of_ocaml/compile.ml | 5 +- compiler/lib-wasm/wasm_output.ml | 2 - compiler/lib/code.ml | 111 ++++++++++++++---- compiler/lib/code.mli | 8 +- compiler/lib/driver.ml | 17 +-- compiler/lib/effects.ml | 5 +- compiler/lib/generate_closure.ml | 9 +- compiler/lib/js_assign.ml | 19 ++-- compiler/lib/js_output.ml | 2 +- compiler/lib/js_traverse.ml | 8 -- compiler/lib/js_traverse.mli | 4 - compiler/lib/lambda_lifting.ml | 5 +- compiler/lib/lambda_lifting_simple.ml | 19 ++-- compiler/lib/parse_bytecode.ml | 14 +-- compiler/lib/var_printer.ml | 143 +++--------------------- compiler/lib/var_printer.mli | 20 +--- 17 files changed, 152 insertions(+), 251 deletions(-) diff --git a/compiler/bin-jsoo_minify/jsoo_minify.ml b/compiler/bin-jsoo_minify/jsoo_minify.ml index 883b3ee78b..f1640187fd 100644 --- a/compiler/bin-jsoo_minify/jsoo_minify.ml +++ b/compiler/bin-jsoo_minify/jsoo_minify.ml @@ -45,7 +45,6 @@ let f { Cmd_arg.common; output_file; use_stdin; files } = let gen pp = let pretty = Config.Flag.pretty () in Pretty_print.set_compact pp (not pretty); - Code.Var.set_pretty pretty; let error_of_pi pi = match pi with | { Parse_info.name = Some src; line; col; _ } @@ -67,17 +66,6 @@ let f { Cmd_arg.common; output_file; use_stdin; files } = try p @ Parse_js.parse lex with Parse_js.Parsing_error pi -> error_of_pi pi else p in - let free = new Js_traverse.free in - let (_ : Javascript.program) = free#program p in - let toplevel_def_and_use = - let state = free#state in - Javascript.IdentSet.union state.def_var state.use - in - Javascript.IdentSet.iter - (function - | V _ -> () - | S { name = Utf8_string.Utf8 x; _ } -> Var_printer.add_reserved x) - toplevel_def_and_use; let true_ () = true in let open Config in let passes : ((unit -> bool) * (unit -> Js_traverse.mapper)) list = diff --git a/compiler/bin-wasm_of_ocaml/compile.ml b/compiler/bin-wasm_of_ocaml/compile.ml index 7bdb0628ba..2f83b97df7 100644 --- a/compiler/bin-wasm_of_ocaml/compile.ml +++ b/compiler/bin-wasm_of_ocaml/compile.ml @@ -70,10 +70,7 @@ let opt_with action x f = | None -> f None | Some x -> action x (fun y -> f (Some y)) -let output_gen output_file f = - Code.Var.set_pretty true; - Code.Var.set_stable (Config.Flag.stable_var ()); - Filename.gen_file output_file f +let output_gen output_file f = Filename.gen_file output_file f let with_runtime_files ~runtime_wasm_files f = let inputs = diff --git a/compiler/lib-wasm/wasm_output.ml b/compiler/lib-wasm/wasm_output.ml index 408dc538bd..0edc81343c 100644 --- a/compiler/lib-wasm/wasm_output.ml +++ b/compiler/lib-wasm/wasm_output.ml @@ -1173,6 +1173,4 @@ let f ch fields = let string = output_string end) in - Code.Var.set_pretty true; - Code.Var.set_stable (Config.Flag.stable_var ()); O.output_module ch fields diff --git a/compiler/lib/code.ml b/compiler/lib/code.ml index 05249533e8..aaca07a83a 100644 --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml @@ -63,8 +63,6 @@ module Var : sig val of_idx : int -> t - val to_string : ?origin:t -> t -> string - val fresh : unit -> t val fresh_n : string -> t @@ -75,7 +73,7 @@ module Var : sig val compare : t -> t -> int - val name : t -> string -> unit + val set_name : t -> string -> unit val get_name : t -> string option @@ -83,10 +81,6 @@ module Var : sig val reset : unit -> unit - val set_pretty : bool -> unit - - val set_stable : bool -> unit - module Set : Set.S with type elt = t module Map : Map.S with type key = t @@ -155,19 +149,98 @@ end = struct let printer = Var_printer.create Var_printer.Alphabet.javascript + module Name = struct + let names = Hashtbl.create 100 + + let reset () = Hashtbl.clear names + + let reserved = Hashtbl.create 100 + + let () = StringSet.iter (fun s -> Hashtbl.add reserved s ()) Reserved.keyword + + let is_reserved s = Hashtbl.mem reserved s + + let merge n1 n2 = + match n1, n2 with + | "", n2 -> n2 + | n1, "" -> n1 + | n1, n2 -> + if generated_name n1 + then n2 + else if generated_name n2 + then n1 + else if String.length n1 > String.length n2 + then n1 + else n2 + + let set_raw v nm = Hashtbl.replace names v nm + + let propagate v v' = + try + let name = Hashtbl.find names v in + match Hashtbl.find names v' with + | exception Not_found -> set_raw v' name + | name' -> set_raw v' (merge name name') + with Not_found -> () + + let set v nm_orig = + let len = String.length nm_orig in + if len > 0 + then ( + let buf = Buffer.create (String.length nm_orig) in + let idx = ref 0 in + while !idx < len && not (Char.is_letter nm_orig.[!idx]) do + incr idx + done; + let pending = ref false in + if !idx >= len + then ( + pending := true; + idx := 0); + for i = !idx to len - 1 do + if Char.is_letter nm_orig.[i] || Char.is_digit nm_orig.[i] + then ( + if !pending then Buffer.add_char buf '_'; + Buffer.add_char buf nm_orig.[i]; + pending := false) + else pending := true + done; + let str = Buffer.contents buf in + let str = + match str, nm_orig with + | "", ">>=" -> "symbol_bind" + | "", ">>|" -> "symbol_map" + | "", "^" -> "symbol_concat" + | "", _ -> "symbol" + | str, _ -> if is_reserved str then str ^ "$" else str + in + (* protect against large names *) + let max_len = 30 in + let str = + if String.length str > max_len then String.sub str ~pos:0 ~len:max_len else str + in + set_raw v str) + + let get v = try Some (Hashtbl.find names v) with Not_found -> None + end + let last_var = ref 0 let reset () = last_var := 0; - Var_printer.reset printer - - let to_string ?origin i = Var_printer.to_string printer ?origin i - - let print f x = Format.fprintf f "v%d" x + Var_printer.reset printer; + Name.reset () - (* Format.fprintf f "%s" (to_string x) *) + let print f x = + Format.fprintf + f + "v%d%s" + x + (match Name.get x with + | None -> "" + | Some nm -> "{" ^ nm ^ "}") - let name i nm = Var_printer.name printer i nm + let set_name i nm = Name.set i nm let fresh () = incr last_var; @@ -175,7 +248,7 @@ end = struct let fresh_n nm = incr last_var; - name !last_var nm; + set_name !last_var nm; !last_var let count () = !last_var + 1 @@ -184,13 +257,9 @@ end = struct let of_idx v = v - let get_name i = Var_printer.get_name printer i - - let propagate_name i j = Var_printer.propagate_name printer i j - - let set_pretty b = Var_printer.set_pretty printer b + let get_name i = Name.get i - let set_stable b = Var_printer.set_stable printer b + let propagate_name i j = Name.propagate i j let fork o = let n = fresh () in diff --git a/compiler/lib/code.mli b/compiler/lib/code.mli index e39038a8bc..ce1a1db997 100644 --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli @@ -56,8 +56,6 @@ module Var : sig val of_idx : int -> t - val to_string : ?origin:t -> t -> string - val fresh : unit -> t val fresh_n : string -> t @@ -70,16 +68,12 @@ module Var : sig val get_name : t -> string option - val name : t -> string -> unit + val set_name : t -> string -> unit val propagate_name : t -> t -> unit val reset : unit -> unit - val set_pretty : bool -> unit - - val set_stable : bool -> unit - module Set : Set.S with type elt = t module Map : Map.S with type key = t diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index 3e4798fb29..a201c4267c 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -463,8 +463,6 @@ let check_js js = let missing = StringSet.inter free all_external in let missing = StringSet.diff missing Reserved.provided in let other = StringSet.diff free missing in - let res = Var_printer.get_reserved () in - let other = StringSet.diff other res in if not (StringSet.is_empty missing) then report_missing_primitives missing; let probably_prov = StringSet.inter other Reserved.provided in let other = StringSet.diff other probably_prov in @@ -493,17 +491,6 @@ let name_variables js = in let traverse = new Js_traverse.free in let js = traverse#program js in - let free = traverse#get_free in - Javascript.IdentSet.iter - (fun x -> - match x with - | V _ -> - (* This is an error. We don't complain here as we want - to be able to name other variable to make it - easier to spot the problematic ones *) - () - | S { name = Utf8 x; _ } -> Var_printer.add_reserved x) - free; let js = Js_assign.program js in if times () then Format.eprintf " coloring: %a@." Timer.print t; js @@ -672,9 +659,7 @@ let simplify_js js = let configure formatter = let pretty = Config.Flag.pretty () in - Pretty_print.set_compact formatter (not pretty); - Code.Var.set_pretty (pretty && not (Config.Flag.shortvar ())); - Code.Var.set_stable (Config.Flag.stable_var ()) + Pretty_print.set_compact formatter (not pretty) let link_and_pack ?(standalone = true) ?(wrap_with_fun = `Iife) ?(link = `No) p = let export_runtime = diff --git a/compiler/lib/effects.ml b/compiler/lib/effects.ml index bd9568e052..c256b50744 100644 --- a/compiler/lib/effects.ml +++ b/compiler/lib/effects.ml @@ -776,8 +776,7 @@ let cps_transform ~live_vars ~flow_info ~cps_needed p = Code.fold_closures_innermost_first p (fun name_opt params (start, args) ({ Code.blocks; free_pc; _ } as p) -> - Option.iter name_opt ~f:(fun v -> - debug_print "@[cname = %s@,@]" @@ Var.to_string v); + Option.iter name_opt ~f:(fun v -> debug_print "@[cname = %a@,@]" Var.print v); (* We speculatively add a block at the beginning of the function. In case of tail-recursion optimization, the function implementing the loop body may have to be placed @@ -1175,7 +1174,7 @@ let f ~flow_info ~live_vars p = then ( debug_print "@]"; debug_print "@[cps_needed (after lifting) = @["; - Var.Set.iter (fun v -> debug_print "%s,@ " (Var.to_string v)) cps_needed; + Var.Set.iter (fun v -> debug_print "%a,@ " Var.print v) cps_needed; debug_print "@]@,@]"; debug_print "@[After lambda lifting...@,"; Code.Print.program (fun _ _ -> "") p; diff --git a/compiler/lib/generate_closure.ml b/compiler/lib/generate_closure.ml index 3285e535b8..5ab2385ff0 100644 --- a/compiler/lib/generate_closure.ml +++ b/compiler/lib/generate_closure.ml @@ -168,8 +168,11 @@ module Trampoline = struct then ( Format.eprintf "Detect cycles of size (%d).\n%!" (List.length all); Format.eprintf - "%s\n%!" - (String.concat ~sep:", " (List.map all ~f:(fun x -> Var.to_string x)))); + "%a\n%!" + (Format.pp_print_list + ~pp_sep:(fun fmt () -> Format.pp_print_string fmt ", ") + Var.print) + all); let tailcall_max_depth = Config.Param.tailcall_max_depth () in let all = List.map all ~f:(fun id -> @@ -182,7 +185,7 @@ module Trampoline = struct ~init:(blocks, free_pc, []) ~f:(fun (blocks, free_pc, closures) (counter, ci) -> if debug_tc () - then Format.eprintf "Rewriting for %s\n%!" (Var.to_string ci.f_name); + then Format.eprintf "Rewriting for %a\n%!" Var.print ci.f_name; let new_f = Code.Var.fork ci.f_name in let new_args = List.map ci.args ~f:Code.Var.fork in let wrapper_pc = free_pc in diff --git a/compiler/lib/js_assign.ml b/compiler/lib/js_assign.ml index 6e4a5ec9e6..ac859ea359 100644 --- a/compiler/lib/js_assign.ml +++ b/compiler/lib/js_assign.ml @@ -421,19 +421,24 @@ let program' (module Strategy : Strategy) p = let names = Strategy.allocate_variables state ~count:mapper#get_count in (* ignore the choosen name for escaping/free [V _] variables *) Var.Set.iter (fun x -> names.(Var.idx x) <- "") freevar; - let ident = function - | V v as x -> ( - if Config.Flag.stable_var () - then - ident ~var:v (Utf8_string.of_string_exn (Printf.sprintf "v%d" (Code.Var.idx v))) - else + let ident = + if Config.Flag.stable_var () + then + function + | S _ as x -> x + | V v -> + let name = Printf.sprintf "v%d" (Code.Var.idx v) in + ident ~var:v (Utf8_string.of_string_exn name) + else + function + | S _ as x -> x + | V v as x -> ( let name = names.(Var.idx v) in match name with | "" -> unallocated_names := Var.Set.add v !unallocated_names; x | _ -> ident ~var:v (Utf8_string.of_string_exn name)) - | S _ as x -> x in let label_printer = Var_printer.create Var_printer.Alphabet.javascript in let max_label_depth = Hashtbl.fold (fun _ d acc -> max d acc) labels 0 in diff --git a/compiler/lib/js_output.ml b/compiler/lib/js_output.ml index f547dc62d2..ea6a24573f 100644 --- a/compiler/lib/js_output.ml +++ b/compiler/lib/js_output.ml @@ -242,7 +242,7 @@ struct | S { name = Utf8 name; var = None; _ } -> PP.string f name | V v -> assert accept_unnamed_var; - PP.string f ("<" ^ Code.Var.to_string v ^ ">") + PP.string f (Format.asprintf "<%a>" Code.Var.print v) let opt_identifier f ~kind i = match i with diff --git a/compiler/lib/js_traverse.ml b/compiler/lib/js_traverse.ml index 5891d7278b..98088c478c 100644 --- a/compiler/lib/js_traverse.ml +++ b/compiler/lib/js_traverse.ml @@ -761,14 +761,6 @@ class iter : iterator = method function_body x = m#statements x end -(* var substitution *) -class subst sub = - object - inherit map - - method ident x = sub x - end - class map_for_share_constant = object (m) inherit map as super diff --git a/compiler/lib/js_traverse.mli b/compiler/lib/js_traverse.mli index 98fd3506ee..5809fd25a4 100644 --- a/compiler/lib/js_traverse.mli +++ b/compiler/lib/js_traverse.mli @@ -120,10 +120,6 @@ class map : mapper class iter : iterator -class subst : (ident -> ident) -> object - inherit mapper -end - type t = { use : IdentSet.t ; def_var : IdentSet.t diff --git a/compiler/lib/lambda_lifting.ml b/compiler/lib/lambda_lifting.ml index e37843c4bd..d8eca0a77c 100644 --- a/compiler/lib/lambda_lifting.ml +++ b/compiler/lib/lambda_lifting.ml @@ -183,8 +183,9 @@ let rec traverse var_depth (program, functions) pc depth limit = if debug () then Format.eprintf - "LIFT %s (depth:%d free_vars:%d inner_depth:%d)@." - (Code.Var.to_string f'') + "LIFT %a (depth:%d free_vars:%d inner_depth:%d)@." + Code.Var.print + f'' depth (Var.Set.cardinal free_vars) (compute_depth program pc'); diff --git a/compiler/lib/lambda_lifting_simple.ml b/compiler/lib/lambda_lifting_simple.ml index ee52523011..63e1a3d6a0 100644 --- a/compiler/lib/lambda_lifting_simple.ml +++ b/compiler/lib/lambda_lifting_simple.ml @@ -127,8 +127,7 @@ and rewrite_body && (inside_lifted || Var.Set.mem f to_lift) && not (starts_with_closure rem) -> (* We lift an isolated closure *) - if debug () - then Format.eprintf "@[lifting isolated closure %s@,@]" (Var.to_string f); + if debug () then Format.eprintf "@[lifting isolated closure %a@,@]" Var.print f; let program, functions, lifters = rewrite_blocks ~to_lift @@ -142,7 +141,7 @@ and rewrite_body if debug () then ( Format.eprintf "@[free variables:@,"; - free_vars |> Var.Set.iter (fun v -> Format.eprintf "%s,@ " (Var.to_string v)); + free_vars |> Var.Set.iter (fun v -> Format.eprintf "%a,@ " Var.print v); Format.eprintf "@]"); let s = Var.Set.fold (fun x m -> Var.Map.add x (Var.fork x) m) free_vars Var.Map.empty @@ -154,8 +153,9 @@ and rewrite_body if debug () then Format.eprintf - "LIFT %s (depth:%d free_vars:%d inner_depth:%d)@." - (Code.Var.to_string f'') + "LIFT %a (depth:%d free_vars:%d inner_depth:%d)@." + Code.Var.print + f'' depth (Var.Set.cardinal free_vars) (compute_depth program pc'); @@ -250,10 +250,11 @@ and rewrite_body then Format.( eprintf - "LIFT %a in tuple %s (depth:%d free_vars:%d)@," - (pp_print_list ~pp_sep:pp_print_space pp_print_string) - (List.map ~f:Code.Var.to_string f's) - (Code.Var.to_string f_tuple) + "LIFT %a in tuple %a (depth:%d free_vars:%d)@," + (pp_print_list ~pp_sep:pp_print_space Code.Var.print) + f's + Code.Var.print + f_tuple depth (Var.Set.cardinal free_vars))); let pc_tuple = program.free_pc in diff --git a/compiler/lib/parse_bytecode.ml b/compiler/lib/parse_bytecode.ml index 652af538aa..ec23bcbc3e 100644 --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml @@ -656,7 +656,7 @@ module State = struct match l, s with | [], _ -> () | (j, ident) :: lrem, Var v :: srem when i = j -> - Var.name v (Ident.name ident); + Var.set_name v (Ident.name ident); name_rec debug (i + 1) lrem srem summary | (j, _) :: _, _ :: srem when i < j -> name_rec debug (i + 1) l srem summary | _ -> assert false @@ -704,7 +704,7 @@ let register_global ?(force = false) g i rem = | None -> assert false | Some name -> name in - Code.Var.name (access_global g i) name; + Var.set_name (access_global g i) name; Let ( Var.fresh () , Prim (Extern "caml_set_global", [ Pc (String name); Pv (access_global g i) ]) ) @@ -716,7 +716,7 @@ let register_global ?(force = false) g i rem = match g.named_value.(i) with | None -> [] | Some name -> - Code.Var.name (access_global g i) name; + Var.set_name (access_global g i) name; [ Pc (match target with | `JavaScript -> NativeString (Native_string.of_string name) @@ -1223,7 +1223,7 @@ and compile infos pc state (instrs : instr list) = (match !rec_names with | (j, ident) :: rest -> assert (j = i); - Var.name x (Ident.name ident); + Var.set_name x (Ident.name ident); rec_names := rest | [] -> ()); vars := (i, x) :: !vars; @@ -2756,7 +2756,7 @@ let from_bytes ~prims ~debug (code : bytecode) = then match find_name i with | None -> () - | Some name -> Code.Var.name x name); + | Some name -> Code.Var.set_name x name); need_gdata := true; Let (x, Field (gdata, i, Non_float)) :: l | _ -> l) @@ -2888,11 +2888,11 @@ let from_compilation_units ~includes:_ ~include_cmis ~debug_data l = let l = register_global globals i l in let cst = globals.constants.(i) in (match cst, Code.Var.get_name x with - | String str, None -> Code.Var.name x (Printf.sprintf "cst_%s" str) + | String str, None -> Var.set_name x (Printf.sprintf "cst_%s" str) | _ -> ()); Let (x, Constant cst) :: l | Some name -> - Var.name x name; + Var.set_name x name; need_gdata := true; Let ( x diff --git a/compiler/lib/var_printer.ml b/compiler/lib/var_printer.ml index b075803e37..b13d1f4b1b 100644 --- a/compiler/lib/var_printer.ml +++ b/compiler/lib/var_printer.ml @@ -55,147 +55,34 @@ module Alphabet = struct end type t = - { names : (int, string) Hashtbl.t - ; known : (int, string) Hashtbl.t - ; cache : (int * int, string) Hashtbl.t + { known : (int, string) Hashtbl.t ; alphabet : Alphabet.t ; mutable last : int - ; mutable pretty : bool - ; mutable stable : bool } -let name_raw t v nm = Hashtbl.replace t.names v nm +let reserved = Hashtbl.create 100 -let merge_name n1 n2 = - match n1, n2 with - | "", n2 -> n2 - | n1, "" -> n1 - | n1, n2 -> - if generated_name n1 - then n2 - else if generated_name n2 - then n1 - else if String.length n1 > String.length n2 - then n1 - else n2 +let () = StringSet.iter (fun s -> Hashtbl.add reserved s ()) Reserved.keyword -let propagate_name t v v' = - try - let name = Hashtbl.find t.names v in - match Hashtbl.find t.names v' with - | exception Not_found -> name_raw t v' name - | name' -> name_raw t v' (merge_name name name') - with Not_found -> () +let is_reserved s = Hashtbl.mem reserved s -let name t v nm_orig = - let len = String.length nm_orig in - if len > 0 - then ( - let buf = Buffer.create (String.length nm_orig) in - let idx = ref 0 in - while !idx < len && not (Char.is_letter nm_orig.[!idx]) do - incr idx - done; - let pending = ref false in - if !idx >= len - then ( - pending := true; - idx := 0); - for i = !idx to len - 1 do - if Char.is_letter nm_orig.[i] || Char.is_digit nm_orig.[i] - then ( - if !pending then Buffer.add_char buf '_'; - Buffer.add_char buf nm_orig.[i]; - pending := false) - else pending := true - done; - let str = Buffer.contents buf in - let str = - match str, nm_orig with - | "", ">>=" -> "symbol_bind" - | "", ">>|" -> "symbol_map" - | "", "^" -> "symbol_concat" - | "", _ -> "symbol" - | str, _ -> str - in - (* protect against large names *) - let max_len = 30 in - let str = - if String.length str > max_len then String.sub str ~pos:0 ~len:max_len else str - in - name_raw t v str) - -let get_name t v = try Some (Hashtbl.find t.names v) with Not_found -> None - -let format_var t i x = - let s = Alphabet.to_string t.alphabet x in - if t.stable - then Format.sprintf "v%d" i - else if t.pretty - then Format.sprintf "_%s_" s - else s - -let reserved = ref StringSet.empty - -let add_reserved s = reserved := StringSet.add s !reserved - -let _ = reserved := StringSet.union !reserved Reserved.keyword - -let get_reserved () = !reserved - -let is_reserved s = StringSet.mem s !reserved - -let rec to_string t ?origin i = - let origin = - match origin with - | Some i when t.pretty -> i - | _ -> i - in - try Hashtbl.find t.cache (i, origin) - with Not_found -> - let name = - try Hashtbl.find t.known i - with Not_found -> - t.last <- t.last + 1; - let j = t.last in - let s = format_var t i j in +let to_string t i = + match Hashtbl.find t.known i with + | name -> name + | exception Not_found -> + let rec loop t i j = + let s = Alphabet.to_string t.alphabet j in if is_reserved s - then to_string t i + then loop t i (j + 1) else ( Hashtbl.add t.known i s; + t.last <- j; s) - in - let name = - if t.pretty - then - try - let nm = Hashtbl.find t.names origin in - nm ^ name - with Not_found -> name - else name - in - Hashtbl.add t.cache (i, origin) name; - name - -let set_pretty t b = t.pretty <- b - -let set_stable t b = t.stable <- b + in + loop t i (t.last + 1) let reset t = - Hashtbl.clear t.names; Hashtbl.clear t.known; - Hashtbl.clear t.cache; t.last <- -1 -let create ?(pretty = false) ?(stable = false) alphabet = - let t = - { names = Hashtbl.create 107 - ; known = Hashtbl.create 1001 - ; cache = Hashtbl.create 1001 - ; alphabet - ; last = -1 - ; pretty - ; stable - } - in - t +let create alphabet = { known = Hashtbl.create 1001; alphabet; last = -1 } diff --git a/compiler/lib/var_printer.mli b/compiler/lib/var_printer.mli index 79cd36b429..115f5b0010 100644 --- a/compiler/lib/var_printer.mli +++ b/compiler/lib/var_printer.mli @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -open Stdlib +open! Stdlib module Alphabet : sig type t @@ -29,22 +29,8 @@ end type t -val add_reserved : string -> unit - -val get_reserved : unit -> StringSet.t - -val create : ?pretty:bool -> ?stable:bool -> Alphabet.t -> t +val create : Alphabet.t -> t val reset : t -> unit -val to_string : t -> ?origin:int -> int -> string - -val name : t -> int -> string -> unit - -val get_name : t -> int -> string option - -val propagate_name : t -> int -> int -> unit - -val set_pretty : t -> bool -> unit - -val set_stable : t -> bool -> unit +val to_string : t -> int -> string From caac1325ab8805ec75cc96fd0287b919f0e856a4 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 15 May 2025 09:17:11 +0200 Subject: [PATCH 09/13] Compiler: do not mark free variable as reserved --- compiler/lib/driver.ml | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/lib/driver.ml b/compiler/lib/driver.ml index a201c4267c..47029a6ac0 100644 --- a/compiler/lib/driver.ml +++ b/compiler/lib/driver.ml @@ -489,8 +489,6 @@ let name_variables js = js) else js in - let traverse = new Js_traverse.free in - let js = traverse#program js in let js = Js_assign.program js in if times () then Format.eprintf " coloring: %a@." Timer.print t; js From 629d18c5ad849cb91992385fc1d300d57ab3f62e Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 15 May 2025 14:19:01 +0200 Subject: [PATCH 10/13] Compiler: new debug option to emit uniq variable names in pretty mode --- compiler/lib/js_assign.ml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/compiler/lib/js_assign.ml b/compiler/lib/js_assign.ml index ac859ea359..5f08c458a2 100644 --- a/compiler/lib/js_assign.ml +++ b/compiler/lib/js_assign.ml @@ -292,8 +292,19 @@ module Preserve : Strategy = struct in t.scopes <- (defs, all) :: t.scopes + let uniq_var = Debug.find "var" + let allocate_variables t ~count:_ = let names = Array.make t.size "" in + let uniq_var = uniq_var () in + let unamed = ref 0 in + let create_unamed = + if uniq_var + then + fun i -> + "_" ^ Var_printer.Alphabet.to_string Var_printer.Alphabet.javascript i ^ "_" + else fun i -> Var_printer.Alphabet.to_string Var_printer.Alphabet.javascript i + in List.iter t.scopes ~f:(fun (defs, all) -> let reserved = IdentSet.fold @@ -306,7 +317,7 @@ module Preserve : Strategy = struct all StringSet.empty in - let unamed = ref 0 in + if not uniq_var then unamed := 0; let _reserved = S.fold (fun var reserved -> @@ -333,16 +344,12 @@ module Preserve : Strategy = struct Printf.sprintf "%s%d" expected_name !i | None -> while - let name = - Var_printer.Alphabet.to_string - Var_printer.Alphabet.javascript - !unamed - in + let name = create_unamed !unamed in StringSet.mem name reserved || StringSet.mem name Reserved.keyword do incr unamed done; - Var_printer.Alphabet.to_string Var_printer.Alphabet.javascript !unamed + create_unamed !unamed in names.(Var.idx var) <- name; StringSet.add name reserved) From 0d84c656c34250c2e08c66e2f766f399458d8f2b Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Fri, 16 May 2025 09:36:36 +0200 Subject: [PATCH 11/13] Compiler: change how we allocate variables with the Preserve strat --- compiler/lib/js_assign.ml | 56 ++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/compiler/lib/js_assign.ml b/compiler/lib/js_assign.ml index 5f08c458a2..f901663140 100644 --- a/compiler/lib/js_assign.ml +++ b/compiler/lib/js_assign.ml @@ -294,7 +294,7 @@ module Preserve : Strategy = struct let uniq_var = Debug.find "var" - let allocate_variables t ~count:_ = + let allocate_variables t ~count = let names = Array.make t.size "" in let uniq_var = uniq_var () in let unamed = ref 0 in @@ -317,16 +317,16 @@ module Preserve : Strategy = struct all StringSet.empty in - if not uniq_var then unamed := 0; - let _reserved = + (* We first allocate variable that have a name *) + let reserved, others = S.fold - (fun var reserved -> + (fun var (reserved, others) -> assert (String.is_empty names.(Var.idx var)); - let name = - match Var.get_name var with - | Some expected_name -> - assert (not (String.is_empty expected_name)); - assert (not (StringSet.mem expected_name Reserved.keyword)); + match Var.get_name var with + | Some expected_name -> + assert (not (String.is_empty expected_name)); + assert (not (StringSet.mem expected_name Reserved.keyword)); + let name = if not (StringSet.mem expected_name reserved) then expected_name else @@ -342,19 +342,33 @@ module Preserve : Strategy = struct incr i done; Printf.sprintf "%s%d" expected_name !i - | None -> - while - let name = create_unamed !unamed in - StringSet.mem name reserved || StringSet.mem name Reserved.keyword - do - incr unamed - done; - create_unamed !unamed - in - names.(Var.idx var) <- name; - StringSet.add name reserved) + in + names.(Var.idx var) <- name; + StringSet.add name reserved, others + | None -> reserved, var :: others) defs - reserved + (reserved, []) + in + (* We then allocate variables without names *) + if not uniq_var then unamed := 0; + let _reserved = + let weight v = IdentMap.find (V v) count in + List.stable_sort others ~cmp:(fun i j -> + match compare (weight j) (weight i) with + | 0 -> Var.compare i j + | c -> c) + |> List.fold_left ~init:reserved ~f:(fun reserved var -> + let name = + while + let name = create_unamed !unamed in + StringSet.mem name reserved || StringSet.mem name Reserved.keyword + do + incr unamed + done; + create_unamed !unamed + in + names.(Var.idx var) <- name; + StringSet.add name reserved) in ()); names From fa4107ca3fca7853b056b2f6ce385cbffc08ca5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Mon, 22 Sep 2025 17:12:24 +0200 Subject: [PATCH 12/13] Tests: accept --- compiler/tests-compiler/call_gen.ml | 6 +- compiler/tests-compiler/direct_calls.ml | 22 +- .../double-translation/direct_calls.ml | 47 +- .../effects_continuations.ml | 118 +- .../double-translation/effects_exceptions.ml | 82 +- .../double-translation/effects_toplevel.ml | 10 +- compiler/tests-compiler/effects.ml | 8 +- .../tests-compiler/effects_continuations.ml | 76 +- compiler/tests-compiler/effects_exceptions.ml | 48 +- compiler/tests-compiler/effects_toplevel.ml | 14 +- .../eliminate_exception_handler.ml | 2 +- compiler/tests-compiler/exceptions.ml | 12 +- compiler/tests-compiler/gh1007.ml | 52 +- compiler/tests-compiler/gh1320.ml | 8 +- compiler/tests-compiler/gh1349.ml | 12 +- compiler/tests-compiler/gh1354.ml | 79 +- compiler/tests-compiler/gh1494.ml | 2 +- compiler/tests-compiler/gh1559.ml | 26 +- compiler/tests-compiler/gh1768.ml | 8 +- compiler/tests-compiler/gh1868.ml | 10 +- compiler/tests-compiler/gh747.ml | 179 +- compiler/tests-compiler/global_deadcode.ml | 32 +- compiler/tests-compiler/lambda_lifting.ml | 7 +- compiler/tests-compiler/lazy.ml | 12 +- compiler/tests-compiler/loops.ml | 67 +- compiler/tests-compiler/match_with_exn.ml | 16 +- compiler/tests-compiler/minify.ml | 20 +- compiler/tests-compiler/mutable_closure.ml | 36 +- compiler/tests-compiler/rec52.ml | 10 +- compiler/tests-compiler/side_effect.ml | 12 +- compiler/tests-compiler/static_eval.ml | 11 +- compiler/tests-compiler/tailcall.ml | 32 +- compiler/tests-compiler/test_string.ml | 12 +- .../variable_declaration_output.ml | 32 +- compiler/tests-full/stdlib.cma.expected.js | 7662 ++++++++--------- 35 files changed, 4280 insertions(+), 4502 deletions(-) diff --git a/compiler/tests-compiler/call_gen.ml b/compiler/tests-compiler/call_gen.ml index 677b8159ce..bccceb83b3 100644 --- a/compiler/tests-compiler/call_gen.ml +++ b/compiler/tests-compiler/call_gen.ml @@ -63,7 +63,7 @@ module M1 = struct function f(g){return caml_call2(f_prime(g), 3, 4);} //end function f_prime(g){ - try{var _i_ = caml_call2(g, 1, 2); return _i_;} + try{var a = caml_call2(g, 1, 2); return a;} catch(e$0){ var e = caml_wrap_exception(e$0); throw caml_maybe_attach_backtrace(e, 0); @@ -88,9 +88,9 @@ module M1 = struct return caml_call1(Stdlib[44], ((a + b | 0) + c | 0) + d | 0); } //end - function l(_g_, _h_){return k(_b_, _a_, _g_, _h_);} + function l(c, d){return k(b, a, c, d);} //end - function m(_e_, _f_){return k(_d_, _c_, _e_, _f_);} + function m(a, b){return k(d, c, a, b);} //end function caml_call1(f, a0){ return (f.l >= 0 ? f.l : f.l = f.length) === 1 diff --git a/compiler/tests-compiler/direct_calls.ml b/compiler/tests-compiler/direct_calls.ml index b2a700b490..d30b13b24d 100644 --- a/compiler/tests-compiler/direct_calls.ml +++ b/compiler/tests-compiler/direct_calls.ml @@ -84,13 +84,13 @@ let%expect_test "direct calls without --effects=cps" = //end function test3(x){ function F(symbol){function f(x){return x + 1 | 0;} return [0, f];} - var M1 = F([0]), M2 = F([0]), _b_ = M2[1].call(null, 2); - return [0, M1[1].call(null, 1), _b_]; + var M1 = F([0]), M2 = F([0]), a = M2[1].call(null, 2); + return [0, M1[1].call(null, 1), a]; } //end function test4(x){ function F(symbol){ - function f(x){return caml_call2(Stdlib_Printf[2], _a_, x);} + function f(x){return caml_call2(Stdlib_Printf[2], a, x);} return [0, f]; } var M1 = F([0]), M2 = F([0]); @@ -159,13 +159,13 @@ let%expect_test "direct calls with --effects=cps" = return raise(e$0); }); return caml_exact_trampoline_cps_call - (g, x, function(_t_){caml_pop_trap(); return cont();}); + (g, x, function(a){caml_pop_trap(); return cont();}); } return caml_exact_trampoline_cps_call$0 (f, function(x, cont){return cont();}, 7, - function(_r_){ + function(a){ return caml_exact_trampoline_cps_call$0 (f, function(x, cont){ @@ -173,20 +173,20 @@ let%expect_test "direct calls with --effects=cps" = (Stdlib[28], x, cst_a$0, cont); }, cst_a, - function(_s_){return cont(0);}); + function(a){return cont(0);}); }); } //end function test3(x, cont){ function F(symbol){function f(x){return x + 1 | 0;} return [0, f];} - var M1 = F(), M2 = F(), _q_ = M2[1].call(null, 2); - return cont([0, M1[1].call(null, 1), _q_]); + var M1 = F(), M2 = F(), a = M2[1].call(null, 2); + return cont([0, M1[1].call(null, 1), a]); } //end function test4(x, cont){ function F(symbol){ function f(x, cont){ - return caml_trampoline_cps_call3(Stdlib_Printf[2], _o_, x, cont); + return caml_trampoline_cps_call3(Stdlib_Printf[2], a, x, cont); } return [0, f]; } @@ -194,9 +194,7 @@ let%expect_test "direct calls with --effects=cps" = return caml_exact_trampoline_cps_call (M1[1], 1, - function(_p_){ - return caml_exact_trampoline_cps_call(M2[1], 2, cont); - }); + function(a){return caml_exact_trampoline_cps_call(M2[1], 2, cont);}); } //end |}] diff --git a/compiler/tests-compiler/double-translation/direct_calls.ml b/compiler/tests-compiler/double-translation/direct_calls.ml index 9f40e8a28e..a554f09eea 100644 --- a/compiler/tests-compiler/double-translation/direct_calls.ml +++ b/compiler/tests-compiler/double-translation/direct_calls.ml @@ -129,7 +129,7 @@ let%expect_test "direct calls with --effects=double-translation" = var dummy = 0, global_data = runtime.caml_get_global_data(), - _z_ = [0, [4, 0, 0, 0, 0], caml_string_of_jsbytes("%d")], + a = [0, [4, 0, 0, 0, 0], caml_string_of_jsbytes("%d")], cst_a$0 = caml_string_of_jsbytes("a"), cst_a = caml_string_of_jsbytes("a"), Stdlib = global_data.Stdlib, @@ -161,46 +161,41 @@ let%expect_test "direct calls with --effects=double-translation" = return raise(e); }); return caml_exact_trampoline_cps_call - (g, x, function(_K_){caml_pop_trap(); return cont();}); + (g, x, function(a){caml_pop_trap(); return cont();}); } var f = caml_cps_closure(f$0, f$1); return f; } - function _h_(){return function(x){};} - function _j_(){ + function b(){return function(x){};} + function c(){ return caml_cps_closure (function(x){return caml_call2(Stdlib[28], x, cst_a$0);}, function(x, cont){ return caml_trampoline_cps_call3(Stdlib[28], x, cst_a$0, cont); }); } - function test2$0(param){ - var f = f$0(); - f(_h_(), 7); - f(_j_(), cst_a); - return 0; - } + function test2$0(param){var f = f$0(); f(b(), 7); f(c(), cst_a); return 0;} function test2$1(param, cont){ var f = f$0(); return caml_exact_trampoline_cps_call$0 (f, - _h_(), + b(), 7, - function(_I_){ + function(a){ return caml_exact_trampoline_cps_call$0 - (f, _j_(), cst_a, function(_J_){return cont(0);}); + (f, c(), cst_a, function(a){return cont(0);}); }); } var test2 = caml_cps_closure(test2$0, test2$1); function test3(x){ function F(symbol){function f(x){return x + 1 | 0;} return [0, f];} - var M1 = F(), M2 = F(), _H_ = caml_call1(M2[1], 2); - return [0, caml_call1(M1[1], 1), _H_]; + var M1 = F(), M2 = F(), a = caml_call1(M2[1], 2); + return [0, caml_call1(M1[1], 1), a]; } function f(){ - function f$0(x){return caml_call2(Stdlib_Printf[2], _z_, x);} + function f$0(x){return caml_call2(Stdlib_Printf[2], a, x);} function f$1(x, cont){ - return caml_trampoline_cps_call3(Stdlib_Printf[2], _z_, x, cont); + return caml_trampoline_cps_call3(Stdlib_Printf[2], a, x, cont); } var f = caml_cps_closure(f$0, f$1); return f; @@ -216,7 +211,7 @@ let%expect_test "direct calls with --effects=double-translation" = return caml_exact_trampoline_cps_call (M1[1], 1, - function(_G_){ + function(a){ return caml_exact_trampoline_cps_call(M2[1], 2, cont); }); } @@ -233,18 +228,18 @@ let%expect_test "direct calls with --effects=double-translation" = tuple = recfuncs(x), f = tuple[2], h = tuple[1], - _E_ = h(100), - _F_ = f(12) + _E_ | 0; - return caml_call1(Stdlib[44], _F_); + a = h(100), + b = f(12) + a | 0; + return caml_call1(Stdlib[44], b); } function g$1(x, cont){ var tuple = recfuncs(x), f = tuple[2], h = tuple[1], - _C_ = h(100), - _D_ = f(12) + _C_ | 0; - return caml_trampoline_cps_call2(Stdlib[44], _D_, cont); + a = h(100), + b = f(12) + a | 0; + return caml_trampoline_cps_call2(Stdlib[44], b, cont); } var g = caml_cps_closure(g$0, g$1); return g; @@ -255,9 +250,9 @@ let%expect_test "direct calls with --effects=double-translation" = return caml_exact_trampoline_cps_call (g$0, 42, - function(_A_){ + function(a){ return caml_exact_trampoline_cps_call - (g$0, - 5, function(_B_){return cont(0);}); + (g$0, - 5, function(a){return cont(0);}); }); } var diff --git a/compiler/tests-compiler/double-translation/effects_continuations.ml b/compiler/tests-compiler/double-translation/effects_continuations.ml index a85a5d3564..1d8982065a 100644 --- a/compiler/tests-compiler/double-translation/effects_continuations.ml +++ b/compiler/tests-compiler/double-translation/effects_continuations.ml @@ -101,71 +101,71 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = [%expect {| function exceptions$0(s){ - try{var _K_ = caml_int_of_string(s), n = _K_;} - catch(_N_){ - var _F_ = caml_wrap_exception(_N_); - if(_F_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_F_, 0); + try{var f = caml_int_of_string(s), n = f;} + catch(b){ + var a = caml_wrap_exception(b); + if(a[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(a, 0); var n = 0; } try{ if(caml_string_equal(s, cst$0)) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - var _J_ = 7, m = _J_; + var e = 7, m = e; } - catch(_M_){ - var _G_ = caml_wrap_exception(_M_); - if(_G_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_G_, 0); + catch(a){ + var b = caml_wrap_exception(a); + if(b !== Stdlib[8]) throw caml_maybe_attach_backtrace(b, 0); var m = 0; } try{ if(caml_string_equal(s, cst)) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - var _I_ = [0, [0, caml_call1(Stdlib[79], cst_toto), n, m]]; - return _I_; + var d = [0, [0, caml_call1(Stdlib[79], cst_toto), n, m]]; + return d; } - catch(_L_){ - var _H_ = caml_wrap_exception(_L_); - if(_H_ === Stdlib[8]) return 0; - throw caml_maybe_attach_backtrace(_H_, 0); + catch(a){ + var c = caml_wrap_exception(a); + if(c === Stdlib[8]) return 0; + throw caml_maybe_attach_backtrace(c, 0); } } //end function exceptions$1(s, cont){ - try{var _z_ = caml_int_of_string(s), n = _z_;} - catch(_E_){ - var _A_ = caml_wrap_exception(_E_); - if(_A_[1] !== Stdlib[7]){ + try{var e = caml_int_of_string(s), n = e;} + catch(a){ + var b = caml_wrap_exception(a); + if(b[1] !== Stdlib[7]){ var raise$1 = caml_pop_trap(); - return raise$1(caml_maybe_attach_backtrace(_A_, 0)); + return raise$1(caml_maybe_attach_backtrace(b, 0)); } var n = 0; } try{ if(caml_string_equal(s, cst$0)) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - var _x_ = 7, m = _x_; + var d = 7, m = d; } - catch(_D_){ - var _y_ = caml_wrap_exception(_D_); - if(_y_ !== Stdlib[8]){ + catch(b){ + var a = caml_wrap_exception(b); + if(a !== Stdlib[8]){ var raise$0 = caml_pop_trap(); - return raise$0(caml_maybe_attach_backtrace(_y_, 0)); + return raise$0(caml_maybe_attach_backtrace(a, 0)); } var m = 0; } runtime.caml_push_trap - (function(_C_){ - if(_C_ === Stdlib[8]) return cont(0); + (function(a){ + if(a === Stdlib[8]) return cont(0); var raise = caml_pop_trap(); - return raise(caml_maybe_attach_backtrace(_C_, 0)); + return raise(caml_maybe_attach_backtrace(a, 0)); }); if(! caml_string_equal(s, cst)) return caml_trampoline_cps_call2 (Stdlib[79], cst_toto, - function(_B_){caml_pop_trap(); return cont([0, [0, _B_, n, m]]);}); - var _w_ = Stdlib[8], raise = caml_pop_trap(); - return raise(caml_maybe_attach_backtrace(_w_, 1)); + function(a){caml_pop_trap(); return cont([0, [0, a, n, m]]);}); + var c = Stdlib[8], raise = caml_pop_trap(); + return raise(caml_maybe_attach_backtrace(c, 1)); } //end var exceptions = caml_cps_closure(exceptions$0, exceptions$1); @@ -178,43 +178,43 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = } //end function cond1$1(b, cont){ - function _v_(ic){return cont([0, ic, 7]);} + function a(ic){return cont([0, ic, 7]);} return b - ? caml_trampoline_cps_call2(Stdlib[79], cst_toto$0, _v_) - : caml_trampoline_cps_call2(Stdlib[79], cst_titi, _v_); + ? caml_trampoline_cps_call2(Stdlib[79], cst_toto$0, a) + : caml_trampoline_cps_call2(Stdlib[79], cst_titi, a); } //end var cond1 = caml_cps_closure(cond1$0, cond1$1); //end - function cond2$0(b){ - if(b) - caml_call1(Stdlib_Printf[3], _h_); + function cond2$0(b$0){ + if(b$0) + caml_call1(Stdlib_Printf[3], a); else - caml_call1(Stdlib_Printf[3], _i_); + caml_call1(Stdlib_Printf[3], b); return 7; } //end - function cond2$1(b, cont){ - function _t_(_u_){return cont(7);} - return b - ? caml_trampoline_cps_call2(Stdlib_Printf[3], _h_, _t_) - : caml_trampoline_cps_call2(Stdlib_Printf[3], _i_, _t_); + function cond2$1(b$0, cont){ + function c(a){return cont(7);} + return b$0 + ? caml_trampoline_cps_call2(Stdlib_Printf[3], a, c) + : caml_trampoline_cps_call2(Stdlib_Printf[3], b, c); } //end var cond2 = caml_cps_closure(cond2$0, cond2$1); //end function cond3$0(b){ var x = [0, 0]; - if(b) x[1] = 1; else caml_call1(Stdlib_Printf[3], _j_); + if(b) x[1] = 1; else caml_call1(Stdlib_Printf[3], c); return x[1]; } //end function cond3$1(b, cont){ var x = [0, 0]; - function _r_(_s_){return cont(x[1]);} + function a(a){return cont(x[1]);} return b - ? (x[1] = 1, _r_(0)) - : caml_trampoline_cps_call2(Stdlib_Printf[3], _j_, _r_); + ? (x[1] = 1, a(0)) + : caml_trampoline_cps_call2(Stdlib_Printf[3], c, a); } //end var cond3 = caml_cps_closure(cond3$0, cond3$1); @@ -232,17 +232,17 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = (Stdlib[79], cst_static_examples_ml, function(ic){ - function _p_(_q_){ + function a(c){ return caml_trampoline_cps_call2 (Stdlib[83], ic, function(line){ return b - ? caml_trampoline_cps_call2(Stdlib[53], line, _p_) - : caml_exact_trampoline_call1(_p_, 0); + ? caml_trampoline_cps_call2(Stdlib[53], line, a) + : caml_exact_trampoline_call1(a, 0); }); } - return _p_(0); + return a(0); }); } //end @@ -250,7 +250,7 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = //end function loop2$0(param){ var ic = caml_call1(Stdlib[79], cst_static_examples_ml$0); - caml_call1(Stdlib_Printf[3], _k_); + caml_call1(Stdlib_Printf[3], d); for(;;){var line = caml_call1(Stdlib[83], ic); caml_call1(Stdlib[53], line);} } //end @@ -259,36 +259,36 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = (Stdlib[79], cst_static_examples_ml$0, function(ic){ - function _n_(_o_){ + function a(b){ return caml_trampoline_cps_call2 (Stdlib[83], ic, function(line){ - return caml_trampoline_cps_call2(Stdlib[53], line, _n_); + return caml_trampoline_cps_call2(Stdlib[53], line, a); }); } - return caml_trampoline_cps_call2(Stdlib_Printf[3], _k_, _n_); + return caml_trampoline_cps_call2(Stdlib_Printf[3], d, a); }); } //end var loop2 = caml_cps_closure(loop2$0, loop2$1); //end function loop3$0(param){ - var l = caml_call1(list_rev, _l_), x = l; + var l = caml_call1(list_rev, e), x = l; for(;;){if(! x) return l; var r = x[2]; x = r;} } //end function loop3$1(param, cont){ return caml_trampoline_cps_call2 (list_rev, - _l_, + e, function(l){ - function _m_(x){ + function a(x){ if(! x) return cont(l); var r = x[2]; - return caml_exact_trampoline_call1(_m_, r); + return caml_exact_trampoline_call1(a, r); } - return _m_(l); + return a(l); }); } //end diff --git a/compiler/tests-compiler/double-translation/effects_exceptions.ml b/compiler/tests-compiler/double-translation/effects_exceptions.ml index 0294c1036a..64ba3412a5 100644 --- a/compiler/tests-compiler/double-translation/effects_exceptions.ml +++ b/compiler/tests-compiler/double-translation/effects_exceptions.ml @@ -56,71 +56,71 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = [%expect {| function exceptions$0(s){ - try{var _B_ = caml_int_of_string(s), n = _B_;} - catch(_E_){ - var _w_ = caml_wrap_exception(_E_); - if(_w_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_w_, 0); + try{var f = caml_int_of_string(s), n = f;} + catch(b){ + var a = caml_wrap_exception(b); + if(a[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(a, 0); var n = 0; } try{ if(caml_string_equal(s, cst$0)) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - var _A_ = 7, m = _A_; + var e = 7, m = e; } - catch(_D_){ - var _x_ = caml_wrap_exception(_D_); - if(_x_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_x_, 0); + catch(a){ + var b = caml_wrap_exception(a); + if(b !== Stdlib[8]) throw caml_maybe_attach_backtrace(b, 0); var m = 0; } try{ if(caml_string_equal(s, cst)) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - var _z_ = [0, [0, caml_call1(Stdlib[79], cst_toto), n, m]]; - return _z_; + var d = [0, [0, caml_call1(Stdlib[79], cst_toto), n, m]]; + return d; } - catch(_C_){ - var _y_ = caml_wrap_exception(_C_); - if(_y_ === Stdlib[8]) return 0; - throw caml_maybe_attach_backtrace(_y_, 0); + catch(a){ + var c = caml_wrap_exception(a); + if(c === Stdlib[8]) return 0; + throw caml_maybe_attach_backtrace(c, 0); } } //end function exceptions$1(s, cont){ - try{var _q_ = caml_int_of_string(s), n = _q_;} - catch(_v_){ - var _r_ = caml_wrap_exception(_v_); - if(_r_[1] !== Stdlib[7]){ + try{var e = caml_int_of_string(s), n = e;} + catch(a){ + var b = caml_wrap_exception(a); + if(b[1] !== Stdlib[7]){ var raise$1 = caml_pop_trap(); - return raise$1(caml_maybe_attach_backtrace(_r_, 0)); + return raise$1(caml_maybe_attach_backtrace(b, 0)); } var n = 0; } try{ if(caml_string_equal(s, cst$0)) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - var _o_ = 7, m = _o_; + var d = 7, m = d; } - catch(_u_){ - var _p_ = caml_wrap_exception(_u_); - if(_p_ !== Stdlib[8]){ + catch(b){ + var a = caml_wrap_exception(b); + if(a !== Stdlib[8]){ var raise$0 = caml_pop_trap(); - return raise$0(caml_maybe_attach_backtrace(_p_, 0)); + return raise$0(caml_maybe_attach_backtrace(a, 0)); } var m = 0; } caml_push_trap - (function(_t_){ - if(_t_ === Stdlib[8]) return cont(0); + (function(a){ + if(a === Stdlib[8]) return cont(0); var raise = caml_pop_trap(); - return raise(caml_maybe_attach_backtrace(_t_, 0)); + return raise(caml_maybe_attach_backtrace(a, 0)); }); if(! caml_string_equal(s, cst)) return caml_trampoline_cps_call2 (Stdlib[79], cst_toto, - function(_s_){caml_pop_trap(); return cont([0, [0, _s_, n, m]]);}); - var _n_ = Stdlib[8], raise = caml_pop_trap(); - return raise(caml_maybe_attach_backtrace(_n_, 1)); + function(a){caml_pop_trap(); return cont([0, [0, a, n, m]]);}); + var c = Stdlib[8], raise = caml_pop_trap(); + return raise(caml_maybe_attach_backtrace(c, 1)); } //end var exceptions = caml_cps_closure(exceptions$0, exceptions$1); @@ -130,8 +130,8 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = [%expect {| function handler_is_loop$0(f, g, l){ - try{var _l_ = caml_call1(f, 0); return _l_;} - catch(_m_){ + try{var a = caml_call1(f, 0); return a;} + catch(a){ var l$0 = l; for(;;){ var match = caml_call1(g, l$0); @@ -147,15 +147,15 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = //end function handler_is_loop$1(f, g, l, cont){ caml_push_trap - (function(_k_){ - function _j_(l){ + (function(b){ + function a(l){ return caml_trampoline_cps_call2 (g, l, function(match){ if(72330306 <= match[1]){ var l = match[2]; - return caml_exact_trampoline_call1(_j_, l); + return caml_exact_trampoline_call1(a, l); } var exn$0 = match[2], @@ -164,10 +164,10 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = return raise(exn); }); } - return _j_(l); + return a(l); }); return caml_trampoline_cps_call2 - (f, 0, function(_i_){caml_pop_trap(); return cont(_i_);}); + (f, 0, function(a){caml_pop_trap(); return cont(a);}); } //end var handler_is_loop = caml_cps_closure(handler_is_loop$0, handler_is_loop$1); @@ -177,17 +177,17 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = [%expect {| function handler_is_merge_node$0(g){ - try{var _g_ = caml_call1(g, 0), s = _g_;}catch(_h_){var s = cst$1;} + try{var a = caml_call1(g, 0), s = a;}catch(a){var s = cst$1;} return caml_call2(Stdlib[28], s, cst_aaa); } //end function handler_is_merge_node$1(g, cont){ - function _d_(s){ + function a(s){ return caml_trampoline_cps_call3(Stdlib[28], s, cst_aaa, cont); } - caml_push_trap(function(_f_){return _d_(cst$1);}); + caml_push_trap(function(b){return a(cst$1);}); return caml_trampoline_cps_call2 - (g, 0, function(_e_){caml_pop_trap(); return _d_(_e_);}); + (g, 0, function(b){caml_pop_trap(); return a(b);}); } //end var diff --git a/compiler/tests-compiler/double-translation/effects_toplevel.ml b/compiler/tests-compiler/double-translation/effects_toplevel.ml index 83f618e0a2..8e600006a3 100644 --- a/compiler/tests-compiler/double-translation/effects_toplevel.ml +++ b/compiler/tests-compiler/double-translation/effects_toplevel.ml @@ -63,28 +63,28 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = var dummy = 0, global_data = runtime.caml_get_global_data(), - _b_ = + a = [0, [11, caml_string_of_jsbytes("abc"), 0], caml_string_of_jsbytes("abc")], Stdlib_Printf = global_data.Stdlib__Printf; - function g$0(param){return caml_call1(Stdlib_Printf[2], _b_);} + function g$0(param){return caml_call1(Stdlib_Printf[2], a);} function g$1(param, cont){ - return caml_trampoline_cps_call2(Stdlib_Printf[2], _b_, cont); + return caml_trampoline_cps_call2(Stdlib_Printf[2], a, cont); } var g = runtime.caml_cps_closure(g$0, g$1); g(); var i = 1; for(;;){ g(); - var _c_ = i + 1 | 0; + var b = i + 1 | 0; if(5 === i){ g(); var Test = [0]; runtime.caml_register_global(2, Test, "Test"); return; } - i = _c_; + i = b; } } (globalThis)); diff --git a/compiler/tests-compiler/effects.ml b/compiler/tests-compiler/effects.ml index d4b1dca638..f107bac122 100644 --- a/compiler/tests-compiler/effects.ml +++ b/compiler/tests-compiler/effects.ml @@ -53,13 +53,11 @@ let fff () = ? cont([0, function(k, cont){return cont(11);}]) : cont(0); }], - function(_f_){ + function(b){ return caml_trampoline_cps_call2 (Stdlib_Printf[2], - _e_, - function(_g_){ - return caml_trampoline_cps_call2(_g_, _f_, cont); - }); + a, + function(a){return caml_trampoline_cps_call2(a, b, cont);}); }); } //end diff --git a/compiler/tests-compiler/effects_continuations.ml b/compiler/tests-compiler/effects_continuations.ml index 92b303cbce..f3703f9c75 100644 --- a/compiler/tests-compiler/effects_continuations.ml +++ b/compiler/tests-compiler/effects_continuations.ml @@ -102,63 +102,63 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = [%expect {| function exceptions(s, cont){ - try{var _A_ = runtime.caml_int_of_string(s), n = _A_;} - catch(_E_){ - var _w_ = caml_wrap_exception(_E_); - if(_w_[1] !== Stdlib[7]){ + try{var e = runtime.caml_int_of_string(s), n = e;} + catch(b){ + var a = caml_wrap_exception(b); + if(a[1] !== Stdlib[7]){ var raise$1 = caml_pop_trap(); - return raise$1(caml_maybe_attach_backtrace(_w_, 0)); + return raise$1(caml_maybe_attach_backtrace(a, 0)); } var n = 0; } try{ if(caml_string_equal(s, cst$0)) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - var _z_ = 7, m = _z_; + var d = 7, m = d; } - catch(_D_){ - var _x_ = caml_wrap_exception(_D_); - if(_x_ !== Stdlib[8]){ + catch(a){ + var b = caml_wrap_exception(a); + if(b !== Stdlib[8]){ var raise$0 = caml_pop_trap(); - return raise$0(caml_maybe_attach_backtrace(_x_, 0)); + return raise$0(caml_maybe_attach_backtrace(b, 0)); } var m = 0; } runtime.caml_push_trap - (function(_C_){ - if(_C_ === Stdlib[8]) return cont(0); + (function(a){ + if(a === Stdlib[8]) return cont(0); var raise = caml_pop_trap(); - return raise(caml_maybe_attach_backtrace(_C_, 0)); + return raise(caml_maybe_attach_backtrace(a, 0)); }); if(! caml_string_equal(s, cst)) return caml_trampoline_cps_call2 (Stdlib[79], cst_toto, - function(_B_){caml_pop_trap(); return cont([0, [0, _B_, n, m]]);}); - var _y_ = Stdlib[8], raise = caml_pop_trap(); - return raise(caml_maybe_attach_backtrace(_y_, 1)); + function(a){caml_pop_trap(); return cont([0, [0, a, n, m]]);}); + var c = Stdlib[8], raise = caml_pop_trap(); + return raise(caml_maybe_attach_backtrace(c, 1)); } //end function cond1(b, cont){ - function _v_(ic){return cont([0, ic, 7]);} + function a(ic){return cont([0, ic, 7]);} return b - ? caml_trampoline_cps_call2(Stdlib[79], cst_toto$0, _v_) - : caml_trampoline_cps_call2(Stdlib[79], cst_titi, _v_); + ? caml_trampoline_cps_call2(Stdlib[79], cst_toto$0, a) + : caml_trampoline_cps_call2(Stdlib[79], cst_titi, a); } //end - function cond2(b, cont){ - function _t_(_u_){return cont(7);} - return b - ? caml_trampoline_cps_call2(Stdlib_Printf[3], _h_, _t_) - : caml_trampoline_cps_call2(Stdlib_Printf[3], _i_, _t_); + function cond2(b$0, cont){ + function c(a){return cont(7);} + return b$0 + ? caml_trampoline_cps_call2(Stdlib_Printf[3], a, c) + : caml_trampoline_cps_call2(Stdlib_Printf[3], b, c); } //end function cond3(b, cont){ var x = [0, 0]; - function _r_(_s_){return cont(x[1]);} + function a(a){return cont(x[1]);} return b - ? (x[1] = 1, _r_(0)) - : caml_trampoline_cps_call2(Stdlib_Printf[3], _j_, _r_); + ? (x[1] = 1, a(0)) + : caml_trampoline_cps_call2(Stdlib_Printf[3], c, a); } //end function loop1(b, cont){ @@ -166,17 +166,17 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = (Stdlib[79], cst_static_examples_ml, function(ic){ - function _p_(_q_){ + function a(c){ return caml_trampoline_cps_call2 (Stdlib[83], ic, function(line){ return b - ? caml_trampoline_cps_call2(Stdlib[53], line, _p_) - : caml_exact_trampoline_call1(_p_, 0); + ? caml_trampoline_cps_call2(Stdlib[53], line, a) + : caml_exact_trampoline_call1(a, 0); }); } - return _p_(0); + return a(0); }); } //end @@ -185,29 +185,29 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = (Stdlib[79], cst_static_examples_ml$0, function(ic){ - function _n_(_o_){ + function a(b){ return caml_trampoline_cps_call2 (Stdlib[83], ic, function(line){ - return caml_trampoline_cps_call2(Stdlib[53], line, _n_); + return caml_trampoline_cps_call2(Stdlib[53], line, a); }); } - return caml_trampoline_cps_call2(Stdlib_Printf[3], _k_, _n_); + return caml_trampoline_cps_call2(Stdlib_Printf[3], d, a); }); } //end function loop3(param, cont){ return caml_trampoline_cps_call2 (list_rev, - _l_, + e, function(l){ - function _m_(x){ + function a(x){ if(! x) return cont(l); var r = x[2]; - return caml_exact_trampoline_call1(_m_, r); + return caml_exact_trampoline_call1(a, r); } - return _m_(l); + return a(l); }); } //end diff --git a/compiler/tests-compiler/effects_exceptions.ml b/compiler/tests-compiler/effects_exceptions.ml index a93058c40d..e0f8c6f00c 100644 --- a/compiler/tests-compiler/effects_exceptions.ml +++ b/compiler/tests-compiler/effects_exceptions.ml @@ -56,41 +56,41 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = [%expect {| function exceptions(s, cont){ - try{var _n_ = runtime.caml_int_of_string(s), n = _n_;} - catch(_r_){ - var _j_ = caml_wrap_exception(_r_); - if(_j_[1] !== Stdlib[7]){ + try{var e = runtime.caml_int_of_string(s), n = e;} + catch(b){ + var a = caml_wrap_exception(b); + if(a[1] !== Stdlib[7]){ var raise$1 = caml_pop_trap(); - return raise$1(caml_maybe_attach_backtrace(_j_, 0)); + return raise$1(caml_maybe_attach_backtrace(a, 0)); } var n = 0; } try{ if(caml_string_equal(s, cst$0)) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - var _m_ = 7, m = _m_; + var d = 7, m = d; } - catch(_q_){ - var _k_ = caml_wrap_exception(_q_); - if(_k_ !== Stdlib[8]){ + catch(a){ + var b = caml_wrap_exception(a); + if(b !== Stdlib[8]){ var raise$0 = caml_pop_trap(); - return raise$0(caml_maybe_attach_backtrace(_k_, 0)); + return raise$0(caml_maybe_attach_backtrace(b, 0)); } var m = 0; } caml_push_trap - (function(_p_){ - if(_p_ === Stdlib[8]) return cont(0); + (function(a){ + if(a === Stdlib[8]) return cont(0); var raise = caml_pop_trap(); - return raise(caml_maybe_attach_backtrace(_p_, 0)); + return raise(caml_maybe_attach_backtrace(a, 0)); }); if(! caml_string_equal(s, cst)) return caml_trampoline_cps_call2 (Stdlib[79], cst_toto, - function(_o_){caml_pop_trap(); return cont([0, [0, _o_, n, m]]);}); - var _l_ = Stdlib[8], raise = caml_pop_trap(); - return raise(caml_maybe_attach_backtrace(_l_, 1)); + function(a){caml_pop_trap(); return cont([0, [0, a, n, m]]);}); + var c = Stdlib[8], raise = caml_pop_trap(); + return raise(caml_maybe_attach_backtrace(c, 1)); } //end |}]; @@ -99,15 +99,15 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = {| function handler_is_loop(f, g, l, cont){ caml_push_trap - (function(_h_){ - function _i_(l){ + (function(b){ + function a(l){ return caml_trampoline_cps_call2 (g, l, function(match){ if(72330306 <= match[1]){ var l = match[2]; - return caml_exact_trampoline_call1(_i_, l); + return caml_exact_trampoline_call1(a, l); } var exn = match[2], @@ -116,10 +116,10 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = return raise(exn$0); }); } - return _i_(l); + return a(l); }); return caml_trampoline_cps_call2 - (f, 0, function(_g_){caml_pop_trap(); return cont(_g_);}); + (f, 0, function(a){caml_pop_trap(); return cont(a);}); } //end |}]; @@ -127,12 +127,12 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = [%expect {| function handler_is_merge_node(g, cont){ - function _d_(s){ + function a(s){ return caml_trampoline_cps_call3(Stdlib[28], s, cst_aaa, cont); } - caml_push_trap(function(_f_){return _d_(cst$1);}); + caml_push_trap(function(b){return a(cst$1);}); return caml_trampoline_cps_call2 - (g, 0, function(_e_){caml_pop_trap(); return _d_(_e_);}); + (g, 0, function(b){caml_pop_trap(); return a(b);}); } //end |}] diff --git a/compiler/tests-compiler/effects_toplevel.ml b/compiler/tests-compiler/effects_toplevel.ml index 6faf1ef7b0..c5afd3d2e6 100644 --- a/compiler/tests-compiler/effects_toplevel.ml +++ b/compiler/tests-compiler/effects_toplevel.ml @@ -67,27 +67,27 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = dummy = 0, global_data = runtime.caml_get_global_data(), Stdlib_Printf = global_data.Stdlib__Printf, - _b_ = + b = [0, [11, caml_string_of_jsbytes("abc"), 0], caml_string_of_jsbytes("abc")]; function g(param, cont){ - return caml_trampoline_cps_call2(Stdlib_Printf[2], _b_, cont); + return caml_trampoline_cps_call2(Stdlib_Printf[2], b, cont); } caml_callback(g, [dummy]); - function _c_(i){ + function a(i){ return caml_exact_trampoline_cps_call (g, dummy, - function(_d_){ - var _e_ = i + 1 | 0; - if(5 !== i) return caml_exact_trampoline_call1(_c_, _e_); + function(c){ + var b = i + 1 | 0; + if(5 !== i) return caml_exact_trampoline_call1(a, b); caml_callback(g, [dummy]); var Test = [0]; runtime.caml_register_global(2, Test, "Test"); }); } - return _c_(1); + return a(1); }, []); } diff --git a/compiler/tests-compiler/eliminate_exception_handler.ml b/compiler/tests-compiler/eliminate_exception_handler.ml index 117102f2c1..fd5cb2bca5 100644 --- a/compiler/tests-compiler/eliminate_exception_handler.ml +++ b/compiler/tests-compiler/eliminate_exception_handler.ml @@ -52,6 +52,6 @@ try raise Not_found with [%expect {| function some_name(param){ - try{throw caml_maybe_attach_backtrace(Stdlib[8], 1);}catch(_a_){return 0;} + try{throw caml_maybe_attach_backtrace(Stdlib[8], 1);}catch(a){return 0;} } //end |}] diff --git a/compiler/tests-compiler/exceptions.ml b/compiler/tests-compiler/exceptions.ml index 5383e0a1e6..561baa7a82 100644 --- a/compiler/tests-compiler/exceptions.ml +++ b/compiler/tests-compiler/exceptions.ml @@ -44,15 +44,15 @@ let prevent_inline = some_name print_fun_decl (program ~debug:false) None; [%expect {| - function _a_(_b_){ + function a(c){ try{ try{throw caml_maybe_attach_backtrace(Stdlib[8], 1);} - catch(_f_){var _d_ = caml_wrap_exception(_f_);} + catch(a){var b = caml_wrap_exception(a);} } - catch(_e_){ - var _c_ = caml_wrap_exception(_e_); - throw caml_maybe_attach_backtrace(_c_, 1); + catch(b){ + var a = caml_wrap_exception(b); + throw caml_maybe_attach_backtrace(a, 1); } - throw caml_maybe_attach_backtrace(_d_, 1); + throw caml_maybe_attach_backtrace(b, 1); } //end |}] diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index b18c496ff5..0abcfb8548 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -179,14 +179,14 @@ let () = M.myfun M.x } } else if(3 === n && l){ - var _d_ = l[2]; - if(_d_){ - var match$2 = _d_[2]; + var a = l[2]; + if(a){ + var match$2 = a[2]; if(match$2){ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _d_[1], + x2$0 = a[1], x1$0 = l[1], s$0 = 0 < caml_int_compare(x1$0, x2$0) @@ -235,11 +235,11 @@ let () = M.myfun M.x accu = accu$1; continue; } - var _c_ = rev_append(l1, accu); + var b = rev_append(l1, accu); } else - var _c_ = rev_append(l2, accu); - return [0, _c_, tl$0]; + var b = rev_append(l2, accu); + return [0, b, tl$0]; } }, rev_sort = @@ -261,14 +261,14 @@ let () = M.myfun M.x } } else if(3 === n && l){ - var _b_ = l[2]; - if(_b_){ - var match$2 = _b_[2]; + var a = l[2]; + if(a){ + var match$2 = a[2]; if(match$2){ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _b_[1], + x2$0 = a[1], x1$0 = l[1], s$0 = 0 < caml_int_compare(x1$0, x2$0) @@ -317,11 +317,11 @@ let () = M.myfun M.x accu = accu$1; continue; } - var _a_ = rev_append(l1, accu); + var b = rev_append(l1, accu); } else - var _a_ = rev_append(l2, accu); - return [0, _a_, tl$0]; + var b = rev_append(l2, accu); + return [0, b, tl$0]; } }; let sort$0 = sort, rev_sort$0 = rev_sort; @@ -400,9 +400,9 @@ let () = M.run () }; let odd$0 = odd, even$0 = even; if(even(i)) caml_call1(Stdlib[42], cst); - var _a_ = i + 1 | 0; + var a = i + 1 | 0; if(4 === i) return 0; - i = _a_; + i = a; } } //end |}] @@ -480,7 +480,7 @@ let () = M.run () switch(n){ case 0: var - f = function(param){return caml_call2(Stdlib_Printf[2], _a_, i$0);}; + f = function(param){return caml_call2(Stdlib_Printf[2], a, i$0);}; delayed[1] = [0, f, delayed[1]]; f(0); return 0; @@ -495,7 +495,7 @@ let () = M.run () switch(n){ case 0: var - f = function(param){return caml_call2(Stdlib_Printf[2], _b_, i$0);}; + f = function(param){return caml_call2(Stdlib_Printf[2], b, i$0);}; delayed[1] = [0, f, delayed[1]]; f(0); return 1; @@ -506,9 +506,9 @@ let () = M.run () }; let odd$0 = odd, even$0 = even; if(even(i)) caml_call1(Stdlib[42], cst); - var _c_ = i + 1 | 0; + var c = i + 1 | 0; if(4 === i) break; - i = _c_; + i = c; } return caml_call2 (list_iter, @@ -598,11 +598,11 @@ let () = M.run () 748545554, function(param){ function f(param){ - return caml_call2(Stdlib_Printf[2], _a_, i$0); + return caml_call2(Stdlib_Printf[2], a, i$0); } delayed[1] = [0, f, delayed[1]]; f(0); - return _b_; + return b; }]; case 1: return [0, 748545554, function(param){return even$0(0);}]; @@ -619,11 +619,11 @@ let () = M.run () 748545554, function(param){ function f(param){ - return caml_call2(Stdlib_Printf[2], _c_, i$0); + return caml_call2(Stdlib_Printf[2], c, i$0); } delayed[1] = [0, f, delayed[1]]; f(0); - return _d_; + return d; }]; case 1: return [0, 748545554, function(param){return odd$0(0);}]; @@ -637,9 +637,9 @@ let () = M.run () var f = param$0[2]; param$0 = f(0); } - var _e_ = i + 1 | 0; + var e = i + 1 | 0; if(4 === i) break; - i = _e_; + i = e; } return caml_call2 (list_iter, diff --git a/compiler/tests-compiler/gh1320.ml b/compiler/tests-compiler/gh1320.ml index b29ce75b07..e2c79b87f8 100644 --- a/compiler/tests-compiler/gh1320.ml +++ b/compiler/tests-compiler/gh1320.ml @@ -54,11 +54,11 @@ let () = myfun () }, g = function(x){return app(f$0, x);}; let f$0 = f, g$0 = g; - var _c_ = app(f, i); - caml_call2(Stdlib_Printf[3], _a_, _c_); - var _b_ = i + 1 | 0; + var c = app(f, i); + caml_call2(Stdlib_Printf[3], a, c); + var b = i + 1 | 0; if(4 === i) return 0; - i = _b_; + i = b; } } //end |}] diff --git a/compiler/tests-compiler/gh1349.ml b/compiler/tests-compiler/gh1349.ml index aff3e46862..0b6fe435bc 100644 --- a/compiler/tests-compiler/gh1349.ml +++ b/compiler/tests-compiler/gh1349.ml @@ -49,15 +49,15 @@ let%expect_test _ = short variable occurrences: 26/26 (function(a){ "use strict"; - var f = a.jsoo_runtime; + var e = a.jsoo_runtime; function b(a, b){ - function d(a){return f.caml_div(a, 0);} + function c(a){return e.caml_div(a, 0);} var g = a < b ? 1 : 2; - try{var c = d(a), e = c;}catch(c){var e = d(g);} - return e; + try{var f = c(a), d = f;}catch(f){var d = c(g);} + return d; } - var d = [0, b]; - f.caml_register_global(0, d, "Test"); + var c = [0, b]; + e.caml_register_global(0, c, "Test"); 0; return; } diff --git a/compiler/tests-compiler/gh1354.ml b/compiler/tests-compiler/gh1354.ml index 472a13d750..a93e7387e5 100644 --- a/compiler/tests-compiler/gh1354.ml +++ b/compiler/tests-compiler/gh1354.ml @@ -59,15 +59,14 @@ with Exit -> global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Printf = global_data.Stdlib__Printf, - _a_ = 0, - _b_ = _a_, - _d_ = - [0, [4, 0, 0, 0, [12, 10, 0]], runtime.caml_string_of_jsbytes("%d\n")]; - try{0; _b_ = _a_ + 1 | 0; throw caml_maybe_attach_backtrace(Stdlib[3], 1);} - catch(_e_){ - var _c_ = caml_wrap_exception(_e_); - if(_c_ !== Stdlib[3]) throw caml_maybe_attach_backtrace(_c_, 0); - caml_call2(Stdlib_Printf[3], _d_, _b_ | 0); + a = 0, + b = a, + d = [0, [4, 0, 0, 0, [12, 10, 0]], runtime.caml_string_of_jsbytes("%d\n")]; + try{0; b = a + 1 | 0; throw caml_maybe_attach_backtrace(Stdlib[3], 1);} + catch(a){ + var c = caml_wrap_exception(a); + if(c !== Stdlib[3]) throw caml_maybe_attach_backtrace(c, 0); + caml_call2(Stdlib_Printf[3], d, b | 0); var Test = [0]; runtime.caml_register_global(3, Test, "Test"); 0; @@ -124,38 +123,38 @@ with Exit -> global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Printf = global_data.Stdlib__Printf, - _a_ = 0, - _b_ = 0, - _c_ = _a_, - _h_ = + c = 0, + d = 0, + a = c, + i = [0, [4, 0, 0, 0, [12, 32, [4, 0, 0, 0, [12, 10, 0]]]], caml_string_of_jsbytes("%d %d\n")], - _e_ = + h = [0, [4, 0, 0, 0, [12, 32, [4, 0, 0, 0, [12, 10, 0]]]], caml_string_of_jsbytes("%d %d\n")]; try{ - var _f_ = _a_ + 1 | 0; + var b = c + 1 | 0; 0; - _c_ = _f_; - var _g_ = _f_; + a = b; + var f = b; try{ - var _i_ = _f_ + 1 | 0; + var g = b + 1 | 0; 0; - _g_ = _i_; - _c_ = _i_; + f = g; + a = g; throw caml_maybe_attach_backtrace(Stdlib[3], 1); } - catch(_k_){ - caml_call3(Stdlib_Printf[3], _h_, _g_ | 0, _b_); + catch(a){ + caml_call3(Stdlib_Printf[3], i, f | 0, d); throw caml_maybe_attach_backtrace(Stdlib[3], 1); } } - catch(_j_){ - var _d_ = caml_wrap_exception(_j_); - if(_d_ !== Stdlib[3]) throw caml_maybe_attach_backtrace(_d_, 0); - caml_call3(Stdlib_Printf[3], _e_, _c_ | 0, _b_); + catch(b){ + var e = caml_wrap_exception(b); + if(e !== Stdlib[3]) throw caml_maybe_attach_backtrace(e, 0); + caml_call3(Stdlib_Printf[3], h, a | 0, d); var Test = [0]; runtime.caml_register_global(4, Test, "Test"); 0; @@ -211,28 +210,28 @@ with Exit -> global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, Stdlib_Printf = global_data.Stdlib__Printf, - _a_ = 0, - _b_ = _a_, - _f_ = [0, [4, 0, 0, 0, [12, 10, 0]], caml_string_of_jsbytes("%d\n")], - _d_ = [0, [4, 0, 0, 0, [12, 10, 0]], caml_string_of_jsbytes("%d\n")]; + a = 0, + b = a, + g = [0, [4, 0, 0, 0, [12, 10, 0]], caml_string_of_jsbytes("%d\n")], + f = [0, [4, 0, 0, 0, [12, 10, 0]], caml_string_of_jsbytes("%d\n")]; try{ - var _e_ = _a_; + var d = a; try{ - var _g_ = _a_ + 1 | 0; + var e = a + 1 | 0; 0; - _e_ = _g_; - _b_ = _g_; + d = e; + b = e; throw caml_maybe_attach_backtrace(Stdlib[3], 1); } - catch(_i_){ - caml_call2(Stdlib_Printf[3], _f_, _e_); + catch(a){ + caml_call2(Stdlib_Printf[3], g, d); throw caml_maybe_attach_backtrace(Stdlib[3], 1); } } - catch(_h_){ - var _c_ = caml_wrap_exception(_h_); - if(_c_ !== Stdlib[3]) throw caml_maybe_attach_backtrace(_c_, 0); - caml_call2(Stdlib_Printf[3], _d_, _b_); + catch(a){ + var c = caml_wrap_exception(a); + if(c !== Stdlib[3]) throw caml_maybe_attach_backtrace(c, 0); + caml_call2(Stdlib_Printf[3], f, b); var Test = [0]; runtime.caml_register_global(4, Test, "Test"); 0; diff --git a/compiler/tests-compiler/gh1494.ml b/compiler/tests-compiler/gh1494.ml index fd646b38f2..b766fd4eab 100644 --- a/compiler/tests-compiler/gh1494.ml +++ b/compiler/tests-compiler/gh1494.ml @@ -39,7 +39,7 @@ let () = [%expect {| function bug(param){ - var g = [0, function(x){return function(_c_){return _c_;};}]; + var g = [0, function(x){return function(a){return a;};}]; return [0, function(param){return caml_call1(g[1], 1);}, g]; } //end |}] diff --git a/compiler/tests-compiler/gh1559.ml b/compiler/tests-compiler/gh1559.ml index 9f83d8b258..ba593b4ce8 100644 --- a/compiler/tests-compiler/gh1559.ml +++ b/compiler/tests-compiler/gh1559.ml @@ -94,20 +94,20 @@ let () = my_ref := 2 let t$1 = t; var this_will_be_undefined = - function(param){var _c_ = 1 === t$1[1] ? 1 : 0; return _c_ ? 1 : 2;}, + function(param){var a = 1 === t$1[1] ? 1 : 0; return a ? 1 : 2;}, i = t[1]; - if(0 === i){var _a_ = this_will_be_undefined(0); break a;} + if(0 === i){var a = this_will_be_undefined(0); break a;} if(1 === i) break; t = t$0; } var - _a_ = + a = caml_call2(Stdlib_Int[8], nesting, 0) ? nesting : this_will_be_undefined(0); } - var _b_ = caml_call1(Stdlib_Int[12], _a_); - caml_call1(Stdlib[46], _b_); + var b = caml_call1(Stdlib_Int[12], a); + caml_call1(Stdlib[46], b); my_ref[1] = 2; var Test = [0, my_ref]; runtime.caml_register_global(4, Test, "Test"); @@ -202,7 +202,7 @@ let () = my_ref := 2 let t$1 = t; var this_will_be_undefined = - function(param){var _e_ = 1 === t$1[1] ? 1 : 0; return _e_ ? 1 : 2;}, + function(param){var a = 1 === t$1[1] ? 1 : 0; return a ? 1 : 2;}, i = t[1]; if(0 === i) break; if(1 === i) break b; @@ -210,12 +210,12 @@ let () = my_ref := 2 } var g = function(param){return 2 + this_will_be_undefined(0) | 0;}, - _a_ = g(0), - _c_ = g(0) + _a_ | 0; + b = g(0), + a = g(0) + b | 0; break a; } if(caml_call2(Stdlib_Int[8], nesting, 0)) - var _c_ = nesting; + var a = nesting; else var g$0 = @@ -224,11 +224,11 @@ let () = my_ref := 2 ? 2 + this_will_be_undefined(0) | 0 : 1; }, - _b_ = g$0(0), - _c_ = g$0(0) + _b_ | 0; + c = g$0(0), + a = g$0(0) + c | 0; } - var _d_ = caml_call1(Stdlib_Int[12], _c_); - caml_call1(Stdlib[46], _d_); + var d = caml_call1(Stdlib_Int[12], a); + caml_call1(Stdlib[46], d); my_ref[1] = 2; var Test = [0, my_ref]; runtime.caml_register_global(5, Test, "Test"); diff --git a/compiler/tests-compiler/gh1768.ml b/compiler/tests-compiler/gh1768.ml index 4ef6ad25e7..5acc84c671 100644 --- a/compiler/tests-compiler/gh1768.ml +++ b/compiler/tests-compiler/gh1768.ml @@ -54,20 +54,20 @@ let () = dummy = 0, global_data = runtime.caml_get_global_data(), Assert_failure = global_data.Assert_failure, - _a_ = [0, caml_string_of_jsbytes("test.ml"), 4, 27], - _b_ = [0, caml_string_of_jsbytes("test.ml"), 8, 2]; + a = [0, caml_string_of_jsbytes("test.ml"), 4, 27], + b = [0, caml_string_of_jsbytes("test.ml"), 8, 2]; function h(x){x[1] = function(x, y){return x + y | 0;};} function f(param){ return [0, function(param){ - throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); + throw caml_maybe_attach_backtrace([0, Assert_failure, a], 1); }]; } var x = f(); function g(param){return caml_call1(x[1], 7);} h(x); if(10 !== caml_call1(g(), 3)) - throw caml_maybe_attach_backtrace([0, Assert_failure, _b_], 1); + throw caml_maybe_attach_backtrace([0, Assert_failure, b], 1); var Test = [0]; runtime.caml_register_global(3, Test, "Test"); return; diff --git a/compiler/tests-compiler/gh1868.ml b/compiler/tests-compiler/gh1868.ml index 521851f104..3723949995 100644 --- a/compiler/tests-compiler/gh1868.ml +++ b/compiler/tests-compiler/gh1868.ml @@ -39,7 +39,7 @@ let wrap f = [%expect {| function wrap$0(f){ - try{var _d_ = caml_call1(f, 0); return _d_;} + try{var a = caml_call1(f, 0); return a;} catch(exn$1){ var exn = caml_wrap_exception(exn$1); for(;;){ @@ -51,17 +51,17 @@ let wrap f = } //end function wrap$1(f, cont){ - function _b_(exn$1){ + function a(exn$1){ if(exn$1[1] === Nested){ var exn$0 = exn$1[2]; - return caml_exact_trampoline_call1(_b_, exn$0); + return caml_exact_trampoline_call1(a, exn$0); } var raise = caml_pop_trap(), exn = caml_maybe_attach_backtrace(exn$1, 1); return raise(exn); } - runtime.caml_push_trap(_b_); + runtime.caml_push_trap(a); return caml_trampoline_cps_call2 - (f, 0, function(_c_){caml_pop_trap(); return cont(_c_);}); + (f, 0, function(a){caml_pop_trap(); return cont(a);}); } //end var wrap = runtime.caml_cps_closure(wrap$0, wrap$1); diff --git a/compiler/tests-compiler/gh747.ml b/compiler/tests-compiler/gh747.ml index ea4050604a..96d324f820 100644 --- a/compiler/tests-compiler/gh747.ml +++ b/compiler/tests-compiler/gh747.ml @@ -82,22 +82,22 @@ print_endline(String.make 1 "Ɋ".[0] ^ String.make 1 "Ɋ".[1]);; 27: /*<>*/ caml_call1(Stdlib[46], greeting); 28: /*<>*/ caml_call1(Stdlib[46], greeting$0); 29: var - 30: _a_ = /*<>*/ caml_call1(Stdlib_Random[5], 30), + 30: a = /*<>*/ caml_call1(Stdlib_Random[5], 30), 31: unicodeLength = 32: /*<>*/ /*<>*/ runtime.caml_ml_string_length - 33: ( /*<>*/ caml_call2(Stdlib_String[1], _a_, 105)), - 34: _b_ = /*<>*/ caml_call1(Stdlib[33], unicodeLength), - 35: _c_ = + 33: ( /*<>*/ caml_call2(Stdlib_String[1], a, 105)), + 34: b = /*<>*/ caml_call1(Stdlib[33], unicodeLength), + 35: c = 36: /*<>*/ caml_call2 37: (Stdlib[28], 38: caml_string_of_jsbytes('String.length("\xc9\x8a") should be two:'), - 39: _b_); - 40: /*<>*/ caml_call1(Stdlib[46], _c_); + 39: b); + 40: /*<>*/ caml_call1(Stdlib[46], c); 41: var - 42: _d_ = /*<>*/ caml_call2(Stdlib_String[1], 1, 138), - 43: _e_ = /*<>*/ caml_call2(Stdlib_String[1], 1, 201), - 44: _f_ = /*<>*/ caml_call2(Stdlib[28], _e_, _d_); - 45: /*<>*/ caml_call1(Stdlib[46], _f_); + 42: d = /*<>*/ caml_call2(Stdlib_String[1], 1, 138), + 43: e = /*<>*/ caml_call2(Stdlib_String[1], 1, 201), + 44: f = /*<>*/ caml_call2(Stdlib[28], e, d); + 45: /*<>*/ caml_call1(Stdlib[46], f); 46: var Test = /*<>*/ [0, greeting$0, unicodeLength]; 47: runtime.caml_register_global(8, Test, "Test"); 48: return; @@ -268,7 +268,7 @@ end 48: caml_string_of_jsbytes("Raised by primitive operation at"), 49: cst_Called_from = caml_string_of_jsbytes("Called from"), 50: cst_inlined = caml_string_of_jsbytes(" (inlined)"), - 51: _a_ = + 51: a = 52: [0, 53: [2, 54: 0, @@ -293,12 +293,12 @@ end 73: [11, caml_string_of_jsbytes(", characters "), partial]]]]]]]]]], 74: caml_string_of_jsbytes 75: ('%s %s in file "%s"%s, line %d, characters %d-%d')], - 76: _b_ = + 76: b = 77: [0, 78: [2, 0, [11, caml_string_of_jsbytes(" unknown location"), 0]], 79: caml_string_of_jsbytes("%s unknown location")], - 80: _c_ = [0, [2, 0, [12, 10, 0]], caml_string_of_jsbytes("%s\n")], - 81: _d_ = + 80: c = [0, [2, 0, [12, 10, 0]], caml_string_of_jsbytes("%s\n")], + 81: d = 82: [0, 83: [11, 84: caml_string_of_jsbytes @@ -314,82 +314,81 @@ end 94: } 95: /*<>*/ if(0 === slot[0]){ 96: var - 97: _h_ = /*<>*/ slot[5], - 98: _i_ = slot[4], - 99: _j_ = slot[3], - 100: _k_ = slot[6] ? cst_inlined : cst, - 101: _l_ = /*<>*/ slot[2], - 102: _m_ = slot[7], - 103: _n_ = info(slot[1]); + 97: c = /*<>*/ slot[5], + 98: d = slot[4], + 99: e = slot[3], + 100: f = slot[6] ? cst_inlined : cst, + 101: g = /*<>*/ slot[2], + 102: h = slot[7], + 103: i = info(slot[1]); 104: /*<>*/ return [0, - 105: caml_call8 - 106: (Stdlib_Printf[4], _a_, _n_, _m_, _l_, _k_, _j_, _i_, _h_)] /*<>*/ ; - 107: } - 108: /*<>*/ if(slot[1]) /*<>*/ return 0; - 109: var _o_ = /*<>*/ info(0); - 110: /*<>*/ return [0, caml_call2(Stdlib_Printf[4], _b_, _o_)] /*<>*/ ; - 111: /*<>*/ } - 112: function print_exception_backtrace(outchan, backtrace){ - 113: /*<>*/ if(! backtrace) - 114: /*<>*/ return caml_call2(Stdlib_Printf[1], outchan, _d_) /*<>*/ ; - 115: var - 116: a = /*<>*/ backtrace[1], - 117: _f_ = /*<>*/ a.length - 2 | 0, - 118: _e_ = 0; - 119: if(_f_ >= 0){ - 120: var i = _e_; - 121: for(;;){ - 122: var - 123: match = - 124: /*<>*/ /*<>*/ format_backtrace_slot - 125: (i, /*<>*/ runtime.caml_check_bound(a, i)[1 + i]); - 126: /*<>*/ if(match){ - 127: var str = match[1]; - 128: /*<>*/ caml_call3(Stdlib_Printf[1], outchan, _c_, str); - 129: } - 130: var _g_ = /*<>*/ i + 1 | 0; - 131: if(_f_ === i) break; - 132: i = _g_; - 133: } - 134: } - 135: /*<>*/ return 0; - 136: /*<>*/ } - 137: function compare(left, right, e1, e2){ - 138: /*<>*/ if(0 === e1[0]){ - 139: var v1 = e1[1]; - 140: if(0 !== e2[0]) /*<>*/ return -1; - 141: var v2 = /*<>*/ e2[1]; - 142: /*<>*/ return caml_call2(left, v1, v2) /*<>*/ ; - 143: } - 144: var v1$0 = /*<>*/ e1[1]; - 145: if(0 === e2[0]) /*<>*/ return 1; - 146: var v2$0 = /*<>*/ e2[1]; - 147: /*<>*/ return caml_call2(right, v1$0, v2$0) /*<>*/ ; - 148: } - 149: var - 150: Either = /*<>*/ [0, compare], - 151: Test = - 152: [0, - 153: executable_name, - 154: os_type, - 155: backend_type, - 156: 0, + 105: caml_call8(Stdlib_Printf[4], a, i, h, g, f, e, d, c)] /*<>*/ ; + 106: } + 107: /*<>*/ if(slot[1]) /*<>*/ return 0; + 108: var j = /*<>*/ info(0); + 109: /*<>*/ return [0, caml_call2(Stdlib_Printf[4], b, j)] /*<>*/ ; + 110: /*<>*/ } + 111: function print_exception_backtrace(outchan, backtrace){ + 112: /*<>*/ if(! backtrace) + 113: /*<>*/ return caml_call2(Stdlib_Printf[1], outchan, d) /*<>*/ ; + 114: var + 115: a = /*<>*/ backtrace[1], + 116: b = /*<>*/ a.length - 2 | 0, + 117: e = 0; + 118: if(b >= 0){ + 119: var i = e; + 120: for(;;){ + 121: var + 122: match = + 123: /*<>*/ /*<>*/ format_backtrace_slot + 124: (i, /*<>*/ runtime.caml_check_bound(a, i)[1 + i]); + 125: /*<>*/ if(match){ + 126: var str = match[1]; + 127: /*<>*/ caml_call3(Stdlib_Printf[1], outchan, c, str); + 128: } + 129: var f = /*<>*/ i + 1 | 0; + 130: if(b === i) break; + 131: i = f; + 132: } + 133: } + 134: /*<>*/ return 0; + 135: /*<>*/ } + 136: function compare(left, right, e1, e2){ + 137: /*<>*/ if(0 === e1[0]){ + 138: var v1 = e1[1]; + 139: if(0 !== e2[0]) /*<>*/ return -1; + 140: var v2 = /*<>*/ e2[1]; + 141: /*<>*/ return caml_call2(left, v1, v2) /*<>*/ ; + 142: } + 143: var v1$0 = /*<>*/ e1[1]; + 144: if(0 === e2[0]) /*<>*/ return 1; + 145: var v2$0 = /*<>*/ e2[1]; + 146: /*<>*/ return caml_call2(right, v1$0, v2$0) /*<>*/ ; + 147: } + 148: var + 149: Either = /*<>*/ [0, compare], + 150: Test = + 151: [0, + 152: executable_name, + 153: os_type, + 154: backend_type, + 155: 0, + 156: 32, 157: 32, - 158: 32, - 159: unix, - 160: win32, - 161: cygwin, - 162: max_array_length, - 163: max_floatarray_length, - 164: max_string_length, - 165: Unhandled, - 166: format_backtrace_slot, - 167: print_exception_backtrace, - 168: Either]; - 169: runtime.caml_register_global(12, Test, "Test"); - 170: return; - 171: /*<>*/ } - 172: (globalThis)); - 173: - 174: //# sourceMappingURL=test.map + 158: unix, + 159: win32, + 160: cygwin, + 161: max_array_length, + 162: max_floatarray_length, + 163: max_string_length, + 164: Unhandled, + 165: format_backtrace_slot, + 166: print_exception_backtrace, + 167: Either]; + 168: runtime.caml_register_global(12, Test, "Test"); + 169: return; + 170: /*<>*/ } + 171: (globalThis)); + 172: + 173: //# sourceMappingURL=test.map |}] diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index bb38774de0..18be197f97 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -41,30 +41,30 @@ let%expect_test "Eliminates unused functions from functor" = function create(l, v, r){ if(l) var h = l[4], hl = h; else var hl = 0; if(r) var h$0 = r[4], hr = h$0; else var hr = 0; - var _k_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _k_]; + var a = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, a]; } function bal(l, v, r){ if(l) var h = l[4], hl = h; else var hl = 0; if(r) var h$0 = r[4], hr = h$0; else var hr = 0; if((hr + 2 | 0) < hl){ - if(! l) return invalid_arg(_b_); - var lr = l[3], lv = l[2], ll = l[1], _f_ = height(lr); - if(_f_ <= height(ll)) return create(ll, lv, create(lr, v, r)); - if(! lr) return invalid_arg(_a_); - var lrr = lr[3], lrv = lr[2], lrl = lr[1], _g_ = create(lrr, v, r); - return create(create(ll, lv, lrl), lrv, _g_); + if(! l) return invalid_arg(c); + var lr = l[3], lv = l[2], ll = l[1], a = height(lr); + if(a <= height(ll)) return create(ll, lv, create(lr, v, r)); + if(! lr) return invalid_arg(b); + var lrr = lr[3], lrv = lr[2], lrl = lr[1], f = create(lrr, v, r); + return create(create(ll, lv, lrl), lrv, f); } if((hl + 2 | 0) >= hr){ - var _j_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _j_]; + var j = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, j]; } - if(! r) return invalid_arg(_d_); - var rr = r[3], rv = r[2], rl = r[1], _h_ = height(rl); - if(_h_ <= height(rr)) return create(create(l, v, rl), rv, rr); - if(! rl) return invalid_arg(_c_); - var rlr = rl[3], rlv = rl[2], rll = rl[1], _i_ = create(rlr, rv, rr); - return create(create(l, v, rll), rlv, _i_); + if(! r) return invalid_arg(e); + var rr = r[3], rv = r[2], rl = r[1], g = height(rl); + if(g <= height(rr)) return create(create(l, v, rl), rv, rr); + if(! rl) return invalid_arg(d); + var rlr = rl[3], rlv = rl[2], rll = rl[1], i = create(rlr, rv, rr); + return create(create(l, v, rll), rlv, i); } function add(x, t){ if(! t) return [0, 0, x, 0, 1]; diff --git a/compiler/tests-compiler/lambda_lifting.ml b/compiler/tests-compiler/lambda_lifting.ml index 11cc1467b0..6a2d373239 100644 --- a/compiler/tests-compiler/lambda_lifting.ml +++ b/compiler/tests-compiler/lambda_lifting.ml @@ -26,13 +26,12 @@ Printf.printf "%d\n" (f 3) runtime = globalThis.jsoo_runtime, global_data = runtime.caml_get_global_data(), Stdlib_Printf = global_data.Stdlib__Printf, - _e_ = - [0, [4, 0, 0, 0, [12, 10, 0]], runtime.caml_string_of_jsbytes("%d\n")]; + b = [0, [4, 0, 0, 0, [12, 10, 0]], runtime.caml_string_of_jsbytes("%d\n")]; function h(x, y){function h(z){return (x + y | 0) + z | 0;} return h;} function g(x){function g(y){var h$0 = h(x, y); return h$0(7);} return g;} function f(x){var g$0 = g(x); return g$0(5);} - var _d_ = f(3); - runtime.caml_callback(Stdlib_Printf[2], [_e_, _d_]); + var a = f(3); + runtime.caml_callback(Stdlib_Printf[2], [b, a]); var Test = [0]; runtime.caml_register_global(2, Test, "Test"); return; diff --git a/compiler/tests-compiler/lazy.ml b/compiler/tests-compiler/lazy.ml index 1ec728acd6..14226b1d06 100644 --- a/compiler/tests-compiler/lazy.ml +++ b/compiler/tests-compiler/lazy.ml @@ -35,14 +35,14 @@ 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); + var c = do_the_lazy_rec(n - 1 | 0), a = runtime.caml_obj_tag(lz); a: - if(250 === _c_) - var _d_ = lz[1]; + if(250 === a) + var b = lz[1]; else{ - if(246 !== _c_ && 244 !== _c_){var _d_ = lz; break a;} - var _d_ = caml_call1(CamlinternalLazy[2], lz); + if(246 !== a && 244 !== a){var b = lz; break a;} + var b = caml_call1(CamlinternalLazy[2], lz); } - return [0, _d_, _b_]; + return [0, b, c]; } //end |}] diff --git a/compiler/tests-compiler/loops.ml b/compiler/tests-compiler/loops.ml index eefa2ef721..1a750d402f 100644 --- a/compiler/tests-compiler/loops.ml +++ b/compiler/tests-compiler/loops.ml @@ -88,18 +88,13 @@ let rec fun_with_loop acc = function var a$0 = [0, acc$0], i$0 = 0; for(;;){ a$0[1] = [0, 1, a$0[1]]; - var _b_ = i$0 + 1 | 0; + var c = i$0 + 1 | 0; if(10 === i$0) return a$0[1]; - i$0 = _b_; + i$0 = c; } } var xs = param$0[2], a = [0, acc$0], i = 0; - for(;;){ - a[1] = [0, 1, a[1]]; - var _a_ = i + 1 | 0; - if(10 === i) break; - i = _a_; - } + for(;;){a[1] = [0, 1, a[1]]; var b = i + 1 | 0; if(10 === i) break; i = b;} var acc$1 = [0, x, a[1]]; acc$0 = acc$1; param$0 = xs; @@ -132,13 +127,13 @@ let for_for_while () = var j = 1; for(;;){ for(;;){if(10 <= runtime.caml_mul(k, j)) break; id[1]++;} - var _b_ = j + 1 | 0; + var b = j + 1 | 0; if(10 === j) break; - j = _b_; + j = b; } - var _a_ = k + 1 | 0; + var a = k + 1 | 0; if(10 === k) return 0; - k = _a_; + k = a; } } //end |}] @@ -170,16 +165,16 @@ let for_for_while () = for(;;){ if(10 <= caml_div(k, j)) break; try{caml_div(k, j);} - catch(_c_){throw caml_maybe_attach_backtrace(Stdlib[8], 1);} + catch(a){throw caml_maybe_attach_backtrace(Stdlib[8], 1);} id[1]++; } - var _b_ = j + 1 | 0; + var b = j + 1 | 0; if(10 === j) break; - j = _b_; + j = b; } - var _a_ = k + 1 | 0; + var a = k + 1 | 0; if(10 === k) return 0; - k = _a_; + k = a; } } //end |}] @@ -252,10 +247,10 @@ let f t x = {| function f(t, x){ try{var val$0 = caml_call2(Stdlib_Hashtbl[6], t, x);} - catch(_f_){ - var _c_ = caml_wrap_exception(_f_); - if(_c_ === Stdlib[8]) return - 1; - throw caml_maybe_attach_backtrace(_c_, 0); + catch(a){ + var d = caml_wrap_exception(a); + if(d === Stdlib[8]) return - 1; + throw caml_maybe_attach_backtrace(d, 0); } if(val$0 && ! val$0[2]){ var x$1 = val$0[1], x$0 = x$1; @@ -263,21 +258,21 @@ let f t x = 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; + catch(c){ + var b = caml_wrap_exception(c); + if(b !== Stdlib[3]) throw caml_maybe_attach_backtrace(b, 0); + var a = 0; break a; } if(val && ! val[2]){ - var y = val[1], _b_ = y === (x$0 + 1 | 0) ? 1 : 0; - if(_b_){var _d_ = _b_; break a;} + var y = val[1], c = y === (x$0 + 1 | 0) ? 1 : 0; + if(c){var a = c; break a;} x$0 = y; continue; } - var _d_ = 0; + var a = 0; } - return _d_ ? 1 : 2; + return a ? 1 : 2; } } return - 2; @@ -322,15 +317,15 @@ in loop x if(3 >= x$0 >>> 0) switch(x$0){ case 0: - var _a_ = 1; break a; + var a = 1; break a; case 2: - var n = caml_call1(Stdlib_Random[5], 2), _a_ = n + n | 0; break a; + 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; + var a = 2; } - return _a_ + 2 | 0; + return a + 2 | 0; } } //end |}] @@ -436,8 +431,8 @@ let add_substitute = var lim$1 = caml_ml_string_length(s), previous = 32, i$4 = 0; for(;;){ if(i$4 >= lim$1){ - var _b_ = 92 === previous ? 1 : 0; - return _b_ ? caml_call2(add_char, b, previous) : _b_; + var c = 92 === previous ? 1 : 0; + return c ? caml_call2(add_char, b, previous) : c; } var previous$0 = caml_string_get(s, i$4); if(36 === previous$0) @@ -494,7 +489,7 @@ let add_substitute = var closing = 41; else{ if(123 !== opening) - throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); + 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; diff --git a/compiler/tests-compiler/match_with_exn.ml b/compiler/tests-compiler/match_with_exn.ml index 73d2be5761..5f1ff564ae 100644 --- a/compiler/tests-compiler/match_with_exn.ml +++ b/compiler/tests-compiler/match_with_exn.ml @@ -76,10 +76,10 @@ let fun2 () = 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]; + catch(b){ + var a = caml_wrap_exception(b); + if(a[1] !== A) throw caml_maybe_attach_backtrace(a, 0); + var i = a[2]; if(2 !== i) return i + 2 | 0; var i$0 = i; break a; @@ -94,10 +94,10 @@ let fun2 () = 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); + 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); } if(0 !== i$0) return i$0 + 1 | 0; var i = i$0; diff --git a/compiler/tests-compiler/minify.ml b/compiler/tests-compiler/minify.ml index ae8dd099ef..93282f472e 100644 --- a/compiler/tests-compiler/minify.ml +++ b/compiler/tests-compiler/minify.ml @@ -91,10 +91,10 @@ console.log("xx =", xx); $ cat "test.min.js" 1: var 2: xx=1;function - 3: f(){a=2;try{throw 1}catch(a){var - 4: a=3}return a}function + 3: f(){f=2;try{throw 1}catch(f){var + 4: f=3}return f}function 5: g(){var - 6: b=2;return b}console.log("xx =",xx);console.log("f() =",f());console.log("xx =",xx);console.log("g() =",g());console.log("xx =",xx); + 6: a=2;return a}console.log("xx =",xx);console.log("f() =",f());console.log("xx =",xx);console.log("g() =",g());console.log("xx =",xx); xx = 1 f() = 2 xx = 1 @@ -150,7 +150,7 @@ try { throw 1; } catch (xx) { a(0) } 2: a = function () { return 0 } 3: try { throw 1; } catch (xx) { a(0) } $ cat "test.min.js" - 1: a=function(){return 0};try{throw 1}catch(b){a(0)} |}]) + 1: a=function(){return 0};try{throw 1}catch(f){a(0)} |}]) let%expect_test _ = with_temp_dir ~f:(fun () -> @@ -175,8 +175,8 @@ try { var xxxxx = 3; var bbb = 2; throw 1; } catch (xx) { const bbb = a(0) } } 2: a = function (yyyy) { 3: try { var xxxxx = 3; var bbb = 2; throw 1; } catch (xx) { const bbb = a(0) } } $ cat "test.min.js" - 1: a=function(b){try{var - 2: e=3,d=2;throw 1}catch(c){const + 1: a=function(d){try{var + 2: c=3,b=2;throw 1}catch(f){const 3: b=a(0)}}; |}]) let%expect_test _ = @@ -206,10 +206,10 @@ a = function (aaa,b,c,yyy) { 4: else { let xxx = 3; let aaa = xxx; return xxx * yyy } 5: } $ cat "test.min.js" - 1: a=function(b,c,d,e){if(true){let - 2: b=2;var - 3: f=3;return b+b}else{let - 4: b=3,c=b;return b*e}}; |}]) + 1: a=function(a,b,c,d){if(true){let + 2: a=2;var + 3: e=3;return a+a}else{let + 4: a=3,b=a;return a*d}}; |}]) let%expect_test _ = with_temp_dir ~f:(fun () -> diff --git a/compiler/tests-compiler/mutable_closure.ml b/compiler/tests-compiler/mutable_closure.ml index f35c6dcd64..39f3534b9b 100644 --- a/compiler/tests-compiler/mutable_closure.ml +++ b/compiler/tests-compiler/mutable_closure.ml @@ -125,49 +125,49 @@ let%expect_test _ = f$0 = function(counter, n){ if(- 1 === n){ - var _f_ = - 2; - if(counter >= 50) return caml_trampoline_return(g$0, [0, _f_]); + var a = - 2; + if(counter >= 50) return caml_trampoline_return(g$0, [0, a]); var counter$1 = counter + 1 | 0; - return g$0(counter$1, _f_); + return g$0(counter$1, a); } if(0 === n) return i$0; - var _g_ = n - 1 | 0; - if(counter >= 50) return caml_trampoline_return(g$0, [0, _g_]); + var b = n - 1 | 0; + if(counter >= 50) return caml_trampoline_return(g$0, [0, b]); var counter$0 = counter + 1 | 0; - return g$0(counter$0, _g_); + return g$0(counter$0, b); }, f = function(n){return caml_trampoline(f$1(0, n));}, g = function(counter, n){ if(- 1 === n){ - var _d_ = - 2; - if(counter >= 50) return caml_trampoline_return(f$1, [0, _d_]); + var a = - 2; + if(counter >= 50) return caml_trampoline_return(f$1, [0, a]); var counter$1 = counter + 1 | 0; - return f$1(counter$1, _d_); + return f$1(counter$1, a); } if(0 === n) return i$0; - var _e_ = n - 1 | 0; - if(counter >= 50) return caml_trampoline_return(f$1, [0, _e_]); + var b = n - 1 | 0; + if(counter >= 50) return caml_trampoline_return(f$1, [0, b]); var counter$0 = counter + 1 | 0; - return f$1(counter$0, _e_); + return f$1(counter$0, b); }; let f$1 = f$0, g$0 = g; - var _b_ = direct[1]; - direct[1] = [0, f(i), _b_]; + var b = direct[1]; + direct[1] = [0, f(i), b]; let f$2 = f; indirect[1] = [0, function(param){return f$2(i$0);}, indirect[1]]; - var _c_ = i + 1 | 0; + var c = i + 1 | 0; if(3 === i) break; - i = _c_; + i = c; } var indirect$0 = caml_call2(list_map, function(f){return caml_call1(f, 0);}, indirect[1]), direct$0 = direct[1]; if(runtime.caml_equal(indirect$0, direct$0)) return 0; - throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); + throw caml_maybe_attach_backtrace([0, Assert_failure, a], 1); } - //end|}] + //end |}] let%expect_test _ = let prog = {| diff --git a/compiler/tests-compiler/rec52.ml b/compiler/tests-compiler/rec52.ml index 87e13f1e32..2556672435 100644 --- a/compiler/tests-compiler/rec52.ml +++ b/compiler/tests-compiler/rec52.ml @@ -67,16 +67,16 @@ let%expect_test "let rec" = letrec_function_context = [], c = [], d = runtime.caml_array_make(5, 0), - default$0 = 42; + default$ = 42; function a(x){return b(x);} function b(x){ - var _a_ = b(0); - return [0, 84, [0, letrec_function_context[1], c, _a_]]; + var a = b(0); + return [0, 84, [0, letrec_function_context[1], c, a]]; } var tbl = caml_call2(Stdlib_Hashtbl[1], 0, 17); caml_update_dummy(letrec_function_context, [0, tbl]); - caml_update_dummy(c, [0, [0, d, default$0]]); - var Test = [0, a, b, c, d, default$0]; + caml_update_dummy(c, [0, [0, d, default$]]); + var Test = [0, a, b, c, d, default$]; runtime.caml_register_global(1, Test, "Test"); return; } diff --git a/compiler/tests-compiler/side_effect.ml b/compiler/tests-compiler/side_effect.ml index d59c6f5534..bd21cfa7ba 100644 --- a/compiler/tests-compiler/side_effect.ml +++ b/compiler/tests-compiler/side_effect.ml @@ -79,23 +79,23 @@ let%expect_test _ = [0, [11, caml_string_of_jsbytes("Failure! "), [2, 0, 0]], caml_string_of_jsbytes("Failure! %s")]), - _a_ = + a = [0, [11, caml_string_of_jsbytes("Side effect: "), [2, 0, [12, 10, [10, 0]]]], caml_string_of_jsbytes("Side effect: %s\n%!")]; function side_effect(yes, label){ - if(yes){caml_call2(Stdlib_Printf[2], _a_, label); i[1]++;} + if(yes){caml_call2(Stdlib_Printf[2], a, label); i[1]++;} return 0; } side_effect(0, caml_string_of_jsbytes("this is only to avoid inlining")); var - _b_ = + b = [0, [11, caml_string_of_jsbytes("Or this\n"), [10, 0]], caml_string_of_jsbytes("Or this\n%!")], - _c_ = + c = [0, [11, caml_string_of_jsbytes("Please don't optimize this away\n"), @@ -108,8 +108,8 @@ let%expect_test _ = < side_effect(1, caml_string_of_jsbytes("Should only see this once")) >>> 0 - ? caml_call1(Stdlib_Printf[2], _b_) - : caml_call1(Stdlib_Printf[2], _c_); + ? caml_call1(Stdlib_Printf[2], b) + : caml_call1(Stdlib_Printf[2], c); if(1 === i[1]) log_success(0); else diff --git a/compiler/tests-compiler/static_eval.ml b/compiler/tests-compiler/static_eval.ml index 957fd4481f..3c33560a3d 100644 --- a/compiler/tests-compiler/static_eval.ml +++ b/compiler/tests-compiler/static_eval.ml @@ -192,14 +192,11 @@ let%expect_test "static eval of tags" = var global_data = runtime.caml_get_global_data(), Stdlib_Random = global_data.Stdlib__Random, - _a_ = [0, [1, 0]], - _b_ = [1, 0], - x = 1 < caml_call1(Stdlib_Random[5], 3) ? _a_ : _b_; + a = [0, [1, 0]], + b = [1, 0], + x = 1 < caml_call1(Stdlib_Random[5], 3) ? a : b; x[0]; - var - foobar = 3, - export$0 = [0, foobar, foobar], - Test = [0, foobar, export$0]; + var foobar = 3, export$ = [0, foobar, foobar], Test = [0, foobar, export$]; runtime.caml_register_global(3, Test, "Test"); return; } diff --git a/compiler/tests-compiler/tailcall.ml b/compiler/tests-compiler/tailcall.ml index 9daa98c7f7..fc307a3a5e 100644 --- a/compiler/tests-compiler/tailcall.ml +++ b/compiler/tests-compiler/tailcall.ml @@ -47,25 +47,25 @@ let%expect_test _ = function fun1(param){ function odd$0(counter, x){ if(0 === x) return 0; - var _f_ = x - 1 | 0; - if(counter >= 50) return caml_trampoline_return(even$0, [0, _f_]); + var a = x - 1 | 0; + if(counter >= 50) return caml_trampoline_return(even$0, [0, a]); var counter$0 = counter + 1 | 0; - return even$0(counter$0, _f_); + return even$0(counter$0, a); } function odd(x){return caml_trampoline(odd$0(0, x));} function even$0(counter, x){ if(0 === x) return 1; - var _e_ = x - 1 | 0; - if(counter >= 50) return caml_trampoline_return(odd$0, [0, _e_]); + var a = x - 1 | 0; + if(counter >= 50) return caml_trampoline_return(odd$0, [0, a]); var counter$0 = counter + 1 | 0; - return odd$0(counter$0, _e_); + return odd$0(counter$0, a); } function even(x){return caml_trampoline(even$0(0, x));} - var _b_ = even(1); - if(odd(1) === _b_) - throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); - try{odd(5000); var _c_ = log_success(0); return _c_;} - catch(_d_){return caml_call1(log_failure, cst_too_much_recursion);} + var b = even(1); + if(odd(1) === b) + throw caml_maybe_attach_backtrace([0, Assert_failure, a], 1); + try{odd(5000); var c = log_success(0); return c;} + catch(a){return caml_call1(log_failure, cst_too_much_recursion);} } //end |}] @@ -102,10 +102,10 @@ let%expect_test _ = return 0 === x ? 1 : caml_trampoline_return(odd$0, [0, x - 1 | 0]); } function even(x){return caml_trampoline(even$0(x));} - var _b_ = even(1); - if(odd(1) === _b_) - throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); - try{odd(5000); var _c_ = log_success(0); return _c_;} - catch(_d_){return caml_call1(log_failure, cst_too_much_recursion);} + var b = even(1); + if(odd(1) === b) + throw caml_maybe_attach_backtrace([0, Assert_failure, a], 1); + try{odd(5000); var c = log_success(0); return c;} + catch(a){return caml_call1(log_failure, cst_too_much_recursion);} } //end |}] diff --git a/compiler/tests-compiler/test_string.ml b/compiler/tests-compiler/test_string.ml index 414002fcd0..3c113745e2 100644 --- a/compiler/tests-compiler/test_string.ml +++ b/compiler/tests-compiler/test_string.ml @@ -56,9 +56,9 @@ let (_ : string) = here () cst_a = "a", cst_b = "b", caml_string_concat = runtime.caml_string_concat; - function _a_(_b_){return cst_a + cst_a + cst_b + cst_b;} - _a_(0); - var Test = [0, caml_string_concat, _a_]; + function a(a){return cst_a + cst_a + cst_b + cst_b;} + a(0); + var Test = [0, caml_string_concat, a]; runtime.caml_register_global(2, Test, "Test"); return; } @@ -104,13 +104,13 @@ let (_ : string) = here () caml_string_of_jsbytes = runtime.caml_string_of_jsbytes, cst_a = caml_string_of_jsbytes("a"), cst_b = caml_string_of_jsbytes("b"); - function _a_(_b_){ + function a(a){ return caml_string_concat (cst_a, caml_string_concat(cst_a, caml_string_concat(cst_b, cst_b))); } - _a_(0); - var Test = [0, caml_string_concat, _a_]; + a(0); + var Test = [0, caml_string_concat, a]; runtime.caml_register_global(2, Test, "Test"); return; } diff --git a/compiler/tests-compiler/variable_declaration_output.ml b/compiler/tests-compiler/variable_declaration_output.ml index f4275e9d77..8f8fc92b51 100644 --- a/compiler/tests-compiler/variable_declaration_output.ml +++ b/compiler/tests-compiler/variable_declaration_output.ml @@ -124,20 +124,17 @@ let%expect_test _ = [%expect {| function match_expr(param){ - var _c_, _b_, _a_; + var c, b, a; a: if(param){ - _a_ = param[1]; - if(_a_){ - _b_ = _a_[1]; - if(_b_){ - if(2 === _b_[1] && ! param[2]) return 3; - } - else if(! param[2]) return 2; + a = param[1]; + if(a){ + b = a[1]; + if(b){if(2 === b[1] && ! param[2]) return 3;} else if(! param[2]) return 2; } else if(! param[2]) break a; - _c_ = param[2]; - if(_c_ && ! _c_[1]) break a; + c = param[2]; + if(c && ! c[1]) break a; return 4; } return 1; @@ -149,17 +146,14 @@ let%expect_test _ = function match_expr(param){ a: if(param){ - var _a_ = param[1]; - if(_a_){ - var _b_ = _a_[1]; - if(_b_){ - if(2 === _b_[1] && ! param[2]) return 3; - } - else if(! param[2]) return 2; + var a = param[1]; + if(a){ + var b = a[1]; + if(b){if(2 === b[1] && ! param[2]) return 3;} else if(! param[2]) return 2; } else if(! param[2]) break a; - var _c_ = param[2]; - if(_c_ && ! _c_[1]) 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 ff0c619c57..442de68979 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -457,8 +457,8 @@ cst_true = cst_true$0, cst_false = cst_false$0, cst_bool_of_string = "bool_of_string", - _a_ = [0, 1], - _b_ = [0, 0]; + a = [0, 1], + b = [0, 0]; function char_of_int(n){ /*<>*/ if(0 <= n && 255 >= n) /*<>*/ return n; @@ -477,19 +477,19 @@ } function bool_of_string_opt(param){ /*<>*/ return param !== cst_false$0 - ? param !== cst_true$0 ? 0 : _a_ - : _b_ /*<>*/ ; + ? param !== cst_true$0 ? 0 : a + : b /*<>*/ ; } function string_of_int(n){ /*<>*/ return "" + n;} function int_of_string_opt(s){ /*<>*/ try{ - var _w_ = /*<>*/ [0, caml_int_of_string(s)]; - return _w_; + var b = /*<>*/ [0, caml_int_of_string(s)]; + return b; } - catch(_x_){ - var _v_ = /*<>*/ caml_wrap_exception(_x_); - if(_v_[1] === Failure) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_v_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] === Failure) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } function valid_float_lexem(s1){ @@ -518,20 +518,20 @@ } function float_of_string_opt(s){ /*<>*/ try{ - var _t_ = /*<>*/ [0, caml_float_of_string(s)]; - return _t_; + var b = /*<>*/ [0, caml_float_of_string(s)]; + return b; } - catch(_u_){ - var _s_ = /*<>*/ caml_wrap_exception(_u_); - if(_s_[1] === Failure) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_s_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] === Failure) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } function symbol(l1, l2){ /*<>*/ if(! l1) /*<>*/ return l2; - var _q_ = /*<>*/ l1[2], h1 = l1[1]; - if(! _q_) /*<>*/ return [0, h1, l2]; - var match = /*<>*/ _q_[2], h2 = _q_[1]; + var a = /*<>*/ l1[2], h1 = l1[1]; + if(! a) /*<>*/ return [0, h1, l2]; + var match = /*<>*/ a[2], h2 = a[1]; if(! match) /*<>*/ return [0, h1, [0, h2, l2]]; var tl = /*<>*/ match[2], @@ -542,9 +542,9 @@ l1$0 = tl; for(;;){ /*<>*/ if(l1$0){ - var _r_ = l1$0[2], h1$0 = l1$0[1]; - if(_r_){ - var match$0 = _r_[2], h2$0 = _r_[1]; + var b = l1$0[2], h1$0 = l1$0[1]; + if(b){ + var match$0 = b[2], h2$0 = b[1]; if(match$0){ var tl$0 = match$0[2], @@ -570,12 +570,12 @@ stdin = /*<>*/ caml_ml_open_descriptor_in(0), stdout = /*<>*/ caml_ml_open_descriptor_out(1), stderr = /*<>*/ caml_ml_open_descriptor_out(2), - _c_ = /*<>*/ [0, 1, [0, 3, [0, 4, [0, 7, 0]]]], - _d_ = [0, 1, [0, 3, [0, 4, [0, 6, 0]]]], + c = /*<>*/ [0, 1, [0, 3, [0, 4, [0, 7, 0]]]], + d = [0, 1, [0, 3, [0, 4, [0, 6, 0]]]], cst_output = "output", cst_output_substring = "output_substring", - _e_ = [0, 0, [0, 7, 0]], - _f_ = [0, 0, [0, 6, 0]], + e = [0, 0, [0, 7, 0]], + f = [0, 0, [0, 6, 0]], cst_input = "input", cst_really_input = "really_input"; function open_out_gen(mode, perm, name){ @@ -587,10 +587,10 @@ /*<>*/ return c; /*<>*/ } function open_out(name){ - /*<>*/ return open_out_gen(_c_, 438, name) /*<>*/ ; + /*<>*/ return open_out_gen(c, 438, name) /*<>*/ ; } function open_out_bin(name){ - /*<>*/ return open_out_gen(_d_, 438, name) /*<>*/ ; + /*<>*/ return open_out_gen(d, 438, name) /*<>*/ ; } function flush_all(param){ var @@ -602,9 +602,9 @@ /*<>*/ return 0; var l = /*<>*/ param$0[2], a = param$0[1]; /*<>*/ try{ /*<>*/ caml_ml_flush(a);} - catch(_p_){ - var _o_ = /*<>*/ caml_wrap_exception(_p_); - if(_o_[1] !== Sys_error) throw caml_maybe_attach_backtrace(_o_, 0); + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b[1] !== Sys_error) throw caml_maybe_attach_backtrace(b, 0); } /*<>*/ param$0 = l; } @@ -638,12 +638,12 @@ } function close_out_noerr(oc){ /*<>*/ try{ /*<>*/ caml_ml_flush(oc);} - catch(_n_){} + catch(a){} /*<>*/ try{ - var _l_ = /*<>*/ caml_ml_close_channel(oc); - return _l_; + var a = /*<>*/ caml_ml_close_channel(oc); + return a; } - catch(_m_){ /*<>*/ return 0;} + catch(a){ /*<>*/ return 0;} /*<>*/ } function open_in_gen(mode, perm, name){ var @@ -654,10 +654,10 @@ /*<>*/ return c; /*<>*/ } function open_in(name){ - /*<>*/ return open_in_gen(_e_, 0, name) /*<>*/ ; + /*<>*/ return open_in_gen(e, 0, name) /*<>*/ ; } function open_in_bin(name){ - /*<>*/ return open_in_gen(_f_, 0, name) /*<>*/ ; + /*<>*/ return open_in_gen(f, 0, name) /*<>*/ ; } function input(ic, s, ofs, len){ /*<>*/ if @@ -715,7 +715,7 @@ /*<>*/ throw caml_maybe_attach_backtrace (End_of_file, 1); var - _k_ = + a = /*<>*/ build_result ( /*<>*/ caml_create_bytes(len), len, accu); } @@ -736,23 +736,23 @@ /*<>*/ if(accu) var len$0 = /*<>*/ (len + n | 0) - 1 | 0, - _k_ = + a = /*<>*/ build_result ( /*<>*/ caml_create_bytes(len$0), len$0, [0, res, accu]); else - var _k_ = /*<>*/ res; + var a = /*<>*/ res; } - /*<>*/ return caml_string_of_bytes(_k_); + /*<>*/ return caml_string_of_bytes(a); } } function close_in_noerr(ic){ /*<>*/ try{ - var _i_ = /*<>*/ caml_ml_close_channel(ic); - return _i_; + var a = /*<>*/ caml_ml_close_channel(ic); + return a; } - catch(_j_){ /*<>*/ return 0;} + catch(a){ /*<>*/ return 0;} /*<>*/ } function print_char(c){ /*<>*/ return caml_ml_output_char(stdout, c) /*<>*/ ; @@ -828,12 +828,12 @@ var str = /*<>*/ param[2]; /*<>*/ return str; /*<>*/ } - function symbol$0(_h_, param){ + function symbol$0(a, param){ var str2 = /*<>*/ param[2], fmt2 = param[1], - str1 = _h_[2], - fmt1 = _h_[1], + str1 = a[2], + fmt1 = a[1], s2 = /*<>*/ "%," + str2; /*<>*/ return [0, caml_call2(CamlinternalFormatBasics[3], fmt1, fmt2), @@ -858,8 +858,8 @@ success = /*<>*/ caml_atomic_cas (exit_function, old_exit, new_exit), - _g_ = /*<>*/ 1 - success; - if(! _g_) return _g_; + a = /*<>*/ 1 - success; + if(! a) return a; } /*<>*/ } var @@ -1137,13 +1137,13 @@ max_string_length = (4 * max_array_length | 0) - 1 | 0; function getenv_opt(s){ /*<>*/ try{ - var _d_ = /*<>*/ [0, runtime.caml_sys_getenv(s)]; - return _d_; + var b = /*<>*/ [0, runtime.caml_sys_getenv(s)]; + return b; } - catch(_e_){ - var _c_ = /*<>*/ caml_wrap_exception(_e_); - if(_c_ === Stdlib[8]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_c_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[8]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } var interactive = /*<>*/ [0, 0]; @@ -1156,7 +1156,7 @@ function catch_break(on){ /*<>*/ return on ? 0 : 0 /*<>*/ ; } - function Make(_b_, _a_){ /*<>*/ return [0, 1];} + function Make(b, a){ /*<>*/ return [0, 1];} var Immediate64 = /*<>*/ [0, Make], Stdlib_Sys = @@ -1285,9 +1285,9 @@ cst_Obj_Ephemeron_blit_key = "Obj.Ephemeron.blit_key"; function create(l){ var - _f_ = /*<>*/ 0 <= l ? 1 : 0, - _g_ = _f_ ? l <= max_ephe_length ? 1 : 0 : _f_; - if(1 - _g_) + a = /*<>*/ 0 <= l ? 1 : 0, + b = a ? l <= max_ephe_length ? 1 : 0 : a; + if(1 - b) /*<>*/ caml_call1(Stdlib[1], cst_Obj_Ephemeron_create); /*<>*/ return runtime.caml_ephe_create(l) /*<>*/ ; } @@ -1296,10 +1296,10 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ var - _c_ = /*<>*/ 0 <= o ? 1 : 0, - _d_ = _c_ ? o < /*<>*/ length(e) ? 1 : 0 : _c_, - _e_ = /*<>*/ 1 - _d_; - return _e_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _e_ /*<>*/ ; + a = /*<>*/ 0 <= o ? 1 : 0, + c = a ? o < /*<>*/ length(e) ? 1 : 0 : a, + b = /*<>*/ 1 - c; + return b ? /*<>*/ caml_call1(Stdlib[1], msg) : b /*<>*/ ; } function get_key(e, o){ /*<>*/ raise_if_invalid_offset @@ -1335,13 +1335,13 @@ ( /*<>*/ length(e1) - l | 0) >= o1 && 0 <= o2 && ( /*<>*/ length(e2) - l | 0) >= o2){ var - _a_ = /*<>*/ 0 !== l ? 1 : 0, - _b_ = - _a_ + a = /*<>*/ 0 !== l ? 1 : 0, + b = + a ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _a_; - /*<>*/ return _b_; + : a; + /*<>*/ return b; } /*<>*/ return caml_call1 (Stdlib[1], cst_Obj_Ephemeron_blit_key) /*<>*/ ; @@ -1407,17 +1407,17 @@ global_data = runtime.caml_get_global_data(), Stdlib_Obj = global_data.Stdlib__Obj, cst_Id = "Id", - _a_ = [0, 0]; + a = [0, 0]; function make(param){ var Id = /*<>*/ [248, cst_Id, runtime.caml_fresh_oo_id(0)]; return [0, Id]; /*<>*/ } function uid(A){ - var _b_ = /*<>*/ caml_call1(Stdlib_Obj[22][1], A[1]); - /*<>*/ return caml_call1(Stdlib_Obj[22][3], _b_); + var a = /*<>*/ caml_call1(Stdlib_Obj[22][1], A[1]); + /*<>*/ return caml_call1(Stdlib_Obj[22][3], a); } function provably_equal(A, B){ - /*<>*/ return A[1] === B[1] ? _a_ : 0 /*<>*/ ; + /*<>*/ return A[1] === B[1] ? a : 0 /*<>*/ ; } var Id = /*<>*/ [0, make, uid, provably_equal], Stdlib_Type = [0, Id]; runtime.caml_register_global(3, Stdlib_Type, "Stdlib__Type"); @@ -1447,7 +1447,7 @@ var Stdlib_Atomic = /*<>*/ [0, - function(_a_){return [0, _a_];}, + function(a){return [0, a];}, runtime.caml_atomic_make_contended, runtime.caml_atomic_load, set, @@ -1575,47 +1575,47 @@ /*<>*/ return runtime.caml_lazy_make_forward(v) /*<>*/ ; } function is_val(l){ - var _i_ = /*<>*/ Stdlib_Obj[8]; - return caml_obj_tag(l) !== _i_ ? 1 : 0 /*<>*/ ; + var a = /*<>*/ Stdlib_Obj[8]; + return caml_obj_tag(l) !== a ? 1 : 0 /*<>*/ ; /*<>*/ } function map(f, x){ /*<>*/ return [246, - function(_f_){ - var _g_ = /*<>*/ caml_obj_tag(x); + function(c){ + var a = /*<>*/ caml_obj_tag(x); a: - if(250 === _g_) - var _h_ = x[1]; + if(250 === a) + var b = x[1]; else{ - if(246 !== _g_ && 244 !== _g_){var _h_ = x; break a;} - var _h_ = caml_call1(CamlinternalLazy[2], x); + if(246 !== a && 244 !== a){var b = x; break a;} + var b = caml_call1(CamlinternalLazy[2], x); } - return caml_call1(f, _h_); + return caml_call1(f, b); }] /*<>*/ ; /*<>*/ } function map_val(f, x){ /*<>*/ if(! is_val(x)) /*<>*/ return [246, - function(_c_){ - var _d_ = /*<>*/ caml_obj_tag(x); + function(c){ + var a = /*<>*/ caml_obj_tag(x); a: - if(250 === _d_) - var _e_ = x[1]; + if(250 === a) + var b = x[1]; else{ - if(246 !== _d_ && 244 !== _d_){var _e_ = x; break a;} - var _e_ = caml_call1(CamlinternalLazy[2], x); + if(246 !== a && 244 !== a){var b = x; break a;} + var b = caml_call1(CamlinternalLazy[2], x); } - return caml_call1(f, _e_); + return caml_call1(f, b); }] /*<>*/ ; - var _a_ = /*<>*/ caml_obj_tag(x); + var a = /*<>*/ caml_obj_tag(x); a: - if(250 === _a_) - var _b_ = x[1]; + if(250 === a) + var b = x[1]; else{ - if(246 !== _a_ && 244 !== _a_){var _b_ = x; break a;} - var _b_ = caml_call1(CamlinternalLazy[2], x); + if(246 !== a && 244 !== a){var b = x; break a;} + var b = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return /*<>*/ from_val - ( /*<>*/ caml_call1(f, _b_)) /*<>*/ ; + ( /*<>*/ caml_call1(f, b)) /*<>*/ ; } var Stdlib_Lazy = @@ -1668,7 +1668,7 @@ function empty(param){ /*<>*/ return 0; /*<>*/ } - function return$0(x, param){ + function return$(x, param){ /*<>*/ return [0, x, empty]; /*<>*/ } function cons(x, next, param){ @@ -1681,9 +1681,7 @@ var next = /*<>*/ match[2], x = match[1]; /*<>*/ return [0, x, - function(_au_){ - /*<>*/ return append(next, seq2, _au_); - }] /*<>*/ ; + function(a){ /*<>*/ return append(next, seq2, a);}] /*<>*/ ; /*<>*/ } function map(f, seq, param){ var match = /*<>*/ caml_call1(seq, 0); @@ -1691,7 +1689,7 @@ var next = /*<>*/ match[2], x = match[1]; /*<>*/ return [0, caml_call1(f, x), - function(_at_){ /*<>*/ return map(f, next, _at_);}] /*<>*/ ; + function(a){ /*<>*/ return map(f, next, a);}] /*<>*/ ; /*<>*/ } function filter_map(f, seq, param){ var seq$0 = /*<>*/ seq; @@ -1706,8 +1704,8 @@ var y = match$0[1]; /*<>*/ return [0, y, - function(_as_){ - /*<>*/ return filter_map(f, next, _as_); + function(a){ + /*<>*/ return filter_map(f, next, a); }] /*<>*/ ; } /*<>*/ seq$0 = next; @@ -1722,9 +1720,7 @@ /*<>*/ if(caml_call1(f, x)) /*<>*/ return [0, x, - function(_ar_){ - /*<>*/ return filter(f, next, _ar_); - }] /*<>*/ ; + function(a){ /*<>*/ return filter(f, next, a);}] /*<>*/ ; /*<>*/ seq$0 = next; } /*<>*/ } @@ -1733,9 +1729,7 @@ /*<>*/ if(! match) /*<>*/ return 0; var next = /*<>*/ match[2], x = match[1]; /*<>*/ return append - (x, - function(_aq_){ /*<>*/ return concat(next, _aq_);}, - 0) /*<>*/ ; + (x, function(a){ /*<>*/ return concat(next, a);}, 0) /*<>*/ ; } function flat_map(f, seq, param){ var match = /*<>*/ caml_call1(seq, 0); @@ -1743,9 +1737,7 @@ var next = /*<>*/ match[2], x = match[1]; /*<>*/ return /*<>*/ append ( /*<>*/ caml_call1(f, x), - function(_ap_){ - /*<>*/ return flat_map(f, next, _ap_); - }, + function(a){ /*<>*/ return flat_map(f, next, a);}, 0) /*<>*/ ; } function fold_left(f, acc, seq){ @@ -1780,7 +1772,7 @@ x = match$0[1]; /*<>*/ return [0, x, - function(_ao_){ /*<>*/ return unfold(f, u$0, _ao_);}] /*<>*/ ; + function(a){ /*<>*/ return unfold(f, u$0, a);}] /*<>*/ ; /*<>*/ } function is_empty(xs){ /*<>*/ return caml_call1(xs, 0) ? 0 : 1 /*<>*/ ; @@ -1838,8 +1830,8 @@ var xs$1 = /*<>*/ match[2], x = match[1], - _an_ = /*<>*/ caml_call1(p, x); - /*<>*/ if(! _an_) return _an_; + a = /*<>*/ caml_call1(p, x); + /*<>*/ if(! a) return a; xs$0 = xs$1; } /*<>*/ } @@ -1851,8 +1843,8 @@ var xs$1 = /*<>*/ match[2], x = match[1], - _am_ = /*<>*/ caml_call1(p, x); - /*<>*/ if(_am_) return _am_; + a = /*<>*/ caml_call1(p, x); + /*<>*/ if(a) return a; xs$0 = xs$1; } /*<>*/ } @@ -1957,8 +1949,8 @@ var ys$1 = /*<>*/ match$0[2], y = match$0[1], - _al_ = /*<>*/ caml_call2(f, x, y); - /*<>*/ if(! _al_) return _al_; + a = /*<>*/ caml_call2(f, x, y); + /*<>*/ if(! a) return a; xs$0 = xs$1; ys$0 = ys$1; } @@ -1976,8 +1968,8 @@ var ys$1 = /*<>*/ match$0[2], y = match$0[1], - _ak_ = /*<>*/ caml_call2(f, x, y); - /*<>*/ if(_ak_) return _ak_; + a = /*<>*/ caml_call2(f, x, y); + /*<>*/ if(a) return a; xs$0 = xs$1; ys$0 = ys$1; } @@ -1995,8 +1987,8 @@ y = match$0[1], xs$1 = match[2], x = match[1], - _aj_ = /*<>*/ caml_call2(eq, x, y); - /*<>*/ if(! _aj_) return _aj_; + a = /*<>*/ caml_call2(eq, x, y); + /*<>*/ if(! a) return a; xs$0 = xs$1; ys$0 = ys$1; continue; @@ -2027,60 +2019,52 @@ /*<>*/ } function init_aux(f, i, j, param){ /*<>*/ if(i >= j) /*<>*/ return 0; - var _ah_ = /*<>*/ i + 1 | 0; + var a = /*<>*/ i + 1 | 0; /*<>*/ return [0, caml_call1(f, i), - function(_ai_){ - /*<>*/ return init_aux(f, _ah_, j, _ai_); - }] /*<>*/ ; + function(b){ /*<>*/ return init_aux(f, a, j, b);}] /*<>*/ ; /*<>*/ } function init(n, f){ /*<>*/ if(0 > n) /*<>*/ return caml_call1(Stdlib[1], cst_Seq_init) /*<>*/ ; - var _af_ = /*<>*/ 0; - return function(_ag_){ - /*<>*/ return init_aux(f, _af_, n, _ag_);} /*<>*/ ; + var a = /*<>*/ 0; + return function(b){ + /*<>*/ return init_aux(f, a, n, b);} /*<>*/ ; /*<>*/ } function repeat(x, param){ /*<>*/ return [0, x, - function(_ae_){ /*<>*/ return repeat(x, _ae_);}] /*<>*/ ; + function(a){ /*<>*/ return repeat(x, a);}] /*<>*/ ; /*<>*/ } function forever(f, param){ /*<>*/ return [0, caml_call1(f, 0), - function(_ad_){ /*<>*/ return forever(f, _ad_);}] /*<>*/ ; + function(a){ /*<>*/ return forever(f, a);}] /*<>*/ ; /*<>*/ } function cycle_nonempty(xs, param){ /*<>*/ return append (xs, - function(_ac_){ - /*<>*/ return cycle_nonempty(xs, _ac_); - }, + function(a){ /*<>*/ return cycle_nonempty(xs, a);}, 0) /*<>*/ ; } function cycle(xs, param){ var match = /*<>*/ caml_call1(xs, 0); /*<>*/ if(! match) /*<>*/ return 0; var xs$0 = /*<>*/ match[2], x = match[1]; - function _$_(_ab_){ - /*<>*/ return cycle_nonempty(xs, _ab_); - } + function a(a){ /*<>*/ return cycle_nonempty(xs, a);} /*<>*/ return [0, x, - function(_aa_){ - /*<>*/ return append(xs$0, _$_, _aa_); - }] /*<>*/ ; + function(b){ /*<>*/ return append(xs$0, a, b);}] /*<>*/ ; /*<>*/ } function iterate1(f, x, param){ var y = /*<>*/ caml_call1(f, x); /*<>*/ return [0, y, - function(___){ /*<>*/ return iterate1(f, y, ___);}] /*<>*/ ; + function(a){ /*<>*/ return iterate1(f, y, a);}] /*<>*/ ; /*<>*/ } function iterate(f, x){ - function next(_Z_){ /*<>*/ return iterate1(f, x, _Z_);} - /*<>*/ return function(_Y_){ + function next(a){ /*<>*/ return iterate1(f, x, a);} + /*<>*/ return function(a){ /*<>*/ return [0, x, next];} /*<>*/ ; } function mapi_aux(f, i, xs, param){ @@ -2089,17 +2073,17 @@ var xs$0 = /*<>*/ match[2], x = match[1], - _W_ = /*<>*/ i + 1 | 0; + a = /*<>*/ i + 1 | 0; /*<>*/ return [0, caml_call2(f, i, x), - function(_X_){ - /*<>*/ return mapi_aux(f, _W_, xs$0, _X_); + function(b){ + /*<>*/ return mapi_aux(f, a, xs$0, b); }] /*<>*/ ; /*<>*/ } function mapi(f, xs){ - var _U_ = /*<>*/ 0; - return function(_V_){ - /*<>*/ return mapi_aux(f, _U_, xs, _V_);} /*<>*/ ; + var a = /*<>*/ 0; + return function(b){ + /*<>*/ return mapi_aux(f, a, xs, b);} /*<>*/ ; /*<>*/ } function tail_scan(f, s, xs, param){ var match = /*<>*/ caml_call1(xs, 0); @@ -2110,13 +2094,13 @@ s$0 = /*<>*/ caml_call2(f, s, x); /*<>*/ return [0, s$0, - function(_T_){ - /*<>*/ return tail_scan(f, s$0, xs$0, _T_); + function(a){ + /*<>*/ return tail_scan(f, s$0, xs$0, a); }] /*<>*/ ; /*<>*/ } function scan(f, s, xs){ - function next(_S_){ /*<>*/ return tail_scan(f, s, xs, _S_);} - /*<>*/ return function(_R_){ + function next(a){ /*<>*/ return tail_scan(f, s, xs, a);} + /*<>*/ return function(a){ /*<>*/ return [0, s, next];} /*<>*/ ; } function take_aux(n, xs){ @@ -2166,8 +2150,8 @@ /*<>*/ return caml_call1(p, x) ? [0, x, - function(_Q_){ - /*<>*/ return take_while(p, xs$0, _Q_); + function(a){ + /*<>*/ return take_while(p, xs$0, a); }] : 0 /*<>*/ ; } @@ -2188,23 +2172,19 @@ var xs$0 = /*<>*/ match[2], x = match[1], - _J_ = /*<>*/ caml_call1(eq, x); - function _K_(_P_){ - /*<>*/ return drop_while(_J_, xs$0, _P_); - } - var _L_ = /*<>*/ caml_call1(eq, x); - function next(_O_){ - /*<>*/ return take_while(_L_, xs$0, _O_); - } + a = /*<>*/ caml_call1(eq, x); + function b(b){ /*<>*/ return drop_while(a, xs$0, b);} + var c = /*<>*/ caml_call1(eq, x); + function next(a){ /*<>*/ return take_while(c, xs$0, a);} /*<>*/ return [0, - function(_N_){ /*<>*/ return [0, x, next];}, - function(_M_){ /*<>*/ return group(eq, _K_, _M_);}] /*<>*/ ; + function(a){ /*<>*/ return [0, x, next];}, + function(a){ /*<>*/ return group(eq, b, a);}] /*<>*/ ; /*<>*/ } var Forced_twice = /*<>*/ [248, "Stdlib.Seq.Forced_twice", runtime.caml_fresh_oo_id(0)], to_lazy = Stdlib_Lazy[6], - _a_ = [0, "seq.ml", 616, 4]; + b = [0, "seq.ml", 616, 4]; function failure(param){ /*<>*/ throw caml_maybe_attach_backtrace(Forced_twice, 1); /*<>*/ } @@ -2217,9 +2197,9 @@ /*<>*/ } var s = /*<>*/ caml_call1(to_lazy, s$0); /*<>*/ return function(param){ - var _I_ = /*<>*/ runtime.caml_obj_tag(s); - if(250 === _I_) return s[1]; - if(246 !== _I_ && 244 !== _I_) return s; + var a = /*<>*/ runtime.caml_obj_tag(s); + if(250 === a) return s[1]; + if(246 !== a && 244 !== a) return s; return caml_call1(CamlinternalLazy[2], s) /*<>*/ ;} /*<>*/ ; /*<>*/ } function once(xs){ @@ -2246,7 +2226,7 @@ var ys$0 = /*<>*/ match$0[2], y = match$0[1]; /*<>*/ return [0, [0, x, y], - function(_H_){ /*<>*/ return zip(xs$0, ys$0, _H_);}] /*<>*/ ; + function(a){ /*<>*/ return zip(xs$0, ys$0, a);}] /*<>*/ ; /*<>*/ } function map2(f, xs, ys, param){ var match = /*<>*/ caml_call1(xs, 0); @@ -2259,9 +2239,7 @@ var ys$0 = /*<>*/ match$0[2], y = match$0[1]; /*<>*/ return [0, caml_call2(f, x, y), - function(_G_){ - /*<>*/ return map2(f, xs$0, ys$0, _G_); - }] /*<>*/ ; + function(a){ /*<>*/ return map2(f, xs$0, ys$0, a);}] /*<>*/ ; /*<>*/ } function interleave(xs, ys, param){ var match = /*<>*/ caml_call1(xs, 0); @@ -2270,15 +2248,15 @@ var xs$0 = /*<>*/ match[2], x = match[1]; /*<>*/ return [0, x, - function(_F_){ - /*<>*/ return interleave(ys, xs$0, _F_); + function(a){ + /*<>*/ return interleave(ys, xs$0, a); }] /*<>*/ ; /*<>*/ } function sorted_merge1(cmp, x, xs, y, ys){ /*<>*/ return 0 < caml_call2(cmp, x, y) ? [0, y, - function(_D_){ + function(a){ var match = /*<>*/ caml_call1(ys, 0); /*<>*/ if(! match) /*<>*/ return [0, x, xs]; @@ -2287,7 +2265,7 @@ }] : [0, x, - function(_E_){ + function(a){ var match = /*<>*/ caml_call1(xs, 0); /*<>*/ if(! match) /*<>*/ return [0, y, ys]; @@ -2318,7 +2296,7 @@ var xys$0 = /*<>*/ match[2], x = match[1][1]; /*<>*/ return [0, x, - function(_C_){ /*<>*/ return map_fst(xys$0, _C_);}] /*<>*/ ; + function(a){ /*<>*/ return map_fst(xys$0, a);}] /*<>*/ ; /*<>*/ } function map_snd(xys, param){ var match = /*<>*/ caml_call1(xys, 0); @@ -2326,12 +2304,12 @@ var xys$0 = /*<>*/ match[2], y = match[1][2]; /*<>*/ return [0, y, - function(_B_){ /*<>*/ return map_snd(xys$0, _B_);}] /*<>*/ ; + function(a){ /*<>*/ return map_snd(xys$0, a);}] /*<>*/ ; /*<>*/ } function unzip(xys){ /*<>*/ return [0, - function(_A_){ /*<>*/ return map_fst(xys, _A_);}, - function(_z_){ /*<>*/ return map_snd(xys, _z_);}] /*<>*/ ; + function(a){ /*<>*/ return map_fst(xys, a);}, + function(a){ /*<>*/ return map_snd(xys, a);}] /*<>*/ ; /*<>*/ } function filter_map_find_left_map(f, xs, param){ var xs$0 = /*<>*/ xs; @@ -2346,9 +2324,9 @@ var y = match$0[1]; /*<>*/ return [0, y, - function(_y_){ + function(a){ /*<>*/ return filter_map_find_left_map - (f, xs$1, _y_); + (f, xs$1, a); }] /*<>*/ ; } /*<>*/ xs$0 = xs$1; @@ -2367,9 +2345,9 @@ var z = match$0[1]; /*<>*/ return [0, z, - function(_x_){ + function(a){ /*<>*/ return filter_map_find_right_map - (f, xs$1, _x_); + (f, xs$1, a); }] /*<>*/ ; } /*<>*/ xs$0 = xs$1; @@ -2377,26 +2355,25 @@ /*<>*/ } function partition_map(f, xs){ /*<>*/ return [0, - function(_w_){ - /*<>*/ return filter_map_find_left_map(f, xs, _w_); + function(a){ + /*<>*/ return filter_map_find_left_map(f, xs, a); }, - function(_v_){ - /*<>*/ return filter_map_find_right_map - (f, xs, _v_); + function(a){ + /*<>*/ return filter_map_find_right_map(f, xs, a); }] /*<>*/ ; /*<>*/ } function partition(p, xs){ - function _s_(x){ + function a(x){ /*<>*/ return 1 - caml_call1(p, x) /*<>*/ ; } /*<>*/ return [0, - function(_u_){ /*<>*/ return filter(p, xs, _u_);}, - function(_t_){ /*<>*/ return filter(_s_, xs, _t_);}] /*<>*/ ; + function(a){ /*<>*/ return filter(p, xs, a);}, + function(b){ /*<>*/ return filter(a, xs, b);}] /*<>*/ ; /*<>*/ } function peel(xss){ /*<>*/ return unzip - (function(_r_){ - /*<>*/ return filter_map(uncons, xss, _r_); + (function(a){ + /*<>*/ return filter_map(uncons, xss, a); }) /*<>*/ ; } function transpose(xss, param){ @@ -2407,14 +2384,12 @@ /*<>*/ if(! is_empty(heads)) /*<>*/ return [0, heads, - function(_q_){ - /*<>*/ return transpose(tails, _q_); - }] /*<>*/ ; + function(a){ /*<>*/ return transpose(tails, a);}] /*<>*/ ; /*<>*/ if(is_empty(tails)) /*<>*/ return 0; /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); + ([0, Assert_failure, b], 1); /*<>*/ } - function _b_(remainders, xss, param){ + function a(remainders, xss, param){ var match = /*<>*/ caml_call1(xss, 0); /*<>*/ if(! match) /*<>*/ return transpose(remainders, 0) /*<>*/ ; @@ -2429,15 +2404,13 @@ match$1 = /*<>*/ peel(remainders), tails = /*<>*/ match$1[2], heads = match$1[1], - _l_ = - /*<>*/ function(_p_){ + b = + /*<>*/ function(a){ /*<>*/ return [0, xs$0, tails]; }; /*<>*/ return [0, - function(_o_){ /*<>*/ return [0, x, heads];}, - function(_n_){ - /*<>*/ return _b_(_l_, xss$0, _n_); - }] /*<>*/ ; + function(a){ /*<>*/ return [0, x, heads];}, + function(c){ /*<>*/ return a(b, xss$0, c);}] /*<>*/ ; } var match$2 = /*<>*/ peel(remainders), @@ -2445,21 +2418,19 @@ heads$0 = match$2[1]; /*<>*/ return [0, heads$0, - function(_m_){ - /*<>*/ return _b_(tails$0, xss$0, _m_); - }] /*<>*/ ; + function(b){ /*<>*/ return a(tails$0, xss$0, b);}] /*<>*/ ; /*<>*/ } function map_product(f, xs, ys){ - function _f_(x){ - function _j_(y){ + function c(x){ + function a(y){ /*<>*/ return caml_call2(f, x, y) /*<>*/ ; } - /*<>*/ return function(_k_){ - /*<>*/ return map(_j_, ys, _k_);} /*<>*/ ; + /*<>*/ return function(b){ + /*<>*/ return map(a, ys, b);} /*<>*/ ; /*<>*/ } - function xss(_i_){ /*<>*/ return map(_f_, xs, _i_);} - function _e_(_h_){ /*<>*/ return _b_(empty, xss, _h_);} - /*<>*/ return function(_g_){return concat(_e_, _g_);}; + function xss(a){ /*<>*/ return map(c, xs, a);} + function b(b){ /*<>*/ return a(empty, xss, b);} + /*<>*/ return function(a){return concat(b, a);}; } function product(xs, ys){ /*<>*/ return map_product @@ -2488,10 +2459,10 @@ /*<>*/ return [0, x]; /*<>*/ } /*<>*/ ; /*<>*/ } function ints(i, param){ - var _c_ = /*<>*/ i + 1 | 0; + var a = /*<>*/ i + 1 | 0; /*<>*/ return [0, i, - function(_d_){ /*<>*/ return ints(_c_, _d_);}] /*<>*/ ; + function(b){ /*<>*/ return ints(a, b);}] /*<>*/ ; /*<>*/ } var Stdlib_Seq = @@ -2516,7 +2487,7 @@ equal, compare, empty, - return$0, + return$, cons, init, unfold, @@ -2584,9 +2555,8 @@ function some(v){ /*<>*/ return [0, v]; /*<>*/ } - function value(o, default$0){ - /*<>*/ if(! o) - /*<>*/ return default$0; + function value(o, default$){ + /*<>*/ if(! o) /*<>*/ return default$; var v = /*<>*/ o[1]; /*<>*/ return v; /*<>*/ } @@ -2714,9 +2684,9 @@ function error(e){ /*<>*/ return [1, e]; /*<>*/ } - function value(r, default$0){ + function value(r, default$){ /*<>*/ if(0 !== r[0]) - /*<>*/ return default$0; + /*<>*/ return default$; var v = /*<>*/ r[1]; /*<>*/ return v; /*<>*/ } @@ -2857,7 +2827,7 @@ (function(globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, caml_hash = runtime.caml_hash; - function equal(_d_, _c_){return _d_ === _c_ ? 1 : 0;} + function equal(b, a){return b === a ? 1 : 0;} var compare = runtime.caml_int_compare, cst_true = "true", @@ -2877,10 +2847,10 @@ var Stdlib_Bool = /*<>*/ [0, - function(_b_){return 1 - _b_;}, + function(a){return 1 - a;}, equal, compare, - function(_a_){return _a_;}, + function(a){return a;}, to_float, to_string, seeded_hash, @@ -3038,23 +3008,23 @@ } function is_valid(i){ var - _m_ = /*<>*/ 0 <= i ? 1 : 0, - _n_ = _m_ ? i <= 55295 ? 1 : 0 : _m_; - if(_n_) - var _o_ = _n_; + a = /*<>*/ 0 <= i ? 1 : 0, + b = a ? i <= 55295 ? 1 : 0 : a; + if(b) + var c = b; else - var _p_ = 57344 <= i ? 1 : 0, _o_ = _p_ ? i <= 1114111 ? 1 : 0 : _p_; - return _o_; + var d = 57344 <= i ? 1 : 0, c = d ? i <= 1114111 ? 1 : 0 : d; + return c; /*<>*/ } function of_int(i){ /*<>*/ if(is_valid(i)) /*<>*/ return i; var - _l_ = + a = /*<>*/ /*<>*/ caml_call2 (Stdlib[28], /*<>*/ caml_format_int("%X", i), cst_is_not_a_Unicode_scalar_va); - /*<>*/ return caml_call1(Stdlib[1], _l_); + /*<>*/ return caml_call1(Stdlib[1], a); } function is_char(u){ /*<>*/ return u < 256 ? 1 : 0; @@ -3065,22 +3035,22 @@ function to_char(u){ /*<>*/ if(255 >= u) /*<>*/ return u; var - _j_ = + a = /*<>*/ caml_call2 (Stdlib[28], caml_format_int("%04X", u), cst_is_not_a_latin1_character), - _k_ = /*<>*/ caml_call2(Stdlib[28], cst_U, _j_); - /*<>*/ return caml_call1(Stdlib[1], _k_) /*<>*/ ; + b = /*<>*/ caml_call2(Stdlib[28], cst_U, a); + /*<>*/ return caml_call1(Stdlib[1], b) /*<>*/ ; } - function unsafe_to_char(_i_){ /*<>*/ return _i_;} - function equal(_h_, _g_){return _h_ === _g_ ? 1 : 0;} + function unsafe_to_char(a){ /*<>*/ return a;} + function equal(b, a){return b === a ? 1 : 0;} var compare = runtime.caml_int_compare, - _a_ = [0, cst_uchar_ml, 89, 7], - _b_ = [0, cst_uchar_ml, 84, 18], - _c_ = [0, cst_uchar_ml, 95, 7], - _d_ = [0, cst_uchar_ml, 92, 18]; + a = [0, cst_uchar_ml, 89, 7], + b = [0, cst_uchar_ml, 84, 18], + c = [0, cst_uchar_ml, 95, 7], + d = [0, cst_uchar_ml, 92, 18]; function seeded_hash(seed, x){ /*<>*/ return caml_hash(10, 100, seed, x) /*<>*/ ; } @@ -3105,23 +3075,23 @@ function utf_8_byte_length(u){ /*<>*/ if(0 > u) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); + ([0, Assert_failure, b], 1); /*<>*/ if(127 >= u) /*<>*/ return 1; /*<>*/ if(2047 >= u) /*<>*/ return 2; /*<>*/ if(65535 >= u) /*<>*/ return 3; /*<>*/ if(1114111 < u) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); + ([0, Assert_failure, a], 1); /*<>*/ return 4; /*<>*/ } function utf_16_byte_length(u){ /*<>*/ if(0 > u) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); + ([0, Assert_failure, d], 1); /*<>*/ if(65535 >= u) /*<>*/ return 2; /*<>*/ if(1114111 < u) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); + ([0, Assert_failure, c], 1); /*<>*/ return 4; /*<>*/ } var @@ -3135,8 +3105,8 @@ pred, is_valid, of_int, - function(_f_){return _f_;}, - function(_e_){return _e_;}, + function(a){return a;}, + function(a){return a;}, is_char, of_char, to_char, @@ -3258,7 +3228,7 @@ cst_List_exists2 = "List.exists2", cst_List_take = "List.take", cst_List_drop = "List.drop", - _a_ = [0, 0, 0], + a = [0, 0, 0], cst_List_combine = "List.combine"; function rev_append(l1, l2){ var l1$0 = /*<>*/ l1, l2$0 = l2; @@ -3315,8 +3285,8 @@ var r = /*<>*/ param[2], l = param[1], - _I_ = /*<>*/ flatten(r); - /*<>*/ return caml_call2(Stdlib[37], l, _I_); + a = /*<>*/ flatten(r); + /*<>*/ return caml_call2(Stdlib[37], l, a); } function map(f, param){ /*<>*/ if(! param) /*<>*/ return 0; @@ -3454,8 +3424,8 @@ } function map2(f, l1, l2){ /*<>*/ if(l1){ - var _G_ = l1[2], a1 = l1[1]; - if(_G_){ + var a = l1[2], a1 = l1[1]; + if(a){ if(l2){ var match = l2[2]; if(match){ @@ -3463,8 +3433,8 @@ l2$0 = match[2], b2 = match[1], b1 = l2[1], - l1$0 = _G_[2], - a2 = _G_[1], + l1$0 = a[2], + a2 = a[1], r1 = /*<>*/ caml_call2(f, a1, b1), r2 = /*<>*/ caml_call2(f, a2, b2), block = /*<>*/ [0, r2, 24029], @@ -3476,8 +3446,8 @@ a: { /*<>*/ if(l1$1){ - var _H_ = l1$1[2], a1$0 = l1$1[1]; - if(_H_){ + var b = l1$1[2], a1$0 = l1$1[1]; + if(b){ if(l2$1){ var match$0 = l2$1[2]; if(match$0){ @@ -3485,8 +3455,8 @@ l2$2 = match$0[2], b2$0 = match$0[1], b1$1 = l2$1[1], - l1$2 = _H_[2], - a2$0 = _H_[1], + l1$2 = b[2], + a2$0 = b[1], r1$1 = /*<>*/ caml_call2(f, a1$0, b1$1), r2$0 = /*<>*/ caml_call2(f, a2$0, b2$0), dst$0 = /*<>*/ [0, r2$0, 24029]; @@ -3608,8 +3578,8 @@ var l = /*<>*/ param$0[2], a = param$0[1], - _F_ = /*<>*/ caml_call1(p, a); - /*<>*/ if(! _F_) return _F_; + b = /*<>*/ caml_call1(p, a); + /*<>*/ if(! b) return b; param$0 = l; } /*<>*/ } @@ -3620,8 +3590,8 @@ var l = /*<>*/ param$0[2], a = param$0[1], - _E_ = /*<>*/ caml_call1(p, a); - /*<>*/ if(_E_) return _E_; + b = /*<>*/ caml_call1(p, a); + /*<>*/ if(b) return b; param$0 = l; } /*<>*/ } @@ -3635,8 +3605,8 @@ a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1], - _D_ = /*<>*/ caml_call2(p, a1, a2); - /*<>*/ if(! _D_) return _D_; + a = /*<>*/ caml_call2(p, a1, a2); + /*<>*/ if(! a) return a; l1$0 = l1$1; l2$0 = l2$1; continue; @@ -3656,8 +3626,8 @@ a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1], - _C_ = /*<>*/ caml_call2(p, a1, a2); - /*<>*/ if(_C_) return _C_; + a = /*<>*/ caml_call2(p, a1, a2); + /*<>*/ if(a) return a; l1$0 = l1$1; l2$0 = l2$1; continue; @@ -3674,8 +3644,8 @@ var l = /*<>*/ param$0[2], a = param$0[1], - _B_ = /*<>*/ 0 === caml_compare(a, x) ? 1 : 0; - /*<>*/ if(_B_) return _B_; + b = /*<>*/ 0 === caml_compare(a, x) ? 1 : 0; + /*<>*/ if(b) return b; param$0 = l; } /*<>*/ } @@ -3686,8 +3656,8 @@ var l = /*<>*/ param$0[2], a = param$0[1], - _A_ = /*<>*/ a === x ? 1 : 0; - if(_A_) return _A_; + b = /*<>*/ a === x ? 1 : 0; + if(b) return b; param$0 = l; } /*<>*/ } @@ -3755,8 +3725,8 @@ var l = /*<>*/ param$0[2], a = param$0[1][1], - _z_ = /*<>*/ 0 === caml_compare(a, x) ? 1 : 0; - /*<>*/ if(_z_) return _z_; + b = /*<>*/ 0 === caml_compare(a, x) ? 1 : 0; + /*<>*/ if(b) return b; param$0 = l; } /*<>*/ } @@ -3767,8 +3737,8 @@ var l = /*<>*/ param$0[2], a = param$0[1][1], - _y_ = /*<>*/ a === x ? 1 : 0; - if(_y_) return _y_; + b = /*<>*/ a === x ? 1 : 0; + if(b) return b; param$0 = l; } /*<>*/ } @@ -4116,8 +4086,8 @@ var yes = /*<>*/ 0, no = 0, param = l; for(;;){ /*<>*/ if(! param){ - var _x_ = /*<>*/ rev(no); - /*<>*/ return [0, rev(yes), _x_] /*<>*/ ; + var a = /*<>*/ rev(no); + /*<>*/ return [0, rev(yes), a] /*<>*/ ; } var l$0 = /*<>*/ param[2], x = param[1]; /*<>*/ if(caml_call1(p, x)){ @@ -4136,8 +4106,8 @@ var left = /*<>*/ 0, right = 0, param = l; for(;;){ /*<>*/ if(! param){ - var _w_ = /*<>*/ rev(right); - /*<>*/ return [0, rev(left), _w_] /*<>*/ ; + var a = /*<>*/ rev(right); + /*<>*/ return [0, rev(left), a] /*<>*/ ; } var l$0 = /*<>*/ param[2], @@ -4158,7 +4128,7 @@ } /*<>*/ } function split(param){ - /*<>*/ if(! param) /*<>*/ return _a_; + /*<>*/ if(! param) /*<>*/ return a; var l = /*<>*/ param[2], match = param[1], @@ -4206,14 +4176,14 @@ } } else if(3 === n && l){ - var _v_ = /*<>*/ l[2]; - if(_v_){ - var match$2 = _v_[2]; + var a = /*<>*/ l[2]; + if(a){ + var match$2 = a[2]; if(match$2){ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _v_[1], + x2$0 = a[1], x1$0 = l[1], s$0 = /*<>*/ 0 < caml_call2(cmp, x1$0, x2$0) @@ -4262,11 +4232,11 @@ accu = accu$1; continue; } - var _u_ = /*<>*/ rev_append(l1, accu); + var b = /*<>*/ rev_append(l1, accu); } else - var _u_ = /*<>*/ rev_append(l2, accu); - /*<>*/ return [0, _u_, tl$0]; + var b = /*<>*/ rev_append(l2, accu); + /*<>*/ return [0, b, tl$0]; } /*<>*/ } function rev_sort(n, l){ @@ -4287,14 +4257,14 @@ } } else if(3 === n && l){ - var _t_ = /*<>*/ l[2]; - if(_t_){ - var match$2 = _t_[2]; + var a = /*<>*/ l[2]; + if(a){ + var match$2 = a[2]; if(match$2){ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _t_[1], + x2$0 = a[1], x1$0 = l[1], s$0 = /*<>*/ 0 < caml_call2(cmp, x1$0, x2$0) @@ -4343,11 +4313,11 @@ accu = accu$1; continue; } - var _s_ = /*<>*/ rev_append(l1, accu); + var b = /*<>*/ rev_append(l1, accu); } else - var _s_ = /*<>*/ rev_append(l2, accu); - /*<>*/ return [0, _s_, tl$0]; + var b = /*<>*/ rev_append(l2, accu); + /*<>*/ return [0, b, tl$0]; } /*<>*/ } var len = /*<>*/ length(l); @@ -4375,61 +4345,61 @@ } } else if(3 === n && l){ - var _m_ = /*<>*/ l[2]; - if(_m_){ - var match$2 = _m_[2]; + var a = /*<>*/ l[2]; + if(a){ + var match$2 = a[2]; if(match$2){ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _m_[1], + x2$0 = a[1], x1$0 = l[1], c$1 = /*<>*/ caml_call2(cmp, x1$0, x2$0); /*<>*/ if(0 === c$1) var c$2 = /*<>*/ caml_call2(cmp, x2$0, x3), - _n_ = + f = /*<>*/ 0 === c$2 ? [0, x2$0, 0] : 0 <= c$2 ? [0, x3, [0, x2$0, 0]] : [0, x2$0, [0, x3, 0]], - s$0 = _n_; + s$0 = f; else if(0 <= c$1){ var c$3 = /*<>*/ caml_call2(cmp, x1$0, x3); /*<>*/ if(0 === c$3) - var _o_ = /*<>*/ [0, x2$0, [0, x1$0, 0]]; + var b = /*<>*/ [0, x2$0, [0, x1$0, 0]]; else if(0 <= c$3) var c$4 = /*<>*/ caml_call2(cmp, x2$0, x3), - _p_ = + g = /*<>*/ 0 === c$4 ? [0, x2$0, [0, x1$0, 0]] : 0 <= c$4 ? [0, x3, [0, x2$0, [0, x1$0, 0]]] : [0, x2$0, [0, x3, [0, x1$0, 0]]], - _o_ = _p_; + b = g; else - var _o_ = /*<>*/ [0, x2$0, [0, x1$0, [0, x3, 0]]]; - var s$0 = /*<>*/ _o_; + var b = /*<>*/ [0, x2$0, [0, x1$0, [0, x3, 0]]]; + var s$0 = /*<>*/ b; } else{ var c$5 = /*<>*/ caml_call2(cmp, x2$0, x3); /*<>*/ if(0 === c$5) - var _q_ = /*<>*/ [0, x1$0, [0, x2$0, 0]]; + var d = /*<>*/ [0, x1$0, [0, x2$0, 0]]; else if(0 <= c$5) var c$6 = /*<>*/ caml_call2(cmp, x1$0, x3), - _r_ = + h = /*<>*/ 0 === c$6 ? [0, x1$0, [0, x2$0, 0]] : 0 <= c$6 ? [0, x3, [0, x1$0, [0, x2$0, 0]]] : [0, x1$0, [0, x3, [0, x2$0, 0]]], - _q_ = _r_; + d = h; else - var _q_ = /*<>*/ [0, x1$0, [0, x2$0, [0, x3, 0]]]; - var s$0 = /*<>*/ _q_; + var d = /*<>*/ [0, x1$0, [0, x2$0, [0, x3, 0]]]; + var s$0 = /*<>*/ d; } /*<>*/ return [0, s$0, tl$1]; } @@ -4474,11 +4444,11 @@ accu = accu$2; continue; } - var _l_ = /*<>*/ rev_append(l1, accu); + var e = /*<>*/ rev_append(l1, accu); } else - var _l_ = /*<>*/ rev_append(l2, accu); - /*<>*/ return [0, _l_, tl$0]; + var e = /*<>*/ rev_append(l2, accu); + /*<>*/ return [0, e, tl$0]; } /*<>*/ } function rev_sort(n, l){ @@ -4500,61 +4470,61 @@ } } else if(3 === n && l){ - var _f_ = /*<>*/ l[2]; - if(_f_){ - var match$2 = _f_[2]; + var a = /*<>*/ l[2]; + if(a){ + var match$2 = a[2]; if(match$2){ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _f_[1], + x2$0 = a[1], x1$0 = l[1], c$1 = /*<>*/ caml_call2(cmp, x1$0, x2$0); /*<>*/ if(0 === c$1) var c$2 = /*<>*/ caml_call2(cmp, x2$0, x3), - _g_ = + f = /*<>*/ 0 === c$2 ? [0, x2$0, 0] : 0 < c$2 ? [0, x2$0, [0, x3, 0]] : [0, x3, [0, x2$0, 0]], - s$0 = _g_; + s$0 = f; else if(0 < c$1){ var c$3 = /*<>*/ caml_call2(cmp, x2$0, x3); /*<>*/ if(0 === c$3) - var _h_ = /*<>*/ [0, x1$0, [0, x2$0, 0]]; + var b = /*<>*/ [0, x1$0, [0, x2$0, 0]]; else if(0 < c$3) - var _h_ = /*<>*/ [0, x1$0, [0, x2$0, [0, x3, 0]]]; + var b = /*<>*/ [0, x1$0, [0, x2$0, [0, x3, 0]]]; else var c$4 = /*<>*/ caml_call2(cmp, x1$0, x3), - _i_ = + g = /*<>*/ 0 === c$4 ? [0, x1$0, [0, x2$0, 0]] : 0 < c$4 ? [0, x1$0, [0, x3, [0, x2$0, 0]]] : [0, x3, [0, x1$0, [0, x2$0, 0]]], - _h_ = _i_; - var s$0 = /*<>*/ _h_; + b = g; + var s$0 = /*<>*/ b; } else{ var c$5 = /*<>*/ caml_call2(cmp, x1$0, x3); /*<>*/ if(0 === c$5) - var _j_ = /*<>*/ [0, x2$0, [0, x1$0, 0]]; + var d = /*<>*/ [0, x2$0, [0, x1$0, 0]]; else if(0 < c$5) - var _j_ = /*<>*/ [0, x2$0, [0, x1$0, [0, x3, 0]]]; + var d = /*<>*/ [0, x2$0, [0, x1$0, [0, x3, 0]]]; else var c$6 = /*<>*/ caml_call2(cmp, x2$0, x3), - _k_ = + h = /*<>*/ 0 === c$6 ? [0, x2$0, [0, x1$0, 0]] : 0 < c$6 ? [0, x2$0, [0, x3, [0, x1$0, 0]]] : [0, x3, [0, x2$0, [0, x1$0, 0]]], - _j_ = _k_; - var s$0 = /*<>*/ _j_; + d = h; + var s$0 = /*<>*/ d; } /*<>*/ return [0, s$0, tl$1]; } @@ -4599,11 +4569,11 @@ accu = accu$2; continue; } - var _e_ = /*<>*/ rev_append(l1, accu); + var e = /*<>*/ rev_append(l1, accu); } else - var _e_ = /*<>*/ rev_append(l2, accu); - /*<>*/ return [0, _e_, tl$0]; + var e = /*<>*/ rev_append(l2, accu); + /*<>*/ return [0, e, tl$0]; } /*<>*/ } var len = /*<>*/ length(l); @@ -4646,8 +4616,8 @@ a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1], - _d_ = /*<>*/ caml_call2(eq, a1, a2); - /*<>*/ if(! _d_) return _d_; + a = /*<>*/ caml_call2(eq, a1, a2); + /*<>*/ if(! a) return a; l1$0 = l1$1; l2$0 = l2$1; continue; @@ -4678,9 +4648,9 @@ var tail = /*<>*/ l[2], x = l[1]; /*<>*/ return [0, x, - function(_c_){ /*<>*/ return aux(tail, _c_);}] /*<>*/ ; + function(a){ /*<>*/ return aux(tail, a);}] /*<>*/ ; /*<>*/ } - /*<>*/ return function(_b_){return aux(l, _b_);}; + /*<>*/ return function(a){return aux(l, a);}; /*<>*/ } function of_seq(seq){ var match = /*<>*/ caml_call1(seq, 0); @@ -4810,7 +4780,7 @@ function lognot(x){ /*<>*/ return x ^ -1; /*<>*/ } - function equal(_b_, _a_){ /*<>*/ return _b_ === _a_ ? 1 : 0;} + function equal(b, a){ /*<>*/ return b === a ? 1 : 0;} var compare = runtime.caml_int_compare; function min(x, y){ /*<>*/ return x <= y ? x : y /*<>*/ ; @@ -4905,16 +4875,16 @@ function init(n, f){ var s = /*<>*/ caml_create_bytes(n), - _ap_ = /*<>*/ n - 1 | 0, - _ao_ = 0; - if(_ap_ >= 0){ - var i = _ao_; + a = /*<>*/ n - 1 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ /*<>*/ caml_bytes_unsafe_set (s, i, /*<>*/ caml_call1(f, i)); - var _aq_ = /*<>*/ i + 1 | 0; - if(_ap_ === i) break; - i = _aq_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return s; @@ -4969,11 +4939,11 @@ function symbol(a, b){ var c = /*<>*/ a + b | 0, - _an_ = /*<>*/ b < 0 ? 1 : 0, + d = /*<>*/ b < 0 ? 1 : 0, match = c < 0 ? 1 : 0; a: { - if(a < 0){if(_an_ && ! match) break a;} else if(! _an_ && match) break a; + if(a < 0){if(d && ! match) break a;} else if(! d && match) break a; /*<>*/ return c; } /*<>*/ return caml_call1(Stdlib[1], cst_Bytes_extend) /*<>*/ ; @@ -5030,31 +5000,27 @@ (Stdlib[1], cst_String_blit_Bytes_blit_str) /*<>*/ ; } function iter(f, a){ - var - _al_ = /*<>*/ caml_ml_bytes_length(a) - 1 | 0, - _ak_ = 0; - if(_al_ >= 0){ - var i = _ak_; + var b = /*<>*/ caml_ml_bytes_length(a) - 1 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ caml_call1(f, caml_bytes_unsafe_get(a, i)); - var _am_ = /*<>*/ i + 1 | 0; - if(_al_ === i) break; - i = _am_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; /*<>*/ } function iteri(f, a){ - var - _ai_ = /*<>*/ caml_ml_bytes_length(a) - 1 | 0, - _ah_ = 0; - if(_ai_ >= 0){ - var i = _ah_; + var b = /*<>*/ caml_ml_bytes_length(a) - 1 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(a, i)); - var _aj_ = /*<>*/ i + 1 | 0; - if(_ai_ === i) break; - i = _aj_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; @@ -5084,13 +5050,13 @@ /*<>*/ acc = acc$0; param = tl; } - var _ag_ = /*<>*/ acc; + var a = /*<>*/ acc; break a; } - var _ag_ = /*<>*/ caml_ml_bytes_length(hd) + acc | 0; + var a = /*<>*/ caml_ml_bytes_length(hd) + acc | 0; } var - dst = /*<>*/ caml_create_bytes(_ag_), + dst = /*<>*/ caml_create_bytes(a), pos = /*<>*/ pos$1, param$0 = l; for(;;){ @@ -5130,10 +5096,10 @@ /*<>*/ return r; /*<>*/ } function is_space(param){ - var _af_ = /*<>*/ param - 9 | 0; + var a = /*<>*/ param - 9 | 0; a: { - if(4 < _af_ >>> 0){if(23 !== _af_) break a;} else if(2 === _af_) break a; + if(4 < a >>> 0){if(23 !== a) break a;} else if(2 === a) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -5166,10 +5132,10 @@ function unsafe_escape(s){ var n = /*<>*/ [0, 0], - ___ = /*<>*/ caml_ml_bytes_length(s) - 1 | 0, - _Z_ = 0; - if(___ >= 0){ - var i$0 = _Z_; + d = /*<>*/ caml_ml_bytes_length(s) - 1 | 0, + f = 0; + if(d >= 0){ + var i$0 = f; for(;;){ var match = /*<>*/ caml_bytes_unsafe_get(s, i$0); a: @@ -5179,12 +5145,12 @@ c: { if(32 <= match){ - var _ac_ = match - 34 | 0; - if(58 < _ac_ >>> 0){ - if(93 <= _ac_) break c; + var a = match - 34 | 0; + if(58 < a >>> 0){ + if(93 <= a) break c; } - else if(56 < _ac_ - 1 >>> 0) break b; - var _ad_ = /*<>*/ 1; + else if(56 < a - 1 >>> 0) break b; + var b = /*<>*/ 1; break a; } /*<>*/ if(11 <= match){ @@ -5192,26 +5158,24 @@ } else if(8 <= match) break b; } - var _ad_ = /*<>*/ 4; + var b = /*<>*/ 4; break a; } - var _ad_ = /*<>*/ 2; + var b = /*<>*/ 2; } - /*<>*/ n[1] = n[1] + _ad_ | 0; - var _ae_ = i$0 + 1 | 0; - if(___ === i$0) break; - i$0 = _ae_; + /*<>*/ n[1] = n[1] + b | 0; + var j = i$0 + 1 | 0; + if(d === i$0) break; + i$0 = j; } } /*<>*/ if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; var s$0 = /*<>*/ caml_create_bytes(n[1]); /*<>*/ n[1] = 0; - var - _aa_ = /*<>*/ caml_ml_bytes_length(s) - 1 | 0, - _$_ = 0; - if(_aa_ >= 0){ - var i = _$_; + var e = /*<>*/ caml_ml_bytes_length(s) - 1 | 0, g = 0; + if(e >= 0){ + var i = g; for(;;){ var c = /*<>*/ caml_bytes_unsafe_get(s, i); a: @@ -5272,9 +5236,9 @@ /*<>*/ caml_bytes_unsafe_set(s$0, n[1], c); } /*<>*/ n[1]++; - var _ab_ = i + 1 | 0; - if(_aa_ === i) break; - i = _ab_; + var h = i + 1 | 0; + if(e === i) break; + i = h; } } /*<>*/ return s$0; @@ -5288,19 +5252,19 @@ /*<>*/ if(0 === l) /*<>*/ return s; var r = /*<>*/ caml_create_bytes(l), - _X_ = /*<>*/ l - 1 | 0, - _W_ = 0; - if(_X_ >= 0){ - var i = _W_; + a = /*<>*/ l - 1 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ /*<>*/ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call1 (f, /*<>*/ caml_bytes_unsafe_get(s, i))); - var _Y_ = /*<>*/ i + 1 | 0; - if(_X_ === i) break; - i = _Y_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return r; @@ -5310,19 +5274,19 @@ /*<>*/ if(0 === l) /*<>*/ return s; var r = /*<>*/ caml_create_bytes(l), - _U_ = /*<>*/ l - 1 | 0, - _T_ = 0; - if(_U_ >= 0){ - var i = _T_; + a = /*<>*/ l - 1 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ /*<>*/ caml_bytes_unsafe_set (r, i, /*<>*/ caml_call2 (f, i, /*<>*/ caml_bytes_unsafe_get(s, i))); - var _V_ = /*<>*/ i + 1 | 0; - if(_U_ === i) break; - i = _V_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return r; @@ -5330,17 +5294,17 @@ function fold_left(f, x, a){ var r = /*<>*/ [0, x], - _R_ = /*<>*/ caml_ml_bytes_length(a) - 1 | 0, - _Q_ = 0; - if(_R_ >= 0){ - var i = _Q_; + b = /*<>*/ caml_ml_bytes_length(a) - 1 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ r[1] = /*<>*/ caml_call2 (f, r[1], /*<>*/ caml_bytes_unsafe_get(a, i)); - var _S_ = /*<>*/ i + 1 | 0; - if(_R_ === i) break; - i = _S_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return r[1]; @@ -5348,16 +5312,16 @@ function fold_right(f, a, x){ var r = /*<>*/ [0, x], - _O_ = /*<>*/ caml_ml_bytes_length(a) - 1 | 0; - if(_O_ >= 0){ - var i = _O_; + b = /*<>*/ caml_ml_bytes_length(a) - 1 | 0; + if(b >= 0){ + var i = b; for(;;){ /*<>*/ r[1] = /*<>*/ caml_call2 (f, /*<>*/ caml_bytes_unsafe_get(a, i), r[1]); - var _P_ = /*<>*/ i - 1 | 0; + var c = /*<>*/ i - 1 | 0; if(0 === i) break; - i = _P_; + i = c; } } /*<>*/ return r[1]; @@ -5418,8 +5382,8 @@ var len_s = /*<>*/ caml_ml_bytes_length(s), len_pre = caml_ml_bytes_length(prefix), - _N_ = /*<>*/ len_pre <= len_s ? 1 : 0; - if(! _N_) return _N_; + a = /*<>*/ len_pre <= len_s ? 1 : 0; + if(! a) return a; var i = 0; for(;;){ /*<>*/ if(i === len_pre) @@ -5436,8 +5400,8 @@ len_s = /*<>*/ caml_ml_bytes_length(s), len_suf = caml_ml_bytes_length(suffix), diff = /*<>*/ len_s - len_suf | 0, - _M_ = /*<>*/ 0 <= diff ? 1 : 0; - if(! _M_) return _M_; + a = /*<>*/ 0 <= diff ? 1 : 0; + if(! a) return a; var i = 0; for(;;){ /*<>*/ if(i === len_suf) @@ -5539,13 +5503,13 @@ /*<>*/ if(0 <= i && l >= i) /*<>*/ try{ /*<>*/ index_rec(s, l, i, c); - var _K_ = /*<>*/ 1; - return _K_; + var b = /*<>*/ 1; + return b; } - catch(_L_){ - var _J_ = /*<>*/ caml_wrap_exception(_L_); - if(_J_ === Stdlib[8]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_J_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[8]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ return caml_call1 (Stdlib[1], cst_String_contains_from_Bytes) /*<>*/ ; @@ -5557,13 +5521,13 @@ /*<>*/ if(0 <= i && caml_ml_bytes_length(s) > i) /*<>*/ try{ /*<>*/ rindex_rec(s, i, c); - var _H_ = /*<>*/ 1; - return _H_; + var b = /*<>*/ 1; + return b; } - catch(_I_){ - var _G_ = /*<>*/ caml_wrap_exception(_I_); - if(_G_ === Stdlib[8]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_G_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[8]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ return caml_call1 (Stdlib[1], cst_String_rcontains_from_Byte) /*<>*/ ; @@ -5575,22 +5539,22 @@ var r = /*<>*/ [0, 0], j = /*<>*/ [0, caml_ml_bytes_length(s)], - _C_ = /*<>*/ caml_ml_bytes_length(s) - 1 | 0; - if(_C_ >= 0){ - var i = _C_; + a = /*<>*/ caml_ml_bytes_length(s) - 1 | 0; + if(a >= 0){ + var i = a; for(;;){ /*<>*/ if(caml_bytes_unsafe_get(s, i) === sep){ - var _E_ = /*<>*/ r[1]; - r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _E_]; + var c = /*<>*/ r[1]; + r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), c]; /*<>*/ j[1] = i; } - var _F_ = /*<>*/ i - 1 | 0; + var d = /*<>*/ i - 1 | 0; if(0 === i) break; - i = _F_; + i = d; } } - var _D_ = /*<>*/ r[1]; - return [0, sub(s, 0, j[1]), _D_] /*<>*/ ; + var b = /*<>*/ r[1]; + return [0, sub(s, 0, j[1]), b] /*<>*/ ; /*<>*/ } function to_seq(s){ function aux(i, param){ @@ -5598,14 +5562,13 @@ /*<>*/ return 0; var x = /*<>*/ caml_bytes_get(s, i), - _A_ = /*<>*/ i + 1 | 0; + a = /*<>*/ i + 1 | 0; /*<>*/ return [0, x, - function(_B_){ /*<>*/ return aux(_A_, _B_);}] /*<>*/ ; + function(b){ /*<>*/ return aux(a, b);}] /*<>*/ ; /*<>*/ } - var _y_ = /*<>*/ 0; - return function(_z_){ - /*<>*/ return aux(_y_, _z_);} /*<>*/ ; + var a = /*<>*/ 0; + return function(b){ /*<>*/ return aux(a, b);} /*<>*/ ; /*<>*/ } function to_seqi(s){ function aux(i, param){ @@ -5613,14 +5576,13 @@ /*<>*/ return 0; var x = /*<>*/ caml_bytes_get(s, i), - _w_ = /*<>*/ i + 1 | 0; + a = /*<>*/ i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_x_){ /*<>*/ return aux(_w_, _x_);}] /*<>*/ ; + function(b){ /*<>*/ return aux(a, b);}] /*<>*/ ; /*<>*/ } - var _u_ = /*<>*/ 0; - return function(_v_){ - /*<>*/ return aux(_u_, _v_);} /*<>*/ ; + var a = /*<>*/ 0; + return function(b){ /*<>*/ return aux(a, b);} /*<>*/ ; /*<>*/ } function of_seq(i){ var @@ -5664,9 +5626,9 @@ } function get_int8(b, i){ var - _s_ = /*<>*/ Stdlib_Sys[10] - 8 | 0, - _t_ = Stdlib_Sys[10] - 8 | 0; - return caml_bytes_get(b, i) << _t_ >> _s_ /*<>*/ ; + a = /*<>*/ Stdlib_Sys[10] - 8 | 0, + c = Stdlib_Sys[10] - 8 | 0; + return caml_bytes_get(b, i) << c >> a /*<>*/ ; /*<>*/ } function get_uint16_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5682,21 +5644,21 @@ } function get_int16_ne(b, i){ var - _q_ = /*<>*/ Stdlib_Sys[10] - 16 | 0, - _r_ = Stdlib_Sys[10] - 16 | 0; - return caml_bytes_get16(b, i) << _r_ >> _q_ /*<>*/ ; + a = /*<>*/ Stdlib_Sys[10] - 16 | 0, + c = Stdlib_Sys[10] - 16 | 0; + return caml_bytes_get16(b, i) << c >> a /*<>*/ ; /*<>*/ } function get_int16_le(b, i){ var - _o_ = /*<>*/ Stdlib_Sys[10] - 16 | 0, - _p_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_le(b, i) << _p_ >> _o_ /*<>*/ ; + a = /*<>*/ Stdlib_Sys[10] - 16 | 0, + c = Stdlib_Sys[10] - 16 | 0; + return get_uint16_le(b, i) << c >> a /*<>*/ ; /*<>*/ } function get_int16_be(b, i){ var - _m_ = /*<>*/ Stdlib_Sys[10] - 16 | 0, - _n_ = Stdlib_Sys[10] - 16 | 0; - return get_uint16_be(b, i) << _n_ >> _m_ /*<>*/ ; + a = /*<>*/ Stdlib_Sys[10] - 16 | 0, + c = Stdlib_Sys[10] - 16 | 0; + return get_uint16_be(b, i) << c >> a /*<>*/ ; /*<>*/ } function get_int32_le(b, i){ /*<>*/ return Stdlib_Sys[11] @@ -5774,19 +5736,19 @@ set_uint8 = /*<>*/ caml_bytes_set, set_uint16_ne = caml_bytes_set16, dec_invalid = Stdlib_Uchar[23], - _a_ = [0, cst_bytes_ml, 679, 9], - _b_ = [0, cst_bytes_ml, 654, 20], + a = [0, cst_bytes_ml, 679, 9], + b = [0, cst_bytes_ml, 654, 20], cst_index_out_of_bounds = cst_index_out_of_bounds$3, cst_index_out_of_bounds$0 = cst_index_out_of_bounds$3, - _c_ = [0, cst_bytes_ml, 777, 9], - _d_ = [0, cst_bytes_ml, 766, 20], + c = [0, cst_bytes_ml, 777, 9], + d = [0, cst_bytes_ml, 766, 20], cst_index_out_of_bounds$1 = cst_index_out_of_bounds$3, cst_index_out_of_bounds$2 = cst_index_out_of_bounds$3, - _e_ = [0, cst_bytes_ml, 831, 9], - _f_ = [0, cst_bytes_ml, 820, 20]; + e = [0, cst_bytes_ml, 831, 9], + f = [0, cst_bytes_ml, 820, 20]; function dec_ret(n, u){ - var _l_ = /*<>*/ caml_call1(Stdlib_Uchar[9], u); - /*<>*/ return caml_call2(Stdlib_Uchar[22], n, _l_); + var a = /*<>*/ caml_call1(Stdlib_Uchar[9], u); + /*<>*/ return caml_call2(Stdlib_Uchar[22], n, a); } function not_in_x80_to_xBF(b){ /*<>*/ return 2 !== (b >>> 6 | 0) ? 1 : 0; @@ -5799,9 +5761,9 @@ /*<>*/ } function not_in_x90_to_xBF(b){ var - _j_ = /*<>*/ b < 144 ? 1 : 0, - _k_ = _j_ || (191 < b ? 1 : 0); - return _k_; + a = /*<>*/ b < 144 ? 1 : 0, + c = a || (191 < b ? 1 : 0); + return c; /*<>*/ } function not_in_x80_to_x8F(b){ /*<>*/ return 8 !== (b >>> 4 | 0) ? 1 : 0; @@ -5954,18 +5916,16 @@ } /*<>*/ return caml_call1(dec_invalid, 1) /*<>*/ ; } - function set_utf_8_uchar(b, i, u){ - function set(_i_, _h_, _g_){ - /*<>*/ caml_bytes_unsafe_set(_i_, _h_, _g_); - } + function set_utf_8_uchar(b$0, i, u){ + function set(c, b, a){ /*<>*/ caml_bytes_unsafe_set(c, b, a);} var - max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0, + max = /*<>*/ caml_ml_bytes_length(b$0) - 1 | 0, u$0 = /*<>*/ caml_call1(Stdlib_Uchar[10], u); /*<>*/ if(0 > u$0) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); + ([0, Assert_failure, b], 1); /*<>*/ if(127 >= u$0){ - /*<>*/ caml_bytes_set(b, i, u$0); + /*<>*/ caml_bytes_set(b$0, i, u$0); /*<>*/ return 1; } /*<>*/ if(2047 >= u$0){ @@ -5973,8 +5933,8 @@ /*<>*/ return max < last$1 ? 0 : ( /*<>*/ caml_bytes_set - (b, i, 192 | u$0 >>> 6 | 0), - /*<>*/ set(b, last$1, 128 | u$0 & 63), + (b$0, i, 192 | u$0 >>> 6 | 0), + /*<>*/ set(b$0, last$1, 128 | u$0 & 63), 2) /*<>*/ ; } /*<>*/ if(65535 >= u$0){ @@ -5982,25 +5942,25 @@ /*<>*/ return max < last$0 ? 0 : ( /*<>*/ caml_bytes_set - (b, i, 224 | u$0 >>> 12 | 0), + (b$0, i, 224 | u$0 >>> 12 | 0), /*<>*/ set - (b, i + 1 | 0, 128 | (u$0 >>> 6 | 0) & 63), - /*<>*/ set(b, last$0, 128 | u$0 & 63), + (b$0, i + 1 | 0, 128 | (u$0 >>> 6 | 0) & 63), + /*<>*/ set(b$0, last$0, 128 | u$0 & 63), 3) /*<>*/ ; } /*<>*/ if(1114111 < u$0) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); + ([0, Assert_failure, a], 1); var last = /*<>*/ i + 3 | 0; /*<>*/ return max < last ? 0 : ( /*<>*/ caml_bytes_set - (b, i, 240 | u$0 >>> 18 | 0), + (b$0, i, 240 | u$0 >>> 18 | 0), /*<>*/ set - (b, i + 1 | 0, 128 | (u$0 >>> 12 | 0) & 63), + (b$0, i + 1 | 0, 128 | (u$0 >>> 12 | 0) & 63), /*<>*/ set - (b, i + 2 | 0, 128 | (u$0 >>> 6 | 0) & 63), - /*<>*/ set(b, last, 128 | u$0 & 63), + (b$0, i + 2 | 0, 128 | (u$0 >>> 6 | 0) & 63), + /*<>*/ set(b$0, last, 128 | u$0 & 63), 4) /*<>*/ ; } function is_valid_utf_8(b){ @@ -6189,7 +6149,7 @@ var u$0 = /*<>*/ caml_call1(Stdlib_Uchar[10], u); /*<>*/ if(0 > u$0) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); + ([0, Assert_failure, d], 1); /*<>*/ if(65535 >= u$0){ var last$0 = /*<>*/ i + 1 | 0; /*<>*/ return max < last$0 @@ -6198,7 +6158,7 @@ } /*<>*/ if(1114111 < u$0) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); + ([0, Assert_failure, c], 1); var last = /*<>*/ i + 3 | 0; /*<>*/ if(max < last) /*<>*/ return 0; var @@ -6269,7 +6229,7 @@ var u$0 = /*<>*/ caml_call1(Stdlib_Uchar[10], u); /*<>*/ if(0 > u$0) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _f_], 1); + ([0, Assert_failure, f], 1); /*<>*/ if(65535 >= u$0){ var last$0 = /*<>*/ i + 1 | 0; /*<>*/ return max < last$0 @@ -6278,7 +6238,7 @@ } /*<>*/ if(1114111 < u$0) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _e_], 1); + ([0, Assert_failure, e], 1); var last = /*<>*/ i + 3 | 0; /*<>*/ if(max < last) /*<>*/ return 0; var @@ -6459,11 +6419,10 @@ } var of_bytes = /*<>*/ Stdlib_Bytes[6], to_bytes = Stdlib_Bytes[5]; function sub(s, ofs, len){ - var _X_ = /*<>*/ caml_call1(bos, s); + var a = /*<>*/ caml_call1(bos, s); /*<>*/ return /*<>*/ caml_call1 (bts, - /*<>*/ caml_call3 - (Stdlib_Bytes[7], _X_, ofs, len)) /*<>*/ ; + /*<>*/ caml_call3(Stdlib_Bytes[7], a, ofs, len)) /*<>*/ ; } var blit = /*<>*/ Stdlib_Bytes[12], @@ -6493,13 +6452,13 @@ /*<>*/ acc = acc$0; param = tl; } - var _W_ = /*<>*/ acc; + var a = /*<>*/ acc; break a; } - var _W_ = /*<>*/ caml_ml_string_length(hd) + acc | 0; + var a = /*<>*/ caml_ml_string_length(hd) + acc | 0; } var - dst = /*<>*/ runtime.caml_create_bytes(_W_), + dst = /*<>*/ runtime.caml_create_bytes(a), pos = /*<>*/ pos$1, param$0 = l; for(;;){ @@ -6543,68 +6502,62 @@ cst_String_rcontains_from_Byte = "String.rcontains_from / Bytes.rcontains_from"; function iter(f, s){ - var - _U_ = /*<>*/ caml_ml_string_length(s) - 1 | 0, - _T_ = 0; - if(_U_ >= 0){ - var i = _T_; + var a = /*<>*/ caml_ml_string_length(s) - 1 | 0, b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ caml_call1(f, caml_string_unsafe_get(s, i)); - var _V_ = /*<>*/ i + 1 | 0; - if(_U_ === i) break; - i = _V_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return 0; /*<>*/ } function iteri(f, s){ - var - _R_ = /*<>*/ caml_ml_string_length(s) - 1 | 0, - _Q_ = 0; - if(_R_ >= 0){ - var i = _Q_; + var a = /*<>*/ caml_ml_string_length(s) - 1 | 0, b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ caml_call2(f, i, caml_string_unsafe_get(s, i)); - var _S_ = /*<>*/ i + 1 | 0; - if(_R_ === i) break; - i = _S_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return 0; /*<>*/ } function map(f, s){ - var _P_ = /*<>*/ caml_call1(bos, s); + var a = /*<>*/ caml_call1(bos, s); /*<>*/ return /*<>*/ caml_call1 - (bts, - /*<>*/ caml_call2(Stdlib_Bytes[17], f, _P_)) /*<>*/ ; + (bts, /*<>*/ caml_call2(Stdlib_Bytes[17], f, a)) /*<>*/ ; } function mapi(f, s){ - var _O_ = /*<>*/ caml_call1(bos, s); + var a = /*<>*/ caml_call1(bos, s); /*<>*/ return /*<>*/ caml_call1 - (bts, - /*<>*/ caml_call2(Stdlib_Bytes[18], f, _O_)) /*<>*/ ; + (bts, /*<>*/ caml_call2(Stdlib_Bytes[18], f, a)) /*<>*/ ; } function fold_right(f, x, a){ - var _N_ = /*<>*/ caml_call1(bos, x); - /*<>*/ return caml_call3(Stdlib_Bytes[20], f, _N_, a) /*<>*/ ; + var b = /*<>*/ caml_call1(bos, x); + /*<>*/ return caml_call3(Stdlib_Bytes[20], f, b, a) /*<>*/ ; } function fold_left(f, a, x){ - var _M_ = /*<>*/ caml_call1(bos, x); - /*<>*/ return caml_call3(Stdlib_Bytes[19], f, a, _M_); + var b = /*<>*/ caml_call1(bos, x); + /*<>*/ return caml_call3(Stdlib_Bytes[19], f, a, b); } function exists(f, s){ - var _L_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[22], f, _L_); + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[22], f, a); } function for_all(f, s){ - var _K_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[21], f, _K_); + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[21], f, a); } function is_space(param){ - var _J_ = /*<>*/ param - 9 | 0; + var a = /*<>*/ param - 9 | 0; a: { - if(4 < _J_ >>> 0){if(23 !== _J_) break a;} else if(2 === _J_) break a; + if(4 < a >>> 0){if(23 !== a) break a;} else if(2 === a) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -6622,9 +6575,9 @@ ( /*<>*/ caml_string_unsafe_get (s, caml_ml_string_length(s) - 1 | 0))) /*<>*/ return s; - var _I_ = /*<>*/ caml_call1(bos, s); + var a = /*<>*/ caml_call1(bos, s); /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[23], _I_)) /*<>*/ ; + (bts, /*<>*/ caml_call1(Stdlib_Bytes[23], a)) /*<>*/ ; } function escaped(s){ var @@ -6725,13 +6678,13 @@ /*<>*/ if(0 <= i && l >= i) /*<>*/ try{ /*<>*/ index_rec(s, l, i, c); - var _G_ = /*<>*/ 1; - return _G_; + var b = /*<>*/ 1; + return b; } - catch(_H_){ - var _F_ = /*<>*/ caml_wrap_exception(_H_); - if(_F_ === Stdlib[8]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_F_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[8]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ return caml_call1 (Stdlib[1], cst_String_contains_from_Bytes) /*<>*/ ; @@ -6743,43 +6696,43 @@ /*<>*/ if(0 <= i && caml_ml_string_length(s) > i) /*<>*/ try{ /*<>*/ rindex_rec(s, i, c); - var _D_ = /*<>*/ 1; - return _D_; + var b = /*<>*/ 1; + return b; } - catch(_E_){ - var _C_ = /*<>*/ caml_wrap_exception(_E_); - if(_C_ === Stdlib[8]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_C_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[8]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ return caml_call1 (Stdlib[1], cst_String_rcontains_from_Byte) /*<>*/ ; } function uppercase_ascii(s){ - var _B_ = /*<>*/ caml_call1(bos, s); + var a = /*<>*/ caml_call1(bos, s); /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[36], _B_)) /*<>*/ ; + (bts, /*<>*/ caml_call1(Stdlib_Bytes[36], a)) /*<>*/ ; } function lowercase_ascii(s){ - var _A_ = /*<>*/ caml_call1(bos, s); + var a = /*<>*/ caml_call1(bos, s); /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[37], _A_)) /*<>*/ ; + (bts, /*<>*/ caml_call1(Stdlib_Bytes[37], a)) /*<>*/ ; } function capitalize_ascii(s){ - var _z_ = /*<>*/ caml_call1(bos, s); + var a = /*<>*/ caml_call1(bos, s); /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[38], _z_)) /*<>*/ ; + (bts, /*<>*/ caml_call1(Stdlib_Bytes[38], a)) /*<>*/ ; } function uncapitalize_ascii(s){ - var _y_ = /*<>*/ caml_call1(bos, s); + var a = /*<>*/ caml_call1(bos, s); /*<>*/ return /*<>*/ caml_call1 - (bts, /*<>*/ caml_call1(Stdlib_Bytes[39], _y_)) /*<>*/ ; + (bts, /*<>*/ caml_call1(Stdlib_Bytes[39], a)) /*<>*/ ; } function starts_with(prefix, s){ var len_s = /*<>*/ caml_ml_string_length(s), len_pre = caml_ml_string_length(prefix), - _x_ = /*<>*/ len_pre <= len_s ? 1 : 0; - if(! _x_) return _x_; + a = /*<>*/ len_pre <= len_s ? 1 : 0; + if(! a) return a; var i = 0; for(;;){ /*<>*/ if(i === len_pre) @@ -6796,8 +6749,8 @@ len_s = /*<>*/ caml_ml_string_length(s), len_suf = caml_ml_string_length(suffix), diff = /*<>*/ len_s - len_suf | 0, - _w_ = /*<>*/ 0 <= diff ? 1 : 0; - if(! _w_) return _w_; + a = /*<>*/ 0 <= diff ? 1 : 0; + if(! a) return a; var i = 0; for(;;){ /*<>*/ if(i === len_suf) @@ -6817,99 +6770,99 @@ var r = /*<>*/ [0, 0], j = /*<>*/ [0, caml_ml_string_length(s)], - _s_ = /*<>*/ caml_ml_string_length(s) - 1 | 0; - if(_s_ >= 0){ - var i = _s_; + a = /*<>*/ caml_ml_string_length(s) - 1 | 0; + if(a >= 0){ + var i = a; for(;;){ /*<>*/ if(caml_string_unsafe_get(s, i) === sep){ - var _u_ = /*<>*/ r[1]; - r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _u_]; + var c = /*<>*/ r[1]; + r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), c]; /*<>*/ j[1] = i; } - var _v_ = /*<>*/ i - 1 | 0; + var d = /*<>*/ i - 1 | 0; if(0 === i) break; - i = _v_; + i = d; } } - var _t_ = /*<>*/ r[1]; - return [0, sub(s, 0, j[1]), _t_] /*<>*/ ; + var b = /*<>*/ r[1]; + return [0, sub(s, 0, j[1]), b] /*<>*/ ; /*<>*/ } var compare = /*<>*/ runtime.caml_string_compare; function to_seq(s){ - var _r_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[47], _r_) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call1(Stdlib_Bytes[47], a) /*<>*/ ; } function to_seqi(s){ - var _q_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[48], _q_) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call1(Stdlib_Bytes[48], a) /*<>*/ ; } function of_seq(g){ /*<>*/ return /*<>*/ caml_call1 (bts, /*<>*/ caml_call1(Stdlib_Bytes[49], g)) /*<>*/ ; } function get_utf_8_uchar(s, i){ - var _p_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[50], _p_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[50], a, i) /*<>*/ ; } function is_valid_utf_8(s){ - var _o_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[52], _o_); + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call1(Stdlib_Bytes[52], a); } function get_utf_16be_uchar(s, i){ - var _n_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[53], _n_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[53], a, i) /*<>*/ ; } function is_valid_utf_16be(s){ - var _m_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[55], _m_); + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call1(Stdlib_Bytes[55], a); } function get_utf_16le_uchar(s, i){ - var _l_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[56], _l_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[56], a, i) /*<>*/ ; } function is_valid_utf_16le(s){ - var _k_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call1(Stdlib_Bytes[58], _k_); + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call1(Stdlib_Bytes[58], a); } function get_int8(s, i){ - var _j_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[60], _j_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[60], a, i) /*<>*/ ; } function get_uint16_le(s, i){ - var _i_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[63], _i_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[63], a, i) /*<>*/ ; } function get_uint16_be(s, i){ - var _h_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[62], _h_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[62], a, i) /*<>*/ ; } function get_int16_ne(s, i){ - var _g_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[64], _g_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[64], a, i) /*<>*/ ; } function get_int16_le(s, i){ - var _f_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[66], _f_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[66], a, i) /*<>*/ ; } function get_int16_be(s, i){ - var _e_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[65], _e_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[65], a, i) /*<>*/ ; } function get_int32_le(s, i){ - var _d_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[69], _d_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[69], a, i) /*<>*/ ; } function get_int32_be(s, i){ - var _c_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[68], _c_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[68], a, i) /*<>*/ ; } function get_int64_le(s, i){ - var _b_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[72], _b_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[72], a, i) /*<>*/ ; } function get_int64_be(s, i){ - var _a_ = /*<>*/ caml_call1(bos, s); - /*<>*/ return caml_call2(Stdlib_Bytes[71], _a_, i) /*<>*/ ; + var a = /*<>*/ caml_call1(bos, s); + /*<>*/ return caml_call2(Stdlib_Bytes[71], a, i) /*<>*/ ; } var Stdlib_String = @@ -6987,10 +6940,10 @@ (function(globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, cst = "()"; - function equal(_b_, param){ + function equal(a, param){ /*<>*/ return 1; /*<>*/ } - function compare(_a_, param){ + function compare(a, param){ /*<>*/ return 0; /*<>*/ } function to_string(param){ @@ -7138,15 +7091,15 @@ res = /*<>*/ /*<>*/ caml_array_make (l, /*<>*/ caml_call1(f, 0)), - _aL_ = /*<>*/ l - 1 | 0, - _aK_ = 1; - if(_aL_ >= 1){ - var i = _aK_; + a = /*<>*/ l - 1 | 0, + b = 1; + if(a >= 1){ + var i = b; for(;;){ /*<>*/ res[1 + i] = caml_call1(f, i); - var _aM_ = /*<>*/ i + 1 | 0; - if(_aL_ === i) break; - i = _aM_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return res; @@ -7156,14 +7109,14 @@ /*<>*/ caml_call1(Stdlib[1], cst_Array_make_matrix); var res = /*<>*/ caml_array_make(sx, [0]); /*<>*/ if(0 < sy){ - var _aI_ = /*<>*/ sx - 1 | 0, _aH_ = 0; - if(_aI_ >= 0){ - var x = _aH_; + var a = /*<>*/ sx - 1 | 0, b = 0; + if(a >= 0){ + var x = b; for(;;){ /*<>*/ res[1 + x] = caml_array_make(sy, init); - var _aJ_ = /*<>*/ x + 1 | 0; - if(_aI_ === x) break; - x = _aJ_; + var c = /*<>*/ x + 1 | 0; + if(a === x) break; + x = c; } } } @@ -7174,29 +7127,29 @@ /*<>*/ caml_call1(Stdlib[1], cst_Array_init_matrix); var res = /*<>*/ caml_array_make(sx, [0]); /*<>*/ if(0 < sy){ - var _aC_ = /*<>*/ sx - 1 | 0, _aB_ = 0; - if(_aC_ >= 0){ - var x = _aB_; + var a = /*<>*/ sx - 1 | 0, c = 0; + if(a >= 0){ + var x = c; for(;;){ var row = /*<>*/ /*<>*/ caml_array_make (sy, /*<>*/ caml_call2(f, x, 0)), - _aE_ = /*<>*/ sy - 1 | 0, - _aD_ = 1; - if(_aE_ >= 1){ - var y = _aD_; + b = /*<>*/ sy - 1 | 0, + d = 1; + if(b >= 1){ + var y = d; for(;;){ /*<>*/ row[1 + y] = caml_call2(f, x, y); - var _aG_ = /*<>*/ y + 1 | 0; - if(_aE_ === y) break; - y = _aG_; + var g = /*<>*/ y + 1 | 0; + if(b === y) break; + y = g; } } /*<>*/ res[1 + x] = row; - var _aF_ = x + 1 | 0; - if(_aC_ === x) break; - x = _aF_; + var e = x + 1 | 0; + if(a === x) break; + x = e; } } } @@ -7242,14 +7195,14 @@ /*<>*/ return caml_call1(Stdlib[1], cst_Array_blit) /*<>*/ ; } function iter(f, a){ - var _az_ = /*<>*/ a.length - 2 | 0, _ay_ = 0; - if(_az_ >= 0){ - var i = _ay_; + var b = /*<>*/ a.length - 2 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ caml_call1(f, a[1 + i]); - var _aA_ = /*<>*/ i + 1 | 0; - if(_az_ === i) break; - i = _aA_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; @@ -7258,14 +7211,14 @@ /*<>*/ if(a.length - 1 !== b.length - 1) /*<>*/ return caml_call1 (Stdlib[1], cst_Array_iter2_arrays_must_ha) /*<>*/ ; - var _aw_ = /*<>*/ a.length - 2 | 0, _av_ = 0; - if(_aw_ >= 0){ - var i = _av_; + var c = /*<>*/ a.length - 2 | 0, d = 0; + if(c >= 0){ + var i = d; for(;;){ /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - var _ax_ = /*<>*/ i + 1 | 0; - if(_aw_ === i) break; - i = _ax_; + var e = /*<>*/ i + 1 | 0; + if(c === i) break; + i = e; } } /*<>*/ return 0; @@ -7277,41 +7230,41 @@ r = /*<>*/ /*<>*/ caml_array_make (l, /*<>*/ caml_call1(f, a[1])), - _at_ = /*<>*/ l - 1 | 0, - _as_ = 1; - if(_at_ >= 1){ - var i = _as_; + b = /*<>*/ l - 1 | 0, + c = 1; + if(b >= 1){ + var i = c; for(;;){ /*<>*/ r[1 + i] = caml_call1(f, a[1 + i]); - var _au_ = /*<>*/ i + 1 | 0; - if(_at_ === i) break; - i = _au_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return r; /*<>*/ } function map_inplace(f, a){ - var _aq_ = /*<>*/ a.length - 2 | 0, _ap_ = 0; - if(_aq_ >= 0){ - var i = _ap_; + var b = /*<>*/ a.length - 2 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ a[1 + i] = caml_call1(f, a[1 + i]); - var _ar_ = /*<>*/ i + 1 | 0; - if(_aq_ === i) break; - i = _ar_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; /*<>*/ } function mapi_inplace(f, a){ - var _an_ = /*<>*/ a.length - 2 | 0, _am_ = 0; - if(_an_ >= 0){ - var i = _am_; + var b = /*<>*/ a.length - 2 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ a[1 + i] = caml_call2(f, i, a[1 + i]); - var _ao_ = /*<>*/ i + 1 | 0; - if(_an_ === i) break; - i = _ao_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; @@ -7328,28 +7281,28 @@ r = /*<>*/ /*<>*/ caml_array_make (la, /*<>*/ caml_call2(f, a[1], b[1])), - _ak_ = /*<>*/ la - 1 | 0, - _aj_ = 1; - if(_ak_ >= 1){ - var i = _aj_; + c = /*<>*/ la - 1 | 0, + d = 1; + if(c >= 1){ + var i = d; for(;;){ /*<>*/ r[1 + i] = caml_call2(f, a[1 + i], b[1 + i]); - var _al_ = /*<>*/ i + 1 | 0; - if(_ak_ === i) break; - i = _al_; + var e = /*<>*/ i + 1 | 0; + if(c === i) break; + i = e; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ - var _ah_ = /*<>*/ a.length - 2 | 0, _ag_ = 0; - if(_ah_ >= 0){ - var i = _ag_; + var b = /*<>*/ a.length - 2 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ caml_call2(f, i, a[1 + i]); - var _ai_ = /*<>*/ i + 1 | 0; - if(_ah_ === i) break; - i = _ai_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; @@ -7361,15 +7314,15 @@ r = /*<>*/ /*<>*/ caml_array_make (l, /*<>*/ caml_call2(f, 0, a[1])), - _ae_ = /*<>*/ l - 1 | 0, - _ad_ = 1; - if(_ae_ >= 1){ - var i = _ad_; + b = /*<>*/ l - 1 | 0, + c = 1; + if(b >= 1){ + var i = c; for(;;){ /*<>*/ r[1 + i] = caml_call2(f, i, a[1 + i]); - var _af_ = /*<>*/ i + 1 | 0; - if(_ae_ === i) break; - i = _af_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return r; @@ -7416,15 +7369,15 @@ function fold_left(f, x, a){ var r = /*<>*/ [0, x], - _ab_ = /*<>*/ a.length - 2 | 0, - _aa_ = 0; - if(_ab_ >= 0){ - var i = _aa_; + b = /*<>*/ a.length - 2 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ r[1] = caml_call2(f, r[1], a[1 + i]); - var _ac_ = /*<>*/ i + 1 | 0; - if(_ab_ === i) break; - i = _ac_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return r[1]; @@ -7439,10 +7392,10 @@ acc$0 = match[1], output_array = /*<>*/ caml_array_make(len, elt), acc$1 = /*<>*/ [0, acc$0], - ___ = /*<>*/ len - 1 | 0, - _Z_ = 1; - if(___ >= 1){ - var i = _Z_; + a = /*<>*/ len - 1 | 0, + b = 1; + if(a >= 1){ + var i = b; for(;;){ var match$0 = @@ -7451,9 +7404,9 @@ acc$2 = match$0[1]; /*<>*/ acc$1[1] = acc$2; /*<>*/ output_array[1 + i] = elt$0; - var _$_ = /*<>*/ i + 1 | 0; - if(___ === i) break; - i = _$_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return [0, acc$1[1], output_array]; @@ -7461,14 +7414,14 @@ function fold_right(f, a, x){ var r = /*<>*/ [0, x], - _X_ = /*<>*/ a.length - 2 | 0; - if(_X_ >= 0){ - var i = _X_; + b = /*<>*/ a.length - 2 | 0; + if(b >= 0){ + var i = b; for(;;){ /*<>*/ r[1] = caml_call2(f, a[1 + i], r[1]); - var _Y_ = /*<>*/ i - 1 | 0; + var c = /*<>*/ i - 1 | 0; if(0 === i) break; - i = _Y_; + i = c; } } /*<>*/ return r[1]; @@ -7606,10 +7559,10 @@ n = /*<>*/ x.length - 1, a = /*<>*/ caml_array_make(n, a0), b = /*<>*/ caml_array_make(n, b0), - _V_ = /*<>*/ n - 1 | 0, - _U_ = 1; - if(_V_ >= 1){ - var i = _U_; + c = /*<>*/ n - 1 | 0, + d = 1; + if(c >= 1){ + var i = d; for(;;){ var match$0 = /*<>*/ x[1 + i], @@ -7617,9 +7570,9 @@ ai = match$0[1]; /*<>*/ a[1 + i] = ai; /*<>*/ b[1 + i] = bi; - var _W_ = /*<>*/ i + 1 | 0; - if(_V_ === i) break; - i = _W_; + var e = /*<>*/ i + 1 | 0; + if(c === i) break; + i = e; } } /*<>*/ return [0, a, b]; @@ -7633,15 +7586,15 @@ /*<>*/ if(0 === na) /*<>*/ return [0]; var x = /*<>*/ caml_array_make(na, [0, a[1], b[1]]), - _S_ = /*<>*/ na - 1 | 0, - _R_ = 1; - if(_S_ >= 1){ - var i = _R_; + c = /*<>*/ na - 1 | 0, + d = 1; + if(c >= 1){ + var i = d; for(;;){ /*<>*/ x[1 + i] = [0, a[1 + i], b[1 + i]]; - var _T_ = i + 1 | 0; - if(_S_ === i) break; - i = _T_; + var e = i + 1 | 0; + if(c === i) break; + i = e; } } /*<>*/ return x; @@ -7649,51 +7602,49 @@ var Bottom = /*<>*/ [248, "Stdlib.Array.Bottom", runtime.caml_fresh_oo_id(0)], - _a_ = [0, "array.ml", 369, 4], - _b_ = [0, "]", 0], + a = [0, "array.ml", 369, 4], + b = [0, "]", 0], cst_out_of_expected_range_0 = ", out of expected range [0; ", cst_returned = "' returned ", cst_Array_shuffle_rand = "Array.shuffle: 'rand "; - function sort(cmp, a){ + function sort(cmp, a$0){ function maxson(l, i){ var i31 = /*<>*/ ((i + i | 0) + i | 0) + 1 | 0, x = /*<>*/ [0, i31]; /*<>*/ if((i31 + 2 | 0) < l){ var - _K_ = /*<>*/ i31 + 1 | 0, - _L_ = /*<>*/ caml_check_bound(a, _K_)[1 + _K_]; + a = /*<>*/ i31 + 1 | 0, + e = /*<>*/ caml_check_bound(a$0, a)[1 + a]; /*<>*/ if ( /*<>*/ caml_call2 (cmp, - /*<>*/ caml_check_bound(a, i31)[1 + i31], - _L_) + /*<>*/ caml_check_bound(a$0, i31)[1 + i31], + e) < 0) /*<>*/ x[1] = i31 + 1 | 0; var - _M_ = /*<>*/ i31 + 2 | 0, - _N_ = /*<>*/ caml_check_bound(a, _M_)[1 + _M_], - _O_ = /*<>*/ x[1]; + b = /*<>*/ i31 + 2 | 0, + f = /*<>*/ caml_check_bound(a$0, b)[1 + b], + c = /*<>*/ x[1]; /*<>*/ if ( /*<>*/ caml_call2 - (cmp, - /*<>*/ caml_check_bound(a, _O_)[1 + _O_], - _N_) + (cmp, /*<>*/ caml_check_bound(a$0, c)[1 + c], f) < 0) /*<>*/ x[1] = i31 + 2 | 0; /*<>*/ return x[1]; } /*<>*/ if((i31 + 1 | 0) < l){ var - _P_ = i31 + 1 | 0, - _Q_ = /*<>*/ caml_check_bound(a, _P_)[1 + _P_]; + d = i31 + 1 | 0, + g = /*<>*/ caml_check_bound(a$0, d)[1 + d]; /*<>*/ if (0 > /*<>*/ caml_call2 (cmp, - /*<>*/ caml_check_bound(a, i31)[1 + i31], - _Q_)) + /*<>*/ caml_check_bound(a$0, i31)[1 + i31], + g)) /*<>*/ return i31 + 1 | 0; } /*<>*/ if(i31 < l) /*<>*/ return i31; @@ -7701,12 +7652,12 @@ ([0, Bottom, i], 1); /*<>*/ } var - l = /*<>*/ a.length - 1, - _E_ = /*<>*/ ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_E_ >= 0){ - var i$6 = _E_; + l = /*<>*/ a$0.length - 1, + b = /*<>*/ ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(b >= 0){ + var i$6 = b; for(;;){ - var e$1 = /*<>*/ caml_check_bound(a, i$6)[1 + i$6]; + var e$1 = /*<>*/ caml_check_bound(a$0, i$6)[1 + i$6]; /*<>*/ try{ var i = /*<>*/ i$6; for(;;){ @@ -7715,39 +7666,41 @@ (0 >= /*<>*/ caml_call2 - (cmp, /*<>*/ caml_check_bound(a, j)[1 + j], e$1)) + (cmp, + /*<>*/ caml_check_bound(a$0, j)[1 + j], + e$1)) break; - var _B_ = /*<>*/ caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _B_; + var g = /*<>*/ caml_check_bound(a$0, j)[1 + j]; + /*<>*/ caml_check_bound(a$0, i)[1 + i] = g; /*<>*/ i = j; } - /*<>*/ caml_check_bound(a, i)[1 + i] = e$1; + /*<>*/ caml_check_bound(a$0, i)[1 + i] = e$1; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); var i$0 = exn[2]; - /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; + /*<>*/ caml_check_bound(a$0, i$0)[1 + i$0] = e$1; } - var _J_ = /*<>*/ i$6 - 1 | 0; + var n = /*<>*/ i$6 - 1 | 0; if(0 === i$6) break; - i$6 = _J_; + i$6 = n; } } - var _F_ = /*<>*/ l - 1 | 0; - if(_F_ >= 2){ - var i$4 = _F_; + var c = /*<>*/ l - 1 | 0; + if(c >= 2){ + var i$4 = c; for(;;){ - var e$0 = /*<>*/ caml_check_bound(a, i$4)[1 + i$4]; - /*<>*/ a[1 + i$4] = caml_check_bound(a, 0)[1]; + var e$0 = /*<>*/ caml_check_bound(a$0, i$4)[1 + i$4]; + /*<>*/ a$0[1 + i$4] = caml_check_bound(a$0, 0)[1]; var i$5 = /*<>*/ 0; try{ var i$1 = /*<>*/ i$5; for(;;){ var j$0 = /*<>*/ maxson(i$4, i$1), - _C_ = /*<>*/ caml_check_bound(a, j$0)[1 + j$0]; - /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _C_; + h = /*<>*/ caml_check_bound(a$0, j$0)[1 + j$0]; + /*<>*/ caml_check_bound(a$0, i$1)[1 + i$1] = h; /*<>*/ i$1 = j$0; } } @@ -7763,44 +7716,45 @@ for(;;){ var father = /*<>*/ (i$3 - 1 | 0) / 3 | 0; /*<>*/ if(i$3 === father) - throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); + throw caml_maybe_attach_backtrace([0, Assert_failure, a], 1); /*<>*/ if (0 <= /*<>*/ caml_call2 (cmp, - /*<>*/ caml_check_bound(a, father) + /*<>*/ caml_check_bound(a$0, father) [1 + father], e$0)) break; var - _D_ = - /*<>*/ caml_check_bound(a, father)[1 + father]; - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _D_; + k = + /*<>*/ caml_check_bound(a$0, father) + [1 + father]; + /*<>*/ caml_check_bound(a$0, i$3)[1 + i$3] = k; /*<>*/ if(0 >= father) break b; /*<>*/ i$3 = father; } - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; + /*<>*/ caml_check_bound(a$0, i$3)[1 + i$3] = e$0; break a; } - /*<>*/ caml_check_bound(a, 0)[1] = e$0; + /*<>*/ caml_check_bound(a$0, 0)[1] = e$0; } - var _I_ = /*<>*/ i$4 - 1 | 0; + var m = /*<>*/ i$4 - 1 | 0; if(2 === i$4) break; - i$4 = _I_; + i$4 = m; } } } - var _G_ = /*<>*/ 1 < l ? 1 : 0; - if(_G_){ - var e = /*<>*/ caml_check_bound(a, 1)[2]; - /*<>*/ a[2] = caml_check_bound(a, 0)[1]; - /*<>*/ a[1] = e; - var _H_ = /*<>*/ 0; + var d = /*<>*/ 1 < l ? 1 : 0; + if(d){ + var e = /*<>*/ caml_check_bound(a$0, 1)[2]; + /*<>*/ a$0[2] = caml_check_bound(a$0, 0)[1]; + /*<>*/ a$0[1] = e; + var f = /*<>*/ 0; } else - var _H_ = /*<>*/ _G_; - return _H_; + var f = /*<>*/ d; + return f; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -7845,37 +7799,35 @@ } /*<>*/ } function isortto(srcofs, dst, dstofs, len){ - var _t_ = /*<>*/ len - 1 | 0, _s_ = 0; - if(_t_ >= 0){ - var i = _s_; + var b = /*<>*/ len - 1 | 0, k = 0; + if(b >= 0){ + var i = k; for(;;){ var - _u_ = /*<>*/ srcofs + i | 0, - e = /*<>*/ caml_check_bound(a, _u_)[1 + _u_], + c = /*<>*/ srcofs + i | 0, + e = /*<>*/ caml_check_bound(a, c)[1 + c], j = /*<>*/ [0, (dstofs + i | 0) - 1 | 0]; /*<>*/ for(;;){ if(dstofs > j[1]) break; - var _v_ = j[1]; + var d = j[1]; /*<>*/ if (0 >= /*<>*/ caml_call2 - (cmp, - /*<>*/ caml_check_bound(dst, _v_)[1 + _v_], - e)) + (cmp, /*<>*/ caml_check_bound(dst, d)[1 + d], e)) break; var - _w_ = /*<>*/ j[1], - _x_ = /*<>*/ caml_check_bound(dst, _w_)[1 + _w_], - _y_ = /*<>*/ j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _y_)[1 + _y_] = _x_; + f = /*<>*/ j[1], + l = /*<>*/ caml_check_bound(dst, f)[1 + f], + g = /*<>*/ j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, g)[1 + g] = l; /*<>*/ j[1]--; } - var _z_ = /*<>*/ j[1] + 1 | 0; - caml_check_bound(dst, _z_)[1 + _z_] = e; - var _A_ = /*<>*/ i + 1 | 0; - if(_t_ === i) break; - i = _A_; + var h = /*<>*/ j[1] + 1 | 0; + caml_check_bound(dst, h)[1 + h] = e; + var m = /*<>*/ i + 1 | 0; + if(b === i) break; + i = m; } } /*<>*/ return 0; @@ -7905,38 +7857,38 @@ /*<>*/ return merge(l2, l1, t, 0, l2, a, 0) /*<>*/ ; } function shuffle(rand, a){ - var _o_ = /*<>*/ a.length - 2 | 0; - if(_o_ >= 1){ - var i = _o_; + var c = /*<>*/ a.length - 2 | 0; + if(c >= 1){ + var i = c; for(;;){ var j = /*<>*/ caml_call1(rand, i + 1 | 0), - _p_ = /*<>*/ 0 <= j ? 1 : 0, - _q_ = _p_ ? j <= i ? 1 : 0 : _p_; - if(1 - _q_){ + d = /*<>*/ 0 <= j ? 1 : 0, + k = d ? j <= i ? 1 : 0 : d; + if(1 - k){ var - int$0 = /*<>*/ Stdlib[33], - _k_ = + int$ = /*<>*/ Stdlib[33], + e = /*<>*/ [0, cst_out_of_expected_range_0, - [0, caml_call1(int$0, i), _b_]], - _l_ = + [0, caml_call1(int$, i), b]], + f = /*<>*/ [0, cst_returned, - [0, caml_call1(int$0, j), _k_]], - _m_ = + [0, caml_call1(int$, j), e]], + g = /*<>*/ [0, cst_Array_shuffle_rand, - [0, caml_call1(int$0, i + 1 | 0), _l_]], - _n_ = /*<>*/ caml_call2(Stdlib_String[7], cst, _m_); - /*<>*/ caml_call1(Stdlib[1], _n_); + [0, caml_call1(int$, i + 1 | 0), f]], + h = /*<>*/ caml_call2(Stdlib_String[7], cst, g); + /*<>*/ caml_call1(Stdlib[1], h); } var v = /*<>*/ a[1 + i]; /*<>*/ a[1 + i] = a[1 + j]; /*<>*/ a[1 + j] = v; - var _r_ = /*<>*/ i - 1 | 0; + var l = /*<>*/ i - 1 | 0; if(1 === i) break; - i = _r_; + i = l; } } /*<>*/ return 0; @@ -7947,14 +7899,13 @@ /*<>*/ return 0; var x = /*<>*/ a[1 + i], - _i_ = /*<>*/ i + 1 | 0; + b = /*<>*/ i + 1 | 0; /*<>*/ return [0, x, - function(_j_){ /*<>*/ return aux(_i_, _j_);}] /*<>*/ ; + function(a){ /*<>*/ return aux(b, a);}] /*<>*/ ; /*<>*/ } - var _g_ = /*<>*/ 0; - return function(_h_){ - /*<>*/ return aux(_g_, _h_);} /*<>*/ ; + var b = /*<>*/ 0; + return function(a){ /*<>*/ return aux(b, a);} /*<>*/ ; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -7962,14 +7913,13 @@ /*<>*/ return 0; var x = /*<>*/ a[1 + i], - _e_ = /*<>*/ i + 1 | 0; + b = /*<>*/ i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_f_){ /*<>*/ return aux(_e_, _f_);}] /*<>*/ ; + function(a){ /*<>*/ return aux(b, a);}] /*<>*/ ; /*<>*/ } - var _c_ = /*<>*/ 0; - return function(_d_){ - /*<>*/ return aux(_c_, _d_);} /*<>*/ ; + var b = /*<>*/ 0; + return function(a){ /*<>*/ return aux(b, a);} /*<>*/ ; /*<>*/ } function of_seq(i$2){ var @@ -8115,8 +8065,8 @@ to_string = Stdlib[35]; function is_integer(x){ var - _aV_ = /*<>*/ x === runtime.caml_trunc_float(x) ? 1 : 0; - /*<>*/ return _aV_ ? is_finite(x) : _aV_ /*<>*/ ; + a = /*<>*/ x === runtime.caml_trunc_float(x) ? 1 : 0; + /*<>*/ return a ? is_finite(x) : a /*<>*/ ; } function succ(x){ /*<>*/ return caml_nextafter_float(x, infinity) /*<>*/ ; @@ -8213,19 +8163,19 @@ /*<>*/ return caml_hash(10, 100, 0, x) /*<>*/ ; } function check(a, ofs, len, msg){ - var _aR_ = /*<>*/ ofs < 0 ? 1 : 0; - if(_aR_) - var _aS_ = _aR_; + var c = /*<>*/ ofs < 0 ? 1 : 0; + if(c) + var b = c; else{ - var _aT_ = len < 0 ? 1 : 0; - if(_aT_) - var _aS_ = _aT_; + var d = len < 0 ? 1 : 0; + if(d) + var b = d; else var - _aU_ = (ofs + len | 0) < 0 ? 1 : 0, - _aS_ = _aU_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); + e = (ofs + len | 0) < 0 ? 1 : 0, + b = e || (a.length - 1 < (ofs + len | 0) ? 1 : 0); } - return _aS_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _aS_ /*<>*/ ; + return b ? /*<>*/ caml_call1(Stdlib[1], msg) : b /*<>*/ ; } var empty = /*<>*/ caml_floatarray_create(0), @@ -8233,7 +8183,7 @@ cst_Float_Array_make_matrix = "Float.Array.make_matrix", cst_Float_Array_init_matrix = "Float.Array.init_matrix", cst_Float_Array_concat = "Float.Array.concat", - _a_ = [0, cst_float_ml, 250, 14], + a = [0, cst_float_ml, 250, 14], cst_Float_Array_sub = "Float.Array.sub", cst_Float_Array_fill = "Float.Array.fill", cst_Float_array_blit = cst_Float_array_blit$1, @@ -8248,15 +8198,15 @@ (Stdlib[1], cst_Float_Array_init) /*<>*/ ; var res = /*<>*/ caml_floatarray_create(l), - _aP_ = /*<>*/ l - 1 | 0, - _aO_ = 0; - if(_aP_ >= 0){ - var i = _aO_; + a = /*<>*/ l - 1 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ res[1 + i] = caml_call1(f, i); - var _aQ_ = /*<>*/ i + 1 | 0; - if(_aP_ === i) break; - i = _aQ_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return res; @@ -8270,14 +8220,14 @@ /*<>*/ /*<>*/ caml_array_make (sx, /*<>*/ caml_floatarray_create(0)); /*<>*/ if(0 < sy){ - var _aM_ = /*<>*/ sx - 1 | 0, _aL_ = 0; - if(_aM_ >= 0){ - var x = _aL_; + var a = /*<>*/ sx - 1 | 0, b = 0; + if(a >= 0){ + var x = b; for(;;){ /*<>*/ res[1 + x] = caml_floatarray_make(sy, v); - var _aN_ = /*<>*/ x + 1 | 0; - if(_aM_ === x) break; - x = _aN_; + var c = /*<>*/ x + 1 | 0; + if(a === x) break; + x = c; } } } @@ -8292,27 +8242,27 @@ /*<>*/ /*<>*/ caml_array_make (sx, /*<>*/ caml_floatarray_create(0)); /*<>*/ if(0 < sy){ - var _aG_ = /*<>*/ sx - 1 | 0, _aF_ = 0; - if(_aG_ >= 0){ - var x = _aF_; + var a = /*<>*/ sx - 1 | 0, c = 0; + if(a >= 0){ + var x = c; for(;;){ var row = /*<>*/ caml_floatarray_create(sy), - _aI_ = /*<>*/ sy - 1 | 0, - _aH_ = 0; - if(_aI_ >= 0){ - var y = _aH_; + b = /*<>*/ sy - 1 | 0, + d = 0; + if(b >= 0){ + var y = d; for(;;){ /*<>*/ row[1 + y] = caml_call2(f, x, y); - var _aK_ = /*<>*/ y + 1 | 0; - if(_aI_ === y) break; - y = _aK_; + var g = /*<>*/ y + 1 | 0; + if(b === y) break; + y = g; } } /*<>*/ res[1 + x] = row; - var _aJ_ = /*<>*/ x + 1 | 0; - if(_aG_ === x) break; - x = _aJ_; + var e = /*<>*/ x + 1 | 0; + if(a === x) break; + x = e; } } } @@ -8343,7 +8293,7 @@ /*<>*/ if(i === acc) /*<>*/ return result; /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); + ([0, Assert_failure, a], 1); } var tl$0 = /*<>*/ l$0[2], @@ -8389,7 +8339,7 @@ /*<>*/ return caml_call2 (Stdlib_List[11], a.length - 1, - function(_aE_){ /*<>*/ return a[1 + _aE_];}) /*<>*/ ; + function(b){ /*<>*/ return a[1 + b];}) /*<>*/ ; } function of_list(l){ var @@ -8408,14 +8358,14 @@ } /*<>*/ } function iter(f, a){ - var _aC_ = /*<>*/ a.length - 2 | 0, _aB_ = 0; - if(_aC_ >= 0){ - var i = _aB_; + var b = /*<>*/ a.length - 2 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ caml_call1(f, a[1 + i]); - var _aD_ = /*<>*/ i + 1 | 0; - if(_aC_ === i) break; - i = _aD_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; @@ -8424,14 +8374,14 @@ /*<>*/ if(a.length - 1 !== b.length - 1) /*<>*/ return caml_call1 (Stdlib[1], cst_Float_Array_iter2_arrays_m) /*<>*/ ; - var _az_ = /*<>*/ a.length - 2 | 0, _ay_ = 0; - if(_az_ >= 0){ - var i = _ay_; + var c = /*<>*/ a.length - 2 | 0, d = 0; + if(c >= 0){ + var i = d; for(;;){ /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - var _aA_ = /*<>*/ i + 1 | 0; - if(_az_ === i) break; - i = _aA_; + var e = /*<>*/ i + 1 | 0; + if(c === i) break; + i = e; } } /*<>*/ return 0; @@ -8440,28 +8390,28 @@ var l = /*<>*/ a.length - 1, r = /*<>*/ caml_floatarray_create(l), - _aw_ = /*<>*/ l - 1 | 0, - _av_ = 0; - if(_aw_ >= 0){ - var i = _av_; + b = /*<>*/ l - 1 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ r[1 + i] = caml_call1(f, a[1 + i]); - var _ax_ = /*<>*/ i + 1 | 0; - if(_aw_ === i) break; - i = _ax_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return r; /*<>*/ } function map_inplace(f, a){ - var _at_ = /*<>*/ a.length - 2 | 0, _as_ = 0; - if(_at_ >= 0){ - var i = _as_; + var b = /*<>*/ a.length - 2 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ a[1 + i] = caml_call1(f, a[1 + i]); - var _au_ = /*<>*/ i + 1 | 0; - if(_at_ === i) break; - i = _au_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; @@ -8475,28 +8425,28 @@ (Stdlib[1], cst_Float_Array_map2_arrays_mu) /*<>*/ ; var r = /*<>*/ caml_floatarray_create(la), - _aq_ = /*<>*/ la - 1 | 0, - _ap_ = 0; - if(_aq_ >= 0){ - var i = _ap_; + c = /*<>*/ la - 1 | 0, + d = 0; + if(c >= 0){ + var i = d; for(;;){ /*<>*/ r[1 + i] = caml_call2(f, a[1 + i], b[1 + i]); - var _ar_ = /*<>*/ i + 1 | 0; - if(_aq_ === i) break; - i = _ar_; + var e = /*<>*/ i + 1 | 0; + if(c === i) break; + i = e; } } /*<>*/ return r; /*<>*/ } function iteri(f, a){ - var _an_ = /*<>*/ a.length - 2 | 0, _am_ = 0; - if(_an_ >= 0){ - var i = _am_; + var b = /*<>*/ a.length - 2 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ caml_call2(f, i, a[1 + i]); - var _ao_ = /*<>*/ i + 1 | 0; - if(_an_ === i) break; - i = _ao_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; @@ -8505,28 +8455,28 @@ var l = /*<>*/ a.length - 1, r = /*<>*/ caml_floatarray_create(l), - _ak_ = /*<>*/ l - 1 | 0, - _aj_ = 0; - if(_ak_ >= 0){ - var i = _aj_; + b = /*<>*/ l - 1 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ r[1 + i] = caml_call2(f, i, a[1 + i]); - var _al_ = /*<>*/ i + 1 | 0; - if(_ak_ === i) break; - i = _al_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return r; /*<>*/ } function mapi_inplace(f, a){ - var _ah_ = /*<>*/ a.length - 2 | 0, _ag_ = 0; - if(_ah_ >= 0){ - var i = _ag_; + var b = /*<>*/ a.length - 2 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ a[1 + i] = caml_call2(f, i, a[1 + i]); - var _ai_ = /*<>*/ i + 1 | 0; - if(_ah_ === i) break; - i = _ai_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; @@ -8534,15 +8484,15 @@ function fold_left(f, x, a){ var r = /*<>*/ [0, x], - _ae_ = /*<>*/ a.length - 2 | 0, - _ad_ = 0; - if(_ae_ >= 0){ - var i = _ad_; + b = /*<>*/ a.length - 2 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ r[1] = caml_call2(f, r[1], a[1 + i]); - var _af_ = /*<>*/ i + 1 | 0; - if(_ae_ === i) break; - i = _af_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return r[1]; @@ -8550,14 +8500,14 @@ function fold_right(f, a, x){ var r = /*<>*/ [0, x], - _ab_ = /*<>*/ a.length - 2 | 0; - if(_ab_ >= 0){ - var i = _ab_; + b = /*<>*/ a.length - 2 | 0; + if(b >= 0){ + var i = b; for(;;){ /*<>*/ r[1] = caml_call2(f, a[1 + i], r[1]); - var _ac_ = /*<>*/ i - 1 | 0; + var c = /*<>*/ i - 1 | 0; if(0 === i) break; - i = _ac_; + i = c; } } /*<>*/ return r[1]; @@ -8664,7 +8614,7 @@ /*<>*/ [248, "Stdlib.Float.Array.Bottom", runtime.caml_fresh_oo_id(0)], - _b_ = [0, cst_float_ml, 483, 6]; + b = [0, cst_float_ml, 483, 6]; function sort(cmp, a){ function maxson(l, i){ var @@ -8672,39 +8622,33 @@ x = /*<>*/ [0, i31]; /*<>*/ if((i31 + 2 | 0) < l){ var - _W_ = /*<>*/ i31 + 1 | 0, - _X_ = /*<>*/ caml_check_bound(a, _W_)[1 + _W_]; + b = /*<>*/ i31 + 1 | 0, + f = /*<>*/ caml_check_bound(a, b)[1 + b]; /*<>*/ if ( /*<>*/ caml_call2 - (cmp, - /*<>*/ caml_check_bound(a, i31)[1 + i31], - _X_) + (cmp, /*<>*/ caml_check_bound(a, i31)[1 + i31], f) < 0) /*<>*/ x[1] = i31 + 1 | 0; var - _Y_ = /*<>*/ i31 + 2 | 0, - _Z_ = /*<>*/ caml_check_bound(a, _Y_)[1 + _Y_], - ___ = /*<>*/ x[1]; + c = /*<>*/ i31 + 2 | 0, + g = /*<>*/ caml_check_bound(a, c)[1 + c], + d = /*<>*/ x[1]; /*<>*/ if ( /*<>*/ caml_call2 - (cmp, - /*<>*/ caml_check_bound(a, ___)[1 + ___], - _Z_) + (cmp, /*<>*/ caml_check_bound(a, d)[1 + d], g) < 0) /*<>*/ x[1] = i31 + 2 | 0; /*<>*/ return x[1]; } /*<>*/ if((i31 + 1 | 0) < l){ var - _$_ = i31 + 1 | 0, - _aa_ = /*<>*/ caml_check_bound(a, _$_)[1 + _$_]; + e = i31 + 1 | 0, + h = /*<>*/ caml_check_bound(a, e)[1 + e]; /*<>*/ if (0 > /*<>*/ caml_call2 - (cmp, - /*<>*/ caml_check_bound(a, i31)[1 + i31], - _aa_)) + (cmp, /*<>*/ caml_check_bound(a, i31)[1 + i31], h)) /*<>*/ return i31 + 1 | 0; } /*<>*/ if(i31 < l) /*<>*/ return i31; @@ -8713,9 +8657,9 @@ /*<>*/ } var l = /*<>*/ a.length - 1, - _Q_ = /*<>*/ ((l + 1 | 0) / 3 | 0) - 1 | 0; - if(_Q_ >= 0){ - var i$6 = _Q_; + c = /*<>*/ ((l + 1 | 0) / 3 | 0) - 1 | 0; + if(c >= 0){ + var i$6 = c; for(;;){ var e$1 = /*<>*/ caml_check_bound(a, i$6)[1 + i$6]; /*<>*/ try{ @@ -8728,8 +8672,8 @@ /*<>*/ caml_call2 (cmp, /*<>*/ caml_check_bound(a, j)[1 + j], e$1)) break; - var _N_ = /*<>*/ caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _N_; + var h = /*<>*/ caml_check_bound(a, j)[1 + j]; + /*<>*/ caml_check_bound(a, i)[1 + i] = h; /*<>*/ i = j; } /*<>*/ caml_check_bound(a, i)[1 + i] = e$1; @@ -8740,14 +8684,14 @@ var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } - var _V_ = /*<>*/ i$6 - 1 | 0; + var o = /*<>*/ i$6 - 1 | 0; if(0 === i$6) break; - i$6 = _V_; + i$6 = o; } } - var _R_ = /*<>*/ l - 1 | 0; - if(_R_ >= 2){ - var i$4 = _R_; + var d = /*<>*/ l - 1 | 0; + if(d >= 2){ + var i$4 = d; for(;;){ var e$0 = /*<>*/ caml_check_bound(a, i$4)[1 + i$4]; /*<>*/ a[1 + i$4] = caml_check_bound(a, 0)[1]; @@ -8757,8 +8701,8 @@ for(;;){ var j$0 = /*<>*/ maxson(i$4, i$1), - _O_ = /*<>*/ caml_check_bound(a, j$0)[1 + j$0]; - /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _O_; + k = /*<>*/ caml_check_bound(a, j$0)[1 + j$0]; + /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = k; /*<>*/ i$1 = j$0; } } @@ -8774,7 +8718,7 @@ for(;;){ var father = /*<>*/ (i$3 - 1 | 0) / 3 | 0; /*<>*/ if(i$3 === father) - throw caml_maybe_attach_backtrace([0, Assert_failure, _b_], 1); + throw caml_maybe_attach_backtrace([0, Assert_failure, b], 1); /*<>*/ if (0 <= @@ -8785,9 +8729,9 @@ e$0)) break; var - _P_ = + m = /*<>*/ caml_check_bound(a, father)[1 + father]; - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _P_; + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = m; /*<>*/ if(0 >= father) break b; /*<>*/ i$3 = father; } @@ -8796,22 +8740,22 @@ } /*<>*/ caml_check_bound(a, 0)[1] = e$0; } - var _U_ = /*<>*/ i$4 - 1 | 0; + var n = /*<>*/ i$4 - 1 | 0; if(2 === i$4) break; - i$4 = _U_; + i$4 = n; } } } - var _S_ = /*<>*/ 1 < l ? 1 : 0; - if(_S_){ + var f = /*<>*/ 1 < l ? 1 : 0; + if(f){ var e = /*<>*/ caml_check_bound(a, 1)[2]; /*<>*/ a[2] = caml_check_bound(a, 0)[1]; /*<>*/ a[1] = e; - var _T_ = /*<>*/ 0; + var g = /*<>*/ 0; } else - var _T_ = /*<>*/ _S_; - return _T_; + var g = /*<>*/ f; + return g; /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ @@ -8856,37 +8800,35 @@ } /*<>*/ } function isortto(srcofs, dst, dstofs, len){ - var _F_ = /*<>*/ len - 1 | 0, _E_ = 0; - if(_F_ >= 0){ - var i = _E_; + var b = /*<>*/ len - 1 | 0, k = 0; + if(b >= 0){ + var i = k; for(;;){ var - _G_ = /*<>*/ srcofs + i | 0, - e = /*<>*/ caml_check_bound(a, _G_)[1 + _G_], + c = /*<>*/ srcofs + i | 0, + e = /*<>*/ caml_check_bound(a, c)[1 + c], j = /*<>*/ [0, (dstofs + i | 0) - 1 | 0]; /*<>*/ for(;;){ if(dstofs > j[1]) break; - var _H_ = j[1]; + var d = j[1]; /*<>*/ if (0 >= /*<>*/ caml_call2 - (cmp, - /*<>*/ caml_check_bound(dst, _H_)[1 + _H_], - e)) + (cmp, /*<>*/ caml_check_bound(dst, d)[1 + d], e)) break; var - _I_ = /*<>*/ j[1], - _J_ = /*<>*/ caml_check_bound(dst, _I_)[1 + _I_], - _K_ = /*<>*/ j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _K_)[1 + _K_] = _J_; + f = /*<>*/ j[1], + l = /*<>*/ caml_check_bound(dst, f)[1 + f], + g = /*<>*/ j[1] + 1 | 0; + /*<>*/ caml_check_bound(dst, g)[1 + g] = l; /*<>*/ j[1]--; } - var _L_ = /*<>*/ j[1] + 1 | 0; - caml_check_bound(dst, _L_)[1 + _L_] = e; - var _M_ = /*<>*/ i + 1 | 0; - if(_F_ === i) break; - i = _M_; + var h = /*<>*/ j[1] + 1 | 0; + caml_check_bound(dst, h)[1 + h] = e; + var m = /*<>*/ i + 1 | 0; + if(b === i) break; + i = m; } } /*<>*/ return 0; @@ -8914,18 +8856,18 @@ /*<>*/ return merge(l2, l1, t, 0, l2, a, 0) /*<>*/ ; } function shuffle(rand, a){ - var _C_ = /*<>*/ a.length - 2 | 0; - if(_C_ >= 1){ - var i = _C_; + var b = /*<>*/ a.length - 2 | 0; + if(b >= 1){ + var i = b; for(;;){ var j = /*<>*/ caml_call1(rand, i + 1 | 0), v = /*<>*/ a[1 + i]; /*<>*/ a[1 + i] = caml_check_bound(a, j)[1 + j]; /*<>*/ a[1 + j] = v; - var _D_ = /*<>*/ i - 1 | 0; + var c = /*<>*/ i - 1 | 0; if(1 === i) break; - i = _D_; + i = c; } } /*<>*/ return 0; @@ -8936,14 +8878,13 @@ /*<>*/ return 0; var x = /*<>*/ a[1 + i], - _A_ = /*<>*/ i + 1 | 0; + b = /*<>*/ i + 1 | 0; /*<>*/ return [0, x, - function(_B_){ /*<>*/ return aux(_A_, _B_);}] /*<>*/ ; + function(a){ /*<>*/ return aux(b, a);}] /*<>*/ ; /*<>*/ } - var _y_ = /*<>*/ 0; - return function(_z_){ - /*<>*/ return aux(_y_, _z_);} /*<>*/ ; + var b = /*<>*/ 0; + return function(a){ /*<>*/ return aux(b, a);} /*<>*/ ; /*<>*/ } function to_seqi(a){ function aux(i, param){ @@ -8951,14 +8892,13 @@ /*<>*/ return 0; var x = /*<>*/ a[1 + i], - _w_ = /*<>*/ i + 1 | 0; + b = /*<>*/ i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_x_){ /*<>*/ return aux(_w_, _x_);}] /*<>*/ ; + function(a){ /*<>*/ return aux(b, a);}] /*<>*/ ; /*<>*/ } - var _u_ = /*<>*/ 0; - return function(_v_){ - /*<>*/ return aux(_u_, _v_);} /*<>*/ ; + var b = /*<>*/ 0; + return function(a){ /*<>*/ return aux(b, a);} /*<>*/ ; /*<>*/ } function of_seq(i$2){ var @@ -8991,15 +8931,15 @@ r = /*<>*/ /*<>*/ caml_array_make (l, /*<>*/ caml_call1(f, a[1])), - _s_ = /*<>*/ l - 1 | 0, - _r_ = 1; - if(_s_ >= 1){ - var i = _r_; + b = /*<>*/ l - 1 | 0, + c = 1; + if(b >= 1){ + var i = c; for(;;){ /*<>*/ r[1 + i] = caml_call1(f, a[1 + i]); - var _t_ = /*<>*/ i + 1 | 0; - if(_s_ === i) break; - i = _t_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return r; @@ -9008,15 +8948,15 @@ var l = /*<>*/ a.length - 1, r = /*<>*/ caml_floatarray_create(l), - _p_ = /*<>*/ l - 1 | 0, - _o_ = 0; - if(_p_ >= 0){ - var i = _o_; + b = /*<>*/ l - 1 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ r[1 + i] = caml_call1(f, a[1 + i]); - var _q_ = /*<>*/ i + 1 | 0; - if(_p_ === i) break; - i = _q_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return r; @@ -9055,12 +8995,9 @@ seeded_hash, hash, [0, - function(_n_){ /*<>*/ return _n_.length - 1;}, - function(_m_, _l_){return caml_check_bound(_m_, _l_)[1 + _l_];}, - function(_k_, _j_, _i_){ - caml_check_bound(_k_, _j_)[1 + _j_] = _i_; - return 0; - }, + function(a){ /*<>*/ return a.length - 1;}, + function(b, a){return caml_check_bound(b, a)[1 + a];}, + function(c, a, b){caml_check_bound(c, a)[1 + a] = b; return 0;}, caml_floatarray_make, caml_floatarray_create, init, @@ -9102,12 +9039,9 @@ map_to_array, map_from_array], [0, - function(_h_){return _h_.length - 1;}, - function(_g_, _f_){return caml_check_bound(_g_, _f_)[1 + _f_];}, - function(_e_, _d_, _c_){ - caml_check_bound(_e_, _d_)[1 + _d_] = _c_; - return 0; - }, + function(a){return a.length - 1;}, + function(b, a){return caml_check_bound(b, a)[1 + a];}, + function(c, a, b){caml_check_bound(c, a)[1 + a] = b; return 0;}, caml_floatarray_make, caml_floatarray_create, init, @@ -9182,12 +9116,12 @@ } function lognot(n){ /*<>*/ return n ^ -1;} var - _a_ = /*<>*/ Stdlib_Sys[9], - _b_ = [0, "int32.ml", 69, 6], + a = /*<>*/ Stdlib_Sys[9], + b = [0, "int32.ml", 69, 6], minus_one = -1, min_int = -2147483648, max_int = 2147483647; - if(32 === _a_) + if(32 === a) var max_int$0 = /*<>*/ Stdlib[19], unsigned_to_int = @@ -9199,9 +9133,9 @@ /*<>*/ return 0; /*<>*/ }; else{ - /*<>*/ if(64 !== _a_) + /*<>*/ if(64 !== a) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); + ([0, Assert_failure, b], 1); var unsigned_to_int = /*<>*/ function(n){ @@ -9213,13 +9147,13 @@ } function of_string_opt(s){ /*<>*/ try{ - var _d_ = /*<>*/ [0, runtime.caml_int_of_string(s)]; - return _d_; + var b = /*<>*/ [0, runtime.caml_int_of_string(s)]; + return b; } - catch(_e_){ - var _c_ = /*<>*/ caml_wrap_exception(_e_); - if(_c_[1] === Stdlib[7]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_c_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] === Stdlib[7]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } var compare = /*<>*/ caml_int_compare, equal = runtime.caml_equal; @@ -9308,37 +9242,37 @@ caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_wrap_exception = runtime.caml_wrap_exception, global_data = runtime.caml_get_global_data(), - _a_ = caml_int64_create_lo_mi_hi(1, 0, 0), + a = caml_int64_create_lo_mi_hi(1, 0, 0), zero = caml_int64_create_lo_mi_hi(0, 0, 0), one = caml_int64_create_lo_mi_hi(1, 0, 0), minus_one = caml_int64_create_lo_mi_hi(16777215, 16777215, 65535), min_int = caml_int64_create_lo_mi_hi(0, 0, 32768), max_int = caml_int64_create_lo_mi_hi(16777215, 16777215, 32767), Stdlib = global_data.Stdlib, - _b_ = caml_int64_create_lo_mi_hi(1, 0, 0), - _c_ = caml_int64_create_lo_mi_hi(0, 0, 0), - _d_ = caml_int64_create_lo_mi_hi(16777215, 16777215, 65535); + b = caml_int64_create_lo_mi_hi(1, 0, 0), + c = caml_int64_create_lo_mi_hi(0, 0, 0), + d = caml_int64_create_lo_mi_hi(16777215, 16777215, 65535); function succ(n){ - /*<>*/ return caml_int64_add(n, _a_) /*<>*/ ; + /*<>*/ return caml_int64_add(n, a) /*<>*/ ; } function pred(n){ - /*<>*/ return caml_int64_sub(n, _b_) /*<>*/ ; + /*<>*/ return caml_int64_sub(n, b) /*<>*/ ; } function abs(n){ - /*<>*/ return caml_greaterequal(n, _c_) + /*<>*/ return caml_greaterequal(n, c) ? n : /*<>*/ runtime.caml_int64_neg(n) /*<>*/ ; } function lognot(n){ - /*<>*/ return runtime.caml_int64_xor(n, _d_) /*<>*/ ; + /*<>*/ return runtime.caml_int64_xor(n, d) /*<>*/ ; } var max_int$0 = /*<>*/ runtime.caml_int64_of_int32(Stdlib[19]), - _e_ = /*<>*/ caml_int64_create_lo_mi_hi(0, 0, 0); + e = /*<>*/ caml_int64_create_lo_mi_hi(0, 0, 0); function unsigned_to_int(n){ /*<>*/ if - (caml_greaterequal(n, _e_) + (caml_greaterequal(n, e) && /*<>*/ caml_lessequal(n, max_int$0)) /*<>*/ return [0, runtime.caml_int64_to_int32(n)]; /*<>*/ return 0; @@ -9348,13 +9282,13 @@ } function of_string_opt(s){ /*<>*/ try{ - var _g_ = /*<>*/ [0, runtime.caml_int64_of_string(s)]; - return _g_; + var b = /*<>*/ [0, runtime.caml_int64_of_string(s)]; + return b; } - catch(_h_){ - var _f_ = /*<>*/ caml_wrap_exception(_h_); - if(_f_[1] === Stdlib[7]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_f_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] === Stdlib[7]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } function compare(x, y){ @@ -9394,7 +9328,7 @@ (n, /*<>*/ caml_int64_mul(q, d)); /*<>*/ return unsigned_lt(r, d) ? q - : /*<>*/ caml_int64_add(q, _a_) /*<>*/ ; + : /*<>*/ caml_int64_add(q, a) /*<>*/ ; } function unsigned_rem(n, d){ /*<>*/ return /*<>*/ caml_int64_sub @@ -9480,13 +9414,13 @@ } function of_string_opt(s){ /*<>*/ try{ - var _b_ = /*<>*/ [0, runtime.caml_int_of_string(s)]; - return _b_; + var b = /*<>*/ [0, runtime.caml_int_of_string(s)]; + return b; } - catch(_c_){ - var _a_ = /*<>*/ caml_wrap_exception(_c_); - if(_a_[1] === Stdlib[7]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_a_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] === Stdlib[7]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } var compare = /*<>*/ caml_int_compare; @@ -9610,12 +9544,12 @@ var result = /*<>*/ runtime.caml_lex_engine(tbl, state, buf), - _n_ = /*<>*/ 0 <= result ? 1 : 0, - _o_ = _n_ ? buf[12] !== dummy_pos ? 1 : 0 : _n_; - if(_o_){ + b = /*<>*/ 0 <= result ? 1 : 0, + c = b ? buf[12] !== dummy_pos ? 1 : 0 : b; + if(c){ /*<>*/ buf[11] = buf[12]; - var _p_ = /*<>*/ buf[12]; - buf[12] = [0, _p_[1], _p_[2], _p_[3], buf[4] + buf[6] | 0]; + var a = /*<>*/ buf[12]; + buf[12] = [0, a[1], a[2], a[3], buf[4] + buf[6] | 0]; } /*<>*/ return result; /*<>*/ } @@ -9623,20 +9557,20 @@ var result = /*<>*/ runtime.caml_new_lex_engine(tbl, state, buf), - _k_ = /*<>*/ 0 <= result ? 1 : 0, - _l_ = _k_ ? buf[12] !== dummy_pos ? 1 : 0 : _k_; - if(_l_){ + b = /*<>*/ 0 <= result ? 1 : 0, + c = b ? buf[12] !== dummy_pos ? 1 : 0 : b; + if(c){ /*<>*/ buf[11] = buf[12]; - var _m_ = /*<>*/ buf[12]; - buf[12] = [0, _m_[1], _m_[2], _m_[3], buf[4] + buf[6] | 0]; + var a = /*<>*/ buf[12]; + buf[12] = [0, a[1], a[2], a[3], buf[4] + buf[6] | 0]; } /*<>*/ return result; /*<>*/ } function from_function(opt, read_fun){ var with_positions = /*<>*/ opt ? opt[1] : 1, - _f_ = /*<>*/ with_positions ? zero_pos : dummy_pos, - _g_ = with_positions ? zero_pos : dummy_pos, + a = /*<>*/ with_positions ? zero_pos : dummy_pos, + b = with_positions ? zero_pos : dummy_pos, aux_buffer = /*<>*/ caml_create_bytes(512); /*<>*/ return [0, function(lexbuf){ @@ -9691,18 +9625,18 @@ /*<>*/ lexbuf[3] = lexbuf[3] - s | 0; var t = /*<>*/ lexbuf[10], - _i_ = /*<>*/ t.length - 2 | 0, - _h_ = 0; - if(_i_ >= 0){ - var i = _h_; + a = /*<>*/ t.length - 2 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ var v = /*<>*/ caml_check_bound(t, i)[1 + i]; /*<>*/ if(0 <= v) /*<>*/ caml_check_bound(t, i)[1 + i] = v - s | 0; - var _j_ = /*<>*/ i + 1 | 0; - if(_i_ === i) break; - i = _j_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } } @@ -9720,8 +9654,8 @@ 0, 0, [0], - _g_, - _f_] /*<>*/ ; + b, + a] /*<>*/ ; /*<>*/ } function from_channel(with_positions, ic){ /*<>*/ return from_function @@ -9735,8 +9669,8 @@ var with_positions = /*<>*/ opt ? opt[1] : 1, lex_buffer = /*<>*/ caml_call1(Stdlib_Bytes[5], s), - _d_ = /*<>*/ with_positions ? zero_pos : dummy_pos, - _e_ = with_positions ? zero_pos : dummy_pos; + a = /*<>*/ with_positions ? zero_pos : dummy_pos, + b = with_positions ? zero_pos : dummy_pos; return [0, function(lexbuf){ /*<>*/ lexbuf[9] = 1; @@ -9751,8 +9685,8 @@ 0, 1, [0], - _e_, - _d_]; + b, + a]; /*<>*/ } function set_position(lexbuf, position){ /*<>*/ lexbuf[12] = @@ -9761,8 +9695,8 @@ return 0; /*<>*/ } function set_filename(lexbuf, fname){ - var _c_ = /*<>*/ lexbuf[12]; - lexbuf[12] = [0, fname, _c_[2], _c_[3], _c_[4]]; + var a = /*<>*/ lexbuf[12]; + lexbuf[12] = [0, fname, a[2], a[3], a[4]]; return 0; /*<>*/ } function with_positions(lexbuf){ @@ -9811,12 +9745,9 @@ function new_line(lexbuf){ var lcp = /*<>*/ lexbuf[12], - _a_ = /*<>*/ lcp !== dummy_pos ? 1 : 0, - _b_ = - _a_ - ? (lexbuf[12] = [0, lcp[1], lcp[2] + 1 | 0, lcp[4], lcp[4]], 0) - : _a_; - return _b_; + a = /*<>*/ lcp !== dummy_pos ? 1 : 0, + b = a ? (lexbuf[12] = [0, lcp[1], lcp[2] + 1 | 0, lcp[4], lcp[4]], 0) : a; + return b; /*<>*/ } function flush_input(lb){ /*<>*/ lb[6] = 0; @@ -9987,17 +9918,17 @@ case 4: /*<>*/ try{ var - _i_ = env[13], - _j_ = + b = env[13], + c = /*<>*/ caml_call1 - (caml_check_bound(tables[1], _i_)[1 + _i_], env), - _k_ = /*<>*/ 4, - value = _j_, - action = _k_; + (caml_check_bound(tables[1], b)[1 + b], env), + d = /*<>*/ 4, + value = c, + action = d; } - catch(_m_){ - var _h_ = /*<>*/ caml_wrap_exception(_m_); - if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a !== Parse_error) throw caml_maybe_attach_backtrace(a, 0); var value = /*<>*/ 0, action = 5; } /*<>*/ cmd = action; @@ -10032,9 +9963,8 @@ === curr_char ? 1 : 0 /*<>*/ ; - var _l_ = /*<>*/ runtime.caml_obj_tag(tok); - /*<>*/ return caml_check_bound(tables[3], _l_) - [1 + _l_] + var a = /*<>*/ runtime.caml_obj_tag(tok); + /*<>*/ return caml_check_bound(tables[3], a)[1 + a] === curr_char ? 1 : 0 /*<>*/ ; @@ -10043,21 +9973,21 @@ } /*<>*/ } function peek_val(env, n){ - var _g_ = /*<>*/ env[11] - n | 0; - /*<>*/ return caml_check_bound(env[2], _g_)[1 + _g_] /*<>*/ ; + var a = /*<>*/ env[11] - n | 0; + /*<>*/ return caml_check_bound(env[2], a)[1 + a] /*<>*/ ; } function symbol_start_pos(param){ var i$1 = /*<>*/ env[12], i = i$1; for(;;){ /*<>*/ if(0 >= i){ - var _f_ = /*<>*/ env[11]; - return caml_check_bound(env[4], _f_)[1 + _f_] /*<>*/ ; + var c = /*<>*/ env[11]; + return caml_check_bound(env[4], c)[1 + c] /*<>*/ ; } var - _d_ = /*<>*/ (env[11] - i | 0) + 1 | 0, - st = /*<>*/ caml_check_bound(env[3], _d_)[1 + _d_], - _e_ = /*<>*/ (env[11] - i | 0) + 1 | 0, - en = /*<>*/ caml_check_bound(env[4], _e_)[1 + _e_]; + a = /*<>*/ (env[11] - i | 0) + 1 | 0, + st = /*<>*/ caml_check_bound(env[3], a)[1 + a], + b = /*<>*/ (env[11] - i | 0) + 1 | 0, + en = /*<>*/ caml_check_bound(env[4], b)[1 + b]; /*<>*/ if(runtime.caml_notequal(st, en)) /*<>*/ return st; var i$0 = /*<>*/ i - 1 | 0; @@ -10065,16 +9995,16 @@ } /*<>*/ } function symbol_end_pos(param){ - var _c_ = /*<>*/ env[11]; - return caml_check_bound(env[4], _c_)[1 + _c_] /*<>*/ ; + var a = /*<>*/ env[11]; + return caml_check_bound(env[4], a)[1 + a] /*<>*/ ; } function rhs_start_pos(n){ - var _b_ = /*<>*/ env[11] - (env[12] - n | 0) | 0; - return caml_check_bound(env[3], _b_)[1 + _b_] /*<>*/ ; + var a = /*<>*/ env[11] - (env[12] - n | 0) | 0; + return caml_check_bound(env[3], a)[1 + a] /*<>*/ ; } function rhs_end_pos(n){ - var _a_ = /*<>*/ env[11] - (env[12] - n | 0) | 0; - return caml_check_bound(env[4], _a_)[1 + _a_] /*<>*/ ; + var a = /*<>*/ env[11] - (env[12] - n | 0) | 0; + return caml_check_bound(env[4], a)[1 + a] /*<>*/ ; } function symbol_start(param){ /*<>*/ return symbol_start_pos(0)[4] /*<>*/ ; @@ -10153,9 +10083,9 @@ cst_Set_bal$1 = cst_Set_bal$3, cst_Set_bal$2 = cst_Set_bal$3, cst_Set_remove_min_elt = "Set.remove_min_elt", - _a_ = [0, 0, 0, 0], - _b_ = [0, 0, 0], - _c_ = [0, "set.ml", 571, 18], + a = [0, 0, 0, 0], + b = [0, 0, 0], + c = [0, "set.ml", 571, 18], Stdlib_Set = [0, function(Ord){ @@ -10173,8 +10103,8 @@ var h$0 = r[4], hr = /*<>*/ h$0; else var hr = /*<>*/ 0; - var _Y_ = /*<>*/ hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _Y_]; + var a = /*<>*/ hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, a]; /*<>*/ } function bal(l, v, r){ /*<>*/ if(l) @@ -10192,8 +10122,8 @@ lr = /*<>*/ l[3], lv = l[2], ll = l[1], - _T_ = /*<>*/ height(lr); - /*<>*/ if(_T_ <= height(ll)) + a = /*<>*/ height(lr); + /*<>*/ if(a <= height(ll)) /*<>*/ return /*<>*/ create (ll, lv, /*<>*/ create(lr, v, r)) /*<>*/ ; /*<>*/ if(! lr) @@ -10202,13 +10132,13 @@ lrr = /*<>*/ lr[3], lrv = lr[2], lrl = lr[1], - _U_ = /*<>*/ create(lrr, v, r); + b = /*<>*/ create(lrr, v, r); /*<>*/ return /*<>*/ create - ( /*<>*/ create(ll, lv, lrl), lrv, _U_) /*<>*/ ; + ( /*<>*/ create(ll, lv, lrl), lrv, b) /*<>*/ ; } /*<>*/ if((hl + 2 | 0) >= hr){ - var _X_ = /*<>*/ hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, v, r, _X_]; + var e = /*<>*/ hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, e]; } /*<>*/ if(! r) /*<>*/ return caml_call1(Stdlib[1], cst_Set_bal$2) /*<>*/ ; @@ -10216,8 +10146,8 @@ rr = /*<>*/ r[3], rv = r[2], rl = r[1], - _V_ = /*<>*/ height(rl); - /*<>*/ if(_V_ <= height(rr)) + c = /*<>*/ height(rl); + /*<>*/ if(c <= height(rr)) /*<>*/ return /*<>*/ create ( /*<>*/ create(l, v, rl), rv, rr) /*<>*/ ; /*<>*/ if(! rl) @@ -10226,9 +10156,9 @@ rlr = /*<>*/ rl[3], rlv = rl[2], rll = rl[1], - _W_ = /*<>*/ create(rlr, rv, rr); + d = /*<>*/ create(rlr, rv, rr); /*<>*/ return /*<>*/ create - ( /*<>*/ create(l, v, rll), rlv, _W_) /*<>*/ ; + ( /*<>*/ create(l, v, rll), rlv, d) /*<>*/ ; } function add(x, t){ /*<>*/ if(! t) @@ -10354,12 +10284,12 @@ function concat(t1, t2){ /*<>*/ if(! t1) /*<>*/ return t2; /*<>*/ if(! t2) /*<>*/ return t1; - var _S_ = /*<>*/ remove_min_elt(t2); + var a = /*<>*/ remove_min_elt(t2); /*<>*/ return /*<>*/ join - (t1, /*<>*/ min_elt(t2), _S_) /*<>*/ ; + (t1, /*<>*/ min_elt(t2), a) /*<>*/ ; } function split(x, param){ - /*<>*/ if(! param) /*<>*/ return _a_; + /*<>*/ if(! param) /*<>*/ return a; var r = /*<>*/ param[3], v = param[2], @@ -10395,8 +10325,8 @@ v = param$0[2], l = param$0[1], c = /*<>*/ caml_call2(Ord[1], x, v), - _R_ = /*<>*/ 0 === c ? 1 : 0; - if(_R_) return _R_; + a = /*<>*/ 0 === c ? 1 : 0; + if(a) return a; var r$0 = 0 <= c ? r : l; param$0 = r$0; } @@ -10411,9 +10341,9 @@ /*<>*/ if(0 === c){ /*<>*/ if(! t1) /*<>*/ return t2; /*<>*/ if(! t2) /*<>*/ return t1; - var _Q_ = /*<>*/ remove_min_elt(t2); + var a = /*<>*/ remove_min_elt(t2); /*<>*/ return /*<>*/ bal - (t1, /*<>*/ min_elt(t2), _Q_) /*<>*/ ; + (t1, /*<>*/ min_elt(t2), a) /*<>*/ ; } /*<>*/ if(0 <= c){ var rr = /*<>*/ remove(x, t2); @@ -10445,9 +10375,9 @@ match = /*<>*/ split(v1, s2), r2$0 = /*<>*/ match[3], l2$0 = match[1], - _O_ = /*<>*/ union(r1, r2$0); + a = /*<>*/ union(r1, r2$0); /*<>*/ return /*<>*/ join - ( /*<>*/ union(l1, l2$0), v1, _O_) /*<>*/ ; + ( /*<>*/ union(l1, l2$0), v1, a) /*<>*/ ; } /*<>*/ if(1 === h1) /*<>*/ return add(v1, s2) /*<>*/ ; @@ -10455,9 +10385,9 @@ match$0 = /*<>*/ split(v2, s1), r1$0 = /*<>*/ match$0[3], l1$0 = match$0[1], - _P_ = /*<>*/ union(r1$0, r2); + b = /*<>*/ union(r1$0, r2); /*<>*/ return /*<>*/ join - ( /*<>*/ union(l1$0, l2), v2, _P_) /*<>*/ ; + ( /*<>*/ union(l1$0, l2), v2, b) /*<>*/ ; } function inter(s1, s2){ /*<>*/ if(! s1) /*<>*/ return 0; @@ -10466,18 +10396,18 @@ r1 = /*<>*/ s1[3], v1 = s1[2], l1 = s1[1], - _L_ = /*<>*/ split(v1, s2), - l2 = /*<>*/ _L_[1]; - if(_L_[2]){ - var r2 = _L_[3], _M_ = /*<>*/ inter(r1, r2); + a = /*<>*/ split(v1, s2), + l2 = /*<>*/ a[1]; + if(a[2]){ + var r2 = a[3], b = /*<>*/ inter(r1, r2); /*<>*/ return /*<>*/ join - ( /*<>*/ inter(l1, l2), v1, _M_) /*<>*/ ; + ( /*<>*/ inter(l1, l2), v1, b) /*<>*/ ; } var - r2$0 = /*<>*/ _L_[3], - _N_ = /*<>*/ inter(r1, r2$0); + r2$0 = /*<>*/ a[3], + c = /*<>*/ inter(r1, r2$0); /*<>*/ return /*<>*/ concat - ( /*<>*/ inter(l1, l2), _N_) /*<>*/ ; + ( /*<>*/ inter(l1, l2), c) /*<>*/ ; } function split_bis(x, param){ /*<>*/ if(! param) @@ -10520,8 +10450,8 @@ var r2 = /*<>*/ match[2], l2 = match[1], - _K_ = /*<>*/ disjoint(l1, l2); - /*<>*/ if(! _K_) return _K_; + a = /*<>*/ disjoint(l1, l2); + /*<>*/ if(! a) return a; var s2$1 = /*<>*/ r2(0); /*<>*/ s1$0 = r1; s2$0 = s2$1; @@ -10537,18 +10467,18 @@ r1 = /*<>*/ s1[3], v1 = s1[2], l1 = s1[1], - _H_ = /*<>*/ split(v1, s2), - l2 = /*<>*/ _H_[1]; - if(_H_[2]){ - var r2 = _H_[3], _I_ = /*<>*/ diff(r1, r2); + a = /*<>*/ split(v1, s2), + l2 = /*<>*/ a[1]; + if(a[2]){ + var r2 = a[3], b = /*<>*/ diff(r1, r2); /*<>*/ return /*<>*/ concat - ( /*<>*/ diff(l1, l2), _I_) /*<>*/ ; + ( /*<>*/ diff(l1, l2), b) /*<>*/ ; } var - r2$0 = /*<>*/ _H_[3], - _J_ = /*<>*/ diff(r1, r2$0); + r2$0 = /*<>*/ a[3], + c = /*<>*/ diff(r1, r2$0); /*<>*/ return /*<>*/ join - ( /*<>*/ diff(l1, l2), v1, _J_) /*<>*/ ; + ( /*<>*/ diff(l1, l2), v1, c) /*<>*/ ; } function cons_enum(s, e){ var s$0 = /*<>*/ s, e$0 = e; @@ -10606,19 +10536,19 @@ l1 = s1$0[1], c = /*<>*/ caml_call2(Ord[1], v1, v2); /*<>*/ if(0 === c){ - var _E_ = /*<>*/ subset(l1, l2); - /*<>*/ if(! _E_) return _E_; + var a = /*<>*/ subset(l1, l2); + /*<>*/ if(! a) return a; s1$0 = r1; s2$0 = r2; } else if(0 <= c){ - var _F_ = /*<>*/ subset([0, 0, v1, r1, 0], r2); - /*<>*/ if(! _F_) return _F_; + var b = /*<>*/ subset([0, 0, v1, r1, 0], r2); + /*<>*/ if(! b) return b; s1$0 = l1; } else{ - var _G_ = /*<>*/ subset([0, l1, v1, 0, 0], l2); - /*<>*/ if(! _G_) return _G_; + var d = /*<>*/ subset([0, l1, v1, 0, 0], l2); + /*<>*/ if(! d) return d; s1$0 = r1; } } @@ -10659,15 +10589,15 @@ r = /*<>*/ param$0[3], v = param$0[2], l = param$0[1], - _B_ = /*<>*/ caml_call1(p, v); - /*<>*/ if(_B_){ - var _C_ = /*<>*/ for_all(p, l); - /*<>*/ if(_C_){param$0 = r; continue;} - var _D_ = _C_; + a = /*<>*/ caml_call1(p, v); + /*<>*/ if(a){ + var b = /*<>*/ for_all(p, l); + /*<>*/ if(b){param$0 = r; continue;} + var c = b; } else - var _D_ = /*<>*/ _B_; - return _D_; + var c = /*<>*/ a; + return c; } /*<>*/ } function exists(p, param){ @@ -10678,15 +10608,15 @@ r = /*<>*/ param$0[3], v = param$0[2], l = param$0[1], - _y_ = /*<>*/ caml_call1(p, v); - /*<>*/ if(_y_) - var _z_ = _y_; + a = /*<>*/ caml_call1(p, v); + /*<>*/ if(a) + var b = a; else{ - var _A_ = /*<>*/ exists(p, l); - /*<>*/ if(! _A_){param$0 = r; continue;} - var _z_ = _A_; + var c = /*<>*/ exists(p, l); + /*<>*/ if(! c){param$0 = r; continue;} + var b = c; } - /*<>*/ return _z_; + /*<>*/ return b; } /*<>*/ } function filter(p, t){ @@ -10705,7 +10635,7 @@ /*<>*/ return join(l$0, v, r$0) /*<>*/ ; } function partition(p, param){ - /*<>*/ if(! param) /*<>*/ return _b_; + /*<>*/ if(! param) /*<>*/ return b; var r = /*<>*/ param[3], v = param[2], @@ -10718,19 +10648,19 @@ rf = /*<>*/ match$0[2], rt = match$0[1]; /*<>*/ if(pv){ - var _w_ = /*<>*/ concat(lf, rf); - /*<>*/ return [0, join(lt, v, rt), _w_] /*<>*/ ; + var a = /*<>*/ concat(lf, rf); + /*<>*/ return [0, join(lt, v, rt), a] /*<>*/ ; } - var _x_ = /*<>*/ join(lf, v, rf); - /*<>*/ return [0, concat(lt, rt), _x_] /*<>*/ ; + var c = /*<>*/ join(lf, v, rf); + /*<>*/ return [0, concat(lt, rt), c] /*<>*/ ; /*<>*/ } function cardinal(param){ /*<>*/ if(! param) /*<>*/ return 0; var r = /*<>*/ param[3], l = param[1], - _v_ = /*<>*/ cardinal(r); - /*<>*/ return (cardinal(l) + 1 | 0) + _v_ | 0 /*<>*/ ; + a = /*<>*/ cardinal(r); + /*<>*/ return (cardinal(l) + 1 | 0) + a | 0 /*<>*/ ; /*<>*/ } function elements_aux(accu, param){ var accu$0 = /*<>*/ accu, param$0 = param; @@ -10903,12 +10833,12 @@ a: { /*<>*/ if(0 !== l){ - var _u_ = /*<>*/ max_elt(l); - /*<>*/ if(0 <= caml_call2(Ord[1], _u_, v)) break a; + var b = /*<>*/ max_elt(l); + /*<>*/ if(0 <= caml_call2(Ord[1], b, v)) break a; } /*<>*/ if(0 !== r){ - var _t_ = /*<>*/ min_elt(r); - /*<>*/ if(0 <= caml_call2(Ord[1], v, _t_)) break a; + var a = /*<>*/ min_elt(r); + /*<>*/ if(0 <= caml_call2(Ord[1], v, a)) break a; } /*<>*/ return join(l, v, r) /*<>*/ ; } @@ -10945,34 +10875,34 @@ } /*<>*/ if(! t1) /*<>*/ return t2; /*<>*/ if(! t2) /*<>*/ return t1; - var _s_ = /*<>*/ remove_min_elt(t2); + var a = /*<>*/ remove_min_elt(t2); /*<>*/ return /*<>*/ try_join - (t1, /*<>*/ min_elt(t2), _s_) /*<>*/ ; + (t1, /*<>*/ min_elt(t2), a) /*<>*/ ; } function of_list(l){ /*<>*/ if(! l) /*<>*/ return empty; - var _n_ = /*<>*/ l[2], x0 = l[1]; - if(! _n_) + var a = /*<>*/ l[2], x0 = l[1]; + if(! a) /*<>*/ return singleton(x0) /*<>*/ ; - var _o_ = /*<>*/ _n_[2], x1 = _n_[1]; - if(! _o_) + var b = /*<>*/ a[2], x1 = a[1]; + if(! b) /*<>*/ return /*<>*/ add (x1, /*<>*/ singleton(x0)) /*<>*/ ; - var _p_ = /*<>*/ _o_[2], x2 = _o_[1]; - if(! _p_) + var d = /*<>*/ b[2], x2 = b[1]; + if(! d) /*<>*/ return /*<>*/ add (x2, /*<>*/ add (x1, /*<>*/ singleton(x0))) /*<>*/ ; - var _q_ = /*<>*/ _p_[2], x3 = _p_[1]; - if(! _q_) + var e = /*<>*/ d[2], x3 = d[1]; + if(! e) /*<>*/ return /*<>*/ add (x3, /*<>*/ add (x2, /*<>*/ add (x1, /*<>*/ singleton(x0)))) /*<>*/ ; - /*<>*/ if(_q_[2]){ + /*<>*/ if(e[2]){ var l$0 = /*<>*/ caml_call2(Stdlib_List[66], Ord[1], l), sub = @@ -11000,14 +10930,14 @@ break; default: /*<>*/ if(l){ - var _r_ = l[2]; - if(_r_){ - var match$2 = _r_[2]; + var a = l[2]; + if(a){ + var match$2 = a[2]; if(match$2){ var l$5 = match$2[2], x2 = match$2[1], - x1$0 = _r_[1], + x1$0 = a[1], x0$1 = l[1]; /*<>*/ return [0, [0, [0, 0, x0$1, 0, 1], x1$0, [0, 0, x2, 0, 1], 2], @@ -11023,7 +10953,7 @@ left = match[1]; /*<>*/ if(! l$0) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); + ([0, Assert_failure, c], 1); var l$1 = /*<>*/ l$0[2], mid = l$0[1], @@ -11037,7 +10967,7 @@ l$0) [1] /*<>*/ ; } - var x4 = /*<>*/ _q_[1]; + var x4 = /*<>*/ e[1]; /*<>*/ return /*<>*/ add (x4, /*<>*/ add @@ -11065,17 +10995,14 @@ rest = /*<>*/ c[3], t = c[2], x = c[1], - _l_ = /*<>*/ cons_enum(t, rest); + a = /*<>*/ cons_enum(t, rest); /*<>*/ return [0, x, - function(_m_){ - /*<>*/ return seq_of_enum(_l_, _m_); - }] /*<>*/ ; + function(b){ /*<>*/ return seq_of_enum(a, b);}] /*<>*/ ; /*<>*/ } function to_seq(c){ - var _j_ = /*<>*/ cons_enum(c, 0); - /*<>*/ return function(_k_){ - return seq_of_enum(_j_, _k_);}; + var a = /*<>*/ cons_enum(c, 0); + /*<>*/ return function(b){return seq_of_enum(a, b);}; } function snoc_enum(s, e){ var s$0 = /*<>*/ s, e$0 = e; @@ -11096,17 +11023,17 @@ rest = /*<>*/ c[3], t = c[2], x = c[1], - _h_ = /*<>*/ snoc_enum(t, rest); + a = /*<>*/ snoc_enum(t, rest); /*<>*/ return [0, x, - function(_i_){ - /*<>*/ return rev_seq_of_enum(_h_, _i_); + function(b){ + /*<>*/ return rev_seq_of_enum(a, b); }] /*<>*/ ; /*<>*/ } function to_rev_seq(c){ - var _f_ = /*<>*/ snoc_enum(c, 0); - /*<>*/ return function(_g_){ - return rev_seq_of_enum(_f_, _g_);}; + var a = /*<>*/ snoc_enum(c, 0); + /*<>*/ return function(b){ + return rev_seq_of_enum(a, b);}; } function to_seq_from(low, s){ a: @@ -11130,13 +11057,12 @@ else /*<>*/ s$0 = r; } - var _d_ = /*<>*/ c; + var a = /*<>*/ c; break a; } - var _d_ = /*<>*/ [0, v, r, c]; + var a = /*<>*/ [0, v, r, c]; } - /*<>*/ return function(_e_){ - return seq_of_enum(_d_, _e_);}; + /*<>*/ return function(b){return seq_of_enum(a, b);}; } /*<>*/ return [0, empty, @@ -11223,9 +11149,9 @@ cst_Map_bal$1 = cst_Map_bal$3, cst_Map_bal$2 = cst_Map_bal$3, cst_Map_remove_min_elt = "Map.remove_min_elt", - _a_ = [0, 0, 0, 0], - _b_ = [0, "map.ml", 408, 10], - _c_ = [0, 0, 0], + a = [0, 0, 0, 0], + b = [0, "map.ml", 408, 10], + c = [0, 0, 0], Stdlib_Map = [0, function(Ord){ @@ -11238,8 +11164,8 @@ var hl = /*<>*/ height(l), hr = /*<>*/ height(r), - _K_ = /*<>*/ hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, x, d, r, _K_]; + a = /*<>*/ hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, x, d, r, a]; /*<>*/ } function singleton(x, d){ /*<>*/ return [0, 0, x, d, 0, 1]; @@ -11261,8 +11187,8 @@ ld = l[3], lv = l[2], ll = l[1], - _F_ = /*<>*/ height(lr); - /*<>*/ if(_F_ <= height(ll)) + a = /*<>*/ height(lr); + /*<>*/ if(a <= height(ll)) /*<>*/ return /*<>*/ create (ll, lv, ld, /*<>*/ create(lr, x, d, r)) /*<>*/ ; /*<>*/ if(! lr) @@ -11272,16 +11198,16 @@ lrd = lr[3], lrv = lr[2], lrl = lr[1], - _G_ = /*<>*/ create(lrr, x, d, r); + b = /*<>*/ create(lrr, x, d, r); /*<>*/ return /*<>*/ create ( /*<>*/ create(ll, lv, ld, lrl), lrv, lrd, - _G_) /*<>*/ ; + b) /*<>*/ ; } /*<>*/ if((hl + 2 | 0) >= hr){ - var _J_ = /*<>*/ hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - return [0, l, x, d, r, _J_]; + var f = /*<>*/ hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, x, d, r, f]; } /*<>*/ if(! r) /*<>*/ return caml_call1(Stdlib[1], cst_Map_bal$2) /*<>*/ ; @@ -11290,8 +11216,8 @@ rd = r[3], rv = r[2], rl = r[1], - _H_ = /*<>*/ height(rl); - /*<>*/ if(_H_ <= height(rr)) + c = /*<>*/ height(rl); + /*<>*/ if(c <= height(rr)) /*<>*/ return /*<>*/ create ( /*<>*/ create(l, x, d, rl), rv, rd, rr) /*<>*/ ; /*<>*/ if(! rl) @@ -11301,9 +11227,9 @@ rld = rl[3], rlv = rl[2], rll = rl[1], - _I_ = /*<>*/ create(rlr, rv, rd, rr); + e = /*<>*/ create(rlr, rv, rd, rr); /*<>*/ return /*<>*/ create - ( /*<>*/ create(l, x, d, rll), rlv, rld, _I_) /*<>*/ ; + ( /*<>*/ create(l, x, d, rll), rlv, rld, e) /*<>*/ ; } var empty = /*<>*/ 0; function is_empty(param){ @@ -11506,8 +11432,8 @@ v = param$0[2], l = param$0[1], c = /*<>*/ caml_call2(Ord[1], x, v), - _E_ = /*<>*/ 0 === c ? 1 : 0; - if(_E_) return _E_; + a = /*<>*/ 0 === c ? 1 : 0; + if(a) return a; var r$0 = 0 <= c ? r : l; param$0 = r$0; } @@ -11577,7 +11503,7 @@ var r$0 = /*<>*/ param[4]; /*<>*/ return r$0; /*<>*/ } - function _d_(t1, t2){ + function d(t1, t2){ /*<>*/ if(! t1) /*<>*/ return t2; /*<>*/ if(! t2) /*<>*/ return t1; var @@ -11591,22 +11517,22 @@ /*<>*/ if(! m) /*<>*/ return 0; var r = /*<>*/ m[4], - d = m[3], + d$0 = m[3], v = m[2], l = m[1], c = /*<>*/ caml_call2(Ord[1], x, v); /*<>*/ if(0 === c) - /*<>*/ return _d_(l, r) /*<>*/ ; + /*<>*/ return d(l, r) /*<>*/ ; /*<>*/ if(0 <= c){ var rr = /*<>*/ remove(x, r); /*<>*/ return r === rr ? m - : /*<>*/ bal(l, v, d, rr) /*<>*/ ; + : /*<>*/ bal(l, v, d$0, rr) /*<>*/ ; } var ll = /*<>*/ remove(x, l); /*<>*/ return l === ll ? m - : /*<>*/ bal(ll, v, d, r) /*<>*/ ; + : /*<>*/ bal(ll, v, d$0, r) /*<>*/ ; } function update(x, f, m){ /*<>*/ if(! m){ @@ -11619,27 +11545,29 @@ var h = /*<>*/ m[5], r = m[4], - d = m[3], + d$0 = m[3], v = m[2], l = m[1], c = /*<>*/ caml_call2(Ord[1], x, v); /*<>*/ if(0 === c){ - var match = /*<>*/ caml_call1(f, [0, d]); + var match = /*<>*/ caml_call1(f, [0, d$0]); /*<>*/ if(! match) - /*<>*/ return _d_(l, r) /*<>*/ ; + /*<>*/ return d(l, r) /*<>*/ ; var data = /*<>*/ match[1]; - /*<>*/ return d === data ? m : [0, l, x, data, r, h] /*<>*/ ; + /*<>*/ return d$0 === data + ? m + : [0, l, x, data, r, h] /*<>*/ ; } /*<>*/ if(0 <= c){ var rr = /*<>*/ update(x, f, r); /*<>*/ return r === rr ? m - : /*<>*/ bal(l, v, d, rr) /*<>*/ ; + : /*<>*/ bal(l, v, d$0, rr) /*<>*/ ; } var ll = /*<>*/ update(x, f, l); /*<>*/ return l === ll ? m - : /*<>*/ bal(ll, v, d, r) /*<>*/ ; + : /*<>*/ bal(ll, v, d$0, r) /*<>*/ ; } function add_to_list(x, data, m){ function add(param){ @@ -11715,15 +11643,15 @@ d = param$0[3], v = param$0[2], l = param$0[1], - _B_ = /*<>*/ caml_call2(p, v, d); - /*<>*/ if(_B_){ - var _C_ = /*<>*/ for_all(p, l); - /*<>*/ if(_C_){param$0 = r; continue;} - var _D_ = _C_; + a = /*<>*/ caml_call2(p, v, d); + /*<>*/ if(a){ + var b = /*<>*/ for_all(p, l); + /*<>*/ if(b){param$0 = r; continue;} + var c = b; } else - var _D_ = /*<>*/ _B_; - return _D_; + var c = /*<>*/ a; + return c; } /*<>*/ } function exists(p, param){ @@ -11735,15 +11663,15 @@ d = param$0[3], v = param$0[2], l = param$0[1], - _y_ = /*<>*/ caml_call2(p, v, d); - /*<>*/ if(_y_) - var _z_ = _y_; + a = /*<>*/ caml_call2(p, v, d); + /*<>*/ if(a) + var b = a; else{ - var _A_ = /*<>*/ exists(p, l); - /*<>*/ if(! _A_){param$0 = r; continue;} - var _z_ = _A_; + var c = /*<>*/ exists(p, l); + /*<>*/ if(! c){param$0 = r; continue;} + var b = c; } - /*<>*/ return _z_; + /*<>*/ return b; } /*<>*/ } function add_min_binding(k, x, param){ @@ -11812,7 +11740,7 @@ /*<>*/ return join(t1, v, d$0, t2) /*<>*/ ; } function split(x, param){ - /*<>*/ if(! param) /*<>*/ return _a_; + /*<>*/ if(! param) /*<>*/ return a; var r = /*<>*/ param[4], d = param[3], @@ -11845,16 +11773,16 @@ r2 = /*<>*/ match[3], d2 = match[2], l2 = match[1], - _u_ = /*<>*/ merge(f, r1, r2), - _v_ = /*<>*/ caml_call3(f, v1, [0, d1], d2); + a = /*<>*/ merge(f, r1, r2), + c = /*<>*/ caml_call3(f, v1, [0, d1], d2); /*<>*/ return /*<>*/ concat_or_join - ( /*<>*/ merge(f, l1, l2), v1, _v_, _u_) /*<>*/ ; + ( /*<>*/ merge(f, l1, l2), v1, c, a) /*<>*/ ; } } else if(! s2) /*<>*/ return 0; /*<>*/ if(! s2) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); + ([0, Assert_failure, b], 1); var r2$0 = /*<>*/ s2[4], d2$0 = s2[3], @@ -11864,10 +11792,10 @@ r1$0 = /*<>*/ match$0[3], d1$0 = match$0[2], l1$0 = match$0[1], - _w_ = /*<>*/ merge(f, r1$0, r2$0), - _x_ = /*<>*/ caml_call3(f, v2, d1$0, [0, d2$0]); + d = /*<>*/ merge(f, r1$0, r2$0), + e = /*<>*/ caml_call3(f, v2, d1$0, [0, d2$0]); /*<>*/ return /*<>*/ concat_or_join - ( /*<>*/ merge(f, l1$0, l2$0), v2, _x_, _w_) /*<>*/ ; + ( /*<>*/ merge(f, l1$0, l2$0), v2, e, d) /*<>*/ ; } function union(f, s1, s2){ /*<>*/ if(s1){ @@ -11954,7 +11882,7 @@ /*<>*/ return join(l$0, v, d$0, r$0) /*<>*/ ; } function partition(p, param){ - /*<>*/ if(! param) /*<>*/ return _c_; + /*<>*/ if(! param) /*<>*/ return c; var r = /*<>*/ param[4], d = param[3], @@ -11968,11 +11896,11 @@ rf = /*<>*/ match$0[2], rt = match$0[1]; /*<>*/ if(pvd){ - var _s_ = /*<>*/ concat(lf, rf); - /*<>*/ return [0, join(lt, v, d, rt), _s_] /*<>*/ ; + var a = /*<>*/ concat(lf, rf); + /*<>*/ return [0, join(lt, v, d, rt), a] /*<>*/ ; } - var _t_ = /*<>*/ join(lf, v, d, rf); - /*<>*/ return [0, concat(lt, rt), _t_] /*<>*/ ; + var b = /*<>*/ join(lf, v, d, rf); + /*<>*/ return [0, concat(lt, rt), b] /*<>*/ ; /*<>*/ } function cons_enum(m, e){ var m$0 = /*<>*/ m, e$0 = e; @@ -12038,11 +11966,10 @@ r1 = e1[3], d1 = e1[2], v1 = e1[1], - _p_ = - /*<>*/ 0 === caml_call2(Ord[1], v1, v2) ? 1 : 0; - /*<>*/ if(_p_){ - var _q_ = /*<>*/ caml_call2(cmp, d1, d2); - /*<>*/ if(_q_){ + a = /*<>*/ 0 === caml_call2(Ord[1], v1, v2) ? 1 : 0; + /*<>*/ if(a){ + var b = /*<>*/ caml_call2(cmp, d1, d2); + /*<>*/ if(b){ var e2$1 = /*<>*/ cons_enum(r2, e2$0), e1$1 = /*<>*/ cons_enum(r1, e1$0); @@ -12050,11 +11977,11 @@ e2 = e2$1; continue; } - var _r_ = /*<>*/ _q_; + var c = /*<>*/ b; } else - var _r_ = /*<>*/ _p_; - return _r_; + var c = /*<>*/ a; + return c; } /*<>*/ } function cardinal(param){ @@ -12062,8 +11989,8 @@ var r = /*<>*/ param[4], l = param[1], - _o_ = /*<>*/ cardinal(r); - /*<>*/ return (cardinal(l) + 1 | 0) + _o_ | 0 /*<>*/ ; + a = /*<>*/ cardinal(r); + /*<>*/ return (cardinal(l) + 1 | 0) + a | 0 /*<>*/ ; /*<>*/ } function bindings_aux(accu, param){ var accu$0 = /*<>*/ accu, param$0 = param; @@ -12113,17 +12040,14 @@ t = c[3], v = c[2], k = c[1], - _m_ = /*<>*/ cons_enum(t, rest); + a = /*<>*/ cons_enum(t, rest); /*<>*/ return [0, [0, k, v], - function(_n_){ - /*<>*/ return seq_of_enum(_m_, _n_); - }] /*<>*/ ; + function(b){ /*<>*/ return seq_of_enum(a, b);}] /*<>*/ ; /*<>*/ } function to_seq(m){ - var _k_ = /*<>*/ cons_enum(m, 0); - /*<>*/ return function(_l_){ - return seq_of_enum(_k_, _l_);}; + var a = /*<>*/ cons_enum(m, 0); + /*<>*/ return function(b){return seq_of_enum(a, b);}; } function snoc_enum(s, e){ var s$0 = /*<>*/ s, e$0 = e; @@ -12146,17 +12070,17 @@ t = c[3], v = c[2], k = c[1], - _i_ = /*<>*/ snoc_enum(t, rest); + a = /*<>*/ snoc_enum(t, rest); /*<>*/ return [0, [0, k, v], - function(_j_){ - /*<>*/ return rev_seq_of_enum(_i_, _j_); + function(b){ + /*<>*/ return rev_seq_of_enum(a, b); }] /*<>*/ ; /*<>*/ } function to_rev_seq(c){ - var _g_ = /*<>*/ snoc_enum(c, 0); - /*<>*/ return function(_h_){ - return rev_seq_of_enum(_g_, _h_);}; + var a = /*<>*/ snoc_enum(c, 0); + /*<>*/ return function(b){ + return rev_seq_of_enum(a, b);}; } function to_seq_from(low, m){ a: @@ -12181,13 +12105,12 @@ else /*<>*/ m$0 = r; } - var _e_ = /*<>*/ c; + var a = /*<>*/ c; break a; } - var _e_ = /*<>*/ [0, v, d, r, c]; + var a = /*<>*/ [0, v, d, r, c]; } - /*<>*/ return function(_f_){ - return seq_of_enum(_e_, _f_);}; + /*<>*/ return function(b){return seq_of_enum(a, b);}; } /*<>*/ return [0, empty, @@ -12428,12 +12351,12 @@ /*<>*/ return [0, content]; /*<>*/ } function take(q){ - var _g_ = /*<>*/ q[2]; - if(! _g_) + var a = /*<>*/ q[2]; + if(! a) /*<>*/ throw caml_maybe_attach_backtrace(Empty, 1); - var content = /*<>*/ _g_[1]; - if(_g_[2]){ - var next = _g_[2]; + var content = /*<>*/ a[1]; + if(a[2]){ + var next = a[2]; /*<>*/ q[1] = q[1] - 1 | 0; /*<>*/ q[2] = next; /*<>*/ return content; @@ -12442,11 +12365,11 @@ /*<>*/ return content; /*<>*/ } function take_opt(q){ - var _f_ = /*<>*/ q[2]; - if(! _f_) /*<>*/ return 0; - var content = /*<>*/ _f_[1]; - if(_f_[2]){ - var next = _f_[2]; + var a = /*<>*/ q[2]; + if(! a) /*<>*/ return 0; + var content = /*<>*/ a[1]; + if(a[2]){ + var next = a[2]; /*<>*/ q[1] = q[1] - 1 | 0; /*<>*/ q[2] = next; /*<>*/ return [0, content]; @@ -12455,12 +12378,12 @@ /*<>*/ return [0, content]; /*<>*/ } function drop(q){ - var _e_ = /*<>*/ q[2]; - if(! _e_) + var a = /*<>*/ q[2]; + if(! a) /*<>*/ throw caml_maybe_attach_backtrace(Empty, 1); - /*<>*/ if(! _e_[2]) + /*<>*/ if(! a[2]) /*<>*/ return clear(q) /*<>*/ ; - var next = /*<>*/ _e_[2]; + var next = /*<>*/ a[2]; /*<>*/ q[1] = q[1] - 1 | 0; /*<>*/ q[2] = next; return 0; @@ -12516,8 +12439,8 @@ } /*<>*/ } function transfer(q1, q2){ - var _d_ = /*<>*/ 0 < q1[1] ? 1 : 0; - if(! _d_) return _d_; + var a = /*<>*/ 0 < q1[1] ? 1 : 0; + if(! a) return a; var match = /*<>*/ q2[3]; return match ? (q2 @@ -12539,11 +12462,10 @@ var x = /*<>*/ c[1], next = c[2]; /*<>*/ return [0, x, - function(_c_){ /*<>*/ return aux(next, _c_);}] /*<>*/ ; + function(a){ /*<>*/ return aux(next, a);}] /*<>*/ ; /*<>*/ } - var _a_ = /*<>*/ q[2]; - return function(_b_){ - /*<>*/ return aux(_a_, _b_);} /*<>*/ ; + var a = /*<>*/ q[2]; + return function(b){ /*<>*/ return aux(a, b);} /*<>*/ ; /*<>*/ } function add_seq(q, i){ /*<>*/ return caml_call2 @@ -12746,7 +12668,7 @@ cst_Buffer_add_substring = "Buffer.add_substring", cst_Buffer_add_subbytes = "Buffer.add_subbytes", cst_Buffer_add_channel = "Buffer.add_channel", - _a_ = [0, "buffer.ml", 222, 9], + a = [0, "buffer.ml", 222, 9], cst_Buffer_truncate = "Buffer.truncate"; function add_utf_8_uchar(b, u){ /*<>*/ for(;;){ @@ -12797,14 +12719,14 @@ } /*<>*/ } function add_substring(b, s, offset, len){ - var _v_ = /*<>*/ offset < 0 ? 1 : 0; - if(_v_) - var _w_ = _v_; + var a = /*<>*/ offset < 0 ? 1 : 0; + if(a) + var c = a; else var - _x_ = len < 0 ? 1 : 0, - _w_ = _x_ || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); - if(_w_) + d = len < 0 ? 1 : 0, + c = d || ((caml_ml_string_length(s) - len | 0) < offset ? 1 : 0); + if(c) /*<>*/ caml_call1(Stdlib[1], cst_Buffer_add_substring); var position = /*<>*/ b[2], @@ -12824,14 +12746,14 @@ return 0; /*<>*/ } function add_subbytes(b, bytes, offset, len){ - var _s_ = /*<>*/ offset < 0 ? 1 : 0; - if(_s_) - var _t_ = _s_; + var a = /*<>*/ offset < 0 ? 1 : 0; + if(a) + var c = a; else var - _u_ = len < 0 ? 1 : 0, - _t_ = _u_ || ((caml_ml_bytes_length(bytes) - len | 0) < offset ? 1 : 0); - if(_t_) + d = len < 0 ? 1 : 0, + c = d || ((caml_ml_bytes_length(bytes) - len | 0) < offset ? 1 : 0); + if(c) /*<>*/ caml_call1(Stdlib[1], cst_Buffer_add_subbytes); var position = /*<>*/ b[2], @@ -12863,9 +12785,9 @@ } function add_channel(b, ic, to_read$1){ var - _q_ = /*<>*/ to_read$1 < 0 ? 1 : 0, - _r_ = _q_ || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); - if(_r_) + a = /*<>*/ to_read$1 < 0 ? 1 : 0, + c = a || (Stdlib_Sys[12] < to_read$1 ? 1 : 0); + if(c) /*<>*/ caml_call1(Stdlib[1], cst_Buffer_add_channel); /*<>*/ if(b[1][2] < (b[2] + to_read$1 | 0)) /*<>*/ resize(b, to_read$1); @@ -12910,8 +12832,8 @@ i$4 = 0; for(;;){ /*<>*/ if(i$4 >= lim$1){ - var _o_ = /*<>*/ 92 === previous ? 1 : 0; - return _o_ ? /*<>*/ add_char(b, previous) : _o_ /*<>*/ ; + var d = /*<>*/ 92 === previous ? 1 : 0; + return d ? /*<>*/ add_char(b, previous) : d /*<>*/ ; } var previous$0 = /*<>*/ caml_string_get(s, i$4); /*<>*/ if(36 === previous$0) @@ -12981,7 +12903,7 @@ else{ /*<>*/ if(123 !== opening) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); + ([0, Assert_failure, a], 1); var closing = /*<>*/ 125; } var @@ -13014,9 +12936,9 @@ stop + 1 | 0]; } } - catch(_p_){ - var _n_ = /*<>*/ caml_wrap_exception(_p_); - if(_n_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_n_, 0); + catch(a){ + var c = /*<>*/ caml_wrap_exception(a); + if(c !== Stdlib[8]) throw caml_maybe_attach_backtrace(c, 0); /*<>*/ add_char(b, 36); /*<>*/ previous = 32; i$4 = start; @@ -13052,14 +12974,13 @@ /*<>*/ return 0; var x = /*<>*/ caml_bytes_get(b[1][1], i), - _l_ = /*<>*/ i + 1 | 0; + a = /*<>*/ i + 1 | 0; /*<>*/ return [0, x, - function(_m_){ /*<>*/ return aux(_l_, _m_);}] /*<>*/ ; + function(b){ /*<>*/ return aux(a, b);}] /*<>*/ ; /*<>*/ } - var _j_ = /*<>*/ 0; - return function(_k_){ - /*<>*/ return aux(_j_, _k_);} /*<>*/ ; + var a = /*<>*/ 0; + return function(b){ /*<>*/ return aux(a, b);} /*<>*/ ; /*<>*/ } function to_seqi(b){ function aux(i, param){ @@ -13067,19 +12988,18 @@ /*<>*/ return 0; var x = /*<>*/ caml_bytes_get(b[1][1], i), - _h_ = /*<>*/ i + 1 | 0; + a = /*<>*/ i + 1 | 0; /*<>*/ return [0, [0, i, x], - function(_i_){ /*<>*/ return aux(_h_, _i_);}] /*<>*/ ; + function(b){ /*<>*/ return aux(a, b);}] /*<>*/ ; /*<>*/ } - var _f_ = /*<>*/ 0; - return function(_g_){ - /*<>*/ return aux(_f_, _g_);} /*<>*/ ; + var a = /*<>*/ 0; + return function(b){ /*<>*/ return aux(a, b);} /*<>*/ ; /*<>*/ } function add_seq(b, seq){ /*<>*/ return caml_call2 (Stdlib_Seq[4], - function(_e_){ /*<>*/ return add_char(b, _e_);}, + function(a){ /*<>*/ return add_char(b, a);}, seq) /*<>*/ ; } function of_seq(i){ @@ -13153,11 +13073,11 @@ /*<>*/ } function add_int16_le(b, x){ var - _d_ = + a = /*<>*/ Stdlib_Sys[11] ? /*<>*/ caml_bswap16(x) : x; - /*<>*/ return add_int16_ne(b, _d_) /*<>*/ ; + /*<>*/ return add_int16_ne(b, a) /*<>*/ ; } function add_int16_be(b, x){ var @@ -13169,11 +13089,11 @@ } function add_int32_le(b, x){ var - _c_ = + a = /*<>*/ Stdlib_Sys[11] ? /*<>*/ caml_int32_bswap(x) : x; - /*<>*/ return add_int32_ne(b, _c_) /*<>*/ ; + /*<>*/ return add_int32_ne(b, a) /*<>*/ ; } function add_int32_be(b, x){ var @@ -13185,11 +13105,11 @@ } function add_int64_le(b, x){ var - _b_ = + a = /*<>*/ Stdlib_Sys[11] ? /*<>*/ caml_int64_bswap(x) : x; - /*<>*/ return add_int64_ne(b, _b_) /*<>*/ ; + /*<>*/ return add_int64_ne(b, a) /*<>*/ ; } function add_int64_be(b, x){ var @@ -13333,11 +13253,11 @@ /*<>*/ if(v < 0) /*<>*/ caml_call1 (Stdlib[1], cst_Semaphore_Counting_init_wr); - var _c_ = /*<>*/ caml_call1(Stdlib_Condition[1], 0); + var a = /*<>*/ caml_call1(Stdlib_Condition[1], 0); /*<>*/ return [0, caml_call1(Stdlib_Mutex[1], 0), v, - _c_] /*<>*/ ; + a] /*<>*/ ; /*<>*/ } function release(s){ /*<>*/ caml_call1(Stdlib_Mutex[2], s[1]); @@ -13375,12 +13295,12 @@ Counting = /*<>*/ [0, make, release, acquire, try_acquire, get_value]; function make$0(b){ var - _a_ = /*<>*/ caml_call1(Stdlib_Condition[1], 0), - _b_ = /*<>*/ b ? 1 : 0; + a = /*<>*/ caml_call1(Stdlib_Condition[1], 0), + c = /*<>*/ b ? 1 : 0; /*<>*/ return [0, caml_call1(Stdlib_Mutex[1], 0), - _b_, - _a_] /*<>*/ ; + c, + a] /*<>*/ ; /*<>*/ } function release$0(s){ /*<>*/ caml_call1(Stdlib_Mutex[2], s[1]); @@ -13467,7 +13387,7 @@ var key_counter = /*<>*/ caml_call1(Stdlib_Atomic[1], 0), parent_keys = /*<>*/ caml_call1(Stdlib_Atomic[1], 0), - _a_ = /*<>*/ [0, "domain.ml", 184, 13]; + a = /*<>*/ [0, "domain.ml", 184, 13]; function new_key(split_from_parent, init_orphan){ var idx = @@ -13527,19 +13447,18 @@ new_obj = /*<>*/ caml_call1(init, 0), st$0 = /*<>*/ caml_domain_dls_get(0), curval = /*<>*/ caml_check_bound(st$0, idx)[1 + idx], - _e_ = + b = /*<>*/ curval === oldval ? (st$0[1 + idx] = new_obj, 1) : 0; - /*<>*/ if(_e_) - /*<>*/ return new_obj; + /*<>*/ if(b) /*<>*/ return new_obj; var updated_obj = /*<>*/ caml_check_bound(st$0, idx)[1 + idx]; /*<>*/ if(updated_obj !== none) /*<>*/ return updated_obj; /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); + ([0, Assert_failure, a], 1); /*<>*/ } function get_id(param){ var domain = /*<>*/ param[1]; @@ -13605,7 +13524,7 @@ /*<>*/ }; } var - _b_ = /*<>*/ caml_call1(Stdlib_Atomic[3], parent_keys), + a = /*<>*/ caml_call1(Stdlib_Atomic[3], parent_keys), pk = /*<>*/ caml_call2 (Stdlib_List[20], @@ -13616,10 +13535,10 @@ /*<>*/ caml_call1 (split, /*<>*/ get(k))] /*<>*/ ; /*<>*/ }, - _b_), - _c_ = /*<>*/ caml_call1(Stdlib_Condition[1], 0), + a), + b = /*<>*/ caml_call1(Stdlib_Condition[1], 0), term_sync = - /*<>*/ [0, 0, caml_call1(Stdlib_Mutex[1], 0), _c_]; + /*<>*/ [0, 0, caml_call1(Stdlib_Mutex[1], 0), b]; function body(param){ /*<>*/ try{ /*<>*/ create_dls(0); @@ -13635,7 +13554,7 @@ catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); /*<>*/ try{ /*<>*/ do_at_exit(0);} - catch(_d_){} + catch(a){} /*<>*/ throw caml_maybe_attach_backtrace(exn, 0); } /*<>*/ do_at_exit(0); @@ -13809,7 +13728,7 @@ Stdlib_Char = global_data.Stdlib__Char, Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib_Int = global_data.Stdlib__Int, - _a_ = [0, 0, 0], + a = [0, 0, 0], cst_c = "%c", cst_s = "%s", cst_i = cst_i$3, @@ -13823,22 +13742,22 @@ cst_r = "%r", cst_r$0 = "%_r", cst_0c = "0c", - _b_ = [0, cst_camlinternalFormat_ml, 850, 23], - _c_ = [0, cst_camlinternalFormat_ml, 837, 26], - _d_ = [0, cst_camlinternalFormat_ml, 847, 28], - _e_ = [0, cst_camlinternalFormat_ml, 815, 21], - _f_ = [0, cst_camlinternalFormat_ml, 819, 21], - _g_ = [0, cst_camlinternalFormat_ml, 823, 19], - _h_ = [0, cst_camlinternalFormat_ml, 827, 22], - _i_ = [0, cst_camlinternalFormat_ml, 832, 30], - _j_ = [0, cst_camlinternalFormat_ml, 851, 23], - _k_ = [0, cst_camlinternalFormat_ml, 836, 26], - _l_ = [0, cst_camlinternalFormat_ml, 846, 28], - _m_ = [0, cst_camlinternalFormat_ml, 814, 21], - _n_ = [0, cst_camlinternalFormat_ml, 818, 21], - _o_ = [0, cst_camlinternalFormat_ml, 822, 19], - _p_ = [0, cst_camlinternalFormat_ml, 826, 22], - _q_ = [0, cst_camlinternalFormat_ml, 831, 30]; + b = [0, cst_camlinternalFormat_ml, 850, 23], + c = [0, cst_camlinternalFormat_ml, 837, 26], + d = [0, cst_camlinternalFormat_ml, 847, 28], + e = [0, cst_camlinternalFormat_ml, 815, 21], + f = [0, cst_camlinternalFormat_ml, 819, 21], + g = [0, cst_camlinternalFormat_ml, 823, 19], + h = [0, cst_camlinternalFormat_ml, 827, 22], + i = [0, cst_camlinternalFormat_ml, 832, 30], + j = [0, cst_camlinternalFormat_ml, 851, 23], + k = [0, cst_camlinternalFormat_ml, 836, 26], + l = [0, cst_camlinternalFormat_ml, 846, 28], + m = [0, cst_camlinternalFormat_ml, 814, 21], + n = [0, cst_camlinternalFormat_ml, 818, 21], + o = [0, cst_camlinternalFormat_ml, 822, 19], + p = [0, cst_camlinternalFormat_ml, 826, 22], + q = [0, cst_camlinternalFormat_ml, 831, 30]; function create_char_set(param){ /*<>*/ return caml_call2 (Stdlib_Bytes[1], 32, 0) /*<>*/ ; @@ -13847,14 +13766,14 @@ var str_ind = /*<>*/ c >>> 3 | 0, mask = 1 << (c & 7), - _cU_ = + a = /*<>*/ runtime.caml_bytes_get (char_set, str_ind) | mask; /*<>*/ return /*<>*/ caml_bytes_set (char_set, str_ind, - /*<>*/ caml_call1(Stdlib[29], _cU_)) /*<>*/ ; + /*<>*/ caml_call1(Stdlib[29], a)) /*<>*/ ; } function freeze_char_set(char_set){ /*<>*/ return caml_call1 @@ -13866,18 +13785,18 @@ i = /*<>*/ 0; for(;;){ var - _cS_ = + a = /*<>*/ caml_string_get(char_set, i) ^ 255; /*<>*/ /*<>*/ caml_bytes_set (char_set$0, i, - /*<>*/ caml_call1(Stdlib[29], _cS_)); - var _cT_ = /*<>*/ i + 1 | 0; + /*<>*/ caml_call1(Stdlib[29], a)); + var b = /*<>*/ i + 1 | 0; if(31 === i) /*<>*/ return caml_call1 (Stdlib_Bytes[44], char_set$0) /*<>*/ ; - /*<>*/ i = _cT_; + /*<>*/ i = b; } /*<>*/ } function is_in_char_set(char_set, c){ @@ -13946,11 +13865,11 @@ /*<>*/ if(prec_opt) var ndec = prec_opt[1], - _cR_ = /*<>*/ [0, ndec]; + b = /*<>*/ [0, ndec]; else - var _cR_ = /*<>*/ 0; + var b = /*<>*/ 0; /*<>*/ return [0, - [8, _a_, pad_of_pad_opt(pad_opt$5), _cR_, fmt]] /*<>*/ ; + [8, a, pad_of_pad_opt(pad_opt$5), b, fmt]] /*<>*/ ; case 7: var pad_opt$6 = /*<>*/ ign[1]; /*<>*/ return [0, @@ -14182,11 +14101,11 @@ default: var c = /*<>*/ formatting_lit[1], - _cQ_ = + a = /*<>*/ caml_call2 (Stdlib_String[1], 1, c); /*<>*/ return caml_call2 - (Stdlib[28], cst$7, _cQ_); + (Stdlib[28], cst$7, a); } } function bprint_char_literal(buf, chr){ @@ -14197,17 +14116,17 @@ } function bprint_string_literal(buf, str){ var - _cO_ = + a = /*<>*/ caml_ml_string_length(str) - 1 | 0, - _cN_ = 0; - if(_cO_ >= 0){ - var i = _cN_; + b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ /*<>*/ bprint_char_literal (buf, /*<>*/ caml_string_get(str, i)); - var _cP_ = /*<>*/ i + 1 | 0; - if(_cO_ === i) break; - i = _cP_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ } @@ -14593,22 +14512,22 @@ before = /*<>*/ caml_call1 (Stdlib_Char[1], c - 1 | 0), - _cJ_ = + a = /*<>*/ is_in_char_set(set$0, c); - /*<>*/ if(_cJ_) + /*<>*/ if(a) var - _cK_ = + b = /*<>*/ is_in_char_set (set$0, before), - _cL_ = - /*<>*/ _cK_ + e = + /*<>*/ b ? /*<>*/ is_in_char_set (set$0, after) - : _cK_, - _cM_ = /*<>*/ 1 - _cL_; + : b, + d = /*<>*/ 1 - e; else - var _cM_ = /*<>*/ _cJ_; - return _cM_; + var d = /*<>*/ a; + return d; /*<>*/ }; /*<>*/ if(is_alone(93)) /*<>*/ buffer_add_char(buf, 93); @@ -14743,12 +14662,12 @@ (buf, ign_flag$0); /*<>*/ switch(counter){ case 0: - var _cF_ = /*<>*/ 108; break; + var a = /*<>*/ 108; break; case 1: - var _cF_ = /*<>*/ 110; break; - default: var _cF_ = /*<>*/ 78; + var a = /*<>*/ 110; break; + default: var a = /*<>*/ 78; } - /*<>*/ buffer_add_char(buf, _cF_); + /*<>*/ buffer_add_char(buf, a); /*<>*/ fmt$0 = rest$20; ign_flag$0 = 0; break; @@ -14777,19 +14696,18 @@ var rest$23 = /*<>*/ fmt$0[3], arity = fmt$0[1], - _cH_ = - /*<>*/ int_of_custom_arity(arity), - _cG_ = /*<>*/ 1; - if(_cH_ >= 1){ - var i$8 = _cG_; + b = /*<>*/ int_of_custom_arity(arity), + c = /*<>*/ 1; + if(b >= 1){ + var i$8 = c; for(;;){ /*<>*/ buffer_add_char(buf, 37); /*<>*/ bprint_ignored_flag (buf, ign_flag$0); /*<>*/ buffer_add_char(buf, 63); - var _cI_ = /*<>*/ i$8 + 1 | 0; - if(_cH_ === i$8) break; - i$8 = _cI_; + var d = /*<>*/ i$8 + 1 | 0; + if(b === i$8) break; + i$8 = d; } } /*<>*/ fmt$0 = rest$23; @@ -15303,12 +15221,12 @@ var rest2$7 = ty2[2], ty2$0 = ty2[1], - _cE_ = + a = /*<>*/ trans (rest1$7, rest2$7); /*<>*/ return [8, trans(ty1$0, ty2$0), - _cE_] /*<>*/ ; + a] /*<>*/ ; case 10: break a; case 11: @@ -15321,7 +15239,7 @@ break e; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _k_], 1); + ([0, Assert_failure, k], 1); case 9: var rest1$8 = /*<>*/ ty1[3], @@ -15361,7 +15279,7 @@ break e; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _l_], 1); + ([0, Assert_failure, l], 1); case 10: var rest1$9 = /*<>*/ ty1[1]; if(typeof ty2 !== "number" && 10 === ty2[0]){ @@ -15370,7 +15288,7 @@ trans(rest1$9, rest2$9)] /*<>*/ ; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _m_], 1); + ([0, Assert_failure, m], 1); case 11: var rest1$10 = /*<>*/ ty1[1]; if(typeof ty2 !== "number") @@ -15383,7 +15301,7 @@ trans(rest1$10, rest2$10)] /*<>*/ ; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _n_], 1); + ([0, Assert_failure, n], 1); case 12: var rest1$11 = /*<>*/ ty1[1]; if(typeof ty2 !== "number") @@ -15398,7 +15316,7 @@ trans(rest1$11, rest2$11)] /*<>*/ ; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _o_], 1); + ([0, Assert_failure, o], 1); case 13: var rest1$12 = /*<>*/ ty1[1]; if(typeof ty2 !== "number") @@ -15415,7 +15333,7 @@ trans(rest1$12, rest2$12)] /*<>*/ ; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _p_], 1); + ([0, Assert_failure, p], 1); default: var rest1$13 = /*<>*/ ty1[1]; if(typeof ty2 !== "number") @@ -15434,10 +15352,10 @@ trans(rest1$13, rest2$13)] /*<>*/ ; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _q_], 1); + ([0, Assert_failure, q], 1); } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _j_], 1); + ([0, Assert_failure, j], 1); } /*<>*/ if(typeof ty2 === "number") /*<>*/ return 0; @@ -15457,29 +15375,29 @@ case 9: break; default: /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); + ([0, Assert_failure, b], 1); } } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); + ([0, Assert_failure, d], 1); } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); + ([0, Assert_failure, c], 1); } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _i_], 1); + ([0, Assert_failure, i], 1); } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _h_], 1); + ([0, Assert_failure, h], 1); } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _g_], 1); + ([0, Assert_failure, g], 1); } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _f_], 1); + ([0, Assert_failure, f], 1); } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _e_], 1); + ([0, Assert_failure, e], 1); /*<>*/ } function fmtty_of_fmt(fmtty){ var fmtty$0 = /*<>*/ fmtty; @@ -15619,17 +15537,17 @@ var rest$13 = /*<>*/ fmtty$0[2], formatting_gen = fmtty$0[1], - _cB_ = /*<>*/ fmtty_of_fmt(rest$13); + b = /*<>*/ fmtty_of_fmt(rest$13); /*<>*/ if(0 === formatting_gen[0]) var fmt = formatting_gen[1][1], - _cC_ = /*<>*/ fmtty_of_fmt(fmt); + a = /*<>*/ fmtty_of_fmt(fmt); else var fmt$0 = /*<>*/ formatting_gen[1][1], - _cC_ = /*<>*/ fmtty_of_fmt(fmt$0); + a = /*<>*/ fmtty_of_fmt(fmt$0); /*<>*/ return caml_call2 - (CamlinternalFormatBasics[1], _cC_, _cB_) /*<>*/ ; + (CamlinternalFormatBasics[1], a, b) /*<>*/ ; case 19: var rest$14 = /*<>*/ fmtty$0[1]; /*<>*/ return [13, @@ -15684,10 +15602,9 @@ case 9: var fmtty$6 = /*<>*/ ign[2], - _cD_ = - /*<>*/ fmtty_of_fmt(fmtty$5); + c = /*<>*/ fmtty_of_fmt(fmtty$5); /*<>*/ return caml_call2 - (CamlinternalFormatBasics[1], fmtty$6, _cD_) /*<>*/ ; + (CamlinternalFormatBasics[1], fmtty$6, c) /*<>*/ ; case 10: /*<>*/ fmtty$0 = fmtty$5; break; default: /*<>*/ fmtty$0 = fmtty$5; @@ -15777,23 +15694,23 @@ cst_no = "%no", cst_no$0 = "%#no", cst_nu = "%nu", - _r_ = [0, 103], + r = [0, 103], cst_neg_infinity = "neg_infinity", cst_infinity = "infinity", cst_nan = "nan", - _s_ = [0, cst_camlinternalFormat_ml, 1558, 4], + s = [0, cst_camlinternalFormat_ml, 1558, 4], cst_Printf_bad_conversion = "Printf: bad conversion %[", - _t_ = [0, cst_camlinternalFormat_ml, 1626, 39], - _u_ = [0, cst_camlinternalFormat_ml, 1649, 31], - _v_ = [0, cst_camlinternalFormat_ml, 1650, 31], + t = [0, cst_camlinternalFormat_ml, 1626, 39], + u = [0, cst_camlinternalFormat_ml, 1649, 31], + v = [0, cst_camlinternalFormat_ml, 1650, 31], cst_Printf_bad_conversion$0 = "Printf: bad conversion %_", - _w_ = [0, cst_camlinternalFormat_ml, 1830, 8], - _x_ = [0, 0, 4], - _y_ = + w = [0, cst_camlinternalFormat_ml, 1830, 8], + x = [0, 0, 4], + y = [0, [11, "invalid box description ", [3, 0, 0]], "invalid box description %S"], - _z_ = + z = [0, [11, cst_invalid_format, @@ -15803,7 +15720,7 @@ "invalid format %S: at character number %d, %s"], cst_non_zero_widths_are_unsupp = "non-zero widths are unsupported for %c conversions", - _A_ = + A = [0, [11, cst_invalid_format, @@ -15813,7 +15730,7 @@ cst_at_character_number, [4, 0, 0, 0, [11, ", '", [0, [11, "' without ", [2, 0, 0]]]]]]]], "invalid format %S: at character number %d, '%c' without %s"], - _B_ = + B = [0, [11, cst_invalid_format, @@ -15823,7 +15740,7 @@ cst_at_character_number, [4, 0, 0, 0, [11, cst$44, [2, 0, [11, " expected, read ", [1, 0]]]]]]]], "invalid format %S: at character number %d, %s expected, read %C"], - _C_ = + C = [0, [11, cst_invalid_format, @@ -15834,20 +15751,20 @@ [4, 0, 0, 0, [11, ", duplicate flag ", [1, 0]]]]]], "invalid format %S: at character number %d, duplicate flag %C"], cst_padding = "padding", - _D_ = [0, 1, 0], + D = [0, 1, 0], cst_0 = cst_0$3, - _E_ = [0, 0], + E = [0, 0], cst_precision = cst_precision$3, - _F_ = [1, 0], - _G_ = [1, 1], + F = [1, 0], + G = [1, 1], cst_precision$0 = cst_precision$3, - _H_ = [1, 1], + H = [1, 1], cst_precision$1 = cst_precision$3, cst_0$0 = cst_0$3, - _I_ = [1, 1], + I = [1, 1], cst_0$1 = cst_0$3, cst_0$2 = "'0'", - _J_ = + J = [0, [11, cst_invalid_format, @@ -15861,11 +15778,11 @@ 0, [11, ', invalid conversion "', [12, 37, [0, [12, 34, 0]]]]]]]], 'invalid format %S: at character number %d, invalid conversion "%%%c"'], - _K_ = [0, 0], + K = [0, 0], cst_padding$0 = "`padding'", - _L_ = [0, 0], + L = [0, 0], cst_precision$2 = "`precision'", - _M_ = + M = [0, [11, cst_invalid_format, @@ -15884,11 +15801,11 @@ " is only allowed after the '", [12, 37, [11, "', before padding and precision", 0]]]]]]]]], "invalid format %S: at character number %d, flag %C is only allowed after the '%%', before padding and precision"], - _N_ = [0, [12, 64, 0]], - _O_ = [0, "@ ", 1, 0], - _P_ = [0, "@,", 0, 0], - _Q_ = [2, 60], - _R_ = + N = [0, [12, 64, 0]], + O = [0, "@ ", 1, 0], + P = [0, "@,", 0, 0], + Q = [2, 60], + R = [0, [11, cst_invalid_format, @@ -15906,7 +15823,7 @@ 37, [11, " instead at position ", [4, 0, 0, 0, [12, 46, 0]]]]]]]]]], "invalid format %S: '%%' alone is not accepted in character sets, use %%%% instead at position %d."], - _S_ = + S = [0, [11, cst_invalid_format, @@ -15916,9 +15833,9 @@ ": integer ", [4, 0, 0, 0, [11, " is greater than the limit ", [4, 0, 0, 0, 0]]]]]], "invalid format %S: integer %d is greater than the limit %d"], - _T_ = [0, cst_camlinternalFormat_ml, 2837, 11], + T = [0, cst_camlinternalFormat_ml, 2837, 11], cst_digit = "digit", - _U_ = + U = [0, [11, cst_invalid_format, @@ -15930,10 +15847,10 @@ 'invalid format %S: unclosed sub-format, expected "%%%c" at character number %d'], cst_character = "character ')'", cst_character$0 = "character '}'", - _V_ = [0, cst_camlinternalFormat_ml, 2899, 34], - _W_ = [0, cst_camlinternalFormat_ml, 2935, 28], - _X_ = [0, cst_camlinternalFormat_ml, 2957, 11], - _Y_ = + V = [0, cst_camlinternalFormat_ml, 2899, 34], + W = [0, cst_camlinternalFormat_ml, 2935, 28], + X = [0, cst_camlinternalFormat_ml, 2957, 11], + Y = [0, [11, cst_invalid_format, @@ -15953,11 +15870,11 @@ " is incompatible with '", [0, [11, "' in sub-format ", [3, 0, 0]]]]]]]]]], "invalid format %S: at character number %d, %s is incompatible with '%c' in sub-format %S"], - _Z_ = + Z = [0, [11, cst_bad_input_format_type_mism, [3, 0, [11, cst_and, [3, 0, 0]]]], cst_bad_input_format_type_mism$0], - ___ = + _ = [0, [11, cst_bad_input_format_type_mism, [3, 0, [11, cst_and, [3, 0, 0]]]], cst_bad_input_format_type_mism$0]; @@ -15997,11 +15914,11 @@ /*<>*/ } function type_format(fmt, fmtty){ var - _cA_ = /*<>*/ type_format_gen(fmt, fmtty); - /*<>*/ if(typeof _cA_[2] !== "number") + a = /*<>*/ type_format_gen(fmt, fmtty); + /*<>*/ if(typeof a[2] !== "number") /*<>*/ throw caml_maybe_attach_backtrace (Type_mismatch, 1); - var fmt$0 = /*<>*/ _cA_[1]; + var fmt$0 = /*<>*/ a[1]; /*<>*/ return fmt$0; /*<>*/ } function type_format_gen(fmt, fmtty0){ @@ -16297,7 +16214,7 @@ fmt_rest$13 = fmt[3], sub_fmtty$1 = fmt[2], pad_opt$0 = fmt[1], - _cy_ = + b = /*<>*/ [0, caml_call1(CamlinternalFormatBasics[2], sub_fmtty1)]; /*<>*/ if @@ -16305,7 +16222,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub_fmtty$1)], - _cy_)) + b)) /*<>*/ throw caml_maybe_attach_backtrace (Type_mismatch, 1); var @@ -16494,13 +16411,13 @@ var sub_fmtty$3 = /*<>*/ ign[2], pad_opt$2 = ign[1], - _cz_ = + a = /*<>*/ type_ignored_format_substituti (sub_fmtty$3, rest, fmtty0), - match$43 = /*<>*/ _cz_[2], + match$43 = /*<>*/ a[2], fmtty$21 = match$43[2], fmt$22 = match$43[1], - sub_fmtty$4 = _cz_[1]; + sub_fmtty$4 = a[1]; /*<>*/ return [0, [23, [9, pad_opt$2, sub_fmtty$4], fmt$22], fmtty$21]; @@ -16718,7 +16635,7 @@ sub_fmtty_rest$17 = sub_fmtty[3], sub2_fmtty$2 = sub_fmtty[2], sub1_fmtty$0 = sub_fmtty[1], - _cw_ = + a = /*<>*/ [0, caml_call1(CamlinternalFormatBasics[2], sub1_fmtty)]; /*<>*/ if @@ -16726,11 +16643,11 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub1_fmtty$0)], - _cw_)) + a)) /*<>*/ throw caml_maybe_attach_backtrace (Type_mismatch, 1); var - _cx_ = + b = /*<>*/ [0, caml_call1(CamlinternalFormatBasics[2], sub2_fmtty$1)]; /*<>*/ if @@ -16738,7 +16655,7 @@ ([0, /*<>*/ caml_call1 (CamlinternalFormatBasics[2], sub2_fmtty$2)], - _cx_)) + b)) /*<>*/ throw caml_maybe_attach_backtrace (Type_mismatch, 1); var @@ -16835,11 +16752,11 @@ (Type_mismatch, 1); /*<>*/ } function recast(fmt, fmtty){ - var _cv_ = /*<>*/ symm(fmtty); + var a = /*<>*/ symm(fmtty); /*<>*/ return /*<>*/ type_format (fmt, /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _cv_)) /*<>*/ ; + (CamlinternalFormatBasics[2], a)) /*<>*/ ; } function fix_padding(padty, width, str){ var @@ -16850,10 +16767,10 @@ /*<>*/ if(width$0 <= len) /*<>*/ return str; var - _cu_ = /*<>*/ 2 === padty$0 ? 48 : 32, + a = /*<>*/ 2 === padty$0 ? 48 : 32, res = /*<>*/ caml_call2 - (Stdlib_Bytes[1], width$0, _cu_); + (Stdlib_Bytes[1], width$0, a); /*<>*/ switch(padty$0){ case 0: /*<>*/ caml_call5 @@ -17024,7 +16941,7 @@ var prec$0 = /*<>*/ caml_call1(Stdlib[18], prec), - symb = /*<>*/ char_of_fconv(_r_, fconv), + symb = /*<>*/ char_of_fconv(r, fconv), buf = /*<>*/ buffer_create(16); /*<>*/ buffer_add_char(buf, 37); /*<>*/ bprint_fconv_flag(buf, fconv); @@ -17041,18 +16958,18 @@ /*<>*/ return s; var n = /*<>*/ [0, 0], - _cp_ = + a = /*<>*/ caml_ml_string_length(s) - 1 | 0, - _co_ = 0; - if(_cp_ >= 0){ - var i$0 = _co_; + d = 0; + if(a >= 0){ + var i$0 = d; for(;;){ /*<>*/ if (9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) /*<>*/ n[1]++; - var _ct_ = /*<>*/ i$0 + 1 | 0; - if(_cp_ === i$0) break; - i$0 = _ct_; + var g = /*<>*/ i$0 + 1 | 0; + if(a === i$0) break; + i$0 = g; } } var @@ -17071,11 +16988,11 @@ left = /*<>*/ [0, ((digits - 1 | 0) % 3 | 0) + 1 | 0], - _cr_ = + b = /*<>*/ caml_ml_string_length(s) - 1 | 0, - _cq_ = 0; - if(_cr_ >= 0){ - var i = _cq_; + e = 0; + if(b >= 0){ + var i = e; for(;;){ var c = /*<>*/ caml_string_unsafe_get(s, i); @@ -17089,9 +17006,9 @@ /*<>*/ left[1]--; /*<>*/ put(c); } - var _cs_ = /*<>*/ i + 1 | 0; - if(_cr_ === i) break; - i = _cs_; + var f = /*<>*/ i + 1 | 0; + if(b === i) break; + i = f; } } /*<>*/ return caml_call1 @@ -17100,139 +17017,139 @@ function convert_int(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cn_ = /*<>*/ cst_d$0; break; + var a = /*<>*/ cst_d$0; break; case 2: - var _cn_ = /*<>*/ cst_d$1; break; + var a = /*<>*/ cst_d$1; break; case 4: - var _cn_ = /*<>*/ cst_i$1; break; + var a = /*<>*/ cst_i$1; break; case 5: - var _cn_ = /*<>*/ cst_i$2; break; + var a = /*<>*/ cst_i$2; break; case 6: - var _cn_ = /*<>*/ cst_x; break; + var a = /*<>*/ cst_x; break; case 7: - var _cn_ = /*<>*/ cst_x$0; break; + var a = /*<>*/ cst_x$0; break; case 8: - var _cn_ = /*<>*/ cst_X; break; + var a = /*<>*/ cst_X; break; case 9: - var _cn_ = /*<>*/ cst_X$0; break; + var a = /*<>*/ cst_X$0; break; case 10: - var _cn_ = /*<>*/ cst_o; break; + var a = /*<>*/ cst_o; break; case 11: - var _cn_ = /*<>*/ cst_o$0; break; + var a = /*<>*/ cst_o$0; break; case 0: case 13: - var _cn_ = /*<>*/ cst_d; break; + var a = /*<>*/ cst_d; break; case 3: case 14: - var _cn_ = /*<>*/ cst_i$0; break; - default: var _cn_ = /*<>*/ cst_u; + var a = /*<>*/ cst_i$0; break; + default: var a = /*<>*/ cst_u; } /*<>*/ return /*<>*/ transform_int_alt (iconv, - /*<>*/ caml_format_int(_cn_, n)) /*<>*/ ; + /*<>*/ caml_format_int(a, n)) /*<>*/ ; } function convert_int32(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cm_ = /*<>*/ cst_ld$0; break; + var a = /*<>*/ cst_ld$0; break; case 2: - var _cm_ = /*<>*/ cst_ld$1; break; + var a = /*<>*/ cst_ld$1; break; case 4: - var _cm_ = /*<>*/ cst_li$1; break; + var a = /*<>*/ cst_li$1; break; case 5: - var _cm_ = /*<>*/ cst_li$2; break; + var a = /*<>*/ cst_li$2; break; case 6: - var _cm_ = /*<>*/ cst_lx; break; + var a = /*<>*/ cst_lx; break; case 7: - var _cm_ = /*<>*/ cst_lx$0; break; + var a = /*<>*/ cst_lx$0; break; case 8: - var _cm_ = /*<>*/ cst_lX; break; + var a = /*<>*/ cst_lX; break; case 9: - var _cm_ = /*<>*/ cst_lX$0; break; + var a = /*<>*/ cst_lX$0; break; case 10: - var _cm_ = /*<>*/ cst_lo; break; + var a = /*<>*/ cst_lo; break; case 11: - var _cm_ = /*<>*/ cst_lo$0; break; + var a = /*<>*/ cst_lo$0; break; case 0: case 13: - var _cm_ = /*<>*/ cst_ld; break; + var a = /*<>*/ cst_ld; break; case 3: case 14: - var _cm_ = /*<>*/ cst_li$0; break; - default: var _cm_ = /*<>*/ cst_lu; + var a = /*<>*/ cst_li$0; break; + default: var a = /*<>*/ cst_lu; } /*<>*/ return /*<>*/ transform_int_alt (iconv, - /*<>*/ caml_format_int(_cm_, n)) /*<>*/ ; + /*<>*/ caml_format_int(a, n)) /*<>*/ ; } function convert_nativeint(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _cl_ = /*<>*/ cst_nd$0; break; + var a = /*<>*/ cst_nd$0; break; case 2: - var _cl_ = /*<>*/ cst_nd$1; break; + var a = /*<>*/ cst_nd$1; break; case 4: - var _cl_ = /*<>*/ cst_ni$1; break; + var a = /*<>*/ cst_ni$1; break; case 5: - var _cl_ = /*<>*/ cst_ni$2; break; + var a = /*<>*/ cst_ni$2; break; case 6: - var _cl_ = /*<>*/ cst_nx; break; + var a = /*<>*/ cst_nx; break; case 7: - var _cl_ = /*<>*/ cst_nx$0; break; + var a = /*<>*/ cst_nx$0; break; case 8: - var _cl_ = /*<>*/ cst_nX; break; + var a = /*<>*/ cst_nX; break; case 9: - var _cl_ = /*<>*/ cst_nX$0; break; + var a = /*<>*/ cst_nX$0; break; case 10: - var _cl_ = /*<>*/ cst_no; break; + var a = /*<>*/ cst_no; break; case 11: - var _cl_ = /*<>*/ cst_no$0; break; + var a = /*<>*/ cst_no$0; break; case 0: case 13: - var _cl_ = /*<>*/ cst_nd; break; + var a = /*<>*/ cst_nd; break; case 3: case 14: - var _cl_ = /*<>*/ cst_ni$0; break; - default: var _cl_ = /*<>*/ cst_nu; + var a = /*<>*/ cst_ni$0; break; + default: var a = /*<>*/ cst_nu; } /*<>*/ return /*<>*/ transform_int_alt (iconv, - /*<>*/ caml_format_int(_cl_, n)) /*<>*/ ; + /*<>*/ caml_format_int(a, n)) /*<>*/ ; } function convert_int64(iconv, n){ /*<>*/ switch(iconv){ case 1: - var _ck_ = /*<>*/ cst_Ld$0; break; + var a = /*<>*/ cst_Ld$0; break; case 2: - var _ck_ = /*<>*/ cst_Ld$1; break; + var a = /*<>*/ cst_Ld$1; break; case 4: - var _ck_ = /*<>*/ cst_Li$1; break; + var a = /*<>*/ cst_Li$1; break; case 5: - var _ck_ = /*<>*/ cst_Li$2; break; + var a = /*<>*/ cst_Li$2; break; case 6: - var _ck_ = /*<>*/ cst_Lx; break; + var a = /*<>*/ cst_Lx; break; case 7: - var _ck_ = /*<>*/ cst_Lx$0; break; + var a = /*<>*/ cst_Lx$0; break; case 8: - var _ck_ = /*<>*/ cst_LX; break; + var a = /*<>*/ cst_LX; break; case 9: - var _ck_ = /*<>*/ cst_LX$0; break; + var a = /*<>*/ cst_LX$0; break; case 10: - var _ck_ = /*<>*/ cst_Lo; break; + var a = /*<>*/ cst_Lo; break; case 11: - var _ck_ = /*<>*/ cst_Lo$0; break; + var a = /*<>*/ cst_Lo$0; break; case 0: case 13: - var _ck_ = /*<>*/ cst_Ld; break; + var a = /*<>*/ cst_Ld; break; case 3: case 14: - var _ck_ = /*<>*/ cst_Li$0; break; - default: var _ck_ = /*<>*/ cst_Lu; + var a = /*<>*/ cst_Li$0; break; + default: var a = /*<>*/ cst_Lu; } /*<>*/ return /*<>*/ transform_int_alt (iconv, /*<>*/ runtime.caml_int64_format - (_ck_, n)) /*<>*/ ; + (a, n)) /*<>*/ ; } function convert_float(fconv, prec, x){ function hex(param){ @@ -17266,39 +17183,39 @@ i = /*<>*/ 0; for(;;){ /*<>*/ if(i === len) - var _ch_ = /*<>*/ 0; + var b = /*<>*/ 0; else{ var - _cg_ = + a = /*<>*/ caml_string_get(str, i) - 46 | 0; a: { - /*<>*/ if(23 < _cg_ >>> 0){ - if(55 === _cg_) break a; + /*<>*/ if(23 < a >>> 0){ + if(55 === a) break a; } - else if(21 < _cg_ - 1 >>> 0) break a; + else if(21 < a - 1 >>> 0) break a; var i$0 = /*<>*/ i + 1 | 0; i = i$0; continue; } - var _ch_ = /*<>*/ 1; + var b = /*<>*/ 1; } var - _ci_ = - /*<>*/ _ch_ + c = + /*<>*/ b ? str : /*<>*/ caml_call2 (Stdlib[28], str, cst$17); - /*<>*/ return caml_special_val(_ci_) /*<>*/ ; + /*<>*/ return caml_special_val(c) /*<>*/ ; } case 6: /*<>*/ return hex(0) /*<>*/ ; case 7: - var _cj_ = /*<>*/ hex(0); + var d = /*<>*/ hex(0); /*<>*/ return caml_call1 - (Stdlib_String[26], _cj_) /*<>*/ ; + (Stdlib_String[26], d) /*<>*/ ; case 8: /*<>*/ return /*<>*/ caml_special_val ( /*<>*/ hex(0)) /*<>*/ ; @@ -17572,12 +17489,12 @@ /*<>*/ return function(param){ var fmt = param[1], - _cf_ = /*<>*/ recast(fmt, fmtty); + a = /*<>*/ recast(fmt, fmtty); /*<>*/ return /*<>*/ make_printf (k$0, acc$0, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _cf_, rest$13)) /*<>*/ ;} /*<>*/ ; + (CamlinternalFormatBasics[3], a, rest$13)) /*<>*/ ;} /*<>*/ ; case 15: var rest$14 = /*<>*/ fmt$0[1]; /*<>*/ return function(f, x){ @@ -17604,9 +17521,9 @@ fmt$0 = rest$16; break; case 18: - var _cd_ = /*<>*/ fmt$0[1]; - if(0 === _cd_[0]){ - var rest$17 = fmt$0[2], fmt$1 = _cd_[1][1]; + var a = /*<>*/ fmt$0[1]; + if(0 === a[0]){ + var rest$17 = fmt$0[2], fmt$1 = a[1][1]; let acc = /*<>*/ acc$0, k = k$0, @@ -17624,7 +17541,7 @@ else{ var rest$18 = /*<>*/ fmt$0[2], - fmt$2 = _cd_[1][1]; + fmt$2 = a[1][1]; let acc = /*<>*/ acc$0, k = k$0, @@ -17642,7 +17559,7 @@ break; case 19: /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _s_], 1); + ([0, Assert_failure, s], 1); case 20: var rest$19 = /*<>*/ fmt$0[3], @@ -17683,13 +17600,13 @@ rest$23 = /*<>*/ fmt$0[3], f = fmt$0[2], arity = fmt$0[1], - _ce_ = /*<>*/ caml_call1(f, 0); + b = /*<>*/ caml_call1(f, 0); /*<>*/ if(counter >= 50) return caml_trampoline_return - (make_custom$0, [0, k$0, acc$0, rest$23, arity, _ce_]) /*<>*/ ; + (make_custom$0, [0, k$0, acc$0, rest$23, arity, b]) /*<>*/ ; var counter$0 = /*<>*/ counter + 1 | 0; - return make_custom$0(counter$0, k$0, acc$0, rest$23, arity, _ce_) /*<>*/ ; + return make_custom$0(counter$0, k$0, acc$0, rest$23, arity, b) /*<>*/ ; } } } @@ -17715,7 +17632,7 @@ return make_invalid_arg(counter$1, k, acc, fmt) /*<>*/ ; case 2: /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _t_], 1); + ([0, Assert_failure, t], 1); default: /*<>*/ if(counter >= 50) return caml_trampoline_return(make_invalid_arg, [0, k, acc, fmt]) /*<>*/ ; @@ -17863,7 +17780,7 @@ fmt) /*<>*/ ;} /*<>*/ ; case 10: var rest$9 = /*<>*/ fmtty[1]; - /*<>*/ return function(_cc_, param){ + /*<>*/ return function(a, param){ /*<>*/ return make_from_fmtty (k, acc, rest$9, fmt) /*<>*/ ;} /*<>*/ ; case 11: @@ -17878,10 +17795,10 @@ (k, acc, rest$11, fmt) /*<>*/ ;} /*<>*/ ; case 13: /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _u_], 1); + ([0, Assert_failure, u], 1); default: /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _v_], 1); + ([0, Assert_failure, v], 1); } /*<>*/ if(counter >= 50) return caml_trampoline_return(make_invalid_arg, [0, k, acc, fmt]) /*<>*/ ; @@ -17895,14 +17812,14 @@ } function make_invalid_arg(counter, k, acc, fmt){ var - _cb_ = + a = /*<>*/ [8, acc, cst_Printf_bad_conversion$0]; if(counter >= 50) - return caml_trampoline_return(make_printf$0, [0, k, _cb_, fmt]) /*<>*/ ; + return caml_trampoline_return(make_printf$0, [0, k, a, fmt]) /*<>*/ ; var counter$0 = /*<>*/ counter + 1 | 0; - return make_printf$0(counter$0, k, _cb_, fmt) /*<>*/ ; + return make_printf$0(counter$0, k, a, fmt) /*<>*/ ; } function make_padding(k, acc, fmt, pad, trans){ /*<>*/ if(typeof pad === "number") @@ -18069,11 +17986,11 @@ arity$0, /*<>*/ caml_call1(f, x)) /*<>*/ ;} /*<>*/ ; } - var _ca_ = /*<>*/ [4, acc, f]; + var a = /*<>*/ [4, acc, f]; if(counter >= 50) - return caml_trampoline_return(make_printf$0, [0, k, _ca_, rest]) /*<>*/ ; + return caml_trampoline_return(make_printf$0, [0, k, a, rest]) /*<>*/ ; var counter$0 = /*<>*/ counter + 1 | 0; - return make_printf$0(counter$0, k, _ca_, rest) /*<>*/ ; + return make_printf$0(counter$0, k, a, rest) /*<>*/ ; } function make_custom(k, acc, rest, arity, f){ /*<>*/ return /*<>*/ caml_trampoline @@ -18090,33 +18007,33 @@ var rest = fmt$0[1], x = /*<>*/ make_iprintf(k$0, o, rest); - /*<>*/ return function(_b$_){ + /*<>*/ return function(a){ /*<>*/ return x;} /*<>*/ ; case 1: var rest$0 = /*<>*/ fmt$0[1], x$0 = /*<>*/ make_iprintf(k$0, o, rest$0); - /*<>*/ return function(_b__){ + /*<>*/ return function(a){ /*<>*/ return x$0;} /*<>*/ ; case 2: - var _bM_ = /*<>*/ fmt$0[1]; - if(typeof _bM_ === "number"){ + var b = /*<>*/ fmt$0[1]; + if(typeof b === "number"){ var rest$1 = fmt$0[2], x$1 = /*<>*/ make_iprintf (k$0, o, rest$1); - /*<>*/ return function(_b9_){ + /*<>*/ return function(a){ /*<>*/ return x$1;} /*<>*/ ; } - /*<>*/ if(0 === _bM_[0]){ + /*<>*/ if(0 === b[0]){ var rest$2 = fmt$0[2], x$2 = /*<>*/ make_iprintf (k$0, o, rest$2); - /*<>*/ return function(_b8_){ + /*<>*/ return function(a){ /*<>*/ return x$2;} /*<>*/ ; } var @@ -18124,29 +18041,29 @@ x$3 = /*<>*/ make_iprintf(k$0, o, rest$3), x$4 = - /*<>*/ function(_b7_){ + /*<>*/ function(a){ /*<>*/ return x$3; }; - /*<>*/ return function(_b6_){ + /*<>*/ return function(a){ /*<>*/ return x$4;} /*<>*/ ; case 3: - var _bN_ = /*<>*/ fmt$0[1]; - if(typeof _bN_ === "number"){ + var c = /*<>*/ fmt$0[1]; + if(typeof c === "number"){ var rest$4 = fmt$0[2], x$5 = /*<>*/ make_iprintf (k$0, o, rest$4); - /*<>*/ return function(_b5_){ + /*<>*/ return function(a){ /*<>*/ return x$5;} /*<>*/ ; } - /*<>*/ if(0 === _bN_[0]){ + /*<>*/ if(0 === c[0]){ var rest$5 = fmt$0[2], x$6 = /*<>*/ make_iprintf (k$0, o, rest$5); - /*<>*/ return function(_b4_){ + /*<>*/ return function(a){ /*<>*/ return x$6;} /*<>*/ ; } var @@ -18154,10 +18071,10 @@ x$7 = /*<>*/ make_iprintf(k$0, o, rest$6), x$8 = - /*<>*/ function(_b3_){ + /*<>*/ function(a){ /*<>*/ return x$7; }; - /*<>*/ return function(_b2_){ + /*<>*/ return function(a){ /*<>*/ return x$8;} /*<>*/ ; case 4: var @@ -18195,23 +18112,23 @@ /*<>*/ return fn_of_padding_precision (k$0, o, rest$11, pad$3, prec$3) /*<>*/ ; case 9: - var _bO_ = /*<>*/ fmt$0[1]; - if(typeof _bO_ === "number"){ + var d = /*<>*/ fmt$0[1]; + if(typeof d === "number"){ var rest$12 = fmt$0[2], x$9 = /*<>*/ make_iprintf (k$0, o, rest$12); - /*<>*/ return function(_b1_){ + /*<>*/ return function(a){ /*<>*/ return x$9;} /*<>*/ ; } - /*<>*/ if(0 === _bO_[0]){ + /*<>*/ if(0 === d[0]){ var rest$13 = fmt$0[2], x$10 = /*<>*/ make_iprintf (k$0, o, rest$13); - /*<>*/ return function(_b0_){ + /*<>*/ return function(a){ /*<>*/ return x$10;} /*<>*/ ; } var @@ -18220,10 +18137,10 @@ /*<>*/ make_iprintf (k$0, o, rest$14), x$12 = - /*<>*/ function(_bZ_){ + /*<>*/ function(a){ /*<>*/ return x$11; }; - /*<>*/ return function(_bY_){ + /*<>*/ return function(a){ /*<>*/ return x$12;} /*<>*/ ; case 10: var rest$15 = /*<>*/ fmt$0[1]; @@ -18243,7 +18160,7 @@ x$13 = /*<>*/ make_iprintf (k$0, o, rest$18); - /*<>*/ return function(_bX_){ + /*<>*/ return function(a){ /*<>*/ return x$13;} /*<>*/ ; case 14: var @@ -18252,12 +18169,12 @@ /*<>*/ return function(param){ var fmt = param[1], - _bW_ = /*<>*/ recast(fmt, fmtty); + a = /*<>*/ recast(fmt, fmtty); /*<>*/ return /*<>*/ make_iprintf (k$0, o, /*<>*/ caml_call2 - (CamlinternalFormatBasics[3], _bW_, rest$19)) /*<>*/ ;} /*<>*/ ; + (CamlinternalFormatBasics[3], a, rest$19)) /*<>*/ ;} /*<>*/ ; case 15: var rest$20 = /*<>*/ fmt$0[1], @@ -18265,10 +18182,10 @@ /*<>*/ make_iprintf (k$0, o, rest$20), x$15 = - /*<>*/ function(_bV_){ + /*<>*/ function(a){ /*<>*/ return x$14; }; - /*<>*/ return function(_bU_){ + /*<>*/ return function(a){ /*<>*/ return x$15;} /*<>*/ ; case 16: var @@ -18276,16 +18193,16 @@ x$16 = /*<>*/ make_iprintf (k$0, o, rest$21); - /*<>*/ return function(_bT_){ + /*<>*/ return function(a){ /*<>*/ return x$16;} /*<>*/ ; case 17: var rest$22 = /*<>*/ fmt$0[2]; /*<>*/ fmt$0 = rest$22; break; case 18: - var _bP_ = /*<>*/ fmt$0[1]; - if(0 === _bP_[0]){ - var rest$23 = fmt$0[2], fmt$1 = _bP_[1][1]; + var a = /*<>*/ fmt$0[1]; + if(0 === a[0]){ + var rest$23 = fmt$0[2], fmt$1 = a[1][1]; let k = /*<>*/ k$0, rest = rest$23; var k$1 = @@ -18299,7 +18216,7 @@ else{ var rest$24 = /*<>*/ fmt$0[2], - fmt$2 = _bP_[1][1]; + fmt$2 = a[1][1]; let k = /*<>*/ k$0, rest = rest$24; var k$2 = @@ -18313,14 +18230,14 @@ break; case 19: /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _w_], 1); + ([0, Assert_failure, w], 1); case 20: var rest$25 = /*<>*/ fmt$0[3], x$17 = /*<>*/ make_iprintf (k$0, o, rest$25); - /*<>*/ return function(_bS_){ + /*<>*/ return function(a){ /*<>*/ return x$17;} /*<>*/ ; case 21: var @@ -18328,7 +18245,7 @@ x$18 = /*<>*/ make_iprintf (k$0, o, rest$26); - /*<>*/ return function(_bR_){ + /*<>*/ return function(a){ /*<>*/ return x$18;} /*<>*/ ; case 22: var @@ -18336,7 +18253,7 @@ x$19 = /*<>*/ make_iprintf (k$0, o, rest$27); - /*<>*/ return function(_bQ_){ + /*<>*/ return function(a){ /*<>*/ return x$19;} /*<>*/ ; case 23: var @@ -18372,71 +18289,71 @@ if(typeof prec !== "number"){ var x$2 = /*<>*/ make_iprintf(k, o, fmt); - /*<>*/ return function(_bL_){ + /*<>*/ return function(a){ /*<>*/ return x$2;} /*<>*/ ; } /*<>*/ if(prec){ var x = /*<>*/ make_iprintf(k, o, fmt), x$0 = - /*<>*/ function(_bK_){ + /*<>*/ function(a){ /*<>*/ return x; }; - /*<>*/ return function(_bJ_){ + /*<>*/ return function(a){ /*<>*/ return x$0;} /*<>*/ ; } var x$1 = /*<>*/ make_iprintf(k, o, fmt); - /*<>*/ return function(_bI_){ + /*<>*/ return function(a){ /*<>*/ return x$1;} /*<>*/ ; } /*<>*/ if(0 === pad[0]){ if(typeof prec !== "number"){ var x$6 = /*<>*/ make_iprintf(k, o, fmt); - /*<>*/ return function(_bH_){ + /*<>*/ return function(a){ /*<>*/ return x$6;} /*<>*/ ; } /*<>*/ if(prec){ var x$3 = /*<>*/ make_iprintf(k, o, fmt), x$4 = - /*<>*/ function(_bG_){ + /*<>*/ function(a){ /*<>*/ return x$3; }; - /*<>*/ return function(_bF_){ + /*<>*/ return function(a){ /*<>*/ return x$4;} /*<>*/ ; } var x$5 = /*<>*/ make_iprintf(k, o, fmt); - /*<>*/ return function(_bE_){ + /*<>*/ return function(a){ /*<>*/ return x$5;} /*<>*/ ; } /*<>*/ if(typeof prec !== "number"){ var x$12 = /*<>*/ make_iprintf(k, o, fmt), x$13 = - /*<>*/ function(_bD_){ + /*<>*/ function(a){ /*<>*/ return x$12; }; - /*<>*/ return function(_bC_){ + /*<>*/ return function(a){ /*<>*/ return x$13;} /*<>*/ ; } /*<>*/ if(prec){ var x$7 = /*<>*/ make_iprintf(k, o, fmt), x$8 = - /*<>*/ function(_bB_){ + /*<>*/ function(a){ /*<>*/ return x$7; }, x$9 = - /*<>*/ function(_bA_){ + /*<>*/ function(a){ /*<>*/ return x$8; }; - /*<>*/ return function(_bz_){ + /*<>*/ return function(a){ /*<>*/ return x$9;} /*<>*/ ; } var x$10 = /*<>*/ make_iprintf(k, o, fmt); - function x$11(_by_){ /*<>*/ return x$10;} - /*<>*/ return function(_bx_){ + function x$11(a){ /*<>*/ return x$10;} + /*<>*/ return function(a){ /*<>*/ return x$11;} /*<>*/ ; /*<>*/ } function fn_of_custom_arity$0(counter, k, o, fmt, param){ @@ -18446,7 +18363,7 @@ x = /*<>*/ fn_of_custom_arity (k, o, fmt, arity); - /*<>*/ return function(_bw_){ + /*<>*/ return function(a){ /*<>*/ return x;} /*<>*/ ; } /*<>*/ if(counter >= 50) @@ -18640,9 +18557,9 @@ f = /*<>*/ acc$0[2], p$3 = acc$0[1]; /*<>*/ strput_acc(b, p$3); - var _bv_ = /*<>*/ caml_call1(f, 0); + var a = /*<>*/ caml_call1(f, 0); /*<>*/ return caml_call2 - (Stdlib_Buffer[16], b, _bv_) /*<>*/ ; + (Stdlib_Buffer[16], b, a) /*<>*/ ; case 7: var acc$3 = /*<>*/ acc$0[1]; /*<>*/ acc$0 = acc$3; @@ -18681,21 +18598,21 @@ function k(acc){ /*<>*/ strput_acc(buf, acc); var - _bu_ = + a = /*<>*/ caml_call1 (Stdlib_Buffer[2], buf); - /*<>*/ return caml_call1(Stdlib[2], _bu_); + /*<>*/ return caml_call1(Stdlib[2], a); } /*<>*/ return make_printf(k, 0, fmt) /*<>*/ ; } function open_box_of_string(str){ /*<>*/ if(str === cst$43) - /*<>*/ return _x_; + /*<>*/ return x; var len = /*<>*/ caml_ml_string_length(str); function invalid_box(param){ /*<>*/ return caml_call1 - (failwith_message(_y_), str) /*<>*/ ; + (failwith_message(y), str) /*<>*/ ; } function parse_spaces(i){ var i$0 = /*<>*/ i; @@ -18753,15 +18670,15 @@ else /*<>*/ try{ var - _bs_ = + b = /*<>*/ /*<>*/ runtime.caml_int_of_string ( /*<>*/ caml_call3 (Stdlib_String[16], str, nstart, nend - nstart | 0)), - indent = _bs_; + indent = b; } - catch(_bt_){ - var _br_ = /*<>*/ caml_wrap_exception(_bt_); - if(_br_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_br_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(a, 0); var indent = /*<>*/ /*<>*/ invalid_box @@ -18836,15 +18753,15 @@ var legacy_behavior$0 = /*<>*/ 1; function invalid_format_message(str_ind, msg){ /*<>*/ return caml_call3 - (failwith_message(_z_), str, str_ind, msg) /*<>*/ ; + (failwith_message(z), str, str_ind, msg) /*<>*/ ; } function invalid_format_without(str_ind, c, s){ /*<>*/ return caml_call4 - (failwith_message(_A_), str, str_ind, c, s) /*<>*/ ; + (failwith_message(A), str, str_ind, c, s) /*<>*/ ; } function expected_character(str_ind, expected, read){ /*<>*/ return caml_call4 - (failwith_message(_B_), str, str_ind, expected, read) /*<>*/ ; + (failwith_message(B), str, str_ind, expected, read) /*<>*/ ; } function parse(lit_start, end_ind){ a: @@ -18881,7 +18798,7 @@ var str_ind$0 = /*<>*/ str_ind + 1 | 0; a: if(str_ind$0 === end_ind) - var match$0 = /*<>*/ _N_; + var match$0 = /*<>*/ N; else{ var c = @@ -18950,7 +18867,7 @@ (str_ind$0 + 1 | 0, end_ind) [1], match$0 = - /*<>*/ [0, [17, _O_, fmt_rest$5]]; + /*<>*/ [0, [17, O, fmt_rest$5]]; break a; case 5: /*<>*/ if @@ -18983,7 +18900,7 @@ (str_ind$0 + 1 | 0, end_ind) [1], match$0 = - /*<>*/ [0, [17, _P_, fmt_rest$8]]; + /*<>*/ [0, [17, P, fmt_rest$8]]; break a; case 14: var @@ -19001,9 +18918,9 @@ b: try{ var - _bg_ = str_ind$3 === end_ind ? 1 : 0, - _bh_ = - _bg_ + g = str_ind$3 === end_ind ? 1 : 0, + h = + g || (60 !== @@ -19011,7 +18928,7 @@ (str, str_ind$3) ? 1 : 0); - if(_bh_) + if(h) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[8], 1); var @@ -19053,10 +18970,10 @@ str, str_ind$3 - 2 | 0, (str_ind_3 - str_ind$3 | 0) + 3 | 0), - _bi_ = /*<>*/ [0, s, width, 0], - _bj_ = str_ind_3 + 1 | 0, - formatting_lit$0 = _bi_, - next_ind = _bj_; + i = /*<>*/ [0, s, width, 0], + j = str_ind_3 + 1 | 0, + formatting_lit$0 = i, + next_ind = j; break b; } } @@ -19081,20 +18998,20 @@ str, str_ind$3 - 2 | 0, (str_ind_5 - str_ind$3 | 0) + 3 | 0), - _bk_ = + k = /*<>*/ [0, s$0, width, offset], - _bl_ = str_ind_5 + 1 | 0, - formatting_lit$0 = _bk_, - next_ind = _bl_; + l = str_ind_5 + 1 | 0, + formatting_lit$0 = k, + next_ind = l; break b; } /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[8], 1); } - catch(_bq_){ - var _bf_ = /*<>*/ caml_wrap_exception(_bq_); - if(_bf_ !== Stdlib[8] && _bf_[1] !== Stdlib[7]) - throw caml_maybe_attach_backtrace(_bf_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a !== Stdlib[8] && a[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(a, 0); var formatting_lit$0 = /*<>*/ formatting_lit, @@ -19128,7 +19045,7 @@ if(58 > match$6) break c; } else if(45 === match$6) break c; - var _bo_ = /*<>*/ 0; + var f = /*<>*/ 0; break b; } var @@ -19151,28 +19068,28 @@ str, str_ind$4 - 2 | 0, (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), - _bo_ = + f = /*<>*/ [0, [0, str_ind_3$0 + 1 | 0, [1, s$1, size]]]; } - var _bn_ = _bo_; + var d = 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; + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b !== Stdlib[8] && b[1] !== Stdlib[7]) + throw caml_maybe_attach_backtrace(b, 0); + var d = /*<>*/ 0; } - /*<>*/ if(_bn_) + /*<>*/ if(d) var - match$5 = _bn_[1], + match$5 = d[1], formatting_lit$1 = match$5[2], next_ind$0 = match$5[1], fmt_rest$13 = /*<>*/ parse (next_ind$0, end_ind) [1], - _be_ = + e = /*<>*/ [0, [17, formatting_lit$1, fmt_rest$13]]; else @@ -19181,10 +19098,9 @@ /*<>*/ parse (str_ind$4, end_ind) [1], - _be_ = - /*<>*/ [0, - [17, _Q_, fmt_rest$14]]; - var match$0 = /*<>*/ _be_; + e = + /*<>*/ [0, [17, Q, fmt_rest$14]]; + var match$0 = /*<>*/ e; break a; case 31: var @@ -19227,14 +19143,14 @@ hash = [0, 0]; function set_flag(str_ind, flag){ var - _bb_ = /*<>*/ flag[1], - _bc_ = _bb_ ? 1 - legacy_behavior$0 : _bb_; - if(_bc_){ + a = /*<>*/ flag[1], + b = a ? 1 - legacy_behavior$0 : a; + if(b){ var - _bd_ = + c = /*<>*/ caml_string_get(str, str_ind); /*<>*/ caml_call3 - (failwith_message(_C_), str, str_ind, _bd_); + (failwith_message(C), str, str_ind, c); } /*<>*/ flag[1] = 1; /*<>*/ } @@ -19383,7 +19299,7 @@ hash$0, space$0, ign, - _D_) /*<>*/ ; + D) /*<>*/ ; } } function parse_after_padding @@ -19456,9 +19372,9 @@ case 3: /*<>*/ if(legacy_behavior$0){ var - _ba_ = /*<>*/ str_ind$0 + 1 | 0, + a = /*<>*/ str_ind$0 + 1 | 0, minus$0 = minus || (45 === symb$0 ? 1 : 0); - return parse_literal(minus$0, _ba_) /*<>*/ ; + return parse_literal(minus$0, a) /*<>*/ ; } break; } @@ -19473,7 +19389,7 @@ space, ign, pad, - _E_) + E) : /*<>*/ invalid_format_without (str_ind$0 - 1 | 0, 46, cst_precision) /*<>*/ ; } @@ -19504,12 +19420,12 @@ /*<>*/ return parse_conv(0) /*<>*/ ; /*<>*/ if(minus){ if(typeof prec === "number") - /*<>*/ return parse_conv(_F_) /*<>*/ ; + /*<>*/ return parse_conv(F) /*<>*/ ; var n = /*<>*/ prec[1]; /*<>*/ return parse_conv([0, 0, n]) /*<>*/ ; } /*<>*/ if(typeof prec === "number") - /*<>*/ return parse_conv(_G_) /*<>*/ ; + /*<>*/ return parse_conv(G) /*<>*/ ; var n$0 = /*<>*/ prec[1]; /*<>*/ return parse_conv([0, 1, n$0]) /*<>*/ ; } @@ -19572,7 +19488,7 @@ /*<>*/ if(0 !== pad[0]) return 2 <= pad[1] ? legacy_behavior$0 - ? _H_ + ? H : /*<>*/ incompatible_flag (pct_ind, str_ind, 48, cst_precision$1) : pad /*<>*/ ; @@ -19590,7 +19506,7 @@ /*<>*/ if(0 !== pad[0]) return 2 <= pad[1] ? legacy_behavior$0 - ? _I_ + ? I : /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst_0$1) : pad /*<>*/ ; @@ -19664,18 +19580,18 @@ /*<>*/ [9, get_pad_opt(95), sub_fmtty], - _aJ_ = + n = /*<>*/ [0, [23, ignored$2, fmt_rest$7]]; else var - _aJ_ = + n = /*<>*/ [0, [14, /*<>*/ get_pad_opt(40), sub_fmtty, fmt_rest$7]]; - var fmt_result = /*<>*/ _aJ_; + var fmt_result = /*<>*/ n; break a; case 44: var @@ -19687,11 +19603,11 @@ var fmt_rest$10 = /*<>*/ parse(str_ind, end_ind)[1], - _aL_ = + _ = /*<>*/ get_ign(0) ? [0, [23, 1, fmt_rest$10]] : [0, [1, fmt_rest$10]], - fmt_result = /*<>*/ _aL_; + fmt_result = /*<>*/ _; break a; case 78: var @@ -19701,15 +19617,15 @@ /*<>*/ if(get_ign(0)) var ignored$6 = /*<>*/ [11, counter$0], - _aR_ = + t = /*<>*/ [0, [23, ignored$6, fmt_rest$14]]; else var - _aR_ = + t = /*<>*/ [0, [21, counter$0, fmt_rest$14]]; - var fmt_result = /*<>*/ _aR_; + var fmt_result = /*<>*/ t; break a; case 83: var @@ -19722,7 +19638,7 @@ var ignored$7 = /*<>*/ [1, get_padprec_opt(95)], - _aS_ = + u = /*<>*/ [0, [23, ignored$7, fmt_rest$15]]; else @@ -19732,10 +19648,10 @@ (pad$6, fmt_rest$15), fmt_rest$16 = /*<>*/ match$5[2], pad$7 = match$5[1], - _aS_ = + u = /*<>*/ [0, [3, pad$7, fmt_rest$16]]; - var fmt_result = /*<>*/ _aS_; + var fmt_result = /*<>*/ u; break a; case 91: /*<>*/ if(str_ind === end_ind) @@ -19753,16 +19669,16 @@ (char_set, /*<>*/ caml_call1 (Stdlib[29], i)); - var _a$_ = /*<>*/ i + 1 | 0; + var a = /*<>*/ i + 1 | 0; if(c === i) break; - i = _a$_; + i = a; } } /*<>*/ }, fail_single_percent = /*<>*/ function(str_ind){ /*<>*/ return caml_call2 - (failwith_message(_R_), str, str_ind) /*<>*/ ; + (failwith_message(R), str, str_ind) /*<>*/ ; }, parse_char_set_content = /*<>*/ function @@ -19781,16 +19697,14 @@ /*<>*/ return str_ind$0 + 1 | 0; var - _a__ = - /*<>*/ str_ind$0 + 1 | 0; + a = /*<>*/ str_ind$0 + 1 | 0; if(counter >= 50) return caml_trampoline_return - (parse_char_set_after_char$0, [0, _a__, end_ind, c]) /*<>*/ ; + (parse_char_set_after_char$0, [0, a, end_ind, c]) /*<>*/ ; var counter$0 = /*<>*/ counter + 1 | 0; - return parse_char_set_after_char$0 - (counter$0, _a__, end_ind, c) /*<>*/ ; + return parse_char_set_after_char$0(counter$0, a, end_ind, c) /*<>*/ ; } /*<>*/ add_in_char_set (char_set, 45); @@ -19853,15 +19767,14 @@ (str_ind$2) /*<>*/ ; /*<>*/ add_range(c$0, c$3); var - _a8_ = - /*<>*/ str_ind$2 + 2 | 0; + b = /*<>*/ str_ind$2 + 2 | 0; if(counter >= 50) return caml_trampoline_return - (parse_char_set_content, [0, _a8_, end_ind]) /*<>*/ ; + (parse_char_set_content, [0, b, end_ind]) /*<>*/ ; var counter$1 = /*<>*/ counter + 1 | 0; - return parse_char_set_content(counter$1, _a8_, end_ind) /*<>*/ ; + return parse_char_set_content(counter$1, b, end_ind) /*<>*/ ; } /*<>*/ if(93 === c$2){ /*<>*/ add_in_char_set @@ -19872,29 +19785,27 @@ } /*<>*/ add_range(c$0, c$2); var - _a9_ = - /*<>*/ str_ind$2 + 1 | 0; + d = /*<>*/ str_ind$2 + 1 | 0; if(counter >= 50) return caml_trampoline_return - (parse_char_set_content, [0, _a9_, end_ind]) /*<>*/ ; + (parse_char_set_content, [0, d, end_ind]) /*<>*/ ; var counter$0 = /*<>*/ counter + 1 | 0; - return parse_char_set_content(counter$0, _a9_, end_ind) /*<>*/ ; + return parse_char_set_content(counter$0, d, end_ind) /*<>*/ ; } /*<>*/ if(37 === c$0){ /*<>*/ add_in_char_set (char_set, c$1); var - _a7_ = - /*<>*/ str_ind$0 + 1 | 0; + a = /*<>*/ str_ind$0 + 1 | 0; if(counter >= 50) return caml_trampoline_return - (parse_char_set_content, [0, _a7_, end_ind]) /*<>*/ ; + (parse_char_set_content, [0, a, end_ind]) /*<>*/ ; var counter$2 = /*<>*/ counter + 1 | 0; - return parse_char_set_content(counter$2, _a7_, end_ind) /*<>*/ ; + return parse_char_set_content(counter$2, a, end_ind) /*<>*/ ; } } /*<>*/ if(37 === c$0) @@ -19955,18 +19866,18 @@ /*<>*/ [10, get_pad_opt(95), char_set$1], - _aX_ = + w = /*<>*/ [0, [23, ignored$9, fmt_rest$19]]; else var - _aX_ = + w = /*<>*/ [0, [20, /*<>*/ get_pad_opt(91), char_set$1, fmt_rest$19]]; - var fmt_result = /*<>*/ _aX_; + var fmt_result = /*<>*/ w; break a; case 97: var @@ -19989,37 +19900,37 @@ /*<>*/ if(match$7){ if(0 === match$7[1]) var - _aY_ = + ad = /*<>*/ get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], - _aZ_ = /*<>*/ _aY_; + x = /*<>*/ ad; else var - _aZ_ = + x = /*<>*/ legacy_behavior$0 ? /*<>*/ char_format (fmt_rest$21) : /*<>*/ invalid_format_message (str_ind, cst_non_zero_widths_are_unsupp); - var _a0_ = /*<>*/ _aZ_; + var y = /*<>*/ x; } else var - _a0_ = + y = /*<>*/ /*<>*/ char_format (fmt_rest$21); - var fmt_result = /*<>*/ _a0_; + var fmt_result = /*<>*/ y; break a; case 114: var fmt_rest$22 = /*<>*/ parse(str_ind, end_ind)[1], - _a1_ = + ae = /*<>*/ get_ign(0) ? [0, [23, 2, fmt_rest$22]] : [0, [19, fmt_rest$22]], - fmt_result = /*<>*/ _a1_; + fmt_result = /*<>*/ ae; break a; case 115: var @@ -20032,7 +19943,7 @@ var ignored$10 = /*<>*/ [0, get_padprec_opt(95)], - _a2_ = + z = /*<>*/ [0, [23, ignored$10, fmt_rest$23]]; else @@ -20042,10 +19953,10 @@ (pad$9, fmt_rest$23), fmt_rest$24 = /*<>*/ match$8[2], pad$10 = match$8[1], - _a2_ = + z = /*<>*/ [0, [2, pad$10, fmt_rest$24]]; - var fmt_result = /*<>*/ _a2_; + var fmt_result = /*<>*/ z; break a; case 116: var @@ -20074,18 +19985,18 @@ /*<>*/ [8, get_pad_opt(95), sub_fmtty$0], - _a3_ = + A = /*<>*/ [0, [23, ignored$11, fmt_rest$26]]; else var - _a3_ = + A = /*<>*/ [0, [13, /*<>*/ get_pad_opt(123), sub_fmtty$0, fmt_rest$26]]; - var fmt_result = /*<>*/ _a3_; + var fmt_result = /*<>*/ A; break a; case 66: case 98: @@ -20099,7 +20010,7 @@ var ignored$3 = /*<>*/ [7, get_padprec_opt(95)], - _aK_ = + o = /*<>*/ [0, [23, ignored$3, fmt_rest$8]]; else @@ -20109,10 +20020,10 @@ (pad$3, fmt_rest$8), fmt_rest$9 = /*<>*/ match$3[2], pad$4 = match$3[1], - _aK_ = + o = /*<>*/ [0, [9, pad$4, fmt_rest$9]]; - var fmt_result = /*<>*/ _aK_; + var fmt_result = /*<>*/ o; break a; case 37: case 64: @@ -20130,22 +20041,22 @@ symb$0 = /*<>*/ caml_string_get (str, str_ind), - _a4_ = /*<>*/ symb$0 - 88 | 0; + B = /*<>*/ symb$0 - 88 | 0; b: { - if(32 >= _a4_ >>> 0) - switch(_a4_){ + if(32 >= B >>> 0) + switch(B){ case 0: case 12: case 17: case 23: case 29: case 32: - var _aQ_ = /*<>*/ 1; break b; + var s = /*<>*/ 1; break b; } - var _aQ_ = /*<>*/ 0; + var s = /*<>*/ 0; } - /*<>*/ if(_aQ_) break; + /*<>*/ if(s) break; } var fmt_rest$13 = @@ -20169,20 +20080,20 @@ break b; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _V_], 1); + ([0, Assert_failure, V], 1); } /*<>*/ if(get_ign(0)) var ignored$5 = /*<>*/ [11, counter], - _aP_ = + r = /*<>*/ [0, [23, ignored$5, fmt_rest$13]]; else var - _aP_ = + r = /*<>*/ [0, [21, counter, fmt_rest$13]]; - var fmt_result = /*<>*/ _aP_; + var fmt_result = /*<>*/ r; break a; case 32: case 35: @@ -20192,7 +20103,7 @@ var fmt_result = /*<>*/ /*<>*/ caml_call3 - (failwith_message(_M_), str, pct_ind, symb); + (failwith_message(M), str, pct_ind, symb); break a; case 88: case 100: @@ -20201,15 +20112,15 @@ case 117: case 120: var - _aT_ = /*<>*/ get_space(0), - _aU_ = /*<>*/ get_hash(0), + aa = /*<>*/ get_space(0), + ab = /*<>*/ get_hash(0), iconv$2 = /*<>*/ /*<>*/ compute_int_conv (pct_ind, str_ind, /*<>*/ get_plus(0), - _aU_, - _aT_, + ab, + aa, symb), fmt_rest$17 = /*<>*/ parse(str_ind, end_ind)[1]; @@ -20219,24 +20130,24 @@ /*<>*/ [2, iconv$2, get_pad_opt(95)], - _aV_ = + v = /*<>*/ [0, [23, ignored$8, fmt_rest$17]]; else var - _aW_ = /*<>*/ get_prec(0), + ac = /*<>*/ get_prec(0), match$6 = /*<>*/ /*<>*/ make_padprec_fmt_ebb ( /*<>*/ get_int_pad(0), - _aW_, + ac, fmt_rest$17), fmt_rest$18 = /*<>*/ match$6[3], prec$4 = match$6[2], pad$8 = match$6[1], - _aV_ = + v = /*<>*/ [0, [4, iconv$2, pad$8, prec$4, fmt_rest$18]]; - var fmt_result = /*<>*/ _aV_; + var fmt_result = /*<>*/ v; break a; case 69: case 70: @@ -20268,28 +20179,28 @@ if(3 >= switcher >>> 0){ switch(switcher){ case 0: - var _a5_ = /*<>*/ 1; break; + var a = /*<>*/ 1; break; case 1: - var _a5_ = /*<>*/ 0; break; + var a = /*<>*/ 0; break; case 2: - var _a5_ = /*<>*/ 3; break; - default: var _a5_ = /*<>*/ 6; + var a = /*<>*/ 3; break; + default: var a = /*<>*/ 6; } - var kind = /*<>*/ _a5_; + var kind = /*<>*/ a; break b; } } else if(69 <= symb){ switch(symb - 69 | 0){ case 0: - var _a6_ = /*<>*/ 2; break; + var b = /*<>*/ 2; break; case 1: break c; case 2: - var _a6_ = /*<>*/ 4; break; - default: var _a6_ = /*<>*/ 7; + var b = /*<>*/ 4; break; + default: var b = /*<>*/ 7; } - var kind = /*<>*/ _a6_; + var kind = /*<>*/ b; break b; } if(hash$1){ @@ -20303,7 +20214,7 @@ break b; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _X_], 1); + ([0, Assert_failure, X], 1); } var fconv = /*<>*/ [0, flag, kind], @@ -20314,7 +20225,7 @@ /*<>*/ if (typeof match === "number") var - _aM_ = + p = match ? /*<>*/ incompatible_flag (pct_ind, str_ind, 95, cst$26) @@ -20322,31 +20233,29 @@ else var ndec = /*<>*/ match[1], - _aM_ = /*<>*/ [0, ndec]; + p = /*<>*/ [0, ndec]; var ignored$4 = - /*<>*/ [6, - get_pad_opt(95), - _aM_], - _aN_ = + /*<>*/ [6, get_pad_opt(95), p], + q = /*<>*/ [0, [23, ignored$4, fmt_rest$11]]; } else var - _aO_ = /*<>*/ get_prec(0), + $ = /*<>*/ get_prec(0), match$4 = /*<>*/ /*<>*/ make_padprec_fmt_ebb ( /*<>*/ get_pad(0), - _aO_, + $, fmt_rest$11), fmt_rest$12 = /*<>*/ match$4[3], prec$3 = match$4[2], pad$5 = match$4[1], - _aN_ = + q = /*<>*/ [0, [8, fconv, pad$5, prec$3, fmt_rest$12]]; - var fmt_result = /*<>*/ _aN_; + var fmt_result = /*<>*/ q; break a; } b: @@ -20355,19 +20264,19 @@ switch(symb - 108 | 0){ case 0: var - _at_ = + F = /*<>*/ caml_string_get (str, str_ind), - _au_ = /*<>*/ get_space(0), - _av_ = /*<>*/ get_hash(0), + G = /*<>*/ get_space(0), + N = /*<>*/ get_hash(0), iconv = /*<>*/ /*<>*/ compute_int_conv (pct_ind, str_ind + 1 | 0, /*<>*/ get_plus(0), - _av_, - _au_, - _at_), + N, + G, + F), fmt_rest = /*<>*/ parse (str_ind + 1 | 0, end_ind) @@ -20378,42 +20287,42 @@ /*<>*/ [3, iconv, get_pad_opt(95)], - _aw_ = + j = /*<>*/ [0, [23, ignored, fmt_rest]]; else var - _ay_ = /*<>*/ get_prec(0), + O = /*<>*/ get_prec(0), match$0 = /*<>*/ /*<>*/ make_padprec_fmt_ebb ( /*<>*/ get_int_pad(0), - _ay_, + O, fmt_rest), fmt_rest$0 = /*<>*/ match$0[3], prec$0 = match$0[2], pad$0 = match$0[1], - _aw_ = + j = /*<>*/ [0, [5, iconv, pad$0, prec$0, fmt_rest$0]]; - var _ax_ = /*<>*/ _aw_; + var k = /*<>*/ j; break; case 1: break b; default: var - _az_ = + P = /*<>*/ caml_string_get (str, str_ind), - _aA_ = /*<>*/ get_space(0), - _aB_ = /*<>*/ get_hash(0), + Q = /*<>*/ get_space(0), + S = /*<>*/ get_hash(0), iconv$0 = /*<>*/ /*<>*/ compute_int_conv (pct_ind, str_ind + 1 | 0, /*<>*/ get_plus(0), - _aB_, - _aA_, - _az_), + S, + Q, + P), fmt_rest$1 = /*<>*/ parse (str_ind + 1 | 0, end_ind) @@ -20424,43 +20333,43 @@ /*<>*/ [4, iconv$0, get_pad_opt(95)], - _aC_ = + l = /*<>*/ [0, [23, ignored$0, fmt_rest$1]]; else var - _aD_ = /*<>*/ get_prec(0), + T = /*<>*/ get_prec(0), match$1 = /*<>*/ /*<>*/ make_padprec_fmt_ebb ( /*<>*/ get_int_pad(0), - _aD_, + T, fmt_rest$1), fmt_rest$2 = /*<>*/ match$1[3], prec$1 = match$1[2], pad$1 = match$1[1], - _aC_ = + l = /*<>*/ [0, [6, iconv$0, pad$1, prec$1, fmt_rest$2]]; - var _ax_ = /*<>*/ _aC_; + var k = /*<>*/ l; } - var fmt_result = /*<>*/ _ax_; + var fmt_result = /*<>*/ k; break a; } } else if(76 === symb){ var - _aE_ = + U = /*<>*/ caml_string_get(str, str_ind), - _aF_ = /*<>*/ get_space(0), - _aG_ = /*<>*/ get_hash(0), + W = /*<>*/ get_space(0), + Y = /*<>*/ get_hash(0), iconv$1 = /*<>*/ /*<>*/ compute_int_conv (pct_ind, str_ind + 1 | 0, /*<>*/ get_plus(0), - _aG_, - _aF_, - _aE_), + Y, + W, + U), fmt_rest$3 = /*<>*/ parse (str_ind + 1 | 0, end_ind) @@ -20471,70 +20380,68 @@ /*<>*/ [5, iconv$1, get_pad_opt(95)], - _aH_ = + m = /*<>*/ [0, [23, ignored$1, fmt_rest$3]]; else var - _aI_ = /*<>*/ get_prec(0), + Z = /*<>*/ get_prec(0), match$2 = /*<>*/ /*<>*/ make_padprec_fmt_ebb ( /*<>*/ get_int_pad(0), - _aI_, + Z, fmt_rest$3), fmt_rest$4 = /*<>*/ match$2[3], prec$2 = match$2[2], pad$2 = match$2[1], - _aH_ = + m = /*<>*/ [0, [7, iconv$1, pad$2, prec$2, fmt_rest$4]]; - var fmt_result = /*<>*/ _aH_; + var fmt_result = /*<>*/ m; break a; } var fmt_result = /*<>*/ /*<>*/ caml_call3 - (failwith_message(_J_), str, str_ind - 1 | 0, symb); + (failwith_message(J), str, str_ind - 1 | 0, symb); } /*<>*/ if(1 - legacy_behavior$0){ var - _ak_ = /*<>*/ 1 - plus_used[1], - plus$0 = _ak_ ? plus : _ak_; + d = /*<>*/ 1 - plus_used[1], + plus$0 = d ? plus : d; if(plus$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$27); var - _al_ = /*<>*/ 1 - hash_used[1], - hash$0 = _al_ ? hash : _al_; + e = /*<>*/ 1 - hash_used[1], + hash$0 = e ? hash : e; if(hash$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$28); var - _am_ = /*<>*/ 1 - space_used[1], - space$0 = _am_ ? space : _am_; + f = /*<>*/ 1 - space_used[1], + space$0 = f ? space : f; if(space$0) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst$29); var - _an_ = /*<>*/ 1 - pad_used[1], - _ao_ = - _an_ - ? /*<>*/ caml_notequal - ([0, pad], _K_) - : _an_; - /*<>*/ if(_ao_) + g = /*<>*/ 1 - pad_used[1], + C = + g + ? /*<>*/ caml_notequal([0, pad], K) + : g; + /*<>*/ if(C) /*<>*/ incompatible_flag (pct_ind, str_ind, symb, cst_padding$0); var - _ap_ = /*<>*/ 1 - prec_used[1], - _aq_ = - _ap_ - ? /*<>*/ caml_notequal - ([0, prec], _L_) - : _ap_; - /*<>*/ if(_aq_){ - var _ar_ = /*<>*/ ign ? 95 : symb; - incompatible_flag(pct_ind, str_ind, _ar_, cst_precision$2); + h = /*<>*/ 1 - prec_used[1], + D = + h + ? /*<>*/ caml_notequal([0, prec], L) + : h; + /*<>*/ if(D){ + var E = /*<>*/ ign ? 95 : symb; + incompatible_flag(pct_ind, str_ind, E, cst_precision$2); } var plus$1 = /*<>*/ ign ? plus : ign; if(plus$1) @@ -20542,8 +20449,8 @@ (pct_ind, str_ind, 95, cst$30); } var - _as_ = /*<>*/ 1 - ign_used[1], - ign$0 = _as_ ? ign : _as_; + i = /*<>*/ 1 - ign_used[1], + ign$0 = i ? ign : i; a: if(ign$0){ b: @@ -20589,14 +20496,14 @@ /*<>*/ is_open_tag ? [0, sub_format$0] : [1, sub_format$0], - _ai_ = + b = /*<>*/ [0, [18, formatting$0, fmt_rest$0]]; - return _ai_; + return b; } - catch(_aj_){ - var _ah_ = /*<>*/ caml_wrap_exception(_aj_); - if(_ah_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ah_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a !== Stdlib[8]) throw caml_maybe_attach_backtrace(a, 0); var fmt_rest = /*<>*/ parse(str_ind, end_ind)[1], @@ -20641,8 +20548,8 @@ /*<>*/ (acc$0 * 10 | 0) + (c - 48 | 0) | 0; /*<>*/ if(Stdlib_Sys[12] < new_acc){ - var _ag_ = /*<>*/ Stdlib_Sys[12]; - return caml_call3(failwith_message(_S_), str, new_acc, _ag_) /*<>*/ ; + var a = /*<>*/ Stdlib_Sys[12]; + return caml_call3(failwith_message(S), str, new_acc, a) /*<>*/ ; } var str_ind$1 = /*<>*/ str_ind$0 + 1 | 0; str_ind$0 = str_ind$1; @@ -20681,7 +20588,7 @@ /*<>*/ return [0, next_ind, - n | 0]; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _T_], 1); + ([0, Assert_failure, T], 1); /*<>*/ } function add_literal(lit_start, str_ind, fmt){ var @@ -20706,7 +20613,7 @@ for(;;){ if(str_ind$0 === end_ind) /*<>*/ caml_call3 - (failwith_message(_U_), str, c, end_ind); + (failwith_message(U), str, c, end_ind); /*<>*/ if (37 === caml_string_get(str, str_ind$0)){ /*<>*/ if @@ -20902,7 +20809,7 @@ else{ /*<>*/ if(! space$0) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _W_], 1); + ([0, Assert_failure, W], 1); /*<>*/ if(! legacy_behavior$0) /*<>*/ return incompatible_flag (pct_ind, str_ind, symb, cst$34) /*<>*/ ; @@ -20916,7 +20823,7 @@ /*<>*/ caml_call3 (Stdlib_String[16], str, pct_ind, str_ind - pct_ind | 0); /*<>*/ return caml_call5 - (failwith_message(_Y_), str, pct_ind, option, symb, subfmt) /*<>*/ ; + (failwith_message(Y), str, pct_ind, option, symb, subfmt) /*<>*/ ; } /*<>*/ return parse (0, caml_ml_string_length(str)); @@ -20926,18 +20833,18 @@ fmt = /*<>*/ fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ var - _ae_ = + c = /*<>*/ [0, type_format(fmt, fmtty), str]; - return _ae_; + return c; } - catch(_af_){ - var _ac_ = /*<>*/ caml_wrap_exception(_af_); - if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); - var _ad_ = /*<>*/ string_of_fmtty(fmtty); + catch(c){ + var a = /*<>*/ caml_wrap_exception(c); + if(a !== Type_mismatch) throw caml_maybe_attach_backtrace(a, 0); + var b = /*<>*/ string_of_fmtty(fmtty); /*<>*/ return caml_call2 - (failwith_message(_Z_), str, _ad_); + (failwith_message(Z), str, b); } } function format_of_string_format(str, param){ @@ -20948,19 +20855,19 @@ /*<>*/ fmt_ebb_of_string(0, str)[1]; /*<>*/ try{ var - _aa_ = + b = /*<>*/ [0, /*<>*/ type_format (fmt$0, /*<>*/ fmtty_of_fmt(fmt)), str]; - return _aa_; + return b; } - catch(_ab_){ - var _$_ = /*<>*/ caml_wrap_exception(_ab_); - if(_$_ === Type_mismatch) + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Type_mismatch) /*<>*/ return caml_call2 - (failwith_message(___), str, str$0) /*<>*/ ; - /*<>*/ throw caml_maybe_attach_backtrace(_$_, 0); + (failwith_message(_), str, str$0) /*<>*/ ; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } var @@ -21051,19 +20958,19 @@ } function fprintf(oc, fmt){ /*<>*/ return kfprintf - (function(_d_){ /*<>*/ return 0;}, oc, fmt) /*<>*/ ; + (function(a){ /*<>*/ return 0;}, oc, fmt) /*<>*/ ; } function bprintf(b, fmt){ /*<>*/ return kbprintf - (function(_c_){ /*<>*/ return 0;}, b, fmt) /*<>*/ ; + (function(a){ /*<>*/ return 0;}, b, fmt) /*<>*/ ; } function ifprintf(oc, fmt){ /*<>*/ return ikfprintf - (function(_b_){ /*<>*/ return 0;}, oc, fmt) /*<>*/ ; + (function(a){ /*<>*/ return 0;}, oc, fmt) /*<>*/ ; } function ibprintf(b, fmt){ /*<>*/ return ikfprintf - (function(_a_){ /*<>*/ return 0;}, b, fmt) /*<>*/ ; + (function(a){ /*<>*/ return 0;}, b, fmt) /*<>*/ ; } function printf(fmt){ /*<>*/ return fprintf(Stdlib[39], fmt) /*<>*/ ; @@ -21186,21 +21093,20 @@ Help = [248, "Stdlib.Arg.Help", caml_fresh_oo_id(0)], Stop = [248, "Stdlib.Arg.Stop", caml_fresh_oo_id(0)], cst_none = "", - _a_ = - [0, [11, cst$10, [2, 0, [12, 32, [2, 0, [12, 10, 0]]]]], " %s %s\n"], - _b_ = + a = [0, [11, cst$10, [2, 0, [12, 32, [2, 0, [12, 10, 0]]]]], " %s %s\n"], + b = [0, [11, cst$10, [2, 0, [12, 32, [2, 0, [2, 0, [12, 10, 0]]]]]], " %s %s%s\n"], - _c_ = [0, cst_help$3], + c = [0, cst_help$3], cst_Display_this_list_of_optio = cst_Display_this_list_of_optio$1, cst_help = cst_help$3, cst_Display_this_list_of_optio$0 = cst_Display_this_list_of_optio$1, cst_help$0 = cst_help$4, cst_help$1 = cst_help$4, cst_help$2 = cst_help$3, - _d_ = [0, [2, 0, [12, 10, 0]], "%s\n"], - _e_ = [0, [2, 0, 0], cst_s]; + d = [0, [2, 0, [12, 10, 0]], "%s\n"], + e = [0, [2, 0, 0], cst_s]; function assoc3(x, l){ var l$0 = /*<>*/ l; for(;;){ @@ -21218,29 +21124,29 @@ var t = /*<>*/ l[2], h = l[1], - _az_ = /*<>*/ caml_call2(Stdlib[28], prefix, h), - _aA_ = + a = /*<>*/ caml_call2(Stdlib[28], prefix, h), + b = /*<>*/ caml_call3 (Stdlib_List[26], function(x, y){ - var _aB_ = /*<>*/ caml_call2(Stdlib[28], sep, y); - /*<>*/ return caml_call2(Stdlib[28], x, _aB_); + var a = /*<>*/ caml_call2(Stdlib[28], sep, y); + /*<>*/ return caml_call2(Stdlib[28], x, a); }, - _az_, + a, t); - /*<>*/ return caml_call2(Stdlib[28], _aA_, suffix) /*<>*/ ; + /*<>*/ return caml_call2(Stdlib[28], b, suffix) /*<>*/ ; } function help_action(param){ - /*<>*/ throw caml_maybe_attach_backtrace([0, Stop, _c_], 1); + /*<>*/ throw caml_maybe_attach_backtrace([0, Stop, c], 1); /*<>*/ } function add_help(speclist){ /*<>*/ try{ /*<>*/ assoc3(cst_help$2, speclist); - var _aw_ = /*<>*/ 0, add1 = _aw_; + var e = /*<>*/ 0, add1 = e; } - catch(_ay_){ - var _as_ = /*<>*/ caml_wrap_exception(_ay_); - if(_as_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_as_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a !== Stdlib[8]) throw caml_maybe_attach_backtrace(a, 0); var add1 = /*<>*/ [0, @@ -21249,23 +21155,23 @@ } /*<>*/ try{ /*<>*/ assoc3(cst_help$1, speclist); - var _av_ = /*<>*/ 0, add2 = _av_; + var d = /*<>*/ 0, add2 = d; } - catch(_ax_){ - var _at_ = /*<>*/ caml_wrap_exception(_ax_); - if(_at_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_at_, 0); + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b !== Stdlib[8]) throw caml_maybe_attach_backtrace(b, 0); var add2 = /*<>*/ [0, [0, cst_help$0, [0, help_action], cst_Display_this_list_of_optio$0], 0]; } - var _au_ = /*<>*/ caml_call2(Stdlib[37], add1, add2); - /*<>*/ return caml_call2(Stdlib[37], speclist, _au_); + var c = /*<>*/ caml_call2(Stdlib[37], add1, add2); + /*<>*/ return caml_call2(Stdlib[37], speclist, c); } function usage_b(buf, speclist, errmsg){ - /*<>*/ caml_call3(Stdlib_Printf[5], buf, _d_, errmsg); - var _ap_ = /*<>*/ add_help(speclist); + /*<>*/ caml_call3(Stdlib_Printf[5], buf, d, errmsg); + var c = /*<>*/ add_help(speclist); /*<>*/ return caml_call2 (Stdlib_List[18], function(param){ @@ -21273,19 +21179,18 @@ doc = /*<>*/ param[3], spec = param[2], key = param[1], - _aq_ = - /*<>*/ 0 < caml_ml_string_length(doc) ? 1 : 0; - if(! _aq_) return _aq_; + c = /*<>*/ 0 < caml_ml_string_length(doc) ? 1 : 0; + if(! c) return c; /*<>*/ if(11 !== spec[0]) /*<>*/ return caml_call4 - (Stdlib_Printf[5], buf, _a_, key, doc); + (Stdlib_Printf[5], buf, a, key, doc); var l = /*<>*/ spec[1], - _ar_ = /*<>*/ make_symlist(cst$1, cst$0, cst, l); + d = /*<>*/ make_symlist(cst$1, cst$0, cst, l); /*<>*/ return caml_call5 - (Stdlib_Printf[5], buf, _b_, key, _ar_, doc); + (Stdlib_Printf[5], buf, b, key, d, doc); }, - _ap_) /*<>*/ ; + c) /*<>*/ ; } function usage_string(speclist, errmsg){ var b = /*<>*/ caml_call1(Stdlib_Buffer[1], 200); @@ -21293,18 +21198,18 @@ /*<>*/ return caml_call1(Stdlib_Buffer[2], b) /*<>*/ ; } function usage(speclist, errmsg){ - var _ao_ = /*<>*/ usage_string(speclist, errmsg); - /*<>*/ return caml_call2(Stdlib_Printf[3], _e_, _ao_); + var a = /*<>*/ usage_string(speclist, errmsg); + /*<>*/ return caml_call2(Stdlib_Printf[3], e, a); } var current = /*<>*/ [0, 0], - _f_ = + f = [0, [2, 0, [11, ": unknown option '", [2, 0, [11, "'.\n", 0]]]], "%s: unknown option '%s'.\n"], - _g_ = [0, cst_help$3], - _h_ = [0, cst_help$4], - _i_ = + g = [0, cst_help$3], + h = [0, cst_help$4], + i = [0, [2, 0, @@ -21316,11 +21221,11 @@ "'; option '", [2, 0, [11, "' expects ", [2, 0, [11, cst$9, 0]]]]]]]], "%s: wrong argument '%s'; option '%s' expects %s.\n"], - _j_ = + j = [0, [2, 0, [11, ": option '", [2, 0, [11, "' needs an argument.\n", 0]]]], "%s: option '%s' needs an argument.\n"], - _k_ = [0, [2, 0, [11, ": ", [2, 0, [11, cst$9, 0]]]], "%s: %s.\n"], + k = [0, [2, 0, [11, ": ", [2, 0, [11, cst$9, 0]]]], "%s: %s.\n"], cst_no_argument = "no argument", cst_a_boolean = "a boolean", cst_an_integer = cst_an_integer$1, @@ -21330,33 +21235,33 @@ cst_one_of = "one of: ", cst_Arg_Expand_is_is_only_allo = "Arg.Expand is is only allowed with Arg.parse_and_expand_argv_dynamic", - _l_ = [0, [2, 0, 0], cst_s], - _m_ = [0, [2, 0, 0], cst_s], - _n_ = [0, [2, 0, 0], cst_s], - _o_ = [0, [2, 0, 0], cst_s], - _p_ = [0, [2, 0, 0], cst_s], - _q_ = [0, [2, 0, 0], cst_s], + l = [0, [2, 0, 0], cst_s], + m = [0, [2, 0, 0], cst_s], + n = [0, [2, 0, 0], cst_s], + o = [0, [2, 0, 0], cst_s], + p = [0, [2, 0, 0], cst_s], + q = [0, [2, 0, 0], cst_s], dummy = 0; function int_of_string_opt(x){ /*<>*/ try{ - var _am_ = /*<>*/ [0, runtime.caml_int_of_string(x)]; - return _am_; + var b = /*<>*/ [0, runtime.caml_int_of_string(x)]; + return b; } - catch(_an_){ - var _al_ = /*<>*/ caml_wrap_exception(_an_); - if(_al_[1] === Stdlib[7]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_al_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] === Stdlib[7]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } function float_of_string_opt(x){ /*<>*/ try{ - var _aj_ = /*<>*/ [0, runtime.caml_float_of_string(x)]; - return _aj_; + var b = /*<>*/ [0, runtime.caml_float_of_string(x)]; + return b; } - catch(_ak_){ - var _ai_ = /*<>*/ caml_wrap_exception(_ak_); - if(_ai_[1] === Stdlib[7]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_ai_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] === Stdlib[7]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } function parse_and_expand_argv_dynamic_ @@ -21376,7 +21281,7 @@ var s = error[1]; if(s !== cst_help$4 && s !== cst_help$3) /*<>*/ caml_call4 - (Stdlib_Printf[5], b, _f_, progname, s); + (Stdlib_Printf[5], b, f, progname, s); break; case 1: var @@ -21384,23 +21289,21 @@ arg = error[2], opt = error[1]; /*<>*/ caml_call6 - (Stdlib_Printf[5], b, _i_, progname, arg, opt, expected); + (Stdlib_Printf[5], b, i, progname, arg, opt, expected); break; case 2: var s$0 = /*<>*/ error[1]; /*<>*/ caml_call4 - (Stdlib_Printf[5], b, _j_, progname, s$0); + (Stdlib_Printf[5], b, j, progname, s$0); break; default: var s$1 = /*<>*/ error[1]; /*<>*/ caml_call4 - (Stdlib_Printf[5], b, _k_, progname, s$1); + (Stdlib_Printf[5], b, k, progname, s$1); } /*<>*/ usage_b(b, speclist[1], errmsg); /*<>*/ if - (! - caml_equal(error, _g_) - && ! /*<>*/ caml_equal(error, _h_)) + (! caml_equal(error, g) && ! /*<>*/ caml_equal(error, h)) /*<>*/ return [0, Bad, caml_call1(Stdlib_Buffer[2], b)] /*<>*/ ; /*<>*/ return [0, Help, caml_call1(Stdlib_Buffer[2], b)] /*<>*/ ; /*<>*/ } @@ -21409,39 +21312,39 @@ if(current[1] >= argv[1].length - 1) return 0; /*<>*/ try{ var - _V_ = current[1], - s = /*<>*/ caml_check_bound(argv[1], _V_)[1 + _V_]; + a = current[1], + s = /*<>*/ caml_check_bound(argv[1], a)[1 + a]; /*<>*/ if(caml_call2(Stdlib_String[11], cst$3, s)){ /*<>*/ try{ var follow$1 = /*<>*/ 0, - _Z_ = /*<>*/ assoc3(s, speclist[1]), + l = /*<>*/ assoc3(s, speclist[1]), follow$0 = follow$1, - action = _Z_; + action = l; } - catch(_ag_){ - var _W_ = /*<>*/ caml_wrap_exception(_ag_); - if(_W_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_W_, 0); + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b !== Stdlib[8]) throw caml_maybe_attach_backtrace(b, 0); /*<>*/ try{ var - i = /*<>*/ caml_call2(Stdlib_String[36], s, 61), + i$0 = /*<>*/ caml_call2(Stdlib_String[36], s, 61), len = /*<>*/ caml_ml_string_length(s), arg = /*<>*/ caml_call3 - (Stdlib_String[16], s, i + 1 | 0, len - (i + 1 | 0) | 0), + (Stdlib_String[16], s, i$0 + 1 | 0, len - (i$0 + 1 | 0) | 0), keyword = - /*<>*/ caml_call3(Stdlib_String[16], s, 0, i), + /*<>*/ caml_call3(Stdlib_String[16], s, 0, i$0), follow = /*<>*/ [0, arg], - _Y_ = assoc3(keyword, speclist[1]), + d = assoc3(keyword, speclist[1]), follow$0 = follow, - action = _Y_; + action = d; } - catch(_ah_){ - var _X_ = /*<>*/ caml_wrap_exception(_ah_); - if(_X_ === Stdlib[8]) + catch(a){ + var c = /*<>*/ caml_wrap_exception(a); + if(c === Stdlib[8]) /*<>*/ throw caml_maybe_attach_backtrace ([0, Stop, [0, s]], 1); - /*<>*/ throw caml_maybe_attach_backtrace(_X_, 0); + /*<>*/ throw caml_maybe_attach_backtrace(c, 0); } } let s$0 = /*<>*/ s, follow$2 = follow$0; @@ -21464,8 +21367,8 @@ ((current[1] + 1 | 0) >= argv[1].length - 1) /*<>*/ throw caml_maybe_attach_backtrace ([0, Stop, [2, s$0]], 1); - var _af_ = /*<>*/ current[1] + 1 | 0; - return caml_check_bound(argv[1], _af_)[1 + _af_] /*<>*/ ; + var a = /*<>*/ current[1] + 1 | 0; + return caml_check_bound(argv[1], a)[1 + a] /*<>*/ ; /*<>*/ }, consume_arg = /*<>*/ function(param){ @@ -21484,13 +21387,12 @@ arg = /*<>*/ get_arg$0(0); /*<>*/ try{ var - _$_ = /*<>*/ [0, caml_call1(Stdlib[32], arg)], - match = _$_; + d = /*<>*/ [0, caml_call1(Stdlib[32], arg)], + match = d; } - catch(_ae_){ - var ___ = /*<>*/ caml_wrap_exception(_ae_); - if(___[1] !== Stdlib[6]) - throw caml_maybe_attach_backtrace(___, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(a, 0); var match = /*<>*/ 0; } /*<>*/ if(! match) @@ -21579,24 +21481,23 @@ /*<>*/ return consume_arg$0(0) /*<>*/ ; } var - _aa_ = + e = /*<>*/ make_symlist (cst$6, cst$5, cst$4, symb); /*<>*/ throw caml_maybe_attach_backtrace ([0, Stop, - [1, s$0, arg$5, caml_call2(Stdlib[28], cst_one_of, _aa_)]], + [1, s$0, arg$5, caml_call2(Stdlib[28], cst_one_of, e)]], 1); case 12: var f$5 = /*<>*/ param[1]; /*<>*/ no_arg$0(0); /*<>*/ for(;;){ if(current[1] >= (argv[1].length - 2 | 0)) return 0; - var _ab_ = /*<>*/ current[1] + 1 | 0; + var b = /*<>*/ current[1] + 1 | 0; /*<>*/ /*<>*/ caml_call1 (f$5, - /*<>*/ caml_check_bound(argv[1], _ab_) - [1 + _ab_]); + /*<>*/ caml_check_bound(argv[1], b)[1 + b]); /*<>*/ consume_arg$0(0); } break; @@ -21610,9 +21511,9 @@ (f$6, /*<>*/ caml_call1(Stdlib_List[10], acc[1])) /*<>*/ ; var - _ad_ = /*<>*/ current[1] + 1 | 0, - _ac_ = /*<>*/ acc[1]; - acc[1] = [0, caml_check_bound(argv[1], _ad_)[1 + _ad_], _ac_]; + c = /*<>*/ current[1] + 1 | 0, + g = /*<>*/ acc[1]; + acc[1] = [0, caml_check_bound(argv[1], c)[1 + c], g]; /*<>*/ consume_arg$0(0); } break; @@ -21682,43 +21583,43 @@ /*<>*/ return parse_argv_dynamic ([0, current$0], argv, [0, speclist], anonfun, errmsg) /*<>*/ ; } - function parse(l, f, msg){ + function parse(l$0, f, msg){ /*<>*/ try{ var - _U_ = /*<>*/ parse_argv(0, caml_sys_argv(0), l, f, msg); - return _U_; + a = /*<>*/ parse_argv(0, caml_sys_argv(0), l$0, f, msg); + return a; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); if(exn[1] === Bad){ var msg$0 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[3], _l_, msg$0); + /*<>*/ caml_call2(Stdlib_Printf[3], l, msg$0); /*<>*/ return caml_call1(Stdlib[99], 2) /*<>*/ ; } /*<>*/ if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[2], _m_, msg$1); + /*<>*/ caml_call2(Stdlib_Printf[2], m, msg$1); /*<>*/ return caml_call1(Stdlib[99], 0) /*<>*/ ; } } function parse_dynamic(l, f, msg){ /*<>*/ try{ var - _T_ = + a = /*<>*/ parse_argv_dynamic (0, caml_sys_argv(0), l, f, msg); - return _T_; + return a; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); if(exn[1] === Bad){ var msg$0 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[3], _n_, msg$0); + /*<>*/ caml_call2(Stdlib_Printf[3], n, msg$0); /*<>*/ return caml_call1(Stdlib[99], 2) /*<>*/ ; } /*<>*/ if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[2], _o_, msg$1); + /*<>*/ caml_call2(Stdlib_Printf[2], o, msg$1); /*<>*/ return caml_call1(Stdlib[99], 0) /*<>*/ ; } } @@ -21728,21 +21629,21 @@ argv = [0, caml_sys_argv(0)], spec = /*<>*/ [0, l], current$0 = /*<>*/ [0, current[1]], - _S_ = + a = /*<>*/ parse_and_expand_argv_dynamic (current$0, argv, spec, f, msg); - return _S_; + return a; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); if(exn[1] === Bad){ var msg$0 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[3], _p_, msg$0); + /*<>*/ caml_call2(Stdlib_Printf[3], p, msg$0); /*<>*/ return caml_call1(Stdlib[99], 2) /*<>*/ ; } /*<>*/ if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; - /*<>*/ caml_call2(Stdlib_Printf[2], _q_, msg$1); + /*<>*/ caml_call2(Stdlib_Printf[2], q, msg$1); /*<>*/ return caml_call1(Stdlib[99], 0) /*<>*/ ; } } @@ -21761,16 +21662,16 @@ /*<>*/ try{ var n$0 = /*<>*/ caml_call2(Stdlib_String[36], s, 9); } - catch(_Q_){ - var _O_ = /*<>*/ caml_wrap_exception(_Q_); - if(_O_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_O_, 0); + catch(c){ + var a = /*<>*/ caml_wrap_exception(c); + if(a !== Stdlib[8]) throw caml_maybe_attach_backtrace(a, 0); /*<>*/ try{ var n = /*<>*/ caml_call2(Stdlib_String[36], s, 32); } - catch(_R_){ - var _P_ = /*<>*/ caml_wrap_exception(_R_); - if(_P_ === Stdlib[8]) /*<>*/ return len; - /*<>*/ throw caml_maybe_attach_backtrace(_P_, 0); + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b === Stdlib[8]) /*<>*/ return len; + /*<>*/ throw caml_maybe_attach_backtrace(b, 0); } /*<>*/ return loop(n + 1 | 0) /*<>*/ ; } @@ -21785,11 +21686,11 @@ /*<>*/ return caml_call2 (Stdlib_Int[11], cur, caml_ml_string_length(kwd)) /*<>*/ ; var - _N_ = + a = /*<>*/ caml_ml_string_length(kwd) + /*<>*/ second_word(doc) | 0; - /*<>*/ return caml_call2(Stdlib_Int[11], cur, _N_) /*<>*/ ; + /*<>*/ return caml_call2(Stdlib_Int[11], cur, a) /*<>*/ ; } function replace_leading_tab(s){ var seen = /*<>*/ [0, 0]; @@ -21821,20 +21722,19 @@ var msg$0 = ksd[3], cutcol$0 = /*<>*/ second_word(msg$0), - _K_ = + c = /*<>*/ caml_call2 (Stdlib_Int[11], 0, len$0 - cutcol$0 | 0) + 3 | 0, spaces$0 = - /*<>*/ caml_call2(Stdlib_String[1], _K_, 32), - _L_ = /*<>*/ replace_leading_tab(msg$0), - _M_ = - /*<>*/ caml_call2(Stdlib[28], spaces$0, _L_); + /*<>*/ caml_call2(Stdlib_String[1], c, 32), + d = /*<>*/ replace_leading_tab(msg$0), + e = /*<>*/ caml_call2(Stdlib[28], spaces$0, d); /*<>*/ return [0, kwd, spec, - caml_call2(Stdlib[28], cst$7, _M_)] /*<>*/ ; + caml_call2(Stdlib[28], cst$7, e)] /*<>*/ ; } var msg = /*<>*/ ksd[3], @@ -21850,10 +21750,10 @@ var spaces = /*<>*/ caml_call2(Stdlib_String[1], diff, 32), - _I_ = /*<>*/ replace_leading_tab(msg), + a = /*<>*/ replace_leading_tab(msg), prefix = /*<>*/ caml_call3 - (Stdlib_String[16], _I_, 0, cutcol), + (Stdlib_String[16], a, 0, cutcol), suffix = /*<>*/ /*<>*/ caml_call3 (Stdlib_String[16], @@ -21861,12 +21761,12 @@ cutcol, /*<>*/ caml_ml_string_length(msg) - cutcol | 0), - _J_ = + b = /*<>*/ caml_call2(Stdlib[28], spaces, suffix); /*<>*/ return [0, kwd, spec$0, - caml_call2(Stdlib[28], prefix, _J_)] /*<>*/ ; + caml_call2(Stdlib[28], prefix, b)] /*<>*/ ; }, completed) /*<>*/ ; } @@ -21885,14 +21785,14 @@ (0 < len && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ var - _H_ = + a = /*<>*/ caml_call3 (Stdlib_String[16], word, 0, len - 1 | 0); break a; } - var _H_ = /*<>*/ word; + var a = /*<>*/ word; } - var word$0 = /*<>*/ _H_; + var word$0 = /*<>*/ a; } else var word$0 = /*<>*/ word; @@ -21908,40 +21808,35 @@ /*<>*/ caml_call2(Stdlib_Buffer[12], buf, c); } } - catch(_G_){ - var _E_ = /*<>*/ caml_wrap_exception(_G_); - if(_E_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_E_, 0); + catch(c){ + var a = /*<>*/ caml_wrap_exception(c); + if(a !== Stdlib[12]) throw caml_maybe_attach_backtrace(a, 0); /*<>*/ if(0 < caml_call1(Stdlib_Buffer[7], buf)) /*<>*/ stash(0); /*<>*/ caml_call1(Stdlib[93], ic); - var _F_ = /*<>*/ caml_call1(Stdlib_List[10], words[1]); - /*<>*/ return caml_call1(Stdlib_Array[11], _F_); + var b = /*<>*/ caml_call1(Stdlib_List[10], words[1]); + /*<>*/ return caml_call1(Stdlib_Array[11], b); } } - var _r_ = /*<>*/ 10, _s_ = 1; - function read_arg(_D_){return read_aux(_s_, _r_, _D_);} - var - _t_ = /*<>*/ 0, - _u_ = 0, - _v_ = [0, [2, 0, [0, 0]], "%s%c"]; - function read_arg0(_C_){ - /*<>*/ return read_aux(_u_, _t_, _C_); - } + var r = /*<>*/ 10, s = 1; + function read_arg(a){return read_aux(s, r, a);} + var t = /*<>*/ 0, u = 0, v = [0, [2, 0, [0, 0]], "%s%c"]; + function read_arg0(a){ /*<>*/ return read_aux(u, t, a);} function write_aux(sep, file, args){ var oc = /*<>*/ caml_call1(Stdlib[61], file); /*<>*/ caml_call2 (Stdlib_Array[12], function(s){ /*<>*/ return caml_call4 - (Stdlib_Printf[1], oc, _v_, s, sep) /*<>*/ ; + (Stdlib_Printf[1], oc, v, s, sep) /*<>*/ ; }, args); /*<>*/ return caml_call1(Stdlib[76], oc) /*<>*/ ; } - var _w_ = /*<>*/ 10; - function write_arg(_A_, _B_){return write_aux(_w_, _A_, _B_);} - var _x_ = /*<>*/ 0; - function write_arg0(_y_, _z_){return write_aux(_x_, _y_, _z_);} + var w = /*<>*/ 10; + function write_arg(a, b){return write_aux(w, a, b);} + var x = /*<>*/ 0; + function write_arg0(a, b){return write_aux(x, a, b);} var Stdlib_Arg = /*<>*/ [0, @@ -22042,21 +21937,21 @@ Stdlib_Buffer = global_data.Stdlib__Buffer, Stdlib_Obj = global_data.Stdlib__Obj, printers = /*<>*/ caml_call1(Stdlib_Atomic[1], 0), - _a_ = /*<>*/ [0, [3, 0, 0], "%S"], - _b_ = [0, [4, 0, 0, 0, 0], "%d"], - _c_ = [0, [11, ", ", [2, 0, [2, 0, 0]]], ", %s%s"], - _d_ = [0, [12, 40, [2, 0, [2, 0, [12, 41, 0]]]], "(%s%s)"], - _e_ = [0, [12, 40, [2, 0, [12, 41, 0]]], "(%s)"], + a = /*<>*/ [0, [3, 0, 0], "%S"], + b = [0, [4, 0, 0, 0, 0], "%d"], + c = [0, [11, ", ", [2, 0, [2, 0, 0]]], ", %s%s"], + d = [0, [12, 40, [2, 0, [2, 0, [12, 41, 0]]]], "(%s%s)"], + e = [0, [12, 40, [2, 0, [12, 41, 0]]], "(%s)"], cst_Out_of_memory = "Out of memory", cst_Stack_overflow = "Stack overflow", cst_Pattern_matching_failed = "Pattern matching failed", cst_Assertion_failed = "Assertion failed", cst_Undefined_recursive_module = "Undefined recursive module", - _f_ = + f = [0, [11, cst_Uncaught_exception, [2, 0, [12, 10, 0]]], cst_Uncaught_exception_s], - _g_ = + g = [0, [11, cst_Uncaught_exception, [2, 0, [12, 10, 0]]], cst_Uncaught_exception_s], @@ -22064,9 +21959,9 @@ cst_Re_raised_at = "Re-raised at", cst_Raised_by_primitive_operat = "Raised by primitive operation at", cst_Called_from = "Called from", - _h_ = [0, [12, 32, [4, 0, 0, 0, 0]], " %d"], + h = [0, [12, 32, [4, 0, 0, 0, 0]], " %d"], cst_inlined = " (inlined)", - _i_ = + i = [0, [2, 0, @@ -22082,24 +21977,24 @@ 34, [2, 0, [11, ", line", [2, 0, [11, cst_characters, partial]]]]]]]]]], '%s %s in file "%s"%s, line%s, characters %d-%d'], - _j_ = [0, [11, "s ", [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, 0]]]], "s %d-%d"], - _k_ = [0, [2, 0, [11, " unknown location", 0]], "%s unknown location"], - _l_ = [0, [2, 0, [12, 10, 0]], cst_s], - _m_ = + j = [0, [11, "s ", [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, 0]]]], "s %d-%d"], + k = [0, [2, 0, [11, " unknown location", 0]], "%s unknown location"], + l = [0, [2, 0, [12, 10, 0]], cst_s], + m = [0, [11, cst_Program_not_linked_with_g_$0, 0], cst_Program_not_linked_with_g_$0], - _n_ = [0, [2, 0, [12, 10, 0]], cst_s], + n = [0, [2, 0, [12, 10, 0]], cst_s], cst_Program_not_linked_with_g_ = cst_Program_not_linked_with_g_$0; function field(x, i){ var f = /*<>*/ x[1 + i]; /*<>*/ if(! caml_call1(Stdlib_Obj[1], f)) - /*<>*/ return caml_call2(Stdlib_Printf[4], _b_, f) /*<>*/ ; - var _ah_ = /*<>*/ Stdlib_Obj[15]; - if(caml_obj_tag(f) === _ah_) - /*<>*/ return caml_call2(Stdlib_Printf[4], _a_, f) /*<>*/ ; - var _ai_ = /*<>*/ Stdlib_Obj[16]; - return caml_obj_tag(f) === _ai_ + /*<>*/ return caml_call2(Stdlib_Printf[4], b, f) /*<>*/ ; + var c = /*<>*/ Stdlib_Obj[15]; + if(caml_obj_tag(f) === c) + /*<>*/ return caml_call2(Stdlib_Printf[4], a, f) /*<>*/ ; + var d = /*<>*/ Stdlib_Obj[16]; + return caml_obj_tag(f) === d ? /*<>*/ caml_call1(Stdlib[35], f) : cst /*<>*/ ; } @@ -22107,10 +22002,9 @@ /*<>*/ if(x.length - 1 <= i) /*<>*/ return cst$0; var - _af_ = /*<>*/ other_fields(x, i + 1 | 0), - _ag_ = /*<>*/ field(x, i); - /*<>*/ return caml_call3 - (Stdlib_Printf[4], _c_, _ag_, _af_) /*<>*/ ; + a = /*<>*/ other_fields(x, i + 1 | 0), + b = /*<>*/ field(x, i); + /*<>*/ return caml_call3(Stdlib_Printf[4], c, b, a) /*<>*/ ; } function use_printers(x){ var @@ -22126,7 +22020,7 @@ /*<>*/ try{ var val = /*<>*/ caml_call1(hd, x); } - catch(_ae_){break a;} + catch(a){break a;} /*<>*/ if(val){ var s = val[1]; /*<>*/ return [0, s]; @@ -22142,24 +22036,21 @@ match = /*<>*/ t.length - 1; if(2 < match >>> 0) var - _aa_ = /*<>*/ other_fields(t, 2), - _ab_ = /*<>*/ field(t, 1), - _ad_ = - /*<>*/ caml_call3 - (Stdlib_Printf[4], _d_, _ab_, _aa_); + b = /*<>*/ other_fields(t, 2), + c = /*<>*/ field(t, 1), + a = /*<>*/ caml_call3(Stdlib_Printf[4], d, c, b); else /*<>*/ switch(match){ case 0: - var _ad_ = /*<>*/ cst$1; break; + var a = /*<>*/ cst$1; break; case 1: - var _ad_ = /*<>*/ cst$2; break; + var a = /*<>*/ cst$2; break; default: var - _ac_ = /*<>*/ field(t, 1), - _ad_ = - /*<>*/ caml_call2(Stdlib_Printf[4], _e_, _ac_); + g = /*<>*/ field(t, 1), + a = /*<>*/ caml_call2(Stdlib_Printf[4], e, g); } - var match$0 = /*<>*/ [0, constructor, [0, _ad_]]; + var match$0 = /*<>*/ [0, constructor, [0, a]]; } else var match$0 = /*<>*/ [0, t[1], 0]; @@ -22177,20 +22068,20 @@ /*<>*/ if(x === Stdlib[10]) /*<>*/ return cst_Stack_overflow; /*<>*/ if(x[1] === Stdlib[4]){ - var match = x[2], char$0 = match[3], line = match[2], file = match[1]; + var match = x[2], char$ = match[3], line = match[2], file = match[1]; /*<>*/ return caml_call6 (Stdlib_Printf[4], locfmt, file, line, - char$0, - char$0 + 5 | 0, + char$, + char$ + 5 | 0, cst_Pattern_matching_failed) /*<>*/ ; } /*<>*/ if(x[1] === Stdlib[5]){ var match$0 = x[2], - char$1 = match$0[3], + char$0 = match$0[3], line$0 = match$0[2], file$0 = match$0[1]; /*<>*/ return caml_call6 @@ -22198,15 +22089,15 @@ locfmt, file$0, line$0, - char$1, - char$1 + 6 | 0, + char$0, + char$0 + 6 | 0, cst_Assertion_failed) /*<>*/ ; } /*<>*/ if(x[1] !== Stdlib[15]) /*<>*/ return string_of_extension_constructo(x) /*<>*/ ; var match$1 = /*<>*/ x[2], - char$2 = match$1[3], + char$1 = match$1[3], line$1 = match$1[2], file$1 = match$1[1]; /*<>*/ return caml_call6 @@ -22214,8 +22105,8 @@ locfmt, file$1, line$1, - char$2, - char$2 + 6 | 0, + char$1, + char$1 + 6 | 0, cst_Undefined_recursive_module) /*<>*/ ; } function to_string(e){ @@ -22227,28 +22118,28 @@ /*<>*/ } function print(fct, arg){ /*<>*/ try{ - var _$_ = /*<>*/ caml_call1(fct, arg); - return _$_; + var b = /*<>*/ caml_call1(fct, arg); + return b; } catch(x$0){ var x = /*<>*/ caml_wrap_exception(x$0), - ___ = /*<>*/ to_string(x); - /*<>*/ caml_call2(Stdlib_Printf[3], _f_, ___); + a = /*<>*/ to_string(x); + /*<>*/ caml_call2(Stdlib_Printf[3], f, a); /*<>*/ caml_call1(Stdlib[63], Stdlib[40]); /*<>*/ throw caml_maybe_attach_backtrace(x, 0); } /*<>*/ } - function catch$0(fct, arg){ + function catch$(fct, arg){ /*<>*/ try{ - var _Z_ = /*<>*/ caml_call1(fct, arg); - return _Z_; + var b = /*<>*/ caml_call1(fct, arg); + return b; } catch(x$0){ var x = /*<>*/ caml_wrap_exception(x$0); /*<>*/ caml_call1(Stdlib[63], Stdlib[39]); - var _Y_ = /*<>*/ to_string(x); - /*<>*/ caml_call2(Stdlib_Printf[3], _g_, _Y_); + var a = /*<>*/ to_string(x); + /*<>*/ caml_call2(Stdlib_Printf[3], g, a); /*<>*/ return caml_call1(Stdlib[99], 2) /*<>*/ ; } } @@ -22270,24 +22161,22 @@ lines = /*<>*/ slot[3] === slot[6] ? /*<>*/ caml_call2 - (Stdlib_Printf[4], _h_, slot[3]) + (Stdlib_Printf[4], h, slot[3]) : /*<>*/ caml_call3 - (Stdlib_Printf[4], _j_, slot[3], slot[6]), - _R_ = /*<>*/ slot[7], - _S_ = slot[4], - _T_ = slot[8] ? cst_inlined : cst$3, - _U_ = /*<>*/ slot[2], - _V_ = slot[9], - _W_ = info(slot[1]); + (Stdlib_Printf[4], j, slot[3], slot[6]), + a = /*<>*/ slot[7], + b = slot[4], + c = slot[8] ? cst_inlined : cst$3, + d = /*<>*/ slot[2], + e = slot[9], + f = info(slot[1]); /*<>*/ return [0, - caml_call8 - (Stdlib_Printf[4], _i_, _W_, _V_, _U_, _T_, lines, _S_, _R_)] /*<>*/ ; + caml_call8(Stdlib_Printf[4], i, f, e, d, c, lines, b, a)] /*<>*/ ; } /*<>*/ if(slot[1]) /*<>*/ return 0; - var _X_ = /*<>*/ info(0); - /*<>*/ return [0, - caml_call2(Stdlib_Printf[4], _k_, _X_)] /*<>*/ ; + var g = /*<>*/ info(0); + /*<>*/ return [0, caml_call2(Stdlib_Printf[4], k, g)] /*<>*/ ; /*<>*/ } function print_raw_backtrace(outchan, raw_backtrace){ var @@ -22295,13 +22184,13 @@ /*<>*/ convert_raw_backtrace(raw_backtrace); /*<>*/ if(! backtrace) /*<>*/ return caml_call2 - (Stdlib_Printf[1], outchan, _m_) /*<>*/ ; + (Stdlib_Printf[1], outchan, m) /*<>*/ ; var a = /*<>*/ backtrace[1], - _P_ = /*<>*/ a.length - 2 | 0, - _O_ = 0; - if(_P_ >= 0){ - var i = _O_; + b = /*<>*/ a.length - 2 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ var match = @@ -22310,11 +22199,11 @@ /*<>*/ if(match){ var str = match[1]; /*<>*/ caml_call3 - (Stdlib_Printf[1], outchan, _l_, str); + (Stdlib_Printf[1], outchan, l, str); } - var _Q_ = /*<>*/ i + 1 | 0; - if(_P_ === i) break; - i = _Q_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return 0; @@ -22333,10 +22222,10 @@ var a = /*<>*/ backtrace[1], b = /*<>*/ caml_call1(Stdlib_Buffer[1], 1024), - _M_ = /*<>*/ a.length - 2 | 0, - _L_ = 0; - if(_M_ >= 0){ - var i = _L_; + c = /*<>*/ a.length - 2 | 0, + d = 0; + if(c >= 0){ + var i = d; for(;;){ var match = @@ -22344,11 +22233,11 @@ (i, /*<>*/ caml_check_bound(a, i)[1 + i]); /*<>*/ if(match){ var str = match[1]; - /*<>*/ caml_call3(Stdlib_Printf[5], b, _n_, str); + /*<>*/ caml_call3(Stdlib_Printf[5], b, n, str); } - var _N_ = /*<>*/ i + 1 | 0; - if(_M_ === i) break; - i = _N_; + var e = /*<>*/ i + 1 | 0; + if(c === i) break; + i = e; } } /*<>*/ return caml_call1(Stdlib_Buffer[2], b) /*<>*/ ; @@ -22381,22 +22270,22 @@ i = /*<>*/ i$1; for(;;){ /*<>*/ if(-1 === i) - var _K_ = /*<>*/ 0; + var b = /*<>*/ 0; else{ var - _J_ = + a = /*<>*/ 0 === caml_check_bound(backtrace, i)[1 + i][0] ? 1 : 0; - /*<>*/ if(! _J_){ + /*<>*/ if(! a){ var i$0 = i - 1 | 0; i = i$0; continue; } - var _K_ = _J_; + var b = a; } - /*<>*/ return _K_ ? [0, backtrace] : 0 /*<>*/ ; + /*<>*/ return b ? [0, backtrace] : 0 /*<>*/ ; } } function backtrace_slots_of_raw_entry(entry){ @@ -22418,8 +22307,8 @@ success = /*<>*/ caml_call3 (Stdlib_Atomic[6], printers, old_printers, new_printers), - _I_ = /*<>*/ 1 - success; - if(! _I_) return _I_; + a = /*<>*/ 1 - success; + if(! a) return a; } /*<>*/ } function exn_slot(x){ @@ -22442,21 +22331,21 @@ "(Cannot print locations:\n bytecode executable program file appears to be corrupt)", "(Cannot print locations:\n bytecode executable program file has wrong magic number)", "(Cannot print locations:\n bytecode executable program file cannot be opened;\n -- too many open files. Try running with OCAMLRUNPARAM=b=2)"]), - _o_ = + o = [0, [11, cst_Fatal_error_exception, [2, 0, [12, 10, 0]]], cst_Fatal_error_exception_s]; function default_uncaught_exception_han(exn, raw_backtrace){ - var _F_ = /*<>*/ to_string(exn); - /*<>*/ caml_call2(Stdlib_Printf[3], _o_, _F_); + var b = /*<>*/ to_string(exn); + /*<>*/ caml_call2(Stdlib_Printf[3], o, b); /*<>*/ print_raw_backtrace(Stdlib[40], raw_backtrace); var status = /*<>*/ runtime.caml_ml_debug_info_status(0); /*<>*/ if(status < 0){ var - _G_ = /*<>*/ caml_call1(Stdlib[18], status), - _H_ = /*<>*/ caml_check_bound(errors, _G_)[1 + _G_]; - /*<>*/ caml_call1(Stdlib[53], _H_); + a = /*<>*/ caml_call1(Stdlib[18], status), + c = /*<>*/ caml_check_bound(errors, a)[1 + a]; + /*<>*/ caml_call1(Stdlib[53], c); } /*<>*/ return caml_call1(Stdlib[63], Stdlib[40]) /*<>*/ ; } @@ -22471,11 +22360,11 @@ empty_backtrace = /*<>*/ [0], cst_Fatal_error_out_of_memory_ = "Fatal error: out of memory in uncaught exception handler", - _p_ = + p = [0, [11, cst_Fatal_error_exception, [2, 0, [12, 10, 0]]], cst_Fatal_error_exception_s], - _q_ = + q = [0, [11, "Fatal error in uncaught exception handler: exception ", @@ -22492,45 +22381,45 @@ /*<>*/ try{ /*<>*/ caml_call1(Stdlib[103], 0); } - catch(_E_){} + catch(a){} /*<>*/ try{ var - _A_ = + f = /*<>*/ caml_call2 (uncaught_exception_handler[1], exn$0, raw_backtrace), - _z_ = _A_; + b = f; } catch(exn$1){ var exn = /*<>*/ caml_wrap_exception(exn$1), raw_backtrace$0 = /*<>*/ caml_get_exception_raw_backtra(0), - _x_ = /*<>*/ to_string(exn$0); - /*<>*/ caml_call2(Stdlib_Printf[3], _p_, _x_); + d = /*<>*/ to_string(exn$0); + /*<>*/ caml_call2(Stdlib_Printf[3], p, d); /*<>*/ print_raw_backtrace (Stdlib[40], raw_backtrace); - var _y_ = /*<>*/ to_string(exn); - /*<>*/ caml_call2(Stdlib_Printf[3], _q_, _y_); + var e = /*<>*/ to_string(exn); + /*<>*/ caml_call2(Stdlib_Printf[3], q, e); /*<>*/ print_raw_backtrace (Stdlib[40], raw_backtrace$0); var - _z_ = + b = /*<>*/ /*<>*/ caml_call1 (Stdlib[63], Stdlib[40]); } - var _B_ = _z_; + var c = b; } - catch(_D_){ - var _w_ = /*<>*/ caml_wrap_exception(_D_); - if(_w_ !== Stdlib[9]) throw caml_maybe_attach_backtrace(_w_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a !== Stdlib[9]) throw caml_maybe_attach_backtrace(a, 0); var - _B_ = + c = /*<>*/ caml_call1 (Stdlib[53], cst_Fatal_error_out_of_memory_); } - return _B_; + return c; } - catch(_C_){ /*<>*/ return 0;} + catch(a){ /*<>*/ return 0;} /*<>*/ } /*<>*/ runtime.caml_register_named_value ("Printexc.handle_uncaught_exception", handle_uncaught_exception); @@ -22540,7 +22429,7 @@ to_string, to_string_default, print, - catch$0, + catch$, print_backtrace, get_backtrace, runtime.caml_record_backtrace, @@ -22548,7 +22437,7 @@ register_printer, use_printers, raw_backtrace_entries, - function(_v_){ /*<>*/ return caml_get_exception_raw_backtra(_v_);}, + function(a){ /*<>*/ return caml_get_exception_raw_backtra(a);}, print_raw_backtrace, raw_backtrace_to_string, default_uncaught_exception_han, @@ -22562,9 +22451,9 @@ backtrace_slot_defname, format_backtrace_slot], raw_backtrace_length, - function(_u_, _t_){return runtime.caml_raw_backtrace_slot(_u_, _t_);}, - function(_s_){return runtime.caml_convert_raw_backtrace_slot(_s_);}, - function(_r_){return runtime.caml_raw_backtrace_next_slot(_r_);}, + function(b, a){return runtime.caml_raw_backtrace_slot(b, a);}, + function(a){return runtime.caml_convert_raw_backtrace_slot(a);}, + function(a){return runtime.caml_raw_backtrace_next_slot(a);}, exn_slot_id, exn_slot_name, string_of_extension_constructo]; @@ -22598,7 +22487,7 @@ global_data = runtime.caml_get_global_data(), Stdlib_Printexc = global_data.Stdlib__Printexc, Stdlib = global_data.Stdlib; - function const$0(c, param){ + function const$(c, param){ /*<>*/ return c; /*<>*/ } function compose(f, g, x){ @@ -22624,15 +22513,15 @@ /*<>*/ return 0; var exn = /*<>*/ param[2], - _a_ = /*<>*/ caml_call1(Stdlib_Printexc[1], exn); + a = /*<>*/ caml_call1(Stdlib_Printexc[1], exn); /*<>*/ return [0, - caml_call2(Stdlib[28], cst_Fun_Finally_raised, _a_)] /*<>*/ ; + caml_call2(Stdlib[28], cst_Fun_Finally_raised, a)] /*<>*/ ; /*<>*/ }); var dummy = 0; - function protect(finally$0, work){ + function protect(finally$, work){ function finally_no_exn(param){ /*<>*/ try{ - /*<>*/ caml_call1(finally$0, 0); + /*<>*/ caml_call1(finally$, 0); return; } catch(e$0){ @@ -22661,7 +22550,7 @@ var Stdlib_Fun = /*<>*/ [0, - const$0, + const$, compose, flip, negate, @@ -22710,72 +22599,72 @@ Stdlib_Domain = global_data.Stdlib__Domain, Stdlib_Sys = global_data.Stdlib__Sys, Stdlib_Printf = global_data.Stdlib__Printf, - _a_ = + a = [0, [11, "minor_collections: ", [4, 0, 0, 0, [12, 10, 0]]], "minor_collections: %d\n"], - _b_ = + b = [0, [11, "major_collections: ", [4, 0, 0, 0, [12, 10, 0]]], "major_collections: %d\n"], - _c_ = + c = [0, [11, "compactions: ", [4, 0, 0, 0, [12, 10, 0]]], "compactions: %d\n"], - _d_ = + d = [0, [11, "forced_major_collections: ", [4, 0, 0, 0, [12, 10, 0]]], "forced_major_collections: %d\n"], - _e_ = [0, [12, 10, 0], cst], - _f_ = [0, [8, [0, 0, 0], 0, [0, 0], 0], "%.0f"], - _g_ = + e = [0, [12, 10, 0], cst], + f = [0, [8, [0, 0, 0], 0, [0, 0], 0], "%.0f"], + g = [0, [11, "minor_words: ", [8, [0, 0, 0], [1, 1], [0, 0], [12, 10, 0]]], "minor_words: %*.0f\n"], - _h_ = + h = [0, [11, "promoted_words: ", [8, [0, 0, 0], [1, 1], [0, 0], [12, 10, 0]]], "promoted_words: %*.0f\n"], - _i_ = + i = [0, [11, "major_words: ", [8, [0, 0, 0], [1, 1], [0, 0], [12, 10, 0]]], "major_words: %*.0f\n"], - _j_ = [0, [12, 10, 0], cst], - _k_ = [0, [4, 0, 0, 0, 0], "%d"], - _l_ = + j = [0, [12, 10, 0], cst], + k = [0, [4, 0, 0, 0, 0], "%d"], + l = [0, [11, "top_heap_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], "top_heap_words: %*d\n"], - _m_ = + m = [0, [11, "heap_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], "heap_words: %*d\n"], - _n_ = + n = [0, [11, "live_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], "live_words: %*d\n"], - _o_ = + o = [0, [11, "free_words: ", [4, 0, [1, 1], 0, [12, 10, 0]]], "free_words: %*d\n"], - _p_ = + p = [0, [11, "largest_free: ", [4, 0, [1, 1], 0, [12, 10, 0]]], "largest_free: %*d\n"], - _q_ = + q = [0, [11, "fragments: ", [4, 0, [1, 1], 0, [12, 10, 0]]], "fragments: %*d\n"], - _r_ = [0, [12, 10, 0], cst], - _s_ = + r = [0, [12, 10, 0], cst], + s = [0, [11, "live_blocks: ", [4, 0, 0, 0, [12, 10, 0]]], "live_blocks: %d\n"], - _t_ = + t = [0, [11, "free_blocks: ", [4, 0, 0, 0, [12, 10, 0]]], "free_blocks: %d\n"], - _u_ = + u = [0, [11, "heap_chunks: ", [4, 0, 0, 0, [12, 10, 0]]], "heap_chunks: %d\n"]; @@ -22784,35 +22673,35 @@ /*<>*/ } function eventlog_resume(param){ /*<>*/ return 0; /*<>*/ } - function print_stat(c){ + function print_stat(c$0){ var st = /*<>*/ runtime.caml_gc_stat(0); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _a_, st[4]); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _b_, st[5]); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _c_, st[14]); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _d_, st[17]); - /*<>*/ caml_call2(Stdlib_Printf[1], c, _e_); + /*<>*/ caml_call3(Stdlib_Printf[1], c$0, a, st[4]); + /*<>*/ caml_call3(Stdlib_Printf[1], c$0, b, st[5]); + /*<>*/ caml_call3(Stdlib_Printf[1], c$0, c, st[14]); + /*<>*/ caml_call3(Stdlib_Printf[1], c$0, d, st[17]); + /*<>*/ caml_call2(Stdlib_Printf[1], c$0, e); var l1 = /*<>*/ /*<>*/ caml_ml_string_length - ( /*<>*/ caml_call2(Stdlib_Printf[4], _f_, st[1])); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _g_, l1, st[1]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _h_, l1, st[2]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _i_, l1, st[3]); - /*<>*/ caml_call2(Stdlib_Printf[1], c, _j_); + ( /*<>*/ caml_call2(Stdlib_Printf[4], f, st[1])); + /*<>*/ caml_call4(Stdlib_Printf[1], c$0, g, l1, st[1]); + /*<>*/ caml_call4(Stdlib_Printf[1], c$0, h, l1, st[2]); + /*<>*/ caml_call4(Stdlib_Printf[1], c$0, i, l1, st[3]); + /*<>*/ caml_call2(Stdlib_Printf[1], c$0, j); var l2 = /*<>*/ /*<>*/ caml_ml_string_length - ( /*<>*/ caml_call2(Stdlib_Printf[4], _k_, st[15])); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _l_, l2, st[15]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _m_, l2, st[6]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _n_, l2, st[8]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _o_, l2, st[10]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _p_, l2, st[12]); - /*<>*/ caml_call4(Stdlib_Printf[1], c, _q_, l2, st[13]); - /*<>*/ caml_call2(Stdlib_Printf[1], c, _r_); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _s_, st[9]); - /*<>*/ caml_call3(Stdlib_Printf[1], c, _t_, st[11]); - /*<>*/ return caml_call3(Stdlib_Printf[1], c, _u_, st[7]) /*<>*/ ; + ( /*<>*/ caml_call2(Stdlib_Printf[4], k, st[15])); + /*<>*/ caml_call4(Stdlib_Printf[1], c$0, l, l2, st[15]); + /*<>*/ caml_call4(Stdlib_Printf[1], c$0, m, l2, st[6]); + /*<>*/ caml_call4(Stdlib_Printf[1], c$0, n, l2, st[8]); + /*<>*/ caml_call4(Stdlib_Printf[1], c$0, o, l2, st[10]); + /*<>*/ caml_call4(Stdlib_Printf[1], c$0, p, l2, st[12]); + /*<>*/ caml_call4(Stdlib_Printf[1], c$0, q, l2, st[13]); + /*<>*/ caml_call2(Stdlib_Printf[1], c$0, r); + /*<>*/ caml_call3(Stdlib_Printf[1], c$0, s, st[9]); + /*<>*/ caml_call3(Stdlib_Printf[1], c$0, t, st[11]); + /*<>*/ return caml_call3(Stdlib_Printf[1], c$0, u, st[7]) /*<>*/ ; } function allocated_bytes(param){ var @@ -22852,9 +22741,9 @@ /*<>*/ [0, print_stat, allocated_bytes, - function(_x_, _w_){return runtime.caml_final_register(_x_, _w_);}, + function(b, a){return runtime.caml_final_register(b, a);}, runtime.caml_final_register_called_without_value, - function(_v_){return runtime.caml_final_release(_v_);}, + function(a){return runtime.caml_final_release(a);}, create_alarm, delete_alarm, eventlog_pause, @@ -22950,10 +22839,10 @@ /*<>*/ try{ var c = /*<>*/ caml_call1(Stdlib[82], ic); } - catch(_x_){ - var _w_ = /*<>*/ caml_wrap_exception(_x_); - if(_w_ === Stdlib[12]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_w_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[12]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ return [0, c]; /*<>*/ } @@ -22961,10 +22850,10 @@ /*<>*/ try{ var n = /*<>*/ caml_call1(Stdlib[87], ic); } - catch(_v_){ - var _u_ = /*<>*/ caml_wrap_exception(_v_); - if(_u_ === Stdlib[12]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_u_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[12]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ return [0, n]; /*<>*/ } @@ -22972,18 +22861,18 @@ /*<>*/ try{ var s = /*<>*/ caml_call1(Stdlib[83], ic); } - catch(_t_){ - var _s_ = /*<>*/ caml_wrap_exception(_t_); - if(_s_ === Stdlib[12]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_s_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[12]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ return [0, s]; /*<>*/ } var input = /*<>*/ Stdlib[84], cst_input_bigarray = "input_bigarray", - _a_ = [0, 0], - _b_ = [0, 0], + a = [0, 0], + b = [0, 0], cst_really_input_bigarray = "really_input_bigarray", cst_In_channel_input_all_chann = "In_channel.input_all: channel content is larger than maximum string length"; @@ -23001,12 +22890,12 @@ function really_input(ic, buf, pos, len){ /*<>*/ try{ /*<>*/ caml_call4(Stdlib[85], ic, buf, pos, len); - /*<>*/ return _a_; + /*<>*/ return a; } - catch(_r_){ - var _q_ = /*<>*/ caml_wrap_exception(_r_); - if(_q_ === Stdlib[12]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_q_, 0); + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b === Stdlib[12]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(b, 0); } /*<>*/ } function really_input_bigarray(ic, buf, ofs$1, len$1){ @@ -23019,7 +22908,7 @@ var ofs = /*<>*/ ofs$1, len = len$1; for(;;){ /*<>*/ if(0 >= len) - /*<>*/ return _b_; + /*<>*/ return b; var r = /*<>*/ caml_ml_input_bigarray @@ -23040,10 +22929,10 @@ /*<>*/ try{ var s = /*<>*/ caml_call2(Stdlib[86], ic, len); } - catch(_p_){ - var _o_ = /*<>*/ caml_wrap_exception(_p_); - if(_o_ === Stdlib[12]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_o_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[12]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ return [0, s]; /*<>*/ } @@ -23095,13 +22984,13 @@ var chunk_size = /*<>*/ 65536; /*<>*/ try{ var - _k_ = /*<>*/ caml_call1(Stdlib[91], ic), - _l_ = /*<>*/ caml_call1(Stdlib[92], ic) - _k_ | 0, - initial_size = _l_; + d = /*<>*/ caml_call1(Stdlib[91], ic), + e = /*<>*/ caml_call1(Stdlib[92], ic) - d | 0, + initial_size = e; } - catch(_n_){ - var _i_ = /*<>*/ caml_wrap_exception(_n_); - if(_i_[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(_i_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(a, 0); var initial_size = /*<>*/ -1; } var @@ -23122,11 +23011,11 @@ /*<>*/ try{ var c = /*<>*/ caml_call1(Stdlib[82], ic); } - catch(_m_){ - var _j_ = /*<>*/ caml_wrap_exception(_m_); - if(_j_ === Stdlib[12]) + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b === Stdlib[12]) /*<>*/ return caml_call1(Stdlib_Bytes[44], buf) /*<>*/ ; - /*<>*/ throw caml_maybe_attach_backtrace(_j_, 0); + /*<>*/ throw caml_maybe_attach_backtrace(b, 0); } var buf$2 = /*<>*/ ensure(buf, nread, 65537); /*<>*/ runtime.caml_bytes_set(buf$2, nread, c); @@ -23152,10 +23041,10 @@ /*<>*/ try{ var line = /*<>*/ caml_call1(Stdlib[83], ic); } - catch(_h_){ - var _e_ = /*<>*/ caml_wrap_exception(_h_); - if(_e_ === Stdlib[12]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_e_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[12]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } var block = /*<>*/ [0, line, 24029], @@ -23165,9 +23054,9 @@ /*<>*/ try{ var line$0 = /*<>*/ caml_call1(Stdlib[83], ic); } - catch(_g_){ - var _f_ = /*<>*/ caml_wrap_exception(_g_); - if(_f_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_f_, 0); + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b !== Stdlib[12]) throw caml_maybe_attach_backtrace(b, 0); /*<>*/ dst[1 + offset] = 0; /*<>*/ return block; } @@ -23181,10 +23070,10 @@ var accu$0 = /*<>*/ accu; for(;;){ try{var line = /*<>*/ caml_call1(Stdlib[83], ic);} - catch(_d_){ - var _c_ = /*<>*/ caml_wrap_exception(_d_); - if(_c_ === Stdlib[12]) /*<>*/ return accu$0; - /*<>*/ throw caml_maybe_attach_backtrace(_c_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[12]) /*<>*/ return accu$0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } var accu$1 = /*<>*/ caml_call2(f, accu$0, line); /*<>*/ accu$0 = accu$1; @@ -23394,17 +23283,16 @@ function hex_of_string(d){ function char_hex(n){ var - _o_ = - /*<>*/ 10 <= n ? (97 + n | 0) - 10 | 0 : 48 + n | 0; - return caml_call1(Stdlib_Char[1], _o_) /*<>*/ ; + a = /*<>*/ 10 <= n ? (97 + n | 0) - 10 | 0 : 48 + n | 0; + return caml_call1(Stdlib_Char[1], a) /*<>*/ ; } var len = /*<>*/ caml_ml_string_length(d), result = /*<>*/ caml_create_bytes(len * 2 | 0), - _m_ = /*<>*/ len - 1 | 0, - _l_ = 0; - if(_m_ >= 0){ - var i = _l_; + a = /*<>*/ len - 1 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ var x = /*<>*/ caml_string_get(d, i); /*<>*/ /*<>*/ caml_bytes_unsafe_set @@ -23413,9 +23301,9 @@ (result, (i * 2 | 0) + 1 | 0, /*<>*/ char_hex(x & 15)); - var _n_ = /*<>*/ i + 1 | 0; - if(_m_ === i) break; - i = _n_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return caml_call1(Stdlib_Bytes[44], result) /*<>*/ ; @@ -23437,21 +23325,21 @@ function(i){ var i$0 = /*<>*/ 2 * i | 0, - _j_ = + a = /*<>*/ /*<>*/ digit ( /*<>*/ caml_string_get(s, i$0 + 1 | 0)), - _k_ = + b = /*<>*/ ( /*<>*/ digit ( /*<>*/ caml_string_get(s, i$0)) << 4) - + _j_ + + a | 0; - /*<>*/ return caml_call1(Stdlib_Char[1], _k_); + /*<>*/ return caml_call1(Stdlib_Char[1], b); }) /*<>*/ ; } function BLAKE2(X){ - var _a_ = /*<>*/ X[1] < 1 ? 1 : 0, _b_ = _a_ || (64 < X[1] ? 1 : 0); - if(_b_) + var a = /*<>*/ X[1] < 1 ? 1 : 0, b = a || (64 < X[1] ? 1 : 0); + if(b) /*<>*/ caml_call1 (Stdlib[1], cst_Digest_BLAKE2_wrong_hash_s); var @@ -23467,28 +23355,27 @@ (hash_length, cst, b, 0, caml_ml_bytes_length(b)) /*<>*/ ; } function substring(str, ofs, len){ - var _g_ = /*<>*/ ofs < 0 ? 1 : 0; - if(_g_) - var _h_ = _g_; + var a = /*<>*/ ofs < 0 ? 1 : 0; + if(a) + var b = a; else var - _i_ = len < 0 ? 1 : 0, - _h_ = _i_ || ((caml_ml_string_length(str) - len | 0) < ofs ? 1 : 0); - if(_h_) + c = len < 0 ? 1 : 0, + b = c || ((caml_ml_string_length(str) - len | 0) < ofs ? 1 : 0); + if(b) /*<>*/ caml_call1(Stdlib[1], cst_Digest_substring); /*<>*/ return caml_blake2_string (hash_length, cst, str, ofs, len) /*<>*/ ; } function subbytes(b, ofs, len){ - var _d_ = /*<>*/ ofs < 0 ? 1 : 0; - if(_d_) - var _e_ = _d_; + var a = /*<>*/ ofs < 0 ? 1 : 0; + if(a) + var c = a; else var - _f_ = len < 0 ? 1 : 0, - _e_ = _f_ || ((caml_ml_bytes_length(b) - len | 0) < ofs ? 1 : 0); - if(_e_) - /*<>*/ caml_call1(Stdlib[1], cst_Digest_subbytes); + d = len < 0 ? 1 : 0, + c = d || ((caml_ml_bytes_length(b) - len | 0) < ofs ? 1 : 0); + if(c) /*<>*/ caml_call1(Stdlib[1], cst_Digest_subbytes); /*<>*/ return caml_blake2_bytes (hash_length, cst, b, ofs, len) /*<>*/ ; } @@ -23504,12 +23391,12 @@ /*<>*/ if(0 === toread$0) /*<>*/ return caml_blake2_final(ctx, hash_length) /*<>*/ ; var - _c_ = + a = /*<>*/ caml_call2 (Stdlib_Int[10], buf_size, toread$0), n = /*<>*/ caml_call4 - (Stdlib_In_channel[16], ic, buf, 0, _c_); + (Stdlib_In_channel[16], ic, buf, 0, a); /*<>*/ if(0 === n) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[12], 1); @@ -23756,17 +23643,17 @@ /*<>*/ return; } var - _am_ = + a = /*<>*/ caml_check_bound(max, col)[1 + col] - 1 | 0, - _al_ = /*<>*/ 0; - if(_am_ >= 0){ - var j = _al_; + b = /*<>*/ 0; + if(a >= 0){ + var j = b; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); - var _an_ = /*<>*/ j + 1 | 0; - if(_am_ === j) break; - j = _an_; + var c = /*<>*/ j + 1 | 0; + if(a === j) break; + j = c; } } /*<>*/ } @@ -23777,16 +23664,16 @@ /*<>*/ return; } var - _aj_ = /*<>*/ caml_check_bound(max, col)[1 + col], - _ai_ = /*<>*/ 1; - if(_aj_ >= 1){ - var j = _ai_; + a = /*<>*/ caml_check_bound(max, col)[1 + col], + b = /*<>*/ 1; + if(a >= 1){ + var j = b; for(;;){ /*<>*/ caml_check_bound(idx, col)[1 + col] = j; /*<>*/ floop(arr, idx, f, col - 1 | 0, max); - var _ak_ = /*<>*/ j + 1 | 0; - if(_aj_ === j) break; - j = _ak_; + var c = /*<>*/ j + 1 | 0; + if(a === j) break; + j = c; } } /*<>*/ } @@ -23814,30 +23701,30 @@ var n = /*<>*/ caml_ba_num_dims(a), d = /*<>*/ caml_array_make(n, 0), - _af_ = /*<>*/ n - 1 | 0, - _ae_ = 0; - if(_af_ >= 0){ - var i = _ae_; + b = /*<>*/ n - 1 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ - var _ag_ = /*<>*/ runtime.caml_ba_dim(a, i); - /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; - var _ah_ = /*<>*/ i + 1 | 0; - if(_af_ === i) break; - i = _ah_; + var e = /*<>*/ runtime.caml_ba_dim(a, i); + /*<>*/ caml_check_bound(d, i)[1 + i] = e; + var f = /*<>*/ i + 1 | 0; + if(b === i) break; + i = f; } } /*<>*/ return d; /*<>*/ } function size_in_bytes(arr){ var - _ac_ = /*<>*/ dims(arr), - _ad_ = + a = /*<>*/ dims(arr), + b = /*<>*/ caml_call3 - (Stdlib_Array[18], caml_mul, 1, _ac_); + (Stdlib_Array[18], caml_mul, 1, a); /*<>*/ return /*<>*/ caml_mul ( /*<>*/ kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _ad_) /*<>*/ ; + b) /*<>*/ ; } function create(kind, layout){ /*<>*/ return caml_ba_create(kind, layout, [0]) /*<>*/ ; @@ -23846,9 +23733,9 @@ /*<>*/ return runtime.caml_ba_get_generic(arr, [0]) /*<>*/ ; } function set(arr){ - var _aa_ = /*<>*/ [0]; - return function(_ab_){ - /*<>*/ return caml_ba_set_generic(arr, _aa_, _ab_);} /*<>*/ ; + var a = /*<>*/ [0]; + return function(b){ + /*<>*/ return caml_ba_set_generic(arr, a, b);} /*<>*/ ; /*<>*/ } function size_in_bytes$0(arr){ /*<>*/ return /*<>*/ kind_size_in_bytes @@ -23863,11 +23750,11 @@ /*<>*/ return caml_ba_create(kind, layout, [0, dim]) /*<>*/ ; } function size_in_bytes$1(arr){ - var _$_ = /*<>*/ caml_ba_dim_1(arr); + var a = /*<>*/ caml_ba_dim_1(arr); /*<>*/ return /*<>*/ caml_mul ( /*<>*/ kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _$_) /*<>*/ ; + a) /*<>*/ ; } function slice(a, n){ /*<>*/ return runtime.caml_ba_layout(a) @@ -23877,28 +23764,28 @@ function init$0(kind, layout, dim, f){ var arr = /*<>*/ create$0(kind, layout, dim); /*<>*/ if(layout){ - var _Z_ = /*<>*/ 1; + var d = /*<>*/ 1; if(dim >= 1){ - var i$0 = _Z_; + var i$0 = d; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i$0, /*<>*/ caml_call1(f, i$0)); - var ___ = /*<>*/ i$0 + 1 | 0; + var e = /*<>*/ i$0 + 1 | 0; if(dim === i$0) break; - i$0 = ___; + i$0 = e; } } /*<>*/ return arr; } - var _X_ = /*<>*/ dim - 1 | 0, _W_ = 0; - if(_X_ >= 0){ - var i = _W_; + var a = /*<>*/ dim - 1 | 0, b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (arr, i, /*<>*/ caml_call1(f, i)); - var _Y_ = /*<>*/ i + 1 | 0; - if(_X_ === i) break; - i = _Y_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return arr; @@ -23907,18 +23794,18 @@ var ba = /*<>*/ create$0(kind, layout, data.length - 1), ofs = /*<>*/ layout ? 1 : 0, - _U_ = /*<>*/ data.length - 2 | 0, - _T_ = 0; - if(_U_ >= 0){ - var i = _T_; + a = /*<>*/ data.length - 2 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ /*<>*/ caml_ba_set_1 (ba, i + ofs | 0, /*<>*/ caml_check_bound(data, i)[1 + i]); - var _V_ = /*<>*/ i + 1 | 0; - if(_U_ === i) break; - i = _V_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return ba; @@ -23929,14 +23816,14 @@ } function size_in_bytes$2(arr){ var - _R_ = /*<>*/ caml_ba_dim_2(arr), - _S_ = /*<>*/ caml_ba_dim_1(arr); + a = /*<>*/ caml_ba_dim_2(arr), + b = /*<>*/ caml_ba_dim_1(arr); /*<>*/ return /*<>*/ caml_mul (caml_mul ( /*<>*/ kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _S_), - _R_) /*<>*/ ; + b), + a) /*<>*/ ; } function slice_left(a, n){ /*<>*/ return caml_ba_slice(a, [0, n]) /*<>*/ ; @@ -23947,46 +23834,46 @@ function init$1(kind, layout, dim1, dim2, f){ var arr = /*<>*/ create$1(kind, layout, dim1, dim2); /*<>*/ if(layout){ - var _N_ = /*<>*/ 1; + var h = /*<>*/ 1; if(dim2 >= 1){ - var j$0 = _N_; + var j$0 = h; for(;;){ - var _O_ = /*<>*/ 1; + var k = /*<>*/ 1; if(dim1 >= 1){ - var i$0 = _O_; + var i$0 = k; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); - var _Q_ = /*<>*/ i$0 + 1 | 0; + var m = /*<>*/ i$0 + 1 | 0; if(dim1 === i$0) break; - i$0 = _Q_; + i$0 = m; } } - var _P_ = /*<>*/ j$0 + 1 | 0; + var l = /*<>*/ j$0 + 1 | 0; if(dim2 === j$0) break; - j$0 = _P_; + j$0 = l; } } /*<>*/ return arr; } - var _I_ = /*<>*/ dim1 - 1 | 0, _H_ = 0; - if(_I_ >= 0){ - var i = _H_; + var a = /*<>*/ dim1 - 1 | 0, c = 0; + if(a >= 0){ + var i = c; for(;;){ - var _K_ = /*<>*/ dim2 - 1 | 0, _J_ = 0; - if(_K_ >= 0){ - var j = _J_; + var b = /*<>*/ dim2 - 1 | 0, d = 0; + if(b >= 0){ + var j = d; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (arr, i, j, /*<>*/ caml_call2(f, i, j)); - var _M_ = /*<>*/ j + 1 | 0; - if(_K_ === j) break; - j = _M_; + var g = /*<>*/ j + 1 | 0; + if(b === j) break; + j = g; } } - var _L_ = /*<>*/ i + 1 | 0; - if(_I_ === i) break; - i = _L_; + var e = /*<>*/ i + 1 | 0; + if(a === i) break; + i = e; } } /*<>*/ return arr; @@ -24000,32 +23887,32 @@ : /*<>*/ caml_check_bound(data, 0)[1].length - 1, ba = /*<>*/ create$1(kind, layout, dim1, dim2), ofs = /*<>*/ layout ? 1 : 0, - _C_ = /*<>*/ dim1 - 1 | 0, - _B_ = 0; - if(_C_ >= 0){ - var i = _B_; + a = /*<>*/ dim1 - 1 | 0, + c = 0; + if(a >= 0){ + var i = c; for(;;){ var row = /*<>*/ caml_check_bound(data, i)[1 + i]; /*<>*/ if(row.length - 1 !== dim2) /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array2_of_array_n); - var _E_ = /*<>*/ dim2 - 1 | 0, _D_ = 0; - if(_E_ >= 0){ - var j = _D_; + var b = /*<>*/ dim2 - 1 | 0, d = 0; + if(b >= 0){ + var j = d; for(;;){ /*<>*/ /*<>*/ caml_ba_set_2 (ba, i + ofs | 0, j + ofs | 0, /*<>*/ caml_check_bound(row, j)[1 + j]); - var _G_ = /*<>*/ j + 1 | 0; - if(_E_ === j) break; - j = _G_; + var f = /*<>*/ j + 1 | 0; + if(b === j) break; + j = f; } } - var _F_ = /*<>*/ i + 1 | 0; - if(_C_ === i) break; - i = _F_; + var e = /*<>*/ i + 1 | 0; + if(a === i) break; + i = e; } } /*<>*/ return ba; @@ -24036,17 +23923,17 @@ } function size_in_bytes$3(arr){ var - _y_ = /*<>*/ runtime.caml_ba_dim_3(arr), - _z_ = /*<>*/ caml_ba_dim_2(arr), - _A_ = /*<>*/ caml_ba_dim_1(arr); + a = /*<>*/ runtime.caml_ba_dim_3(arr), + b = /*<>*/ caml_ba_dim_2(arr), + c = /*<>*/ caml_ba_dim_1(arr); /*<>*/ return /*<>*/ caml_mul (caml_mul (caml_mul ( /*<>*/ kind_size_in_bytes ( /*<>*/ caml_ba_kind(arr)), - _A_), - _z_), - _y_) /*<>*/ ; + c), + b), + a) /*<>*/ ; } function slice_left_1(a, n, m){ /*<>*/ return caml_ba_slice(a, [0, n, m]) /*<>*/ ; @@ -24065,17 +23952,17 @@ arr = /*<>*/ create$2(kind, layout, dim1, dim2, dim3); /*<>*/ if(layout){ - var _s_ = /*<>*/ 1; + var n = /*<>*/ 1; if(dim3 >= 1){ - var k$0 = _s_; + var k$0 = n; for(;;){ - var _t_ = /*<>*/ 1; + var o = /*<>*/ 1; if(dim2 >= 1){ - var j$0 = _t_; + var j$0 = o; for(;;){ - var _v_ = /*<>*/ 1; + var q = /*<>*/ 1; if(dim1 >= 1){ - var i$0 = _v_; + var i$0 = q; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, @@ -24083,50 +23970,50 @@ j$0, k$0, /*<>*/ caml_call3(f, i$0, j$0, k$0)); - var _x_ = /*<>*/ i$0 + 1 | 0; + var s = /*<>*/ i$0 + 1 | 0; if(dim1 === i$0) break; - i$0 = _x_; + i$0 = s; } } - var _w_ = /*<>*/ j$0 + 1 | 0; + var r = /*<>*/ j$0 + 1 | 0; if(dim2 === j$0) break; - j$0 = _w_; + j$0 = r; } } - var _u_ = /*<>*/ k$0 + 1 | 0; + var p = /*<>*/ k$0 + 1 | 0; if(dim3 === k$0) break; - k$0 = _u_; + k$0 = p; } } /*<>*/ return arr; } - var _k_ = /*<>*/ dim1 - 1 | 0, _j_ = 0; - if(_k_ >= 0){ - var i = _j_; + var a = /*<>*/ dim1 - 1 | 0, d = 0; + if(a >= 0){ + var i = d; for(;;){ - var _m_ = /*<>*/ dim2 - 1 | 0, _l_ = 0; - if(_m_ >= 0){ - var j = _l_; + var b = /*<>*/ dim2 - 1 | 0, e = 0; + if(b >= 0){ + var j = e; for(;;){ - var _p_ = /*<>*/ dim3 - 1 | 0, _o_ = 0; - if(_p_ >= 0){ - var k = _o_; + var c = /*<>*/ dim3 - 1 | 0, h = 0; + if(c >= 0){ + var k = h; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); - var _r_ = /*<>*/ k + 1 | 0; - if(_p_ === k) break; - k = _r_; + var m = /*<>*/ k + 1 | 0; + if(c === k) break; + k = m; } } - var _q_ = /*<>*/ j + 1 | 0; - if(_m_ === j) break; - j = _q_; + var l = /*<>*/ j + 1 | 0; + if(b === j) break; + j = l; } } - var _n_ = /*<>*/ i + 1 | 0; - if(_k_ === i) break; - i = _n_; + var g = /*<>*/ i + 1 | 0; + if(a === i) break; + i = g; } } /*<>*/ return arr; @@ -24147,26 +24034,26 @@ - 1, ba = /*<>*/ create$2(kind, layout, dim1, dim2, dim3), ofs = /*<>*/ layout ? 1 : 0, - _b_ = /*<>*/ dim1 - 1 | 0, - _a_ = 0; - if(_b_ >= 0){ - var i = _a_; + a = /*<>*/ dim1 - 1 | 0, + d = 0; + if(a >= 0){ + var i = d; for(;;){ var row = /*<>*/ caml_check_bound(data, i)[1 + i]; /*<>*/ if(row.length - 1 !== dim2) /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n); - var _d_ = /*<>*/ dim2 - 1 | 0, _c_ = 0; - if(_d_ >= 0){ - var j = _c_; + var b = /*<>*/ dim2 - 1 | 0, e = 0; + if(b >= 0){ + var j = e; for(;;){ var col = /*<>*/ caml_check_bound(row, j)[1 + j]; /*<>*/ if(col.length - 1 !== dim3) /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n$0); - var _g_ = /*<>*/ dim3 - 1 | 0, _f_ = 0; - if(_g_ >= 0){ - var k = _f_; + var c = /*<>*/ dim3 - 1 | 0, g = 0; + if(c >= 0){ + var k = g; for(;;){ /*<>*/ /*<>*/ caml_ba_set_3 (ba, @@ -24174,19 +24061,19 @@ j + ofs | 0, k + ofs | 0, /*<>*/ caml_check_bound(col, k)[1 + k]); - var _i_ = /*<>*/ k + 1 | 0; - if(_g_ === k) break; - k = _i_; + var l = /*<>*/ k + 1 | 0; + if(c === k) break; + k = l; } } - var _h_ = /*<>*/ j + 1 | 0; - if(_d_ === j) break; - j = _h_; + var h = /*<>*/ j + 1 | 0; + if(b === j) break; + j = h; } } - var _e_ = /*<>*/ i + 1 | 0; - if(_b_ === i) break; - i = _e_; + var f = /*<>*/ i + 1 | 0; + if(a === i) break; + i = f; } } /*<>*/ return ba; @@ -24353,21 +24240,21 @@ Stdlib_String = global_data.Stdlib__String, Stdlib_Bigarray = global_data.Stdlib__Bigarray, Stdlib_Nativeint = global_data.Stdlib__Nativeint, - _a_ = caml_int64_create_lo_mi_hi(1, 0, 0), - _b_ = caml_int64_create_lo_mi_hi(0, 0, 0), - _c_ = caml_int64_create_lo_mi_hi(0, 0, 0), - _d_ = caml_int64_create_lo_mi_hi(2, 0, 0), - _e_ = caml_int64_create_lo_mi_hi(1, 0, 0); + a = caml_int64_create_lo_mi_hi(1, 0, 0), + b = caml_int64_create_lo_mi_hi(0, 0, 0), + c = caml_int64_create_lo_mi_hi(0, 0, 0), + d = caml_int64_create_lo_mi_hi(2, 0, 0), + e = caml_int64_create_lo_mi_hi(1, 0, 0); function create(param){ /*<>*/ return caml_call3(Stdlib_Bigarray[20][1], 7, 0, 4) /*<>*/ ; } function set(s, i1, i2, i3, i4){ /*<>*/ /*<>*/ caml_ba_set_1 - (s, 0, /*<>*/ runtime.caml_int64_or(i1, _a_)); + (s, 0, /*<>*/ runtime.caml_int64_or(i1, a)); /*<>*/ caml_ba_set_1(s, 1, i2); - var i3$0 = /*<>*/ caml_notequal(i3, _b_) ? i3 : _e_; + var i3$0 = /*<>*/ caml_notequal(i3, b) ? i3 : e; /*<>*/ caml_ba_set_1(s, 2, i3$0); - var i4$0 = /*<>*/ caml_notequal(i4, _c_) ? i4 : _d_; + var i4$0 = /*<>*/ caml_notequal(i4, c) ? i4 : d; /*<>*/ return caml_ba_set_1(s, 3, i4$0) /*<>*/ ; } function mk(i1, i2, i3, i4){ @@ -24390,34 +24277,34 @@ serialization_prefix_len); var i = /*<>*/ 0; for(;;){ - var _y_ = /*<>*/ runtime.caml_ba_get_1(s, i); + var a = /*<>*/ runtime.caml_ba_get_1(s, i); /*<>*/ caml_call3 - (Stdlib_Bytes[86], buf, 5 + (i * 8 | 0) | 0, _y_); - var _z_ = /*<>*/ i + 1 | 0; + (Stdlib_Bytes[86], buf, 5 + (i * 8 | 0) | 0, a); + var b = /*<>*/ i + 1 | 0; if(3 === i) /*<>*/ return caml_call1(Stdlib_Bytes[44], buf) /*<>*/ ; - /*<>*/ i = _z_; + /*<>*/ i = b; } /*<>*/ } function of_binary_string(buf){ var - _v_ = + a = /*<>*/ runtime.caml_ml_string_length(buf) !== 37 ? 1 : 0, - _w_ = - _v_ + b = + a || 1 - /*<>*/ caml_call2 (Stdlib_String[11], serialization_prefix, buf); - /*<>*/ if(_w_){ + /*<>*/ if(b){ var - _x_ = + c = /*<>*/ caml_call2 (Stdlib[28], cst_Random_State_of_binary_str, Stdlib_Sys[46]); - /*<>*/ caml_call1(Stdlib[2], _x_); + /*<>*/ caml_call1(Stdlib[2], c); } var i1 = /*<>*/ caml_call2(Stdlib_String[64], buf, 5), @@ -24435,19 +24322,19 @@ var n = /*<>*/ seed.length - 1, b = /*<>*/ caml_create_bytes((n * 8 | 0) + 1 | 0), - _p_ = /*<>*/ n - 1 | 0, - _o_ = 0; - if(_p_ >= 0){ - var i = _o_; + a = /*<>*/ n - 1 | 0, + c = 0; + if(a >= 0){ + var i = c; for(;;){ var - _t_ = + g = /*<>*/ /*<>*/ caml_int64_of_int32 ( /*<>*/ runtime.caml_check_bound(seed, i)[1 + i]); - /*<>*/ caml_call3(Stdlib_Bytes[86], b, i * 8 | 0, _t_); - var _u_ = /*<>*/ i + 1 | 0; - if(_p_ === i) break; - i = _u_; + /*<>*/ caml_call3(Stdlib_Bytes[86], b, i * 8 | 0, g); + var h = /*<>*/ i + 1 | 0; + if(a === i) break; + i = h; } } /*<>*/ caml_bytes_set(b, n * 8 | 0, 1); @@ -24455,15 +24342,15 @@ /*<>*/ caml_bytes_set(b, n * 8 | 0, 2); var d2 = /*<>*/ caml_call1(Stdlib_Digest[4], b), - _q_ = /*<>*/ caml_call2(Stdlib_String[64], d2, 8), - _r_ = /*<>*/ caml_call2(Stdlib_String[64], d2, 0), - _s_ = /*<>*/ caml_call2(Stdlib_String[64], d1, 8); + d = /*<>*/ caml_call2(Stdlib_String[64], d2, 8), + e = /*<>*/ caml_call2(Stdlib_String[64], d2, 0), + f = /*<>*/ caml_call2(Stdlib_String[64], d1, 8); /*<>*/ return /*<>*/ set (s, /*<>*/ caml_call2(Stdlib_String[64], d1, 0), - _s_, - _r_, - _q_) /*<>*/ ; + f, + e, + d) /*<>*/ ; } function make(seed){ var s = /*<>*/ create(0); @@ -24499,7 +24386,7 @@ /*<>*/ return v; } /*<>*/ } - function int$0(s, bound){ + function int$(s, bound){ /*<>*/ if(1073741823 >= bound && 0 < bound) /*<>*/ return int_aux(s, bound, max_int31) /*<>*/ ; /*<>*/ return caml_call1(Stdlib[1], cst_Random_int) /*<>*/ ; @@ -24509,11 +24396,11 @@ /*<>*/ return caml_call1 (Stdlib[1], cst_Random_full_int) /*<>*/ ; var - _n_ = + a = /*<>*/ bound <= 1073741823 ? max_int31 : bound <= 2147483647 ? max_int32 : Stdlib[19]; - return int_aux(s, bound, _n_) /*<>*/ ; + return int_aux(s, bound, a) /*<>*/ ; } function int_in_range_aux(s, min, max, mask, nbits){ var span = /*<>*/ (max - min | 0) + 1 | 0; @@ -24585,8 +24472,8 @@ /*<>*/ } var bits64 = /*<>*/ caml_lxm_next, - _f_ = caml_int64_create_lo_mi_hi(1, 0, 0), - _g_ = caml_int64_create_lo_mi_hi(0, 0, 0), + f = caml_int64_create_lo_mi_hi(1, 0, 0), + g = caml_int64_create_lo_mi_hi(0, 0, 0), cst_Random_int64 = "Random.int64", cst_Random_int64_in_range = "Random.int64_in_range"; function int64aux(s, n){ @@ -24601,12 +24488,12 @@ caml_greaterthan (caml_int64_sub(r, v), /*<>*/ caml_int64_add - ( /*<>*/ caml_int64_sub(Stdlib_Int64[9], n), _f_))) + ( /*<>*/ caml_int64_sub(Stdlib_Int64[9], n), f))) /*<>*/ return v; } /*<>*/ } function int64(s, bound){ - /*<>*/ return caml_lessequal(bound, _g_) + /*<>*/ return caml_lessequal(bound, g) ? /*<>*/ caml_call1(Stdlib[1], cst_Random_int64) : /*<>*/ int64aux(s, bound) /*<>*/ ; } @@ -24631,12 +24518,12 @@ } /*<>*/ } var - _j_ = /*<>*/ caml_int64_create_lo_mi_hi(14371852, 15349651, 22696), - _k_ = caml_int64_create_lo_mi_hi(12230193, 11438743, 35013), - _l_ = caml_int64_create_lo_mi_hi(1424933, 15549263, 2083), - _m_ = caml_int64_create_lo_mi_hi(9492471, 4696708, 43520), - _h_ = caml_int64_create_lo_mi_hi(0, 0, 0), - _i_ = caml_int64_create_lo_mi_hi(0, 0, 0), + j = /*<>*/ caml_int64_create_lo_mi_hi(14371852, 15349651, 22696), + k = caml_int64_create_lo_mi_hi(12230193, 11438743, 35013), + l = caml_int64_create_lo_mi_hi(1424933, 15549263, 2083), + m = caml_int64_create_lo_mi_hi(9492471, 4696708, 43520), + h = caml_int64_create_lo_mi_hi(0, 0, 0), + i = caml_int64_create_lo_mi_hi(0, 0, 0), nativebits = 32 === Stdlib_Nativeint[9] ? function @@ -24674,19 +24561,19 @@ /*<>*/ caml_int64_of_int32(min), /*<>*/ caml_int64_of_int32(max))) /*<>*/ ; }; - function float$0(s, bound){ + function float$(s, bound){ /*<>*/ for(;;){ var b = /*<>*/ caml_lxm_next(s), n = /*<>*/ caml_int64_shift_right_unsigne(b, 11); - /*<>*/ if(caml_notequal(n, _h_)) + /*<>*/ if(caml_notequal(n, h)) /*<>*/ return runtime.caml_int64_to_float(n) * 1.1102230246251565e-16 * bound /*<>*/ ; } } function bool(s){ - /*<>*/ return caml_lessthan(caml_lxm_next(s), _i_) /*<>*/ ; + /*<>*/ return caml_lessthan(caml_lxm_next(s), i) /*<>*/ ; } function split(s){ var @@ -24697,7 +24584,7 @@ /*<>*/ return mk(i1, i2, i3, i4) /*<>*/ ; } function mk_default(param){ - /*<>*/ return mk(_m_, _l_, _k_, _j_) /*<>*/ ; + /*<>*/ return mk(m, l, k, j) /*<>*/ ; } var random_key = @@ -24708,8 +24595,8 @@ ( /*<>*/ caml_call1 (Stdlib_Domain[11][2], random_key)) /*<>*/ ; } - function int$1(bound){ - /*<>*/ return /*<>*/ int$0 + function int$0(bound){ + /*<>*/ return /*<>*/ int$ ( /*<>*/ caml_call1 (Stdlib_Domain[11][2], random_key), bound) /*<>*/ ; @@ -24766,8 +24653,8 @@ min, max) /*<>*/ ; } - function float$1(scale){ - /*<>*/ return /*<>*/ float$0 + function float$0(scale){ + /*<>*/ return /*<>*/ float$ ( /*<>*/ caml_call1 (Stdlib_Domain[11][2], random_key), scale) /*<>*/ ; @@ -24829,7 +24716,7 @@ full_init, self_init, bits$0, - int$1, + int$0, full_int$0, int_in_range$0, int32$0, @@ -24838,7 +24725,7 @@ nativeint_in_range$0, int64$0, int64_in_range$0, - float$1, + float$0, bool$0, bits32$0, bits64$0, @@ -24848,7 +24735,7 @@ make_self_init, copy, bits, - int$0, + int$, full_int, int_in_range, int32, @@ -24857,7 +24744,7 @@ nativeint_in_range, int64, int64_in_range, - float$0, + float$, bool, bits32, bits64, @@ -24909,7 +24796,7 @@ } var global_data = runtime.caml_get_global_data(), - _d_ = [0, 0], + d = [0, 0], cst = "", Stdlib_Sys = global_data.Stdlib__Sys, Stdlib = global_data.Stdlib, @@ -24923,9 +24810,9 @@ var Stdlib_String = global_data.Stdlib__String; function ongoing_traversal(h){ var - _an_ = /*<>*/ h.length - 1 < 4 ? 1 : 0, - _ao_ = _an_ || (h[4] < 0 ? 1 : 0); - return _ao_; + a = /*<>*/ h.length - 1 < 4 ? 1 : 0, + b = a || (h[4] < 0 ? 1 : 0); + return b; /*<>*/ } function flip_ongoing_traversal(h){ /*<>*/ h[4] = - h[4] | 0; @@ -24936,23 +24823,21 @@ /*<>*/ "Hashtbl: unsupported hash table format"; try{ var - _f_ = /*<>*/ caml_sys_getenv("OCAMLRUNPARAM"), - params = _f_; + f = /*<>*/ caml_sys_getenv("OCAMLRUNPARAM"), + params = f; } - catch(_al_){ - var _a_ = /*<>*/ caml_wrap_exception(_al_); - if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); + catch(d){ + var a = /*<>*/ caml_wrap_exception(d); + if(a !== Stdlib[8]) throw caml_maybe_attach_backtrace(a, 0); /*<>*/ try{ - var - _e_ = /*<>*/ caml_sys_getenv("CAMLRUNPARAM"), - _c_ = _e_; + var e = /*<>*/ caml_sys_getenv("CAMLRUNPARAM"), c = e; } - catch(_am_){ - var _b_ = /*<>*/ caml_wrap_exception(_am_); - if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); - var _c_ = /*<>*/ cst; + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b !== Stdlib[8]) throw caml_maybe_attach_backtrace(b, 0); + var c = /*<>*/ cst; } - var params = /*<>*/ _c_; + var params = /*<>*/ c; } var randomized_default = @@ -24990,24 +24875,23 @@ s = /*<>*/ power_2_above(16, initial_size); /*<>*/ if(random) var - _ak_ = - /*<>*/ caml_call1(Stdlib_Domain[11][2], prng_key), + a = /*<>*/ caml_call1(Stdlib_Domain[11][2], prng_key), seed = /*<>*/ /*<>*/ caml_call1 - (Stdlib_Random[19][4], _ak_); + (Stdlib_Random[19][4], a); else var seed = /*<>*/ 0; /*<>*/ return [0, 0, caml_array_make(s, 0), seed, s] /*<>*/ ; /*<>*/ } function clear(h){ - var _aj_ = /*<>*/ 0 < h[1] ? 1 : 0; - return _aj_ + var a = /*<>*/ 0 < h[1] ? 1 : 0; + return a ? (h [1] = 0, /*<>*/ caml_call4 (Stdlib_Array[8], h[2], 0, h[2].length - 1, 0)) - : _aj_ /*<>*/ ; + : a /*<>*/ ; } function reset(h){ var len = /*<>*/ h[2].length - 1; @@ -25046,10 +24930,10 @@ /*<>*/ } function copy(h){ var - _ag_ = /*<>*/ h[4], - _ah_ = h[3], - _ai_ = caml_call2(Stdlib_Array[14], copy_bucketlist, h[2]); - /*<>*/ return [0, h[1], _ai_, _ah_, _ag_]; + a = /*<>*/ h[4], + b = h[3], + c = caml_call2(Stdlib_Array[14], copy_bucketlist, h[2]); + /*<>*/ return [0, h[1], c, b, a]; /*<>*/ } function length(h){ /*<>*/ return h[1]; @@ -25058,10 +24942,10 @@ var nsize = /*<>*/ ndata.length - 1, ndata_tail = /*<>*/ caml_array_make(nsize, 0), - _aa_ = /*<>*/ odata.length - 2 | 0, - _$_ = 0; - if(_aa_ >= 0){ - var i$0 = _$_; + a = /*<>*/ odata.length - 2 | 0, + d = 0; + if(a >= 0){ + var i$0 = d; for(;;){ var cell$1 = @@ -25086,39 +24970,39 @@ = cell$0; /*<>*/ cell = next; } - var _af_ = /*<>*/ i$0 + 1 | 0; - if(_aa_ === i$0) break; - i$0 = _af_; + var g = /*<>*/ i$0 + 1 | 0; + if(a === i$0) break; + i$0 = g; } } /*<>*/ if(inplace){ - var _ac_ = /*<>*/ nsize - 1 | 0, _ab_ = 0; - if(_ac_ >= 0){ - var i = _ab_; + var b = /*<>*/ nsize - 1 | 0, e = 0; + if(b >= 0){ + var i = e; for(;;){ var match$0 = /*<>*/ caml_check_bound(ndata_tail, i)[1 + i]; /*<>*/ if(match$0) /*<>*/ match$0[3] = 0; - var _ae_ = /*<>*/ i + 1 | 0; - if(_ac_ === i) break; - i = _ae_; + var f = /*<>*/ i + 1 | 0; + if(b === i) break; + i = f; } } - var _ad_ = /*<>*/ 0; + var c = /*<>*/ 0; } else - var _ad_ = /*<>*/ inplace; - return _ad_; + var c = /*<>*/ inplace; + return c; /*<>*/ } function resize(indexfun, h){ var odata = /*<>*/ h[2], osize = /*<>*/ odata.length - 1, nsize = /*<>*/ osize * 2 | 0, - ___ = /*<>*/ nsize < Stdlib_Sys[13] ? 1 : 0; - if(! ___) return ___; + a = /*<>*/ nsize < Stdlib_Sys[13] ? 1 : 0; + if(! a) return a; var ndata = /*<>*/ caml_array_make(nsize, 0), inplace = /*<>*/ 1 - ongoing_traversal(h); @@ -25134,9 +25018,9 @@ /*<>*/ if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); /*<>*/ try{ - var d = h[2], _W_ = /*<>*/ d.length - 2 | 0, _V_ = 0; - if(_W_ >= 0){ - var i = _V_; + var d = h[2], a = /*<>*/ d.length - 2 | 0, c = 0; + if(a >= 0){ + var i = c; for(;;){ var param = @@ -25149,15 +25033,15 @@ /*<>*/ caml_call2(f, key, data); /*<>*/ param = next; } - var _Z_ = /*<>*/ i + 1 | 0; - if(_W_ === i) break; - i = _Z_; + var g = /*<>*/ i + 1 | 0; + if(a === i) break; + i = g; } } var - _X_ = /*<>*/ 1 - old_trav, - _Y_ = _X_ ? /*<>*/ flip_ongoing_traversal(h) : _X_; - return _Y_; + b = /*<>*/ 1 - old_trav, + e = b ? /*<>*/ flip_ongoing_traversal(h) : b; + return e; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); @@ -25174,9 +25058,9 @@ /*<>*/ if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); /*<>*/ try{ - var _R_ = d.length - 2 | 0, _Q_ = 0; - if(_R_ >= 0){ - var i = _Q_; + var a = d.length - 2 | 0, c = 0; + if(a >= 0){ + var i = c; for(;;){ var slot$0 = /*<>*/ caml_check_bound(h[2], i)[1 + i], @@ -25208,15 +25092,15 @@ /*<>*/ prec[3] = 0; else /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; - var _U_ = /*<>*/ i + 1 | 0; - if(_R_ === i) break; - i = _U_; + var g = /*<>*/ i + 1 | 0; + if(a === i) break; + i = g; } } var - _S_ = /*<>*/ 1 - old_trav, - _T_ = _S_ ? /*<>*/ flip_ongoing_traversal(h) : _S_; - return _T_; + b = /*<>*/ 1 - old_trav, + e = b ? /*<>*/ flip_ongoing_traversal(h) : b; + return e; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); @@ -25234,10 +25118,10 @@ var d = h[2], accu$1 = /*<>*/ [0, init], - _N_ = /*<>*/ d.length - 2 | 0, - _M_ = 0; - if(_N_ >= 0){ - var i = _M_; + a = /*<>*/ d.length - 2 | 0, + c = 0; + if(a >= 0){ + var i = c; for(;;){ var accu$2 = /*<>*/ accu$1[1], @@ -25255,15 +25139,15 @@ accu = accu$0; } /*<>*/ accu$1[1] = accu; - var _P_ = i + 1 | 0; - if(_N_ === i) break; - i = _P_; + var g = i + 1 | 0; + if(a === i) break; + i = g; } } /*<>*/ if(1 - old_trav) /*<>*/ flip_ongoing_traversal(h); - var _O_ = /*<>*/ accu$1[1]; - return _O_; + var e = /*<>*/ accu$1[1]; + return e; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); @@ -25290,8 +25174,8 @@ /*<>*/ caml_call3 (Stdlib_Array[18], function(m, b){ - var _L_ = /*<>*/ bucket_length(0, b); - /*<>*/ return caml_call2(Stdlib_Int[11], m, _L_); + var a = /*<>*/ bucket_length(0, b); + /*<>*/ return caml_call2(Stdlib_Int[11], m, a); }, 0, h[2]), @@ -25316,8 +25200,8 @@ var key = buck$0[1], data = buck$0[2], next = buck$0[3]; /*<>*/ return [0, [0, key, data], - function(_K_){ - /*<>*/ return aux(i$0, next, _K_); + function(a){ + /*<>*/ return aux(i$0, next, a); }] /*<>*/ ; } /*<>*/ if(i$0 === tbl_data.length - 1) @@ -25330,24 +25214,24 @@ buck$0 = buck$1; } /*<>*/ } - var _H_ = /*<>*/ 0, _I_ = 0; - return function(_J_){ - /*<>*/ return aux(_I_, _H_, _J_);} /*<>*/ ; + var a = /*<>*/ 0, b = 0; + return function(c){ + /*<>*/ return aux(b, a, c);} /*<>*/ ; /*<>*/ } function to_seq_keys(m){ - var _F_ = /*<>*/ to_seq(m); + var a = /*<>*/ to_seq(m); /*<>*/ return caml_call2 - (Stdlib_Seq[29], function(_G_){ /*<>*/ return _G_[1];}, _F_) /*<>*/ ; + (Stdlib_Seq[29], function(a){ /*<>*/ return a[1];}, a) /*<>*/ ; } function to_seq_values(m){ - var _D_ = /*<>*/ to_seq(m); + var a = /*<>*/ to_seq(m); /*<>*/ return caml_call2 - (Stdlib_Seq[29], function(_E_){ /*<>*/ return _E_[2];}, _D_) /*<>*/ ; + (Stdlib_Seq[29], function(a){ /*<>*/ return a[2];}, a) /*<>*/ ; } function MakeSeeded(H){ function key_index(h, key){ - var _C_ = /*<>*/ h[2].length - 2 | 0; - return caml_call2(H[2], h[3], key) & _C_ /*<>*/ ; + var a = /*<>*/ h[2].length - 2 | 0; + return caml_call2(H[2], h[3], key) & a /*<>*/ ; /*<>*/ } function add(h, key, data){ var @@ -25359,8 +25243,8 @@ caml_check_bound(h[2], i)[1 + i]]; /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; /*<>*/ h[1] = h[1] + 1 | 0; - var _B_ = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _B_ ? /*<>*/ resize(key_index, h) : _B_ /*<>*/ ; + var a = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; + return a ? /*<>*/ resize(key_index, h) : a /*<>*/ ; } function remove(h, key){ var @@ -25388,8 +25272,8 @@ /*<>*/ } function find(h, key){ var - _A_ = /*<>*/ key_index(h, key), - match = /*<>*/ caml_check_bound(h[2], _A_)[1 + _A_]; + a = /*<>*/ key_index(h, key), + match = /*<>*/ caml_check_bound(h[2], a)[1 + a]; /*<>*/ if(! match) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[8], 1); @@ -25433,8 +25317,8 @@ /*<>*/ } function find_opt(h, key){ var - _z_ = /*<>*/ key_index(h, key), - match = /*<>*/ caml_check_bound(h[2], _z_)[1 + _z_]; + a = /*<>*/ key_index(h, key), + match = /*<>*/ caml_check_bound(h[2], a)[1 + a]; /*<>*/ if(! match) /*<>*/ return 0; var @@ -25474,11 +25358,11 @@ /*<>*/ } function find_all(h, key){ var - _y_ = /*<>*/ key_index(h, key), + a = /*<>*/ key_index(h, key), param = /*<>*/ /*<>*/ caml_check_bound - (h[2], _y_) - [1 + _y_]; + (h[2], a) + [1 + a]; /*<>*/ for(;;){ /*<>*/ if(! param) /*<>*/ return 0; @@ -25528,39 +25412,38 @@ } /*<>*/ slot[1] = key; /*<>*/ slot[2] = data; - var _v_ = /*<>*/ 0; + var a = /*<>*/ 0; } else - var _v_ = /*<>*/ 1; - /*<>*/ if(_v_){ + var a = /*<>*/ 1; + /*<>*/ if(a){ /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, key, data, l]; /*<>*/ h[1] = h[1] + 1 | 0; - var - _w_ = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; - if(_w_) + var b = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; + if(b) /*<>*/ return resize(key_index, h) /*<>*/ ; - var _x_ = /*<>*/ _w_; + var c = /*<>*/ b; } else - var _x_ = /*<>*/ _v_; - return _x_; + var c = /*<>*/ a; + return c; } /*<>*/ } function mem(h, key){ var - _u_ = /*<>*/ key_index(h, key), + b = /*<>*/ key_index(h, key), param = /*<>*/ /*<>*/ caml_check_bound - (h[2], _u_) - [1 + _u_]; + (h[2], b) + [1 + b]; /*<>*/ for(;;){ /*<>*/ if(! param) /*<>*/ return 0; var k = /*<>*/ param[1], next = param[3], - _t_ = /*<>*/ caml_call2(H[1], k, key); - /*<>*/ if(_t_) return _t_; + a = /*<>*/ caml_call2(H[1], k, key); + /*<>*/ if(a) return a; param = next; } /*<>*/ } @@ -25618,7 +25501,7 @@ } var include = /*<>*/ MakeSeeded([0, equal, seeded_hash]), - _s_ = include[1], + a = include[1], clear = include[2], reset = include[3], copy = include[4], @@ -25640,10 +25523,10 @@ add_seq = include[20], replace_seq = include[21]; function create(sz){ - /*<>*/ return caml_call2(_s_, _d_, sz) /*<>*/ ; + /*<>*/ return caml_call2(a, d, sz) /*<>*/ ; } function of_seq(i){ - var tbl = /*<>*/ caml_call2(_s_, _d_, 16); + var tbl = /*<>*/ caml_call2(a, d, 16); /*<>*/ caml_call2(replace_seq, tbl, i); /*<>*/ return tbl; /*<>*/ } @@ -25698,8 +25581,8 @@ caml_check_bound(h[2], i)[1 + i]]; /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; /*<>*/ h[1] = h[1] + 1 | 0; - var _r_ = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _r_ ? /*<>*/ resize(key_index, h) : _r_ /*<>*/ ; + var a = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; + return a ? /*<>*/ resize(key_index, h) : a /*<>*/ ; } function remove(h, key){ var @@ -25726,8 +25609,8 @@ /*<>*/ } function find(h, key){ var - _q_ = /*<>*/ key_index(h, key), - match = /*<>*/ caml_check_bound(h[2], _q_)[1 + _q_]; + a = /*<>*/ key_index(h, key), + match = /*<>*/ caml_check_bound(h[2], a)[1 + a]; /*<>*/ if(! match) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[8], 1); @@ -25771,8 +25654,8 @@ /*<>*/ } function find_opt(h, key){ var - _p_ = /*<>*/ key_index(h, key), - match = /*<>*/ caml_check_bound(h[2], _p_)[1 + _p_]; + a = /*<>*/ key_index(h, key), + match = /*<>*/ caml_check_bound(h[2], a)[1 + a]; /*<>*/ if(! match) /*<>*/ return 0; var @@ -25811,11 +25694,11 @@ /*<>*/ } function find_all(h, key){ var - _o_ = /*<>*/ key_index(h, key), + a = /*<>*/ key_index(h, key), param = /*<>*/ /*<>*/ caml_check_bound - (h[2], _o_) - [1 + _o_]; + (h[2], a) + [1 + a]; /*<>*/ for(;;){ /*<>*/ if(! param) /*<>*/ return 0; @@ -25865,38 +25748,38 @@ } /*<>*/ slot[1] = key; /*<>*/ slot[2] = data; - var _l_ = /*<>*/ 0; + var a = /*<>*/ 0; } else - var _l_ = /*<>*/ 1; - /*<>*/ if(_l_){ + var a = /*<>*/ 1; + /*<>*/ if(a){ /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, key, data, l]; /*<>*/ h[1] = h[1] + 1 | 0; - var _m_ = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; - if(_m_) + var b = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; + if(b) /*<>*/ return resize(key_index, h) /*<>*/ ; - var _n_ = /*<>*/ _m_; + var c = /*<>*/ b; } else - var _n_ = /*<>*/ _l_; - return _n_; + var c = /*<>*/ a; + return c; } /*<>*/ } function mem(h, key){ var - _k_ = /*<>*/ key_index(h, key), + b = /*<>*/ key_index(h, key), param = /*<>*/ /*<>*/ caml_check_bound - (h[2], _k_) - [1 + _k_]; + (h[2], b) + [1 + b]; /*<>*/ for(;;){ /*<>*/ if(! param) /*<>*/ return 0; var k = /*<>*/ param[1], next = param[3], - _j_ = /*<>*/ 0 === caml_compare(k, key) ? 1 : 0; - /*<>*/ if(_j_) return _j_; + a = /*<>*/ 0 === caml_compare(k, key) ? 1 : 0; + /*<>*/ if(a) return a; param = next; } /*<>*/ } @@ -25932,19 +25815,19 @@ s = /*<>*/ power_2_above(16, h[2].length - 1); /*<>*/ if(random) var - _g_ = + a = /*<>*/ caml_call1(Stdlib_Domain[11][2], prng_key), seed = /*<>*/ /*<>*/ caml_call1 - (Stdlib_Random[19][4], _g_); + (Stdlib_Random[19][4], a); else var seed = /*<>*/ 4 <= h.length - 1 ? h[3] : 0; var - _h_ = /*<>*/ 4 <= h.length - 1 ? h[4] : s, + b = /*<>*/ 4 <= h.length - 1 ? h[4] : s, h$0 = - /*<>*/ [0, h[1], caml_array_make(s, 0), seed, _h_]; + /*<>*/ [0, h[1], caml_array_make(s, 0), seed, b]; /*<>*/ insert_all_buckets - (function(_i_){ /*<>*/ return key_index(h$0, _i_);}, + (function(a){ /*<>*/ return key_index(h$0, a);}, 0, h[2], h$0[2]); @@ -26042,9 +25925,9 @@ cst_Weak_Make_hash_bucket_cann = "Weak.Make: hash bucket cannot grow more"; function create(l){ var - _J_ = /*<>*/ 0 <= l ? 1 : 0, - _K_ = _J_ ? l <= Stdlib_Obj[23][15] ? 1 : 0 : _J_; - if(1 - _K_) /*<>*/ caml_call1(Stdlib[1], cst_Weak_create); + a = /*<>*/ 0 <= l ? 1 : 0, + b = a ? l <= Stdlib_Obj[23][15] ? 1 : 0 : a; + if(1 - b) /*<>*/ caml_call1(Stdlib[1], cst_Weak_create); /*<>*/ return runtime.caml_weak_create(l) /*<>*/ ; } function length(x){ @@ -26052,10 +25935,10 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ var - _G_ = /*<>*/ 0 <= o ? 1 : 0, - _H_ = _G_ ? o < /*<>*/ length(e) ? 1 : 0 : _G_, - _I_ = /*<>*/ 1 - _H_; - return _I_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _I_ /*<>*/ ; + a = /*<>*/ 0 <= o ? 1 : 0, + c = a ? o < /*<>*/ length(e) ? 1 : 0 : a, + b = /*<>*/ 1 - c; + return b ? /*<>*/ caml_call1(Stdlib[1], msg) : b /*<>*/ ; } function set(e, o, x){ /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); @@ -26085,13 +25968,13 @@ ( /*<>*/ length(e1) - l | 0) >= o1 && 0 <= o2 && ( /*<>*/ length(e2) - l | 0) >= o2){ var - _E_ = /*<>*/ 0 !== l ? 1 : 0, - _F_ = - _E_ + a = /*<>*/ 0 !== l ? 1 : 0, + b = + a ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _E_; - /*<>*/ return _F_; + : a; + /*<>*/ return b; } /*<>*/ return caml_call1(Stdlib[1], cst_Weak_blit) /*<>*/ ; } @@ -26099,14 +25982,14 @@ /*<>*/ if (0 <= ofs && 0 <= len && ( /*<>*/ length(ar) - len | 0) >= ofs){ - var _C_ = /*<>*/ (ofs + len | 0) - 1 | 0; - if(_C_ >= ofs){ + var a = /*<>*/ (ofs + len | 0) - 1 | 0; + if(a >= ofs){ var i = ofs; for(;;){ /*<>*/ set(ar, i, x); - var _D_ = /*<>*/ i + 1 | 0; - if(_C_ === i) break; - i = _D_; + var b = /*<>*/ i + 1 | 0; + if(a === i) break; + i = b; } } /*<>*/ return 0; @@ -26133,15 +26016,15 @@ 0] /*<>*/ ; /*<>*/ } function clear(t){ - var _A_ = /*<>*/ t[1].length - 2 | 0, _z_ = 0; - if(_A_ >= 0){ - var i = _z_; + var a = /*<>*/ t[1].length - 2 | 0, b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; - var _B_ = /*<>*/ i + 1 | 0; - if(_A_ === i) break; - i = _B_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ t[3] = limit; @@ -26200,19 +26083,19 @@ for(;;){ if(length(b) <= i$0) /*<>*/ return accu$0; var - _y_ = /*<>*/ check(b, i$0) ? 1 : 0, - accu$1 = /*<>*/ accu$0 + _y_ | 0, + a = /*<>*/ check(b, i$0) ? 1 : 0, + accu$1 = /*<>*/ accu$0 + a | 0, i$1 = i$0 + 1 | 0; i$0 = i$1; accu$0 = accu$1; } /*<>*/ } function count(t){ - var _v_ = /*<>*/ 0; + var a = /*<>*/ 0; /*<>*/ return caml_call3 (Stdlib_Array[20], - function(_w_, _x_){ - /*<>*/ return count_bucket(_v_, _w_, _x_); + function(b, c){ + /*<>*/ return count_bucket(a, b, c); }, t[1], 0) /*<>*/ ; @@ -26255,17 +26138,17 @@ /*<>*/ caml_check_bound(t[1], index)[1 + index] = newbucket$0; /*<>*/ caml_check_bound(t[2], index)[1 + index] = newhashes; var - _r_ = /*<>*/ sz <= t[3] ? 1 : 0, - _s_ = _r_ ? t[3] < newsz ? 1 : 0 : _r_; - if(_s_){ + l = /*<>*/ sz <= t[3] ? 1 : 0, + q = l ? t[3] < newsz ? 1 : 0 : l; + if(q){ /*<>*/ t[4] = t[4] + 1 | 0; var i$4 = /*<>*/ 0; for(;;){ var - _h_ = /*<>*/ t[5], - bucket = /*<>*/ caml_check_bound(t[1], _h_)[1 + _h_], - _i_ = /*<>*/ t[5], - hbucket = /*<>*/ caml_check_bound(t[2], _i_)[1 + _i_], + a = /*<>*/ t[5], + bucket = /*<>*/ caml_check_bound(t[1], a)[1 + a], + b = /*<>*/ t[5], + hbucket = /*<>*/ caml_check_bound(t[2], b)[1 + b], len = /*<>*/ length(bucket), prev_len = /*<>*/ (((len - 3 | 0) * 2 | 0) + 2 | 0) / 3 | 0, @@ -26283,9 +26166,8 @@ } else if( /*<>*/ check(bucket, j)){ /*<>*/ blit(bucket, j, bucket, i$0, 1); - var - _j_ = /*<>*/ caml_check_bound(hbucket, j)[1 + j]; - /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _j_; + var n = /*<>*/ caml_check_bound(hbucket, j)[1 + j]; + /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = n; var j$0 = /*<>*/ j - 1 | 0, i$2 = i$0 + 1 | 0; i$0 = i$2; j = j$0; @@ -26293,37 +26175,37 @@ else{var j$1 = /*<>*/ j - 1 | 0; j = j$1;} } /*<>*/ if(0 === prev_len){ - var _k_ = /*<>*/ t[5]; - /*<>*/ caml_check_bound(t[1], _k_)[1 + _k_] = emptybucket; - var _l_ = /*<>*/ t[5]; - /*<>*/ caml_check_bound(t[2], _l_)[1 + _l_] = [0]; + var c = /*<>*/ t[5]; + /*<>*/ caml_check_bound(t[1], c)[1 + c] = emptybucket; + var e = /*<>*/ t[5]; + /*<>*/ caml_check_bound(t[2], e)[1 + e] = [0]; } else{ var newbucket = /*<>*/ create(prev_len); /*<>*/ blit(bucket, 0, newbucket, 0, prev_len); - var _o_ = /*<>*/ t[5]; - /*<>*/ caml_check_bound(t[1], _o_)[1 + _o_] = newbucket; + var g = /*<>*/ t[5]; + /*<>*/ caml_check_bound(t[1], g)[1 + g] = newbucket; var - _p_ = + p = /*<>*/ caml_call3 (Stdlib_Array[6], hbucket, 0, prev_len), - _q_ = /*<>*/ t[5]; - /*<>*/ caml_check_bound(t[2], _q_)[1 + _q_] = _p_; + k = /*<>*/ t[5]; + /*<>*/ caml_check_bound(t[2], k)[1 + k] = p; } var - _m_ = /*<>*/ t[3] < len ? 1 : 0, - _n_ = _m_ ? prev_len <= t[3] ? 1 : 0 : _m_; - if(_n_) /*<>*/ t[4] = t[4] - 1 | 0; + f = /*<>*/ t[3] < len ? 1 : 0, + o = f ? prev_len <= t[3] ? 1 : 0 : f; + if(o) /*<>*/ t[4] = t[4] - 1 | 0; } /*<>*/ t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); - var _u_ = /*<>*/ i$4 + 1 | 0; + var r = /*<>*/ i$4 + 1 | 0; if(2 === i$4) break; - i$4 = _u_; + i$4 = r; } } var - _t_ = /*<>*/ ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; - if(! _t_) return _t_; + m = /*<>*/ ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; + if(! m) return m; var oldlen = /*<>*/ t[1].length - 1, newlen = @@ -26498,15 +26380,15 @@ totlen = /*<>*/ caml_call3 (Stdlib_Array[18], - function(_g_, _f_){ /*<>*/ return _g_ + _f_ | 0;}, + function(b, a){ /*<>*/ return b + a | 0;}, 0, lens), - _a_ = /*<>*/ len - 1 | 0, - _c_ = /*<>*/ len / 2 | 0, - _b_ = /*<>*/ caml_check_bound(lens, _a_)[1 + _a_], - _d_ = /*<>*/ caml_check_bound(lens, _c_)[1 + _c_], - _e_ = /*<>*/ caml_check_bound(lens, 0)[1]; - /*<>*/ return [0, len, count(t), totlen, _e_, _d_, _b_] /*<>*/ ; + a = /*<>*/ len - 1 | 0, + b = /*<>*/ len / 2 | 0, + c = /*<>*/ caml_check_bound(lens, a)[1 + a], + d = /*<>*/ caml_check_bound(lens, b)[1 + b], + e = /*<>*/ caml_check_bound(lens, 0)[1]; + /*<>*/ return [0, len, count(t), totlen, e, d, c] /*<>*/ ; /*<>*/ } /*<>*/ return [0, create$0, @@ -26590,7 +26472,7 @@ cst$0 = cst$16, cst$1 = cst$16, cst$2 = cst$16, - _a_ = [0, cst$16, 0, cst$16], + a = [0, cst$16, 0, cst$16], Stdlib_Queue = global_data.Stdlib__Queue, CamlinternalFormat = global_data.CamlinternalFormat, Stdlib = global_data.Stdlib, @@ -26616,11 +26498,11 @@ } var pp_infinity = /*<>*/ 1000000010, - _b_ = [0, cst$16], - _c_ = [1, "margin <= max_indent"], - _d_ = [1, "margin >= pp_infinity"], - _e_ = [0, 0], - _f_ = [1, "max_indent < 2"], + b = [0, cst$16], + c = [1, "margin <= max_indent"], + d = [1, "margin >= pp_infinity"], + e = [0, 0], + f = [1, "max_indent < 2"], cst_Format_pp_set_geometry = "Format.pp_set_geometry: "; function pp_output_string(state, s){ /*<>*/ return caml_call3 @@ -26635,11 +26517,11 @@ /*<>*/ state[11] = 0; /*<>*/ } function format_string(state, s){ - var _a$_ = /*<>*/ s !== cst$16 ? 1 : 0; - /*<>*/ return _a$_ + var a = /*<>*/ s !== cst$16 ? 1 : 0; + /*<>*/ return a ? /*<>*/ format_pp_text (state, caml_ml_string_length(s), s) - : _a$_ /*<>*/ ; + : a /*<>*/ ; } function break_new_line(state, param, width){ var @@ -26705,14 +26587,14 @@ /*<>*/ if(! match$4) /*<>*/ return pp_output_newline(state) /*<>*/ ; var width$0 = /*<>*/ match$4[1][2]; - /*<>*/ return break_new_line(state, _a_, width$0) /*<>*/ ; + /*<>*/ return break_new_line(state, a, width$0) /*<>*/ ; case 4: var - _a9_ = + b = /*<>*/ state[10] !== (state[6] - state[9] | 0) ? 1 : 0; - if(! _a9_) return _a9_; + if(! b) return b; var match$1 = /*<>*/ caml_call1(Stdlib_Queue[6], state[28]); @@ -26823,11 +26705,11 @@ /*<>*/ param$0 = tail; continue; } - var _a__ = /*<>*/ head; + var c = /*<>*/ head; } else - var _a__ = /*<>*/ first; - var tab = /*<>*/ _a__; + var c = /*<>*/ first; + var tab = /*<>*/ c; break; } } @@ -26852,7 +26734,7 @@ var match$0 = match[1], width = match$0[2], box_type = match$0[1]; /*<>*/ if (state[9] < width && 3 >= box_type - 1 >>> 0) - /*<>*/ break_new_line(state, _a_, width); + /*<>*/ break_new_line(state, a, width); } else /*<>*/ pp_output_newline(state); @@ -26887,10 +26769,9 @@ length = match$0[3], token = match$0[2], pending_count = /*<>*/ state[13] - state[12] | 0, - _a7_ = /*<>*/ 0 <= size ? 1 : 0, - _a8_ = - /*<>*/ _a7_ || (state[9] <= pending_count ? 1 : 0); - if(! _a8_) return _a8_; + b = /*<>*/ 0 <= size ? 1 : 0, + a = /*<>*/ b || (state[9] <= pending_count ? 1 : 0); + if(! a) return a; /*<>*/ caml_call1(Stdlib_Queue[5], state[28]); var size$0 = /*<>*/ 0 <= size ? size : pp_infinity; /*<>*/ format_pp_token(state, size$0, token); @@ -26907,7 +26788,7 @@ } function initialize_scan_stack(stack){ /*<>*/ caml_call1(Stdlib_Stack[9], stack); - var queue_elem = /*<>*/ [0, unknown, _b_, 0]; + var queue_elem = /*<>*/ [0, unknown, b, 0]; /*<>*/ return caml_call2 (Stdlib_Stack[3], [0, -1, queue_elem], stack) /*<>*/ ; } @@ -26922,9 +26803,9 @@ size = /*<>*/ queue_elem[1]; /*<>*/ if(left_total < state[12]) /*<>*/ return initialize_scan_stack(state[1]) /*<>*/ ; - var _a6_ = /*<>*/ queue_elem[2]; - if(typeof _a6_ !== "number") - switch(_a6_[0]){ + var a = /*<>*/ queue_elem[2]; + if(typeof a !== "number") + switch(a[0]){ case 4: /*<>*/ if(1 - ty){ var x$0 = /*<>*/ state[13] + size | 0; @@ -26958,54 +26839,54 @@ elem = /*<>*/ [0, size, [4, indent, br_ty], 0]; /*<>*/ return scan_push(state, 0, elem) /*<>*/ ; } - var _a5_ = /*<>*/ state[14] === state[15] ? 1 : 0; - if(! _a5_) return _a5_; + var a = /*<>*/ state[14] === state[15] ? 1 : 0; + if(! a) return a; var s = /*<>*/ state[16], x = /*<>*/ caml_ml_string_length(s); /*<>*/ return enqueue_string_as(state, x, s) /*<>*/ ; } function pp_close_box(state, param){ - var _a3_ = /*<>*/ 1 < state[14] ? 1 : 0; - if(_a3_){ + var a = /*<>*/ 1 < state[14] ? 1 : 0; + if(a){ /*<>*/ if(state[14] < state[15]){ /*<>*/ pp_enqueue(state, [0, zero, 1, 0]); /*<>*/ set_size(state, 1); /*<>*/ set_size(state, 0); } /*<>*/ state[14] = state[14] - 1 | 0; - var _a4_ = 0; + var b = 0; } else - var _a4_ = /*<>*/ _a3_; - return _a4_; + var b = /*<>*/ a; + return b; /*<>*/ } function pp_open_stag(state, tag_name){ /*<>*/ if(state[22]){ /*<>*/ caml_call2(Stdlib_Stack[3], tag_name, state[4]); /*<>*/ caml_call1(state[26], tag_name); } - var _a2_ = /*<>*/ state[23]; - if(! _a2_) return _a2_; + var a = /*<>*/ state[23]; + if(! a) return a; var token = /*<>*/ [6, tag_name]; /*<>*/ return pp_enqueue(state, [0, zero, token, 0]) /*<>*/ ; } function pp_close_stag(state, param){ /*<>*/ if(state[23]) /*<>*/ pp_enqueue(state, [0, zero, 5, 0]); - var _a0_ = /*<>*/ state[22]; - if(_a0_){ + var a = /*<>*/ state[22]; + if(a){ var match = /*<>*/ caml_call1(Stdlib_Stack[5], state[4]); /*<>*/ if(match){ var tag_name = match[1]; /*<>*/ return caml_call1(state[27], tag_name) /*<>*/ ; } - var _a1_ = /*<>*/ 0; + var b = /*<>*/ 0; } else - var _a1_ = /*<>*/ _a0_; - return _a1_; + var b = /*<>*/ a; + return b; /*<>*/ } function pp_set_print_tags(state, b){ /*<>*/ state[22] = b; @@ -27077,10 +26958,8 @@ } /*<>*/ } function pp_print_as_size(state, size, s){ - var _aZ_ = /*<>*/ state[14] < state[15] ? 1 : 0; - return _aZ_ - ? /*<>*/ enqueue_string_as(state, size, s) - : _aZ_ /*<>*/ ; + var a = /*<>*/ state[14] < state[15] ? 1 : 0; + return a ? /*<>*/ enqueue_string_as(state, size, s) : a /*<>*/ ; } function pp_print_as(state, isize, s){ /*<>*/ return pp_print_as_size(state, isize, s) /*<>*/ ; @@ -27090,8 +26969,8 @@ /*<>*/ return pp_print_as_size(state, isize, s) /*<>*/ ; } function pp_print_substring_as(pos, len, state, size, source){ - var _aY_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(! _aY_) return _aY_; + var a = /*<>*/ state[14] < state[15] ? 1 : 0; + if(! a) return a; var token = /*<>*/ [1, source, pos, len]; /*<>*/ return enqueue_advance (state, [0, size, token, size]) /*<>*/ ; @@ -27148,24 +27027,24 @@ /*<>*/ return caml_call1(state[18], 0) /*<>*/ ; } function pp_force_newline(state, param){ - var _aX_ = /*<>*/ state[14] < state[15] ? 1 : 0; - return _aX_ + var a = /*<>*/ state[14] < state[15] ? 1 : 0; + return a ? /*<>*/ enqueue_advance(state, [0, zero, 3, 0]) - : _aX_ /*<>*/ ; + : a /*<>*/ ; } function pp_print_if_newline(state, param){ - var _aW_ = /*<>*/ state[14] < state[15] ? 1 : 0; - return _aW_ + var a = /*<>*/ state[14] < state[15] ? 1 : 0; + return a ? /*<>*/ enqueue_advance(state, [0, zero, 4, 0]) - : _aW_ /*<>*/ ; + : a /*<>*/ ; } function pp_print_custom_break(state, fits, breaks){ var after = /*<>*/ fits[3], width = fits[2], before = fits[1], - _aV_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(! _aV_) return _aV_; + a = /*<>*/ state[14] < state[15] ? 1 : 0; + if(! a) return a; var size = /*<>*/ - state[13] | 0, token = /*<>*/ [2, fits, breaks], @@ -27188,31 +27067,31 @@ } function pp_open_tbox(state, param){ /*<>*/ state[14] = state[14] + 1 | 0; - var _aU_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(! _aU_) return _aU_; + var a = /*<>*/ state[14] < state[15] ? 1 : 0; + if(! a) return a; var elem = /*<>*/ [0, zero, [5, [0, [0, 0]]], 0]; /*<>*/ return enqueue_advance(state, elem) /*<>*/ ; } function pp_close_tbox(state, param){ - var _aR_ = /*<>*/ 1 < state[14] ? 1 : 0; - if(_aR_){ - var _aS_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(_aS_){ + var b = /*<>*/ 1 < state[14] ? 1 : 0; + if(b){ + var c = /*<>*/ state[14] < state[15] ? 1 : 0; + if(c){ var elem = /*<>*/ [0, zero, 2, 0]; /*<>*/ enqueue_advance(state, elem); /*<>*/ state[14] = state[14] - 1 | 0; - var _aT_ = 0; + var a = 0; } else - var _aT_ = /*<>*/ _aS_; + var a = /*<>*/ c; } else - var _aT_ = /*<>*/ _aR_; - return _aT_; + var a = /*<>*/ b; + return a; /*<>*/ } function pp_print_tbreak(state, width, offset){ - var _aQ_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(! _aQ_) return _aQ_; + var a = /*<>*/ state[14] < state[15] ? 1 : 0; + if(! a) return a; var size = /*<>*/ - state[13] | 0, elem = /*<>*/ [0, size, [3, width, offset], width]; @@ -27222,16 +27101,16 @@ /*<>*/ return pp_print_tbreak(state, 0, 0) /*<>*/ ; } function pp_set_tab(state, param){ - var _aP_ = /*<>*/ state[14] < state[15] ? 1 : 0; - if(! _aP_) return _aP_; + var a = /*<>*/ state[14] < state[15] ? 1 : 0; + if(! a) return a; var elem = /*<>*/ [0, zero, 0, 0]; /*<>*/ return enqueue_advance(state, elem) /*<>*/ ; } function pp_set_max_boxes(state, n){ var - _aN_ = /*<>*/ 1 < n ? 1 : 0, - _aO_ = _aN_ ? (state[15] = n, 0) : _aN_; - return _aO_; + a = /*<>*/ 1 < n ? 1 : 0, + b = a ? (state[15] = n, 0) : a; + return b; /*<>*/ } function pp_get_max_boxes(state, param){ /*<>*/ return state[15]; @@ -27250,12 +27129,12 @@ /*<>*/ return n < 1000000010 ? n : 1000000009 /*<>*/ ; } function pp_set_max_indent(state, n$0){ - var _aM_ = /*<>*/ 1 < n$0 ? 1 : 0; - if(! _aM_) return _aM_; + var b = /*<>*/ 1 < n$0 ? 1 : 0; + if(! b) return b; var n$1 = /*<>*/ state[6] - n$0 | 0, - _aL_ = /*<>*/ 1 <= n$1 ? 1 : 0; - if(! _aL_) return _aL_; + a = /*<>*/ 1 <= n$1 ? 1 : 0; + if(! a) return a; var n = /*<>*/ pp_limit(n$1); /*<>*/ state[7] = n; /*<>*/ state[8] = state[6] - state[7] | 0; @@ -27265,27 +27144,27 @@ /*<>*/ return state[8]; /*<>*/ } function pp_set_margin(state, n){ - var _aJ_ = /*<>*/ 1 <= n ? 1 : 0; - if(! _aJ_) return _aJ_; + var a = /*<>*/ 1 <= n ? 1 : 0; + if(! a) return a; var n$0 = /*<>*/ pp_limit(n); /*<>*/ state[6] = n$0; /*<>*/ if(state[8] <= state[6]) var new_max_indent = /*<>*/ state[8]; else var - _aK_ = + b = /*<>*/ caml_call2 (Stdlib_Int[11], state[6] - state[7] | 0, state[6] / 2 | 0), new_max_indent = /*<>*/ /*<>*/ caml_call2 - (Stdlib_Int[11], _aK_, 1); + (Stdlib_Int[11], b, 1); /*<>*/ return pp_set_max_indent(state, new_max_indent) /*<>*/ ; } function validate_geometry(param){ var margin = /*<>*/ param[2], max_indent = param[1]; /*<>*/ return 2 <= max_indent - ? margin <= max_indent ? _c_ : 1000000010 <= margin ? _d_ : _e_ - : _f_ /*<>*/ ; + ? margin <= max_indent ? c : 1000000010 <= margin ? d : e + : f /*<>*/ ; } function check_geometry(geometry){ /*<>*/ return 0 === validate_geometry(geometry)[0] @@ -27309,11 +27188,11 @@ /*<>*/ return pp_set_full_geometry(state, geometry) /*<>*/ ; var msg = /*<>*/ match[1], - _aI_ = + a = /*<>*/ caml_call2 (Stdlib[28], cst_Format_pp_set_geometry, msg); /*<>*/ throw caml_maybe_attach_backtrace - ([0, Stdlib[6], _aI_], 1); + ([0, Stdlib[6], a], 1); /*<>*/ } function pp_safe_set_geometry(state, max_indent, margin){ var geometry = /*<>*/ [0, max_indent, margin]; @@ -27365,12 +27244,12 @@ var blank_line = /*<>*/ caml_call2(Stdlib_String[1], 80, 32), - _g_ = /*<>*/ [4, 0, 3]; + g = /*<>*/ [4, 0, 3]; function display_blanks(state, n){ var n$0 = /*<>*/ n; for(;;){ - var _aH_ = 0 < n$0 ? 1 : 0; - if(! _aH_) return _aH_; + var a = 0 < n$0 ? 1 : 0; + if(! a) return a; /*<>*/ if(80 >= n$0) /*<>*/ return caml_call3 (state[17], blank_line, 0, n$0) /*<>*/ ; @@ -27386,17 +27265,11 @@ /*<>*/ return caml_call1(Stdlib[63], oc) /*<>*/ ; }; /*<>*/ state[19] = - function(_aG_){ - /*<>*/ return display_newline(state, _aG_); - }; + function(a){ /*<>*/ return display_newline(state, a);}; /*<>*/ state[20] = - function(_aF_){ - /*<>*/ return display_blanks(state, _aF_); - }; + function(a){ /*<>*/ return display_blanks(state, a);}; /*<>*/ state[21] = - function(_aE_){ - /*<>*/ return display_blanks(state, _aE_); - }; + function(a){ /*<>*/ return display_blanks(state, a);}; /*<>*/ return 0; } function default_pp_mark_open_tag(param){ @@ -27404,23 +27277,23 @@ /*<>*/ return cst$10; var s = /*<>*/ param[2], - _aD_ = /*<>*/ caml_call2(Stdlib[28], s, cst$8); - /*<>*/ return caml_call2(Stdlib[28], cst$9, _aD_) /*<>*/ ; + a = /*<>*/ caml_call2(Stdlib[28], s, cst$8); + /*<>*/ return caml_call2(Stdlib[28], cst$9, a) /*<>*/ ; } function default_pp_mark_close_tag(param){ /*<>*/ if(param[1] !== String_tag) /*<>*/ return cst$13; var s = /*<>*/ param[2], - _aC_ = /*<>*/ caml_call2(Stdlib[28], s, cst$11); - /*<>*/ return caml_call2(Stdlib[28], cst$12, _aC_) /*<>*/ ; + a = /*<>*/ caml_call2(Stdlib[28], s, cst$11); + /*<>*/ return caml_call2(Stdlib[28], cst$12, a) /*<>*/ ; } - function default_pp_print_open_tag(_aB_){ /*<>*/ return 0;} - function default_pp_print_close_tag(_aA_){return 0;} - function pp_make_formatter(f, g, h, i, j){ + function default_pp_print_open_tag(a){ /*<>*/ return 0;} + function default_pp_print_close_tag(a){return 0;} + function pp_make_formatter(f, g$0, h, i, j){ var pp_queue = /*<>*/ caml_call1(Stdlib_Queue[2], 0), - sys_tok = /*<>*/ [0, unknown, _g_, 0]; + sys_tok = /*<>*/ [0, unknown, g, 0]; /*<>*/ caml_call2(Stdlib_Queue[3], sys_tok, pp_queue); var scan_stack = /*<>*/ caml_call1(Stdlib_Stack[2], 0); /*<>*/ initialize_scan_stack(scan_stack); @@ -27428,16 +27301,16 @@ (Stdlib_Stack[3], [0, 1, sys_tok], scan_stack); var pp_margin = /*<>*/ 78, - _aw_ = /*<>*/ Stdlib[19], - _ax_ = caml_call1(Stdlib_Stack[2], 0), - _ay_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0), - _az_ = /*<>*/ caml_call1(Stdlib_Stack[2], 0); + a = /*<>*/ Stdlib[19], + b = caml_call1(Stdlib_Stack[2], 0), + c = /*<>*/ caml_call1(Stdlib_Stack[2], 0), + d = /*<>*/ caml_call1(Stdlib_Stack[2], 0); /*<>*/ return [0, scan_stack, caml_call1(Stdlib_Stack[2], 0), - _az_, - _ay_, - _ax_, + d, + c, + b, pp_margin, 10, 68, @@ -27447,10 +27320,10 @@ 1, 1, 1, - _aw_, + a, cst$14, f, - g, + g$0, h, i, j, @@ -27472,21 +27345,15 @@ /*<>*/ pp_make_formatter (output, flush, - function(_av_){ /*<>*/ return 0;}, - function(_au_){return 0;}, - function(_at_){return 0;}); + function(a){ /*<>*/ return 0;}, + function(a){return 0;}, + function(a){return 0;}); /*<>*/ ppf[19] = - function(_as_){ - /*<>*/ return display_newline(ppf, _as_); - }; + function(a){ /*<>*/ return display_newline(ppf, a);}; /*<>*/ ppf[20] = - function(_ar_){ - /*<>*/ return display_blanks(ppf, _ar_); - }; + function(a){ /*<>*/ return display_blanks(ppf, a);}; /*<>*/ ppf[21] = - function(_aq_){ - /*<>*/ return display_blanks(ppf, _aq_); - }; + function(a){ /*<>*/ return display_blanks(ppf, a);}; /*<>*/ return ppf; /*<>*/ } function formatter_of_out_channel(oc){ @@ -27499,7 +27366,7 @@ function formatter_of_buffer(b){ /*<>*/ return /*<>*/ make_formatter ( /*<>*/ caml_call1(Stdlib_Buffer[18], b), - function(_ap_){ /*<>*/ return 0;}) /*<>*/ ; + function(a){ /*<>*/ return 0;}) /*<>*/ ; } var pp_buffer_size = /*<>*/ 512; function pp_make_buffer(param){ @@ -27531,10 +27398,9 @@ /*<>*/ caml_call2 (Stdlib_Domain[11][3], str_formatter_key, str_formatter); function buffered_out_string(key, str, ofs, len){ - var - _ao_ = /*<>*/ caml_call1(Stdlib_Domain[11][2], key); + var a = /*<>*/ caml_call1(Stdlib_Domain[11][2], key); /*<>*/ return caml_call4 - (Stdlib_Buffer[18], _ao_, str, ofs, len) /*<>*/ ; + (Stdlib_Buffer[18], a, str, ofs, len) /*<>*/ ; } function buffered_out_flush(oc, key, param){ var @@ -27568,36 +27434,36 @@ 0, function(param){ var - _ac_ = /*<>*/ Stdlib[39], + a = /*<>*/ Stdlib[39], ppf = /*<>*/ pp_make_formatter - (function(_al_, _am_, _an_){ + (function(a, b, c){ /*<>*/ return buffered_out_string - (std_buf_key, _al_, _am_, _an_); + (std_buf_key, a, b, c); }, - function(_ak_){ + function(b){ /*<>*/ return buffered_out_flush - (_ac_, std_buf_key, _ak_); + (a, std_buf_key, b); }, - function(_aj_){ /*<>*/ return 0;}, - function(_ai_){return 0;}, - function(_ah_){return 0;}); + function(a){ /*<>*/ return 0;}, + function(a){return 0;}, + function(a){return 0;}); /*<>*/ ppf[19] = - function(_ag_){ - /*<>*/ return display_newline(ppf, _ag_); + function(a){ + /*<>*/ return display_newline(ppf, a); }; /*<>*/ ppf[20] = - function(_af_){ - /*<>*/ return display_blanks(ppf, _af_); + function(a){ + /*<>*/ return display_blanks(ppf, a); }; /*<>*/ ppf[21] = - function(_ae_){ - /*<>*/ return display_blanks(ppf, _ae_); + function(a){ + /*<>*/ return display_blanks(ppf, a); }; /*<>*/ caml_call1 (Stdlib_Domain[6], - function(_ad_){ - /*<>*/ return pp_print_flush(ppf, _ad_); + function(a){ + /*<>*/ return pp_print_flush(ppf, a); }); /*<>*/ return ppf; /*<>*/ }); @@ -27610,36 +27476,36 @@ 0, function(param){ var - _S_ = /*<>*/ Stdlib[40], + a = /*<>*/ Stdlib[40], ppf = /*<>*/ pp_make_formatter - (function(_$_, _aa_, _ab_){ + (function(a, b, c){ /*<>*/ return buffered_out_string - (err_buf_key, _$_, _aa_, _ab_); + (err_buf_key, a, b, c); }, - function(___){ + function(b){ /*<>*/ return buffered_out_flush - (_S_, err_buf_key, ___); + (a, err_buf_key, b); }, - function(_Z_){ /*<>*/ return 0;}, - function(_Y_){return 0;}, - function(_X_){return 0;}); + function(a){ /*<>*/ return 0;}, + function(a){return 0;}, + function(a){return 0;}); /*<>*/ ppf[19] = - function(_W_){ - /*<>*/ return display_newline(ppf, _W_); + function(a){ + /*<>*/ return display_newline(ppf, a); }; /*<>*/ ppf[20] = - function(_V_){ - /*<>*/ return display_blanks(ppf, _V_); + function(a){ + /*<>*/ return display_blanks(ppf, a); }; /*<>*/ ppf[21] = - function(_U_){ - /*<>*/ return display_blanks(ppf, _U_); + function(a){ + /*<>*/ return display_blanks(ppf, a); }; /*<>*/ caml_call1 (Stdlib_Domain[6], - function(_T_){ - /*<>*/ return pp_print_flush(ppf, _T_); + function(a){ + /*<>*/ return pp_print_flush(ppf, a); }); /*<>*/ return ppf; /*<>*/ }); @@ -27690,13 +27556,13 @@ /*<>*/ caml_call1(Stdlib_Buffer[18], buf); function flush$0(param){ var - _R_ = + a = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); /*<>*/ /*<>*/ caml_call3 (output, /*<>*/ caml_call1(Stdlib_Buffer[2], buf), 0, - _R_); + a); /*<>*/ caml_call1(Stdlib_Buffer[8], buf); /*<>*/ return caml_call1(flush, 0) /*<>*/ ; } @@ -27737,10 +27603,10 @@ /*<>*/ caml_call3 (Stdlib_String[16], s, i, n)]) /*<>*/ ; } - function g(_Q_){ + function g(a){ /*<>*/ return add_symbolic_output_item(sob, 0); } - function h(_P_){ + function h(a){ /*<>*/ return add_symbolic_output_item(sob, 1); } function i(n){ @@ -28136,8 +28002,8 @@ /*<>*/ } /*<>*/ for(;;){ if(right[1] === len){ - var _O_ = /*<>*/ left[1] !== len ? 1 : 0; - return _O_ ? /*<>*/ flush(0) : _O_ /*<>*/ ; + var a = /*<>*/ left[1] !== len ? 1 : 0; + return a ? /*<>*/ flush(0) : a /*<>*/ ; } var match = /*<>*/ runtime.caml_string_get(s, right[1]); @@ -28159,7 +28025,7 @@ /*<>*/ opt ? opt[1] : function - (_N_, param){ + (a, param){ /*<>*/ return 0; /*<>*/ }; /*<>*/ if(! param) @@ -28253,56 +28119,55 @@ var acc$1 = /*<>*/ match[1]; /*<>*/ output_acc(ppf, p$0); var - _E_ = /*<>*/ compute_tag(output_acc, acc$1), + k = /*<>*/ compute_tag(output_acc, acc$1), match$0 = - /*<>*/ caml_call1 - (CamlinternalFormat[20], _E_), + /*<>*/ caml_call1(CamlinternalFormat[20], k), bty = /*<>*/ match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty) /*<>*/ ; case 2: - var _F_ = /*<>*/ acc[1]; - if(typeof _F_ !== "number" && 0 === _F_[0]){ - var _G_ = _F_[2]; - if(typeof _G_ !== "number" && 1 === _G_[0]){ - var s$0 = acc[2], size = _G_[2], p$2 = _F_[1]; + var a = /*<>*/ acc[1]; + if(typeof a !== "number" && 0 === a[0]){ + var g = a[2]; + if(typeof g !== "number" && 1 === g[0]){ + var s$0 = acc[2], size = g[2], p$2 = a[1]; break b; } } - var s = acc[2], p$1 = _F_; + var s = acc[2], p$1 = a; break a; case 3: - var _H_ = acc[1]; - if(typeof _H_ !== "number" && 0 === _H_[0]){ - var _I_ = _H_[2]; - if(typeof _I_ !== "number" && 1 === _I_[0]){ - var c$0 = acc[2], size$0 = _I_[2], p$4 = _H_[1]; + var b = acc[1]; + if(typeof b !== "number" && 0 === b[0]){ + var h = b[2]; + if(typeof h !== "number" && 1 === h[0]){ + var c$0 = acc[2], size$0 = h[2], p$4 = b[1]; break; } } - var c = acc[2], p$3 = _H_; + var c = acc[2], p$3 = b; break c; case 4: - var _J_ = acc[1]; - if(typeof _J_ !== "number" && 0 === _J_[0]){ - var _K_ = _J_[2]; - if(typeof _K_ !== "number" && 1 === _K_[0]){ - var s$0 = acc[2], size = _K_[2], p$2 = _J_[1]; + var d = acc[1]; + if(typeof d !== "number" && 0 === d[0]){ + var i = d[2]; + if(typeof i !== "number" && 1 === i[0]){ + var s$0 = acc[2], size = i[2], p$2 = d[1]; break b; } } - var s = acc[2], p$1 = _J_; + var s = acc[2], p$1 = d; break a; case 5: - var _L_ = acc[1]; - if(typeof _L_ !== "number" && 0 === _L_[0]){ - var _M_ = _L_[2]; - if(typeof _M_ !== "number" && 1 === _M_[0]){ - var c$0 = acc[2], size$0 = _M_[2], p$4 = _L_[1]; + var e = acc[1]; + if(typeof e !== "number" && 0 === e[0]){ + var j = e[2]; + if(typeof j !== "number" && 1 === j[0]){ + var c$0 = acc[2], size$0 = j[2], p$4 = e[1]; break; } } - var c = acc[2], p$3 = _L_; + var c = acc[2], p$3 = e; break c; case 6: var f$0 = acc[2], p$5 = acc[1]; @@ -28361,56 +28226,55 @@ var acc$1 = /*<>*/ match[1]; /*<>*/ strput_acc(ppf, p$0); var - _v_ = /*<>*/ compute_tag(strput_acc, acc$1), + k = /*<>*/ compute_tag(strput_acc, acc$1), match$0 = - /*<>*/ caml_call1 - (CamlinternalFormat[20], _v_), + /*<>*/ caml_call1(CamlinternalFormat[20], k), bty = /*<>*/ match$0[2], indent = match$0[1]; /*<>*/ return pp_open_box_gen(ppf, indent, bty) /*<>*/ ; case 2: - var _w_ = /*<>*/ acc[1]; - if(typeof _w_ !== "number" && 0 === _w_[0]){ - var _x_ = _w_[2]; - if(typeof _x_ !== "number" && 1 === _x_[0]){ - var s$0 = acc[2], size = _x_[2], p$2 = _w_[1]; + var a = /*<>*/ acc[1]; + if(typeof a !== "number" && 0 === a[0]){ + var g = a[2]; + if(typeof g !== "number" && 1 === g[0]){ + var s$0 = acc[2], size = g[2], p$2 = a[1]; break b; } } - var s = acc[2], p$1 = _w_; + var s = acc[2], p$1 = a; break a; case 3: - var _y_ = acc[1]; - if(typeof _y_ !== "number" && 0 === _y_[0]){ - var _z_ = _y_[2]; - if(typeof _z_ !== "number" && 1 === _z_[0]){ - var c$0 = acc[2], size$0 = _z_[2], p$4 = _y_[1]; + var b = acc[1]; + if(typeof b !== "number" && 0 === b[0]){ + var h = b[2]; + if(typeof h !== "number" && 1 === h[0]){ + var c$0 = acc[2], size$0 = h[2], p$4 = b[1]; break; } } - var c = acc[2], p$3 = _y_; + var c = acc[2], p$3 = b; break c; case 4: - var _A_ = acc[1]; - if(typeof _A_ !== "number" && 0 === _A_[0]){ - var _B_ = _A_[2]; - if(typeof _B_ !== "number" && 1 === _B_[0]){ - var s$0 = acc[2], size = _B_[2], p$2 = _A_[1]; + var d = acc[1]; + if(typeof d !== "number" && 0 === d[0]){ + var i = d[2]; + if(typeof i !== "number" && 1 === i[0]){ + var s$0 = acc[2], size = i[2], p$2 = d[1]; break b; } } - var s = acc[2], p$1 = _A_; + var s = acc[2], p$1 = d; break a; case 5: - var _C_ = acc[1]; - if(typeof _C_ !== "number" && 0 === _C_[0]){ - var _D_ = _C_[2]; - if(typeof _D_ !== "number" && 1 === _D_[0]){ - var c$0 = acc[2], size$0 = _D_[2], p$4 = _C_[1]; + var e = acc[1]; + if(typeof e !== "number" && 0 === e[0]){ + var j = e[2]; + if(typeof j !== "number" && 1 === j[0]){ + var c$0 = acc[2], size$0 = j[2], p$4 = e[1]; break; } } - var c = acc[2], p$3 = _C_; + var c = acc[2], p$3 = e; break c; case 6: var p$5 = acc[1]; @@ -28471,15 +28335,12 @@ function ifprintf(ppf, param){ var fmt = /*<>*/ param[1]; /*<>*/ return caml_call3 - (CamlinternalFormat[8], - function(_u_){ /*<>*/ return 0;}, - 0, - fmt) /*<>*/ ; + (CamlinternalFormat[8], function(a){ /*<>*/ return 0;}, 0, fmt) /*<>*/ ; } function fprintf(ppf){ - function _r_(_t_){ /*<>*/ return 0;} - /*<>*/ return function(_s_){ - /*<>*/ return kfprintf(_r_, ppf, _s_);} /*<>*/ ; + function a(a){ /*<>*/ return 0;} + /*<>*/ return function(b){ + /*<>*/ return kfprintf(a, ppf, b);} /*<>*/ ; /*<>*/ } function printf(param){ var fmt = /*<>*/ param[1]; @@ -28580,17 +28441,17 @@ fs = /*<>*/ pp_get_formatter_out_functions (std_formatter, 0), - _h_ = /*<>*/ Stdlib[39]; + a = /*<>*/ Stdlib[39]; /*<>*/ pp_set_formatter_out_functions (std_formatter, [0, - function(_o_, _p_, _q_){ + function(a, b, c){ /*<>*/ return buffered_out_string - (std_buf_key, _o_, _p_, _q_); + (std_buf_key, a, b, c); }, - function(_n_){ + function(b){ /*<>*/ return buffered_out_flush - (_h_, std_buf_key, _n_); + (a, std_buf_key, b); }, fs[3], fs[4], @@ -28599,17 +28460,17 @@ fs$0 = /*<>*/ pp_get_formatter_out_functions (err_formatter, 0), - _i_ = /*<>*/ Stdlib[40]; + b = /*<>*/ Stdlib[40]; /*<>*/ return pp_set_formatter_out_functions (err_formatter, [0, - function(_k_, _l_, _m_){ + function(a, b, c){ /*<>*/ return buffered_out_string - (err_buf_key, _k_, _l_, _m_); + (err_buf_key, a, b, c); }, - function(_j_){ + function(a){ /*<>*/ return buffered_out_flush - (_i_, err_buf_key, _j_); + (b, err_buf_key, a); }, fs$0[3], fs$0[4], @@ -28857,9 +28718,9 @@ /*<>*/ ib[5] = ib[5] + 1 | 0; return c; } - catch(_aY_){ - var _aX_ = /*<>*/ caml_wrap_exception(_aY_); - if(_aX_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_aX_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a !== Stdlib[12]) throw caml_maybe_attach_backtrace(a, 0); /*<>*/ ib[2] = null_char; /*<>*/ ib[3] = 0; /*<>*/ ib[1] = 1; @@ -28944,8 +28805,8 @@ /*<>*/ } /*<>*/ return create(1, next) /*<>*/ ; } - var _a_ = /*<>*/ 0; - function from_function(_aW_){return create(_a_, _aW_);} + var a = /*<>*/ 0; + function from_function(b){return create(a, b);} var len = /*<>*/ 1024; function scan_close_at_end(ic){ /*<>*/ caml_call1(Stdlib[93], ic); @@ -28990,11 +28851,11 @@ /*<>*/ return from_ic (scan_close_at_end, [1, fname, ic], ic) /*<>*/ ; } - var _b_ = /*<>*/ Stdlib[79]; - function open_in(_aV_){return open_in_file(_b_, _aV_);} - var _c_ = /*<>*/ Stdlib[80]; - function open_in_bin(_aU_){ - /*<>*/ return open_in_file(_c_, _aU_); + var b = /*<>*/ Stdlib[79]; + function open_in(a){return open_in_file(b, a);} + var c = /*<>*/ Stdlib[80]; + function open_in_bin(a){ + /*<>*/ return open_in_file(c, a); } function from_channel(ic){ /*<>*/ return from_ic(scan_raise_at_end, [0, ic], ic) /*<>*/ ; @@ -29014,11 +28875,11 @@ /*<>*/ [248, "Stdlib.Scanf.Scan_failure", runtime.caml_fresh_oo_id(0)], - _d_ = + d = /*<>*/ [0, [11, "illegal escape character ", [1, 0]], "illegal escape character %C"], - _e_ = + e = [0, [11, cst_scanning_of, @@ -29026,7 +28887,7 @@ 0, [11, " failed: the specified length was too short for token", 0]]], "scanning of %s failed: the specified length was too short for token"], - _f_ = + f = [0, [11, cst_scanning_of, @@ -29036,26 +28897,26 @@ " failed: premature end of file occurred before end of token", 0]]], "scanning of %s failed: premature end of file occurred before end of token"], - _g_ = + g = [0, [11, "looking for ", [1, [11, ", found ", [1, 0]]]], "looking for %C, found %C"], - _h_ = + h = [0, [11, "invalid boolean '", [2, 0, [12, 39, 0]]], "invalid boolean '%s'"], - _i_ = [0, cst_scanf_ml, 516, 9], + i = [0, cst_scanf_ml, 516, 9], cst_0b = "0b", cst_0o = "0o", cst_0u = "0u", cst_0x = "0x", cst_decimal_digits = "decimal digits", - _j_ = + j = [0, [11, cst_character, [1, [11, " is not a decimal digit", 0]]], "character %C is not a decimal digit"], cst_digits = "digits", - _k_ = + k = [0, [11, cst_character, @@ -29064,32 +28925,32 @@ cst_an = "an", cst_nfinity = "nfinity", cst_x = "x", - _l_ = + l = [0, [11, "bad character decimal encoding \\", [0, [0, [0, 0]]]], "bad character decimal encoding \\%c%c%c"], - _m_ = + m = [0, [11, "bad character hexadecimal encoding \\", [0, [0, 0]]], "bad character hexadecimal encoding \\%c%c"], - _n_ = + n = [0, [11, "the character ", [1, [11, " cannot start a boolean", 0]]], "the character %C cannot start a boolean"], - _o_ = + o = [0, [11, "scanf: bad input at char number ", [4, 3, 0, 0, [11, ": ", [2, 0, 0]]]], "scanf: bad input at char number %i: %s"], - _p_ = [0, 37, ""], - _q_ = [0, 123], - _r_ = [0, 91], + p = [0, 37, ""], + q = [0, 123], + r = [0, 91], cst_end_of_input_not_found = "end of input not found", cst_scanf_bad_conversion_a = 'scanf: bad conversion "%a"', cst_scanf_bad_conversion_t = 'scanf: bad conversion "%t"', cst_scanf_missing_reader = "scanf: missing reader", - _s_ = [0, cst_scanf_ml, 1414, 13], + s = [0, cst_scanf_ml, 1414, 13], cst_scanf_bad_conversion_custo = 'scanf: bad conversion "%?" (custom converter)', cst_scanf_bad_conversion = cst_scanf_bad_conversion$3, @@ -29097,26 +28958,25 @@ cst_scanf_bad_conversion$1 = 'scanf: bad conversion "%-"', cst_scanf_bad_conversion$2 = cst_scanf_bad_conversion$3, cst_in_format = ' in format "', - _t_ = [0, [3, 0, [10, 0]], "%S%!"]; + t = [0, [3, 0, [10, 0]], "%S%!"]; function bad_input(s){ /*<>*/ throw caml_maybe_attach_backtrace ([0, Scan_failure, s], 1); /*<>*/ } function bad_input_escape(c){ /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call2(Stdlib_Printf[4], _d_, c)) /*<>*/ ; + ( /*<>*/ caml_call2(Stdlib_Printf[4], d, c)) /*<>*/ ; } function bad_token_length(message){ /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call2 - (Stdlib_Printf[4], _e_, message)) /*<>*/ ; + ( /*<>*/ caml_call2(Stdlib_Printf[4], e, message)) /*<>*/ ; } function bad_hex_float(param){ /*<>*/ return bad_input(cst_not_a_valid_float_in_hexad) /*<>*/ ; } function character_mismatch(c, ci){ /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call3(Stdlib_Printf[4], _g_, c, ci)) /*<>*/ ; + ( /*<>*/ caml_call3(Stdlib_Printf[4], g, c, ci)) /*<>*/ ; } function check_char(ib, c$0){ /*<>*/ if(10 === c$0){ @@ -29135,15 +28995,12 @@ /*<>*/ for(;;){ var c = /*<>*/ peek_char(ib), - _aS_ = /*<>*/ 1 - ib[1]; - if(! _aS_) return _aS_; - var _aT_ = /*<>*/ c - 9 | 0; + b = /*<>*/ 1 - ib[1]; + if(! b) return b; + var a = /*<>*/ c - 9 | 0; a: { - if(4 < _aT_ >>> 0){ - if(23 === _aT_) break a; - } - else if(1 < _aT_ - 2 >>> 0) break a; + if(4 < a >>> 0){if(23 === a) break a;} else if(1 < a - 2 >>> 0) break a; /*<>*/ return 0; } /*<>*/ invalidate_current_char(ib); @@ -29164,7 +29021,7 @@ ? s !== "true" ? /*<>*/ bad_input - ( /*<>*/ caml_call2(Stdlib_Printf[4], _h_, s)) + ( /*<>*/ caml_call2(Stdlib_Printf[4], h, s)) : 1 : 0 /*<>*/ ; } @@ -29187,37 +29044,37 @@ /*<>*/ return 5; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _i_], 1); + ([0, Assert_failure, i], 1); /*<>*/ } function token_int_literal(conv, ib){ /*<>*/ switch(conv){ case 0: var - _aO_ = /*<>*/ token_string(ib), + a = /*<>*/ token_string(ib), tok = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_0b, _aO_); + (Stdlib[28], cst_0b, a); break; case 3: var - _aP_ = /*<>*/ token_string(ib), + b = /*<>*/ token_string(ib), tok = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_0o, _aP_); + (Stdlib[28], cst_0o, b); break; case 4: var - _aQ_ = /*<>*/ token_string(ib), + c = /*<>*/ token_string(ib), tok = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_0u, _aQ_); + (Stdlib[28], cst_0u, c); break; case 5: var - _aR_ = /*<>*/ token_string(ib), + d = /*<>*/ token_string(ib), tok = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_0x, _aR_); + (Stdlib[28], cst_0x, d); break; default: var @@ -29263,7 +29120,7 @@ var c = /*<>*/ checked_peek_char(ib); /*<>*/ if(9 < c - 48 >>> 0) /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call2(Stdlib_Printf[4], _j_, c)) /*<>*/ ; + ( /*<>*/ caml_call2(Stdlib_Printf[4], j, c)) /*<>*/ ; var width$0 = /*<>*/ store_char(width, ib, c); /*<>*/ return scan_decimal_digit_star(width$0, ib) /*<>*/ ; } @@ -29274,7 +29131,7 @@ /*<>*/ if(! caml_call1(digitp, c$0)) /*<>*/ return /*<>*/ bad_input ( /*<>*/ caml_call3 - (Stdlib_Printf[4], _k_, c$0, basis)) /*<>*/ ; + (Stdlib_Printf[4], k, c$0, basis)) /*<>*/ ; var width$3 = /*<>*/ store_char(width$2, ib, c$0), width = /*<>*/ width$3; @@ -29302,13 +29159,13 @@ /*<>*/ return 7 < param - 48 >>> 0 ? 0 : 1 /*<>*/ ; } function is_hexa_digit(param){ - var _aN_ = /*<>*/ param - 48 | 0; + var a = /*<>*/ param - 48 | 0; a: { - if(22 < _aN_ >>> 0){ - if(5 < _aN_ - 49 >>> 0) break a; + if(22 < a >>> 0){ + if(5 < a - 49 >>> 0) break a; } - else if(6 >= _aN_ - 10 >>> 0) break a; + else if(6 >= a - 10 >>> 0) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -29445,39 +29302,39 @@ var len = /*<>*/ caml_ml_string_length(str), width$0 = /*<>*/ [0, width], - _aK_ = /*<>*/ len - 1 | 0, - _aJ_ = 0; - if(_aK_ >= 0){ - var i = _aJ_; + a = /*<>*/ len - 1 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ var c = /*<>*/ peek_char(ib), - _aL_ = + d = /*<>*/ /*<>*/ lowercase ( /*<>*/ caml_string_get(str, i)); - /*<>*/ if(lowercase(c) !== _aL_) + /*<>*/ if(lowercase(c) !== d) /*<>*/ caml_call1(error, 0); /*<>*/ if(0 === width$0[1]) /*<>*/ caml_call1(error, 0); /*<>*/ width$0[1] = store_char(width$0[1], ib, c); - var _aM_ = /*<>*/ i + 1 | 0; - if(_aK_ === i) break; - i = _aM_; + var e = /*<>*/ i + 1 | 0; + if(a === i) break; + i = e; } } /*<>*/ return width$0[1]; /*<>*/ } function scan_hex_float(width, precision, ib){ var - _aw_ = /*<>*/ 0 === width ? 1 : 0, - _ax_ = _aw_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_ax_) + b = /*<>*/ 0 === width ? 1 : 0, + d = b || /*<>*/ end_of_input(ib); + /*<>*/ if(d) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); var width$0 = /*<>*/ scan_sign(width, ib), - _ay_ = /*<>*/ 0 === width$0 ? 1 : 0, - _az_ = _ay_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_az_) + e = /*<>*/ 0 === width$0 ? 1 : 0, + f = e || /*<>*/ end_of_input(ib); + /*<>*/ if(f) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); var c = /*<>*/ peek_char(ib); a: @@ -29488,9 +29345,9 @@ if(32 <= switcher) break a; var width$1 = /*<>*/ store_char(width$0, ib, c), - _aA_ = /*<>*/ 0 === width$1 ? 1 : 0, - _aB_ = _aA_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_aB_) + g = /*<>*/ 0 === width$1 ? 1 : 0, + h = g || /*<>*/ end_of_input(ib); + /*<>*/ if(h) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); /*<>*/ return check_case_insensitive_string (width$1, ib, bad_hex_float, cst_an) /*<>*/ ; @@ -29501,9 +29358,9 @@ if(48 === c){ var width$3 = /*<>*/ store_char(width$0, ib, c), - _aE_ = /*<>*/ 0 === width$3 ? 1 : 0, - _aF_ = _aE_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_aF_) + k = /*<>*/ 0 === width$3 ? 1 : 0, + l = k || /*<>*/ end_of_input(ib); + /*<>*/ if(l) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); var width$4 = @@ -29511,15 +29368,15 @@ (width$3, ib, bad_hex_float, cst_x); /*<>*/ if (0 !== width$4 && ! /*<>*/ end_of_input(ib)){ - var _aG_ = /*<>*/ peek_char(ib) - 46 | 0; + var a = /*<>*/ peek_char(ib) - 46 | 0; b: { c: { - /*<>*/ if(34 < _aG_ >>> 0){ - if(66 === _aG_) break c; + /*<>*/ if(34 < a >>> 0){ + if(66 === a) break c; } - else if(32 < _aG_ - 1 >>> 0) break c; + else if(32 < a - 1 >>> 0) break c; var width$5 = /*<>*/ /*<>*/ scan_digit_plus @@ -29574,9 +29431,9 @@ /*<>*/ return width$8; var width$9 = /*<>*/ store_char(width$8, ib, c$1), - _aH_ = /*<>*/ 0 === width$9 ? 1 : 0, - _aI_ = _aH_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_aI_) + m = /*<>*/ 0 === width$9 ? 1 : 0, + n = m || /*<>*/ end_of_input(ib); + /*<>*/ if(n) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); /*<>*/ return scan_optionally_signed_decimal (width$9, ib) /*<>*/ ; @@ -29591,9 +29448,9 @@ } var width$2 = /*<>*/ store_char(width$0, ib, c), - _aC_ = /*<>*/ 0 === width$2 ? 1 : 0, - _aD_ = _aC_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_aD_) + i = /*<>*/ 0 === width$2 ? 1 : 0, + j = i || /*<>*/ end_of_input(ib); + /*<>*/ if(j) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); /*<>*/ return check_case_insensitive_string (width$2, ib, bad_hex_float, cst_nfinity) /*<>*/ ; @@ -29602,15 +29459,15 @@ } function scan_caml_float_rest(width, precision, ib){ var - _as_ = /*<>*/ 0 === width ? 1 : 0, - _at_ = _as_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_at_) + a = /*<>*/ 0 === width ? 1 : 0, + b = a || /*<>*/ end_of_input(ib); + /*<>*/ if(b) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); var width$0 = /*<>*/ scan_decimal_digit_star(width, ib), - _au_ = /*<>*/ 0 === width$0 ? 1 : 0, - _av_ = _au_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_av_) + d = /*<>*/ 0 === width$0 ? 1 : 0, + e = d || /*<>*/ end_of_input(ib); + /*<>*/ if(e) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); var c = /*<>*/ peek_char(ib), @@ -29635,24 +29492,24 @@ } function scan_caml_float(width, precision, ib){ var - _ae_ = /*<>*/ 0 === width ? 1 : 0, - _af_ = _ae_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_af_) + a = /*<>*/ 0 === width ? 1 : 0, + b = a || /*<>*/ end_of_input(ib); + /*<>*/ if(b) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); var width$0 = /*<>*/ scan_sign(width, ib), - _ag_ = /*<>*/ 0 === width$0 ? 1 : 0, - _ah_ = _ag_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_ah_) + d = /*<>*/ 0 === width$0 ? 1 : 0, + e = d || /*<>*/ end_of_input(ib); + /*<>*/ if(e) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); var c = /*<>*/ peek_char(ib); /*<>*/ if(49 <= c){ if(58 > c){ var width$1 = /*<>*/ store_char(width$0, ib, c), - _ai_ = /*<>*/ 0 === width$1 ? 1 : 0, - _aj_ = _ai_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_aj_) + f = /*<>*/ 0 === width$1 ? 1 : 0, + g = f || /*<>*/ end_of_input(ib); + /*<>*/ if(g) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); /*<>*/ return scan_caml_float_rest (width$1, precision, ib) /*<>*/ ; @@ -29661,9 +29518,9 @@ else if(48 <= c){ var width$2 = /*<>*/ store_char(width$0, ib, c), - _ak_ = /*<>*/ 0 === width$2 ? 1 : 0, - _al_ = _ak_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_al_) + h = /*<>*/ 0 === width$2 ? 1 : 0, + i = h || /*<>*/ end_of_input(ib); + /*<>*/ if(i) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); var c$0 = /*<>*/ peek_char(ib); /*<>*/ if(88 !== c$0 && 120 !== c$0) @@ -29671,17 +29528,17 @@ (width$2, precision, ib) /*<>*/ ; var width$3 = /*<>*/ store_char(width$2, ib, c$0), - _am_ = /*<>*/ 0 === width$3 ? 1 : 0, - _an_ = _am_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_an_) + j = /*<>*/ 0 === width$3 ? 1 : 0, + k = j || /*<>*/ end_of_input(ib); + /*<>*/ if(k) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); var width$10 = /*<>*/ scan_digit_plus (cst_hexadecimal, is_hexa_digit, width$3, ib), - _ao_ = /*<>*/ 0 === width$10 ? 1 : 0, - _ap_ = _ao_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_ap_) + l = /*<>*/ 0 === width$10 ? 1 : 0, + m = l || /*<>*/ end_of_input(ib); + /*<>*/ if(m) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); var c$1 = /*<>*/ peek_char(ib), @@ -29746,9 +29603,9 @@ /*<>*/ return width$7; var width$8 = /*<>*/ store_char(width$7, ib, c$2), - _aq_ = /*<>*/ 0 === width$8 ? 1 : 0, - _ar_ = _aq_ || /*<>*/ end_of_input(ib); - /*<>*/ if(_ar_) + n = /*<>*/ 0 === width$8 ? 1 : 0, + o = n || /*<>*/ end_of_input(ib); + /*<>*/ if(o) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); /*<>*/ return scan_optionally_signed_decimal (width$8, ib) /*<>*/ ; @@ -29766,13 +29623,13 @@ /*<>*/ if(ib[1]) /*<>*/ return width$0; /*<>*/ if(! stp){ - var _ad_ = /*<>*/ c - 9 | 0; + var a = /*<>*/ c - 9 | 0; a: { - if(4 < _ad_ >>> 0){ - if(23 === _ad_) break a; + if(4 < a >>> 0){ + if(23 === a) break a; } - else if(1 < _ad_ - 2 >>> 0) break a; + else if(1 < a - 2 >>> 0) break a; var width$2 = /*<>*/ store_char(width$0, ib, c); /*<>*/ width$0 = width$2; continue; @@ -29800,7 +29657,7 @@ /*<>*/ return ib[1] ? /*<>*/ bad_input ( /*<>*/ caml_call2 - (Stdlib_Printf[4], _f_, message)) + (Stdlib_Printf[4], f, message)) : c /*<>*/ ; } function scan_backslash_char(width, ib){ @@ -29829,16 +29686,16 @@ b: { /*<>*/ if(0 <= c && 255 >= c){ - var _ab_ = /*<>*/ caml_call1(Stdlib[29], c); + var d = /*<>*/ caml_call1(Stdlib[29], c); break b; } var - _ab_ = + d = /*<>*/ bad_input ( /*<>*/ caml_call4 - (Stdlib_Printf[4], _l_, c0, c1$0, c2$0)); + (Stdlib_Printf[4], l, c0, c1$0, c2$0)); } - /*<>*/ return store_char(width - 2 | 0, ib, _ab_) /*<>*/ ; + /*<>*/ return store_char(width - 2 | 0, ib, d) /*<>*/ ; } var switcher = /*<>*/ c0 - 92 | 0; if(28 < switcher >>> 0) break a; @@ -29849,37 +29706,36 @@ /*<>*/ function(param){ var c = /*<>*/ next_char(ib), - _ac_ = /*<>*/ c - 48 | 0; + a = /*<>*/ c - 48 | 0; a: { - if(22 < _ac_ >>> 0){ - if(5 < _ac_ - 49 >>> 0) break a; + if(22 < a >>> 0){ + if(5 < a - 49 >>> 0) break a; } - else if(6 >= _ac_ - 10 >>> 0) break a; + else if(6 >= a - 10 >>> 0) break a; /*<>*/ return c; } /*<>*/ return bad_input_escape(c) /*<>*/ ; }, c1 = /*<>*/ get_digit(0), c2 = /*<>*/ get_digit(0), - ___ = /*<>*/ hexadecimal_value_of_char(c2), + e = /*<>*/ hexadecimal_value_of_char(c2), c$0 = /*<>*/ (16 * hexadecimal_value_of_char(c1) | 0) - + ___ + + e | 0; b: { /*<>*/ if(0 <= c$0 && 255 >= c$0){ - var _aa_ = /*<>*/ caml_call1(Stdlib[29], c$0); + var b = /*<>*/ caml_call1(Stdlib[29], c$0); break b; } var - _aa_ = + b = /*<>*/ bad_input - ( /*<>*/ caml_call3 - (Stdlib_Printf[4], _m_, c1, c2)); + ( /*<>*/ caml_call3(Stdlib_Printf[4], m, c1, c2)); } - /*<>*/ return store_char(width - 2 | 0, ib, _aa_) /*<>*/ ; + /*<>*/ return store_char(width - 2 | 0, ib, b) /*<>*/ ; case 0: case 6: case 18: @@ -29895,17 +29751,17 @@ if(117 > c0) switch(c0 - 110 | 0){ case 0: - var _$_ = /*<>*/ 10; break b; + var a = /*<>*/ 10; break b; case 4: - var _$_ = /*<>*/ 13; break b; + var a = /*<>*/ 13; break b; case 6: - var _$_ = /*<>*/ 9; break b; + var a = /*<>*/ 9; break b; } } - else if(98 === c0){var _$_ = /*<>*/ 8; break b;} - var _$_ = /*<>*/ c0; + else if(98 === c0){var a = /*<>*/ 8; break b;} + var a = /*<>*/ c0; } - /*<>*/ return store_char(width, ib, _$_) /*<>*/ ; + /*<>*/ return store_char(width, ib, a) /*<>*/ ; } /*<>*/ return bad_input_escape(c0) /*<>*/ ; } @@ -29924,21 +29780,21 @@ match = /*<>*/ check_next_char(cst_a_String, width$1, ib); /*<>*/ if(10 === match){ - var _Y_ = /*<>*/ ignore_char(width$1, ib); + var a = /*<>*/ ignore_char(width$1, ib); /*<>*/ if(counter >= 50) - return caml_trampoline_return(skip_spaces, [0, _Y_]) /*<>*/ ; + return caml_trampoline_return(skip_spaces, [0, a]) /*<>*/ ; var counter$0 = /*<>*/ counter + 1 | 0; - return skip_spaces(counter$0, _Y_) /*<>*/ ; + return skip_spaces(counter$0, a) /*<>*/ ; } /*<>*/ if(13 === match){ var width$3 = /*<>*/ ignore_char(width$1, ib); /*<>*/ if (10 === check_next_char(cst_a_String, width$3, ib)){ - var _Z_ = /*<>*/ ignore_char(width$3, ib); + var b = /*<>*/ ignore_char(width$3, ib); /*<>*/ if(counter >= 50) - return caml_trampoline_return(skip_spaces, [0, _Z_]) /*<>*/ ; + return caml_trampoline_return(skip_spaces, [0, b]) /*<>*/ ; var counter$1 = /*<>*/ counter + 1 | 0; - return skip_spaces(counter$1, _Z_) /*<>*/ ; + return skip_spaces(counter$1, b) /*<>*/ ; } var width$5 = /*<>*/ store_char(width$3, ib, 13); /*<>*/ width$0 = width$5; @@ -29983,21 +29839,21 @@ function scan_chars(i, stp){ var i$0 = /*<>*/ i; for(;;){ - var c = peek_char(ib), _U_ = /*<>*/ 0 < i$0 ? 1 : 0; - if(_U_){ - var _V_ = /*<>*/ 1 - ib[1]; - if(_V_) + var c = peek_char(ib), b = /*<>*/ 0 < i$0 ? 1 : 0; + if(b){ + var d = /*<>*/ 1 - ib[1]; + if(d) var - _W_ = + e = /*<>*/ caml_call2 (CamlinternalFormat[1], char_set, c), - _X_ = /*<>*/ _W_ ? c !== stp ? 1 : 0 : _W_; + a = /*<>*/ e ? c !== stp ? 1 : 0 : e; else - var _X_ = /*<>*/ _V_; + var a = /*<>*/ d; } else - var _X_ = /*<>*/ _U_; - if(! _X_) return _X_; + var a = /*<>*/ b; + if(! a) return a; /*<>*/ store_char(Stdlib[19], ib, c); var i$1 = /*<>*/ i$0 - 1 | 0; i$0 = i$1; @@ -30007,8 +29863,8 @@ /*<>*/ return scan_chars(width, -1) /*<>*/ ; var c = /*<>*/ scan_indic[1]; /*<>*/ scan_chars(width, c); - var _T_ = /*<>*/ 1 - ib[1]; - if(! _T_) return _T_; + var a = /*<>*/ 1 - ib[1]; + if(! a) return a; var ci = /*<>*/ peek_char(ib); /*<>*/ return c === ci ? /*<>*/ invalidate_current_char(ib) @@ -30024,7 +29880,7 @@ } var i = /*<>*/ char_count(ib); /*<>*/ return /*<>*/ bad_input - ( /*<>*/ caml_call3(Stdlib_Printf[4], _o_, i, s)) /*<>*/ ; + ( /*<>*/ caml_call3(Stdlib_Printf[4], o, i, s)) /*<>*/ ; } function width_of_pad_opt(pad_opt){ /*<>*/ if(! pad_opt) @@ -30034,7 +29890,7 @@ /*<>*/ } function stopper_of_formatting_lit(fmting){ /*<>*/ if(6 === fmting) - /*<>*/ return _p_; + /*<>*/ return p; var str = /*<>*/ caml_call1(CamlinternalFormat[17], fmting), @@ -30111,16 +29967,16 @@ var rest$13 = /*<>*/ fmt$0[3], fmtty = fmt$0[2], - _Q_ = + c = /*<>*/ caml_call1(CamlinternalFormat[21], fmtty), - _R_ = + b = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _Q_); + (CamlinternalFormatBasics[2], c); /*<>*/ if(counter >= 50) return caml_trampoline_return - (take_fmtty_format_readers$0, [0, k, _R_, rest$13]) /*<>*/ ; + (take_fmtty_format_readers$0, [0, k, b, rest$13]) /*<>*/ ; var counter$0 = /*<>*/ counter + 1 | 0; - return take_fmtty_format_readers$0(counter$0, k, _R_, rest$13) /*<>*/ ; + return take_fmtty_format_readers$0(counter$0, k, b, rest$13) /*<>*/ ; case 15: var rest$14 = /*<>*/ fmt$0[1]; /*<>*/ fmt$0 = rest$14; @@ -30134,11 +29990,11 @@ /*<>*/ fmt$0 = rest$16; break; case 18: - var _S_ = /*<>*/ fmt$0[1]; - if(0 === _S_[0]){ + var a = /*<>*/ fmt$0[1]; + if(0 === a[0]){ var rest$17 = fmt$0[2], - fmt$1 = _S_[1][1], + fmt$1 = a[1][1], fmt$2 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$1, rest$17); @@ -30147,7 +30003,7 @@ else{ var rest$18 = /*<>*/ fmt$0[2], - fmt$3 = _S_[1][1], + fmt$3 = a[1][1], fmt$4 = /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt$3, rest$18); @@ -30285,11 +30141,10 @@ rest = /*<>*/ fmtty$0[3], ty2 = fmtty$0[2], ty1 = fmtty$0[1], - _P_ = - /*<>*/ caml_call1(CamlinternalFormat[21], ty1), + a = /*<>*/ caml_call1(CamlinternalFormat[21], ty1), ty = /*<>*/ caml_call2 - (CamlinternalFormat[22], _P_, ty2), + (CamlinternalFormat[22], a, ty2), fmtty$10 = /*<>*/ caml_call2 (CamlinternalFormatBasics[1], ty, rest); @@ -30401,14 +30256,14 @@ /*<>*/ return pad_prec_scanf (ib, str_rest, readers, pad, 0, scan$0, token_string) /*<>*/ ; case 18: - var _D_ = /*<>*/ match[1]; - if(0 === _D_[0]){ + var a = /*<>*/ match[1]; + if(0 === a[0]){ var rest$3 = match[2], - fmt$1 = _D_[1][1], + fmt$1 = a[1][1], scan$1 = /*<>*/ function(width, param, ib){ - /*<>*/ return scan_string(_q_, width, ib) /*<>*/ ; + /*<>*/ return scan_string(q, width, ib) /*<>*/ ; }; /*<>*/ return /*<>*/ pad_prec_scanf (ib, @@ -30422,10 +30277,10 @@ } var rest$4 = /*<>*/ match[2], - fmt$2 = _D_[1][1], + fmt$2 = a[1][1], scan$2 = /*<>*/ function(width, param, ib){ - /*<>*/ return scan_string(_r_, width, ib) /*<>*/ ; + /*<>*/ return scan_string(r, width, ib) /*<>*/ ; }; /*<>*/ return /*<>*/ pad_prec_scanf (ib, @@ -30605,7 +30460,7 @@ rest$13 = /*<>*/ fmt$0[2], pad$8 = fmt$0[1], scan$8 = - /*<>*/ function(_O_, param, ib){ + /*<>*/ function(a, param, ib){ var c = /*<>*/ checked_peek_char(ib), m = @@ -30615,8 +30470,7 @@ === c ? 4 : /*<>*/ bad_input - ( /*<>*/ caml_call2 - (Stdlib_Printf[4], _n_, c)); + ( /*<>*/ caml_call2(Stdlib_Printf[4], n, c)); /*<>*/ return scan_string(0, m, ib) /*<>*/ ; }; /*<>*/ return pad_prec_scanf @@ -30631,7 +30485,7 @@ var rest$15 = /*<>*/ fmt$0[2], str$0 = fmt$0[1]; /*<>*/ caml_call2 (Stdlib_String[30], - function(_N_){ /*<>*/ return check_char(ib, _N_);}, + function(a){ /*<>*/ return check_char(ib, a);}, str$0); /*<>*/ fmt$0 = rest$15; break; @@ -30647,13 +30501,13 @@ pad_opt = fmt$0[1]; /*<>*/ /*<>*/ scan_caml_string ( /*<>*/ width_of_pad_opt(pad_opt), ib); - var s = /*<>*/ token_string(ib); + var s$0 = /*<>*/ token_string(ib); /*<>*/ try{ var - _E_ = + e = /*<>*/ caml_call2 - (CamlinternalFormat[14], s, fmtty), - fmt$3 = _E_; + (CamlinternalFormat[14], s$0, fmtty), + fmt$3 = e; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); @@ -30673,34 +30527,34 @@ pad_opt$0 = fmt$0[1]; /*<>*/ /*<>*/ scan_caml_string ( /*<>*/ width_of_pad_opt(pad_opt$0), ib); - var s$0 = /*<>*/ token_string(ib); + var s$1 = /*<>*/ token_string(ib); /*<>*/ try{ var fmt$6 = /*<>*/ caml_call2 - (CamlinternalFormat[13], 0, s$0) + (CamlinternalFormat[13], 0, s$1) [1], fmt$7 = /*<>*/ caml_call2 - (CamlinternalFormat[13], 0, s$0) + (CamlinternalFormat[13], 0, s$1) [1], - _G_ = + f = /*<>*/ caml_call1 (CamlinternalFormat[21], fmtty$0), - _H_ = + g = /*<>*/ caml_call1 - (CamlinternalFormatBasics[2], _G_), + (CamlinternalFormatBasics[2], f), fmt$8 = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$7, _H_), - _I_ = + (CamlinternalFormat[12], fmt$7, g), + h = /*<>*/ caml_call1 (CamlinternalFormatBasics[2], fmtty$0), - _J_ = + i = /*<>*/ caml_call2 - (CamlinternalFormat[12], fmt$6, _I_), + (CamlinternalFormat[12], fmt$6, h), fmt$5 = fmt$8, - fmt$4 = _J_; + fmt$4 = i; } catch(exn){ var exn$0 = /*<>*/ caml_wrap_exception(exn); @@ -30708,12 +30562,12 @@ throw caml_maybe_attach_backtrace(exn$0, 0); var msg$0 = exn$0[2], - _F_ = /*<>*/ bad_input(msg$0), - fmt$5 = _F_[2], - fmt$4 = _F_[1]; + d = /*<>*/ bad_input(msg$0), + fmt$5 = d[2], + fmt$4 = d[1]; } /*<>*/ return [0, - [0, fmt$4, s$0], + [0, fmt$4, s$1], /*<>*/ make_scanf (ib, /*<>*/ caml_call2 @@ -30729,19 +30583,19 @@ var rest$19 = /*<>*/ fmt$0[2], formatting_lit = fmt$0[1], - _K_ = + j = /*<>*/ caml_call1 (CamlinternalFormat[17], formatting_lit); /*<>*/ caml_call2 (Stdlib_String[30], - function(_M_){ /*<>*/ return check_char(ib, _M_);}, - _K_); + function(a){ /*<>*/ return check_char(ib, a);}, + j); /*<>*/ fmt$0 = rest$19; break; case 18: - var _L_ = /*<>*/ fmt$0[1]; - if(0 === _L_[0]){ - var rest$20 = fmt$0[2], fmt$9 = _L_[1][1]; + var b = /*<>*/ fmt$0[1]; + if(0 === b[0]){ + var rest$20 = fmt$0[2], fmt$9 = b[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 123); var @@ -30751,7 +30605,7 @@ /*<>*/ fmt$0 = fmt$10; } else{ - var rest$21 = /*<>*/ fmt$0[2], fmt$11 = _L_[1][1]; + var rest$21 = /*<>*/ fmt$0[2], fmt$11 = b[1][1]; /*<>*/ check_char(ib, 64); /*<>*/ check_char(ib, 91); var @@ -30790,10 +30644,10 @@ /*<>*/ scan_chars_in_char_set (char_set$0, [0, stp$0], width$2, ib); var - s$2 = /*<>*/ token_string(ib), + s$3 = /*<>*/ token_string(ib), str_rest$0 = /*<>*/ [11, str$1, rest$23]; /*<>*/ return [0, - s$2, + s$3, make_scanf(ib, str_rest$0, readers)] /*<>*/ ; } var @@ -30802,9 +30656,9 @@ width$1 = /*<>*/ width_of_pad_opt(width_opt); /*<>*/ scan_chars_in_char_set (char_set, 0, width$1, ib); - var s$1 = /*<>*/ token_string(ib); + var s$2 = /*<>*/ token_string(ib); /*<>*/ return [0, - s$1, + s$2, make_scanf(ib, rest$22, readers)] /*<>*/ ; case 21: var rest$24 = /*<>*/ fmt$0[2], counter = fmt$0[1]; @@ -30836,7 +30690,7 @@ match$3 = /*<>*/ make_scanf(ib, fmt$13, readers); /*<>*/ if(! match$3) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _s_], 1); + ([0, Assert_failure, s], 1); var arg_rest = /*<>*/ match$3[2]; /*<>*/ return arg_rest; default: @@ -30894,12 +30748,11 @@ if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); var msg = exc[2], - _z_ = /*<>*/ caml_call1(Stdlib_String[25], str), - _A_ = caml_call2(Stdlib[28], _z_, cst$0), - _B_ = - /*<>*/ caml_call2(Stdlib[28], cst_in_format, _A_), - _C_ = /*<>*/ caml_call2(Stdlib[28], msg, _B_); - /*<>*/ return caml_call1(Stdlib[1], _C_) /*<>*/ ; + a = /*<>*/ caml_call1(Stdlib_String[25], str), + b = caml_call2(Stdlib[28], a, cst$0), + c = /*<>*/ caml_call2(Stdlib[28], cst_in_format, b), + d = /*<>*/ caml_call2(Stdlib[28], msg, c); + /*<>*/ return caml_call1(Stdlib[1], d) /*<>*/ ; } /*<>*/ return caml_call2(ef, ib, exc) /*<>*/ ; } @@ -30929,7 +30782,7 @@ function kscanf_opt(ib, fmt){ /*<>*/ return kscanf_gen (ib, - function(_y_, param){ + function(a, param){ /*<>*/ return 0; /*<>*/ }, function(x){ @@ -30966,10 +30819,10 @@ var str = /*<>*/ token_string(ib); /*<>*/ try{ var - _x_ = + a = /*<>*/ caml_call2 (CamlinternalFormat[15], str, format), - fmt = _x_; + fmt = a; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); @@ -30986,21 +30839,20 @@ } function format_from_string(s, fmt){ var - _v_ = /*<>*/ caml_call1(Stdlib_String[25], s), - _w_ = caml_call2(Stdlib[28], _v_, cst$1); + a = /*<>*/ caml_call1(Stdlib_String[25], s), + b = caml_call2(Stdlib[28], a, cst$1); /*<>*/ return /*<>*/ sscanf_format - ( /*<>*/ caml_call2(Stdlib[28], cst$2, _w_), + ( /*<>*/ caml_call2(Stdlib[28], cst$2, b), fmt, function(x){ /*<>*/ return x; /*<>*/ }) /*<>*/ ; } function unescaped(s){ - var _u_ = /*<>*/ caml_call2(Stdlib[28], s, cst$3); + var a = /*<>*/ caml_call2(Stdlib[28], s, cst$3); /*<>*/ return /*<>*/ caml_call1 (sscanf - ( /*<>*/ caml_call2(Stdlib[28], cst$4, _u_), - _t_), + ( /*<>*/ caml_call2(Stdlib[28], cst$4, a), t), function(x){ /*<>*/ return x; /*<>*/ }) /*<>*/ ; @@ -31052,8 +30904,8 @@ register = caml_register_named_value; function register_exception(name, exn){ var - _a_ = /*<>*/ Stdlib_Obj[10], - slot = runtime.caml_obj_tag(exn) === _a_ ? exn : exn[1]; + a = /*<>*/ Stdlib_Obj[10], + slot = runtime.caml_obj_tag(exn) === a ? exn : exn[1]; /*<>*/ return caml_register_named_value(name, slot) /*<>*/ ; } var Stdlib_Callback = /*<>*/ [0, register, register_exception]; @@ -31116,20 +30968,18 @@ function public_method_label(s){ var accu = /*<>*/ [0, 0], - _al_ = + a = /*<>*/ runtime.caml_ml_string_length(s) - 1 | 0, - _ak_ = 0; - if(_al_ >= 0){ - var i = _ak_; + b = 0; + if(a >= 0){ + var i = b; for(;;){ - var - _am_ = /*<>*/ runtime.caml_string_get(s, i); - /*<>*/ accu[1] = - (223 * accu[1] | 0) + _am_ | 0; - var _an_ = i + 1 | 0; - if(_al_ === i) break; - i = _an_; + var c = /*<>*/ runtime.caml_string_get(s, i); + /*<>*/ accu[1] = (223 * accu[1] | 0) + c | 0; + var d = i + 1 | 0; + if(a === i) break; + i = d; } } /*<>*/ accu[1] = accu[1] & 2147483647; @@ -31168,30 +31018,28 @@ ((len * 2 | 0) + 2 | 0, dummy_met); /*<>*/ caml_check_bound(methods, 0)[1] = len; var - _ad_ = /*<>*/ Stdlib_Sys[9], - _ae_ = + c = /*<>*/ Stdlib_Sys[9], + d = ( /*<>*/ runtime.caml_mul - ( /*<>*/ fit_size(len), _ad_) + ( /*<>*/ fit_size(len), c) / 8 | 0) - 1 | 0; - /*<>*/ caml_check_bound(methods, 1)[2] = _ae_; - var _ag_ = /*<>*/ len - 1 | 0, _af_ = 0; - if(_ag_ >= 0){ - var i = _af_; + /*<>*/ caml_check_bound(methods, 1)[2] = d; + var a = /*<>*/ len - 1 | 0, e = 0; + if(a >= 0){ + var i = e; for(;;){ var - _ai_ = /*<>*/ (i * 2 | 0) + 3 | 0, - _ah_ = + b = /*<>*/ (i * 2 | 0) + 3 | 0, + f = /*<>*/ caml_check_bound(pub_labels, i) [1 + i]; - /*<>*/ caml_check_bound(methods, _ai_) - [1 + _ai_] - = _ah_; - var _aj_ = /*<>*/ i + 1 | 0; - if(_ag_ === i) break; - i = _aj_; + /*<>*/ caml_check_bound(methods, b)[1 + b] = f; + var g = /*<>*/ i + 1 | 0; + if(a === i) break; + i = g; } } /*<>*/ return [0, @@ -31207,30 +31055,30 @@ function resize(array, new_size){ var old_size = /*<>*/ array[2].length - 1, - _ab_ = /*<>*/ old_size < new_size ? 1 : 0; - if(_ab_){ + a = /*<>*/ old_size < new_size ? 1 : 0; + if(a){ var new_buck = /*<>*/ caml_array_make(new_size, dummy_met); /*<>*/ caml_call5 (Stdlib_Array[9], array[2], 0, new_buck, 0, old_size); /*<>*/ array[2] = new_buck; - var _ac_ = 0; + var b = 0; } else - var _ac_ = /*<>*/ _ab_; - return _ac_; + var b = /*<>*/ a; + return b; /*<>*/ } var method_count = /*<>*/ [0, 0], inst_var_count = [0, 0], - _a_ = [0, cst_camlinternalOO_ml, 279, 50], - _b_ = [0, cst_camlinternalOO_ml, 407, 13], - _c_ = [0, cst_camlinternalOO_ml, 410, 13], - _d_ = [0, cst_camlinternalOO_ml, 413, 13], - _e_ = [0, cst_camlinternalOO_ml, 416, 13], - _f_ = [0, cst_camlinternalOO_ml, 419, 13], - _g_ = [0, cst_camlinternalOO_ml, 437, 17]; + a = [0, cst_camlinternalOO_ml, 279, 50], + b = [0, cst_camlinternalOO_ml, 407, 13], + c = [0, cst_camlinternalOO_ml, 410, 13], + d = [0, cst_camlinternalOO_ml, 413, 13], + e = [0, cst_camlinternalOO_ml, 416, 13], + f = [0, cst_camlinternalOO_ml, 419, 13], + g = [0, cst_camlinternalOO_ml, 437, 17]; function new_method(table){ var index = /*<>*/ table[2].length - 1; /*<>*/ resize(table, index + 1 | 0); @@ -31239,13 +31087,13 @@ function get_method_label(table, name){ /*<>*/ try{ var - _$_ = + b = /*<>*/ caml_call2(Meths[17], name, table[3]); - return _$_; + return b; } - catch(_aa_){ - var ___ = /*<>*/ caml_wrap_exception(_aa_); - if(___ !== Stdlib[8]) throw caml_maybe_attach_backtrace(___, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a !== Stdlib[8]) throw caml_maybe_attach_backtrace(a, 0); var label = /*<>*/ new_method(table); /*<>*/ table[3] = caml_call3(Meths[2], name, label, table[3]); @@ -31257,9 +31105,9 @@ function get_method_labels(table, names){ /*<>*/ return caml_call2 (Stdlib_Array[14], - function(_Z_){ + function(a){ /*<>*/ return get_method_label - (table, _Z_); + (table, a); }, names) /*<>*/ ; } @@ -31279,18 +31127,18 @@ function get_method(table, label){ /*<>*/ try{ var - _X_ = + b = /*<>*/ caml_call2 (Stdlib_List[53], label, table[6]); - return _X_; + return b; } - catch(_Y_){ - var _W_ = /*<>*/ caml_wrap_exception(_Y_); - if(_W_ === Stdlib[8]) + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[8]) /*<>*/ return caml_check_bound (table[2], label) [1 + label] /*<>*/ ; - /*<>*/ throw caml_maybe_attach_backtrace(_W_, 0); + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } function to_list(arr){ @@ -31307,17 +31155,15 @@ virt_meth_labs = /*<>*/ caml_call2 (Stdlib_List[20], - function(_V_){ - /*<>*/ return get_method_label - (table, _V_); + function(a){ + /*<>*/ return get_method_label(table, a); }, virt_meths$0), concr_meth_labs = /*<>*/ caml_call2 (Stdlib_List[20], - function(_U_){ - /*<>*/ return get_method_label - (table, _U_); + function(a){ + /*<>*/ return get_method_label(table, a); }, concr_meths$0); /*<>*/ table[5] = @@ -31344,21 +31190,21 @@ function(met, label){ /*<>*/ by_name[1] = caml_call3(Meths[2], met, label, by_name[1]); - var _P_ = /*<>*/ by_label[1]; + var c = /*<>*/ by_label[1]; try{ var - _S_ = + d = /*<>*/ caml_call2 (Labs[17], label, table[4]), - _R_ = _S_; + b = d; } - catch(_T_){ - var _Q_ = /*<>*/ caml_wrap_exception(_T_); - if(_Q_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Q_, 0); - var _R_ = /*<>*/ 1; + catch(c){ + var a = /*<>*/ caml_wrap_exception(c); + if(a !== Stdlib[8]) throw caml_maybe_attach_backtrace(a, 0); + var b = /*<>*/ 1; } /*<>*/ by_label[1] = - caml_call3(Labs[2], label, _R_, _P_); + caml_call3(Labs[2], label, b, c); /*<>*/ return 0; }, concr_meths$0, @@ -31407,10 +31253,9 @@ (Stdlib_List[26], function(s, v){ var - _O_ = + a = /*<>*/ caml_call2(Vars[17], v, table[7]); - /*<>*/ return caml_call3 - (Vars[2], v, _O_, s) /*<>*/ ; + /*<>*/ return caml_call3(Vars[2], v, a, s) /*<>*/ ; }, saved_vars, vars); @@ -31433,13 +31278,13 @@ function new_variable(table, name){ /*<>*/ try{ var - _M_ = + b = /*<>*/ caml_call2(Vars[17], name, table[7]); - return _M_; + return b; } - catch(_N_){ - var _L_ = /*<>*/ caml_wrap_exception(_N_); - if(_L_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_L_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a !== Stdlib[8]) throw caml_maybe_attach_backtrace(a, 0); var index = /*<>*/ table[1]; /*<>*/ table[1] = index + 1 | 0; /*<>*/ if(name !== "") @@ -31461,37 +31306,37 @@ res = /*<>*/ caml_array_make (nmeths + nvals | 0, 0), - _D_ = /*<>*/ nmeths - 1 | 0, - _C_ = 0; - if(_D_ >= 0){ - var i$0 = _C_; + a = /*<>*/ nmeths - 1 | 0, + d = 0; + if(a >= 0){ + var i$0 = d; for(;;){ var - _J_ = + h = /*<>*/ /*<>*/ get_method_label (table, /*<>*/ caml_check_bound(meths$0, i$0) [1 + i$0]); - /*<>*/ caml_check_bound(res, i$0)[1 + i$0] = _J_; - var _K_ = /*<>*/ i$0 + 1 | 0; - if(_D_ === i$0) break; - i$0 = _K_; + /*<>*/ caml_check_bound(res, i$0)[1 + i$0] = h; + var j = /*<>*/ i$0 + 1 | 0; + if(a === i$0) break; + i$0 = j; } } - var _F_ = /*<>*/ nvals - 1 | 0, _E_ = 0; - if(_F_ >= 0){ - var i = _E_; + var b = /*<>*/ nvals - 1 | 0, e = 0; + if(b >= 0){ + var i = e; for(;;){ var - _H_ = /*<>*/ i + nmeths | 0, - _G_ = + c = /*<>*/ i + nmeths | 0, + f = /*<>*/ /*<>*/ new_variable (table, /*<>*/ caml_check_bound(vals, i)[1 + i]); - /*<>*/ caml_check_bound(res, _H_)[1 + _H_] = _G_; - var _I_ = /*<>*/ i + 1 | 0; - if(_F_ === i) break; - i = _I_; + /*<>*/ caml_check_bound(res, c)[1 + c] = f; + var g = /*<>*/ i + 1 | 0; + if(b === i) break; + i = g; } } /*<>*/ return res; @@ -31499,24 +31344,23 @@ function get_variable(table, name){ /*<>*/ try{ var - _A_ = + c = /*<>*/ caml_call2(Vars[17], name, table[7]); - return _A_; + return c; } - catch(_B_){ - var _z_ = /*<>*/ caml_wrap_exception(_B_); - if(_z_ === Stdlib[8]) + catch(c){ + var b = /*<>*/ caml_wrap_exception(c); + if(b === Stdlib[8]) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); - /*<>*/ throw caml_maybe_attach_backtrace(_z_, 0); + ([0, Assert_failure, a], 1); + /*<>*/ throw caml_maybe_attach_backtrace(b, 0); } /*<>*/ } function get_variables(table, names){ /*<>*/ return caml_call2 (Stdlib_Array[14], - function(_y_){ - /*<>*/ return get_variable - (table, _y_); + function(a){ + /*<>*/ return get_variable(table, a); }, names) /*<>*/ ; } @@ -31550,7 +31394,7 @@ (inst_var_count[1] + table[1] | 0) - 1 | 0; /*<>*/ table[8] = caml_call1(Stdlib_List[10], table[8]); - var _x_ = /*<>*/ Stdlib_Sys[9]; + var a = /*<>*/ Stdlib_Sys[9]; return /*<>*/ resize (table, 3 @@ -31561,22 +31405,22 @@ [2] * 16 | 0, - _x_) + a) | 0) /*<>*/ ; } function inherits(cla, vals, virt_meths, concr_meths, param, top){ - var env = /*<>*/ param[3], super$0 = param[2]; + var env = /*<>*/ param[3], super$ = param[2]; /*<>*/ narrow (cla, vals, virt_meths, concr_meths); var init = /*<>*/ top - ? /*<>*/ caml_call2(super$0, cla, env) - : /*<>*/ caml_call1(super$0, cla); + ? /*<>*/ caml_call2(super$, cla, env) + : /*<>*/ caml_call1(super$, cla); /*<>*/ widen(cla); var - _s_ = /*<>*/ to_array(concr_meths), - _t_ = + a = /*<>*/ to_array(concr_meths), + b = /*<>*/ [0, caml_call2 (Stdlib_Array[14], @@ -31585,21 +31429,21 @@ (cla, /*<>*/ get_method_label(cla, nm)) /*<>*/ ; }, - _s_), + a), 0], - _u_ = /*<>*/ to_array(vals), - _v_ = + c = /*<>*/ to_array(vals), + d = /*<>*/ [0, [0, init], [0, caml_call2 (Stdlib_Array[14], - function(_w_){ - /*<>*/ return get_variable(cla, _w_); + function(a){ + /*<>*/ return get_variable(cla, a); }, - _u_), - _t_]]; - /*<>*/ return caml_call1(Stdlib_Array[5], _v_) /*<>*/ ; + c), + b]]; + /*<>*/ return caml_call1(Stdlib_Array[5], d) /*<>*/ ; } function make_class(pub_meths, class_init){ var @@ -31659,8 +31503,8 @@ function run_initializers(obj, table){ var inits = /*<>*/ table[8], - _r_ = /*<>*/ 0 !== inits ? 1 : 0; - return _r_ ? /*<>*/ iter_f(obj, inits) : _r_ /*<>*/ ; + a = /*<>*/ 0 !== inits ? 1 : 0; + return a ? /*<>*/ iter_f(obj, inits) : a /*<>*/ ; } function run_initializers_opt(obj_0, obj, table){ /*<>*/ if(obj_0) @@ -31681,27 +31525,27 @@ /*<>*/ if(param) /*<>*/ return param[2]; /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _e_], 1); + ([0, Assert_failure, e], 1); /*<>*/ } function build_path(n, keys, tables){ var res = /*<>*/ [0, 0, 0, 0], r = /*<>*/ [0, res], - _o_ = /*<>*/ 0; + a = /*<>*/ 0; if(n >= 0){ - var i = _o_; + var i = a; for(;;){ - var _p_ = /*<>*/ r[1]; - r[1] = [0, caml_check_bound(keys, i)[1 + i], _p_, 0]; - var _q_ = /*<>*/ i + 1 | 0; + var c = /*<>*/ r[1]; + r[1] = [0, caml_check_bound(keys, i)[1 + i], c, 0]; + var d = /*<>*/ i + 1 | 0; if(n === i) break; - i = _q_; + i = d; } } var v = /*<>*/ r[1]; /*<>*/ if(! tables) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); + ([0, Assert_failure, b], 1); /*<>*/ tables[2] = v; /*<>*/ return res; /*<>*/ } @@ -31723,17 +31567,17 @@ for(;;){ /*<>*/ if(! tables$1) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); + ([0, Assert_failure, d], 1); /*<>*/ if(tables$1[1] === key) break; /*<>*/ if(! tables$1) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _f_], 1); + ([0, Assert_failure, f], 1); var tables = /*<>*/ tables$1[3]; /*<>*/ if(! tables){ var next = /*<>*/ [0, key, 0, 0]; /*<>*/ if(! tables$1) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _c_], 1); + ([0, Assert_failure, c], 1); /*<>*/ tables$1[3] = next; /*<>*/ return build_path (i - 1 | 0, keys, next) /*<>*/ ; @@ -31743,7 +31587,7 @@ var tables_data = /*<>*/ get_data(tables$1); /*<>*/ if(! tables_data) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _g_], 1); + ([0, Assert_failure, g], 1); var i$0 = /*<>*/ i - 1 | 0; i = i$0; tables$0 = tables_data; @@ -31754,7 +31598,7 @@ a: { /*<>*/ if(0 !== (n % 2 | 0)){ - var _n_ = /*<>*/ Stdlib_Sys[9]; + var a = /*<>*/ Stdlib_Sys[9]; if ((2 + @@ -31762,7 +31606,7 @@ ( /*<>*/ caml_check_bound(table[2], 1)[2] * 16 | 0, - _n_) + a) | 0) >= n){ var @@ -31785,17 +31629,15 @@ /*<>*/ for(;;){ if(i[1] >= len) return 0; var - _h_ = /*<>*/ i[1], + a = /*<>*/ i[1], label = - /*<>*/ caml_check_bound(methods, _h_) - [1 + _h_], + /*<>*/ caml_check_bound(methods, a)[1 + a], next = /*<>*/ function(param){ /*<>*/ i[1]++; - var _m_ = /*<>*/ i[1]; - /*<>*/ return caml_check_bound - (methods, _m_) - [1 + _m_] /*<>*/ ; + var a = /*<>*/ i[1]; + /*<>*/ return caml_check_bound(methods, a) + [1 + a] /*<>*/ ; }, clo = /*<>*/ next(0); /*<>*/ if(typeof clo === "number") @@ -32073,11 +31915,11 @@ clo$0 = function(obj){ var - _l_ = + a = /*<>*/ caml_call1 (obj[1][1 + m$10], obj); /*<>*/ return caml_call2 - (obj[1][1 + n$22], obj, _l_); + (obj[1][1 + n$22], obj, a); }; break; case 20: @@ -32102,8 +31944,8 @@ var clo$0 = function(obj){ - var _k_ = /*<>*/ obj[1 + n$21]; - return caml_call1(caml_get_public_method(_k_, m$8, 0), _k_) /*<>*/ ; + var a = /*<>*/ obj[1 + n$21]; + return caml_call1(caml_get_public_method(a, m$8, 0), a) /*<>*/ ; }; break; case 22: @@ -32119,9 +31961,8 @@ var clo$0 = function(obj){ - var - _j_ = /*<>*/ obj[1 + e$5][1 + n$20]; - return caml_call1(caml_get_public_method(_j_, m$7, 0), _j_) /*<>*/ ; + var a = /*<>*/ obj[1 + e$5][1 + n$20]; + return caml_call1(caml_get_public_method(a, m$7, 0), a) /*<>*/ ; }; break; default: @@ -32134,11 +31975,11 @@ clo$0 = function(obj){ var - _i_ = + a = /*<>*/ caml_call1 (obj[1][1 + n$19], obj); /*<>*/ return caml_call1 - (caml_get_public_method(_i_, m$6, 0), _i_) /*<>*/ ; + (caml_get_public_method(a, m$6, 0), a) /*<>*/ ; }; } else @@ -32232,8 +32073,8 @@ CamlinternalOO = global_data.CamlinternalOO, Assert_failure = global_data.Assert_failure, cst_CamlinternalMod_init_mod_n = "CamlinternalMod.init_mod: not a module", - _a_ = [0, cst_camlinternalMod_ml, 72, 5], - _b_ = [0, cst_camlinternalMod_ml, 81, 2], + a = [0, cst_camlinternalMod_ml, 72, 5], + b = [0, cst_camlinternalMod_ml, 81, 2], cst_CamlinternalMod_update_mod = "CamlinternalMod.update_mod: not a module"; function init_mod_block(loc, comps$0){ @@ -32241,10 +32082,10 @@ length = /*<>*/ comps$0.length - 1, modu = /*<>*/ runtime.caml_obj_block(0, length), - _h_ = /*<>*/ length - 1 | 0, - _g_ = 0; - if(_h_ >= 0){ - var i = _g_; + a = /*<>*/ length - 1 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ var shape = @@ -32276,9 +32117,9 @@ /*<>*/ if(l$0 === l) /*<>*/ throw caml_maybe_attach_backtrace ([0, Stdlib[15], loc], 1); - var _j_ = /*<>*/ caml_obj_tag(l); - if(250 === _j_) return l[1]; - if(246 !== _j_ && 244 !== _j_) return l; + var a = /*<>*/ caml_obj_tag(l); + if(250 === a) return l[1]; + if(246 !== a && 244 !== a) return l; return caml_call1(CamlinternalLazy[2], l); }]); var init = /*<>*/ l; @@ -32300,9 +32141,9 @@ v = /*<>*/ shape[1], init = /*<>*/ v; /*<>*/ modu[1 + i] = init; - var _i_ = /*<>*/ i + 1 | 0; - if(_h_ === i) break; - i = _i_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return modu; @@ -32319,11 +32160,9 @@ function update_mod_block(comps$0, modu, n){ /*<>*/ if (0 === caml_obj_tag(n) && comps$0.length - 1 <= n.length - 1){ - var - _e_ = /*<>*/ comps$0.length - 2 | 0, - _d_ = 0; - if(_e_ >= 0){ - var i = _d_; + var c = /*<>*/ comps$0.length - 2 | 0, e = 0; + if(c >= 0){ + var i = e; for(;;){ var n$0 = /*<>*/ n[1 + i], @@ -32340,14 +32179,14 @@ j = /*<>*/ 0; for(;;){ /*<>*/ cl[1 + j] = n$0[1 + j]; - var _c_ = /*<>*/ j + 1 | 0; + var d = /*<>*/ j + 1 | 0; if(2 === j) break; - j = _c_; + j = d; } break a; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _a_], 1); + ([0, Assert_failure, a], 1); } /*<>*/ modu[1 + i] = n$0; } @@ -32356,15 +32195,15 @@ /*<>*/ update_mod_block (comps, modu[1 + i], n$0); } - var _f_ = /*<>*/ i + 1 | 0; - if(_e_ === i) break; - i = _f_; + var f = /*<>*/ i + 1 | 0; + if(c === i) break; + i = f; } } /*<>*/ return 0; } /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _b_], 1); + ([0, Assert_failure, b], 1); /*<>*/ } function update_mod(shape, o, n){ /*<>*/ if @@ -32443,24 +32282,24 @@ Assert_failure = global_data.Assert_failure, Stdlib_Obj = global_data.Stdlib__Obj, CamlinternalOO = global_data.CamlinternalOO, - _a_ = [0, 0]; + a = [0, 0]; function copy(a, dummy){ - var _aH_ = /*<>*/ Stdlib_Obj[17]; - if(caml_obj_tag(a) !== _aH_) + var c = /*<>*/ Stdlib_Obj[17]; + if(caml_obj_tag(a) !== c) /*<>*/ return caml_call1(Stdlib_Array[7], a) /*<>*/ ; var n = /*<>*/ a.length - 1, arr = /*<>*/ caml_array_make(n, dummy), - _aJ_ = /*<>*/ n - 1 | 0, - _aI_ = 0; - if(_aJ_ >= 0){ - var i = _aI_; + b = /*<>*/ n - 1 | 0, + d = 0; + if(b >= 0){ + var i = d; for(;;){ var v = /*<>*/ a[1 + i]; /*<>*/ arr[1 + i] = v; - var _aK_ = /*<>*/ i + 1 | 0; - if(_aJ_ === i) break; - i = _aK_; + var e = /*<>*/ i + 1 | 0; + if(b === i) break; + i = e; } } /*<>*/ return arr; @@ -32504,11 +32343,11 @@ cst_iter = "iter", cst_append$0 = cst_append$1, cst_append = cst_append$1, - _r_ = + t = [0, [11, "Dynarray.blit: invalid blit length (", [4, 0, 0, 0, [12, 41, 0]]], "Dynarray.blit: invalid blit length (%d)"], - _s_ = + u = [0, [11, "Dynarray.blit: invalid source region (", @@ -32524,7 +32363,7 @@ 0, [11, ") in source dynarray of length ", [4, 0, 0, 0, 0]]]]]], "Dynarray.blit: invalid source region (%d..%d) in source dynarray of length %d"], - _t_ = + v = [0, [11, "Dynarray.blit: invalid target region (", @@ -32544,18 +32383,18 @@ cst_blit$0 = cst_blit$1, cst_set_capacity = "set_capacity", cst_ensure_capacity = cst_ensure_capacity$0, - _q_ = [0, cst_dynarray_ml, 606, 4], - _p_ = [0, cst_dynarray_ml, 611, 4], - _o_ = [0, cst_dynarray_ml, 612, 4], + s = [0, cst_dynarray_ml, 606, 4], + q = [0, cst_dynarray_ml, 611, 4], + p = [0, cst_dynarray_ml, 612, 4], cst_truncate = "truncate", cst_set = "set", cst_init = "init", cst_make = "make", - _n_ = + o = [0, [11, cst_Dynarray, [2, 0, [11, ": empty array", 0]]], "Dynarray.%s: empty array"], - _m_ = + n = [0, [11, cst_Dynarray, @@ -32569,13 +32408,13 @@ 0, [11, " to ", [4, 0, 0, 0, [11, " occurred during iteration", 0]]]]]]], "Dynarray.%s: a length change from %d to %d occurred during iteration"], - _l_ = + m = [0, [2, 0, [11, ": length ", [4, 0, 0, 0, [11, " > capacity ", [4, 0, 0, 0, 0]]]]], "%s: length %d > capacity %d"], - _k_ = + l = [0, [2, 0, @@ -32583,7 +32422,7 @@ ": missing element at position ", [4, 0, 0, 0, [11, " < length ", [4, 0, 0, 0, 0]]]]], "%s: missing element at position %d < length %d"], - _j_ = + k = [0, [11, cst_Dynarray, @@ -32597,7 +32436,7 @@ 0, [11, " (max_array_length is ", [4, 0, 0, 0, [12, 41, 0]]]]]]], "Dynarray.%s: cannot grow to requested length %d (max_array_length is %d)"], - _i_ = + j = [0, [11, cst_Dynarray, @@ -32605,7 +32444,7 @@ 0, [11, ": negative capacity ", [4, 0, 0, 0, [11, cst_requested, 0]]]]], "Dynarray.%s: negative capacity %d requested"], - _h_ = + i = [0, [11, cst_Dynarray, @@ -32613,7 +32452,7 @@ 0, [11, ": negative length ", [4, 0, 0, 0, [11, cst_requested, 0]]]]], "Dynarray.%s: negative length %d requested"], - _f_ = + g = [0, [11, cst_Dynarray, @@ -32623,7 +32462,7 @@ cst_index, [4, 0, 0, 0, [11, " out of bounds (empty dynarray)", 0]]]]], "Dynarray.%s: index %d out of bounds (empty dynarray)"], - _g_ = + h = [0, [11, cst_Dynarray, @@ -32633,43 +32472,43 @@ cst_index, [4, 0, 0, 0, [11, " out of bounds (0..", [4, 0, 0, 0, [12, 41, 0]]]]]]], "Dynarray.%s: index %d out of bounds (0..%d)"], - _d_ = [0, cst_dynarray_ml, 289, 13], - _e_ = [0, cst_dynarray_ml, 299, 8], + d = [0, cst_dynarray_ml, 289, 13], + e = [0, cst_dynarray_ml, 299, 8], cst_x = "x"; - if(! _a_[1]){ - var - _b_ = caml_call1(CamlinternalOO[16], 0), - _c_ = caml_call2(CamlinternalOO[3], _b_, cst_x); - caml_call1(CamlinternalOO[17], _b_); - _a_[1] = - function(_aF_){ - var _aG_ = /*<>*/ caml_call2(CamlinternalOO[24], 0, _b_); - _aG_[1 + _c_] = _aF_[2]; - return _aG_; + if(! a[1]){ + var + b = caml_call1(CamlinternalOO[16], 0), + c = caml_call2(CamlinternalOO[3], b, cst_x); + caml_call1(CamlinternalOO[17], b); + a[1] = + function(d){ + var a = /*<>*/ caml_call2(CamlinternalOO[24], 0, b); + a[1 + c] = d[2]; + return a; }; } - var dummy = /*<>*/ caml_call1(_a_[1], [0, 0, r]); + var dummy = /*<>*/ caml_call1(a[1], [0, 0, r]); /*<>*/ r[1] = [0, dummy]; function index_out_of_bounds(f, i, length){ /*<>*/ return 0 === length ? /*<>*/ caml_call4 - (Stdlib_Printf[10], Stdlib[1], _f_, f, i) + (Stdlib_Printf[10], Stdlib[1], g, f, i) : /*<>*/ caml_call5 - (Stdlib_Printf[10], Stdlib[1], _g_, f, i, length - 1 | 0) /*<>*/ ; + (Stdlib_Printf[10], Stdlib[1], h, f, i, length - 1 | 0) /*<>*/ ; } function negative_length_requested(f, n){ /*<>*/ return caml_call4 - (Stdlib_Printf[10], Stdlib[1], _h_, f, n) /*<>*/ ; + (Stdlib_Printf[10], Stdlib[1], i, f, n) /*<>*/ ; } function negative_capacity_requested(f, n){ /*<>*/ return caml_call4 - (Stdlib_Printf[10], Stdlib[1], _i_, f, n) /*<>*/ ; + (Stdlib_Printf[10], Stdlib[1], j, f, n) /*<>*/ ; } function missing_element(i, length){ /*<>*/ return caml_call5 (Stdlib_Printf[10], Stdlib[1], - _k_, + l, invalid_state_description, i, length) /*<>*/ ; @@ -32677,25 +32516,25 @@ function check_same_length(f, param, expected){ var length_a = /*<>*/ param[1], - _aE_ = /*<>*/ expected !== length_a ? 1 : 0; - return _aE_ + a = /*<>*/ expected !== length_a ? 1 : 0; + return a ? /*<>*/ caml_call5 - (Stdlib_Printf[10], Stdlib[1], _m_, f, expected, length_a) - : _aE_ /*<>*/ ; + (Stdlib_Printf[10], Stdlib[1], n, f, expected, length_a) + : a /*<>*/ ; } function check_valid_length(length, arr){ var capacity = /*<>*/ arr.length - 1, - _aD_ = /*<>*/ capacity < length ? 1 : 0; - return _aD_ + a = /*<>*/ capacity < length ? 1 : 0; + return a ? /*<>*/ caml_call5 (Stdlib_Printf[10], Stdlib[1], - _l_, + m, invalid_state_description, length, capacity) - : _aD_ /*<>*/ ; + : a /*<>*/ ; } function unsafe_get(arr, dummy, i, length){ var v = /*<>*/ arr[1 + i]; @@ -32709,8 +32548,8 @@ function make(n, x){ /*<>*/ if(n < 0) /*<>*/ negative_length_requested(cst_make, n); - var _aC_ = /*<>*/ Stdlib_Obj[16]; - if(caml_obj_tag(x) !== _aC_) + var a = /*<>*/ Stdlib_Obj[16]; + if(caml_obj_tag(x) !== a) var arr$0 = /*<>*/ /*<>*/ caml_array_make @@ -32727,16 +32566,16 @@ /*<>*/ negative_length_requested(cst_init, n); var arr = /*<>*/ caml_array_make(n, dummy), - _aA_ = /*<>*/ n - 1 | 0, - _az_ = 0; - if(_aA_ >= 0){ - var i = _az_; + a = /*<>*/ n - 1 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ var v = /*<>*/ caml_call1(f, i); /*<>*/ arr[1 + i] = v; - var _aB_ = /*<>*/ i + 1 | 0; - if(_aA_ === i) break; - i = _aB_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return [0, n, arr, dummy]; @@ -32786,7 +32625,7 @@ /*<>*/ check_valid_length(length, arr); /*<>*/ if(0 === length) /*<>*/ caml_call3 - (Stdlib_Printf[10], Stdlib[1], _n_, f$0); + (Stdlib_Printf[10], Stdlib[1], o, f$0); /*<>*/ return unsafe_get (arr, dummy, length - 1 | 0, length) /*<>*/ ; } @@ -32819,26 +32658,26 @@ /*<>*/ try{ var x = /*<>*/ pop_last(a); } - catch(_ay_){ - var _ax_ = /*<>*/ caml_wrap_exception(_ay_); - if(_ax_ === Stdlib[8]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_ax_, 0); + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b === Stdlib[8]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(b, 0); } /*<>*/ return [0, x]; /*<>*/ } function remove_last(a){ var last = /*<>*/ a[1] - 1 | 0, - _av_ = /*<>*/ 0 <= last ? 1 : 0; - if(_av_){ + b = /*<>*/ 0 <= last ? 1 : 0; + if(b){ /*<>*/ a[1] = last; var dummy = /*<>*/ a[3]; caml_check_bound(a[2], last)[1 + last] = dummy; - var _aw_ = /*<>*/ 0; + var c = /*<>*/ 0; } else - var _aw_ = /*<>*/ _av_; - return _aw_; + var c = /*<>*/ b; + return c; /*<>*/ } function truncate(a, n){ /*<>*/ if(n < 0) @@ -32869,34 +32708,28 @@ /*<>*/ return 0; /*<>*/ if(Stdlib_Sys[13] < capacity_request) /*<>*/ caml_call5 - (Stdlib_Printf[10], - Stdlib[1], - _j_, - f$1, - capacity_request, - Stdlib_Sys[13]); + (Stdlib_Printf[10], Stdlib[1], k, f$1, capacity_request, Stdlib_Sys[13]); var n = /*<>*/ 512 < cur_capacity ? cur_capacity + (cur_capacity / 2 | 0) | 0 : cur_capacity * 2 | 0, - _as_ = /*<>*/ Stdlib_Sys[13], - _at_ = caml_call2(Stdlib[17], 8, n), - _au_ = /*<>*/ caml_call2(Stdlib[16], _at_, _as_), + b = /*<>*/ Stdlib_Sys[13], + c = caml_call2(Stdlib[17], 8, n), + d = /*<>*/ caml_call2(Stdlib[16], c, b), new_capacity = - /*<>*/ caml_call2 - (Stdlib[17], _au_, capacity_request); + /*<>*/ caml_call2(Stdlib[17], d, capacity_request); /*<>*/ if(0 >= new_capacity) - throw caml_maybe_attach_backtrace([0, Assert_failure, _q_], 1); + throw caml_maybe_attach_backtrace([0, Assert_failure, s], 1); var new_arr = /*<>*/ extend(arr, a[1], a[3], new_capacity); /*<>*/ a[2] = new_arr; /*<>*/ if(0 > capacity_request) - throw caml_maybe_attach_backtrace([0, Assert_failure, _p_], 1); + throw caml_maybe_attach_backtrace([0, Assert_failure, q], 1); /*<>*/ if(capacity_request <= new_arr.length - 1) return 0; - throw caml_maybe_attach_backtrace([0, Assert_failure, _o_], 1); + throw caml_maybe_attach_backtrace([0, Assert_failure, p], 1); /*<>*/ } function ensure_extra_capacity(a, extra_capacity_request){ /*<>*/ return ensure_capacity @@ -32920,12 +32753,12 @@ /*<>*/ return 0; } var - _aq_ = /*<>*/ cur_capacity < n ? 1 : 0, - _ar_ = - _aq_ + b = /*<>*/ cur_capacity < n ? 1 : 0, + c = + b ? (a[2] = /*<>*/ extend(arr, a[1], a[3], n), 0) - : _aq_; - /*<>*/ return _ar_; + : b; + /*<>*/ return c; /*<>*/ } function reset(param){ /*<>*/ param[1] = 0; @@ -32943,8 +32776,8 @@ /*<>*/ return 0; /*<>*/ for(;;){ /*<>*/ ensure_extra_capacity(a, 1); - var _ap_ = /*<>*/ 1 - add_last_if_room(a, x); - /*<>*/ if(! _ap_) return _ap_; + var b = /*<>*/ 1 - add_last_if_room(a, x); + /*<>*/ if(! b) return b; } /*<>*/ } function append_list(a, li){ @@ -32990,47 +32823,46 @@ dst_arr, dst_pos, blit_length) /*<>*/ ; - var _af_ = /*<>*/ blit_length < 0 ? 1 : 0; - if(_af_) - var _ag_ = _af_; + var b = /*<>*/ blit_length < 0 ? 1 : 0; + if(b) + var a = b; else{ - var _ak_ = src_pos < 0 ? 1 : 0; - if(_ak_) - var _ag_ = _ak_; + var f = src_pos < 0 ? 1 : 0; + if(f) + var a = f; else{ - var _al_ = (src_pos + blit_length | 0) < 0 ? 1 : 0; - if(_al_) - var _ag_ = _al_; + var g = (src_pos + blit_length | 0) < 0 ? 1 : 0; + if(g) + var a = g; else{ - var _am_ = src_arr.length - 1 < (src_pos + blit_length | 0) ? 1 : 0; - if(_am_) - var _ag_ = _am_; + var h = src_arr.length - 1 < (src_pos + blit_length | 0) ? 1 : 0; + if(h) + var a = h; else{ - var _an_ = dst_pos < 0 ? 1 : 0; - if(_an_) - var _ag_ = _an_; + var j = dst_pos < 0 ? 1 : 0; + if(j) + var a = j; else var - _ao_ = (dst_pos + blit_length | 0) < 0 ? 1 : 0, - _ag_ = - _ao_ || (dst_arr.length - 1 < (dst_pos + blit_length | 0) ? 1 : 0); + m = (dst_pos + blit_length | 0) < 0 ? 1 : 0, + a = m || (dst_arr.length - 1 < (dst_pos + blit_length | 0) ? 1 : 0); } } } } - if(_ag_) + if(a) /*<>*/ throw caml_maybe_attach_backtrace - ([0, Assert_failure, _d_], 1); + ([0, Assert_failure, d], 1); /*<>*/ if(src_arr === dst_arr) - throw caml_maybe_attach_backtrace([0, Assert_failure, _e_], 1); - var _ai_ = /*<>*/ blit_length - 1 | 0, _ah_ = 0; - if(_ai_ >= 0){ - var i = _ah_; + throw caml_maybe_attach_backtrace([0, Assert_failure, e], 1); + var c = /*<>*/ blit_length - 1 | 0, k = 0; + if(c >= 0){ + var i = k; for(;;){ /*<>*/ dst_arr[1 + (dst_pos + i | 0)] = src_arr[1 + (src_pos + i | 0)]; - var _aj_ = /*<>*/ i + 1 | 0; - if(_ai_ === i) break; - i = _aj_; + var l = /*<>*/ i + 1 | 0; + if(c === i) break; + i = l; } } /*<>*/ return 0; @@ -33039,26 +32871,26 @@ var src_length = /*<>*/ src[1], dst_length = dst[1]; /*<>*/ if(len < 0) /*<>*/ caml_call3 - (Stdlib_Printf[10], Stdlib[1], _r_, len); + (Stdlib_Printf[10], Stdlib[1], t, len); var - _ab_ = /*<>*/ src_pos < 0 ? 1 : 0, - _ac_ = _ab_ || (src_length < (src_pos + len | 0) ? 1 : 0); - if(_ac_) + a = /*<>*/ src_pos < 0 ? 1 : 0, + b = a || (src_length < (src_pos + len | 0) ? 1 : 0); + if(b) /*<>*/ caml_call5 (Stdlib_Printf[10], Stdlib[1], - _s_, + u, src_pos, src_pos + len | 0, src_length); var - _ad_ = /*<>*/ dst_pos < 0 ? 1 : 0, - _ae_ = _ad_ || (dst_length < dst_pos ? 1 : 0); - if(_ae_) + c = /*<>*/ dst_pos < 0 ? 1 : 0, + d = c || (dst_length < dst_pos ? 1 : 0); + if(d) /*<>*/ caml_call5 (Stdlib_Printf[10], Stdlib[1], - _t_, + v, dst_pos, dst_pos + len | 0, dst_length); @@ -33074,23 +32906,23 @@ /*<>*/ if(arr.length - 1 < (length_a + length_b | 0)) /*<>*/ return 0; /*<>*/ a[1] = length_a + length_b | 0; - var _X_ = /*<>*/ Stdlib_Obj[17], src_pos = 0; - if(caml_obj_tag(src) !== _X_) + var e = /*<>*/ Stdlib_Obj[17], src_pos = 0; + if(caml_obj_tag(src) !== e) /*<>*/ caml_call5 (Stdlib_Array[9], src, src_pos, arr, length_a, length_b); else{ - var _Z_ = /*<>*/ length_b - 1 | 0, _Y_ = 0; - if(_Z_ >= 0){ - var i = _Y_; + var b = /*<>*/ length_b - 1 | 0, f = 0; + if(b >= 0){ + var i = f; for(;;){ var - ___ = /*<>*/ i | 0, - v = /*<>*/ caml_check_bound(src, ___)[1 + ___], - _$_ = /*<>*/ length_a + i | 0; - /*<>*/ caml_check_bound(arr, _$_)[1 + _$_] = v; - var _aa_ = /*<>*/ i + 1 | 0; - if(_Z_ === i) break; - i = _aa_; + c = /*<>*/ i | 0, + v = /*<>*/ caml_check_bound(src, c)[1 + c], + d = /*<>*/ length_a + i | 0; + /*<>*/ caml_check_bound(arr, d)[1 + d] = v; + var g = /*<>*/ i + 1 | 0; + if(b === i) break; + i = g; } } } @@ -33101,8 +32933,8 @@ /*<>*/ return 0; /*<>*/ for(;;){ /*<>*/ ensure_extra_capacity(a, b.length - 1); - var _W_ = /*<>*/ 1 - append_array_if_room(a, b); - /*<>*/ if(! _W_) return _W_; + var c = /*<>*/ 1 - append_array_if_room(a, b); + /*<>*/ if(! c) return c; } /*<>*/ } function append_if_room(a, b, length_b){ @@ -33123,22 +32955,22 @@ /*<>*/ for(;;){ /*<>*/ ensure_extra_capacity(a, length_b); /*<>*/ check_same_length(cst_append$0, b, length_b); - var _V_ = /*<>*/ 1 - append_if_room(a, b, length_b); - /*<>*/ if(! _V_) return _V_; + var c = /*<>*/ 1 - append_if_room(a, b, length_b); + /*<>*/ if(! c) return c; } /*<>*/ } function iter(f, k, a){ var length = /*<>*/ a[1], arr = a[2], dummy = a[3]; /*<>*/ check_valid_length(length, arr); - var _T_ = /*<>*/ length - 1 | 0, _S_ = 0; - if(_T_ >= 0){ - var i = _S_; + var b = /*<>*/ length - 1 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ /*<>*/ caml_call1 (k, /*<>*/ unsafe_get(arr, dummy, i, length)); - var _U_ = /*<>*/ i + 1 | 0; - if(_T_ === i) break; - i = _U_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return check_same_length(f, a, length) /*<>*/ ; @@ -33149,15 +32981,15 @@ function iteri(k, a){ var length = /*<>*/ a[1], arr = a[2], dummy = a[3]; /*<>*/ check_valid_length(length, arr); - var _Q_ = /*<>*/ length - 1 | 0, _P_ = 0; - if(_Q_ >= 0){ - var i = _P_; + var b = /*<>*/ length - 1 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ /*<>*/ /*<>*/ caml_call2 (k, i, /*<>*/ unsafe_get(arr, dummy, i, length)); - var _R_ = /*<>*/ i + 1 | 0; - if(_Q_ === i) break; - i = _R_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ return check_same_length(cst_iteri, a, length) /*<>*/ ; @@ -33167,10 +32999,10 @@ /*<>*/ check_valid_length(length, arr_in); var arr_out = /*<>*/ caml_array_make(length, dummy), - _N_ = /*<>*/ length - 1 | 0, - _M_ = 0; - if(_N_ >= 0){ - var i = _M_; + b = /*<>*/ length - 1 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ var v = @@ -33178,9 +33010,9 @@ (f, /*<>*/ unsafe_get(arr_in, dummy, i, length)); /*<>*/ arr_out[1 + i] = v; - var _O_ = /*<>*/ i + 1 | 0; - if(_N_ === i) break; - i = _O_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } var res = /*<>*/ [0, length, arr_out, dummy]; @@ -33192,10 +33024,10 @@ /*<>*/ check_valid_length(length, arr_in); var arr_out = /*<>*/ caml_array_make(length, dummy), - _K_ = /*<>*/ length - 1 | 0, - _J_ = 0; - if(_K_ >= 0){ - var i = _J_; + b = /*<>*/ length - 1 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ var v = @@ -33204,9 +33036,9 @@ i, /*<>*/ unsafe_get(arr_in, dummy, i, length)); /*<>*/ arr_out[1 + i] = v; - var _L_ = /*<>*/ i + 1 | 0; - if(_K_ === i) break; - i = _L_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } var res = /*<>*/ [0, length, arr_out, dummy]; @@ -33218,16 +33050,16 @@ /*<>*/ check_valid_length(length, arr); var r = /*<>*/ [0, acc], - _H_ = /*<>*/ length - 1 | 0, - _G_ = 0; - if(_H_ >= 0){ - var i = _G_; + b = /*<>*/ length - 1 | 0, + c = 0; + if(b >= 0){ + var i = c; for(;;){ var v = /*<>*/ unsafe_get(arr, dummy, i, length); /*<>*/ r[1] = caml_call2(f, r[1], v); - var _I_ = /*<>*/ i + 1 | 0; - if(_H_ === i) break; - i = _I_; + var d = /*<>*/ i + 1 | 0; + if(b === i) break; + i = d; } } /*<>*/ check_same_length(cst_fold_left, a, length); @@ -33238,15 +33070,15 @@ /*<>*/ check_valid_length(length, arr); var r = /*<>*/ [0, acc], - _E_ = /*<>*/ length - 1 | 0; - if(_E_ >= 0){ - var i = _E_; + b = /*<>*/ length - 1 | 0; + if(b >= 0){ + var i = b; for(;;){ var v = /*<>*/ unsafe_get(arr, dummy, i, length); /*<>*/ r[1] = caml_call2(f, v, r[1]); - var _F_ = /*<>*/ i - 1 | 0; + var c = /*<>*/ i - 1 | 0; if(0 === i) break; - i = _F_; + i = c; } } /*<>*/ check_same_length(cst_fold_right, a, length); @@ -33261,15 +33093,15 @@ var res = /*<>*/ 0; else{ var - _D_ = + b = /*<>*/ /*<>*/ caml_call1 (p, /*<>*/ unsafe_get(arr, dummy, i, length)); - /*<>*/ if(! _D_){ + /*<>*/ if(! b){ var i$0 = i + 1 | 0; i = i$0; continue; } - var res = _D_; + var res = b; } /*<>*/ check_same_length(cst_exists, a, length); /*<>*/ return res; @@ -33284,15 +33116,15 @@ var res = /*<>*/ 1; else{ var - _C_ = + b = /*<>*/ /*<>*/ caml_call1 (p, /*<>*/ unsafe_get(arr, dummy, i, length)); - /*<>*/ if(_C_){ + /*<>*/ if(b){ var i$0 = i + 1 | 0; i = i$0; continue; } - var res = _C_; + var res = b; } /*<>*/ check_same_length(cst_for_all, a, length); /*<>*/ return res; @@ -33303,10 +33135,10 @@ /*<>*/ iter (cst_filter, function(x){ - var _B_ = /*<>*/ caml_call1(f, x); - /*<>*/ return _B_ + var a = /*<>*/ caml_call1(f, x); + /*<>*/ return a ? /*<>*/ add_last(b, x) - : _B_ /*<>*/ ; + : a /*<>*/ ; }, a); /*<>*/ return b; @@ -33473,18 +33305,18 @@ var r = /*<>*/ 1; else{ var - _z_ = /*<>*/ unsafe_get(arr2, dum2, i, length), - _A_ = + b = /*<>*/ unsafe_get(arr2, dum2, i, length), + a = /*<>*/ /*<>*/ caml_call2 (eq, /*<>*/ unsafe_get(arr1, dum1, i, length), - _z_); - /*<>*/ if(_A_){ + b); + /*<>*/ if(a){ var i$0 = i + 1 | 0; i = i$0; continue; } - var r = _A_; + var r = a; } /*<>*/ check_same_length(cst_equal, a1, length); /*<>*/ check_same_length(cst_equal$0, a2, length); @@ -33509,12 +33341,12 @@ var r = /*<>*/ 0; else{ var - _y_ = /*<>*/ unsafe_get(arr2, dum2, i, length), + a = /*<>*/ unsafe_get(arr2, dum2, i, length), c = /*<>*/ /*<>*/ caml_call2 (cmp, /*<>*/ unsafe_get(arr1, dum1, i, length), - _y_); + a); /*<>*/ if(0 === c){ var i$0 = /*<>*/ i + 1 | 0; i = i$0; @@ -33551,11 +33383,9 @@ var a = /*<>*/ caml_call1(Stdlib_Array[11], li), length = /*<>*/ a.length - 1, - _x_ = /*<>*/ Stdlib_Obj[17], + b = /*<>*/ Stdlib_Obj[17], arr = - caml_obj_tag(a) !== _x_ - ? a - : /*<>*/ copy(a, dummy); + caml_obj_tag(a) !== b ? a : /*<>*/ copy(a, dummy); /*<>*/ return [0, length, arr, dummy]; /*<>*/ } function to_list(a){ @@ -33563,15 +33393,15 @@ /*<>*/ check_valid_length(length, arr); var l = /*<>*/ [0, 0], - _u_ = /*<>*/ length - 1 | 0; - if(_u_ >= 0){ - var i = _u_; + b = /*<>*/ length - 1 | 0; + if(b >= 0){ + var i = b; for(;;){ - var _v_ = /*<>*/ l[1]; - l[1] = [0, unsafe_get(arr, dummy, i, length), _v_]; - var _w_ = /*<>*/ i - 1 | 0; + var c = /*<>*/ l[1]; + l[1] = [0, unsafe_get(arr, dummy, i, length), c]; + var d = /*<>*/ i - 1 | 0; if(0 === i) break; - i = _w_; + i = d; } } /*<>*/ check_same_length(cst_to_list, a, length); @@ -33722,9 +33552,9 @@ var dummy = 0, global_data = runtime.caml_get_global_data(), - _c_ = [0, 0], - _b_ = [0, 0], - _a_ = [0, 0], + c = [0, 0], + b = [0, 0], + a = [0, 0], Stdlib_List = global_data.Stdlib__List, Stdlib = global_data.Stdlib, Stdlib_Obj = global_data.Stdlib__Obj, @@ -33737,7 +33567,7 @@ Stdlib_Random = global_data.Stdlib__Random; function MakeSeeded(H){ var - prng = [246, function(_at_){return caml_call1(Stdlib_Random[19][2], 0);}]; + prng = [246, function(a){return caml_call1(Stdlib_Random[19][2], 0);}]; function create(opt, initial_size){ var random = @@ -33757,18 +33587,18 @@ break a; } /*<>*/ if(random){ - var _ar_ = /*<>*/ runtime.caml_obj_tag(prng); + var a = /*<>*/ runtime.caml_obj_tag(prng); a: - if(250 === _ar_) - var _as_ = prng[1]; + if(250 === a) + var b = prng[1]; else{ - if(246 !== _ar_ && 244 !== _ar_){var _as_ = prng; break a;} - var _as_ = caml_call1(CamlinternalLazy[2], prng); + if(246 !== a && 244 !== a){var b = prng; break a;} + var b = caml_call1(CamlinternalLazy[2], prng); } var seed = /*<>*/ /*<>*/ caml_call1 - (Stdlib_Random[19][4], _as_); + (Stdlib_Random[19][4], b); } else var seed = /*<>*/ 0; @@ -33782,15 +33612,15 @@ /*<>*/ h[1] = 0; var len = /*<>*/ h[2].length - 1, - _ap_ = /*<>*/ len - 1 | 0, - _ao_ = 0; - if(_ap_ >= 0){ - var i = _ao_; + a = /*<>*/ len - 1 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; - var _aq_ = /*<>*/ i + 1 | 0; - if(_ap_ === i) break; - i = _aq_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return 0; @@ -33807,10 +33637,10 @@ } function copy(h){ var - _al_ = /*<>*/ h[4], - _am_ = h[3], - _an_ = caml_call1(Stdlib_Array[7], h[2]); - /*<>*/ return [0, h[1], _an_, _am_, _al_]; + a = /*<>*/ h[4], + b = h[3], + c = caml_call1(Stdlib_Array[7], h[2]); + /*<>*/ return [0, h[1], c, b, a]; /*<>*/ } function key_index(h, hkey){ /*<>*/ return hkey & (h[2].length - 2 | 0); @@ -33836,17 +33666,17 @@ /*<>*/ } var d = /*<>*/ h[2], - _aj_ = /*<>*/ d.length - 2 | 0, - _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + a = /*<>*/ d.length - 2 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ d[1 + i] = /*<>*/ do_bucket ( /*<>*/ caml_check_bound(d, i)[1 + i]); - var _ak_ = /*<>*/ i + 1 | 0; - if(_aj_ === i) break; - i = _ak_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return 0; @@ -33858,9 +33688,9 @@ nsize = /*<>*/ osize * 2 | 0; /*<>*/ clean(h); var - _ac_ = /*<>*/ nsize < Stdlib_Sys[13] ? 1 : 0, - _ad_ = _ac_ ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : _ac_; - if(_ad_){ + a = /*<>*/ nsize < Stdlib_Sys[13] ? 1 : 0, + b = a ? (osize >>> 1 | 0) <= h[1] ? 1 : 0 : a; + if(b){ var ndata = /*<>*/ caml_array_make(nsize, 0); /*<>*/ h[2] = ndata; var @@ -33877,23 +33707,23 @@ /*<>*/ ndata[1 + nidx] = [0, hkey, data, caml_check_bound(ndata, nidx)[1 + nidx]]; /*<>*/ }, - _af_ = /*<>*/ osize - 1 | 0, - _ae_ = 0; - if(_af_ >= 0){ - var i = _ae_; + c = /*<>*/ osize - 1 | 0, + e = 0; + if(c >= 0){ + var i = e; for(;;){ /*<>*/ /*<>*/ insert_bucket ( /*<>*/ caml_check_bound(odata, i)[1 + i]); - var _ah_ = /*<>*/ i + 1 | 0; - if(_af_ === i) break; - i = _ah_; + var f = /*<>*/ i + 1 | 0; + if(c === i) break; + i = f; } } - var _ag_ = /*<>*/ 0; + var d = /*<>*/ 0; } else - var _ag_ = /*<>*/ _ad_; - return _ag_; + var d = /*<>*/ b; + return d; /*<>*/ } function add(h, key, info){ var @@ -33907,9 +33737,8 @@ caml_check_bound(h[2], i)[1 + i]]; /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; /*<>*/ h[1] = h[1] + 1 | 0; - var - _ab_ = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _ab_ ? /*<>*/ resize(h) : _ab_ /*<>*/ ; + var a = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; + return a ? /*<>*/ resize(h) : a /*<>*/ ; } function remove(h, key){ var hkey = /*<>*/ caml_call2(H[2], h[3], key); @@ -33942,20 +33771,20 @@ /*<>*/ } var i = /*<>*/ key_index(h, hkey), - _aa_ = + a = /*<>*/ /*<>*/ remove_bucket ( /*<>*/ caml_check_bound(h[2], i)[1 + i]); - /*<>*/ caml_check_bound(h[2], i)[1 + i] = _aa_; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = a; /*<>*/ return 0; } function find(h, key){ var hkey = /*<>*/ caml_call2(H[2], h[3], key), - _$_ = /*<>*/ key_index(h, hkey), + a = /*<>*/ key_index(h, hkey), param = /*<>*/ /*<>*/ caml_check_bound - (h[2], _$_) - [1 + _$_]; + (h[2], a) + [1 + a]; /*<>*/ for(;;){ /*<>*/ if(! param) /*<>*/ throw caml_maybe_attach_backtrace @@ -33987,11 +33816,11 @@ function find_opt(h, key){ var hkey = /*<>*/ caml_call2(H[2], h[3], key), - ___ = /*<>*/ key_index(h, hkey), + a = /*<>*/ key_index(h, hkey), param = /*<>*/ /*<>*/ caml_check_bound - (h[2], ___) - [1 + ___]; + (h[2], a) + [1 + a]; /*<>*/ for(;;){ /*<>*/ if(! param) /*<>*/ return 0; @@ -34047,10 +33876,9 @@ } } /*<>*/ } - var _Z_ = /*<>*/ key_index(h, hkey); + var a = /*<>*/ key_index(h, hkey); /*<>*/ return /*<>*/ find_in_bucket - ( /*<>*/ caml_check_bound(h[2], _Z_) - [1 + _Z_]) /*<>*/ ; + ( /*<>*/ caml_check_bound(h[2], a)[1 + a]) /*<>*/ ; } function replace(h, key, info){ var @@ -34069,9 +33897,8 @@ c = param[2]; /*<>*/ if(hkey === hk){ /*<>*/ if(! caml_call2(H[3], c, key)){ - var - _V_ = /*<>*/ caml_call3(H[5], c, key, info); - return _V_; + var d = /*<>*/ caml_call3(H[5], c, key, info); + return d; } /*<>*/ param = next; } @@ -34081,26 +33908,25 @@ } } } - catch(_Y_){ - var _W_ = /*<>*/ caml_wrap_exception(_Y_); - if(_W_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_W_, 0); + catch(c){ + var a = /*<>*/ caml_wrap_exception(c); + if(a !== Stdlib[8]) throw caml_maybe_attach_backtrace(a, 0); var container = /*<>*/ caml_call2(H[1], key, info); /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, hkey, container, l]; /*<>*/ h[1] = h[1] + 1 | 0; - var - _X_ = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; - return _X_ ? /*<>*/ resize(h) : _X_ /*<>*/ ; + var b = /*<>*/ h[2].length - 1 << 1 < h[1] ? 1 : 0; + return b ? /*<>*/ resize(h) : b /*<>*/ ; } } function mem(h, key){ var hkey = /*<>*/ caml_call2(H[2], h[3], key), - _U_ = /*<>*/ key_index(h, hkey), + a = /*<>*/ key_index(h, hkey), param = /*<>*/ /*<>*/ caml_check_bound - (h[2], _U_) - [1 + _U_]; + (h[2], a) + [1 + a]; /*<>*/ for(;;){ /*<>*/ if(! param) /*<>*/ return 0; @@ -34139,9 +33965,9 @@ /*<>*/ caml_call3 (Stdlib_Array[18], function(m, b){ - var _T_ = /*<>*/ bucket_length(0, b); + var a = /*<>*/ bucket_length(0, b); /*<>*/ return caml_call2 - (Stdlib_Int[11], m, _T_); + (Stdlib_Int[11], m, a); }, 0, h[2]), @@ -34184,9 +34010,9 @@ /*<>*/ caml_call3 (Stdlib_Array[18], function(m, b){ - var _S_ = /*<>*/ bucket_length_alive(0, b); + var a = /*<>*/ bucket_length_alive(0, b); /*<>*/ return caml_call2 - (Stdlib_Int[11], m, _S_); + (Stdlib_Int[11], m, a); }, 0, h[2]), @@ -34321,7 +34147,7 @@ } var include = /*<>*/ MakeSeeded$0([0, equal, seeded_hash]), - _R_ = include[1], + b = include[1], clear = include[2], reset = include[3], copy = include[4], @@ -34339,10 +34165,10 @@ clean = include[17], stats_alive = include[18]; function create(sz){ - /*<>*/ return caml_call2(_R_, _a_, sz) /*<>*/ ; + /*<>*/ return caml_call2(b, a, sz) /*<>*/ ; } function of_seq(i){ - var tbl = /*<>*/ caml_call2(_R_, _a_, 16); + var tbl = /*<>*/ caml_call2(b, a, 16); /*<>*/ caml_call2(replace_seq, tbl, i); /*<>*/ return tbl; /*<>*/ } @@ -34370,8 +34196,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add(b, k, d){ - var _Q_ = /*<>*/ b[1]; - b[1] = [0, make(k, d), _Q_]; + var a = /*<>*/ b[1]; + b[1] = [0, make(k, d), a]; /*<>*/ return 0; /*<>*/ } function test_key(k, e){ @@ -34405,7 +34231,7 @@ match = /*<>*/ caml_call2 (Stdlib_List[40], - function(_P_){ /*<>*/ return test_key(k, _P_);}, + function(a){ /*<>*/ return test_key(k, a);}, b[1]); /*<>*/ if(! match) /*<>*/ return 0; @@ -34480,9 +34306,8 @@ var k2 = /*<>*/ param[2], k1 = param[1], - _O_ = - /*<>*/ caml_call2(H2[2], seed, k2) * 65599 | 0; - /*<>*/ return caml_call2(H1[2], seed, k1) + _O_ | 0 /*<>*/ ; + a = /*<>*/ caml_call2(H2[2], seed, k2) * 65599 | 0; + /*<>*/ return caml_call2(H1[2], seed, k1) + a | 0 /*<>*/ ; /*<>*/ } function equal(c, param){ var @@ -34508,12 +34333,11 @@ /*<>*/ return set_data$0(c, d) /*<>*/ ; } function check_key(c){ - var - _N_ = /*<>*/ caml_call2(Stdlib_Obj[23][7], c, 0); - /*<>*/ return _N_ + var a = /*<>*/ caml_call2(Stdlib_Obj[23][7], c, 0); + /*<>*/ return a ? /*<>*/ caml_call2 (Stdlib_Obj[23][7], c, 1) - : _N_ /*<>*/ ; + : a /*<>*/ ; } /*<>*/ return MakeSeeded ([0, @@ -34537,7 +34361,7 @@ include = /*<>*/ MakeSeeded$1 ([0, equal$0, seeded_hash$0], [0, equal, seeded_hash]), - _M_ = include[1], + a = include[1], clear = include[2], reset = include[3], copy = include[4], @@ -34555,10 +34379,10 @@ clean = include[17], stats_alive = include[18]; function create(sz){ - /*<>*/ return caml_call2(_M_, _b_, sz) /*<>*/ ; + /*<>*/ return caml_call2(a, b, sz) /*<>*/ ; } function of_seq(i){ - var tbl = /*<>*/ caml_call2(_M_, _b_, 16); + var tbl = /*<>*/ caml_call2(a, b, 16); /*<>*/ caml_call2(replace_seq, tbl, i); /*<>*/ return tbl; /*<>*/ } @@ -34586,8 +34410,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$0(b, k1, k2, d){ - var _L_ = /*<>*/ b[1]; - b[1] = [0, make$1(k1, k2, d), _L_]; + var a = /*<>*/ b[1]; + b[1] = [0, make$1(k1, k2, d), a]; /*<>*/ return 0; /*<>*/ } function test_keys(k1, k2, e){ @@ -34623,8 +34447,8 @@ match = /*<>*/ caml_call2 (Stdlib_List[40], - function(_K_){ - /*<>*/ return test_keys(k1, k2, _K_); + function(a){ + /*<>*/ return test_keys(k1, k2, a); }, b[1]); /*<>*/ if(! match) @@ -34664,15 +34488,15 @@ l = /*<>*/ keys.length - 1, eph = /*<>*/ create$1(l); /*<>*/ set_data$1(eph, data); - var _I_ = /*<>*/ l - 1 | 0, _H_ = 0; - if(_I_ >= 0){ - var i = _H_; + var a = /*<>*/ l - 1 | 0, b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ /*<>*/ set_key$0 (eph, i, /*<>*/ caml_check_bound(keys, i)[1 + i]); - var _J_ = /*<>*/ i + 1 | 0; - if(_I_ === i) break; - i = _J_; + var c = /*<>*/ i + 1 | 0; + if(a === i) break; + i = c; } } /*<>*/ return eph; @@ -34683,9 +34507,9 @@ if(l !== keys.length - 1) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[3], 1); - var _D_ = /*<>*/ l - 1 | 0, _C_ = 0; - if(_D_ >= 0){ - var i = _C_; + var b = /*<>*/ l - 1 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ var match = /*<>*/ get_key$0(eph, i); /*<>*/ if(! match) @@ -34695,33 +34519,33 @@ /*<>*/ if(k !== caml_check_bound(keys, i)[1 + i]) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[3], 1); - var _F_ = /*<>*/ i + 1 | 0; - if(_D_ === i) break; - i = _F_; + var e = /*<>*/ i + 1 | 0; + if(b === i) break; + i = e; } } - var _E_ = /*<>*/ get_data$1(eph); - return _E_; + var d = /*<>*/ get_data$1(eph); + return d; } - catch(_G_){ - var _B_ = /*<>*/ caml_wrap_exception(_G_); - if(_B_ === Stdlib[3]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_B_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[3]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } function MakeSeeded$2(H){ function create(k, d){ var c = /*<>*/ create$1(k.length - 1); /*<>*/ set_data$1(c, d); - var _z_ = /*<>*/ k.length - 2 | 0, _y_ = 0; - if(_z_ >= 0){ - var i = _y_; + var a = /*<>*/ k.length - 2 | 0, b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ /*<>*/ set_key$0 (c, i, /*<>*/ caml_check_bound(k, i)[1 + i]); - var _A_ = /*<>*/ i + 1 | 0; - if(_z_ === i) break; - i = _A_; + var e = /*<>*/ i + 1 | 0; + if(a === i) break; + i = e; } } /*<>*/ return c; @@ -34729,19 +34553,19 @@ function seeded_hash(seed, k){ var h = /*<>*/ [0, 0], - _u_ = /*<>*/ k.length - 2 | 0, - _t_ = 0; - if(_u_ >= 0){ - var i = _t_; + a = /*<>*/ k.length - 2 | 0, + b = 0; + if(a >= 0){ + var i = b; for(;;){ var - _v_ = /*<>*/ h[1], - _w_ = caml_check_bound(k, i)[1 + i]; + c = /*<>*/ h[1], + d = caml_check_bound(k, i)[1 + i]; /*<>*/ h[1] = - (caml_call2(H[2], seed, _w_) * 65599 | 0) + _v_ | 0; - var _x_ = /*<>*/ i + 1 | 0; - if(_u_ === i) break; - i = _x_; + (caml_call2(H[2], seed, d) * 65599 | 0) + c | 0; + var e = /*<>*/ i + 1 | 0; + if(a === i) break; + i = e; } } /*<>*/ return h[1]; @@ -34761,8 +34585,8 @@ /*<>*/ return 2; var ki = /*<>*/ match[1], - _s_ = /*<>*/ caml_check_bound(k, i)[1 + i]; - /*<>*/ if(! caml_call2(H[1], _s_, ki)) + a = /*<>*/ caml_check_bound(k, i)[1 + i]; + /*<>*/ if(! caml_call2(H[1], a, ki)) /*<>*/ return 1; var i$0 = /*<>*/ i - 1 | 0; i = i$0; @@ -34770,15 +34594,15 @@ /*<>*/ } function set_key_data(c, k, d){ /*<>*/ caml_call1(Stdlib_Obj[23][12], c); - var _q_ = /*<>*/ k.length - 2 | 0, _p_ = 0; - if(_q_ >= 0){ - var i = _p_; + var a = /*<>*/ k.length - 2 | 0, b = 0; + if(a >= 0){ + var i = b; for(;;){ /*<>*/ /*<>*/ set_key$0 (c, i, /*<>*/ caml_check_bound(k, i)[1 + i]); - var _r_ = /*<>*/ i + 1 | 0; - if(_q_ === i) break; - i = _r_; + var e = /*<>*/ i + 1 | 0; + if(a === i) break; + i = e; } } /*<>*/ return set_data$1(c, d) /*<>*/ ; @@ -34788,20 +34612,20 @@ i$1 = /*<>*/ length$1(c) - 1 | 0, i = /*<>*/ i$1; for(;;){ - var _n_ = /*<>*/ i < 0 ? 1 : 0; - if(_n_) - var _o_ = _n_; + var b = /*<>*/ i < 0 ? 1 : 0; + if(b) + var d = b; else{ var - _m_ = /*<>*/ caml_call2(Stdlib_Obj[23][7], c, i); - /*<>*/ if(_m_){ + a = /*<>*/ caml_call2(Stdlib_Obj[23][7], c, i); + /*<>*/ if(a){ var i$0 = i - 1 | 0; i = i$0; continue; } - var _o_ = _m_; + var d = a; } - /*<>*/ return _o_; + /*<>*/ return d; } /*<>*/ } /*<>*/ return MakeSeeded @@ -34820,7 +34644,7 @@ } var include = /*<>*/ MakeSeeded$2([0, equal, seeded_hash]), - _l_ = include[1], + a = include[1], clear = include[2], reset = include[3], copy = include[4], @@ -34838,10 +34662,10 @@ clean = include[17], stats_alive = include[18]; function create(sz){ - /*<>*/ return caml_call2(_l_, _c_, sz) /*<>*/ ; + /*<>*/ return caml_call2(a, c, sz) /*<>*/ ; } function of_seq(i){ - var tbl = /*<>*/ caml_call2(_l_, _c_, 16); + var tbl = /*<>*/ caml_call2(a, c, 16); /*<>*/ caml_call2(replace_seq, tbl, i); /*<>*/ return tbl; /*<>*/ } @@ -34869,8 +34693,8 @@ /*<>*/ return [0, 0]; /*<>*/ } function add$1(b, k, d){ - var _k_ = /*<>*/ b[1]; - b[1] = [0, make$3(k, d), _k_]; + var a = /*<>*/ b[1]; + b[1] = [0, make$3(k, d), a]; /*<>*/ return 0; /*<>*/ } function test_keys$0(k, e){ @@ -34878,17 +34702,17 @@ /*<>*/ if(length$1(e) !== k.length - 1) /*<>*/ throw caml_maybe_attach_backtrace (Stdlib[3], 1); - var _g_ = /*<>*/ k.length - 2 | 0, _f_ = 0; - if(_g_ >= 0){ - var i = _f_; + var b = /*<>*/ k.length - 2 | 0, c = 0; + if(b >= 0){ + var i = c; for(;;){ var match = /*<>*/ get_key$0(e, i); /*<>*/ if(match){ var x = match[1]; /*<>*/ if(x === caml_check_bound(k, i)[1 + i]){ - var _i_ = /*<>*/ i + 1 | 0; - if(_g_ === i) break; - i = _i_; + var f = /*<>*/ i + 1 | 0; + if(b === i) break; + i = f; continue; } } @@ -34896,13 +34720,13 @@ (Stdlib[3], 1); } } - var _h_ = /*<>*/ 1; - return _h_; + var d = /*<>*/ 1; + return d; } - catch(_j_){ - var _e_ = /*<>*/ caml_wrap_exception(_j_); - if(_e_ === Stdlib[3]) /*<>*/ return 0; - /*<>*/ throw caml_maybe_attach_backtrace(_e_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a === Stdlib[3]) /*<>*/ return 0; + /*<>*/ throw caml_maybe_attach_backtrace(a, 0); } /*<>*/ } function remove$1(b, k){ @@ -34927,9 +34751,7 @@ match = /*<>*/ caml_call2 (Stdlib_List[40], - function(_d_){ - /*<>*/ return test_keys$0(k, _d_); - }, + function(a){ /*<>*/ return test_keys$0(k, a);}, b[1]); /*<>*/ if(! match) /*<>*/ return 0; @@ -35038,17 +34860,17 @@ cst$0 = cst$22, cst$2 = cst$19, cst$1 = cst$23, - null$0 = cst_dev_null, + null$ = cst_dev_null, current_dir_name = cst$24, parent_dir_name = cst$25, dir_sep = cst$26, quotequote = "'\\''", - null$1 = "NUL", + null$0 = "NUL", current_dir_name$0 = cst$24, parent_dir_name$0 = cst$25, dir_sep$0 = "\\", cst$5 = cst$24, - null$2 = cst_dev_null, + null$1 = cst_dev_null, current_dir_name$1 = cst$24, parent_dir_name$1 = cst$25, dir_sep$1 = cst$26, @@ -35125,40 +34947,39 @@ /*<>*/ } function is_relative(n){ var - _aH_ = /*<>*/ caml_ml_string_length(n) < 1 ? 1 : 0, - _aI_ = - _aH_ - || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - /*<>*/ return _aI_; + a = /*<>*/ caml_ml_string_length(n) < 1 ? 1 : 0, + b = + a || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + /*<>*/ return b; /*<>*/ } function is_implicit(n){ - var _aC_ = /*<>*/ is_relative(n); - /*<>*/ if(_aC_){ + var b = /*<>*/ is_relative(n); + /*<>*/ if(b){ var - _aD_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aE_ = - _aD_ + d = caml_ml_string_length(n) < 2 ? 1 : 0, + c = + d || ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2) !== cst$27 ? 1 : 0); - /*<>*/ if(_aE_) + /*<>*/ if(c) var - _aF_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aG_ = - _aF_ + e = caml_ml_string_length(n) < 3 ? 1 : 0, + a = + e || ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 3) !== cst$28 ? 1 : 0); else - var _aG_ = /*<>*/ _aE_; + var a = /*<>*/ c; } else - var _aG_ = _aC_; - return _aG_; + var a = b; + return a; /*<>*/ } function check_suffix(name, suff){ /*<>*/ return caml_call2 @@ -35182,27 +35003,27 @@ } var dummy = /*<>*/ 0, - _h_ = [0, 7, 0], - _g_ = [0, 1, [0, 3, [0, 5, 0]]], - _f_ = [0, [2, 0, [4, 6, [0, 2, 6], 0, [2, 0, 0]]], "%s%06x%s"], + h = [0, 7, 0], + g = [0, 1, [0, 3, [0, 5, 0]]], + f = [0, [2, 0, [4, 6, [0, 2, 6], 0, [2, 0, 0]]], "%s%06x%s"], cst_Filename_chop_extension = "Filename.chop_extension", cst_Filename_chop_suffix = "Filename.chop_suffix", - _d_ = [0, cst$20, 0], + e = [0, cst$20, 0], cst_2_1$0 = cst_2_1$1, cst_2$0 = cst_2$1, cst_Filename_quote_command_bad = "Filename.quote_command: bad file name ", - _c_ = [0, cst$20, 0], + d = [0, cst$20, 0], cst_2_1 = cst_2_1$1, cst_2 = cst_2$1, cst_tmp = "/tmp"; try{ var - _j_ = /*<>*/ caml_sys_getenv("TMPDIR"), - temp_dir_name = _j_; + j = /*<>*/ caml_sys_getenv("TMPDIR"), + temp_dir_name = j; } - catch(_aB_){ - var _a_ = /*<>*/ caml_wrap_exception(_aB_); - if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); + catch(b){ + var a = /*<>*/ caml_wrap_exception(b); + if(a !== Stdlib[8]) throw caml_maybe_attach_backtrace(a, 0); var temp_dir_name = /*<>*/ cst_tmp; } function quote(s){ @@ -35210,19 +35031,19 @@ l = /*<>*/ caml_ml_string_length(s), b = /*<>*/ caml_call1(Stdlib_Buffer[1], l + 20 | 0); /*<>*/ caml_call2(Stdlib_Buffer[12], b, 39); - var _ay_ = /*<>*/ l - 1 | 0, _ax_ = 0; - if(_ay_ >= 0){ - var i = _ax_; + var a = /*<>*/ l - 1 | 0, c = 0; + if(a >= 0){ + var i = c; for(;;){ /*<>*/ if(39 === caml_string_get(s, i)) /*<>*/ caml_call2(Stdlib_Buffer[16], b, quotequote); else{ - var _aA_ = /*<>*/ caml_string_get(s, i); - /*<>*/ caml_call2(Stdlib_Buffer[12], b, _aA_); + var e = /*<>*/ caml_string_get(s, i); + /*<>*/ caml_call2(Stdlib_Buffer[12], b, e); } - var _az_ = /*<>*/ i + 1 | 0; - if(_ay_ === i) break; - i = _az_; + var d = /*<>*/ i + 1 | 0; + if(a === i) break; + i = d; } } /*<>*/ caml_call2(Stdlib_Buffer[12], b, 39); @@ -35232,57 +35053,56 @@ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if(caml_equal(stderr, stdout)) - var _am_ = /*<>*/ cst_2_1; + var a = /*<>*/ cst_2_1; else var - _aw_ = /*<>*/ quote(f), - _am_ = + l = /*<>*/ quote(f), + a = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_2, _aw_); - var _an_ = /*<>*/ _am_; + (Stdlib[28], cst_2, l); + var b = /*<>*/ a; } else - var _an_ = /*<>*/ cst$4; + var b = /*<>*/ cst$4; /*<>*/ if(stdout) var f$0 = stdout[1], - _ao_ = /*<>*/ quote(f$0), - _ap_ = + e = /*<>*/ quote(f$0), + c = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst, _ao_); + (Stdlib[28], cst, e); else - var _ap_ = /*<>*/ cst$3; - var _aq_ = /*<>*/ caml_call2(Stdlib[28], _ap_, _an_); + var c = /*<>*/ cst$3; + var g = /*<>*/ caml_call2(Stdlib[28], c, b); /*<>*/ if(stdin) var f$1 = stdin[1], - _ar_ = /*<>*/ quote(f$1), - _as_ = + h = /*<>*/ quote(f$1), + d = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst$0, _ar_); + (Stdlib[28], cst$0, h); else - var _as_ = /*<>*/ cst$2; + var d = /*<>*/ cst$2; var - _at_ = /*<>*/ caml_call2(Stdlib[28], _as_, _aq_), - _au_ = + i = /*<>*/ caml_call2(Stdlib[28], d, g), + j = /*<>*/ caml_call2 (Stdlib_List[20], quote, [0, cmd, args]), - _av_ = - /*<>*/ caml_call2(Stdlib_String[7], cst$1, _au_); - /*<>*/ return caml_call2(Stdlib[28], _av_, _at_) /*<>*/ ; + k = /*<>*/ caml_call2(Stdlib_String[7], cst$1, j); + /*<>*/ return caml_call2(Stdlib[28], k, i) /*<>*/ ; } - function basename(_al_){ + function basename(a){ /*<>*/ return generic_basename - (is_dir_sep, current_dir_name, _al_); + (is_dir_sep, current_dir_name, a); } - function dirname(_ak_){ + function dirname(a){ /*<>*/ return generic_dirname - (is_dir_sep, current_dir_name, _ak_); + (is_dir_sep, current_dir_name, a); } var Unix = /*<>*/ [0, - null$0, + null$, current_dir_name, parent_dir_name, dir_sep, @@ -35299,75 +35119,74 @@ function is_dir_sep$0(s, i){ var c = /*<>*/ caml_string_get(s, i), - _ah_ = /*<>*/ 47 === c ? 1 : 0; - if(_ah_) - var _ai_ = _ah_; + a = /*<>*/ 47 === c ? 1 : 0; + if(a) + var b = a; else - var _aj_ = 92 === c ? 1 : 0, _ai_ = _aj_ || (58 === c ? 1 : 0); - return _ai_; + var d = 92 === c ? 1 : 0, b = d || (58 === c ? 1 : 0); + return b; /*<>*/ } function is_relative$0(n){ var - _ab_ = /*<>*/ caml_ml_string_length(n) < 1 ? 1 : 0, - _ac_ = - _ab_ - || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - /*<>*/ if(_ac_){ + d = /*<>*/ caml_ml_string_length(n) < 1 ? 1 : 0, + b = + d || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + /*<>*/ if(b){ var - _ad_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ae_ = - _ad_ + e = caml_ml_string_length(n) < 1 ? 1 : 0, + c = + e || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - /*<>*/ if(_ae_) + /*<>*/ if(c) var - _af_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _ag_ = - _af_ + f = caml_ml_string_length(n) < 2 ? 1 : 0, + a = + f || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else - var _ag_ = /*<>*/ _ae_; + var a = /*<>*/ c; } else - var _ag_ = _ac_; - return _ag_; + var a = b; + return a; /*<>*/ } function is_implicit$0(n){ - var _U_ = /*<>*/ is_relative$0(n); - /*<>*/ if(_U_){ + var b = /*<>*/ is_relative$0(n); + /*<>*/ if(b){ var - _V_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _W_ = - _V_ + f = caml_ml_string_length(n) < 2 ? 1 : 0, + c = + f || ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2) !== cst$27 ? 1 : 0); - /*<>*/ if(_W_){ + /*<>*/ if(c){ var - _X_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _Y_ = - _X_ + g = caml_ml_string_length(n) < 2 ? 1 : 0, + d = + g || ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2) !== ".\\" ? 1 : 0); - /*<>*/ if(_Y_){ + /*<>*/ if(d){ var - _Z_ = caml_ml_string_length(n) < 3 ? 1 : 0, - ___ = - _Z_ + h = caml_ml_string_length(n) < 3 ? 1 : 0, + e = + h || ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 3) !== cst$28 ? 1 : 0); - /*<>*/ if(___) + /*<>*/ if(e) var - _$_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aa_ = - _$_ + i = caml_ml_string_length(n) < 3 ? 1 : 0, + a = + i || ( /*<>*/ caml_call3 (Stdlib_String[16], n, 0, 3) @@ -35375,26 +35194,26 @@ ? 1 : 0); else - var _aa_ = /*<>*/ ___; + var a = /*<>*/ e; } else - var _aa_ = _Y_; + var a = d; } else - var _aa_ = _W_; + var a = c; } else - var _aa_ = _U_; - return _aa_; + var a = b; + return a; /*<>*/ } function check_suffix$0(name, suff){ var - _R_ = + a = /*<>*/ caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_R_) + if(a) var s = /*<>*/ caml_call3 @@ -35404,16 +35223,16 @@ - caml_ml_string_length(suff) | 0, caml_ml_string_length(suff)), - _S_ = /*<>*/ caml_call1(Stdlib_String[27], suff), - _T_ = + c = /*<>*/ caml_call1(Stdlib_String[27], suff), + b = /*<>*/ /*<>*/ caml_call1 (Stdlib_String[27], s) - === _S_ + === c ? 1 : 0; else - var _T_ = /*<>*/ _R_; - return _T_; + var b = /*<>*/ a; + return b; /*<>*/ } function chop_suffix_opt$0(suffix, filename){ var @@ -35425,8 +35244,8 @@ r = /*<>*/ caml_call3 (Stdlib_String[16], filename, len_f - len_s | 0, len_s), - _Q_ = /*<>*/ caml_call1(Stdlib_String[27], suffix); - /*<>*/ return caml_call1(Stdlib_String[27], r) === _Q_ + a = /*<>*/ caml_call1(Stdlib_String[27], suffix); + /*<>*/ return caml_call1(Stdlib_String[27], r) === a ? [0, /*<>*/ caml_call3 (Stdlib_String[16], filename, 0, len_f - len_s | 0)] @@ -35434,12 +35253,12 @@ } /*<>*/ try{ var - _i_ = /*<>*/ caml_sys_getenv("TEMP"), - temp_dir_name$0 = _i_; + i = /*<>*/ caml_sys_getenv("TEMP"), + temp_dir_name$0 = i; } - catch(_P_){ - var _b_ = /*<>*/ caml_wrap_exception(_P_); - if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); + catch(a){ + var b = /*<>*/ caml_wrap_exception(a); + if(b !== Stdlib[8]) throw caml_maybe_attach_backtrace(b, 0); var temp_dir_name$0 = /*<>*/ cst$5; } function quote$0(s){ @@ -35454,18 +35273,18 @@ /*<>*/ return caml_call2(Stdlib_Buffer[12], b, 34) /*<>*/ ; var c = /*<>*/ caml_string_get(s, i$0); /*<>*/ if(34 === c){ - var _N_ = /*<>*/ 0; + var a = /*<>*/ 0; if(counter >= 50) - return caml_trampoline_return(loop_bs, [0, _N_, i$0]) /*<>*/ ; + return caml_trampoline_return(loop_bs, [0, a, i$0]) /*<>*/ ; var counter$1 = /*<>*/ counter + 1 | 0; - return loop_bs(counter$1, _N_, i$0) /*<>*/ ; + return loop_bs(counter$1, a, i$0) /*<>*/ ; } /*<>*/ if(92 === c){ - var _O_ = /*<>*/ 0; + var d = /*<>*/ 0; if(counter >= 50) - return caml_trampoline_return(loop_bs, [0, _O_, i$0]) /*<>*/ ; + return caml_trampoline_return(loop_bs, [0, d, i$0]) /*<>*/ ; var counter$0 = /*<>*/ counter + 1 | 0; - return loop_bs(counter$0, _O_, i$0) /*<>*/ ; + return loop_bs(counter$0, d, i$0) /*<>*/ ; } /*<>*/ caml_call2(Stdlib_Buffer[12], b, c); var i$1 = /*<>*/ i$0 + 1 | 0; @@ -35487,11 +35306,11 @@ /*<>*/ if(34 === match){ /*<>*/ add_bs((2 * n$0 | 0) + 1 | 0); /*<>*/ caml_call2(Stdlib_Buffer[12], b, 34); - var _M_ = /*<>*/ i$0 + 1 | 0; + var a = /*<>*/ i$0 + 1 | 0; if(counter >= 50) - return caml_trampoline_return(loop$0, [0, _M_]) /*<>*/ ; + return caml_trampoline_return(loop$0, [0, a]) /*<>*/ ; var counter$1 = /*<>*/ counter + 1 | 0; - return loop$0(counter$1, _M_) /*<>*/ ; + return loop$0(counter$1, a) /*<>*/ ; } /*<>*/ if(92 !== match){ /*<>*/ add_bs(n$0); @@ -35506,14 +35325,14 @@ } /*<>*/ } function add_bs(n){ - var _K_ = /*<>*/ 1; + var a = /*<>*/ 1; if(n >= 1){ - var j = _K_; + var j = a; for(;;){ /*<>*/ caml_call2(Stdlib_Buffer[12], b, 92); - var _L_ = /*<>*/ j + 1 | 0; + var c = /*<>*/ j + 1 | 0; if(n === j) break; - j = _L_; + j = c; } } /*<>*/ } @@ -35543,53 +35362,53 @@ f$0)) /*<>*/ return caml_call2(Stdlib_String[15], f$0, 32) ? /*<>*/ caml_call2 - (Stdlib_String[7], cst$7, [0, cst$6, [0, f$0, _c_]]) + (Stdlib_String[7], cst$7, [0, cst$6, [0, f$0, d]]) : f$0 /*<>*/ ; var - _J_ = + a = /*<>*/ caml_call2 (Stdlib[28], cst_Filename_quote_command_bad, f$0); - /*<>*/ return caml_call1(Stdlib[2], _J_) /*<>*/ ; + /*<>*/ return caml_call1(Stdlib[2], a) /*<>*/ ; } function quote_command$0(cmd, stdin, stdout, stderr, args){ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if(caml_equal(stderr, stdout)) - var _w_ = /*<>*/ cst_2_1$0; + var a = /*<>*/ cst_2_1$0; else var - _H_ = /*<>*/ quote_cmd_filename(f), - _w_ = + o = /*<>*/ quote_cmd_filename(f), + a = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst_2$0, _H_); - var _x_ = /*<>*/ _w_; + (Stdlib[28], cst_2$0, o); + var c = /*<>*/ a; } else - var _x_ = /*<>*/ cst$16; - var _y_ = /*<>*/ [0, _x_, _d_]; + var c = /*<>*/ cst$16; + var h = /*<>*/ [0, c, e]; if(stdout) var f$0 = stdout[1], - _z_ = /*<>*/ quote_cmd_filename(f$0), - _A_ = + i = /*<>*/ quote_cmd_filename(f$0), + d = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst$8, _z_); + (Stdlib[28], cst$8, i); else - var _A_ = /*<>*/ cst$15; - var _B_ = /*<>*/ [0, _A_, _y_]; + var d = /*<>*/ cst$15; + var j = /*<>*/ [0, d, h]; if(stdin) var f$1 = stdin[1], - _C_ = /*<>*/ quote_cmd_filename(f$1), - _D_ = + k = /*<>*/ quote_cmd_filename(f$1), + g = /*<>*/ /*<>*/ caml_call2 - (Stdlib[28], cst$9, _C_); + (Stdlib[28], cst$9, k); else - var _D_ = /*<>*/ cst$14; + var g = /*<>*/ cst$14; var - _E_ = + l = /*<>*/ caml_call2(Stdlib_List[20], quote$0, args), - s = /*<>*/ caml_call2(Stdlib_String[7], cst$10, _E_), + s = /*<>*/ caml_call2(Stdlib_String[7], cst$10, l), b = /*<>*/ /*<>*/ caml_call1 (Stdlib_Buffer[1], @@ -35600,11 +35419,8 @@ a: { /*<>*/ if(62 <= c){ - var _I_ = c - 63 | 0; - if(60 < _I_ >>> 0){ - if(62 <= _I_) break a; - } - else if(31 !== _I_) break a; + var a = c - 63 | 0; + if(60 < a >>> 0){if(62 <= a) break a;} else if(31 !== a) break a; } else if(42 <= c){ @@ -35622,21 +35438,17 @@ }, s); var - _F_ = + m = /*<>*/ [0, cst$11, - [0, caml_call1(Stdlib_Buffer[2], b), [0, _D_, _B_]]], - _G_ = - /*<>*/ [0, - cst$12, - [0, quote_cmd_filename(cmd), _F_]]; - /*<>*/ return caml_call2 - (Stdlib_String[7], cst$13, _G_) /*<>*/ ; + [0, caml_call1(Stdlib_Buffer[2], b), [0, g, j]]], + n = + /*<>*/ [0, cst$12, [0, quote_cmd_filename(cmd), m]]; + /*<>*/ return caml_call2(Stdlib_String[7], cst$13, n) /*<>*/ ; } function drive_and_path(s){ - var - _s_ = /*<>*/ 2 <= caml_ml_string_length(s) ? 1 : 0; - if(_s_){ + var b = /*<>*/ 2 <= caml_ml_string_length(s) ? 1 : 0; + if(b){ var param = /*<>*/ caml_string_get(s, 0); a: { @@ -35646,23 +35458,23 @@ if(25 < param - 97 >>> 0) break b; } else if(65 > param) break b; - var _t_ = /*<>*/ 1; + var a = /*<>*/ 1; break a; } - var _t_ = /*<>*/ 0; + var a = /*<>*/ 0; } var - _u_ = - /*<>*/ _t_ + c = + /*<>*/ a ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 - : _t_; + : a; } else - var _u_ = /*<>*/ _s_; - /*<>*/ if(! _u_) + var c = /*<>*/ b; + /*<>*/ if(! c) /*<>*/ return [0, cst$17, s]; var - _v_ = + d = /*<>*/ /*<>*/ caml_call3 (Stdlib_String[16], s, @@ -35670,7 +35482,7 @@ /*<>*/ caml_ml_string_length(s) - 2 | 0); /*<>*/ return [0, caml_call3(Stdlib_String[16], s, 0, 2), - _v_] /*<>*/ ; + d] /*<>*/ ; /*<>*/ } function dirname$0(s){ var @@ -35690,7 +35502,7 @@ var Win32 = /*<>*/ [0, - null$1, + null$0, current_dir_name$0, parent_dir_name$0, dir_sep$0, @@ -35704,18 +35516,18 @@ quote_command$0, basename$0, dirname$0]; - function basename$1(_r_){ + function basename$1(a){ /*<>*/ return generic_basename - (is_dir_sep$0, current_dir_name$1, _r_); + (is_dir_sep$0, current_dir_name$1, a); } - function dirname$1(_q_){ + function dirname$1(a){ /*<>*/ return generic_dirname - (is_dir_sep$0, current_dir_name$1, _q_); + (is_dir_sep$0, current_dir_name$1, a); } var Cygwin = /*<>*/ [0, - null$2, + null$1, current_dir_name$1, parent_dir_name$1, dir_sep$1, @@ -35729,9 +35541,9 @@ quote_command, basename$1, dirname$1], - _e_ = Stdlib_Sys[4], - Sysdeps = _e_ !== "Cygwin" ? _e_ !== "Win32" ? Unix : Win32 : Cygwin, - null$3 = Sysdeps[1], + c = Stdlib_Sys[4], + Sysdeps = c !== "Cygwin" ? c !== "Win32" ? Unix : Win32 : Cygwin, + null$2 = Sysdeps[1], current_dir_name$2 = Sysdeps[2], parent_dir_name$2 = Sysdeps[3], dir_sep$2 = Sysdeps[4], @@ -35751,10 +35563,10 @@ (0 !== l && ! /*<>*/ is_dir_sep$1(dirname, l - 1 | 0)){ var - _p_ = + a = /*<>*/ caml_call2 (Stdlib[28], dir_sep$2, filename); - /*<>*/ return caml_call2(Stdlib[28], dirname, _p_); + /*<>*/ return caml_call2(Stdlib[28], dirname, a); } /*<>*/ return caml_call2 (Stdlib[28], dirname, filename) /*<>*/ ; @@ -35842,13 +35654,13 @@ /*<>*/ return /*<>*/ concat (temp_dir, /*<>*/ caml_call4 - (Stdlib_Printf[4], _f_, prefix, rnd, suffix)) /*<>*/ ; + (Stdlib_Printf[4], f, prefix, rnd, suffix)) /*<>*/ ; } var current_temp_dir_name = /*<>*/ caml_call2 (Stdlib_Domain[11][1], - [0, function(_o_){ /*<>*/ return _o_;}], + [0, function(a){ /*<>*/ return a;}], function(param){ /*<>*/ return temp_dir_name$1; /*<>*/ }); @@ -35874,7 +35686,7 @@ /*<>*/ temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ /*<>*/ /*<>*/ runtime.caml_sys_close - ( /*<>*/ runtime.caml_sys_open(name, _g_, 384)); + ( /*<>*/ runtime.caml_sys_open(name, g, 384)); return name; } catch(e$0){ @@ -35887,10 +35699,10 @@ } } /*<>*/ } - function open_temp_file(_m_, _l_, opt, prefix, suffix){ + function open_temp_file(b, a, opt, prefix, suffix){ var - mode = /*<>*/ _m_ ? _m_[1] : _h_, - perms = _l_ ? _l_[1] : 384, + mode = /*<>*/ b ? b[1] : h, + perms = a ? a[1] : 384, temp_dir = opt ? opt[1] @@ -35903,11 +35715,11 @@ /*<>*/ temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ var - _n_ = + c = /*<>*/ [0, name, caml_call3(Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; - return _n_; + return c; } catch(e$0){ var e = /*<>*/ caml_wrap_exception(e$0); @@ -35919,11 +35731,11 @@ } } /*<>*/ } - function temp_dir(_k_, opt, prefix, suffix){ + function temp_dir(a, opt, prefix, suffix){ var temp_dir = - /*<>*/ _k_ - ? _k_[1] + /*<>*/ a + ? a[1] : /*<>*/ caml_call1 (Stdlib_Domain[11][2], current_temp_dir_name), perms = /*<>*/ opt ? opt[1] : 448, @@ -35963,7 +35775,7 @@ chop_extension, basename$2, dirname$2, - null$3, + null$2, temp_file, open_temp_file, temp_dir, @@ -35986,7 +35798,7 @@ zero = [254, 0., 0.], one = [254, 1., 0.], i = [254, 0., 1.], - _a_ = [254, 0., 0.]; + a = [254, 0., 0.]; function add(x, y){ /*<>*/ return [254, x[1] + y[1], x[2] + y[2]]; /*<>*/ } @@ -36042,7 +35854,7 @@ /*<>*/ } function sqrt(x){ /*<>*/ if(x[1] === 0. && x[2] === 0.) - /*<>*/ return _a_; + /*<>*/ return a; var r = /*<>*/ Math.abs(x[1]), i = /*<>*/ Math.abs(x[2]); @@ -36075,13 +35887,13 @@ /*<>*/ } function log(x){ var - _b_ = + a = /*<>*/ /*<>*/ Math.atan2 (x[2], x[1]); /*<>*/ return [254, /*<>*/ Math.log ( /*<>*/ norm(x)), - _b_] /*<>*/ ; + a] /*<>*/ ; /*<>*/ } function pow(x, y){ /*<>*/ return /*<>*/ exp @@ -36763,7 +36575,7 @@ Unhandled = [248, "Stdlib.Effect.Unhandled", caml_fresh_oo_id(0)], Continuation_already_resumed = [248, "Stdlib.Effect.Continuation_already_resumed", caml_fresh_oo_id(0)], - _a_ = + a = [0, [11, "Stdlib.Effect.Unhandled(", [2, 0, [12, 41, 0]]], "Stdlib.Effect.Unhandled(%s)"]; @@ -36772,8 +36584,8 @@ /*<>*/ return 0; var x = /*<>*/ param[2], - _o_ = /*<>*/ caml_call1(Stdlib_Printexc[26], x), - msg = /*<>*/ caml_call2(Stdlib_Printf[4], _a_, _o_); + b = /*<>*/ caml_call1(Stdlib_Printexc[26], x), + msg = /*<>*/ caml_call2(Stdlib_Printf[4], a, b); /*<>*/ return [0, msg]; /*<>*/ } /*<>*/ caml_call1(Stdlib_Printexc[9], printer); @@ -36790,29 +36602,21 @@ (Stdlib_Callback[2], "Effect.Continuation_already_resumed", Continuation_already_resumed); - function continue$0(k, v){ - var - _l_ = /*<>*/ k[2], - _n_ = caml_continuation_use_noexc(k); - function _m_(x){ - /*<>*/ return x; - /*<>*/ } + function continue$(k, v){ + var a = /*<>*/ k[2], c = caml_continuation_use_noexc(k); + function b(x){ /*<>*/ return x; /*<>*/ } /*<>*/ return jsoo_effect_not_supported() /*<>*/ ; } function discontinue(k, e){ - var - _i_ = /*<>*/ k[2], - _k_ = caml_continuation_use_noexc(k); - function _j_(e){ + var a = /*<>*/ k[2], c = caml_continuation_use_noexc(k); + function b(e){ /*<>*/ throw caml_maybe_attach_backtrace(e, 1); /*<>*/ } /*<>*/ return jsoo_effect_not_supported() /*<>*/ ; } function discontinue_with_backtrace(k, e, bt){ - var - _f_ = /*<>*/ k[2], - _h_ = caml_continuation_use_noexc(k); - function _g_(e){ + var a = /*<>*/ k[2], c = caml_continuation_use_noexc(k); + function b(e){ /*<>*/ caml_restore_raw_backtrace(e, bt); throw caml_maybe_attach_backtrace(e, 0); /*<>*/ } @@ -36829,7 +36633,7 @@ var s = /*<>*/ caml_alloc_stack(handler[1], handler[2], effc), - _e_ = /*<>*/ 0; + a = /*<>*/ 0; return jsoo_effect_not_supported() /*<>*/ ; } function try_with(comp, arg, handler){ @@ -36850,13 +36654,13 @@ /*<>*/ throw caml_maybe_attach_backtrace(e, 1); /*<>*/ }, effc), - _d_ = /*<>*/ 0; + a = /*<>*/ 0; return jsoo_effect_not_supported() /*<>*/ ; } var Deep = /*<>*/ [0, - continue$0, + continue$, discontinue, discontinue_with_backtrace, match_with, @@ -36884,7 +36688,7 @@ var s = /*<>*/ caml_alloc_stack(error, error, effc); /*<>*/ try{ /*<>*/ jsoo_effect_not_supported(); - var _b_ = /*<>*/ 0, _c_ = 0; + var a = /*<>*/ 0, b = 0; } catch(exn$0){ var exn = /*<>*/ caml_wrap_exception(exn$0); From e95f8c4ccb53e9b387a11f62a6856a8d732129f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Mon, 22 Sep 2025 17:33:50 +0200 Subject: [PATCH 13/13] Bigarray fix --- runtime/wasm/bigstring.wat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/wasm/bigstring.wat b/runtime/wasm/bigstring.wat index 120eabd52f..e5157917fd 100644 --- a/runtime/wasm/bigstring.wat +++ b/runtime/wasm/bigstring.wat @@ -243,8 +243,8 @@ (local $c1 i32) (local $c2 i32) - (local.set $v1 (call $caml_ba_get_view (local.get $vs1))) - (local.set $v2 (call $caml_ba_get_view (local.get $vs2))) + (local.set $v1 (call $caml_ba_get_data (local.get $vs1))) + (local.set $v2 (call $caml_ba_get_data (local.get $vs2))) (local.set $pos1 (i31.get_s (ref.cast (ref i31) (local.get $vpos1)))) (local.set $pos2 (i31.get_s (ref.cast (ref i31) (local.get $vpos2)))) (local.set $len (i31.get_s (ref.cast (ref i31) (local.get $vlen)))) @@ -252,10 +252,10 @@ (if (i32.lt_u (local.get $i) (local.get $len)) (then (local.set $c1 - (call $dv_get_ui8 (local.get $v1) + (call $ta_get_ui8 (local.get $v1) (i32.add (local.get $pos1) (local.get $i)))) (local.set $c2 - (call $dv_get_ui8 (local.get $v2) + (call $ta_get_ui8 (local.get $v2) (i32.add (local.get $pos2) (local.get $i)))) (local.set $i (i32.add (local.get $i) (i32.const 1))) (if (i32.lt_u (local.get $c1) (local.get $c2))