diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78b51f1326..20e31d31d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,10 +18,10 @@ jobs: fail-fast: false matrix: image: [ubuntu:24.04, debian:bookworm] - os: [ubuntu-latest, ubuntu-24.04-arm] + os: [ubuntu_x64_8_cores, ubuntu_arm64_8_core] include: - image: archlinux:latest - os: ubuntu-latest + os: ubuntu_x64_8_cores runs-on: ${{ matrix.os }} container: image: ${{ matrix.image }} diff --git a/packages/abstract_algebra/abstract_algebra.v0.18~preview.130.36+326/opam b/packages/abstract_algebra/abstract_algebra.v0.18~preview.130.55+197/opam similarity index 91% rename from packages/abstract_algebra/abstract_algebra.v0.18~preview.130.36+326/opam rename to packages/abstract_algebra/abstract_algebra.v0.18~preview.130.55+197/opam index 455b8a336c..948a5e7c0c 100644 --- a/packages/abstract_algebra/abstract_algebra.v0.18~preview.130.36+326/opam +++ b/packages/abstract_algebra/abstract_algebra.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" diff --git a/packages/accessor/accessor.v0.18~preview.130.36+326/opam b/packages/accessor/accessor.v0.18~preview.130.55+197/opam similarity index 76% rename from packages/accessor/accessor.v0.18~preview.130.36+326/opam rename to packages/accessor/accessor.v0.18~preview.130.55+197/opam index 36530627b0..80105e74d7 100644 --- a/packages/accessor/accessor.v0.18~preview.130.36+326/opam +++ b/packages/accessor/accessor.v0.18~preview.130.55+197/opam @@ -11,9 +11,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "higher_kinded" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "higher_kinded" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -29,7 +29,7 @@ In case you have ever heard of "lenses", this is an OCaml implementation of that """ url { src: - "https://github.com/janestreet/accessor/archive/f06456353a2d45d97ffbad1cb8fcff71da5d6190.tar.gz" + "https://github.com/janestreet/accessor/archive/19dbd873b28eea69c4644b8e4ab65f837d2ff18a.tar.gz" checksum: - "sha256=1c98e8cfe6d2245e14b087ca39f8d03218d1b7bcbc1b46ef0724bada1655b8d9" + "sha256=2fe9eefbcec6225f38ce3d242c994d0e7288700ff49c2228ba7d3856b1a9c9fb" } diff --git a/packages/accessor_async/accessor_async.v0.18~preview.130.36+326/opam b/packages/accessor_async/accessor_async.v0.18~preview.130.55+197/opam similarity index 79% rename from packages/accessor_async/accessor_async.v0.18~preview.130.36+326/opam rename to packages/accessor_async/accessor_async.v0.18~preview.130.55+197/opam index 99e119f09e..7f07ea3d17 100644 --- a/packages/accessor_async/accessor_async.v0.18~preview.130.36+326/opam +++ b/packages/accessor_async/accessor_async.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "accessor_core" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_accessor" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "accessor_core" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_accessor" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" diff --git a/packages/accessor_base/accessor_base.v0.18~preview.130.36+326/opam b/packages/accessor_base/accessor_base.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/accessor_base/accessor_base.v0.18~preview.130.36+326/opam rename to packages/accessor_base/accessor_base.v0.18~preview.130.55+197/opam index a5e562335a..75f18df451 100644 --- a/packages/accessor_base/accessor_base.v0.18~preview.130.36+326/opam +++ b/packages/accessor_base/accessor_base.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "accessor" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "higher_kinded" {= "v0.18~preview.130.36+326"} - "ppx_accessor" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "accessor" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "higher_kinded" {= "v0.18~preview.130.55+197"} + "ppx_accessor" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ This library provides accessors for numerous types in Base. """ url { src: - "https://github.com/janestreet/accessor_base/archive/89456a608d2716ca797d1327db45762edf1cfae3.tar.gz" + "https://github.com/janestreet/accessor_base/archive/a757ed344a4b053ee1fd813b88ced7df1eb6dd82.tar.gz" checksum: - "sha256=45466f72916826e03e83d5a149bba8433fe3a9bd1308f8d22b864def0c98e449" + "sha256=a8d31c918854a47681698da06e8902100872b1125f4d8063cf43f96742c264b2" } diff --git a/packages/accessor_core/accessor_core.v0.18~preview.130.36+326/opam b/packages/accessor_core/accessor_core.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/accessor_core/accessor_core.v0.18~preview.130.36+326/opam rename to packages/accessor_core/accessor_core.v0.18~preview.130.55+197/opam index 6ec45259a2..8e642fb773 100644 --- a/packages/accessor_core/accessor_core.v0.18~preview.130.36+326/opam +++ b/packages/accessor_core/accessor_core.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "accessor_base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_accessor" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} + "accessor_base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_accessor" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ This library provides accessors for numerous types in Core. """ url { src: - "https://github.com/janestreet/accessor_core/archive/0edcd77975dd7b0db7f424cded8d7ccfb00e4e06.tar.gz" + "https://github.com/janestreet/accessor_core/archive/c58d0db666d0bc470f9ccc9c7c3e8c770c07a134.tar.gz" checksum: - "sha256=ad8234023e626a697aefdb68959787805820d0fe3ea463b5deb1773b0df3245d" + "sha256=b4b3d30aee44da8dddd4647d2b84d4fd80b645cc3cf3170e2ec08ee2962d1d20" } diff --git a/packages/alcotest/alcotest.1.9.0+ox/opam b/packages/alcotest/alcotest.1.9.0+ox/opam index 8f21395dad..92d8149e8f 100644 --- a/packages/alcotest/alcotest.1.9.0+ox/opam +++ b/packages/alcotest/alcotest.1.9.0+ox/opam @@ -24,7 +24,8 @@ depends: [ "fmt" {>= "0.8.7"} "astring" "cmdliner" {>= "1.2.0"} - "re" {>= "1.7.2"} + "cmdliner" {with-test & < "2.0.0"} + "re" {= "1.14.0+ox"} "stdlib-shims" "uutf" {= "1.0.3+ox"} "ocaml-syntax-shims" diff --git a/packages/am_running_how_js/am_running_how_js.v0.18~preview.130.36+326/opam b/packages/am_running_how_js/am_running_how_js.v0.18~preview.130.55+197/opam similarity index 91% rename from packages/am_running_how_js/am_running_how_js.v0.18~preview.130.36+326/opam rename to packages/am_running_how_js/am_running_how_js.v0.18~preview.130.55+197/opam index 205e8dfc66..1418987809 100644 --- a/packages/am_running_how_js/am_running_how_js.v0.18~preview.130.36+326/opam +++ b/packages/am_running_how_js/am_running_how_js.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml" {= "6.0.1+ox"} "js_of_ocaml-ppx" {= "6.0.1+ox"} diff --git a/packages/async/async.v0.18~preview.130.36+326/opam b/packages/async/async.v0.18~preview.130.55+197/opam similarity index 53% rename from packages/async/async.v0.18~preview.130.36+326/opam rename to packages/async/async.v0.18~preview.130.55+197/opam index 3a0138daec..1261076075 100644 --- a/packages/async/async.v0.18~preview.130.36+326/opam +++ b/packages/async/async.v0.18~preview.130.55+197/opam @@ -11,16 +11,16 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_log" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_log" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -33,7 +33,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/async/archive/e270b48c4be4f1598583df0aec23bd8f5a6dc301.tar.gz" + "https://github.com/janestreet/async/archive/ce409f0f6f7011b64e672c8b6f9bb8b9b7397667.tar.gz" checksum: - "sha256=58caf9b7824bff5892e79ecb93bd4f7e392303452a0f895e76b383dae2d8cd3e" + "sha256=0e7d59c4cc034bd15df788af8fb7723149e589dda911d15bf4ac2cc76f22eef6" } diff --git a/packages/async_durable/async_durable.v0.18~preview.130.36+326/opam b/packages/async_durable/async_durable.v0.18~preview.130.55+197/opam similarity index 78% rename from packages/async_durable/async_durable.v0.18~preview.130.36+326/opam rename to packages/async_durable/async_durable.v0.18~preview.130.55+197/opam index 5e07429fe1..ec387ba36e 100644 --- a/packages/async_durable/async_durable.v0.18~preview.130.36+326/opam +++ b/packages/async_durable/async_durable.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" diff --git a/packages/async_extra/async_extra.v0.18~preview.130.36+326/opam b/packages/async_extra/async_extra.v0.18~preview.130.55+197/opam similarity index 84% rename from packages/async_extra/async_extra.v0.18~preview.130.36+326/opam rename to packages/async_extra/async_extra.v0.18~preview.130.55+197/opam index a54a5a50ed..982c819a3b 100644 --- a/packages/async_extra/async_extra.v0.18~preview.130.36+326/opam +++ b/packages/async_extra/async_extra.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" diff --git a/packages/async_find/async_find.v0.18~preview.130.36+326/opam b/packages/async_find/async_find.v0.18~preview.130.55+197/opam similarity index 85% rename from packages/async_find/async_find.v0.18~preview.130.36+326/opam rename to packages/async_find/async_find.v0.18~preview.130.55+197/opam index f335974d66..9f53ca4813 100644 --- a/packages/async_find/async_find.v0.18~preview.130.36+326/opam +++ b/packages/async_find/async_find.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" diff --git a/packages/async_inotify/async_inotify.v0.18~preview.130.36+326/opam b/packages/async_inotify/async_inotify.v0.18~preview.130.55+197/opam similarity index 78% rename from packages/async_inotify/async_inotify.v0.18~preview.130.36+326/opam rename to packages/async_inotify/async_inotify.v0.18~preview.130.55+197/opam index 963caf4ecc..78aace28e6 100644 --- a/packages/async_inotify/async_inotify.v0.18~preview.130.36+326/opam +++ b/packages/async_inotify/async_inotify.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_find" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_find" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "inotify" {>= "2.4.0"} ] diff --git a/packages/async_interactive/async_interactive.v0.18~preview.130.36+326/opam b/packages/async_interactive/async_interactive.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/async_interactive/async_interactive.v0.18~preview.130.36+326/opam rename to packages/async_interactive/async_interactive.v0.18~preview.130.55+197/opam index 5b330ec466..37f4fefd25 100644 --- a/packages/async_interactive/async_interactive.v0.18~preview.130.36+326/opam +++ b/packages/async_interactive/async_interactive.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "spawn" {>= "v0.15"} + "spawn" {= "v0.15.1+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Utilities for building simple command-line based user interfaces" @@ -25,7 +25,7 @@ description: """ """ url { src: - "https://github.com/janestreet/async_interactive/archive/dacb7110aa20f189be949923ee884b9bc2cc46e5.tar.gz" + "https://github.com/janestreet/async_interactive/archive/1e8e1f7bbb834932d5ec428ff6e33b10fa31861c.tar.gz" checksum: - "sha256=6028ec9a387cedd4722f0471141c36ec6c4cb4e16d01ae06b98b6986d800f586" + "sha256=483dee8c8eec41ed7622a81d8f891c29fc893bf9e17fa1bbcaae8f9ac0979bcb" } diff --git a/packages/async_iterator/async_iterator.v0.18~preview.130.36+326/opam b/packages/async_iterator/async_iterator.v0.18~preview.130.55+197/opam similarity index 75% rename from packages/async_iterator/async_iterator.v0.18~preview.130.36+326/opam rename to packages/async_iterator/async_iterator.v0.18~preview.130.55+197/opam index a327bc7af9..c6a2846b7d 100644 --- a/packages/async_iterator/async_iterator.v0.18~preview.130.36+326/opam +++ b/packages/async_iterator/async_iterator.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "maybe_pushback" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "rpc_parallel" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "maybe_pushback" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "rpc_parallel" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" diff --git a/packages/async_js/async_js.v0.18~preview.130.36+326/opam b/packages/async_js/async_js.v0.18~preview.130.55+197/opam similarity index 64% rename from packages/async_js/async_js.v0.18~preview.130.36+326/opam rename to packages/async_js/async_js.v0.18~preview.130.55+197/opam index 936d198ebd..89af24b598 100644 --- a/packages/async_js/async_js.v0.18~preview.130.36+326/opam +++ b/packages/async_js/async_js.v0.18~preview.130.55+197/opam @@ -11,11 +11,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml" {= "6.0.1+ox"} "js_of_ocaml-ppx" {= "6.0.1+ox"} @@ -29,7 +29,7 @@ description: """ """ url { src: - "https://github.com/janestreet/async_js/archive/73992ce82d62b8f9bc23060df75807b883044e3f.tar.gz" + "https://github.com/janestreet/async_js/archive/bdf861b32fad41614cfe3ad8b70676ccbbffae39.tar.gz" checksum: - "sha256=cdd2a3cc247515ddcfb45478482d8ac3deabf6788947358b75ed0701fde3ed8e" + "sha256=54b2a8272f45f73c5e529bbeccb1a398d0910c5ff155e324cee81e1545b3602a" } diff --git a/packages/async_kernel/async_kernel.v0.18~preview.130.36+326/opam b/packages/async_kernel/async_kernel.v0.18~preview.130.55+197/opam similarity index 61% rename from packages/async_kernel/async_kernel.v0.18~preview.130.36+326/opam rename to packages/async_kernel/async_kernel.v0.18~preview.130.55+197/opam index 1d74b26e99..3754280a75 100644 --- a/packages/async_kernel/async_kernel.v0.18~preview.130.36+326/opam +++ b/packages/async_kernel/async_kernel.v0.18~preview.130.55+197/opam @@ -12,12 +12,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "parsexp" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "unique" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -30,7 +31,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/async_kernel/archive/d10cfcb2e81ad87286bdef11e3519bbc2f2361f6.tar.gz" + "https://github.com/janestreet/async_kernel/archive/377a8bb3da8c373e8634d59d53069f3f9d243ea3.tar.gz" checksum: - "sha256=4bca595cde9628c6b4a79377b266420a55aff1346f7dceff90ad0eb92fa32d65" + "sha256=7b0d7eed1229f470bd39070e8ca92ad2e04f464fbd2ebd3b51d11a125025a7e7" } diff --git a/packages/async_log/async_log.v0.18~preview.130.36+326/opam b/packages/async_log/async_log.v0.18~preview.130.55+197/opam similarity index 64% rename from packages/async_log/async_log.v0.18~preview.130.36+326/opam rename to packages/async_log/async_log.v0.18~preview.130.55+197/opam index 28e0cf513f..8c149e98e8 100644 --- a/packages/async_log/async_log.v0.18~preview.130.36+326/opam +++ b/packages/async_log/async_log.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -30,7 +30,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/async_log/archive/5b3f8eab92b1b4d8ffb0f94fef34efbed17f9cc1.tar.gz" + "https://github.com/janestreet/async_log/archive/aa73682cf438d2359513811f71057fc291a29a64.tar.gz" checksum: - "sha256=b433f2ae313912da7fe15c0e36bd47ddf7e9825becb02c05900cb1e114bf784f" + "sha256=4657160fbaa70ea4cd671c992c5c4dd5c77a509edf6f484031f0da2bb5b1f527" } diff --git a/packages/async_rpc_kernel/async_rpc_kernel.v0.18~preview.130.36+326/opam b/packages/async_rpc_kernel/async_rpc_kernel.v0.18~preview.130.55+197/opam similarity index 51% rename from packages/async_rpc_kernel/async_rpc_kernel.v0.18~preview.130.36+326/opam rename to packages/async_rpc_kernel/async_rpc_kernel.v0.18~preview.130.55+197/opam index 77038dd02b..b0e9b5c318 100644 --- a/packages/async_rpc_kernel/async_rpc_kernel.v0.18~preview.130.36+326/opam +++ b/packages/async_rpc_kernel/async_rpc_kernel.v0.18~preview.130.55+197/opam @@ -12,16 +12,17 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_extended" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "pipe_with_writer_error" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "protocol_version_header" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_extended" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "flexible_sexp" {= "v0.18~preview.130.55+197"} + "pipe_with_writer_error" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "protocol_version_header" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -34,7 +35,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/async_rpc_kernel/archive/960274483881145c6c945c123d530cc6b54767b3.tar.gz" + "https://github.com/janestreet/async_rpc_kernel/archive/1ddee9ecc8f0f11f2abfb65eb19fb3d4486579e2.tar.gz" checksum: - "sha256=35f9b157e7f721dd2eb02a3a3c845f43e0ae9729914391814c527204c9d02280" + "sha256=e1267e3788c18e634d802f2e0d691453d7db04bbd39cb3cd78f9922284631c16" } diff --git a/packages/async_rpc_websocket/async_rpc_websocket.v0.18~preview.130.36+326/opam b/packages/async_rpc_websocket/async_rpc_websocket.v0.18~preview.130.55+197/opam similarity index 74% rename from packages/async_rpc_websocket/async_rpc_websocket.v0.18~preview.130.36+326/opam rename to packages/async_rpc_websocket/async_rpc_websocket.v0.18~preview.130.55+197/opam index eac6391a73..7cc6fb4974 100644 --- a/packages/async_rpc_websocket/async_rpc_websocket.v0.18~preview.130.36+326/opam +++ b/packages/async_rpc_websocket/async_rpc_websocket.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "async_websocket" {= "v0.18~preview.130.36+326"} - "cohttp_async_websocket" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "async_websocket" {= "v0.18~preview.130.55+197"} + "cohttp_async_websocket" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "cohttp" {>= "2.5.6"} "cohttp-async" {>= "2.5.7" & < "3.0.0" | >= "5.1.1" & < "6.0.0"} "conduit-async" @@ -39,7 +39,7 @@ when non-websocket traffic occurs. """ url { src: - "https://github.com/janestreet/async_rpc_websocket/archive/281a2004bc680f55c3c9710f9329efc5ef28d44e.tar.gz" + "https://github.com/janestreet/async_rpc_websocket/archive/21dba9bd4f6dc3a91cfb7fd4fd390616ce112a9e.tar.gz" checksum: - "sha256=6eab97cf16166b63da4b16c719ed6dd709058559c54122d6a155489078572def" + "sha256=e48fb4a9fdf0b2c11cbe75ee315f5bcad5f3b28624da1895c6a7a4176790afd9" } diff --git a/packages/async_sendfile/async_sendfile.v0.18~preview.130.36+326/opam b/packages/async_sendfile/async_sendfile.v0.18~preview.130.55+197/opam similarity index 78% rename from packages/async_sendfile/async_sendfile.v0.18~preview.130.36+326/opam rename to packages/async_sendfile/async_sendfile.v0.18~preview.130.55+197/opam index 81d6bf864b..be608910fb 100644 --- a/packages/async_sendfile/async_sendfile.v0.18~preview.130.36+326/opam +++ b/packages/async_sendfile/async_sendfile.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" diff --git a/packages/async_shell/async_shell.v0.18~preview.130.36+326/opam b/packages/async_shell/async_shell.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/async_shell/async_shell.v0.18~preview.130.36+326/opam rename to packages/async_shell/async_shell.v0.18~preview.130.55+197/opam index 3ae62e71e2..7e44217d8b 100644 --- a/packages/async_shell/async_shell.v0.18~preview.130.36+326/opam +++ b/packages/async_shell/async_shell.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "shell" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "shell" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ description: """ """ url { src: - "https://github.com/janestreet/async_shell/archive/c00a8f6746a89f80b1e91c55f86cdf51ccbc9342.tar.gz" + "https://github.com/janestreet/async_shell/archive/eade5c7ae0ab6adf9e5e33b3102694d2c357942b.tar.gz" checksum: - "sha256=1c2630968f3ed1313574654f33d3bd9d5dd339cdf48a2d191f9acd731b7fb2dc" + "sha256=be219947e51c59308e5b33dd9621edc03db452b3c7f1990b8aa758e8662a38b3" } diff --git a/packages/async_smtp/async_smtp.v0.18~preview.130.36+326/opam b/packages/async_smtp/async_smtp.v0.18~preview.130.36+326/opam deleted file mode 100644 index 06bf904828..0000000000 --- a/packages/async_smtp/async_smtp.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,48 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/async_smtp" -bug-reports: "https://github.com/janestreet/async_smtp/issues" -dev-repo: "git+https://github.com/janestreet/async_smtp.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/async_smtp/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_extra" {= "v0.18~preview.130.36+326"} - "async_inotify" {= "v0.18~preview.130.36+326"} - "async_log" {= "v0.18~preview.130.36+326"} - "async_sendfile" {= "v0.18~preview.130.36+326"} - "async_shell" {= "v0.18~preview.130.36+326"} - "async_ssl" {= "v0.18~preview.130.36+326"} - "babel" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "email_message" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable" {= "v0.18~preview.130.36+326"} - "re2" {= "v0.18~preview.130.36+326"} - "resource_cache" {= "v0.18~preview.130.36+326"} - "sexp_macro" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} - "angstrom" {>= "0.15.0"} - "base64" {>= "3.4.0"} - "cryptokit" {>= "1.16" & < "1.17"} - "dune" {>= "3.17.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "SMTP client and server" -description: """ -""" -url { - src: - "https://github.com/janestreet/async_smtp/archive/aba47f020914af061d6d7ee862a6f1ffb878c73b.tar.gz" - checksum: - "sha256=e580bdd20d26dbf9e9bd62672e901e7c1052cbc3d52ef4c4bd550cefcf3392af" -} diff --git a/packages/async_smtp/async_smtp.v0.18~preview.130.55+197/opam b/packages/async_smtp/async_smtp.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..878156f8b1 --- /dev/null +++ b/packages/async_smtp/async_smtp.v0.18~preview.130.55+197/opam @@ -0,0 +1,48 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/async_smtp" +bug-reports: "https://github.com/janestreet/async_smtp/issues" +dev-repo: "git+https://github.com/janestreet/async_smtp.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/async_smtp/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "async" {= "v0.18~preview.130.55+197"} + "async_extra" {= "v0.18~preview.130.55+197"} + "async_inotify" {= "v0.18~preview.130.55+197"} + "async_log" {= "v0.18~preview.130.55+197"} + "async_sendfile" {= "v0.18~preview.130.55+197"} + "async_shell" {= "v0.18~preview.130.55+197"} + "async_ssl" {= "v0.18~preview.130.55+197"} + "babel" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "email_message" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable" {= "v0.18~preview.130.55+197"} + "re2" {= "v0.18~preview.130.55+197"} + "resource_cache" {= "v0.18~preview.130.55+197"} + "sexp_macro" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} + "angstrom" {>= "0.15.0"} + "base64" {>= "3.4.0"} + "cryptokit" {>= "1.16" & < "1.17"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "SMTP client and server" +description: """ +""" +url { + src: + "https://github.com/janestreet/async_smtp/archive/272001a4254c1712b8fbc78fab169efa9f8ef20c.tar.gz" + checksum: + "sha256=176c8176c3cb50265e7ae95eedb6ef9ec15d5aa73086cead9a49ee8ab84aea58" +} diff --git a/packages/async_ssl/async_ssl.v0.18~preview.130.36+326/opam b/packages/async_ssl/async_ssl.v0.18~preview.130.55+197/opam similarity index 60% rename from packages/async_ssl/async_ssl.v0.18~preview.130.36+326/opam rename to packages/async_ssl/async_ssl.v0.18~preview.130.55+197/opam index b063c5dedc..cc5e10d1b7 100644 --- a/packages/async_ssl/async_ssl.v0.18~preview.130.36+326/opam +++ b/packages/async_ssl/async_ssl.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "conf-libssl" - "ctypes" {>= "0.18.0"} + "ctypes" {= "0.23.0+ox"} "ctypes-foreign" "dune" {>= "3.17.0"} "dune-configurator" @@ -33,7 +33,7 @@ encrypted communication between both. """ url { src: - "https://github.com/janestreet/async_ssl/archive/3e52a350e5fbe98ee52faca9503578502097fa8e.tar.gz" + "https://github.com/janestreet/async_ssl/archive/8e6a16dc6c6c3544fe1216ea778c076609106b2b.tar.gz" checksum: - "sha256=b0387147a103369d9299f65bb5108efd3e3a868d9039b8a194769b28f6b32816" + "sha256=5f91ea08269e4492c5a910fd00b74f17c577658ae7bcfcdfa6714b1824e61196" } diff --git a/packages/async_udp/async_udp.v0.18~preview.130.36+326/opam b/packages/async_udp/async_udp.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/async_udp/async_udp.v0.18~preview.130.36+326/opam rename to packages/async_udp/async_udp.v0.18~preview.130.55+197/opam index fc401ef120..058c685924 100644 --- a/packages/async_udp/async_udp.v0.18~preview.130.36+326/opam +++ b/packages/async_udp/async_udp.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -29,7 +29,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/async_udp/archive/90938c13b08223a23e9092ac85806c5482b9f4b7.tar.gz" + "https://github.com/janestreet/async_udp/archive/da3c0ccd18c89dd64f769de22d62e1e5c76d48bb.tar.gz" checksum: - "sha256=ea64f97b5a4dff02e7c8cb229870a68ad313f70cf20de0aa92b260fcbd47c27c" + "sha256=6a13e71adf68862bf29ed72cff5e4bd9dea7838e3021b5e3da50e49c5c3ea4e5" } diff --git a/packages/async_unix/async_unix.v0.18~preview.130.36+326/opam b/packages/async_unix/async_unix.v0.18~preview.130.55+197/opam similarity index 62% rename from packages/async_unix/async_unix.v0.18~preview.130.36+326/opam rename to packages/async_unix/async_unix.v0.18~preview.130.55+197/opam index a57f0a5d99..7ae55210dc 100644 --- a/packages/async_unix/async_unix.v0.18~preview.130.36+326/opam +++ b/packages/async_unix/async_unix.v0.18~preview.130.55+197/opam @@ -12,13 +12,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} "cstruct" {>= "6.0.0"} "dune" {>= "3.17.0"} ] @@ -32,7 +32,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/async_unix/archive/97805a33402f675edb0e6e447e612f11f4b84e29.tar.gz" + "https://github.com/janestreet/async_unix/archive/7d9501ff8738905e1a5b52fcbda7291ada4f5d8b.tar.gz" checksum: - "sha256=bcf06b9b26666dbce7f89f0374dbcf4ededb403137c295d371074de0b3d85af2" + "sha256=157057224c35ebcecb0381ea2b8fe4b197b6579ee31cb4ea9db1a84942cb07fb" } diff --git a/packages/async_websocket/async_websocket.v0.18~preview.130.36+326/opam b/packages/async_websocket/async_websocket.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/async_websocket/async_websocket.v0.18~preview.130.36+326/opam rename to packages/async_websocket/async_websocket.v0.18~preview.130.55+197/opam index 9bdd1608aa..95e6e2b518 100644 --- a/packages/async_websocket/async_websocket.v0.18~preview.130.36+326/opam +++ b/packages/async_websocket/async_websocket.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "cryptokit" {>= "1.16" & < "1.17"} "dune" {>= "3.17.0"} ] @@ -28,7 +28,7 @@ This library implements both the server and client side of """ url { src: - "https://github.com/janestreet/async_websocket/archive/ec4ef1bdd530884c13ff7d36e90328114687bd7c.tar.gz" + "https://github.com/janestreet/async_websocket/archive/3b33c6f5353912b5e7e0b76324a5061ca340d04f.tar.gz" checksum: - "sha256=32c0cf6d03babbbaf8e39b1a9fe9ea939566e3eb9f857d3fb0d2b3a4c38af0dc" + "sha256=6d818940b97f634e74da56f584c556aa455f6f1d8a5e7e8c740efc4a578892d8" } diff --git a/packages/await/await.v0.18~preview.130.36+326/opam b/packages/await/await.v0.18~preview.130.36+326/opam deleted file mode 100644 index a699592408..0000000000 --- a/packages/await/await.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,44 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/await" -bug-reports: "https://github.com/janestreet/await/issues" -dev-repo: "git+https://github.com/janestreet/await.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/await/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.2.0"} - "async" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "basement" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "oxcaml_effect" {= "v0.18~preview.130.36+326"} - "portable" {= "v0.18~preview.130.36+326"} - "ppx_debug_assert" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "unique" {= "v0.18~preview.130.36+326"} - "uopt" {= "v0.18~preview.130.36+326"} - "backoff" {= "0.1.1+ox"} - "base-threads" - "dune" {>= "3.17.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "Low-level support for suspending and resuming fibers in OxCaml" -description: """ -[Await] is a library that provides low-level support for suspending -and resuming fibers with support for propagation of cancelation and termination. -""" -url { - src: - "https://github.com/janestreet/await/archive/c520dae19bcfdaeba1362a42bf526c4b53795aa0.tar.gz" - checksum: - "sha256=777b6759f8d94ef17d3a55fd85c98f9d25d07ac92f54c70a9e672855cf47c9ae" -} diff --git a/packages/await/await.v0.18~preview.130.55+197/opam b/packages/await/await.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..34dd9fc0e6 --- /dev/null +++ b/packages/await/await.v0.18~preview.130.55+197/opam @@ -0,0 +1,40 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/await" +bug-reports: "https://github.com/janestreet/await/issues" +dev-repo: "git+https://github.com/janestreet/await.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/await/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.2.0"} + "async" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "basement" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "oxcaml_effect" {= "v0.18~preview.130.55+197"} + "portable" {= "v0.18~preview.130.55+197"} + "ppx_debug_assert" {= "v0.18~preview.130.55+197"} + "ppx_fuelproof" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_sexp_value" {= "v0.18~preview.130.55+197"} + "ppx_shorthand" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "Implementations of awaiting and synchronization primitives for OxCaml" +description: """ +[Await] provides implementations of awaiting and synchronization primitives for OxCaml. +""" +url { + src: + "https://github.com/janestreet/await/archive/f096cb698f882342efd9d4baaa8638dabf8cdf49.tar.gz" + checksum: + "sha256=29fb955634cad22853964094b480a73561f6f55595f4d36625efec27fb3398c2" +} diff --git a/packages/babel/babel.v0.18~preview.130.36+326/opam b/packages/babel/babel.v0.18~preview.130.55+197/opam similarity index 55% rename from packages/babel/babel.v0.18~preview.130.36+326/opam rename to packages/babel/babel.v0.18~preview.130.55+197/opam index 9c5491abf4..09a1b82d84 100644 --- a/packages/babel/babel.v0.18~preview.130.36+326/opam +++ b/packages/babel/babel.v0.18~preview.130.55+197/opam @@ -11,14 +11,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "pipe_with_writer_error" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "streamable" {= "v0.18~preview.130.36+326"} - "tilde_f" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "pipe_with_writer_error" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "streamable" {= "v0.18~preview.130.55+197"} + "tilde_f" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -29,7 +29,7 @@ A library for defining Rpcs that can evolve over time without breaking backward """ url { src: - "https://github.com/janestreet/babel/archive/181082eae684369cc903c2ccb515125c252fc180.tar.gz" + "https://github.com/janestreet/babel/archive/71b9bbc02c08cf46d0ae9c1471f351b2d87cd874.tar.gz" checksum: - "sha256=d1164aa20e5bced4d0f46a9164c11663d608856d31d9f0b7a98f750ea311369b" + "sha256=1fb6111bad1084d159597edf77f78ed9a0a62db06a6ec9c97033a1e6e908528f" } diff --git a/packages/base/base.v0.18~preview.130.36+326/opam b/packages/base/base.v0.18~preview.130.55+197/opam similarity index 64% rename from packages/base/base.v0.18~preview.130.36+326/opam rename to packages/base/base.v0.18~preview.130.55+197/opam index 8b7056cd24..32d13eaf2a 100644 --- a/packages/base/base.v0.18~preview.130.36+326/opam +++ b/packages/base/base.v0.18~preview.130.55+197/opam @@ -11,13 +11,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "basement" {= "v0.18~preview.130.36+326"} - "ocaml_intrinsics_kernel" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "ppx_cold" {= "v0.18~preview.130.36+326"} - "ppx_hash" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} + "basement" {= "v0.18~preview.130.55+197"} + "ocaml_intrinsics_kernel" {= "v0.18~preview.130.55+197"} + "ppx_array_base" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "ppx_cold" {= "v0.18~preview.130.55+197"} + "ppx_hash" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "dune-configurator" "ppxlib" {= "0.33.0+ox"} @@ -40,7 +41,7 @@ provided by companion libraries such as stdio: """ url { src: - "https://github.com/janestreet/base/archive/9587e53d395c8f90a5f138e3c2202a20e3ca065d.tar.gz" + "https://github.com/janestreet/base/archive/6f78e19cbe8ad6214e5d52b516b993c2a812371c.tar.gz" checksum: - "sha256=f3f7b69c378ded57aca87546566fa4b90c63f0f104a4242c48734f50fc4fa9df" + "sha256=e42116dcc079ecd03ebd87b2bd0ccfb2a054e0c9972855cab567b379edc346ae" } diff --git a/packages/base_bigstring/base_bigstring.v0.18~preview.130.36+326/opam b/packages/base_bigstring/base_bigstring.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/base_bigstring/base_bigstring.v0.18~preview.130.36+326/opam rename to packages/base_bigstring/base_bigstring.v0.18~preview.130.55+197/opam index 70497b0fa8..948726ca31 100644 --- a/packages/base_bigstring/base_bigstring.v0.18~preview.130.36+326/opam +++ b/packages/base_bigstring/base_bigstring.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "int_repr" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "int_repr" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ String type based on [Bigarray], for use in I/O and C-bindings. """ url { src: - "https://github.com/janestreet/base_bigstring/archive/80e08fa6030473b5f65734001400b92f75ceec12.tar.gz" + "https://github.com/janestreet/base_bigstring/archive/b24fdb8084392d31652fec457e185251bab6ef28.tar.gz" checksum: - "sha256=f2731d5fd440535ab2e7d26430ea57af947367db16c12ba6b116b5923f439367" + "sha256=c8215a3a8265f5281dcc2c951d59c6983856bb76e362289f3650b3a00ed39309" } diff --git a/packages/base_quickcheck/base_quickcheck.v0.18~preview.130.36+326/opam b/packages/base_quickcheck/base_quickcheck.v0.18~preview.130.55+197/opam similarity index 54% rename from packages/base_quickcheck/base_quickcheck.v0.18~preview.130.36+326/opam rename to packages/base_quickcheck/base_quickcheck.v0.18~preview.130.55+197/opam index 0ad7f816a8..18c7ccc6ae 100644 --- a/packages/base_quickcheck/base_quickcheck.v0.18~preview.130.36+326/opam +++ b/packages/base_quickcheck/base_quickcheck.v0.18~preview.130.55+197/opam @@ -12,16 +12,17 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "ppx_fields_conv" {= "v0.18~preview.130.36+326"} - "ppx_let" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} - "ppx_sexp_value" {= "v0.18~preview.130.36+326"} - "ppx_shorthand" {= "v0.18~preview.130.36+326"} - "ppx_template" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "splittable_random" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "ppx_fields_conv" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_portable" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} + "ppx_sexp_value" {= "v0.18~preview.130.55+197"} + "ppx_shorthand" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "splittable_random" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ocaml-compiler-libs" {= "v0.17.0+ox"} "ppxlib" {= "0.33.0+ox"} @@ -35,7 +36,7 @@ with support for built-in types as well as types provided by Base. """ url { src: - "https://github.com/janestreet/base_quickcheck/archive/e5a674d20caa8671b002ee46a560aaa47180c9ae.tar.gz" + "https://github.com/janestreet/base_quickcheck/archive/d56d58d7eb4778d5d6205fa2d73654b63358e1b4.tar.gz" checksum: - "sha256=db3b01313b1cee7df6f81c6ced76aa60df3ca0eb7ed66993000e17d210d87139" + "sha256=f547771cbcacd8c267d1b99121f39fd1ff4006007548abdb9d24ffd0b8622ca4" } diff --git a/packages/base_trie/base_trie.v0.18~preview.130.36+326/opam b/packages/base_trie/base_trie.v0.18~preview.130.55+197/opam similarity index 60% rename from packages/base_trie/base_trie.v0.18~preview.130.36+326/opam rename to packages/base_trie/base_trie.v0.18~preview.130.55+197/opam index f3f1ca82f0..70dfcfe8ba 100644 --- a/packages/base_trie/base_trie.v0.18~preview.130.36+326/opam +++ b/packages/base_trie/base_trie.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -30,7 +30,7 @@ each potential next key in the chain. """ url { src: - "https://github.com/janestreet/base_trie/archive/2e9cbf0c10328c2894281bf6de32faa66df95735.tar.gz" + "https://github.com/janestreet/base_trie/archive/227770229705628a8dc6b154b963c36b16b2eae1.tar.gz" checksum: - "sha256=d7bdfd761da64a124c4d91a84131797b332ea32a4d3be62d9cee6752edc741c7" + "sha256=b70712d1165383b5df52f80b0ed33be7572268667bef0d3602241b38efba9d84" } diff --git a/packages/basement/basement.v0.18~preview.130.36+326/opam b/packages/basement/basement.v0.18~preview.130.55+197/opam similarity index 82% rename from packages/basement/basement.v0.18~preview.130.36+326/opam rename to packages/basement/basement.v0.18~preview.130.55+197/opam index b71b595607..f1a5825e58 100644 --- a/packages/basement/basement.v0.18~preview.130.36+326/opam +++ b/packages/basement/basement.v0.18~preview.130.55+197/opam @@ -23,7 +23,7 @@ sexplib0 """ url { src: - "https://github.com/janestreet/basement/archive/5c95ab1f14d92eda8910000f1acc2f828631b6d3.tar.gz" + "https://github.com/janestreet/basement/archive/bfe5c6953f5e69c148431c4027ed41385e68402e.tar.gz" checksum: - "sha256=398c6ac661e8b8b94a6070fe91f60a697d25a5ef624a4396a1fb7222cea2f88d" + "sha256=2201829a1d1fe13138d75a7ae856bd742e38fe78ffdbfb06e38ecd624ccbfefd" } diff --git a/packages/bidirectional_map/bidirectional_map.v0.18~preview.130.36+326/opam b/packages/bidirectional_map/bidirectional_map.v0.18~preview.130.55+197/opam similarity index 100% rename from packages/bidirectional_map/bidirectional_map.v0.18~preview.130.36+326/opam rename to packages/bidirectional_map/bidirectional_map.v0.18~preview.130.55+197/opam diff --git a/packages/big_percent/.generated b/packages/big_percent/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/big_percent/big_percent.v0.18~preview.130.55+197/opam b/packages/big_percent/big_percent.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..79282d6c59 --- /dev/null +++ b/packages/big_percent/big_percent.v0.18~preview.130.55+197/opam @@ -0,0 +1,31 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/big_percent" +bug-reports: "https://github.com/janestreet/big_percent/issues" +dev-repo: "git+https://github.com/janestreet/big_percent.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/big_percent/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "bignum" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "An arbitrary-precision scale factor, not bounded between 0% and 100%." +description: """ +Big_percent is like Core.Percent but arbitrary-precision, backed by Bignum. +""" +url { + src: + "https://github.com/janestreet/big_percent/archive/4c9d330a037be6cc9cb9e3a13384c2f3dacbd602.tar.gz" + checksum: + "sha256=6323992146662c5ea65120af8203eaa0915563fbb940f848a07f8da29d22efbf" +} diff --git a/packages/bigdecimal/bigdecimal.v0.18~preview.130.36+326/opam b/packages/bigdecimal/bigdecimal.v0.18~preview.130.55+197/opam similarity index 68% rename from packages/bigdecimal/bigdecimal.v0.18~preview.130.36+326/opam rename to packages/bigdecimal/bigdecimal.v0.18~preview.130.55+197/opam index e592d558d9..ce8a51993e 100644 --- a/packages/bigdecimal/bigdecimal.v0.18~preview.130.36+326/opam +++ b/packages/bigdecimal/bigdecimal.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "bignum" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} + "bignum" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "zarith" {= "1.12+ox"} ] @@ -27,7 +27,7 @@ the mantissa is internally a [Bigint.t] and the exponent is an [int]. """ url { src: - "https://github.com/janestreet/bigdecimal/archive/1aaf17df97ca23690c053eb7db6a3074ef13ba93.tar.gz" + "https://github.com/janestreet/bigdecimal/archive/245192498d2a1e1dac9d7228a401f72be67f9bd5.tar.gz" checksum: - "sha256=6486c178350c2699a37af211f89025d258dbe90be32389bd3c6726d3bd560268" + "sha256=00a98e72d22b901f6c82373e3a1674384428a4f5d59f30c76b80dff63068f930" } diff --git a/packages/bignum/bignum.v0.18~preview.130.36+326/opam b/packages/bignum/bignum.v0.18~preview.130.55+197/opam similarity index 56% rename from packages/bignum/bignum.v0.18~preview.130.36+326/opam rename to packages/bignum/bignum.v0.18~preview.130.55+197/opam index 5283e971db..605168bbd1 100644 --- a/packages/bignum/bignum.v0.18~preview.130.36+326/opam +++ b/packages/bignum/bignum.v0.18~preview.130.55+197/opam @@ -11,13 +11,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "splittable_random" {= "v0.18~preview.130.36+326"} - "typerep" {= "v0.18~preview.130.36+326"} - "zarith_stubs_js" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "splittable_random" {= "v0.18~preview.130.55+197"} + "typerep" {= "v0.18~preview.130.55+197"} + "zarith_stubs_js" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "num" "zarith" {= "1.12+ox"} @@ -29,7 +29,7 @@ description: """ """ url { src: - "https://github.com/janestreet/bignum/archive/4faa5964927876fcb5c3c12aa9a5d2cb664a74a7.tar.gz" + "https://github.com/janestreet/bignum/archive/28a5b007e1ea12e8059e11759a429fb68610fb28.tar.gz" checksum: - "sha256=fae07f62ac4bdaa7954d49da7c18d5c8c19b534c9266c613f9f3c3c97f16ef2e" + "sha256=fe85affbc9b2bbac9158276b37d2b0d45cc8c711406f11cc5f1c79ce78ff8189" } diff --git a/packages/bin_prot/bin_prot.v0.18~preview.130.36+326/opam b/packages/bin_prot/bin_prot.v0.18~preview.130.55+197/opam similarity index 53% rename from packages/bin_prot/bin_prot.v0.18~preview.130.36+326/opam rename to packages/bin_prot/bin_prot.v0.18~preview.130.55+197/opam index f73a7f42c5..4d1c8580a3 100644 --- a/packages/bin_prot/bin_prot.v0.18~preview.130.36+326/opam +++ b/packages/bin_prot/bin_prot.v0.18~preview.130.55+197/opam @@ -11,16 +11,16 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_custom_printf" {= "v0.18~preview.130.36+326"} - "ppx_fields_conv" {= "v0.18~preview.130.36+326"} - "ppx_globalize" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "ppx_template" {= "v0.18~preview.130.36+326"} - "ppx_variants_conv" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_custom_printf" {= "v0.18~preview.130.55+197"} + "ppx_fields_conv" {= "v0.18~preview.130.55+197"} + "ppx_globalize" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "ppx_variants_conv" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -33,7 +33,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/bin_prot/archive/1bed8c93880fc7f70772a407434936c2e635deab.tar.gz" + "https://github.com/janestreet/bin_prot/archive/b509f4439e1a5ac98389d20a795bf583547c758d.tar.gz" checksum: - "sha256=2f01647028193f0ff023bdc48905a9b6105a931c18a5be1ccd586b14099fc36a" + "sha256=5b320ce8cd28e223ea4b9a24e36b5d175578f764bfe3f1fde2b48d841bf4bebb" } diff --git a/packages/bitset/bitset.v0.18~preview.130.36+326/opam b/packages/bitset/bitset.v0.18~preview.130.55+197/opam similarity index 61% rename from packages/bitset/bitset.v0.18~preview.130.36+326/opam rename to packages/bitset/bitset.v0.18~preview.130.55+197/opam index 70e9839da7..4d87fc96c6 100644 --- a/packages/bitset/bitset.v0.18~preview.130.36+326/opam +++ b/packages/bitset/bitset.v0.18~preview.130.55+197/opam @@ -11,10 +11,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ocaml_intrinsics_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "unboxed" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ocaml_intrinsics_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "unboxed" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ description: """ """ url { src: - "https://github.com/janestreet/bitset/archive/98621f87ef7afe9cf56ce56ea4d6188dc3d83353.tar.gz" + "https://github.com/janestreet/bitset/archive/b2fc30418f4fd65bbb8a12515c0ae62b09e08c6a.tar.gz" checksum: - "sha256=8504fdd9805dccf6ab82300915391d1863faad6d68f4484a99ba9d768355b135" + "sha256=314ee908e43b67d7ca2b7be470c7eea23b7ec757f5d0c627ad91d976c5499924" } diff --git a/packages/bonsai/bonsai.v0.18~preview.130.36+326/opam b/packages/bonsai/bonsai.v0.18~preview.130.36+326/opam deleted file mode 100644 index cad20c64fb..0000000000 --- a/packages/bonsai/bonsai.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,43 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/bonsai" -bug-reports: "https://github.com/janestreet/bonsai/issues" -dev-repo: "git+https://github.com/janestreet/bonsai.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "abstract_algebra" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "bonsai_concrete" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "ocaml-embed-file" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_let" {= "v0.18~preview.130.36+326"} - "ppx_pattern_bind" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "uopt" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "A library for building dynamic webapps, using Js_of_ocaml" -description: """ -Bonsai is a library for building reusable UI components inside an - Incremental-style UI framework such as Incr_dom or React. -""" -url { - src: - "https://github.com/janestreet/bonsai/archive/5bed86baa0f1660ca615325940df345774c68acf.tar.gz" - checksum: - "sha256=bbb3a050edec394beca0754c02d2b54f2fecf64e9102bcea5f3ea3aac021b755" -} diff --git a/packages/bonsai/bonsai.v0.18~preview.130.55+197/opam b/packages/bonsai/bonsai.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..fe926d7e1f --- /dev/null +++ b/packages/bonsai/bonsai.v0.18~preview.130.55+197/opam @@ -0,0 +1,44 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/bonsai" +bug-reports: "https://github.com/janestreet/bonsai/issues" +dev-repo: "git+https://github.com/janestreet/bonsai.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "abstract_algebra" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "bonsai_concrete" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "ocaml-embed-file" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_pattern_bind" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "uopt" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "js_of_ocaml-ppx" {= "6.0.1+ox"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "A library for building dynamic webapps, using Js_of_ocaml" +description: """ +Bonsai is a library for building reusable UI components inside an + Incremental-style UI framework such as Incr_dom or React. +""" +url { + src: + "https://github.com/janestreet/bonsai/archive/62e97a91d9af876b4c1e53e109a50042e7dc9ebb.tar.gz" + checksum: + "sha256=371e12953188b72bb3b1964736f45e085851c65d999f5081cb1372a7fd501ad1" +} diff --git a/packages/bonsai_bench/bonsai_bench.v0.18~preview.130.36+326/opam b/packages/bonsai_bench/bonsai_bench.v0.18~preview.130.55+197/opam similarity index 54% rename from packages/bonsai_bench/bonsai_bench.v0.18~preview.130.36+326/opam rename to packages/bonsai_bench/bonsai_bench.v0.18~preview.130.55+197/opam index 82dcefc52e..88c720e542 100644 --- a/packages/bonsai_bench/bonsai_bench.v0.18~preview.130.36+326/opam +++ b/packages/bonsai_bench/bonsai_bench.v0.18~preview.130.55+197/opam @@ -12,16 +12,17 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "bonsai" {= "v0.18~preview.130.36+326"} - "bonsai_concrete" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_bench" {= "v0.18~preview.130.36+326"} - "expectable" {= "v0.18~preview.130.36+326"} - "incr_dom" {= "v0.18~preview.130.36+326"} - "ocaml-embed-file" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_pattern_bind" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} + "bonsai" {= "v0.18~preview.130.55+197"} + "bonsai_concrete" {= "v0.18~preview.130.55+197"} + "command_nodejs" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_bench" {= "v0.18~preview.130.55+197"} + "expectable" {= "v0.18~preview.130.55+197"} + "incr_dom" {= "v0.18~preview.130.55+197"} + "ocaml-embed-file" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_pattern_bind" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml-ppx" {= "6.0.1+ox"} "uri" {>= "3.0.0"} @@ -35,7 +36,7 @@ Bonsai is a library for building reusable UI components inside an """ url { src: - "https://github.com/janestreet/bonsai_bench/archive/c33c12cfee36de5303f678cb0343593dc30bfa7e.tar.gz" + "https://github.com/janestreet/bonsai_bench/archive/37856cb7c551bbd4bee902baf385a5b12c71e561.tar.gz" checksum: - "sha256=4bcbc6f52f8cf0872f9aa03ffd14a43e38495a5a8d1c5f0f62f33d322182c2af" + "sha256=05cf30a2793c1c28f04ddf4e694f4d1a6a55b720ecf5b5c4b35de1e4c1933af5" } diff --git a/packages/bonsai_concrete/bonsai_concrete.v0.18~preview.130.36+326/opam b/packages/bonsai_concrete/bonsai_concrete.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/bonsai_concrete/bonsai_concrete.v0.18~preview.130.36+326/opam rename to packages/bonsai_concrete/bonsai_concrete.v0.18~preview.130.55+197/opam index 5d53adf085..ddc38c433f 100644 --- a/packages/bonsai_concrete/bonsai_concrete.v0.18~preview.130.36+326/opam +++ b/packages/bonsai_concrete/bonsai_concrete.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "incr_select" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "time_now" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "incr_select" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "time_now" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -36,7 +36,7 @@ This repo contains shared dependencies between incr_dom and bonsai: ui_incr """ url { src: - "https://github.com/janestreet/bonsai_concrete/archive/7f3b916edbb95b35285b1a08cd2c126712830d9c.tar.gz" + "https://github.com/janestreet/bonsai_concrete/archive/4dff7e589088e0e1ec640d002f6d9cdd9b8c88be.tar.gz" checksum: - "sha256=a6f45a735ef0d21a529db6bfbb83922a13a2154a04d947417948e63d86eafccf" + "sha256=caa893dd4ce6bdc707b2f8826191925077783cf7c779718797196c22994ef146" } diff --git a/packages/bonsai_examples/bonsai_examples.v0.18~preview.130.36+326/opam b/packages/bonsai_examples/bonsai_examples.v0.18~preview.130.55+197/opam similarity index 54% rename from packages/bonsai_examples/bonsai_examples.v0.18~preview.130.36+326/opam rename to packages/bonsai_examples/bonsai_examples.v0.18~preview.130.55+197/opam index d07ecb4eb1..b6fda51d94 100644 --- a/packages/bonsai_examples/bonsai_examples.v0.18~preview.130.36+326/opam +++ b/packages/bonsai_examples/bonsai_examples.v0.18~preview.130.55+197/opam @@ -12,20 +12,20 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_extra" {= "v0.18~preview.130.36+326"} - "async_js" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_websocket" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "bonsai" {= "v0.18~preview.130.36+326"} - "bonsai_web" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ocaml-embed-file" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_extra" {= "v0.18~preview.130.55+197"} + "async_js" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_websocket" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "bonsai" {= "v0.18~preview.130.55+197"} + "bonsai_web" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ocaml-embed-file" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "cohttp" {>= "2.5.6"} "cohttp-async" {>= "2.5.7" & < "3.0.0" | >= "5.1.1" & < "6.0.0"} "dune" {>= "3.17.0"} @@ -43,7 +43,7 @@ A collection of bonsai_web examples. Bonsai is a library for building """ url { src: - "https://github.com/janestreet/bonsai_examples/archive/040c7133953bd4d075f10f6a35c1c7d38236a983.tar.gz" + "https://github.com/janestreet/bonsai_examples/archive/0b055ea075f3e95e8330f40dbbdf1118894a43a3.tar.gz" checksum: - "sha256=719da7ffac248f8355f70871bb86e73ca189b493b202dc3080a4842b78a2c2b1" + "sha256=04184fc4aec3cdeefc1f665fdc4baeeae3866c9f83c5f6f1bd5795d421d1d283" } diff --git a/packages/bonsai_test/bonsai_test.v0.18~preview.130.36+326/opam b/packages/bonsai_test/bonsai_test.v0.18~preview.130.36+326/opam deleted file mode 100644 index 7ecd65677c..0000000000 --- a/packages/bonsai_test/bonsai_test.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,47 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/bonsai_test" -bug-reports: "https://github.com/janestreet/bonsai_test/issues" -dev-repo: "git+https://github.com/janestreet/bonsai_test.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai_test/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_js" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "bonsai" {= "v0.18~preview.130.36+326"} - "bonsai_concrete" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "expectable" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "ocaml-embed-file" {= "v0.18~preview.130.36+326"} - "patdiff" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_pattern_bind" {= "v0.18~preview.130.36+326"} - "ppx_quick_test" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "A library for testing Bonsai state machines." -description: """ -Bonsai is a library for building composable state machines. This libary - provides testing capabilities. -""" -url { - src: - "https://github.com/janestreet/bonsai_test/archive/2352d71f7d9503a77a4277480709aaa30cf40707.tar.gz" - checksum: - "sha256=27fc8e9834d4c5e4a0d3f3d7c44fdeb101d2f352a5b41e057a4faa3b0fd1e7b3" -} diff --git a/packages/bonsai_test/bonsai_test.v0.18~preview.130.55+197/opam b/packages/bonsai_test/bonsai_test.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..54f76deb64 --- /dev/null +++ b/packages/bonsai_test/bonsai_test.v0.18~preview.130.55+197/opam @@ -0,0 +1,47 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/bonsai_test" +bug-reports: "https://github.com/janestreet/bonsai_test/issues" +dev-repo: "git+https://github.com/janestreet/bonsai_test.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai_test/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "async" {= "v0.18~preview.130.55+197"} + "async_js" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "bonsai" {= "v0.18~preview.130.55+197"} + "bonsai_concrete" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "expectable" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "ocaml-embed-file" {= "v0.18~preview.130.55+197"} + "patdiff" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_pattern_bind" {= "v0.18~preview.130.55+197"} + "ppx_quick_test" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "re" {= "1.14.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "A library for testing Bonsai state machines." +description: """ +Bonsai is a library for building composable state machines. This libary + provides testing capabilities. +""" +url { + src: + "https://github.com/janestreet/bonsai_test/archive/9a6a2dbd18495856c625a24c573e9e1e5944658d.tar.gz" + checksum: + "sha256=8adbcf8aed7de629812eb029453262c19edbe34be9b3589b3f3d90f1df7b8a4c" +} diff --git a/packages/bonsai_web/bonsai_web.v0.18~preview.130.36+326/opam b/packages/bonsai_web/bonsai_web.v0.18~preview.130.36+326/opam deleted file mode 100644 index 99c42df463..0000000000 --- a/packages/bonsai_web/bonsai_web.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,50 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/bonsai_web" -bug-reports: "https://github.com/janestreet/bonsai_web/issues" -dev-repo: "git+https://github.com/janestreet/bonsai_web.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai_web/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "am_running_how_js" {= "v0.18~preview.130.36+326"} - "async_durable" {= "v0.18~preview.130.36+326"} - "async_js" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "babel" {= "v0.18~preview.130.36+326"} - "bonsai" {= "v0.18~preview.130.36+326"} - "bonsai_concrete" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "incr_dom" {= "v0.18~preview.130.36+326"} - "ocaml-embed-file" {= "v0.18~preview.130.36+326"} - "polling_state_rpc" {= "v0.18~preview.130.36+326"} - "ppx_css" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "streamable" {= "v0.18~preview.130.36+326"} - "toplayer" {= "v0.18~preview.130.36+326"} - "versioned_polling_state_rpc" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "js_of_ocaml" {= "6.0.1+ox"} - "js_of_ocaml-ppx" {= "6.0.1+ox"} - "uri" {>= "3.0.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "A library for building dynamic webapps, using Js_of_ocaml" -description: """ -Bonsai is a library for building reusable UI components inside an - Incremental-style UI framework such as Incr_dom or React. -""" -url { - src: - "https://github.com/janestreet/bonsai_web/archive/c0eaad43a85893d88857879442d78f3a4c421da4.tar.gz" - checksum: - "sha256=8da3a87ddba378177a7972a204f69c7e3547f343e92df7bf7030290026a9573b" -} diff --git a/packages/bonsai_web/bonsai_web.v0.18~preview.130.55+197/opam b/packages/bonsai_web/bonsai_web.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..a50e2bba5a --- /dev/null +++ b/packages/bonsai_web/bonsai_web.v0.18~preview.130.55+197/opam @@ -0,0 +1,52 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/bonsai_web" +bug-reports: "https://github.com/janestreet/bonsai_web/issues" +dev-repo: "git+https://github.com/janestreet/bonsai_web.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai_web/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "am_running_how_js" {= "v0.18~preview.130.55+197"} + "async_durable" {= "v0.18~preview.130.55+197"} + "async_js" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "babel" {= "v0.18~preview.130.55+197"} + "bonsai" {= "v0.18~preview.130.55+197"} + "bonsai_concrete" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "incr_dom" {= "v0.18~preview.130.55+197"} + "ocaml-embed-file" {= "v0.18~preview.130.55+197"} + "pending_or_error" {= "v0.18~preview.130.55+197"} + "polling_state_rpc" {= "v0.18~preview.130.55+197"} + "ppx_css" {= "v0.18~preview.130.55+197"} + "ppx_diff" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "streamable" {= "v0.18~preview.130.55+197"} + "toplayer" {= "v0.18~preview.130.55+197"} + "versioned_polling_state_rpc" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "js_of_ocaml" {= "6.0.1+ox"} + "js_of_ocaml-ppx" {= "6.0.1+ox"} + "uri" {>= "3.0.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "A library for building dynamic webapps, using Js_of_ocaml" +description: """ +Bonsai is a library for building reusable UI components inside an + Incremental-style UI framework such as Incr_dom or React. +""" +url { + src: + "https://github.com/janestreet/bonsai_web/archive/76a49da493ec668278a3ab966b5fcde0de7e51be.tar.gz" + checksum: + "sha256=78566a36f7376e33e3d326e78f19fcf995857cf8aff16b6a1fbe67799423e48c" +} diff --git a/packages/bonsai_web_components/bonsai_web_components.v0.18~preview.130.36+326/opam b/packages/bonsai_web_components/bonsai_web_components.v0.18~preview.130.36+326/opam deleted file mode 100644 index b7cfd12202..0000000000 --- a/packages/bonsai_web_components/bonsai_web_components.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,68 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/bonsai_web_components" -bug-reports: "https://github.com/janestreet/bonsai_web_components/issues" -dev-repo: "git+https://github.com/janestreet/bonsai_web_components.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai_web_components/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "am_running_how_js" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "bonsai" {= "v0.18~preview.130.36+326"} - "bonsai_concrete" {= "v0.18~preview.130.36+326"} - "bonsai_web" {= "v0.18~preview.130.36+326"} - "bonsai_web_test" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_extended" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "fuzzy_match" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "ocaml-embed-file" {= "v0.18~preview.130.36+326"} - "ordinal_abbreviation" {= "v0.18~preview.130.36+326"} - "patdiff" {= "v0.18~preview.130.36+326"} - "ppx_bench" {= "v0.18~preview.130.36+326"} - "ppx_css" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_html" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_module_timer" {= "v0.18~preview.130.36+326"} - "ppx_pattern_bind" {= "v0.18~preview.130.36+326"} - "ppx_typed_fields" {= "v0.18~preview.130.36+326"} - "profunctor" {= "v0.18~preview.130.36+326"} - "record_builder" {= "v0.18~preview.130.36+326"} - "sexp_grammar" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} - "toplayer" {= "v0.18~preview.130.36+326"} - "uri_parsing" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "gen_js_api" {= "1.1.2+ox"} - "js_of_ocaml" {= "6.0.1+ox"} - "js_of_ocaml-ppx" {= "6.0.1+ox"} - "re" {>= "1.8.0"} - "uri" {>= "3.0.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: - "Examples for bonsai_web, a library for building dynamic webapps, using Js_of_ocaml" -description: """ -A collection of bonsai_web examples. Bonsai is a library for building - reusable UI components inside an Incremental-style UI framework such as - Incr_dom or React. This repository contains its examples. -""" -url { - src: - "https://github.com/janestreet/bonsai_web_components/archive/1a6e90b40a71ae3b644381e679b68c982cdd58c6.tar.gz" - checksum: - "sha256=c0cab0bf523db6ef0f2a3b73a2a57bf928e0f6d7a6f86511d4f5ee83b194940e" -} diff --git a/packages/bonsai_web_components/bonsai_web_components.v0.18~preview.130.55+197/opam b/packages/bonsai_web_components/bonsai_web_components.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..3dcbaf91e0 --- /dev/null +++ b/packages/bonsai_web_components/bonsai_web_components.v0.18~preview.130.55+197/opam @@ -0,0 +1,68 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/bonsai_web_components" +bug-reports: "https://github.com/janestreet/bonsai_web_components/issues" +dev-repo: "git+https://github.com/janestreet/bonsai_web_components.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai_web_components/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "am_running_how_js" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "bonsai" {= "v0.18~preview.130.55+197"} + "bonsai_concrete" {= "v0.18~preview.130.55+197"} + "bonsai_web" {= "v0.18~preview.130.55+197"} + "bonsai_web_test" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_extended" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "fuzzy_match" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "ocaml-embed-file" {= "v0.18~preview.130.55+197"} + "ordinal_abbreviation" {= "v0.18~preview.130.55+197"} + "patdiff" {= "v0.18~preview.130.55+197"} + "ppx_bench" {= "v0.18~preview.130.55+197"} + "ppx_css" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_html" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_module_timer" {= "v0.18~preview.130.55+197"} + "ppx_pattern_bind" {= "v0.18~preview.130.55+197"} + "ppx_typed_fields" {= "v0.18~preview.130.55+197"} + "profunctor" {= "v0.18~preview.130.55+197"} + "record_builder" {= "v0.18~preview.130.55+197"} + "sexp_grammar" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} + "toplayer" {= "v0.18~preview.130.55+197"} + "uri_parsing" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "gen_js_api" {= "1.1.2+ox"} + "js_of_ocaml" {= "6.0.1+ox"} + "js_of_ocaml-ppx" {= "6.0.1+ox"} + "re" {= "1.14.0+ox"} + "uri" {>= "3.0.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "Examples for bonsai_web, a library for building dynamic webapps, using Js_of_ocaml" +description: """ +A collection of bonsai_web examples. Bonsai is a library for building + reusable UI components inside an Incremental-style UI framework such as + Incr_dom or React. This repository contains its examples. +""" +url { + src: + "https://github.com/janestreet/bonsai_web_components/archive/d1399c4b3ff9ce4374794291b24f72f699ee12c0.tar.gz" + checksum: + "sha256=c3c64ccd308cde6d98d51786ff713f7c021a731e70846e7739f1085268af91eb" +} diff --git a/packages/bonsai_web_test/bonsai_web_test.v0.18~preview.130.36+326/opam b/packages/bonsai_web_test/bonsai_web_test.v0.18~preview.130.36+326/opam deleted file mode 100644 index e79abcc21e..0000000000 --- a/packages/bonsai_web_test/bonsai_web_test.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,64 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/bonsai_web_test" -bug-reports: "https://github.com/janestreet/bonsai_web_test/issues" -dev-repo: "git+https://github.com/janestreet/bonsai_web_test.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai_web_test/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "am_running_how_js" {= "v0.18~preview.130.36+326"} - "async_durable" {= "v0.18~preview.130.36+326"} - "async_js" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "babel" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "bonsai" {= "v0.18~preview.130.36+326"} - "bonsai_concrete" {= "v0.18~preview.130.36+326"} - "bonsai_test" {= "v0.18~preview.130.36+326"} - "bonsai_web" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "expectable" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "legacy_diffable" {= "v0.18~preview.130.36+326"} - "ocaml-embed-file" {= "v0.18~preview.130.36+326"} - "patdiff" {= "v0.18~preview.130.36+326"} - "polling_state_rpc" {= "v0.18~preview.130.36+326"} - "ppx_css" {= "v0.18~preview.130.36+326"} - "ppx_diff" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_html" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_pattern_bind" {= "v0.18~preview.130.36+326"} - "streamable" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} - "toplayer" {= "v0.18~preview.130.36+326"} - "versioned_polling_state_rpc" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "js_of_ocaml" {= "6.0.1+ox"} - "js_of_ocaml-ppx" {= "6.0.1+ox"} - "lambdasoup" {>= "0.6.3"} - "re" {>= "1.8.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "A library for testing dynamic bonsai webapps, using Js_of_ocaml" -description: """ -Bonsai is a library for building reusable UI components inside an - Incremental-style UI framework such as Incr_dom or React. This library provides - testing capabilities. -""" -url { - src: - "https://github.com/janestreet/bonsai_web_test/archive/fc0abed64ef80807a03c55292e93ba8cd0944e0a.tar.gz" - checksum: - "sha256=38ce67ecd64352c0fed9f96e3dc6bba32da8462bc1870f953f5f4e1b008b66f9" -} diff --git a/packages/bonsai_web_test/bonsai_web_test.v0.18~preview.130.55+197/opam b/packages/bonsai_web_test/bonsai_web_test.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..110a547c50 --- /dev/null +++ b/packages/bonsai_web_test/bonsai_web_test.v0.18~preview.130.55+197/opam @@ -0,0 +1,64 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/bonsai_web_test" +bug-reports: "https://github.com/janestreet/bonsai_web_test/issues" +dev-repo: "git+https://github.com/janestreet/bonsai_web_test.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/bonsai_web_test/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "am_running_how_js" {= "v0.18~preview.130.55+197"} + "async_durable" {= "v0.18~preview.130.55+197"} + "async_js" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "babel" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "bonsai" {= "v0.18~preview.130.55+197"} + "bonsai_concrete" {= "v0.18~preview.130.55+197"} + "bonsai_test" {= "v0.18~preview.130.55+197"} + "bonsai_web" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "expectable" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "legacy_diffable" {= "v0.18~preview.130.55+197"} + "ocaml-embed-file" {= "v0.18~preview.130.55+197"} + "patdiff" {= "v0.18~preview.130.55+197"} + "polling_state_rpc" {= "v0.18~preview.130.55+197"} + "ppx_css" {= "v0.18~preview.130.55+197"} + "ppx_diff" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_html" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_pattern_bind" {= "v0.18~preview.130.55+197"} + "streamable" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} + "toplayer" {= "v0.18~preview.130.55+197"} + "versioned_polling_state_rpc" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "js_of_ocaml" {= "6.0.1+ox"} + "js_of_ocaml-ppx" {= "6.0.1+ox"} + "lambdasoup" {>= "0.6.3"} + "re" {= "1.14.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "A library for testing dynamic bonsai webapps, using Js_of_ocaml" +description: """ +Bonsai is a library for building reusable UI components inside an + Incremental-style UI framework such as Incr_dom or React. This library provides + testing capabilities. +""" +url { + src: + "https://github.com/janestreet/bonsai_web_test/archive/edddf4747f9af0663cdcf3ac49ce8e4344d2ae45.tar.gz" + checksum: + "sha256=72a6c903eaea16cb70274386203b65d72000cc50820f67fc92db1227a8b35efa" +} diff --git a/packages/capitalization/capitalization.v0.18~preview.130.36+326/opam b/packages/capitalization/capitalization.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/capitalization/capitalization.v0.18~preview.130.36+326/opam rename to packages/capitalization/capitalization.v0.18~preview.130.55+197/opam index 0168f4be69..40c6fe0381 100644 --- a/packages/capitalization/capitalization.v0.18~preview.130.36+326/opam +++ b/packages/capitalization/capitalization.v0.18~preview.130.55+197/opam @@ -12,9 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: @@ -23,7 +24,7 @@ description: """ """ url { src: - "https://github.com/janestreet/capitalization/archive/906b854ef970a763930c1966902bc05a826cebb3.tar.gz" + "https://github.com/janestreet/capitalization/archive/6feac6c229c9e04a316a23cc012810c0175276a0.tar.gz" checksum: - "sha256=c2750bc78d8f6daae145099a34470f30b1ecb9e3810eddcd4a939220616304c6" + "sha256=b909d2f006aff8cc53fb2acde6f75682d6ff9c4f4a5e45f10462919aafc774b1" } diff --git a/packages/codicons/codicons.v0.18~preview.130.36+326/opam b/packages/codicons/codicons.v0.18~preview.130.55+197/opam similarity index 85% rename from packages/codicons/codicons.v0.18~preview.130.36+326/opam rename to packages/codicons/codicons.v0.18~preview.130.55+197/opam index d3b106366a..d5e09fb8e4 100644 --- a/packages/codicons/codicons.v0.18~preview.130.36+326/opam +++ b/packages/codicons/codicons.v0.18~preview.130.55+197/opam @@ -11,9 +11,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" diff --git a/packages/cohttp_async_websocket/cohttp_async_websocket.v0.18~preview.130.36+326/opam b/packages/cohttp_async_websocket/cohttp_async_websocket.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/cohttp_async_websocket/cohttp_async_websocket.v0.18~preview.130.36+326/opam rename to packages/cohttp_async_websocket/cohttp_async_websocket.v0.18~preview.130.55+197/opam index a418b7afec..96f04e534e 100644 --- a/packages/cohttp_async_websocket/cohttp_async_websocket.v0.18~preview.130.36+326/opam +++ b/packages/cohttp_async_websocket/cohttp_async_websocket.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_ssl" {= "v0.18~preview.130.36+326"} - "async_websocket" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_ssl" {= "v0.18~preview.130.55+197"} + "async_websocket" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "base64" {>= "3.4.0"} "cohttp" {>= "2.5.6"} "cohttp-async" {>= "2.5.7" & < "3.0.0" | >= "5.1.1" & < "6.0.0"} @@ -39,7 +39,7 @@ conjunction with async-js and google-chrome. """ url { src: - "https://github.com/janestreet/cohttp_async_websocket/archive/387c2b69b78d87fe8e9ef9e68adaf4a385e0446f.tar.gz" + "https://github.com/janestreet/cohttp_async_websocket/archive/a5d19b1901914858bdc84c0088b7acee9a7508ef.tar.gz" checksum: - "sha256=9492b342318a56db653b40ab53929ff2c834ff19cfeccedf8ab367e36ffe1653" + "sha256=85333b57c808f11c51df0bfa0ca91938c57e08a1fed49d6990a0db3b8709163c" } diff --git a/packages/cohttp_static_handler/cohttp_static_handler.v0.18~preview.130.36+326/opam b/packages/cohttp_static_handler/cohttp_static_handler.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/cohttp_static_handler/cohttp_static_handler.v0.18~preview.130.36+326/opam rename to packages/cohttp_static_handler/cohttp_static_handler.v0.18~preview.130.55+197/opam index fbfac34e5e..dd0d6a0956 100644 --- a/packages/cohttp_static_handler/cohttp_static_handler.v0.18~preview.130.36+326/opam +++ b/packages/cohttp_static_handler/cohttp_static_handler.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "cohttp" {>= "2.5.6"} "cohttp-async" {>= "2.5.7" & < "3.0.0" | >= "5.1.1" & < "6.0.0"} "dune" {>= "3.17.0"} @@ -30,7 +30,7 @@ Single page handlers are handlers that serve user specified JavaScript and css """ url { src: - "https://github.com/janestreet/cohttp_static_handler/archive/4b273496543d42591473c6db551b6837921b1e4c.tar.gz" + "https://github.com/janestreet/cohttp_static_handler/archive/38872c8d5084f1fc95e80e513943366ac6bc061a.tar.gz" checksum: - "sha256=a7281d3841f2819c16405682c5c1051d4f729812e00f7bdc108301450d7aec24" + "sha256=19b135ae85ef37a50eeb2ce423975184271f6f87476d48a1a7460a0716772267" } diff --git a/packages/command_nodejs/command_nodejs.v0.18~preview.130.36+326/opam b/packages/command_nodejs/command_nodejs.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/command_nodejs/command_nodejs.v0.18~preview.130.36+326/opam rename to packages/command_nodejs/command_nodejs.v0.18~preview.130.55+197/opam index 810b74c111..20d50dda29 100644 --- a/packages/command_nodejs/command_nodejs.v0.18~preview.130.36+326/opam +++ b/packages/command_nodejs/command_nodejs.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml" {= "6.0.1+ox"} "js_of_ocaml-ppx" {= "6.0.1+ox"} @@ -27,7 +27,7 @@ A library for running [Command.t]s in JS/Wasm executables running on Node. """ url { src: - "https://github.com/janestreet/command_nodejs/archive/8c11393862542e442ab44a81a224822deaff2af1.tar.gz" + "https://github.com/janestreet/command_nodejs/archive/738f4ee2501498be66e4e6cfbd92cba6b1cdaf9b.tar.gz" checksum: - "sha256=cf4cef26c0b0ca202866cc831de5564a0e564cbceca1e66a5e86543e7216544d" + "sha256=d6a3676f293911928e5d56d2fe36fde5b59ba85057d1c669622d6fa7373b1257" } diff --git a/packages/command_rpc/command_rpc.v0.18~preview.130.36+326/opam b/packages/command_rpc/command_rpc.v0.18~preview.130.55+197/opam similarity index 62% rename from packages/command_rpc/command_rpc.v0.18~preview.130.36+326/opam rename to packages/command_rpc/command_rpc.v0.18~preview.130.55+197/opam index 5e7e39b226..1bc5a6e0f0 100644 --- a/packages/command_rpc/command_rpc.v0.18~preview.130.36+326/opam +++ b/packages/command_rpc/command_rpc.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ description: """ """ url { src: - "https://github.com/janestreet/command_rpc/archive/eecdf87c954029d3dc2f2842f6cfb43b1502bcf4.tar.gz" + "https://github.com/janestreet/command_rpc/archive/04239488e80982d1730b5de8d3c3ec7e6d9af149.tar.gz" checksum: - "sha256=47de541f052b388adb28a3e12a68e531a3eb9a02e5116e7693966edfad01c7f5" + "sha256=7c4299f16f78c3308e4610793074d8e84e73dd51602b0d328b1f7f556af94eea" } diff --git a/packages/concurrent/.generated b/packages/concurrent/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/concurrent/concurrent.v0.18~preview.130.55+197/opam b/packages/concurrent/concurrent.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..681673ee68 --- /dev/null +++ b/packages/concurrent/concurrent.v0.18~preview.130.55+197/opam @@ -0,0 +1,37 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/concurrent" +bug-reports: "https://github.com/janestreet/concurrent/issues" +dev-repo: "git+https://github.com/janestreet/concurrent.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/concurrent/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.2.0"} + "async" {= "v0.18~preview.130.55+197"} + "await" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "portable" {= "v0.18~preview.130.55+197"} + "ppx_debug_assert" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "unique" {= "v0.18~preview.130.55+197"} + "base-threads" + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Abstract interface to concurrency in OxCaml" +description: """ +[Concurrent] is a library that provides an abstract interface to concurrency in + OxCaml, with multiple implementations for different concurrent schedulers. +""" +url { + src: + "https://github.com/janestreet/concurrent/archive/6d4e3360d9474cd9c612e8233a03c889e1123b5e.tar.gz" + checksum: + "sha256=cf5fbd84d959268656dc6b79eac86457f0b65d54f2f327a9ebfa43d7259e2289" +} diff --git a/packages/content_security_policy/content_security_policy.v0.18~preview.130.36+326/opam b/packages/content_security_policy/content_security_policy.v0.18~preview.130.55+197/opam similarity index 79% rename from packages/content_security_policy/content_security_policy.v0.18~preview.130.36+326/opam rename to packages/content_security_policy/content_security_policy.v0.18~preview.130.55+197/opam index 4944ed4751..b04dafcaf3 100644 --- a/packages/content_security_policy/content_security_policy.v0.18~preview.130.36+326/opam +++ b/packages/content_security_policy/content_security_policy.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "base64" {>= "3.4.0"} "cryptokit" {>= "1.16" & < "1.17"} "dune" {>= "3.17.0"} @@ -25,7 +25,7 @@ https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP """ url { src: - "https://github.com/janestreet/content_security_policy/archive/cb1184a2f67faf6797d30474749d41ff7ea6102a.tar.gz" + "https://github.com/janestreet/content_security_policy/archive/0831359d3a1680319f57abefc5221178e877b125.tar.gz" checksum: - "sha256=99d3b6f4343c99bcdecb03a40ce56f88fe0fb06f060f4b99054683984f1ee319" + "sha256=85fa8577a5aae3edeb282e683fc9e83ce23805c8136f2459ff2cd57233a34c20" } diff --git a/packages/core/core.v0.18~preview.130.36+326/opam b/packages/core/core.v0.18~preview.130.36+326/opam deleted file mode 100644 index 2a4582dfbe..0000000000 --- a/packages/core/core.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,59 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/core" -bug-reports: "https://github.com/janestreet/core/issues" -dev-repo: "git+https://github.com/janestreet/core.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/core/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "base_bigstring" {= "v0.18~preview.130.36+326"} - "base_quickcheck" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "fieldslib" {= "v0.18~preview.130.36+326"} - "jane-street-headers" {= "v0.18~preview.130.36+326"} - "jst-config" {= "v0.18~preview.130.36+326"} - "parsexp" {= "v0.18~preview.130.36+326"} - "portable" {= "v0.18~preview.130.36+326"} - "ppx_assert" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "ppx_diff" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_hash" {= "v0.18~preview.130.36+326"} - "ppx_inline_test" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "splittable_random" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "string_dict" {= "v0.18~preview.130.36+326"} - "time_now" {= "v0.18~preview.130.36+326"} - "typerep" {= "v0.18~preview.130.36+326"} - "univ_map" {= "v0.18~preview.130.36+326"} - "uopt" {= "v0.18~preview.130.36+326"} - "variantslib" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "Industrial strength alternative to OCaml's standard library" -description: """ -The Core suite of libraries is an industrial strength alternative to -OCaml's standard library that was developed by Jane Street, the -largest industrial user of OCaml. - -This is the system-independent part of Core. Unix-specific parts were moved to [core_unix]. -""" -url { - src: - "https://github.com/janestreet/core/archive/5225082fecf0d2a9c45e970a8573f0c864c3bdf6.tar.gz" - checksum: - "sha256=0e323cfaa454323c2a240c7297e62264f65c2b8191cc25cca6b8ecad59cfe9b9" -} diff --git a/packages/core/core.v0.18~preview.130.55+197/opam b/packages/core/core.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..7b5016ac8a --- /dev/null +++ b/packages/core/core.v0.18~preview.130.55+197/opam @@ -0,0 +1,59 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/core" +bug-reports: "https://github.com/janestreet/core/issues" +dev-repo: "git+https://github.com/janestreet/core.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/core/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "base_bigstring" {= "v0.18~preview.130.55+197"} + "base_quickcheck" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "fieldslib" {= "v0.18~preview.130.55+197"} + "jane-street-headers" {= "v0.18~preview.130.55+197"} + "jst-config" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "portable" {= "v0.18~preview.130.55+197"} + "ppx_assert" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "ppx_diff" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_hash" {= "v0.18~preview.130.55+197"} + "ppx_inline_test" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "splittable_random" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "string_dict" {= "v0.18~preview.130.55+197"} + "time_now" {= "v0.18~preview.130.55+197"} + "typerep" {= "v0.18~preview.130.55+197"} + "univ_map" {= "v0.18~preview.130.55+197"} + "uopt" {= "v0.18~preview.130.55+197"} + "variantslib" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Industrial strength alternative to OCaml's standard library" +description: """ +The Core suite of libraries is an industrial strength alternative to +OCaml's standard library that was developed by Jane Street, the +largest industrial user of OCaml. + +This is the system-independent part of Core. Unix-specific parts were moved to [core_unix]. +""" +url { + src: + "https://github.com/janestreet/core/archive/4ac588890f6f4b5d47035d3c4e0773e131fa8e00.tar.gz" + checksum: + "sha256=cc35033bcdeea71bb5a53f4ca6783fe440ee84c2d34ee665c777a14724d6b297" +} diff --git a/packages/core_bench/core_bench.v0.18~preview.130.36+326/opam b/packages/core_bench/core_bench.v0.18~preview.130.36+326/opam deleted file mode 100644 index e8d2639d41..0000000000 --- a/packages/core_bench/core_bench.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,42 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/core_bench" -bug-reports: "https://github.com/janestreet/core_bench/issues" -dev-repo: "git+https://github.com/janestreet/core_bench.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/core_bench/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "command_nodejs" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_extended" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "delimited_parsing" {= "v0.18~preview.130.36+326"} - "ppx_bench" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_fields_conv" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_let" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} - "time_now" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "js_of_ocaml-ppx" {= "6.0.1+ox"} - "re" {>= "1.8.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "Benchmarking library" -description: """ -""" -url { - src: - "https://github.com/janestreet/core_bench/archive/6913a82a7f0ab8d4c710a8107a73e023d0f714b0.tar.gz" - checksum: - "sha256=90abb676bb42a668c189cbb2467af30e27aeec4fed8e2fad0f289371c3e5b148" -} diff --git a/packages/core_bench/core_bench.v0.18~preview.130.55+197/opam b/packages/core_bench/core_bench.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..2b6e2b191e --- /dev/null +++ b/packages/core_bench/core_bench.v0.18~preview.130.55+197/opam @@ -0,0 +1,42 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/core_bench" +bug-reports: "https://github.com/janestreet/core_bench/issues" +dev-repo: "git+https://github.com/janestreet/core_bench.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/core_bench/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "command_nodejs" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_extended" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "delimited_parsing" {= "v0.18~preview.130.55+197"} + "ppx_bench" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_fields_conv" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} + "time_now" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "js_of_ocaml-ppx" {= "6.0.1+ox"} + "re" {= "1.14.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Benchmarking library" +description: """ +""" +url { + src: + "https://github.com/janestreet/core_bench/archive/188b102a81bfee9d2f2109ef40fcaca24fd19b16.tar.gz" + checksum: + "sha256=f5beac5203dc8ea0f8636be5d980df4f0b57435491a3a0baabf3395746c5dcf3" +} diff --git a/packages/core_extended/core_extended.v0.18~preview.130.36+326/opam b/packages/core_extended/core_extended.v0.18~preview.130.55+197/opam similarity index 54% rename from packages/core_extended/core_extended.v0.18~preview.130.36+326/opam rename to packages/core_extended/core_extended.v0.18~preview.130.55+197/opam index c1d231baf5..c3c367e2d9 100644 --- a/packages/core_extended/core_extended.v0.18~preview.130.36+326/opam +++ b/packages/core_extended/core_extended.v0.18~preview.130.55+197/opam @@ -12,17 +12,17 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "int_repr" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "record_builder" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "int_repr" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "record_builder" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: @@ -34,7 +34,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/core_extended/archive/ddc142eb26e294e00986f9ae426d8b5c4f4bfd89.tar.gz" + "https://github.com/janestreet/core_extended/archive/32a6bddbbc62006fc447e33c0d8fc6cfc546bfe3.tar.gz" checksum: - "sha256=8c7fb69dc6e5cf84dc21f65c83dd673a996347d1cd56d4eefd686805fed16aa0" + "sha256=8f3da27b0926de9cfb4f2b9bf58961f3f33fe457ae49332dbb8054e45b9b35cc" } diff --git a/packages/core_kernel/core_kernel.v0.18~preview.130.36+326/opam b/packages/core_kernel/core_kernel.v0.18~preview.130.55+197/opam similarity index 52% rename from packages/core_kernel/core_kernel.v0.18~preview.130.36+326/opam rename to packages/core_kernel/core_kernel.v0.18~preview.130.55+197/opam index 32dbdabfaf..715c0dadd9 100644 --- a/packages/core_kernel/core_kernel.v0.18~preview.130.36+326/opam +++ b/packages/core_kernel/core_kernel.v0.18~preview.130.55+197/opam @@ -12,17 +12,18 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "int_repr" {= "v0.18~preview.130.36+326"} - "parsexp" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "univ_map" {= "v0.18~preview.130.36+326"} - "uopt" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "int_repr" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "univ_map" {= "v0.18~preview.130.55+197"} + "uopt" {= "v0.18~preview.130.55+197"} "base-threads" "dune" {>= "3.17.0"} ] @@ -37,7 +38,7 @@ Core_kernel is the system-independent part of Core. """ url { src: - "https://github.com/janestreet/core_kernel/archive/cd51ad0073c753dfd6dc55fbea626685877e3d08.tar.gz" + "https://github.com/janestreet/core_kernel/archive/d534c22a517bcc93883163b5473ed315c4a2a4e3.tar.gz" checksum: - "sha256=a07fe674de76e36a508c18dfde2a7327a7a6e7cebbaed5d0274b5c21a9c25d97" + "sha256=c046834116c92b8ec2e687b67ccea0dd1a3b9da1610970faf9ade471045838c5" } diff --git a/packages/core_profiler/core_profiler.v0.18~preview.130.36+326/opam b/packages/core_profiler/core_profiler.v0.18~preview.130.55+197/opam similarity index 54% rename from packages/core_profiler/core_profiler.v0.18~preview.130.36+326/opam rename to packages/core_profiler/core_profiler.v0.18~preview.130.55+197/opam index 4ce678eb37..dff2516cdc 100644 --- a/packages/core_profiler/core_profiler.v0.18~preview.130.36+326/opam +++ b/packages/core_profiler/core_profiler.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "re2" {= "v0.18~preview.130.36+326"} - "shell" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} - "textutils_kernel" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "re2" {= "v0.18~preview.130.55+197"} + "shell" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} + "textutils_kernel" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -30,7 +30,7 @@ estimate various costs. """ url { src: - "https://github.com/janestreet/core_profiler/archive/c0f420b7de8250112562ca669fa702f342e1e4ba.tar.gz" + "https://github.com/janestreet/core_profiler/archive/ea9ac4143598e5e17ae3bb14e50ac795f17b0688.tar.gz" checksum: - "sha256=224370bbc0eb93e098e2b4089a31a079e32954b5098a0b175341f7ac796e2f41" + "sha256=1e292a11abb5b8f62419b123d23932b8c8e2f4fd4cd63204f109b74c4bcc82b3" } diff --git a/packages/core_unix/core_unix.v0.18~preview.130.36+326/opam b/packages/core_unix/core_unix.v0.18~preview.130.36+326/opam deleted file mode 100644 index 3ff182b912..0000000000 --- a/packages/core_unix/core_unix.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,42 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/core_unix" -bug-reports: "https://github.com/janestreet/core_unix/issues" -dev-repo: "git+https://github.com/janestreet/core_unix.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/core_unix/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "jane-street-headers" {= "v0.18~preview.130.36+326"} - "jst-config" {= "v0.18~preview.130.36+326"} - "ppx_diff" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "uopt" {= "v0.18~preview.130.36+326"} - "base-threads" - "dune" {>= "3.17.0"} - "spawn" {>= "v0.15"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "Unix-specific portions of Core" -description: """ -Unix-specific extensions to some of the modules defined in [core] and [core_kernel]. -""" -depexts: ["linux-headers"] {os-family = "alpine"} -url { - src: - "https://github.com/janestreet/core_unix/archive/b8c95bdada92e5265eab668fbf1a84f3ad4620c8.tar.gz" - checksum: - "sha256=4bd73fbe6ac2615c0229155198ee791d516e5ab2b7291793616244ea347a8357" -} diff --git a/packages/core_unix/core_unix.v0.18~preview.130.55+197/opam b/packages/core_unix/core_unix.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..8bcb3f6054 --- /dev/null +++ b/packages/core_unix/core_unix.v0.18~preview.130.55+197/opam @@ -0,0 +1,42 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/core_unix" +bug-reports: "https://github.com/janestreet/core_unix/issues" +dev-repo: "git+https://github.com/janestreet/core_unix.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/core_unix/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "jane-street-headers" {= "v0.18~preview.130.55+197"} + "jst-config" {= "v0.18~preview.130.55+197"} + "ppx_diff" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "uopt" {= "v0.18~preview.130.55+197"} + "base-threads" + "dune" {>= "3.17.0"} + "spawn" {= "v0.15.1+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Unix-specific portions of Core" +description: """ +Unix-specific extensions to some of the modules defined in [core] and [core_kernel]. +""" +depexts: ["linux-headers"] {os-family = "alpine"} +url { + src: + "https://github.com/janestreet/core_unix/archive/e8ca6adf4c171386a7de475a53981825819e15f6.tar.gz" + checksum: + "sha256=bd072aef9ae9cee6a77b287d6a8a6a3bd309a1ecd6e0e3b2d5756aaf797e228a" +} diff --git a/packages/csvfields/csvfields.v0.18~preview.130.36+326/opam b/packages/csvfields/csvfields.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/csvfields/csvfields.v0.18~preview.130.36+326/opam rename to packages/csvfields/csvfields.v0.18~preview.130.55+197/opam index 91ea358741..e069e1501c 100644 --- a/packages/csvfields/csvfields.v0.18~preview.130.36+326/opam +++ b/packages/csvfields/csvfields.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "num" ] @@ -24,7 +24,7 @@ description: """ """ url { src: - "https://github.com/janestreet/csvfields/archive/2fa06b67eb3b8d98824ce39290683fc67005b4ed.tar.gz" + "https://github.com/janestreet/csvfields/archive/0bb6894faa0999c4072085ba16796d018377bca5.tar.gz" checksum: - "sha256=a8e2fd7e49d097c051f07246a0d140927dfeb867457335203549f5d70dae0681" + "sha256=e233502a378f0be257011fdf5bfeb310c10b7ebd5d3ce44e58c519538ea80bba" } diff --git a/packages/ctypes-foreign/ctypes-foreign.0.23.0+ox/files/bigarray.patch b/packages/ctypes-foreign/ctypes-foreign.0.23.0+ox/files/bigarray.patch new file mode 100644 index 0000000000..0710f20254 --- /dev/null +++ b/packages/ctypes-foreign/ctypes-foreign.0.23.0+ox/files/bigarray.patch @@ -0,0 +1,11 @@ +--- a/src/ctypes/ctypes_memory.ml ++++ b/src/ctypes/ctypes_memory.ml +@@ -301,7 +301,7 @@ + ba_repr: f; + bigarray: b; + carray: c; +- dims: d > bigarray_class -> b -> (a, f) Bigarray.kind = ++ dims: d > bigarray_class -> b @ immutable -> (a, f) Bigarray.kind = + function + | Genarray -> Genarray.kind + | Array1 -> Array1.kind diff --git a/packages/ctypes-foreign/ctypes-foreign.0.23.0+ox/opam b/packages/ctypes-foreign/ctypes-foreign.0.23.0+ox/opam new file mode 100644 index 0000000000..4c074167fe --- /dev/null +++ b/packages/ctypes-foreign/ctypes-foreign.0.23.0+ox/opam @@ -0,0 +1,61 @@ +opam-version: "2.0" +version: "0.23.0+ox" +name: "ctypes-foreign" +synopsis: "Dynamic access to foreign C libraries using Ctypes" +description: """\ +This installs the `ctypes-foreign` interface which +uses `libffi` to provide dynamic access to foreign libraries.""" +maintainer: "Jeremy Yallop " +authors: "Jeremy Yallop" +license: "MIT" +tags: "org:mirage" +homepage: "https://github.com/yallop/ocaml-ctypes" +doc: "https://ocamllabs.github.io/ocaml-ctypes/" +bug-reports: "https://github.com/yallop/ocaml-ctypes/issues" +depends: [ + "dune" {>= "2.9"} + "ocaml" {>= "4.03.0"} + "integers" {with-test & >= "0.2.2"} + "ctypes" {= version & = "0.23.0+ox"} + "dune-configurator" + "conf-pkg-config" + "lwt" {with-test & >= "2.4.7"} + "ounit2" {with-test} + "conf-ncurses" {with-test} + "stdlib-shims" {with-test} + "conf-fts" {with-test & os != "win32"} + "conf-libffi" {>= "2.0.0"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] +] +dev-repo: "git+https://github.com/yallop/ocaml-ctypes.git" +url { + src: + "https://github.com/yallop/ocaml-ctypes/archive/refs/tags/0.23.0.tar.gz" + checksum: [ + "sha256=cae47d815b27dd4c824a007f1145856044542fe2588d23a443ef4eefec360bf1" + "md5=b1af973ec9cf7867a63714e92df82f2a" + ] +} +patches: ["bigarray.patch"] +extra-files: [ + [ + "bigarray.patch" + "sha256=c5d59b4624382cd61ff8da5c9ec3153ada0880efc43fbb2a20491984bd509a3e" + ] +] diff --git a/packages/ctypes/ctypes.0.23.0+ox/files/bigarray.patch b/packages/ctypes/ctypes.0.23.0+ox/files/bigarray.patch new file mode 100644 index 0000000000..0710f20254 --- /dev/null +++ b/packages/ctypes/ctypes.0.23.0+ox/files/bigarray.patch @@ -0,0 +1,11 @@ +--- a/src/ctypes/ctypes_memory.ml ++++ b/src/ctypes/ctypes_memory.ml +@@ -301,7 +301,7 @@ + ba_repr: f; + bigarray: b; + carray: c; +- dims: d > bigarray_class -> b -> (a, f) Bigarray.kind = ++ dims: d > bigarray_class -> b @ immutable -> (a, f) Bigarray.kind = + function + | Genarray -> Genarray.kind + | Array1 -> Array1.kind diff --git a/packages/ctypes/ctypes.0.23.0+ox/opam b/packages/ctypes/ctypes.0.23.0+ox/opam new file mode 100644 index 0000000000..ed1458625f --- /dev/null +++ b/packages/ctypes/ctypes.0.23.0+ox/opam @@ -0,0 +1,72 @@ +opam-version: "2.0" +version: "0.23.0+ox" +name: "ctypes" +synopsis: "Combinators for binding to C libraries without writing any C" +description: """\ +ctypes is a library for binding to C libraries using pure OCaml. The primary +aim is to make writing C extensions as straightforward as possible. +The core of ctypes is a set of combinators for describing the structure of C +types -- numeric types, arrays, pointers, structs, unions and functions. You +can use these combinators to describe the types of the functions that you want +to call, then bind directly to those functions -- all without writing or +generating any C! + +To install the optional `ctypes-foreign` interface (which uses `libffi` to +provide dynamic access to foreign libraries), you will need to also install +the `ctypes-foreign` package. + + opam install ctypes-foreign + +This will make the `ctypes-foreign` ocamlfind subpackage available.""" +maintainer: "Jeremy Yallop " +authors: "Jeremy Yallop" +license: "MIT" +tags: "org:mirage" +homepage: "https://github.com/yallop/ocaml-ctypes" +doc: "https://yallop.github.io/ocaml-ctypes/" +bug-reports: "https://github.com/yallop/ocaml-ctypes/issues" +depends: [ + "dune" {>= "2.9"} + "ocaml" {>= "4.03.0"} + "integers" + "dune-configurator" + "bigarray-compat" + "ounit2" {with-test} + "conf-fts" {with-test & os != "win32"} + "conf-pkg-config" {with-test} + "odoc" {with-doc} +] +conflicts: ["host-system-msvc"] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] +] +dev-repo: "git+https://github.com/yallop/ocaml-ctypes.git" +url { + src: + "https://github.com/yallop/ocaml-ctypes/archive/refs/tags/0.23.0.tar.gz" + checksum: [ + "sha256=cae47d815b27dd4c824a007f1145856044542fe2588d23a443ef4eefec360bf1" + "md5=b1af973ec9cf7867a63714e92df82f2a" + ] +} +x-maintenance-intent: ["(any).(any).(latest)"] +patches: ["bigarray.patch"] +extra-files: [ + [ + "bigarray.patch" + "sha256=c5d59b4624382cd61ff8da5c9ec3153ada0880efc43fbb2a20491984bd509a3e" + ] +] diff --git a/packages/dedent/dedent.v0.18~preview.130.36+326/opam b/packages/dedent/dedent.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/dedent/dedent.v0.18~preview.130.36+326/opam rename to packages/dedent/dedent.v0.18~preview.130.55+197/opam index 601c025071..ecd0130c94 100644 --- a/packages/dedent/dedent.v0.18~preview.130.36+326/opam +++ b/packages/dedent/dedent.v0.18~preview.130.55+197/opam @@ -11,9 +11,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ A library for improving redability of multi-line string constants in code. """ url { src: - "https://github.com/janestreet/dedent/archive/3c5453018559772f026e5f44bb47046439bc37b4.tar.gz" + "https://github.com/janestreet/dedent/archive/bb35c35319082ad858cf8db1ba41aed26ba48164.tar.gz" checksum: - "sha256=8a6513072174275fa4856efff6bbbe671e8f0b7d1cb53f0bd1a2cc94090c7239" + "sha256=9b0d7c5c92d18315272a2ca3807a08dbb4764f577678f2e0385e06d5540df6f9" } diff --git a/packages/delimited_parsing/delimited_parsing.v0.18~preview.130.36+326/opam b/packages/delimited_parsing/delimited_parsing.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/delimited_parsing/delimited_parsing.v0.18~preview.130.36+326/opam rename to packages/delimited_parsing/delimited_parsing.v0.18~preview.130.55+197/opam index 854b97211e..fd3432096e 100644 --- a/packages/delimited_parsing/delimited_parsing.v0.18~preview.130.36+326/opam +++ b/packages/delimited_parsing/delimited_parsing.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_extended" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_extended" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -27,7 +27,7 @@ records. """ url { src: - "https://github.com/janestreet/delimited_parsing/archive/3de29bbd066983a8019be95af3801bcd7b8980d2.tar.gz" + "https://github.com/janestreet/delimited_parsing/archive/52cf99befed0a310138c3e5d09da374237a45438.tar.gz" checksum: - "sha256=26111eb19a9b5cb3764f20e950bf8bad72e0a793a681f3b895816f058ef10413" + "sha256=77c31d99d657809e3220610329c4d1a4acc71b113246f409a0a027bab104a44f" } diff --git a/packages/dot-merlin-reader/dot-merlin-reader.5.2.1-502+ox/opam b/packages/dot-merlin-reader/dot-merlin-reader.5.2.1-502+ox/opam index 0ceca7fc2f..943d54bc04 100644 --- a/packages/dot-merlin-reader/dot-merlin-reader.5.2.1-502+ox/opam +++ b/packages/dot-merlin-reader/dot-merlin-reader.5.2.1-502+ox/opam @@ -24,8 +24,8 @@ dev-repo: "git+https://github.com/ocaml/merlin.git" x-commit-hash: "0eaccc1b8520d605b1e00685e1c3f8acb5da534c" url { src: - "https://github.com/oxcaml/merlin/archive/ea30d975583ede2946f0cc4950489a4f6fa33872.tar.gz" + "https://github.com/oxcaml/merlin/archive/b55ad32ea2e3367e5b78e0177bff5324a9c55517.tar.gz" checksum: - "sha256=aca9f110b46c51d71c440d87e3d0ffbfa6d71fccbc7f826ccbbcc896e84e8ffc" + "sha256=627bb415a97e93f8efe89156525f2283b24468b17b1d5268186c9eb888a89df5" } diff --git a/packages/dune-rpc/dune-rpc.3.20.2+ox/files/oxcaml-dune.patch b/packages/dune-rpc/dune-rpc.3.20.2+ox/files/oxcaml-dune.patch new file mode 100644 index 0000000000..43482816b6 --- /dev/null +++ b/packages/dune-rpc/dune-rpc.3.20.2+ox/files/oxcaml-dune.patch @@ -0,0 +1,39 @@ +diff --git a/otherlibs/stdune/src/queue.ml b/otherlibs/stdune/src/queue.ml +index 6a5fbb493..fb3db35a9 100644 +--- a/otherlibs/stdune/src/queue.ml ++++ b/otherlibs/stdune/src/queue.ml +@@ -1,10 +1,16 @@ + include Stdlib.Queue + ++let create () = create () + let push t x = add x t + let peek_exn t = peek t + let pop_exn t = pop t + let pop t = if is_empty t then None else Some (pop_exn t) + let peek t = if is_empty t then None else Some (peek t) ++let clear t = clear t ++let copy t = copy t ++let is_empty t = is_empty t ++let length t = length t + let iter t ~f = iter f t + let fold t ~f ~init = fold f init t ++let transfer t1 t2 = transfer t1 t2 + let to_list t = List.rev (fold t ~f:(fun acc a -> a :: acc) ~init:[]) +diff --git a/src/csexp_rpc/csexp_rpc.ml b/src/csexp_rpc/csexp_rpc.ml +index 0a5d308c1..1c1485d9c 100644 +--- a/src/csexp_rpc/csexp_rpc.ml ++++ b/src/csexp_rpc/csexp_rpc.ml +@@ -236,10 +236,10 @@ module Session = struct + + external send : Unix.file_descr -> Bytes.t -> int -> int -> int = "dune_send" + +- let write = ++ let write t b = + match Platform.OS.value with +- | Linux -> send +- | _ -> Unix.single_write ++ | Linux -> send t b ++ | _ -> Unix.single_write t b + ;; + + let rec csexp_write_loop fd out_buf token = diff --git a/packages/dune-rpc/dune-rpc.3.20.2+ox/opam b/packages/dune-rpc/dune-rpc.3.20.2+ox/opam new file mode 100644 index 0000000000..a2b8ebfe0e --- /dev/null +++ b/packages/dune-rpc/dune-rpc.3.20.2+ox/opam @@ -0,0 +1,46 @@ +opam-version: "2.0" +version: "3.20.2+ox" +name: "dune-rpc" +synopsis: "Communicate with dune using rpc" +description: "Library to connect and control a running dune instance" +maintainer: "Jane Street Group, LLC " +authors: "Jane Street Group, LLC " +license: "MIT" +homepage: "https://github.com/ocaml/dune" +doc: "https://dune.readthedocs.io/" +bug-reports: "https://github.com/ocaml/dune/issues" +depends: [ + "dune" {>= "3.20"} + "ocamlc-loc" {= "3.20.2+ox"} + "csexp" + "ordering" + "dyn" + "xdg" + "stdune" {= version} + "pp" {>= "1.1.0"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + ["rm" "-rf" "vendor/csexp"] + ["rm" "-rf" "vendor/pp"] + ["dune" "build" "-p" name "-j" jobs "@install" "@doc" {with-doc}] +] +dev-repo: "git+https://github.com/ocaml/dune.git" +url { + src: + "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + checksum: [ + "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + ] +} +x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-maintenance-intent: ["(latest)"] +patches: ["oxcaml-dune.patch"] +extra-files: [ + [ + "oxcaml-dune.patch" + "sha256=fe1d266b70e4f7bc884eda337f68c6a539bebc4e9b3e2ed0fdf7293797fc3f33" + ] +] diff --git a/packages/dune/dune.3.20.2+ox/files/oxcaml-dune.patch b/packages/dune/dune.3.20.2+ox/files/oxcaml-dune.patch new file mode 100644 index 0000000000..43482816b6 --- /dev/null +++ b/packages/dune/dune.3.20.2+ox/files/oxcaml-dune.patch @@ -0,0 +1,39 @@ +diff --git a/otherlibs/stdune/src/queue.ml b/otherlibs/stdune/src/queue.ml +index 6a5fbb493..fb3db35a9 100644 +--- a/otherlibs/stdune/src/queue.ml ++++ b/otherlibs/stdune/src/queue.ml +@@ -1,10 +1,16 @@ + include Stdlib.Queue + ++let create () = create () + let push t x = add x t + let peek_exn t = peek t + let pop_exn t = pop t + let pop t = if is_empty t then None else Some (pop_exn t) + let peek t = if is_empty t then None else Some (peek t) ++let clear t = clear t ++let copy t = copy t ++let is_empty t = is_empty t ++let length t = length t + let iter t ~f = iter f t + let fold t ~f ~init = fold f init t ++let transfer t1 t2 = transfer t1 t2 + let to_list t = List.rev (fold t ~f:(fun acc a -> a :: acc) ~init:[]) +diff --git a/src/csexp_rpc/csexp_rpc.ml b/src/csexp_rpc/csexp_rpc.ml +index 0a5d308c1..1c1485d9c 100644 +--- a/src/csexp_rpc/csexp_rpc.ml ++++ b/src/csexp_rpc/csexp_rpc.ml +@@ -236,10 +236,10 @@ module Session = struct + + external send : Unix.file_descr -> Bytes.t -> int -> int -> int = "dune_send" + +- let write = ++ let write t b = + match Platform.OS.value with +- | Linux -> send +- | _ -> Unix.single_write ++ | Linux -> send t b ++ | _ -> Unix.single_write t b + ;; + + let rec csexp_write_loop fd out_buf token = diff --git a/packages/dune/dune.3.20.2+ox/opam b/packages/dune/dune.3.20.2+ox/opam new file mode 100644 index 0000000000..5bf5135a59 --- /dev/null +++ b/packages/dune/dune.3.20.2+ox/opam @@ -0,0 +1,88 @@ +opam-version: "2.0" +version: "3.20.2+ox" +name: "dune" +synopsis: "Fast, portable, and opinionated build system" +description: """\ +Dune is a build system that was designed to simplify the release of +Jane Street packages. It reads metadata from "dune" files following a +very simple s-expression syntax. + +Dune is fast, has very low-overhead, and supports parallel builds on +all platforms. It has no system dependencies; all you need to build +dune or packages using dune is OCaml. You don't need make or bash +as long as the packages themselves don't use bash explicitly. + +Dune is composable; supporting multi-package development by simply +dropping multiple repositories into the same directory. + +Dune also supports multi-context builds, such as building against +several opam roots/switches simultaneously. This helps maintaining +packages across several versions of OCaml and gives cross-compilation +for free.""" +maintainer: "Jane Street Group, LLC " +authors: "Jane Street Group, LLC " +license: "MIT" +homepage: "https://github.com/ocaml/dune" +doc: "https://dune.readthedocs.io/" +bug-reports: "https://github.com/ocaml/dune/issues" +depends: [ + "ocaml" {>= "4.08"} + "base-unix" + "base-threads" + "lwt" {with-dev-setup & os != "win32"} + "cinaps" {with-dev-setup} + "csexp" {with-dev-setup & >= "1.3.0"} + "js_of_ocaml" {with-dev-setup & >= "6.1.0" & os != "win32"} + "js_of_ocaml-compiler" {with-dev-setup & >= "6.1.0" & os != "win32"} + "mdx" {with-dev-setup & >= "2.3.0" & os != "win32"} + "menhir" {with-dev-setup & os != "win32"} + "ocamlfind" {with-dev-setup & os != "win32"} + "odoc" {with-dev-setup & >= "2.4.0" & os != "win32"} + "ppx_expect" {with-dev-setup & >= "v0.17" & os != "win32"} + "spawn" {with-dev-setup} + "ppx_inline_test" {with-dev-setup & os != "win32"} + "ppxlib" {with-dev-setup & >= "0.35.0" & os != "win32"} + "ctypes" {with-dev-setup & os != "win32"} + "utop" {with-dev-setup & >= "2.6.0" & os != "win32"} + "melange" {with-dev-setup & >= "5.1.0-51" & os != "win32"} +] +conflicts: [ + "merlin" {< "3.4.0"} + "ocaml-lsp-server" {< "1.3.0"} + "dune-configurator" {< "2.3.0"} + "odoc" {< "2.0.1"} + "dune-release" {< "2.0.0"} + "js_of_ocaml-compiler" {< "3.6.0"} + "jbuilder" {= "transition"} +] +build: [ + ["ocaml" "boot/bootstrap.ml" "-j" jobs] + [ + "./_boot/dune.exe" + "build" + "dune.install" + "--release" + "--profile" + "dune-bootstrap" + "-j" + jobs + ] +] +dev-repo: "git+https://github.com/ocaml/dune.git" +url { + src: + "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + checksum: [ + "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + ] +} +x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-maintenance-intent: ["(latest)"] +patches: ["oxcaml-dune.patch"] +extra-files: [ + [ + "oxcaml-dune.patch" + "sha256=fe1d266b70e4f7bc884eda337f68c6a539bebc4e9b3e2ed0fdf7293797fc3f33" + ] +] diff --git a/packages/dyn/dyn.3.20.2+ox/files/oxcaml-dune.patch b/packages/dyn/dyn.3.20.2+ox/files/oxcaml-dune.patch new file mode 100644 index 0000000000..43482816b6 --- /dev/null +++ b/packages/dyn/dyn.3.20.2+ox/files/oxcaml-dune.patch @@ -0,0 +1,39 @@ +diff --git a/otherlibs/stdune/src/queue.ml b/otherlibs/stdune/src/queue.ml +index 6a5fbb493..fb3db35a9 100644 +--- a/otherlibs/stdune/src/queue.ml ++++ b/otherlibs/stdune/src/queue.ml +@@ -1,10 +1,16 @@ + include Stdlib.Queue + ++let create () = create () + let push t x = add x t + let peek_exn t = peek t + let pop_exn t = pop t + let pop t = if is_empty t then None else Some (pop_exn t) + let peek t = if is_empty t then None else Some (peek t) ++let clear t = clear t ++let copy t = copy t ++let is_empty t = is_empty t ++let length t = length t + let iter t ~f = iter f t + let fold t ~f ~init = fold f init t ++let transfer t1 t2 = transfer t1 t2 + let to_list t = List.rev (fold t ~f:(fun acc a -> a :: acc) ~init:[]) +diff --git a/src/csexp_rpc/csexp_rpc.ml b/src/csexp_rpc/csexp_rpc.ml +index 0a5d308c1..1c1485d9c 100644 +--- a/src/csexp_rpc/csexp_rpc.ml ++++ b/src/csexp_rpc/csexp_rpc.ml +@@ -236,10 +236,10 @@ module Session = struct + + external send : Unix.file_descr -> Bytes.t -> int -> int -> int = "dune_send" + +- let write = ++ let write t b = + match Platform.OS.value with +- | Linux -> send +- | _ -> Unix.single_write ++ | Linux -> send t b ++ | _ -> Unix.single_write t b + ;; + + let rec csexp_write_loop fd out_buf token = diff --git a/packages/dyn/dyn.3.20.2+ox/opam b/packages/dyn/dyn.3.20.2+ox/opam new file mode 100644 index 0000000000..8c41b4d304 --- /dev/null +++ b/packages/dyn/dyn.3.20.2+ox/opam @@ -0,0 +1,42 @@ +opam-version: "2.0" +version: "3.20.2+ox" +name: "dyn" +synopsis: "Dynamic type" +description: "Dynamic type" +maintainer: "Jane Street Group, LLC " +authors: "Jane Street Group, LLC " +license: "MIT" +homepage: "https://github.com/ocaml/dune" +doc: "https://dune.readthedocs.io/" +bug-reports: "https://github.com/ocaml/dune/issues" +depends: [ + "dune" {>= "3.20"} + "ocaml" {>= "4.08.0"} + "ordering" {= "3.20.2+ox"} + "pp" {>= "1.1.0"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + ["rm" "-rf" "vendor/csexp"] + ["rm" "-rf" "vendor/pp"] + ["dune" "build" "-p" name "-j" jobs "@install" "@doc" {with-doc}] +] +dev-repo: "git+https://github.com/ocaml/dune.git" +url { + src: + "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + checksum: [ + "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + ] +} +x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-maintenance-intent: ["(latest)"] +patches: ["oxcaml-dune.patch"] +extra-files: [ + [ + "oxcaml-dune.patch" + "sha256=fe1d266b70e4f7bc884eda337f68c6a539bebc4e9b3e2ed0fdf7293797fc3f33" + ] +] diff --git a/packages/ecaml/ecaml.v0.18~preview.130.36+326/opam b/packages/ecaml/ecaml.v0.18~preview.130.36+326/opam deleted file mode 100644 index bf7006dce1..0000000000 --- a/packages/ecaml/ecaml.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,41 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/ecaml" -bug-reports: "https://github.com/janestreet/ecaml/issues" -dev-repo: "git+https://github.com/janestreet/ecaml.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ecaml/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "file_path" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexp_pretty" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "uutf" {= "1.0.3+ox"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "Library for writing Emacs plugin in OCaml" -description: """ -Ecaml is a library for writing Emacs plugins in OCaml. It uses Emacs -25 support for plugins to load native OCaml compiled code. -""" -url { - src: - "https://github.com/janestreet/ecaml/archive/da03db889c725ef3dcf229f5d8c5bd4e302555d3.tar.gz" - checksum: - "sha256=b42694664955e61e57a7384730a5a50a245106a6f7e9717b2c8e4aefca1c2a68" -} diff --git a/packages/ecaml/ecaml.v0.18~preview.130.55+197/opam b/packages/ecaml/ecaml.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..5e2280a6e8 --- /dev/null +++ b/packages/ecaml/ecaml.v0.18~preview.130.55+197/opam @@ -0,0 +1,42 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ecaml" +bug-reports: "https://github.com/janestreet/ecaml/issues" +dev-repo: "git+https://github.com/janestreet/ecaml.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ecaml/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "async" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "file_path" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexp_pretty" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "memtrace" {>= "0.2.1.2"} + "uutf" {= "1.0.3+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Library for writing Emacs plugin in OCaml" +description: """ +Ecaml is a library for writing Emacs plugins in OCaml. It uses Emacs +25 support for plugins to load native OCaml compiled code. +""" +url { + src: + "https://github.com/janestreet/ecaml/archive/3753b3ec1324a67dcee82091f1319b69751800c6.tar.gz" + checksum: + "sha256=c5b0cb94ccd53ebc81b04b9f36cb2b003c36d2755823074a040ab76c8cf69890" +} diff --git a/packages/email_message/email_message.v0.18~preview.130.36+326/opam b/packages/email_message/email_message.v0.18~preview.130.55+197/opam similarity index 61% rename from packages/email_message/email_message.v0.18~preview.130.36+326/opam rename to packages/email_message/email_message.v0.18~preview.130.55+197/opam index 093eac6340..c36795b123 100644 --- a/packages/email_message/email_message.v0.18~preview.130.36+326/opam +++ b/packages/email_message/email_message.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "re2" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "re2" {= "v0.18~preview.130.55+197"} "angstrom" {>= "0.15.0"} "base64" {>= "3.4.0"} "cryptokit" {>= "1.16" & < "1.17"} @@ -30,7 +30,7 @@ description: """ """ url { src: - "https://github.com/janestreet/email_message/archive/ec50344ff72cd7e7c4469f05cc9fba16becdb637.tar.gz" + "https://github.com/janestreet/email_message/archive/77635fe0e4f0d7846b303d86de3d402233f2eaac.tar.gz" checksum: - "sha256=b29cd88b1dba98257bdfd11b9f0f0f350eccde76aafee5c5fe3681da431cfc5f" + "sha256=dc4a4010ed577ff77a7b38bb85cbc2c2fd402e0ab6fe3fe9cde83e4989f5ad42" } diff --git a/packages/env_config/env_config.v0.18~preview.130.36+326/opam b/packages/env_config/env_config.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/env_config/env_config.v0.18~preview.130.36+326/opam rename to packages/env_config/env_config.v0.18~preview.130.55+197/opam index 8ce4ff000a..d7a8e12dc4 100644 --- a/packages/env_config/env_config.v0.18~preview.130.36+326/opam +++ b/packages/env_config/env_config.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_log" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_log" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -31,7 +31,7 @@ in a library. """ url { src: - "https://github.com/janestreet/env_config/archive/4d00df8e4190e1988ff972829ce06b4c09ddac46.tar.gz" + "https://github.com/janestreet/env_config/archive/48d17bd6a0bd5256be69b4efc6ad37a2abe813a5.tar.gz" checksum: - "sha256=731e847989e7e43b8a437252611ad1477ecf351281f66213951aa518bbe53704" + "sha256=7bb5e27d6c2cc8a162b20c50bf324e2dd029aad6834618a7aade1e9f3e9a63f0" } diff --git a/packages/expect_test_helpers_async/expect_test_helpers_async.v0.18~preview.130.36+326/opam b/packages/expect_test_helpers_async/expect_test_helpers_async.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/expect_test_helpers_async/expect_test_helpers_async.v0.18~preview.130.36+326/opam rename to packages/expect_test_helpers_async/expect_test_helpers_async.v0.18~preview.130.55+197/opam index 57e52145dc..f571b514d2 100644 --- a/packages/expect_test_helpers_async/expect_test_helpers_async.v0.18~preview.130.36+326/opam +++ b/packages/expect_test_helpers_async/expect_test_helpers_async.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexp_pretty" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexp_pretty" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -30,7 +30,7 @@ look at expect_test_helpers_core. """ url { src: - "https://github.com/janestreet/expect_test_helpers_async/archive/eb0b35a6e659e096fe0dd3bc51a6adce91d3da85.tar.gz" + "https://github.com/janestreet/expect_test_helpers_async/archive/d09bcfe15c0d06f8d290c5ebfcb4ff967b4edfa3.tar.gz" checksum: - "sha256=da653d48dd0cf259bae038443857fb316f4d8be2aa5e76959d54bc1b4cdc7c08" + "sha256=4c3bac7fa3574f9d2dc5d6e06a5a9d389e813e0f17ae97bf4f50bf4281bd6e56" } diff --git a/packages/expect_test_helpers_core/expect_test_helpers_core.v0.18~preview.130.36+326/opam b/packages/expect_test_helpers_core/expect_test_helpers_core.v0.18~preview.130.55+197/opam similarity index 64% rename from packages/expect_test_helpers_core/expect_test_helpers_core.v0.18~preview.130.36+326/opam rename to packages/expect_test_helpers_core/expect_test_helpers_core.v0.18~preview.130.55+197/opam index 57eaa3ca5e..ce351c9516 100644 --- a/packages/expect_test_helpers_core/expect_test_helpers_core.v0.18~preview.130.36+326/opam +++ b/packages/expect_test_helpers_core/expect_test_helpers_core.v0.18~preview.130.55+197/opam @@ -12,14 +12,15 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "base_quickcheck" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexp_pretty" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "base_quickcheck" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "portable" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexp_pretty" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Helpers for writing expectation tests" @@ -31,7 +32,7 @@ look at expect_test_helpers_async. """ url { src: - "https://github.com/janestreet/expect_test_helpers_core/archive/908d330e3a39b8af14e5eaec40e91c668a1ec7a5.tar.gz" + "https://github.com/janestreet/expect_test_helpers_core/archive/63fe7c1169cbbd3dc4ad0a7d95a6114a6d8889ae.tar.gz" checksum: - "sha256=8388a91966fe82624ea421077c5ccbf72b26a66ccf438c1c7e1f26cd5fd11c79" + "sha256=011df05014c56fa8da35a19f8daa8e350f7b37087496aa3741dc0245a3f2f4a7" } diff --git a/packages/expectable/expectable.v0.18~preview.130.36+326/opam b/packages/expectable/expectable.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/expectable/expectable.v0.18~preview.130.36+326/opam rename to packages/expectable/expectable.v0.18~preview.130.55+197/opam index a9aa60aeab..b78e2cc257 100644 --- a/packages/expectable/expectable.v0.18~preview.130.36+326/opam +++ b/packages/expectable/expectable.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "4.14.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ description: """ """ url { src: - "https://github.com/janestreet/expectable/archive/8f8f7bb1dfb76046868825bbf3922c2a1245c75a.tar.gz" + "https://github.com/janestreet/expectable/archive/a3324954705a7a7d2227205031ba34455b3b4ac6.tar.gz" checksum: - "sha256=8339cf74cb5730f658b79f5ad4f5219fbb873f1b8e784c362b0d291c43f765d4" + "sha256=3697fdcab57a663e1adf311c3f0d573e9cbc49d24829b622f9cbf95b46fb1510" } diff --git a/packages/expectree/expectree.v0.18~preview.130.36+326/opam b/packages/expectree/expectree.v0.18~preview.130.55+197/opam similarity index 72% rename from packages/expectree/expectree.v0.18~preview.130.36+326/opam rename to packages/expectree/expectree.v0.18~preview.130.55+197/opam index 37e02c6637..b99ba7c852 100644 --- a/packages/expectree/expectree.v0.18~preview.130.36+326/opam +++ b/packages/expectree/expectree.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ Inspired by the unix `tree` utility, expectree is a a general purpose tree print """ url { src: - "https://github.com/janestreet/expectree/archive/f2983c6e727e1ed04a9bd878a35aec9aedd10180.tar.gz" + "https://github.com/janestreet/expectree/archive/ad6c03794d9988e59fa1f6c04fc1e2f6f7942c4d.tar.gz" checksum: - "sha256=902732eeffb19c5947887753576e9592d63fd9db41995f3040145ad68bac5e43" + "sha256=54c8b876ba9a7e011e63bcee57d807b38014734d11b029f3ebcdbe8bc3cf2145" } diff --git a/packages/fieldslib/fieldslib.v0.18~preview.130.36+326/opam b/packages/fieldslib/fieldslib.v0.18~preview.130.55+197/opam similarity index 81% rename from packages/fieldslib/fieldslib.v0.18~preview.130.36+326/opam rename to packages/fieldslib/fieldslib.v0.18~preview.130.55+197/opam index 6fe72c01e3..453d0e23c5 100644 --- a/packages/fieldslib/fieldslib.v0.18~preview.130.36+326/opam +++ b/packages/fieldslib/fieldslib.v0.18~preview.130.55+197/opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/fieldslib/archive/a0dd79346f825715111fafe8aa9cd59df6b04d72.tar.gz" + "https://github.com/janestreet/fieldslib/archive/4713dc70ff453f632d0ad87e957d955e97e3ad68.tar.gz" checksum: - "sha256=ecc25531ad646864495040517e78ad72c173f9caab5ffe06a0f88783184979e7" + "sha256=be385e06deec5c539298f4b5c33385a60ffb85b598790996b534be51457d7f7c" } diff --git a/packages/file_path/file_path.v0.18~preview.130.36+326/opam b/packages/file_path/file_path.v0.18~preview.130.55+197/opam similarity index 52% rename from packages/file_path/file_path.v0.18~preview.130.36+326/opam rename to packages/file_path/file_path.v0.18~preview.130.55+197/opam index 17c3fd11d9..22d5be4183 100644 --- a/packages/file_path/file_path.v0.18~preview.130.36+326/opam +++ b/packages/file_path/file_path.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_async" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_async" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -29,7 +29,7 @@ A library for typed manipulation of UNIX-style file paths. """ url { src: - "https://github.com/janestreet/file_path/archive/ded1f179af34dad752f29b1e693a58e605c8fcf6.tar.gz" + "https://github.com/janestreet/file_path/archive/2a222889cea98598e0ef1153f044215fc7d594d7.tar.gz" checksum: - "sha256=57bc5db6b2e4fa9b9809acc4844db05b2a1afd38c60018b8ece27e6161e0ae42" + "sha256=e3570af921daa903a5e90830785db94f41e298ea6c2b8529a70d6a9418f1f0f6" } diff --git a/packages/filesystem/filesystem.v0.18~preview.130.36+326/opam b/packages/filesystem/filesystem.v0.18~preview.130.55+197/opam similarity index 58% rename from packages/filesystem/filesystem.v0.18~preview.130.36+326/opam rename to packages/filesystem/filesystem.v0.18~preview.130.55+197/opam index 4ad35edf90..47ade21b49 100644 --- a/packages/filesystem/filesystem.v0.18~preview.130.36+326/opam +++ b/packages/filesystem/filesystem.v0.18~preview.130.55+197/opam @@ -12,12 +12,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "file_path" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_log" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "file_path" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -27,7 +28,7 @@ A library for filesystem operations with the file_path library. """ url { src: - "https://github.com/janestreet/filesystem/archive/35bd90a9e33f53b7c8df75d3f783a13e4304f0c9.tar.gz" + "https://github.com/janestreet/filesystem/archive/b41367601f40b1ac848f68e6a0fbf2af9700678d.tar.gz" checksum: - "sha256=96e7bf7e7b2d716009af2f249189939d3b57a5c930703236e614a87fbd39e4fc" + "sha256=75c00de33e070ed119501c2132c75cedfefed94f3767a276fdb590a3a203b82d" } diff --git a/packages/flexible_sexp/.generated b/packages/flexible_sexp/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/flexible_sexp/flexible_sexp.v0.18~preview.130.55+197/opam b/packages/flexible_sexp/flexible_sexp.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..6568a6e216 --- /dev/null +++ b/packages/flexible_sexp/flexible_sexp.v0.18~preview.130.55+197/opam @@ -0,0 +1,44 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/flexible_sexp" +bug-reports: "https://github.com/janestreet/flexible_sexp/issues" +dev-repo: "git+https://github.com/janestreet/flexible_sexp.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/flexible_sexp/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "basement" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "string_dict" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "A library for creating stable sexp serialization with forward compatibility." +description: """ +flexible_sexp is a library that creates a stable sexp serialisation of types, +giving them space to "grow" without breaking stability. "Growing" refers to +adding new fields to record types, or adding new constructors to variant types. + +Using flexible_sexp one can achieve the following: + +- Old code will be able to deserialise new sexps that contain + fields/constructors that are not yet known. + +- New code will be able to deserialise old sexps that may be missing fields. + +- All code will be able to roundtrip all sexps (i.e. old code will not silently + drop future fields/constructors that are not yet known). +""" +url { + src: + "https://github.com/janestreet/flexible_sexp/archive/cc080de6a380ffa09e5e41bd4c9a97e1b8ae756d.tar.gz" + checksum: + "sha256=21d942775c9476affda708cc266a48f9efe33fe12964709a8a78f781c2070d58" +} diff --git a/packages/float_array/float_array.v0.18~preview.130.36+326/opam b/packages/float_array/float_array.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/float_array/float_array.v0.18~preview.130.36+326/opam rename to packages/float_array/float_array.v0.18~preview.130.55+197/opam index 17646d283a..febd53cd4d 100644 --- a/packages/float_array/float_array.v0.18~preview.130.36+326/opam +++ b/packages/float_array/float_array.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.2.0"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ Mutable vector of floats with O(1) get and set operations. """ url { src: - "https://github.com/janestreet/float_array/archive/2b3248d014946216daefdc0a5319acd3aff3ecbc.tar.gz" + "https://github.com/janestreet/float_array/archive/d25cd8417532711be1b5400452501725eb4ea20d.tar.gz" checksum: - "sha256=f255d7edb12429a56c695d63e0a7a3a249a050384d22c5169703c68e8fc59c6f" + "sha256=ea38401bac2992fd3acbbcb2664f0c455c25c96bfabab6d6fdfde14502155eed" } diff --git a/packages/font_awesome_icons/font_awesome_icons.v0.18~preview.130.36+326/opam b/packages/font_awesome_icons/font_awesome_icons.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/font_awesome_icons/font_awesome_icons.v0.18~preview.130.36+326/opam rename to packages/font_awesome_icons/font_awesome_icons.v0.18~preview.130.55+197/opam index 8dff18356e..c4c8a37314 100644 --- a/packages/font_awesome_icons/font_awesome_icons.v0.18~preview.130.36+326/opam +++ b/packages/font_awesome_icons/font_awesome_icons.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ This library contains the free brands, regular and solid SVG icons from Font-Awe """ url { src: - "https://github.com/janestreet/font_awesome_icons/archive/bcc3e2bad1edfa3c865578fcbcfb221ef738f10d.tar.gz" + "https://github.com/janestreet/font_awesome_icons/archive/baf4982bd5fe9437904f52fae9dbb2a6c04896d4.tar.gz" checksum: - "sha256=b94aa75cdb46ecf111092e778ffc2b73632c6d0549d53ce2a9d4ad8be252d0d4" + "sha256=5b8ff1ee630179c2a0ec27541572437d12ea7facbbd2510d294fa869a4edfcbc" } diff --git a/packages/fuzzy_match/fuzzy_match.v0.18~preview.130.36+326/opam b/packages/fuzzy_match/fuzzy_match.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/fuzzy_match/fuzzy_match.v0.18~preview.130.36+326/opam rename to packages/fuzzy_match/fuzzy_match.v0.18~preview.130.55+197/opam index 4735d5a4cf..88120a85c4 100644 --- a/packages/fuzzy_match/fuzzy_match.v0.18~preview.130.36+326/opam +++ b/packages/fuzzy_match/fuzzy_match.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -23,7 +23,7 @@ Libraries for fuzzy string matching """ url { src: - "https://github.com/janestreet/fuzzy_match/archive/fcb506663e866b956902915b32654d74c0bfebe3.tar.gz" + "https://github.com/janestreet/fuzzy_match/archive/cf26c9a408a90a7fd0fee45a5278495296798f8a.tar.gz" checksum: - "sha256=cc38c56200fc8c506c2ad5b07ff24c4e84c60ff622f962eed03ef27cce1ae502" + "sha256=9281660f400580561bbb2f768f6efbfdf0bd4a8b2bbe6a4f043732a2f44e8ee3" } diff --git a/packages/fzf/fzf.v0.18~preview.130.36+326/opam b/packages/fzf/fzf.v0.18~preview.130.55+197/opam similarity index 62% rename from packages/fzf/fzf.v0.18~preview.130.36+326/opam rename to packages/fzf/fzf.v0.18~preview.130.55+197/opam index 2a6c2b0a9d..423a25bb50 100644 --- a/packages/fzf/fzf.v0.18~preview.130.36+326/opam +++ b/packages/fzf/fzf.v0.18~preview.130.55+197/opam @@ -11,11 +11,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ A library for running the fzf command line fuzzy matcher """ url { src: - "https://github.com/janestreet/fzf/archive/63687fd21af5a3758bd0759ede4f56f1ff0b7ddf.tar.gz" + "https://github.com/janestreet/fzf/archive/0439828d50e012e3893ace047554bccee9ca4342.tar.gz" checksum: - "sha256=d06dfb35fff6c40960286b00dd8831672f256972cc154e29c1e6915d4b5a0584" + "sha256=b31d35d7600d77dd25b8518f25e5eede7916faca8f6ac304ff9e9177108d8d22" } diff --git a/packages/gen_js_api/gen_js_api.1.1.2+ox/files/gen-js-api-ast.patch b/packages/gen_js_api/gen_js_api.1.1.2+ox/files/gen-js-api-ast.patch new file mode 100644 index 0000000000..8f402a2b2f --- /dev/null +++ b/packages/gen_js_api/gen_js_api.1.1.2+ox/files/gen-js-api-ast.patch @@ -0,0 +1,14 @@ +--- a/ppx-lib/gen_js_api_ppx.ml ++++ b/ppx-lib/gen_js_api_ppx.ml +@@ -2179,9 +2179,9 @@ let standalone () = + if !out = "" then out := Filename.chop_extension src ^ ".ml"; + let oc = if !out = "-" then stdout else open_out !out in + let sg = +- Ocaml_common.Pparse.parse_interface ++ (Ocaml_common.Pparse.parse_interface + ~tool_name:"gen_js_iface" +- src |> Selected_ast.Of_ocaml.copy_signature ++ src).ast |> Selected_ast.Of_ocaml.copy_signature + in + let str = str_of_sg ~global_attrs:[] sg in + ignore (check_loc_mapper # signature sg); diff --git a/packages/gen_js_api/gen_js_api.1.1.2+ox/opam b/packages/gen_js_api/gen_js_api.1.1.2+ox/opam index d2a64a89d4..05c1f0eb28 100644 --- a/packages/gen_js_api/gen_js_api.1.1.2+ox/opam +++ b/packages/gen_js_api/gen_js_api.1.1.2+ox/opam @@ -21,11 +21,11 @@ depends: [ "dune" {>= "2.7"} "ocaml" {>= "4.08"} "ppxlib" {= "0.33.0+ox"} - "js_of_ocaml-compiler" {with-test & = "6.0.1+ox"} +"js_of_ocaml-compiler" {with-test} "conf-npm" {with-test} - "ojs" {= "1.1.2+ox"} - "odoc" {with-doc} + "ojs" {= version & = "1.1.2+ox"} "ppxlib_jane" + "odoc" {with-doc} ] conflicts: [ "js_of_ocaml-compiler" {< "4.0.0"} @@ -57,6 +57,7 @@ patches: [ "gen-js-api+ppx-driver+gen_js_api_ppx_driver.ml.patch" "gen-js-api+ppx-lib+gen_js_api_ppx.ml.patch" "gen-js-api+unsafe_multidomain_alert.patch" + "gen-js-api-ast.patch" "dune.patch" ] extra-files: [ @@ -76,6 +77,10 @@ extra-files: [ "gen-js-api+unsafe_multidomain_alert.patch" "sha256=41fd51a6dd20b44bc07451e4635623554c4aa80e5e5f9472faf4161c7a7b0a7a" ] + [ + "gen-js-api-ast.patch" + "sha256=969f7ae0ac3a269f5fecffc659a875d7ba458364aa85da2e9bfa8cd3a214ae2f" + ] [ "dune.patch" "sha256=486d4235a5baa84b63b867ceaa9000b8c7fa6c9429999ab247e4ba3401da214e" diff --git a/packages/hardcaml/hardcaml.v0.18~preview.130.36+326/opam b/packages/hardcaml/hardcaml.v0.18~preview.130.55+197/opam similarity index 53% rename from packages/hardcaml/hardcaml.v0.18~preview.130.36+326/opam rename to packages/hardcaml/hardcaml.v0.18~preview.130.55+197/opam index 8bb6ce5f9a..0e884c1df4 100644 --- a/packages/hardcaml/hardcaml.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml/hardcaml.v0.18~preview.130.55+197/opam @@ -11,18 +11,19 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "bignum" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "jane_rope" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_rope" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "splittable_random" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "bignum" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "jane_rope" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_rope" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "splittable_random" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -37,7 +38,7 @@ VHDL to interact with standard back end tooling. """ url { src: - "https://github.com/janestreet/hardcaml/archive/33527b10d2f053c864b4b0d47cc31062e6eb9498.tar.gz" + "https://github.com/janestreet/hardcaml/archive/b40b4cabb7cdd8aceb369bcacdf00f71ff35f54f.tar.gz" checksum: - "sha256=66f08f578a2e4b799a76e3d5f3a1168a0edf0dcb43c326e33198add859d3f77e" + "sha256=bd3a60efd19eb60d6eb6004b0c4f207ab2fbd29d5b45c6576028ce75d26b6e9f" } diff --git a/packages/hardcaml_axi/hardcaml_axi.v0.18~preview.130.36+326/opam b/packages/hardcaml_axi/hardcaml_axi.v0.18~preview.130.55+197/opam similarity index 53% rename from packages/hardcaml_axi/hardcaml_axi.v0.18~preview.130.36+326/opam rename to packages/hardcaml_axi/hardcaml_axi.v0.18~preview.130.55+197/opam index 092b84778f..7fee910f92 100644 --- a/packages/hardcaml_axi/hardcaml_axi.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_axi/hardcaml_axi.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "hardcaml_circuits" {= "v0.18~preview.130.36+326"} - "hardcaml_handshake" {= "v0.18~preview.130.36+326"} - "ppx_hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "hardcaml_circuits" {= "v0.18~preview.130.55+197"} + "hardcaml_handshake" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -29,7 +29,7 @@ AXI Lite, Full and Stream Interfaces for Hardcaml """ url { src: - "https://github.com/janestreet/hardcaml_axi/archive/681650f9e604664e6ba1141f85c46e039019568b.tar.gz" + "https://github.com/janestreet/hardcaml_axi/archive/7f3c10eefb8aefe3271baa6eb98378ef22dba15d.tar.gz" checksum: - "sha256=ead9a8ad2fe83995ada7ed4e26cd88853ed603436b859fb1c24f333dc8e763cf" + "sha256=10525a67cfdc8a78dcd002b731aa669f619b53ae905a29fe622746c35e38aaf8" } diff --git a/packages/hardcaml_c/hardcaml_c.v0.18~preview.130.36+326/opam b/packages/hardcaml_c/hardcaml_c.v0.18~preview.130.55+197/opam similarity index 61% rename from packages/hardcaml_c/hardcaml_c.v0.18~preview.130.36+326/opam rename to packages/hardcaml_c/hardcaml_c.v0.18~preview.130.55+197/opam index fc853e27d6..d7b2bb1f28 100644 --- a/packages/hardcaml_c/hardcaml_c.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_c/hardcaml_c.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "jane_rope" {= "v0.18~preview.130.36+326"} - "ppx_hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_rope" {= "v0.18~preview.130.36+326"} - "ctypes" {>= "0.18.0"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "jane_rope" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_rope" {= "v0.18~preview.130.55+197"} + "ctypes" {= "0.23.0+ox"} "ctypes-foreign" "dune" {>= "3.17.0"} ] @@ -34,7 +34,7 @@ any other cyclesim simulation. """ url { src: - "https://github.com/janestreet/hardcaml_c/archive/f2e6bec82ec05a4f5b4286547297b2a371aa7cc4.tar.gz" + "https://github.com/janestreet/hardcaml_c/archive/77d07f3cdc56c381c694c9fc494b2628be50e876.tar.gz" checksum: - "sha256=ad4bb5295807034c8edf8349bfe80b50d46972d546204eb83df63fa3f3fdd27a" + "sha256=22319f492a2e27941a9117b099ff60ffe43352f057a1e5a39b27eaaa47216f17" } diff --git a/packages/hardcaml_circuits/hardcaml_circuits.v0.18~preview.130.36+326/opam b/packages/hardcaml_circuits/hardcaml_circuits.v0.18~preview.130.55+197/opam similarity index 55% rename from packages/hardcaml_circuits/hardcaml_circuits.v0.18~preview.130.36+326/opam rename to packages/hardcaml_circuits/hardcaml_circuits.v0.18~preview.130.55+197/opam index 99338d7d2f..cf6c4a53b5 100644 --- a/packages/hardcaml_circuits/hardcaml_circuits.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_circuits/hardcaml_circuits.v0.18~preview.130.55+197/opam @@ -12,13 +12,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "bignum" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "hardcaml_fixed_point" {= "v0.18~preview.130.36+326"} - "ppx_hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "bignum" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "hardcaml_fixed_point" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -28,7 +28,7 @@ A small library of useful/interesting Hardcaml circuits. """ url { src: - "https://github.com/janestreet/hardcaml_circuits/archive/04eabb454f2fe1773b1e5e912a5c955def94829e.tar.gz" + "https://github.com/janestreet/hardcaml_circuits/archive/fceacaceff285660e56926e2a66db1161510a3fb.tar.gz" checksum: - "sha256=909329f0e2ce78c1531c1bb2a56c3df18bc821c335b6792198d571b71641afeb" + "sha256=7afa54d1d6ce4c5aeec5bdff19bb1942f4a0a2f8336a2d51889ee6c27b643a90" } diff --git a/packages/hardcaml_event_driven_sim/hardcaml_event_driven_sim.v0.18~preview.130.36+326/opam b/packages/hardcaml_event_driven_sim/hardcaml_event_driven_sim.v0.18~preview.130.55+197/opam similarity index 72% rename from packages/hardcaml_event_driven_sim/hardcaml_event_driven_sim.v0.18~preview.130.36+326/opam rename to packages/hardcaml_event_driven_sim/hardcaml_event_driven_sim.v0.18~preview.130.55+197/opam index 17fbfbcff7..6ed5848605 100644 --- a/packages/hardcaml_event_driven_sim/hardcaml_event_driven_sim.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_event_driven_sim/hardcaml_event_driven_sim.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "hardcaml_waveterm" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "hardcaml_waveterm" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -31,7 +31,7 @@ simulation model and write testbenches against it. """ url { src: - "https://github.com/janestreet/hardcaml_event_driven_sim/archive/6dcab2c4e9c754d4264529339525557371e82a0d.tar.gz" + "https://github.com/janestreet/hardcaml_event_driven_sim/archive/67b51e77c3c82928e408ec0cee5386f68f5312ef.tar.gz" checksum: - "sha256=6e180265e26971700d480c31d0cc6b3e04feb53c8c30a2b65d2e4fcc0518fe4d" + "sha256=38971cf03131d5bbdecad8a203e26bc6d9ecf03a4fa5771fb9bc5c137cef3ed0" } diff --git a/packages/hardcaml_fixed_point/hardcaml_fixed_point.v0.18~preview.130.36+326/opam b/packages/hardcaml_fixed_point/hardcaml_fixed_point.v0.18~preview.130.55+197/opam similarity index 76% rename from packages/hardcaml_fixed_point/hardcaml_fixed_point.v0.18~preview.130.36+326/opam rename to packages/hardcaml_fixed_point/hardcaml_fixed_point.v0.18~preview.130.55+197/opam index 14507e8ab1..e2128efc3c 100644 --- a/packages/hardcaml_fixed_point/hardcaml_fixed_point.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_fixed_point/hardcaml_fixed_point.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ overflow functionality. """ url { src: - "https://github.com/janestreet/hardcaml_fixed_point/archive/271c85edd0017468d44e9c917506743a2c2e4dff.tar.gz" + "https://github.com/janestreet/hardcaml_fixed_point/archive/b30dd5dbc691e3a527e07626df3b27c4d0251c09.tar.gz" checksum: - "sha256=d00f53ada87008676149df369ccd6f23726726abd449a0e772f4da0ce27ba158" + "sha256=662d6c19ea7881fbc60cdd78f37070126f0b96d622a677e273b76fc12433fae1" } diff --git a/packages/hardcaml_handshake/hardcaml_handshake.v0.18~preview.130.36+326/opam b/packages/hardcaml_handshake/hardcaml_handshake.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/hardcaml_handshake/hardcaml_handshake.v0.18~preview.130.36+326/opam rename to packages/hardcaml_handshake/hardcaml_handshake.v0.18~preview.130.55+197/opam index 7bad2d42ba..259f31b0b7 100644 --- a/packages/hardcaml_handshake/hardcaml_handshake.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_handshake/hardcaml_handshake.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ Library for constructing circuits with a pair of valid and ready handshake signa """ url { src: - "https://github.com/janestreet/hardcaml_handshake/archive/9c8dc5a66f504cf0650de9a7f8117b5cfb4b43b5.tar.gz" + "https://github.com/janestreet/hardcaml_handshake/archive/015457c7d45acbea49d730fb4119c8aa1ef1a1e5.tar.gz" checksum: - "sha256=45778b34c65f80aa9d072584d10be5befe13b78193cef3fcd063bd67c85c4814" + "sha256=c1ed997fab37cd9ed9f9b0f25d73839d1e9018989603d2b519dcec25de0969c7" } diff --git a/packages/hardcaml_hobby_boards/hardcaml_hobby_boards.v0.18~preview.130.36+326/opam b/packages/hardcaml_hobby_boards/hardcaml_hobby_boards.v0.18~preview.130.55+197/opam similarity index 51% rename from packages/hardcaml_hobby_boards/hardcaml_hobby_boards.v0.18~preview.130.36+326/opam rename to packages/hardcaml_hobby_boards/hardcaml_hobby_boards.v0.18~preview.130.55+197/opam index 0b4678808e..9eb738b4a2 100644 --- a/packages/hardcaml_hobby_boards/hardcaml_hobby_boards.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_hobby_boards/hardcaml_hobby_boards.v0.18~preview.130.55+197/opam @@ -11,8 +11,20 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.1.0"} - "dune" {>= "3.17.0"} + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "hardcaml_axi" {= "v0.18~preview.130.55+197"} + "jane_rope" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_rope" {= "v0.18~preview.130.55+197"} + "simple_xml" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Support code for FPGA hobby boards." @@ -23,7 +35,7 @@ easier, build script generation and demos. """ url { src: - "https://github.com/janestreet/hardcaml_hobby_boards/archive/3768f81264200d6f61b81145e5f940352aee255e.tar.gz" + "https://github.com/janestreet/hardcaml_hobby_boards/archive/40ae6bfbf70ec4885596327766b0741f86ac3e67.tar.gz" checksum: - "sha256=4a24031c24257002933767d6387f847c988151a818657ee9a2a7a48650637701" + "sha256=243799ea3235ba9e9b8ef70a64daec92c18406f66579baa5bd63ee4c5fe10b6b" } diff --git a/packages/hardcaml_of_verilog/hardcaml_of_verilog.v0.18~preview.130.36+326/opam b/packages/hardcaml_of_verilog/hardcaml_of_verilog.v0.18~preview.130.55+197/opam similarity index 57% rename from packages/hardcaml_of_verilog/hardcaml_of_verilog.v0.18~preview.130.36+326/opam rename to packages/hardcaml_of_verilog/hardcaml_of_verilog.v0.18~preview.130.55+197/opam index 448cd61a0c..73591924ee 100644 --- a/packages/hardcaml_of_verilog/hardcaml_of_verilog.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_of_verilog/hardcaml_of_verilog.v0.18~preview.130.55+197/opam @@ -12,16 +12,16 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "hardcaml_verify" {= "v0.18~preview.130.36+326"} - "jsonaf" {= "v0.18~preview.130.36+326"} - "ppx_hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_jsonaf_conv" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "hardcaml_verify" {= "v0.18~preview.130.55+197"} + "jsonaf" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_jsonaf_conv" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -35,7 +35,7 @@ Code can also be generated to wrap the conversion process using Hardcaml interfa """ url { src: - "https://github.com/janestreet/hardcaml_of_verilog/archive/2b8eed10fe125dbcadb178efef6aeaaa0225baa6.tar.gz" + "https://github.com/janestreet/hardcaml_of_verilog/archive/94a5e26b1251506041e807f5f47e11bc5da050d1.tar.gz" checksum: - "sha256=6ab0de815b487735b7b9f836fd8efe8aa47cbed0617f3ebf84b858b7c2a513b7" + "sha256=66f2fab4dac73bff242a70b1d62d6f9f84aab52892980a6b230a88f9608bd325" } diff --git a/packages/hardcaml_step_testbench/hardcaml_step_testbench.v0.18~preview.130.36+326/opam b/packages/hardcaml_step_testbench/hardcaml_step_testbench.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/hardcaml_step_testbench/hardcaml_step_testbench.v0.18~preview.130.36+326/opam rename to packages/hardcaml_step_testbench/hardcaml_step_testbench.v0.18~preview.130.55+197/opam index 2c6c8be84a..d340779dfb 100644 --- a/packages/hardcaml_step_testbench/hardcaml_step_testbench.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_step_testbench/hardcaml_step_testbench.v0.18~preview.130.55+197/opam @@ -12,13 +12,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "hardcaml_event_driven_sim" {= "v0.18~preview.130.36+326"} - "hardcaml_waveterm" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "hardcaml_event_driven_sim" {= "v0.18~preview.130.55+197"} + "hardcaml_waveterm" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -31,7 +31,7 @@ synchronised to the system clock. """ url { src: - "https://github.com/janestreet/hardcaml_step_testbench/archive/d8e9fefd42d668c95b8e70817976e9d853ad98ef.tar.gz" + "https://github.com/janestreet/hardcaml_step_testbench/archive/422a05bca83c73179d40b292f1f8486f449ad4e4.tar.gz" checksum: - "sha256=cdee189562c006a145afbde4d0b97130bb401cdf5c0c581cd39a37231b2b5f72" + "sha256=75613d9ffc477b597b4653b52ad4e9f74869d0dee6379f1ae02b34b4d4f1943a" } diff --git a/packages/hardcaml_test_harness/hardcaml_test_harness.v0.18~preview.130.36+326/opam b/packages/hardcaml_test_harness/hardcaml_test_harness.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/hardcaml_test_harness/hardcaml_test_harness.v0.18~preview.130.36+326/opam rename to packages/hardcaml_test_harness/hardcaml_test_harness.v0.18~preview.130.55+197/opam index 3b1cdaf820..cbafe3a9a2 100644 --- a/packages/hardcaml_test_harness/hardcaml_test_harness.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_test_harness/hardcaml_test_harness.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "hardcaml_step_testbench" {= "v0.18~preview.130.36+326"} - "hardcaml_waveterm" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "hardcaml_step_testbench" {= "v0.18~preview.130.55+197"} + "hardcaml_waveterm" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -29,7 +29,7 @@ test environment from a circuit and producing waveforms for debugging. """ url { src: - "https://github.com/janestreet/hardcaml_test_harness/archive/9cc171c42273a29f15edb06315e951a5853bc5d0.tar.gz" + "https://github.com/janestreet/hardcaml_test_harness/archive/31a9c2b190e8036a6e676066921f8f18acc6456f.tar.gz" checksum: - "sha256=0f89ee50c3d1b68f0be7928a1d24dbff60947f50dd6da1c4a3dcbb55fe18e66e" + "sha256=9e2b9e08ef77ae4a0d27c7cf31805c9453904aac1299c340caa0b9bfa9b56ab8" } diff --git a/packages/hardcaml_verify/hardcaml_verify.v0.18~preview.130.36+326/opam b/packages/hardcaml_verify/hardcaml_verify.v0.18~preview.130.55+197/opam similarity index 61% rename from packages/hardcaml_verify/hardcaml_verify.v0.18~preview.130.36+326/opam rename to packages/hardcaml_verify/hardcaml_verify.v0.18~preview.130.55+197/opam index f074f05974..476639a83f 100644 --- a/packages/hardcaml_verify/hardcaml_verify.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_verify/hardcaml_verify.v0.18~preview.130.55+197/opam @@ -12,16 +12,16 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "hardcaml_waveterm" {= "v0.18~preview.130.36+326"} - "jane_rope" {= "v0.18~preview.130.36+326"} - "ppx_hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_rope" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "hardcaml_waveterm" {= "v0.18~preview.130.55+197"} + "jane_rope" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_rope" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Hardcaml Verification Tools" @@ -37,7 +37,7 @@ checking tasks. """ url { src: - "https://github.com/janestreet/hardcaml_verify/archive/5137455826996da2bf45d1db2802282a33d8aa95.tar.gz" + "https://github.com/janestreet/hardcaml_verify/archive/286c89e044e0aa09e68b634399d333753f26201a.tar.gz" checksum: - "sha256=e37bdd7c00837ad1e3ceff1cf6dcfd590c37eca35c51b6023b1e266dae392c0c" + "sha256=36e3336b36bbe7032daff1dfa88a8a50916dcba72572c8c3b6fcbb53f773f6a0" } diff --git a/packages/hardcaml_verilator/hardcaml_verilator.v0.18~preview.130.36+326/opam b/packages/hardcaml_verilator/hardcaml_verilator.v0.18~preview.130.55+197/opam similarity index 59% rename from packages/hardcaml_verilator/hardcaml_verilator.v0.18~preview.130.36+326/opam rename to packages/hardcaml_verilator/hardcaml_verilator.v0.18~preview.130.55+197/opam index e1896cf714..186bd41874 100644 --- a/packages/hardcaml_verilator/hardcaml_verilator.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_verilator/hardcaml_verilator.v0.18~preview.130.55+197/opam @@ -12,15 +12,15 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "jane_rope" {= "v0.18~preview.130.36+326"} - "ppx_hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "ctypes" {>= "0.18.0"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "jane_rope" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "ctypes" {= "0.23.0+ox"} "ctypes-foreign" "dune" {>= "3.17.0"} ] @@ -34,7 +34,7 @@ to the running executable to be used as a Cyclesim simulation. """ url { src: - "https://github.com/janestreet/hardcaml_verilator/archive/5898d5c17e6b981677bb0f6a803ff9ad0f24a460.tar.gz" + "https://github.com/janestreet/hardcaml_verilator/archive/f6c2a1915d912fe43345e88b4ad5e92bbe5536f1.tar.gz" checksum: - "sha256=6ef090f4ccb37cf0675bcd7bade24bde89999fba6577b9f622caf0f2342d02fd" + "sha256=3787233ef79fd05fb68e4b90d30a6d2290d92b97544e342d9f1fc746815918e2" } diff --git a/packages/hardcaml_waveterm/hardcaml_waveterm.v0.18~preview.130.36+326/opam b/packages/hardcaml_waveterm/hardcaml_waveterm.v0.18~preview.130.55+197/opam similarity index 52% rename from packages/hardcaml_waveterm/hardcaml_waveterm.v0.18~preview.130.36+326/opam rename to packages/hardcaml_waveterm/hardcaml_waveterm.v0.18~preview.130.55+197/opam index db38081c6a..5b263c967d 100644 --- a/packages/hardcaml_waveterm/hardcaml_waveterm.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_waveterm/hardcaml_waveterm.v0.18~preview.130.55+197/opam @@ -11,20 +11,21 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "bignum" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "notty_async" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "cryptokit" {>= "1.16" & < "1.17"} - "dune" {>= "3.17.0"} - "notty" {>= "0.2.1"} - "re" {>= "1.8.0"} + "ocaml" {>= "5.1.0"} + "async" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "bignum" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "notty_async" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "cryptokit" {>= "1.16" & < "1.17"} + "dune" {>= "3.17.0"} + "notty" {>= "0.2.1"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "A terminal based digital waveform viewer for Hardcaml" @@ -39,7 +40,7 @@ to simulations. conflicts: ["hardcaml-waveterm"] url { src: - "https://github.com/janestreet/hardcaml_waveterm/archive/5faae4b15e60793f1f355fa580e10d06f7b0fd12.tar.gz" + "https://github.com/janestreet/hardcaml_waveterm/archive/43f11c3a0d60f623bd43e36ea485901bc4b6aeb7.tar.gz" checksum: - "sha256=52fbbe6013483a854fc70d89e1b1154ecd0ea86f47a8b5a7e8bc4f8d9606199c" + "sha256=27e342711f3cb5ac1049f27b2c90e76e1f8f760edcf67da94f6f279a795cd9ea" } diff --git a/packages/hardcaml_xilinx/hardcaml_xilinx.v0.18~preview.130.36+326/opam b/packages/hardcaml_xilinx/hardcaml_xilinx.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/hardcaml_xilinx/hardcaml_xilinx.v0.18~preview.130.36+326/opam rename to packages/hardcaml_xilinx/hardcaml_xilinx.v0.18~preview.130.55+197/opam index a8a13dd180..1888a15c99 100644 --- a/packages/hardcaml_xilinx/hardcaml_xilinx.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_xilinx/hardcaml_xilinx.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "hardcaml_circuits" {= "v0.18~preview.130.36+326"} - "ppx_hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "hardcaml_circuits" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -30,7 +30,7 @@ Xilinx LUT primitives. """ url { src: - "https://github.com/janestreet/hardcaml_xilinx/archive/8d0856198840bc215403fc16f93692d804a140d3.tar.gz" + "https://github.com/janestreet/hardcaml_xilinx/archive/d1b6784694dc3bcf12e65f7175d7dc534e86f1dc.tar.gz" checksum: - "sha256=f910308569d835ac2df61205dee9b70a921f44d84e5f7e245eb57b28b2d9060a" + "sha256=3d37f82e316f3084054dd1d913813b68ab2085c0f283835803e227f79474107d" } diff --git a/packages/hardcaml_xilinx_components/hardcaml_xilinx_components.v0.18~preview.130.36+326/opam b/packages/hardcaml_xilinx_components/hardcaml_xilinx_components.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/hardcaml_xilinx_components/hardcaml_xilinx_components.v0.18~preview.130.36+326/opam rename to packages/hardcaml_xilinx_components/hardcaml_xilinx_components.v0.18~preview.130.55+197/opam index 77d561b5a0..ba5128dfeb 100644 --- a/packages/hardcaml_xilinx_components/hardcaml_xilinx_components.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_xilinx_components/hardcaml_xilinx_components.v0.18~preview.130.55+197/opam @@ -13,14 +13,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Hardcaml Xilinx component definitions" @@ -30,7 +30,7 @@ installation and generating Hardcaml interfaces automatically. """ url { src: - "https://github.com/janestreet/hardcaml_xilinx_components/archive/5f80f7a032277c34d85149720f6ed2089474d27c.tar.gz" + "https://github.com/janestreet/hardcaml_xilinx_components/archive/9c06e8147153836a262d3f86a79861fdcf656c15.tar.gz" checksum: - "sha256=67d781c182c410505efd3556bfc54389b8fb2eab3d7c64fa10443158b1ddf674" + "sha256=1b930fb70ab64590ac78793586149decdcc4f78b1b48dde84b8f6b8a207b11ce" } diff --git a/packages/hardcaml_xilinx_reports/hardcaml_xilinx_reports.v0.18~preview.130.36+326/opam b/packages/hardcaml_xilinx_reports/hardcaml_xilinx_reports.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/hardcaml_xilinx_reports/hardcaml_xilinx_reports.v0.18~preview.130.36+326/opam rename to packages/hardcaml_xilinx_reports/hardcaml_xilinx_reports.v0.18~preview.130.55+197/opam index 1d99ee5a24..e08e571104 100644 --- a/packages/hardcaml_xilinx_reports/hardcaml_xilinx_reports.v0.18~preview.130.36+326/opam +++ b/packages/hardcaml_xilinx_reports/hardcaml_xilinx_reports.v0.18~preview.130.55+197/opam @@ -12,16 +12,16 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "jane_rope" {= "v0.18~preview.130.36+326"} - "ppx_hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "jane_rope" {= "v0.18~preview.130.55+197"} + "ppx_hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -38,7 +38,7 @@ ways can provide better insight into the design. """ url { src: - "https://github.com/janestreet/hardcaml_xilinx_reports/archive/02a95e67565c3b5226289c3d060c7c98221dcb5b.tar.gz" + "https://github.com/janestreet/hardcaml_xilinx_reports/archive/22b6605859df49c078cacd9ab2a7a7b0395ae354.tar.gz" checksum: - "sha256=39113aae706b37cb3823016301e1cb8db93f7bf0c3a6b327e9038271d42d07a8" + "sha256=e2e5864a3d59f47ea141afaa8970c58992133f9ba14ec6a84677402dfccf4969" } diff --git a/packages/hex_encode/hex_encode.v0.18~preview.130.36+326/opam b/packages/hex_encode/hex_encode.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/hex_encode/hex_encode.v0.18~preview.130.36+326/opam rename to packages/hex_encode/hex_encode.v0.18~preview.130.55+197/opam index 210b67d5bc..e914d2df58 100644 --- a/packages/hex_encode/hex_encode.v0.18~preview.130.36+326/opam +++ b/packages/hex_encode/hex_encode.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -23,7 +23,7 @@ This library implements hexadecimal encoding and decoding """ url { src: - "https://github.com/janestreet/hex_encode/archive/772a85f21fb6e271746e10ea4bba2af348227480.tar.gz" + "https://github.com/janestreet/hex_encode/archive/4fd1f06f446bc414c7e7ee6ad7283213e74e75e5.tar.gz" checksum: - "sha256=ea11ca3d118f68e5c6bb16e6cf493afc8123ba87b9cc181a8ac170c1d88fd3e6" + "sha256=a04813b04a8da3018ec1ac786b50d02d1441159d67a95e9796b87d39d582d5dc" } diff --git a/packages/hg_lib/hg_lib.v0.18~preview.130.36+326/opam b/packages/hg_lib/hg_lib.v0.18~preview.130.55+197/opam similarity index 54% rename from packages/hg_lib/hg_lib.v0.18~preview.130.36+326/opam rename to packages/hg_lib/hg_lib.v0.18~preview.130.55+197/opam index 2bd370f799..ee2935daf7 100644 --- a/packages/hg_lib/hg_lib.v0.18~preview.130.36+326/opam +++ b/packages/hg_lib/hg_lib.v0.18~preview.130.55+197/opam @@ -11,12 +11,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +27,7 @@ A library that wraps the Mercurial command line interface. """ url { src: - "https://github.com/janestreet/hg_lib/archive/23e4dbc1081c81701d2dc4a78bd92a1f76326757.tar.gz" + "https://github.com/janestreet/hg_lib/archive/23b4fccebb43ea7febf776429dc2726007b9f078.tar.gz" checksum: - "sha256=abee98faf412919a272b57262a68e09a1bd3ca9e1ab99cfcef47388dfe962d64" + "sha256=0028c064f8b26ce463a7a84bb75d79b00bfbdd65ddf5ecc67f203df0af210d25" } diff --git a/packages/higher_kinded/higher_kinded.v0.18~preview.130.36+326/opam b/packages/higher_kinded/higher_kinded.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/higher_kinded/higher_kinded.v0.18~preview.130.36+326/opam rename to packages/higher_kinded/higher_kinded.v0.18~preview.130.55+197/opam index f00ab64f86..965b630e8e 100644 --- a/packages/higher_kinded/higher_kinded.v0.18~preview.130.36+326/opam +++ b/packages/higher_kinded/higher_kinded.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ constructor. """ url { src: - "https://github.com/janestreet/higher_kinded/archive/888ff202b827994a85375f32da08dc6ef393c64d.tar.gz" + "https://github.com/janestreet/higher_kinded/archive/f2f916dc284e406afe88f7effbe59dc1b5e619ff.tar.gz" checksum: - "sha256=0090b0fc328ec5a663b07807ca86136136d5045261564f7117793120c9ac868f" + "sha256=01ae31f23abcaf21a990fd66f538b6232ec40f72004ff9e33eb9bde49ddcda57" } diff --git a/packages/incr_dom/incr_dom.v0.18~preview.130.36+326/opam b/packages/incr_dom/incr_dom.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/incr_dom/incr_dom.v0.18~preview.130.36+326/opam rename to packages/incr_dom/incr_dom.v0.18~preview.130.55+197/opam index d833267390..f6929d0c07 100644 --- a/packages/incr_dom/incr_dom.v0.18~preview.130.36+326/opam +++ b/packages/incr_dom/incr_dom.v0.18~preview.130.55+197/opam @@ -11,15 +11,15 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_js" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "bonsai_concrete" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "incr_select" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "async_js" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "bonsai_concrete" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "incr_select" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml" {= "6.0.1+ox"} "js_of_ocaml-ppx" {= "6.0.1+ox"} @@ -49,7 +49,7 @@ examples directory. """ url { src: - "https://github.com/janestreet/incr_dom/archive/da0b3bc0aa09b5217e63e6ac77ff6134d5a86d06.tar.gz" + "https://github.com/janestreet/incr_dom/archive/9e2b0eb5a0d5feca27aed3ec0958b4c5fc75f8e7.tar.gz" checksum: - "sha256=07c93a95dbb71bf4503c0112ba4162f11ff90ed00102864981e47e037e08970d" + "sha256=1d082ae27a58947f6782864efdcd06d45cc05703c74ae3b708fd4239e153a3fe" } diff --git a/packages/incr_dom_interactive/incr_dom_interactive.v0.18~preview.130.36+326/opam b/packages/incr_dom_interactive/incr_dom_interactive.v0.18~preview.130.55+197/opam similarity index 64% rename from packages/incr_dom_interactive/incr_dom_interactive.v0.18~preview.130.36+326/opam rename to packages/incr_dom_interactive/incr_dom_interactive.v0.18~preview.130.55+197/opam index 4ffb48775f..e59f280929 100644 --- a/packages/incr_dom_interactive/incr_dom_interactive.v0.18~preview.130.36+326/opam +++ b/packages/incr_dom_interactive/incr_dom_interactive.v0.18~preview.130.55+197/opam @@ -12,16 +12,16 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_js" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "incr_dom" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "incr_select" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "splay_tree" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "async_js" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "incr_dom" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "incr_select" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "splay_tree" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml" {= "6.0.1+ox"} "js_of_ocaml-ppx" {= "6.0.1+ox"} @@ -33,7 +33,7 @@ This library allows your program to receive input from the user using DOM elemen """ url { src: - "https://github.com/janestreet/incr_dom_interactive/archive/3eaed41a356ccc3d94e31b9897dc934686b9b85b.tar.gz" + "https://github.com/janestreet/incr_dom_interactive/archive/1cd9d8b91c982522faf5cdeb1a70b034e42e96bf.tar.gz" checksum: - "sha256=ec585ea4277ca2f7f8827becf8b7cc95fcf9840ce5464d93382312393860fed7" + "sha256=405d69b5ddbf40d17eb5a5d97d382bf6ba80263bc049d32a13db10be7fca514b" } diff --git a/packages/incr_dom_partial_render/incr_dom_partial_render.v0.18~preview.130.36+326/opam b/packages/incr_dom_partial_render/incr_dom_partial_render.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/incr_dom_partial_render/incr_dom_partial_render.v0.18~preview.130.36+326/opam rename to packages/incr_dom_partial_render/incr_dom_partial_render.v0.18~preview.130.55+197/opam index e8fe376d7f..7b723be350 100644 --- a/packages/incr_dom_partial_render/incr_dom_partial_render.v0.18~preview.130.36+326/opam +++ b/packages/incr_dom_partial_render/incr_dom_partial_render.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "incr_dom" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_pattern_bind" {= "v0.18~preview.130.36+326"} - "splay_tree" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "incr_dom" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_pattern_bind" {= "v0.18~preview.130.55+197"} + "splay_tree" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml" {= "6.0.1+ox"} "js_of_ocaml-ppx" {= "6.0.1+ox"} @@ -31,7 +31,7 @@ This library provides tools for rendering of tabular data efficiently, in partic """ url { src: - "https://github.com/janestreet/incr_dom_partial_render/archive/3becb2430515e140e2d2fbb9979d2165498cb8f7.tar.gz" + "https://github.com/janestreet/incr_dom_partial_render/archive/1bc5267104ce569c03e6ba136c698e565d604048.tar.gz" checksum: - "sha256=c046539e6321f56b34dc707ac384fddd6d3bc83dd66526ef90246c37492b54a8" + "sha256=97187335947aae8ce3fd2600bec449e1c6636a2b5ebac386ad36816e409a7746" } diff --git a/packages/incr_dom_sexp_form/incr_dom_sexp_form.v0.18~preview.130.36+326/opam b/packages/incr_dom_sexp_form/incr_dom_sexp_form.v0.18~preview.130.55+197/opam similarity index 56% rename from packages/incr_dom_sexp_form/incr_dom_sexp_form.v0.18~preview.130.36+326/opam rename to packages/incr_dom_sexp_form/incr_dom_sexp_form.v0.18~preview.130.55+197/opam index 3fe58ca32a..8321242243 100644 --- a/packages/incr_dom_sexp_form/incr_dom_sexp_form.v0.18~preview.130.36+326/opam +++ b/packages/incr_dom_sexp_form/incr_dom_sexp_form.v0.18~preview.130.55+197/opam @@ -12,15 +12,15 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "incr_dom" {= "v0.18~preview.130.36+326"} - "incr_dom_interactive" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "incr_select" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "splay_tree" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "incr_dom" {= "v0.18~preview.130.55+197"} + "incr_dom_interactive" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "incr_select" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "splay_tree" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml" {= "6.0.1+ox"} "js_of_ocaml-ppx" {= "6.0.1+ox"} @@ -33,7 +33,7 @@ It relies on the fact that the type of the value being edited can be serialized """ url { src: - "https://github.com/janestreet/incr_dom_sexp_form/archive/8e5e27c507baf4b5c5175c8cad036eff7d1e70d5.tar.gz" + "https://github.com/janestreet/incr_dom_sexp_form/archive/74ba51d53e0dd1947d5c9cd0cc81b6136cc70e64.tar.gz" checksum: - "sha256=de9a8a70fd6e16f5328c0a63ff430749ba2e5d9ffa14c00db7de2692790ea0a5" + "sha256=46a4783670517af61af7d88170e8c185e7cb9fa1d0110627075463f81b4b902f" } diff --git a/packages/incr_map/incr_map.v0.18~preview.130.36+326/opam b/packages/incr_map/incr_map.v0.18~preview.130.55+197/opam similarity index 53% rename from packages/incr_map/incr_map.v0.18~preview.130.36+326/opam rename to packages/incr_map/incr_map.v0.18~preview.130.55+197/opam index 98aa8f36d8..7c5df0dae9 100644 --- a/packages/incr_map/incr_map.v0.18~preview.130.36+326/opam +++ b/packages/incr_map/incr_map.v0.18~preview.130.55+197/opam @@ -11,17 +11,17 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "abstract_algebra" {= "v0.18~preview.130.36+326"} - "bignum" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "legacy_diffable" {= "v0.18~preview.130.36+326"} - "ppx_diff" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_pattern_bind" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "streamable" {= "v0.18~preview.130.36+326"} - "uopt" {= "v0.18~preview.130.36+326"} + "abstract_algebra" {= "v0.18~preview.130.55+197"} + "bignum" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "legacy_diffable" {= "v0.18~preview.130.55+197"} + "ppx_diff" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_pattern_bind" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "streamable" {= "v0.18~preview.130.55+197"} + "uopt" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -34,7 +34,7 @@ along with the ability to efficiently diff map data structures using """ url { src: - "https://github.com/janestreet/incr_map/archive/e43be6385a5bd6713e38b66c2cfcc5fae2997a79.tar.gz" + "https://github.com/janestreet/incr_map/archive/b8ac50903b0f5f47c19e63745c43a43963f58376.tar.gz" checksum: - "sha256=d3d8f1b680f3eacac53d4768988a83b654b23e52a4d91f29ae5ff19c110c38b1" + "sha256=3c3172ade2fce8c570bf01eb55ec6b03b957cc902bbe0b2f32a9885514e2fc08" } diff --git a/packages/incr_select/incr_select.v0.18~preview.130.36+326/opam b/packages/incr_select/incr_select.v0.18~preview.130.55+197/opam similarity index 75% rename from packages/incr_select/incr_select.v0.18~preview.130.36+326/opam rename to packages/incr_select/incr_select.v0.18~preview.130.55+197/opam index af3f356114..2218d47999 100644 --- a/packages/incr_select/incr_select.v0.18~preview.130.36+326/opam +++ b/packages/incr_select/incr_select.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "incremental" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "incremental" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -29,7 +29,7 @@ outputs that exist. """ url { src: - "https://github.com/janestreet/incr_select/archive/b9048e89107408e02e2318b1d821da56616d2b19.tar.gz" + "https://github.com/janestreet/incr_select/archive/dd2f3e8ad0320a2dd03ce5e1b301de134b74514d.tar.gz" checksum: - "sha256=611c18d4c5a864d226d2423ea960a8576e3ac9dbfbf1db13180cfe0215b245e9" + "sha256=c9ea3f3114245564dcc54818fc3b9fec6a7f3bea05c525539fdc082f35322786" } diff --git a/packages/incremental/incremental.v0.18~preview.130.36+326/opam b/packages/incremental/incremental.v0.18~preview.130.55+197/opam similarity index 57% rename from packages/incremental/incremental.v0.18~preview.130.36+326/opam rename to packages/incremental/incremental.v0.18~preview.130.55+197/opam index 220676b018..e20d3646d1 100644 --- a/packages/incremental/incremental.v0.18~preview.130.36+326/opam +++ b/packages/incremental/incremental.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "basement" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "janestreet_lru_cache" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "textutils_kernel" {= "v0.18~preview.130.36+326"} - "uopt" {= "v0.18~preview.130.36+326"} + "basement" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "janestreet_lru_cache" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "textutils_kernel" {= "v0.18~preview.130.55+197"} + "uopt" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -32,7 +32,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/incremental/archive/11257dffd94b7227330ddadbe6afda391836de67.tar.gz" + "https://github.com/janestreet/incremental/archive/c2ca714e61e866c511addc8ab752a5f640ce6fee.tar.gz" checksum: - "sha256=f464e9e8396080af181408940fe4afca4ec42502d92b2cd31091c00388a36020" + "sha256=0862107adae16a9db0e4740a836adf49a42a76482c86f276c93f8e377d169c66" } diff --git a/packages/indentation_buffer/indentation_buffer.v0.18~preview.130.36+326/opam b/packages/indentation_buffer/indentation_buffer.v0.18~preview.130.55+197/opam similarity index 72% rename from packages/indentation_buffer/indentation_buffer.v0.18~preview.130.36+326/opam rename to packages/indentation_buffer/indentation_buffer.v0.18~preview.130.55+197/opam index bbdd007422..91c346d680 100644 --- a/packages/indentation_buffer/indentation_buffer.v0.18~preview.130.36+326/opam +++ b/packages/indentation_buffer/indentation_buffer.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -23,7 +23,7 @@ A library for building strings with indentation """ url { src: - "https://github.com/janestreet/indentation_buffer/archive/587f164416fd8fc38a6367d4c46d7278f42ee4c5.tar.gz" + "https://github.com/janestreet/indentation_buffer/archive/5ba994d505513599301c61618812e01c29697703.tar.gz" checksum: - "sha256=a29f627c415dfb9927653ae043fb4f5104ed150084de4cf751ef31e941f7fff2" + "sha256=7a8b90d1b20059647be1cb70390209c4e151860d39b17913f49b53f5145dafc7" } diff --git a/packages/insertion_ordered_map/.generated b/packages/insertion_ordered_map/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/insertion_ordered_map/insertion_ordered_map.v0.18~preview.130.55+197/opam b/packages/insertion_ordered_map/insertion_ordered_map.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..ad8aca8657 --- /dev/null +++ b/packages/insertion_ordered_map/insertion_ordered_map.v0.18~preview.130.55+197/opam @@ -0,0 +1,30 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/insertion_ordered_map" +bug-reports: "https://github.com/janestreet/insertion_ordered_map/issues" +dev-repo: "git+https://github.com/janestreet/insertion_ordered_map.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/insertion_ordered_map/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "A Core.Map with a notion of insertion order." +description: """ +A Core.Map where any operation that iterates through keys (e.g. fold, iter_keys) will iterate in insertion order with O(N) complexity. +""" +url { + src: + "https://github.com/janestreet/insertion_ordered_map/archive/0a9acdc397f7c580ae9fed6a7a023137e4b4de58.tar.gz" + checksum: + "sha256=a462aa23739e7032af1235a0437938acb924f60f5e3013d179f80a80b552c3e7" +} diff --git a/packages/int_repr/int_repr.v0.18~preview.130.36+326/opam b/packages/int_repr/int_repr.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/int_repr/int_repr.v0.18~preview.130.36+326/opam rename to packages/int_repr/int_repr.v0.18~preview.130.55+197/opam index 1737b7b4a4..4e5a1723ac 100644 --- a/packages/int_repr/int_repr.v0.18~preview.130.36+326/opam +++ b/packages/int_repr/int_repr.v0.18~preview.130.55+197/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -22,7 +22,7 @@ Integers of various widths. """ url { src: - "https://github.com/janestreet/int_repr/archive/60219295b049fbe5b69dcc3c23d15b9bb4610eb5.tar.gz" + "https://github.com/janestreet/int_repr/archive/dfd133ac6f87cb6f705d021e7920834ceda90b69.tar.gz" checksum: - "sha256=244576037e92db0c4a9e13cf283350300a645cef7a49d4aad7a038d56bf32cd7" + "sha256=4b522689dde52dd6794a148797a4bffd78874e95d122590f8429406673a60a8d" } diff --git a/packages/jane-street-headers/jane-street-headers.v0.18~preview.130.36+326/opam b/packages/jane-street-headers/jane-street-headers.v0.18~preview.130.55+197/opam similarity index 78% rename from packages/jane-street-headers/jane-street-headers.v0.18~preview.130.36+326/opam rename to packages/jane-street-headers/jane-street-headers.v0.18~preview.130.55+197/opam index 49e4a204af..550a4dad2a 100644 --- a/packages/jane-street-headers/jane-street-headers.v0.18~preview.130.36+326/opam +++ b/packages/jane-street-headers/jane-street-headers.v0.18~preview.130.55+197/opam @@ -21,7 +21,7 @@ C header files shared between the various Jane Street packages """ url { src: - "https://github.com/janestreet/jane-street-headers/archive/ad7dd6d911f64fe206466630f1b1be7b2379b785.tar.gz" + "https://github.com/janestreet/jane-street-headers/archive/f1704e9e4a75e87942fa74fe46d86b71953e0bf8.tar.gz" checksum: - "sha256=322b4510b1898a82e8ec2087f92419998b1ac74ed041dbef524a98a48808daee" + "sha256=e3738c59eae1c3ba74eeb3b2fbb59eb5bcc2e0b5c03eb396012d1ef8201c3fab" } diff --git a/packages/jane_rope/jane_rope.v0.18~preview.130.36+326/opam b/packages/jane_rope/jane_rope.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/jane_rope/jane_rope.v0.18~preview.130.36+326/opam rename to packages/jane_rope/jane_rope.v0.18~preview.130.55+197/opam index fdb45acca3..6d8a9234a9 100644 --- a/packages/jane_rope/jane_rope.v0.18~preview.130.36+326/opam +++ b/packages/jane_rope/jane_rope.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -22,7 +22,7 @@ description: """ """ url { src: - "https://github.com/janestreet/jane_rope/archive/004c9940f3047ff5ec37dde220f04a949eaee3bd.tar.gz" + "https://github.com/janestreet/jane_rope/archive/bec1c15784dd3faea20ad5411f0ae34dcab4bba2.tar.gz" checksum: - "sha256=9d1cc49310c5ff86631f217c8fb93cb4d8f8a214761c32a58c0ae1e0f29c748c" + "sha256=ef119aeb51147e3c55d2c46e740f694776c3d1a3a32db9627b8e38cf4882ae03" } diff --git a/packages/janestreet_cpuid/janestreet_cpuid.v0.18~preview.130.36+326/opam b/packages/janestreet_cpuid/janestreet_cpuid.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/janestreet_cpuid/janestreet_cpuid.v0.18~preview.130.36+326/opam rename to packages/janestreet_cpuid/janestreet_cpuid.v0.18~preview.130.55+197/opam index 12351aa47b..8309baa2c3 100644 --- a/packages/janestreet_cpuid/janestreet_cpuid.v0.18~preview.130.36+326/opam +++ b/packages/janestreet_cpuid/janestreet_cpuid.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] synopsis: @@ -26,7 +26,7 @@ capabilities. available: (arch = "x86_64" | arch = "arm64") & os = "linux" url { src: - "https://github.com/janestreet/janestreet_cpuid/archive/b76e20b72005f7126bd1daeec1ba2cbe40acdc88.tar.gz" + "https://github.com/janestreet/janestreet_cpuid/archive/cb232e38cd6bf38164b24037871e82eca1ae317f.tar.gz" checksum: - "sha256=90010969a782350da5fcc3f58c2bf1a9b2f48d8de1b59418e04b775e31972bb7" + "sha256=d7d707105d52a6050ac1f8a6fcfd8b6b3da3eaafac56b7e9b0e8593b0502a3f3" } diff --git a/packages/janestreet_csv/janestreet_csv.v0.18~preview.130.36+326/opam b/packages/janestreet_csv/janestreet_csv.v0.18~preview.130.55+197/opam similarity index 59% rename from packages/janestreet_csv/janestreet_csv.v0.18~preview.130.36+326/opam rename to packages/janestreet_csv/janestreet_csv.v0.18~preview.130.55+197/opam index 623ffe40d9..a684556fa1 100644 --- a/packages/janestreet_csv/janestreet_csv.v0.18~preview.130.36+326/opam +++ b/packages/janestreet_csv/janestreet_csv.v0.18~preview.130.55+197/opam @@ -12,20 +12,20 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "bignum" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_extended" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "csvfields" {= "v0.18~preview.130.36+326"} - "delimited_parsing" {= "v0.18~preview.130.36+326"} - "fieldslib" {= "v0.18~preview.130.36+326"} - "numeric_string" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "re2" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "bignum" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_extended" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "csvfields" {= "v0.18~preview.130.55+197"} + "delimited_parsing" {= "v0.18~preview.130.55+197"} + "fieldslib" {= "v0.18~preview.130.55+197"} + "numeric_string" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "re2" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "pcre" "tyxml" {>= "4.3.0"} diff --git a/packages/janestreet_lru_cache/janestreet_lru_cache.v0.18~preview.130.36+326/opam b/packages/janestreet_lru_cache/janestreet_lru_cache.v0.18~preview.130.55+197/opam similarity index 78% rename from packages/janestreet_lru_cache/janestreet_lru_cache.v0.18~preview.130.36+326/opam rename to packages/janestreet_lru_cache/janestreet_lru_cache.v0.18~preview.130.55+197/opam index 734170a8a0..e5783dc6ff 100644 --- a/packages/janestreet_lru_cache/janestreet_lru_cache.v0.18~preview.130.36+326/opam +++ b/packages/janestreet_lru_cache/janestreet_lru_cache.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -23,7 +23,7 @@ Implementation of a Least Recently Used Cache. """ url { src: - "https://github.com/janestreet/janestreet_lru_cache/archive/906f3e5e934698d35832039297bbd521621cb088.tar.gz" + "https://github.com/janestreet/janestreet_lru_cache/archive/4c73ecd3291d51558d681a1ec7c1116f69a1d576.tar.gz" checksum: - "sha256=bb38db450cd4888f012a44a50a8d8180115f04872a075149e3c33c027df268c6" + "sha256=7b0c974019bbd906d9c4dd2b5a3cba83a6430bb87612e0feae0c6d4bae463de3" } diff --git a/packages/janestreet_shims/janestreet_shims.v0.18~preview.130.36+326/opam b/packages/janestreet_shims/janestreet_shims.v0.18~preview.130.55+197/opam similarity index 81% rename from packages/janestreet_shims/janestreet_shims.v0.18~preview.130.36+326/opam rename to packages/janestreet_shims/janestreet_shims.v0.18~preview.130.55+197/opam index 6260b20d53..9a37f715aa 100644 --- a/packages/janestreet_shims/janestreet_shims.v0.18~preview.130.36+326/opam +++ b/packages/janestreet_shims/janestreet_shims.v0.18~preview.130.55+197/opam @@ -23,7 +23,7 @@ Janestreet_shims provides shims for Jane Street compiler extensions """ url { src: - "https://github.com/janestreet/janestreet_shims/archive/b415d13eba4fbe03742b42b645518c3757d239eb.tar.gz" + "https://github.com/janestreet/janestreet_shims/archive/f2aca1157750491b1a43312aab1a48f0ea4ee414.tar.gz" checksum: - "sha256=20967d213d0240caf1794a76b423622bf9738550510bbf51f1488614f27578dc" + "sha256=8836acb80ace3d78fd4825477545b2ddda3f59c8efff413f14c79ac312795d68" } diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch index 1518edcaf2..2ad0a64b33 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch @@ -1,22 +1,40 @@ +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -1075,6 +1075,13 @@ + | NativeInt i -> + let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in + return (Const, e) ++ | Null -> ++ let* var = ++ register_import ++ ~name:"null" ++ (Global { mut = false; typ = Type.value }) ++ in ++ return (Const, W.GlobalGet var) + + let translate c = + let* const, c = translate_rec c in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -333,6 +333,7 @@ +@@ -329,6 +329,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (* Native int are 32bit on all known backend *) | Tuple of int * constant array * array_or_not + | Null - + module Constant = struct type t = constant -@@ -360,6 +361,7 @@ - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) - | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -361,6 +362,9 @@ + b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Null, Null -> Some true | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None | Int _, Float32 _ | Float32 _, Int _ -> None -@@ -405,6 +407,7 @@ +@@ -409,6 +413,7 @@ | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> Some false @@ -24,44 +42,37 @@ (* Note: the following cases should not occur when compiling to Javascript *) | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) -@@ -524,6 +527,7 @@ +@@ -529,6 +534,7 @@ constant f a.(i) done; Format.fprintf f ")") + | Null -> Format.fprintf f "null" - + let arg f a = match a with -@@ -885,7 +889,7 @@ - | `Wasm -> true - | _ -> false) - | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ -- | Tuple (_, _, _) -> () -+ | Tuple (_, _, _) | Null -> () - in - let check_prim_arg = function - | Pc c -> check_constant c --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -179,6 +179,7 @@ +@@ -151,6 +151,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (** Only produced when compiling to WebAssembly. *) | Tuple of int * constant array * array_or_not + | Null - + module Constant : sig type t = constant --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -255,6 +255,7 @@ +@@ -458,7 +458,8 @@ | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) +- | Int _, Float _ | Float _, Int _ -> None + | Null, Null -> Some true - | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None ++ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None (* All other values may be distinct objects and thus different by [caml_js_equals]. *) | String _, _ -@@ -270,7 +271,9 @@ + | _, String _ +@@ -473,7 +474,9 @@ | NativeInt _, _ | _, NativeInt _ | Tuple _, _ @@ -69,46 +80,43 @@ + | _, Tuple _ + | Null, _ + | _, Null -> None - - let eval_instr ~target info ((x, loc) as i) = - match x with -@@ -408,6 +411,7 @@ + + (* [eval_prim] does not distinguish the two constants *) + let constant_equal a b = +@@ -486,10 +489,11 @@ + | Int32 a, Int32 b -> Int32.equal a b + | NativeInt a, NativeInt b -> Int32.equal a b + | Int64 a, Int64 b -> Int64.equal a b ++ | Null, Null -> true + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ (fun x -> match Flow.Info.def info x with | Some (Constant (Int x)) -> if Targetint.is_zero x then Zero else Non_zero + | Some (Constant Null) -> Zero | Some (Constant - ( Int32 _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -371,11 +371,12 @@ - | NativeInt _, NativeInt _, `Wasm -> - false (* [NativeInt]s are boxed in Wasm and are possibly different objects *) - | NativeInt _, NativeInt _, `JavaScript -> assert false -+ | Null, Null, _ -> true - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - + ( Int32 _ --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -497,6 +497,7 @@ +@@ -524,6 +524,7 @@ + Mlvalue.Block.make ~tag ~args:l, instrs) | Int i -> targetint i, instrs - | Int32 i | NativeInt i -> - J.ENum (J.Num.of_targetint (Targetint.of_int32_exn i)), instrs + | Int32 i | NativeInt i -> targetint (Targetint.of_int32_exn i), instrs + | Null -> s_var "null", instrs - + let constant ~ctx x level = let expr, instr = constant_rec ~ctx x level [] in --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -45,9 +45,7 @@ +@@ -36,9 +36,7 @@ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> let l = Array.of_list (List.map l ~f:constant_of_const) in Tuple (tag, l, Unknown) @@ -116,15 +124,17 @@ - - failwith "[Const_null] not supported in JavaScript yet." + | Const_null -> Null - - let rec find_loc_in_summary ident' = function - | Env.Env_empty -> None + + module Symtable = struct + (* Copied from ocaml/bytecomp/symtable.ml *) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -479,8 +479,14 @@ - - let ident_f32 = ident_of_custom (Obj.repr 0.s) - +@@ -471,8 +471,16 @@ + + let ident_native = ident_of_custom (Obj.repr 0n) + ++ let ident_f32 = ident_of_custom (Obj.repr 0.s) ++ + external is_null : Obj.t -> bool = "%is_null" + + let is_null obj = is_null (Sys.opaque_identity obj) @@ -137,131 +147,85 @@ then let tag = Obj.tag x in if tag = Obj.string_tag -@@ -528,6 +534,7 @@ - | Tuple _ -> false - | Int _ -> true - | Int32 _ | NativeInt _ -> false +@@ -523,6 +531,7 @@ + match target with + | `JavaScript -> true + | `Wasm -> false) + | Null -> true end - + let const32 i = Constant (Int (Targetint.of_int32_exn i)) -@@ -2960,9 +2967,6 @@ +@@ -2877,9 +2886,6 @@ } - + let constant_of_const x = Ocaml_compiler.constant_of_const x - [@@if ocaml_version < (5, 1, 0)] - - let constant_of_const x = Constants.parse x [@@if ocaml_version >= (5, 1, 0)] - + (* We currently rely on constants to be relocated before globals. *) let step1 t compunit code = ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -1068,6 +1068,13 @@ - | NativeInt i -> - let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in - return (Const, e) -+ | Null -> -+ let* var = -+ register_import -+ ~name:"null" -+ (Global { mut = false; typ = Type.value }) -+ in -+ return (Const, W.GlobalGet var) - - let translate c = - let* const, c = translate_rec c in ---- a/compiler/tests-ocaml/lib-atomic/test_atomic.ml -+++ b/compiler/tests-ocaml/lib-atomic/test_atomic.ml -@@ -1,39 +1,39 @@ - (* TEST *) - --let r = Atomic.make 1 --let () = assert (Atomic.get r = 1) -+let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 1 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 1) - --let () = Atomic.set r 2 --let () = assert (Atomic.get r = 2) -+let () = (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r 2 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 2) - --let () = assert (Atomic.exchange r 3 = 2) -+let () = assert ((Atomic.exchange [@ocaml.alert "-unsafe_multidomain"]) r 3 = 2) - --let () = assert (Atomic.compare_and_set r 3 4 = true) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = true) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert (Atomic.compare_and_set r 3 (-4) = false) --let () = assert (Atomic.get r = 4 ) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 (-4) = false) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4 ) - --let () = assert (Atomic.compare_and_set r 3 4 = false) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = false) - - let () = assert (Atomic.fetch_and_add r 2 = 4) --let () = assert (Atomic.get r = 6) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 6) - - let () = assert (Atomic.fetch_and_add r (-2) = 6) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert ((Atomic.incr r; Atomic.get r) = 5) -+let () = assert ((Atomic.incr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 5) - --let () = assert ((Atomic.decr r; Atomic.get r) = 4) -+let () = assert ((Atomic.decr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 4) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -- ignore (Atomic.set r (cur + 1), Atomic.set r (cur - 1)); -- assert (Atomic.get r <> cur) -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in -+ ignore ((Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur + 1), (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur - 1)); -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r <> cur) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in - ignore (Atomic.incr r, Atomic.decr r); -- assert (Atomic.get r = cur) -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = cur) --- a/lib/js_of_ocaml/js.ml +++ b/lib/js_of_ocaml/js.ml @@ -813,7 +813,7 @@ if isNaN s then failwith "parseFloat" else s - + let _ = - Printexc.register_printer (fun e -> + (Printexc.register_printer [@ocaml.alert "-unsafe_multidomain"]) (fun e -> if instanceof (Obj.magic e : < .. > t) error_constr then - let e = Js_error.of_error (Obj.magic e : error t) in[] + let e = Js_error.of_error (Obj.magic e : error t) in --- a/lib/runtime/jsoo_runtime.ml +++ b/lib/runtime/jsoo_runtime.ml -@@ -162,7 +162,7 @@ - +@@ -175,7 +175,7 @@ + exception Exn of t - + - let _ = Callback.register_exception "jsError" (Exn (Obj.magic [||])) + let _ = (Callback.register_exception [@ocaml.alert "-unsafe_multidomain"]) "jsError" (Exn (Obj.magic [||])) - - let raise_ : t -> 'a = Js.js_expr "(function (exn) { throw exn })" - + + external raise_ : t -> 'a = "caml_throw_js_exception" + +--- a/runtime/js/compare.js ++++ b/runtime/js/compare.js +@@ -18,6 +18,7 @@ + //Provides: caml_compare_val_tag + //Requires: caml_is_ml_string, caml_is_ml_bytes + function caml_compare_val_tag(a) { ++ if (a === null) return 1010; // null_tag + if (typeof a === "number") + return 1000; // int_tag (we use it for all numbers) + else if (caml_is_ml_bytes(a)) +@@ -93,6 +94,13 @@ + + // tags are different + if (tag_a !== tag_b) { ++ if (tag_a === 1010) { ++ // Null is less than anything else ++ return -1; ++ } ++ if (tag_b === 1010) { ++ return 1; ++ } + if (tag_a === 1000) { + if (tag_b === 1255) { + //immediate can compare against custom +@@ -193,6 +201,8 @@ + if (!Number.isNaN(b)) return -1; + } + break; ++ case 1010: // Null pointer ++ return 0; + case 1001: // The rest + // Here we can be in the following cases: + // 1. JavaScript primitive types --- a/runtime/js/domain.js +++ b/runtime/js/domain.js -@@ -36,6 +36,13 @@ +@@ -41,6 +41,13 @@ return 0; } - + +//Provides: caml_atomic_compare_exchange +function caml_atomic_compare_exchange(ref, o, n) { + var old = ref[1]; @@ -270,12 +234,12 @@ +} + //Provides: caml_atomic_fetch_add + //Version: >= 5 function caml_atomic_fetch_add(ref, i) { - var old = ref[1]; -@@ -43,6 +50,41 @@ +@@ -49,6 +56,41 @@ return old; } - + +//Provides: caml_atomic_add +function caml_atomic_add(ref, i) { + var old = ref[1]; @@ -312,8 +276,8 @@ +} + //Provides: caml_atomic_exchange + //Version: >= 5 function caml_atomic_exchange(ref, v) { - var r = ref[1]; --- a/runtime/js/marshal.js +++ b/runtime/js/marshal.js @@ -44,6 +44,7 @@ @@ -322,9 +286,9 @@ CODE_CUSTOM_FIXED: 0x19, + CODE_NULL: 0x1f }; - + //Provides: UInt8ArrayReader -@@ -539,6 +540,8 @@ +@@ -492,6 +493,8 @@ } if (intern_obj_table) intern_obj_table[obj_counter++] = v; return v; @@ -333,9 +297,9 @@ default: caml_failwith("input_value: ill-formed message"); } -@@ -742,7 +745,9 @@ +@@ -684,7 +687,9 @@ } - + function extern_rec(v) { - if (v.caml_custom) { + if (v === null) { @@ -346,7 +310,7 @@ var ops = caml_custom_ops[name]; --- a/runtime/js/obj.js +++ b/runtime/js/obj.js -@@ -46,7 +46,8 @@ +@@ -41,7 +41,8 @@ //Provides: caml_obj_tag //Requires: caml_is_ml_bytes, caml_is_ml_string function caml_obj_tag(x) { @@ -355,8 +319,8 @@ + else if (Array.isArray(x) && x[0] === x[0] >>> 0) return x[0]; else if (caml_is_ml_bytes(x)) return 252; else if (caml_is_ml_string(x)) return 252; - else if (x instanceof Function || typeof x == "function") return 247; -@@ -272,3 +273,16 @@ + else if (x instanceof Function || typeof x === "function") return 247; +@@ -244,3 +245,16 @@ function caml_custom_identifier(o) { return caml_string_of_jsstring(o.caml_custom); } @@ -373,12 +337,36 @@ +function caml_is_null(o) { + return o === null; +} +--- a/runtime/wasm/compare.wat ++++ b/runtime/wasm/compare.wat +@@ -25,6 +25,7 @@ + (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) + (import "obj" "caml_is_closure" + (func $caml_is_closure (param (ref eq)) (result i32))) ++ (import "obj" "null" (global $null (ref eq))) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param (ref eq)))) + (import "effect" "caml_is_continuation" +@@ -238,6 +239,13 @@ + (if (local.get $total) + (then + (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) ++ (if (ref.eq (local.get $v1) (global.get $null)) ++ (then ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 0))) ++ (else (return (i32.const -1)))))) ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 1)))) + (drop (block $v1_is_not_int (result (ref eq)) + (local.set $i1 + (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) --- a/runtime/wasm/domain.wat +++ b/runtime/wasm/domain.wat -@@ -34,6 +34,21 @@ +@@ -38,6 +38,21 @@ (else (ref.i31 (i32.const 0))))) - + + (func (export "caml_atomic_compare_exchange") + (param $ref (ref eq)) (param $o (ref eq)) (param $n (ref eq)) + (result (ref eq)) @@ -396,11 +384,11 @@ + (func (export "caml_atomic_load") (param (ref eq)) (result (ref eq)) (array.get $block (ref.cast (ref $block) (local.get 0)) (i32.const 1))) - -@@ -48,6 +63,61 @@ + +@@ -52,6 +67,61 @@ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) (local.get $old)) - + + (func (export "caml_atomic_add") + (param $ref (ref eq)) (param $i (ref eq)) (result (ref eq)) + (local $b (ref $block)) @@ -461,30 +449,29 @@ (local $b (ref $block)) --- a/runtime/wasm/obj.wat +++ b/runtime/wasm/obj.wat -@@ -86,6 +86,9 @@ +@@ -89,6 +89,9 @@ (field (ref $function_2)) (field (mut (ref null $cps_closure)))))) - + + (type $null (struct)) + (global $null (export "null") (ref eq) (struct.new $null)) + (global $forcing_tag i32 (i32.const 244)) (global $cont_tag (export "cont_tag") i32 (i32.const 245)) (global $lazy_tag (export "lazy_tag") i32 (i32.const 246)) -@@ -239,6 +242,8 @@ +@@ -243,6 +246,8 @@ (local.get $res)) - + (func (export "caml_obj_tag") (param $v (ref eq)) (result (ref eq)) + (if (ref.eq (local.get $v) (global.get $null)) + (then (return (ref.i31 (i32.const 1010))))) (if (ref.test (ref i31) (local.get $v)) (then (return (ref.i31 (i32.const 1000))))) (drop (block $not_block (result (ref eq)) -@@ -487,4 +492,20 @@ - (array.new_fixed $block 3 (ref.i31 (i32.const 0)) - (local.get $x) (local.get $y)) - (ref.as_non_null (global.get $caml_trampoline_ref)))))) --) +@@ -491,4 +496,22 @@ + (call $caml_callback_1 (local.get $f) (local.get $x)) + (local.get $y))) + )) + + (func (export "caml_is_null") (param $x (ref eq)) (result (ref eq)) + (if (result (ref eq)) (ref.eq (local.get $x) (global.get $null)) @@ -501,61 +488,6 @@ + (call $caml_failwith + (array.new_data $bytes $int_as_pointer_not_implemented + (i32.const 0) (i32.const 35))) -+ (ref.i31 (i32.const 0)))))) ---- a/runtime/js/compare.js -+++ b/runtime/js/compare.js -@@ -18,6 +18,7 @@ - //Provides: caml_compare_val_tag - //Requires: caml_is_ml_string, caml_is_ml_bytes - function caml_compare_val_tag(a) { -+ if (a === null) return 1010; // null_tag - if (typeof a === "number") - return 1000; // int_tag (we use it for all numbers) - else if (caml_is_ml_bytes(a)) -@@ -93,6 +94,13 @@ - - // tags are different - if (tag_a !== tag_b) { -+ if (tag_a === 1010) { -+ // Null is less than anything else -+ return -1; -+ } -+ if (tag_b === 1010) { -+ return 1; -+ } - if (tag_a === 1000) { - if (tag_b === 1255) { - //immediate can compare against custom -@@ -193,6 +201,8 @@ - if (!Number.isNaN(b)) return -1; - } - break; -+ case 1010: // Null pointer -+ return 0; - case 1001: // The rest - // Here we can be in the following cases: - // 1. JavaScript primitive types ---- a/runtime/wasm/compare.wat -+++ b/runtime/wasm/compare.wat -@@ -25,6 +25,7 @@ - (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) - (import "obj" "caml_is_closure" - (func $caml_is_closure (param (ref eq)) (result i32))) -+ (import "obj" "null" (global $null (ref eq))) - (import "fail" "caml_invalid_argument" - (func $caml_invalid_argument (param (ref eq)))) - (import "effect" "caml_is_continuation" -@@ -238,6 +239,13 @@ - (if (local.get $total) - (then - (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) -+ (if (ref.eq (local.get $v1) (global.get $null)) -+ (then -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 0))) -+ (else (return (i32.const -1)))))) -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 1)))) - (drop (block $v1_is_not_int (result (ref eq)) - (local.set $i1 - (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) ++ (ref.i31 (i32.const 0))))) ++ + ) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch index 43e4b69d0f..e69de29bb2 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch @@ -1,84 +0,0 @@ ---- a/compiler/tests-ocaml/lib-list/test.ml -+++ b/compiler/tests-ocaml/lib-list/test.ml -@@ -64,7 +64,7 @@ - let hello = ['H';'e';'l';'l';'o'] in - let world = ['W';'o';'r';'l';'d';'!'] in - let hello_world = hello @ [' '] @ world in -- assert (List.take 5 hello_world = hello); -+ (* assert (List.take 5 hello_world = hello); - assert (List.take 3 [1; 2; 3; 4; 5] = [1; 2; 3]); - assert (List.take 3 [1; 2] = [1; 2]); - assert (List.take 3 [] = []); -@@ -83,7 +83,7 @@ - assert (List.drop_while (fun x -> x < 3) [1; 2; 3; 4; 5; 1; 2; 3] - = [3; 4; 5; 1; 2; 3]); - assert (List.drop_while (fun x -> x < 9) [1; 2; 3] = []); -- assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); -+ assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); *) - assert (List.partition is_even [1; 2; 3; 4; 5] - = ([2; 4], [1; 3; 5])); - assert (List.partition_map string_of_even_or_int [1; 2; 3; 4; 5] ---- a/compiler/tests-ocaml/lib-queue/test.ml -+++ b/compiler/tests-ocaml/lib-queue/test.ml -@@ -137,11 +137,11 @@ - assert (Q.length q2 = 8); assert (Q.to_list q2 = [5; 6; 7; 8; 1; 2; 3; 4]); - ;; - --let () = -+(* let () = - let q = Q.create () in - Q.add 1 q; Q.drop q; assert (does_raise Q.drop q); - Q.add 2 q; Q.drop q; assert (does_raise Q.drop q); - assert (Q.length q = 0); --;; -+;; *) - - let () = print_endline "OK" ---- a/compiler/tests-ocaml/lib-hashtbl/hfun.expected -+++ b/compiler/tests-ocaml/lib-hashtbl/hfun.expected -@@ -8,19 +8,19 @@ - 2^30-1 23c392d0 - -2^30 0c66fde3 - -- Floats: --+0.0 0f478b8c ---0.0 0f478b8c -++0.0 07be548a -+-0.0 07be548a - +infty 23ea56fb - -infty 059f7872 - NaN 3228858d - NaN#2 3228858d - NaN#3 3228858d - -- Native integers: --0 3f19274a -+0 07be548a - -1 3653e015 --42 3e33aef8 --2^30-1 3711bf46 ---2^30 2e71f39c -+42 1792870b -+2^30-1 23c392d0 -+-2^30 0c66fde3 - -- Lists: - [0..10] 0ade0fc9 - [0..12] 0ade0fc9 ---- a/compiler/tests-ocaml/lib-uchar/test.ml -+++ b/compiler/tests-ocaml/lib-uchar/test.ml -@@ -74,7 +74,7 @@ - let test_hash () = - let f u = - assert (Hashtbl.hash u = Uchar.hash u); -- assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) -+ (* assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) *) - in - List.iter (Fun.compose f Uchar.of_int) - [0x0000; 0x002D; 0x00E9; 0x062D; 0x2014; 0x1F349] -@@ -117,7 +117,7 @@ - test_to_char (); - test_equal (); - test_compare (); -- test_hash (); -+ (* test_hash (); *) - test_utf_decode (); - test_utf_x_byte_length (); - () diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch index 81cc808404..401b0473f1 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch @@ -1,30 +1,25 @@ --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -31,22 +31,21 @@ +@@ -20,17 +20,16 @@ + + let rec constant_of_const c : Code.constant = let open Lambda in - let open Asttypes in match c with | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -- | Const_base (Const_int32 i) -> ( -+ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) - | `Wasm -> Int32 i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_int32 i) -> Int32 i - | Const_base (Const_int64 i) -> Int64 i +- | Const_base (Const_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i -- | Const_base (Const_nativeint i) -> ( -+ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_nativeint_warning_on_overflow i) - | `Wasm -> NativeInt (Int32.of_nativeint_warning_on_overflow i)) ++ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) | Const_immstring s -> String s - | Const_float_array sl -> + | Const_float_array sl | Const_float_block sl -> - let l = List.map ~f:(fun f -> float_of_string f) sl in + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> + | Const_block (tag, l) -> diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch new file mode 100644 index 0000000000..d3ce2130c0 --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch @@ -0,0 +1,41 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -216,6 +216,16 @@ + return 0; + } + ++//Provides: caml_atomic_compare_exchange_field ++//Version: >= 5 ++function caml_atomic_compare_exchange_field(ref, field, o, n) { ++ var old = ref[field + 1]; ++ if (old === o) { ++ ref[field + 1] = n; ++ } ++ return old; ++} ++ + //Provides: caml_atomic_set_field + //Version: >= 5 + function caml_atomic_set_field(ref, field, v) { +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -329,6 +329,19 @@ + (return (ref.i31 (i32.const 1))))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_atomic_compare_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)))) ++ (local.get $old)) ++ + (func (export "caml_atomic_exchange_field") + (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) + (local $b (ref $block)) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomics.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomics.patch new file mode 100644 index 0000000000..202c01205d --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomics.patch @@ -0,0 +1,238 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -99,6 +99,14 @@ + return r; + } + ++//Provides: caml_atomic_set ++//Version: >= 5 ++function caml_atomic_set(ref, v) { ++ var r = ref[1]; ++ ref[1] = v; ++ return 0; ++} ++ + //Provides: caml_atomic_make_contended + //Version: >= 5.2 + function caml_atomic_make_contended(a) { +@@ -175,3 +183,78 @@ + function caml_ml_domain_cpu_relax(unit) { + return 0; + } ++ ++//Provides: caml_atomic_load_field ++//Version: >= 5 ++function caml_atomic_load_field(ref, field) { ++ return ref[field + 1]; ++} ++ ++//Provides: caml_atomic_add_field ++//Version: >= 5 ++function caml_atomic_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return 0; ++} ++ ++//Provides: caml_atomic_fetch_add_field ++//Version: >= 5 ++function caml_atomic_fetch_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return old; ++} ++ ++//Provides: caml_atomic_cas_field ++//Version: >= 5 ++function caml_atomic_cas_field(ref, field, o, n) { ++ if (ref[field + 1] === o) { ++ ref[field + 1] = n; ++ return 1; ++ } ++ return 0; ++} ++ ++//Provides: caml_atomic_set_field ++//Version: >= 5 ++function caml_atomic_set_field(ref, field, v) { ++ ref[field + 1] = v; ++ return 0; ++} ++ ++//Provides: caml_atomic_exchange_field ++//Version: >= 5 ++function caml_atomic_exchange_field(ref, field, v) { ++ var old = ref[field + 1]; ++ ref[field + 1] = v; ++ return old; ++} ++ ++//Provides: caml_atomic_sub_field ++//Version: >= 5 ++function caml_atomic_sub_field(ref, field, i) { ++ ref[field + 1] -= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_land_field ++//Version: >= 5 ++function caml_atomic_land_field(ref, field, i) { ++ ref[field + 1] &= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lor_field ++//Version: >= 5 ++function caml_atomic_lor_field(ref, field, i) { ++ ref[field + 1] |= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lxor_field ++//Version: >= 5 ++function caml_atomic_lxor_field(ref, field, i) { ++ ref[field + 1] ^= i; ++ return 0; ++} +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -131,6 +131,15 @@ + (array.set $block (local.get $b) (i32.const 1) (local.get $v)) + (local.get $r)) + ++ (func (export "caml_atomic_set") ++ (param $ref (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $r (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $r (array.get $block (local.get $b) (i32.const 1))) ++ (array.set $block (local.get $b) (i32.const 1) (local.get $v)) ++ (ref.i31 (i32.const 0))) ++ + (func (export "caml_atomic_make_contended") + (param $v (ref eq)) (result (ref eq)) + (array.new_fixed $block 2 (ref.i31 (i32.const 0)) (local.get $v))) +@@ -220,4 +229,123 @@ + + (func (export "caml_ml_domain_cpu_relax") (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) ++ ++ ;; Atomic field operations ++ (func (export "caml_atomic_load_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (result (ref eq)) ++ (array.get $block ++ (ref.cast (ref $block) (local.get $ref)) ++ (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1)))) ++ ++ (func (export "caml_atomic_fetch_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_sub_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.sub (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_land_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.and (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.or (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lxor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.xor (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_cas_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)) ++ (return (ref.i31 (i32.const 1))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_set_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (ref.i31 (i32.const 0))) + ) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch index 48c3a6fc3b..4e4c985cb6 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch @@ -1,6 +1,6 @@ --- a/compiler/bin-js_of_ocaml/compile.ml +++ b/compiler/bin-js_of_ocaml/compile.ml -@@ -235,7 +235,7 @@ +@@ -311,7 +311,7 @@ sm in let output_partial @@ -11,48 +11,48 @@ code --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -213,16 +213,16 @@ +@@ -208,16 +208,16 @@ end - + module Cmo_format = struct - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + - let name (t : t) = t.cu_name [@@if ocaml_version < (5, 2, 0)] + let name (t : t) = t.cu_name |> Compilation_unit.name_as_string [@@if ocaml_version < (5, 2, 0)] - + let name (t : t) = let (Compunit name) = t.cu_name in name [@@if ocaml_version >= (5, 2, 0)] - + - let requires (t : t) = List.map ~f:Ident.name t.cu_required_globals + let requires (t : t) = List.map ~f:Compilation_unit.name_as_string t.cu_required_globals [@@if ocaml_version < (5, 2, 0)] - + let requires (t : t) = List.map t.cu_required_compunits ~f:(fun (Compunit u) -> u) --- a/compiler/lib/ocaml_compiler.mli +++ b/compiler/lib/ocaml_compiler.mli -@@ -55,7 +55,7 @@ +@@ -53,7 +53,7 @@ end - + module Cmo_format : sig - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + val name : t -> string - + @@ -65,5 +65,5 @@ - + val force_link : t -> bool - + - val imports : t -> (string * string option) list + val imports : t -> Import_info.t array end --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -2633,8 +2633,10 @@ - +@@ -2593,8 +2593,10 @@ + let read_crcs toc ic = ignore (seek_section toc ic "CRCS"); - let orig_crcs : (string * Digest.t option) list = input_value ic in @@ -61,10 +61,10 @@ + List.map (Array.to_list orig_crcs) ~f:(fun import -> + Import_info.name import |> Compilation_unit.Name.to_string, + Import_info.crc import) - + let read_prim toc ic = let prim_size = seek_section toc ic "PRIM" in -@@ -3096,7 +3098,7 @@ +@@ -3042,7 +3044,7 @@ then raise Magic_number.(Bad_magic_version magic); let compunit_pos = input_binary_int ic in seek_in ic compunit_pos; @@ -72,10 +72,10 @@ + let compunit : Cmo_format.compilation_unit_descr = input_value ic in `Cmo compunit | `Cma -> - if Config.Flag.check_magic () + if --- a/compiler/lib/parse_bytecode.mli +++ b/compiler/lib/parse_bytecode.mli -@@ -65,7 +65,7 @@ +@@ -58,7 +58,7 @@ ?includes:string list -> ?include_cmis:bool -> ?debug:bool @@ -83,34 +83,35 @@ + -> Cmo_format.compilation_unit_descr -> in_channel -> one - -@@ -79,7 +79,7 @@ - + +@@ -72,7 +72,7 @@ + val from_channel : in_channel - -> [ `Cmo of Cmo_format.compilation_unit | `Cma of Cmo_format.library | `Exe ] + -> [ `Cmo of Cmo_format.compilation_unit_descr | `Cma of Cmo_format.library | `Exe ] - + val from_string : - prims:string array + prims:string array -> debug:Instruct.debug_event list array -> string -> Code.program --- a/compiler/lib/unit_info.ml +++ b/compiler/lib/unit_info.ml -@@ -37,7 +37,7 @@ +@@ -46,7 +46,7 @@ ; effects_without_cps = false } - + -let of_cmo (cmo : Cmo_format.compilation_unit) = +let of_cmo (cmo : Cmo_format.compilation_unit_descr) = let open Ocaml_compiler in - let provides = StringSet.singleton (Cmo_format.name cmo) in - let requires = StringSet.of_list (Cmo_format.requires cmo) in + (* A packed librariy register global for packed modules. *) + let provides = StringSet.of_list (Cmo_format.name cmo :: Cmo_format.provides cmo) in --- a/compiler/lib/unit_info.mli +++ b/compiler/lib/unit_info.mli -@@ -26,6 +26,6 @@ +@@ -28,7 +28,7 @@ ; effects_without_cps : bool } - + -val of_cmo : Cmo_format.compilation_unit -> t +val of_cmo : Cmo_format.compilation_unit_descr -> t - - val union : t -> t -> t + + val of_primitives : aliases:(string * string) list -> string list -> t + diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch index 9d342bdecc..5879719115 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch @@ -14,17 +14,6 @@ if(!globalThis.jsoo_fs_tmp) globalThis.jsoo_fs_tmp = []; globalThis.jsoo_fs_tmp.push({name:name,content:content}); } ---- a/compiler/tests-full/fs.expected.js -+++ b/compiler/tests-full/fs.expected.js -@@ -18,6 +18,8 @@ - function a(a, b){ - if(c.jsoo_create_file) - c.jsoo_create_file(a, b); -+ else if(c.caml_create_file) -+ c.caml_create_file(a, b); - else{ - if(! c.caml_fs_tmp) c.caml_fs_tmp = []; - c.caml_fs_tmp.push({name: a, content: b}); --- a/runtime/js/fs.js +++ b/runtime/js/fs.js @@ -318,7 +318,7 @@ diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-float32.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-float32.patch index d1712d15e0..ba11933537 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-float32.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-float32.patch @@ -6,8 +6,8 @@ ; ieee_754 + ; float32 ; int64 - ; internalMod ; ints + ; io --- a/compiler/lib-runtime-files/tests/all.ml +++ b/compiler/lib-runtime-files/tests/all.ml @@ -21,6 +21,7 @@ @@ -18,17 +18,7 @@ +format.js +fs.js +fs_fake.js -@@ -52,7 +53,8 @@ - +toplevel.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl runtime; - [%expect - {| -@@ -65,6 +67,7 @@ +@@ -64,6 +65,7 @@ +domain.js +effect.js +fail.js @@ -36,52 +26,91 @@ +format.js +fs.js +fs_fake.js -@@ -94,7 +97,8 @@ - +sys.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl extra; - [%expect {| - +dynlink.js +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -170,6 +170,22 @@ + ] + }) + ++ let float32_type = ++ register_type "float32" (fun () -> ++ let* custom_operations = custom_operations_type in ++ let* custom = custom_type in ++ return ++ { supertype = Some custom ++ ; final = true ++ ; typ = ++ W.Struct ++ [ { mut = false ++ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) ++ } ++ ; { mut = false; typ = Value F32 } ++ ] ++ }) ++ + let int32_type = + register_type "int32" (fun () -> + let* custom_operations = custom_operations_type in +@@ -855,6 +871,18 @@ + in + if_mismatch + ++ let make_float32 e = ++ let* custom_operations = Type.custom_operations_type in ++ let* float32_ops = ++ register_import ++ ~name:"float32_ops" ++ (Global ++ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) ++ in ++ let* ty = Type.float32_type in ++ let* e = e in ++ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) ++ + let make_int32 ~kind e = + let* custom_operations = Type.custom_operations_type in + let* int32_ops = +@@ -1026,6 +1054,9 @@ + | Float f -> + let* ty = Type.float_type in + return (Const, W.StructNew (ty, [ Const (F64 (Int64.float_of_bits f)) ])) ++ | Float32 f -> ++ let* e = Memory.make_float32 (return (W.Const (F32 (Int64.float_of_bits f)))) in ++ return (Const, e) + | Float_array l -> + let l = Array.to_list l in + let* ty = Type.float_array_type in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -326,6 +326,7 @@ +@@ -260,6 +260,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t -@@ -358,8 +359,10 @@ - | NativeInt a, NativeInt b -> Some (Int32.equal a b) - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -300,6 +301,7 @@ + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None + | Int _, Float32 _ | Float32 _, Int _ -> None | Tuple ((0 | 254), _, _), Float_array _ -> None | Float_array _, Tuple ((0 | 254), _, _) -> None | ( Tuple _ -@@ -369,7 +372,7 @@ - | Int _ +@@ -310,6 +312,7 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Float_array _ ) ) -> Some false | ( Float_array _ , ( String _ -@@ -378,13 +381,13 @@ - | Int _ +@@ -319,12 +322,13 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ ) ) -> Some false | ( String _ - , (Int64 _ | Int _ | Int32 _ | NativeInt _ | Float _ | Tuple _ | Float_array _) ) -> @@ -93,12 +122,11 @@ Some false | ( Int64 _ , ( String _ -@@ -392,10 +395,12 @@ - | Int _ +@@ -333,9 +337,12 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ | Float_array _ ) ) -> Some false - | Float _, (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) -> @@ -108,7 +136,7 @@ Some false | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> -@@ -404,8 +409,8 @@ +@@ -344,8 +351,8 @@ | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) | NativeInt _, (Int _ | Int32 _) @@ -119,49 +147,54 @@ end type loc = -@@ -491,6 +496,7 @@ +@@ -432,6 +439,7 @@ | NativeString (Byte s) -> Format.fprintf f "%Sj" s | NativeString (Utf (Utf8 s)) -> Format.fprintf f "%Sj" s - | Float fl -> Format.fprintf f "%.12g" fl -+ | Float32 fl -> Format.fprintf f "%.9g" fl + | Float fl -> Format.fprintf f "%.12g" (Int64.float_of_bits fl) ++ | Float32 fl -> Format.fprintf f "%.9g" (Int64.float_of_bits fl) | Float_array a -> Format.fprintf f "[|"; for i = 0 to Array.length a - 1 do -@@ -878,7 +884,7 @@ - match target with - | `Wasm -> true - | _ -> false) -- | String _ | NativeString _ | Float _ | Float_array _ | Int _ | Int64 _ -+ | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ - | Tuple (_, _, _) -> () - in - let check_prim_arg = function --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -172,6 +172,7 @@ +@@ -148,6 +148,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t (** Only produced when compiling to WebAssembly. *) --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -251,9 +251,11 @@ - match a, b with +@@ -452,6 +452,9 @@ | Int i, Int j -> Some (Targetint.equal i j) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) -- | Int _, Float _ | Float _, Int _ -> None -+ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | String _, _ - | _, String _ -@@ -413,6 +415,7 @@ + | Int _, Float _ | Float _, Int _ -> None +@@ -476,6 +479,7 @@ + match a, b with + | Int i, Int j -> Targetint.equal i j + | Float a, Float b -> Int64.equal a b ++ | Float32 a, Float32 b -> Int64.equal a b + | NativeString a, NativeString b -> Native_string.equal a b + | String a, String b -> String.equal a b + | Int32 a, Int32 b -> Int32.equal a b +@@ -484,7 +488,7 @@ + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ ( Int32 _ | NativeInt _ | Float _ @@ -169,30 +202,9 @@ | Tuple _ | String _ | NativeString _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -354,7 +354,9 @@ - match a, b, target with - | Int i, Int j, _ -> Targetint.equal i j - | Float a, Float b, `JavaScript -> Float.bitwise_equal a b -+ | Float32 a, Float32 b, `JavaScript -> Float.bitwise_equal a b - | Float _, Float _, `Wasm -> false -+ | Float32 _, Float32 _, `Wasm -> false - | NativeString a, NativeString b, `JavaScript -> Native_string.equal a b - | NativeString _, NativeString _, `Wasm -> - false -@@ -373,7 +375,7 @@ - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -438,6 +438,7 @@ +@@ -466,6 +466,7 @@ | Byte x -> Share.get_byte_string str_js_byte x ctx.Ctx.share, instrs | Utf (Utf8 x) -> Share.get_utf_string str_js_utf8 x ctx.Ctx.share, instrs) | Float f -> float_const f, instrs @@ -200,7 +212,7 @@ | Float_array a -> ( Mlvalue.Array.make ~tag:Obj.double_array_tag -@@ -964,6 +965,13 @@ +@@ -1215,6 +1216,13 @@ register_bin_prim "caml_le_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Le, cx, cy))); register_bin_prim "caml_gt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cy, cx))); register_bin_prim "caml_lt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cx, cy))); @@ -216,171 +228,38 @@ register_bin_prim "caml_mul_float" `Pure (fun cx cy _ -> J.EBin (J.Mul, cx, cy)); --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -25,7 +25,8 @@ +@@ -24,7 +24,8 @@ + | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 Float32.(of_string s |> to_float) -+ | Const_base (Const_float s | Const_unboxed_float s) -> Float (float_of_string s) - | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -477,6 +477,8 @@ - - let ident_native = ident_of_custom (Obj.repr 0n) - -+ let ident_f32 = ident_of_custom (Obj.repr 0.s) -+ - let rec parse x = - if Obj.is_block x - then -@@ -490,6 +492,8 @@ +@@ -481,6 +481,8 @@ else if tag = Obj.custom_tag then match ident_of_custom x with + | Some name when same_ident name ident_f32 -> -+ Float32 ((Obj.magic x : float32) |> Float32.to_float) - | Some name when same_ident name ident_32 -> ( ++ Float32 (Int64.bits_of_float (Obj.magic x : float)) + | Some name when same_ident name ident_32 -> let i : int32 = Obj.magic x in - match Config.target () with -@@ -518,6 +522,7 @@ - let inlined = function + Int32 i +@@ -506,6 +508,7 @@ + match c with | String _ | NativeString _ -> false | Float _ -> true + | Float32 _ -> true | Float_array _ -> false | Int64 _ -> false | Tuple _ -> false ---- a/compiler/lib/stdlib.ml -+++ b/compiler/lib/stdlib.ml -@@ -417,6 +417,17 @@ - external ( >= ) : t -> t -> bool = "%greaterequal" - end - -+module Float32 = struct -+ type t = float32 -+ -+ external of_float : float -> t = "%float32offloat" -+ external to_float : t -> float = "%floatoffloat32" -+ -+ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. -+ This is not equivalent to native code, which parses to 32 bits directly. *) -+ let of_string s = float_of_string s |> of_float -+end -+ - module Bool = struct - external ( <> ) : bool -> bool -> bool = "%notequal" - ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -170,6 +170,22 @@ - ] - }) - -+ let float32_type = -+ register_type "float32" (fun () -> -+ let* custom_operations = custom_operations_type in -+ let* custom = custom_type in -+ return -+ { supertype = Some custom -+ ; final = true -+ ; typ = -+ W.Struct -+ [ { mut = false -+ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) -+ } -+ ; { mut = false; typ = Value F32 } -+ ] -+ }) -+ - let int32_type = - register_type "int32" (fun () -> - let* custom_operations = custom_operations_type in -@@ -853,6 +869,18 @@ - in - if_mismatch - -+ let make_float32 e = -+ let* custom_operations = Type.custom_operations_type in -+ let* float32_ops = -+ register_import -+ ~name:"float32_ops" -+ (Global -+ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) -+ in -+ let* ty = Type.float32_type in -+ let* e = e in -+ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) -+ - let make_int32 ~kind e = - let* custom_operations = Type.custom_operations_type in - let* int32_ops = -@@ -1023,6 +1051,9 @@ - | Float f -> - let* ty = Type.float_type in - return (Const, W.StructNew (ty, [ Const (F64 f) ])) -+ | Float32 f -> -+ let* e = Memory.make_float32 (return (W.Const (F32 f))) in -+ return (Const, e) - | Float_array l -> - let l = Array.to_list l in - let* ty = Type.float_array_type in ---- /dev/null -+++ b/compiler/tests-jsoo/test_marshal_float32.ml -@@ -0,0 +1,47 @@ -+ -+(* In javascript, float32s are represented as floats. -+ In native code and wasm, float32s are custom blocks containing a float32 field. *) -+ -+external float_of_float32 : float32 -> float = "%floatoffloat32" -+ -+type float64s = { a : float; b : float } -+ -+let%expect_test "float64 javascript" [@tags "js-only", "no-wasm"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\n\000\000\000\001\000\000\000\003\000\000\000\003\b\000\000\b\254\000{\001\001\200" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+let%expect_test "float64 wasm" [@tags "wasm-only"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\018\000\000\000\001\000\000\000\005\000\000\000\003\014\002\000\000\000\000\000\192^@\000\000\000\000\000\128|@" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+type float32s = { a : float32; b : float32 } -+ -+let%expect_test "float32 javascript" [@tags "js-only", "no-wasm"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\006\000\000\000\001\000\000\000\003\000\000\000\003\160\000{\001\001\200" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] -+ -+let%expect_test "float32 wasm" [@tags "wasm-only"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\021\000\000\000\003\000\000\000\t\000\000\000\t\160\025_f32\000B\246\000\000\025_f32\000C\228\000\000" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] --- /dev/null +++ b/runtime/js/float32.js -@@ -0,0 +1,361 @@ +@@ -0,0 +1,419 @@ + +/* + 32-bit floats are represented as javascript numbers, i.e. 64-bit floats. @@ -729,19 +608,77 @@ + return Math.fround(Math.trunc(x)); +} + -+//Provides: caml_simd_float32_round_neg_inf_bytecode const -+function caml_simd_float32_round_neg_inf_bytecode(x) { -+ return Math.fround(Math.floor(x)); ++//Provides: caml_make_unboxed_float32_vect_bytecode const (const) ++//Requires: caml_make_float_vect ++let caml_make_unboxed_float32_vect_bytecode = caml_make_float_vect ++ ++//Provides: caml_ba_float32_get_1 ++//Requires: caml_ba_get_1 ++let caml_ba_float32_get_1 = caml_ba_get_1 ++ ++//Provides: caml_ba_float32_get_2 ++//Requires: caml_ba_get_2 ++let caml_ba_float32_get_2 = caml_ba_get_2 ++ ++//Provides: caml_ba_float32_get_3 ++//Requires: caml_ba_get_3 ++let caml_ba_float32_get_3 = caml_ba_get_3 ++ ++//Provides: caml_ba_float32_set_1 ++//Requires: caml_ba_set_1 ++let caml_ba_float32_set_1 = caml_ba_set_1 ++ ++//Provides: caml_ba_float32_set_2 ++//Requires: caml_ba_set_2 ++let caml_ba_float32_set_2 = caml_ba_set_2 ++ ++//Provides: caml_ba_float32_set_3 ++//Requires: caml_ba_set_3 ++let caml_ba_float32_set_3 = caml_ba_set_3 ++ ++//Provides: caml_ba_uint8_getf32 ++//Requires: caml_ba_uint8_get32, caml_int32_float_of_bits ++function caml_ba_uint8_getf32(ba, i0) { ++ return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); +} + -+//Provides: caml_simd_float32_round_pos_inf_bytecode const -+function caml_simd_float32_round_pos_inf_bytecode(x) { -+ return Math.fround(Math.ceil(x)); ++//Provides: caml_ba_uint8_setf32 ++//Requires: caml_ba_uint8_set32, caml_int32_bits_of_float ++function caml_ba_uint8_setf32(ba, i0, v) { ++ return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); +} + -+//Provides: caml_simd_float32_round_towards_zero_bytecode const -+function caml_simd_float32_round_towards_zero_bytecode(x) { -+ return Math.fround(Math.trunc(x)); ++//Provides: caml_string_getf32 ++//Requires: caml_string_get32, caml_int32_float_of_bits ++function caml_string_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_string_get32(s, i)); ++} ++ ++//Provides: caml_bytes_getf32 ++//Requires: caml_bytes_get32, caml_int32_float_of_bits ++function caml_bytes_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_bytes_get32(s, i)); ++} ++ ++//Provides: caml_bytes_setf32 ++//Requires: caml_bytes_set32, caml_int32_bits_of_float ++function caml_bytes_setf32(s, i, f32) { ++ return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_failwith ++//If: js-string ++function caml_string_setf32(s, i, f32) { ++ caml_failwith("caml_string_setf32"); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_bytes_setf32 ++//If: !js-string ++function caml_string_setf32(s, i, f32) { ++ return caml_bytes_setf32(s, i, f32); ++} --- a/runtime/wasm/custom.wat +++ b/runtime/wasm/custom.wat @@ -16,6 +16,7 @@ @@ -1471,3 +1408,45 @@ + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) +) +--- a/compiler/lib/parse_bytecode.ml ++++ b/compiler/lib/parse_bytecode.ml +@@ -496,7 +496,7 @@ + then + match ident_of_custom x with + | Some name when same_ident name ident_f32 -> +- Float32 (Int64.bits_of_float (Obj.magic x : float)) ++ Float32 (Int64.bits_of_float ((Obj.magic x : float32) |> Float32.to_float)) + | Some name when same_ident name ident_32 -> + let i : int32 = Obj.magic x in + Int32 i +--- a/compiler/lib/stdlib.ml ++++ b/compiler/lib/stdlib.ml +@@ -369,6 +369,17 @@ + external ( >= ) : t -> t -> bool = "%greaterequal" + end + ++module Float32 = struct ++ type t = float32 ++ ++ external of_float : float -> t = "%float32offloat" ++ external to_float : t -> float = "%floatoffloat32" ++ ++ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. ++ This is not equivalent to native code, which parses to 32 bits directly. *) ++ let of_string s = float_of_string s |> of_float ++end ++ + module Bool = struct + include Bool + +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -25,7 +25,7 @@ + | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-gh2034.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-gh2034.patch new file mode 100644 index 0000000000..3dc5610654 --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-gh2034.patch @@ -0,0 +1,83 @@ +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -387,14 +387,18 @@ + (global.set $method_cache (local.get $a)))) + (local.set $ofs + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) (local.get $ofs))))) ++ (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (return +- (array.get $block +- (local.get $meths) (i32.sub (local.get $ofs) (i32.const 1)))))) ++ (if (i32.eq (local.get $tag) ++ (i31.get_s ++ (ref.cast (ref i31) ++ (array.get $block (local.get $meths) ++ (local.get $ofs))))) ++ (then ++ (return ++ (array.get $block ++ (local.get $meths) ++ (i32.sub (local.get $ofs) (i32.const 1)))))))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -382,7 +382,8 @@ + (array.new $int_array (i32.const 0) (i32.const 8))) + + (func (export "caml_get_public_method") +- (param $obj (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) ++ (param $obj (ref eq)) (param $vtag (ref eq)) (param (ref eq)) ++ (result (ref eq)) + (local $meths (ref $block)) + (local $tag i32) (local $cacheid i32) (local $ofs i32) + (local $li i32) (local $mi i32) (local $hi i32) +@@ -391,7 +392,6 @@ + (ref.cast (ref $block) + (array.get $block + (ref.cast (ref $block) (local.get $obj)) (i32.const 1)))) +- (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $cacheid (i31.get_u (ref.cast (ref i31) (local.get 2)))) + (local.set $len (array.len (global.get $method_cache))) + (if (i32.ge_s (local.get $cacheid) (local.get $len)) +@@ -409,16 +409,14 @@ + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) + (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (local.get $ofs))))) ++ (if (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) (local.get $ofs))) + (then + (return + (array.get $block + (local.get $meths) + (i32.sub (local.get $ofs) (i32.const 1)))))))) ++ (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get $vtag)))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +@@ -450,11 +448,9 @@ + (array.set $int_array (global.get $method_cache) (local.get $cacheid) + (i32.add (local.get $li) (i32.const 1))) + (if (result (ref eq)) +- (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (i32.add (local.get $li) (i32.const 1)))))) ++ (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) ++ (i32.add (local.get $li) (i32.const 1)))) + (then + (array.get $block (local.get $meths) (local.get $li))) + (else diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch new file mode 100644 index 0000000000..46d1621024 --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch @@ -0,0 +1,42 @@ +--- a/compiler/lib/global_deadcode.ml ++++ b/compiler/lib/global_deadcode.ml +@@ -434,7 +434,7 @@ + + They are returned; or + + They are applied to a function. + *) +-let zero prog sentinal live_table = ++let zero prog pure_funs sentinal live_table = + let compact_vars vars = + let i = ref (Array.length vars - 1) in + while !i >= 0 && Var.equal vars.(!i) sentinal do +@@ -483,13 +483,17 @@ + (* Zero out return values in last instruction, otherwise do nothing. *) + match block.branch with + | Return x -> +- let tc = +- (* We don't want to break tailcalls. *) ++ let live_tc = ++ (* Don't break tailcalls, it's needed for generate_closure ++ and effects passes. If the (tail)call is dead, it will ++ be eliminated later by the deadcode pass, don't make it live again by ++ returning its result. *) + match List.last body with +- | Some (Let (x', Apply _)) when Code.Var.equal x' x -> true ++ | Some (Let (x', (Apply _ as e))) -> ++ Code.Var.equal x x' && (is_live x' || not (Pure_fun.pure_expr pure_funs e)) + | Some _ | None -> false + in +- if tc then Return x else Return (zero_var x) ++ if live_tc then Return x else Return (zero_var x) + | Raise (_, _) + | Stop | Branch _ + | Cond (_, _, _) +@@ -581,7 +585,7 @@ + Print.print_uses uses; + Print.print_live_tbl live_table); + (* Zero out dead fields *) +- let p = zero p deadcode_sentinal live_table in ++ let p = zero p pure_funs deadcode_sentinal live_table in + if debug () + then ( + Format.eprintf "After Zeroing:@."; diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch index a9e15c1f4c..33d9968c58 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch @@ -1,9 +1,10 @@ --- a/runtime/js/array.js +++ b/runtime/js/array.js -@@ -249,3 +249,12 @@ - return caml_array_make(len, init); +@@ -131,3 +131,13 @@ + for (var i = 1; i < len; i++) b[i] = 0; + return b } - ++ +// Provides: caml_iarray_of_array const +function caml_iarray_of_array(a) { + return a; @@ -15,7 +16,7 @@ +} --- a/runtime/wasm/array.wat +++ b/runtime/wasm/array.wat -@@ -403,4 +403,13 @@ +@@ -293,4 +293,13 @@ (struct.get $float 0 (ref.cast (ref $float) (local.get $v))) (local.get $len)))) (ref.i31 (i32.const 0))) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch index 5ac6abeadd..578d7b30ad 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch @@ -1,10 +1,9 @@ --- a/runtime/js/sys.js +++ b/runtime/js/sys.js -@@ -290,8 +290,13 @@ - function caml_sys_isatty(_chan) { +@@ -300,6 +300,11 @@ return 0; } - + +//Provides: caml_sys_const_runtime5 const +function caml_sys_const_runtime5(_unit) { + return 0; @@ -13,16 +12,16 @@ //Provides: caml_runtime_variant //Requires: caml_string_of_jsbytes function caml_runtime_variant(_unit) { - return caml_string_of_jsbytes(""); --- a/runtime/wasm/sys.wat +++ b/runtime/wasm/sys.wat -@@ -146,5 +146,9 @@ +@@ -154,6 +154,10 @@ (param (ref eq)) (result (ref eq)) (ref.i31 (i32.const 0))) - + + (func (export "caml_sys_const_runtime5") + (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) + - (func (export "caml_runtime_variant") (param (ref eq)) (result (ref eq)) - (array.new_fixed $bytes 0)) + (@string $Unix "Unix") + (@string $Win32 "Win32") + diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-local-bytes.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-local-bytes.patch new file mode 100644 index 0000000000..f1e0ec62b5 --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-local-bytes.patch @@ -0,0 +1,22 @@ +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -504,6 +504,7 @@ + } + + //Provides: caml_create_bytes const ++//Alias: caml_create_local_bytes + //Requires: MlBytes,caml_invalid_argument + function caml_create_bytes(len) { + if (len < 0) caml_invalid_argument("Bytes.create"); +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -121,7 +121,8 @@ + + (@string $Bytes_create "Bytes.create") + +- (func (export "caml_create_bytes") ++ (export "caml_create_local_bytes" (func $caml_create_bytes)) ++ (func $caml_create_bytes (export "caml_create_bytes") + (param $len (ref eq)) (result (ref eq)) + (local $l i32) + (local.set $l (i31.get_s (ref.cast (ref i31) (local.get $len)))) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch index ad24d6a85f..24ec30b5bb 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch @@ -6,7 +6,7 @@ -let v = - let current = Ocaml_version.current in -+let v = 561 ++let v = 568 + (* let current = Ocaml_version.current in match current with | 4 :: 08 :: _ -> 25 diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch index 5542a69282..e40549d323 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch @@ -1,18 +1,14 @@ --- a/compiler/lib/instr.ml +++ b/compiler/lib/instr.ml -@@ -169,6 +169,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -173,6 +173,7 @@ | RESUME | RESUMETERM -@@ -353,13 +354,14 @@ - ; RERAISE, KStop 0, "RERAISE" - ; RAISE_NOTRACE, KStop 0, "RAISE_NOTRACE" - ; GETSTRINGCHAR, KNullary, "GETSTRINGCHAR" - ; PERFORM, if_v500 KNullaryCall, "PERFORM" + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + let equal (a : t) b = Poly.equal a b +@@ -360,6 +361,7 @@ ; RESUME, if_v500 KNullaryCall, "RESUME" ; RESUMETERM, if_v500 (KStop 1), "RESUMETERM" ; REPERFORMTERM, if_v500 (KStop 1), "REPERFORMTERM" @@ -20,22 +16,30 @@ ; FIRST_UNIMPLEMENTED_OP, K_will_not_happen, "FIRST_UNIMPLEMENTED_OP" |] in - let ops = - Array.mapi ~f:(fun i (c, k, n) -> { code = c; kind = k; name = n; opcode = i }) instrs - in --- a/compiler/lib/instr.mli +++ b/compiler/lib/instr.mli -@@ -168,6 +168,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -172,6 +172,7 @@ | RESUME | RESUMETERM + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + type kind = +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -32,7 +32,7 @@ + | Const_float_array sl | Const_float_block sl -> + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in + Float_array (Array.of_list l) +- | Const_block (tag, l) -> ++ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> + let l = Array.of_list (List.map l ~f:constant_of_const) in + Tuple (tag, l, Unknown) + --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -1375,7 +1375,7 @@ +@@ -1412,7 +1412,7 @@ (pc + 2) state (Let (x, Block (i, [||], Unknown, Maybe_mutable)) :: instrs) @@ -44,13 +48,3 @@ let size = getu code (pc + 1) in let tag = getu code (pc + 2) in let state = State.push state in ---- a/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:34:59 2024 -0400 -+++ b/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:28:48 2024 -0400 -@@ -42,6 +42,6 @@ - Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> - Int (Targetint.of_int_warning_on_overflow i) -- | Const_block (tag, l) -> -+ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> - let l = Array.of_list (List.map l ~f:constant_of_const) in - Tuple (tag, l, Unknown) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch index ff51bbb6f9..3545c53168 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch @@ -1,15 +1,16 @@ --- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml +++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml -@@ -250,7 +250,7 @@ - in - let make_fun (label, pat) (label', typ) expr = - assert (label' = label); -- Exp.fun_ label None (Pat.constraint_ pat typ) expr -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr +@@ -267,7 +267,8 @@ + | _ -> c, b + in + { expr with pexp_desc = Pexp_function (params, c, b) } +- | _ -> Exp.fun_ label None (Pat.constraint_ pat typ) expr ++ | _ -> ++ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr in let invoker = List.fold_right2 -@@ -309,10 +309,10 @@ +@@ -326,10 +327,10 @@ in Exp.apply ~loc:apply_loc @@ -22,7 +23,7 @@ ~loc:gloc nolabel None -@@ -355,7 +355,7 @@ +@@ -372,7 +373,7 @@ invoker [ app_arg obj ; app_arg @@ -31,7 +32,7 @@ ~loc:gloc nolabel None -@@ -379,9 +379,8 @@ +@@ -396,9 +397,8 @@ let prop_set ~loc ~prop_loc obj prop value = let gloc = { obj.pexp_loc with Location.loc_ghost = true } in let obj = @@ -43,7 +44,7 @@ in let invoker = invoker -@@ -409,7 +408,7 @@ +@@ -426,7 +426,7 @@ [ app_arg obj ; app_arg value ; app_arg @@ -52,52 +53,9 @@ ~loc:{ loc with loc_ghost = true } nolabel None -@@ -583,11 +582,14 @@ - | Pcf_method (id, priv, Cfk_concrete (bang, body)) -> - let names = check_name id names in - let body, body_ty = drop_pexp_poly (mappper body) in - let rec create_meth_ty exp = - match exp.pexp_desc with -- | Pexp_fun (label, _, _, body) -> Arg.make ~label () :: create_meth_ty body -- | Pexp_function _ -> [ Arg.make () ] -+ | Pexp_function (params, _, _) -> -+ List.filter_map params ~f:(fun param -> -+ match param.pparam_desc with -+ | Pparam_val (label, _, _) -> Some (Arg.make ~label ()) -+ | Pparam_newtype _ -> None) -- | Pexp_newtype (_, body) -> create_meth_ty body -+ | Pexp_newtype (_, _, body) -> create_meth_ty body - | _ -> [] - in - let fun_ty = create_meth_ty body in -@@ -641,7 +643,7 @@ - let body = function - | Val (_, _, _, body) -> body - | Meth (_, _, _, body, _) -> -- Exp.fun_ ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body +@@ -935,3 +935,5 @@ + |> Ppxlib_ast.Selected_ast.to_ocaml Expression in - let extra_types = - List.concat -@@ -725,14 +727,17 @@ - invoker - (List.map fields ~f:(fun f -> app_arg (body f)) - @ [ app_arg -- { (List.fold_right -+ (let body = -+ List.fold_right - (self :: List.map fields ~f:(fun f -> (name f).txt)) - ~init:fake_object - ~f:(fun name fun_ -> -- Exp.fun_ ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_)) -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_) -+ in -+ { body - with -- pexp_attributes = [ merlin_hide ] -- } -+ pexp_attributes = body.pexp_attributes @ [ merlin_hide ] -+ }) - ]) - - let transform = + { Ocaml_ast_mapper.default_mapper with expr } ++ ++ diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch new file mode 100644 index 0000000000..d82b9d1fb8 --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch @@ -0,0 +1,24 @@ +--- a/toplevel/lib/jsooTop.ml ++++ b/toplevel/lib/jsooTop.ml +@@ -65,6 +65,7 @@ + p := !p + len''; + len'' + ++[%%if ocaml_version < (4, 14, 0)] + let use ffp content = + let fname, oc = + Filename.open_temp_file ~mode:[ Open_binary ] "jsoo_toplevel" "fake_stdin" +@@ -78,10 +79,11 @@ + with e -> + Sys.remove fname; + raise e +-[@@if ocaml_version < (4, 14, 0)] ++[%%endif] + ++[%%if ocaml_version >= (4, 14, 0)] + let use ffp content = Toploop.use_silently ffp (String content) +-[@@if ocaml_version >= (4, 14, 0)] ++[%%endif] + + let execute printval ?pp_code ?highlight_location pp_answer s = + let lb = Lexing.from_function (refill_lexbuf s (ref 0) pp_code) in diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch new file mode 100644 index 0000000000..f33c06a02c --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch @@ -0,0 +1,91 @@ +--- a/compiler/ppx/ppx_optcomp_light.ml ++++ b/compiler/ppx/ppx_optcomp_light.ml +@@ -148,7 +148,8 @@ + | [] -> true + | _ -> ( + try +- let keep_one { attr_payload; attr_loc; _ } = ++ let keep_one ({ attr_payload; attr_loc; _ } as attr) = ++ Ppxlib.Attribute.mark_as_handled_manually attr; + let e = + match attr_payload with + | PStr [ { pstr_desc = Pstr_eval (e, []); _ } ] -> e +--- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml ++++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml +@@ -537,14 +537,6 @@ + + let rec create_meth_ty exp = + match exp.pexp_desc with +- | Pexp_fun (label, _, _, body) -> label :: create_meth_ty body +- | Pexp_function _ -> [ nolabel ] +- | Pexp_newtype (_, body) -> create_meth_ty body +- | _ -> [] +-[@@if ast_version < 502] +- +-let rec create_meth_ty exp = +- match exp.pexp_desc with + | Pexp_function (params, _, body) -> ( + List.filter_map params ~f:(function + | { pparam_desc = Pparam_newtype _; _ } -> None +@@ -556,7 +548,6 @@ + (* TODO: should we recurse or not ? *) + create_meth_ty e) + | _ -> [] +-[@@if ast_version >= 502] + + let preprocess_literal_object mappper fields : + [ `Fields of field_desc list | `Error of _ ] = +@@ -685,7 +676,7 @@ + | Val (_, _, _, body) -> body + | Meth (_, _, _, (body, ty), _) -> ( + match body.pexp_desc, ty with +- | ((Pexp_function (params, c, b), None) [@if ast_version >= 502]) -> ++ | ((Pexp_function (params, c, b), None)) -> + let params = + { pparam_desc = Pparam_val (nolabel, None, self_id) + ; pparam_loc = { body.pexp_loc with loc_ghost = true } +@@ -693,9 +684,9 @@ + :: params + in + { body with pexp_desc = Pexp_function (params, c, b) } +- | ((_, Some ty) [@if ast_version >= 502]) -> ( ++ | ((_, Some ty)) -> ( + let e = +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -703,18 +694,13 @@ + body + in + match e.pexp_desc with +- | Pexp_function (params, None, b) -> +- { e with pexp_desc = Pexp_function (params, Some (Pconstraint ty), b) } ++ | Pexp_function (params, ({ ret_type_constraint = None ; _ } as function_constraint), b) -> ++ let ret_type_constraint = Some (Pconstraint ty) in ++ let function_constraint = { function_constraint with ret_type_constraint } in ++ { e with pexp_desc = Pexp_function (params, function_constraint , b) } + | _ -> assert false) +- | ((_, Some ty) [@if ast_version < 502]) -> +- Exp.fun_ +- ~loc:{ body.pexp_loc with loc_ghost = true } +- Nolabel +- None +- self_id +- (Exp.constraint_ body ty) + | _, None -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -818,7 +804,7 @@ + in + { fun_ with pexp_desc = Pexp_function (params, c, b) } + | _ -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:gloc + nolabel + None diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch index 65c5b1c5ed..e69de29bb2 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch @@ -1,29 +0,0 @@ ---- a/compiler/tests-jsoo/test_floats.ml -+++ b/compiler/tests-jsoo/test_floats.ml -@@ -26,26 +26,6 @@ - Printf.printf "%g\n" (1. /. z); - [%expect {|-inf|}] - --module Float = struct -- include Float -- -- external acosh : float -> float = "caml_acosh_float" -- -- external asinh : float -> float = "caml_asinh_float" -- -- external atanh : float -> float = "caml_atanh_float" -- -- external erf : float -> float = "caml_erf_float" -- -- external erfc : float -> float = "caml_erfc_float" -- -- external cbrt : float -> float = "caml_cbrt_float" -- -- external exp2 : float -> float = "caml_exp2_float" -- -- external log2 : float -> float = "caml_log2_float" --end -- - let print f = - match Float.classify_float f with - | FP_nan -> print_endline "nan" diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch new file mode 100644 index 0000000000..52db6e50b2 --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch @@ -0,0 +1,158 @@ +--- b/compiler/lib/reserved.ml ++++ a/compiler/lib/reserved.ml +@@ -144,7 +144,6 @@ + ; "require" (* only available in node *) + ; "Symbol" + ; "ArrayBuffer" +- ; "DataView" + ; "Float32Array" + ; "Float64Array" + ; "Int16Array" +--- b/runtime/js/ieee_754.js ++++ a/runtime/js/ieee_754.js +@@ -17,27 +17,74 @@ + // along with this program; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +-//Provides: jsoo_dataview +-var jsoo_dataview = new DataView(new ArrayBuffer(8)); ++//Provides: jsoo_floor_log2 ++var log2_ok = Math.log2 && Math.log2(1.1235582092889474e307) === 1020; ++function jsoo_floor_log2(x) { ++ if (log2_ok) return Math.floor(Math.log2(x)); ++ var i = 0; ++ if (x === 0) return Number.NEGATIVE_INFINITY; ++ if (x >= 1) { ++ while (x >= 2) { ++ x /= 2; ++ i++; ++ } ++ } else { ++ while (x < 1) { ++ x *= 2; ++ i--; ++ } ++ } ++ return i; ++} + + //Provides: caml_int64_bits_of_float const +-//Requires: caml_int64_create_lo_mi_hi +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2, caml_int64_create_lo_mi_hi + function caml_int64_bits_of_float(x) { +- jsoo_dataview.setFloat64(0, x, true); +- var lo32 = jsoo_dataview.getUint32(0, true); +- var hi32 = jsoo_dataview.getUint32(4, true); +- var r1 = lo32 & 0xffffff; +- var r2 = (lo32 >>> 24) | ((hi32 << 8) & 0xffffff); +- var r3 = (hi32 >>> 16) & 0xffff; ++ if (!Number.isFinite(x)) { ++ if (Number.isNaN(x)) return caml_int64_create_lo_mi_hi(1, 0, 0x7ff0); ++ if (x > 0) return caml_int64_create_lo_mi_hi(0, 0, 0x7ff0); ++ else return caml_int64_create_lo_mi_hi(0, 0, 0xfff0); ++ } ++ var sign = ++ x === 0 && 1 / x === Number.NEGATIVE_INFINITY ++ ? 0x8000 ++ : x >= 0 ++ ? 0 ++ : 0x8000; ++ if (sign) x = -x; ++ // Int64.bits_of_float 1.1235582092889474E+307 = 0x7fb0000000000000L ++ // using Math.LOG2E*Math.log(x) in place of Math.log2 result in precision lost ++ var exp = jsoo_floor_log2(x) + 1023; ++ if (exp <= 0) { ++ exp = 0; ++ x /= Math.pow(2, -1026); ++ } else { ++ x /= Math.pow(2, exp - 1027); ++ if (x < 16) { ++ x *= 2; ++ exp -= 1; ++ } ++ if (exp === 0) { ++ x /= 2; ++ } ++ } ++ var k = Math.pow(2, 24); ++ var r3 = x | 0; ++ x = (x - r3) * k; ++ var r2 = x | 0; ++ x = (x - r2) * k; ++ var r1 = x | 0; ++ r3 = (r3 & 0xf) | sign | (exp << 4); + return caml_int64_create_lo_mi_hi(r1, r2, r3); + } + + //Provides: caml_int32_bits_of_float const +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2 + function caml_int32_bits_of_float(x) { +- jsoo_dataview.setFloat32(0, x, true); +- return jsoo_dataview.getUint32(0, true) | 0; ++ var float32a = new Float32Array(1); ++ float32a[0] = x; ++ var int32a = new Int32Array(float32a.buffer); ++ return int32a[0] | 0; + } + + //FP literals can be written using the hexadecimal +@@ -103,14 +150,24 @@ + } + + //Provides: caml_int64_float_of_bits const +-//Requires: jsoo_dataview + function caml_int64_float_of_bits(x) { + var lo = x.lo; + var mi = x.mi; + var hi = x.hi; +- jsoo_dataview.setUint32(0, lo | (mi << 24), true); +- jsoo_dataview.setUint32(4, (mi >>> 8) | (hi << 16), true); +- return jsoo_dataview.getFloat64(0, true); ++ var exp = (hi & 0x7fff) >> 4; ++ if (exp === 2047) { ++ if ((lo | mi | (hi & 0xf)) === 0) ++ return hi & 0x8000 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY; ++ else return Number.NaN; ++ } ++ var k = Math.pow(2, -24); ++ var res = (lo * k + mi) * k + (hi & 0xf); ++ if (exp > 0) { ++ res += 16; ++ res *= Math.pow(2, exp - 1027); ++ } else res *= Math.pow(2, -1026); ++ if (hi & 0x8000) res = -res; ++ return res; + } + + //Provides: caml_nextafter_float const +@@ -135,10 +192,11 @@ + } + + //Provides: caml_int32_float_of_bits const +-//Requires: jsoo_dataview + function caml_int32_float_of_bits(x) { +- jsoo_dataview.setUint32(0, x, true); +- return jsoo_dataview.getFloat32(0, true); ++ var int32a = new Int32Array(1); ++ int32a[0] = x; ++ var float32a = new Float32Array(int32a.buffer); ++ return float32a[0]; + } + + //Provides: caml_classify_float const +@@ -186,11 +244,12 @@ + return x; + } + //Provides: caml_frexp_float const ++//Requires: jsoo_floor_log2 + function caml_frexp_float(x) { + if (x === 0 || !Number.isFinite(x)) return [0, x, 0]; + var neg = x < 0; + if (neg) x = -x; +- var exp = Math.max(-1023, Math.floor(Math.log2(x)) + 1); ++ var exp = Math.max(-1023, jsoo_floor_log2(x) + 1); + x *= Math.pow(2, -exp); + while (x < 0.5) { + x *= 2; diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch new file mode 100644 index 0000000000..3058a0eac5 --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch @@ -0,0 +1,19 @@ +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -21,8 +21,14 @@ + let rec constant_of_const c : Code.constant = + let open Lambda in + match c with +- | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) +- | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) ++ | Const_base ++ (Const_int8 i | Const_untagged_int8 i | ++ Const_int16 i | Const_untagged_int16 i | ++ Const_int i | Const_untagged_int i) -> ++ Int (Targetint.of_int_warning_on_overflow i) ++ ++ | Const_base (Const_char c | Const_untagged_char c) -> ++ Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch new file mode 100644 index 0000000000..7e3dd48e83 --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch @@ -0,0 +1,12 @@ +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -285,7 +285,8 @@ + | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) +- | "caml_int64_bits_of_float", [ Float f ] -> int64 f ++ ++ (* | "caml_int64_bits_of_float", [ Float f ] -> int64 f *) + | "caml_int64_float_of_bits", [ Int64 i ] -> Some (Float i) + | "caml_int64_of_float", [ Float f ] -> + int64 (Int64.of_float (Int64.float_of_bits f)) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch index d3b426a837..e69de29bb2 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch @@ -1,20 +0,0 @@ ---- a/compiler/tests-jsoo/gh_1307.ml -+++ b/compiler/tests-jsoo/gh_1307.ml -@@ -15,7 +15,7 @@ - test "a"; - [%expect {| - input: "a" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - test "aa"; - [%expect {| -@@ -25,7 +25,7 @@ - test "aaa"; - [%expect {| - input: "aaa" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - let (_ : bool) = Parsing.set_trace old in - () diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch new file mode 100644 index 0000000000..23d27d2bf7 --- /dev/null +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch @@ -0,0 +1,1531 @@ +--- a/compiler/lib-wasm/generate.ml ++++ b/compiler/lib-wasm/generate.ml +@@ -99,32 +99,53 @@ + + let specialized_primitives = + let h = String.Hashtbl.create 18 in ++ let caml_accessors = ++ let ( let* ) l f = List.concat_map l ~f in ++ let* index_type, index_suffix = ++ [ Value, "" ++ ; Int32, "_indexed_by_int32" ++ ; Int64, "_indexed_by_int64" ++ ; Nativeint, "_indexed_by_nativeint" ++ ] ++ in ++ let* data_type, data_type_name = ++ [ Value, "16"; Int32, "32"; Int64, "64"; Value, "f32" ] ++ in ++ let* array_type_name, accessors = ++ [ "string", [ `Get ]; "bytes", [ `Get; `Set ]; "ba_uint8", [ `Get; `Set ] ] ++ in ++ let* op = accessors in ++ [ (match op with ++ | `Get -> ++ ( "caml_" ^ array_type_name ^ "_get" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type ], data_type) ) ++ | `Set -> ++ ( "caml_" ^ array_type_name ^ "_set" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type; data_type ], Value) )) ++ ] ++ in + List.iter + ~f:(fun (nm, typ) -> String.Hashtbl.add h nm typ) ++ (caml_accessors @ + [ "caml_int32_bswap", (`Pure, [ Int32 ], Int32) + ; "caml_nativeint_bswap", (`Pure, [ Nativeint ], Nativeint) + ; "caml_int64_bswap", (`Pure, [ Int64 ], Int64) + ; "caml_int32_compare", (`Pure, [ Int32; Int32 ], Value) ++ ; "caml_checked_int32_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_nativeint_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_int64_to_int32", (`Pure, [ Int64 ], Int32) + ; "caml_nativeint_compare", (`Pure, [ Nativeint; Nativeint ], Value) + ; "caml_int64_compare", (`Pure, [ Int64; Int64 ], Value) +- ; "caml_string_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_string_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_bytes_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_bytes_set64", (`Mutator, [ Value; Value; Int64 ], Value) ++ ; "caml_float16_of_double", (`Pure, [ Float ], Int32) ++ ; "caml_double_of_float16", (`Pure, [ Int32 ], Float) + ; "caml_lxm_next", (`Pure, [ Value ], Int64) +- ; "caml_ba_uint8_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_ba_uint8_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_ba_uint8_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_ba_uint8_set64", (`Mutator, [ Value; Value; Int64 ], Value) + ; "caml_nextafter_float", (`Pure, [ Float; Float ], Float) + ; "caml_classify_float", (`Pure, [ Float ], Value) + ; "caml_ldexp_float", (`Pure, [ Float; Value ], Float) + ; "caml_erf_float", (`Pure, [ Float ], Float) + ; "caml_erfc_float", (`Pure, [ Float ], Float) + ; "caml_float_compare", (`Pure, [ Float; Float ], Value) +- ]; ++ ]); + h + + let float_bin_op' op f g = +@@ -233,8 +254,42 @@ + let () = + register_bin_prim "caml_array_unsafe_get" `Mutable Memory.gen_array_get; + register_bin_prim "caml_floatarray_unsafe_get" `Mutable Memory.float_array_get; ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int32" `Mutable (fun x y -> ++ let conv = Memory.unbox_int32 in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int64" `Mutator (fun x y -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ register_bin_prim "caml_array_unsafe_get_indexed_by_nativeint" `Mutable (fun x y -> ++ let conv = Memory.unbox_nativeint in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); + register_tern_prim "caml_array_unsafe_set" (fun x y z -> + seq (Memory.gen_array_set x y z) Value.unit); ++ let unboxed_indexed_array_access conv x y z = ++ seq (Memory.gen_array_set x (Value.val_int (conv y)) z) Value.unit ++ in ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int32" (fun x y z -> ++ let conv = Memory.unbox_int32 in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int64" (fun x y z -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_nativeint" (fun x y z -> ++ let conv = Memory.unbox_nativeint in ++ unboxed_indexed_array_access conv x y z ++ ); + register_tern_prim "caml_array_unsafe_set_addr" (fun x y z -> + seq (Memory.array_set x y z) Value.unit); + register_tern_prim "caml_floatarray_unsafe_set" (fun x y z -> +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -281,6 +281,8 @@ + | "caml_nativeint_compare", [ NativeInt i; NativeInt j ] -> + Some (Int (Targetint.of_int_exn (Int32.compare i j))) + | "caml_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) + (* CR-someday jrodriguez: [Float_u.Option.none ()] is a very specific, sentinel NaN. +@@ -650,7 +652,7 @@ + else None + in + match res with +- | Some c -> ++ | Some c when Var.idx x < Info.info_defs_length info -> + let c = Constant c in + Flow.Info.update_def info x c; + incr update_count; +--- a/compiler/lib/flow.ml ++++ b/compiler/lib/flow.ml +@@ -56,6 +56,9 @@ + let update_def { info_defs; _ } x exp = + let idx = Code.Var.idx x in + info_defs.(idx) <- Expr exp ++ ;; ++ ++ let info_defs_length { info_defs; _ } = Array.length info_defs + end + + let undefined = Phi Var.Set.empty +@@ -363,6 +366,13 @@ + let the_const_of ~eq info x = + match x with + | Pv x -> ++ ++ (* If this variable was minted after we constructed the info table, conservatively ++ assume we know nothing. Transformations of array-access primitives in ++ [specialize_js.ml] mint variables in this way. *) ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -386,11 +396,15 @@ + | Some i, Some j when eq i j -> u + | _ -> None) + x ++ ) + | Pc c -> Some c + + let the_int info x = + match x with + | Pv x -> ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -403,6 +417,7 @@ + | Some i, Some j when Targetint.equal i j -> u + | _ -> None) + x ++ ) + | Pc (Int c) -> Some c + | Pc _ -> None + +--- a/compiler/lib/flow.mli ++++ b/compiler/lib/flow.mli +@@ -45,6 +45,8 @@ + val update_def : t -> Code.Var.t -> Code.expr -> unit + + val possibly_mutable : t -> Code.Var.t -> bool ++ ++ val info_defs_length : t -> int + end + + val get_approx : +--- a/compiler/lib/generate.ml ++++ b/compiler/lib/generate.ml +@@ -1143,6 +1143,7 @@ + J.call (J.dot (s_var "Math") prim) [ cx; cy ] loc) + + let _ = ++ register_un_prim "%identity" `Pure (fun cx _ -> cx); + register_un_prim_ctx "%caml_format_int_special" `Pure (fun ctx cx loc -> + let s = J.EBin (J.Plus, str_js_utf8 "", cx) in + ocaml_string ~ctx ~loc s); +@@ -1151,6 +1152,8 @@ + [ "caml_array_unsafe_get" + ; "caml_array_unsafe_get_float" + ; "caml_floatarray_unsafe_get" ++ ; "caml_array_unsafe_get_indexed_by_int32" ++ ; "caml_array_unsafe_get_indexed_by_nativeint" + ] + `Mutable + (fun cx cy _ -> Mlvalue.Array.field cx cy); +@@ -1160,6 +1163,8 @@ + ; "caml_int32_to_float" + ; "caml_nativeint_of_int" + ; "caml_nativeint_to_int" ++ ; "caml_checked_nativeint_to_int" ++ ; "caml_checked_int32_to_int" + ; "caml_nativeint_to_int32" + ; "caml_nativeint_of_int32" + ; "caml_nativeint_to_float" +@@ -1246,6 +1251,8 @@ + ; "caml_array_unsafe_set_float" + ; "caml_floatarray_unsafe_set" + ; "caml_array_unsafe_set_addr" ++ ; "caml_array_unsafe_set_indexed_by_int32" ++ ; "caml_array_unsafe_set_indexed_by_nativeint" + ] + `Mutator + (fun cx cy cz _ -> J.EBin (J.Eq, Mlvalue.Array.field cx cy, cz)); +--- a/compiler/lib/specialize_js.ml ++++ b/compiler/lib/specialize_js.ml +@@ -303,6 +303,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_get_indexed_by_int32" ++ | "caml_array_get_indexed_by_int64" ++ | "caml_array_get_indexed_by_nativeint") ++ as prim) ++ , [ y; z ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_get_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_get_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_get_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_get] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_get", [ y; Pv z' ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_get" + | "caml_array_get_float" + | "caml_floatarray_get" +@@ -349,6 +375,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_set_indexed_by_int32" ++ | "caml_array_set_indexed_by_int64" ++ | "caml_array_set_indexed_by_nativeint") ++ as prim) ++ , [ y; z; w ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_set_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_set_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_set_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_set] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_set", [ y; Pv z'; w ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_set" + | "caml_array_set_float" + | "caml_floatarray_set" +--- a/runtime/js/bigarray.js ++++ b/runtime/js/bigarray.js +@@ -43,6 +43,7 @@ + } + + //Provides: caml_unpackFloat16 ++//Alias: caml_double_of_float16 + var caml_unpackFloat16 = (function () { + var pow = Math.pow; + +@@ -73,6 +74,7 @@ + })(); + + //Provides: caml_packFloat16 ++//Alias: caml_float16_of_double + var caml_packFloat16 = (function () { + const INVERSE_OF_EPSILON = 1 / Number.EPSILON; + +@@ -549,6 +551,8 @@ + } + + //Provides: caml_ba_uint8_get16 ++//Alias: caml_ba_uint8_get16_indexed_by_int32 ++//Alias: caml_ba_uint8_get16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get16(ba, i0) { + var ofs = ba.offset(i0); +@@ -558,7 +562,15 @@ + return b1 | (b2 << 8); + } + ++//Provides: caml_ba_uint8_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get16 ++function caml_ba_uint8_get16_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get32 ++//Alias: caml_ba_uint8_get32_indexed_by_int32 ++//Alias: caml_ba_uint8_get32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get32(ba, i0) { + var ofs = ba.offset(i0); +@@ -570,7 +582,15 @@ + return (b1 << 0) | (b2 << 8) | (b3 << 16) | (b4 << 24); + } + ++//Provides: caml_ba_uint8_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get32 ++function caml_ba_uint8_get32_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get64 ++//Alias: caml_ba_uint8_get64_indexed_by_int32 ++//Alias: caml_ba_uint8_get64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_of_bytes + function caml_ba_uint8_get64(ba, i0) { + var ofs = ba.offset(i0); +@@ -586,6 +606,12 @@ + return caml_int64_of_bytes([b8, b7, b6, b5, b4, b3, b2, b1]); + } + ++//Provides: caml_ba_uint8_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get64 ++function caml_ba_uint8_get64_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_get_1 + function caml_ba_get_1(ba, i0) { + return ba.get(ba.offset(i0)); +@@ -609,6 +635,8 @@ + } + + //Provides: caml_ba_uint8_set16 ++//Alias: caml_ba_uint8_set16_indexed_by_int32 ++//Alias: caml_ba_uint8_set16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set16(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -618,7 +646,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set16 ++function caml_ba_uint8_set16_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set16(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set32 ++//Alias: caml_ba_uint8_set32_indexed_by_int32 ++//Alias: caml_ba_uint8_set32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set32(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -630,7 +666,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set32 ++function caml_ba_uint8_set32_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set32(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set64 ++//Alias: caml_ba_uint8_set64_indexed_by_int32 ++//Alias: caml_ba_uint8_set64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_to_bytes + function caml_ba_uint8_set64(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -640,6 +684,12 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set64 ++function caml_ba_uint8_set64_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set64(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_set_1 + function caml_ba_set_1(ba, i0, v) { + ba.set(ba.offset(i0), v); +--- a/runtime/js/float32.js ++++ b/runtime/js/float32.js +@@ -375,36 +375,78 @@ + let caml_ba_float32_set_3 = caml_ba_set_3 + + //Provides: caml_ba_uint8_getf32 ++//Alias: caml_ba_uint8_getf32_indexed_by_int32 ++//Alias: caml_ba_uint8_getf32_indexed_by_nativeint + //Requires: caml_ba_uint8_get32, caml_int32_float_of_bits + function caml_ba_uint8_getf32(ba, i0) { + return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); + } + ++//Provides: caml_ba_uint8_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_getf32 ++function caml_ba_uint8_getf32_indexed_by_int64(ba, i) { ++ return caml_ba_uint8_getf32(ba, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_setf32 ++//Alias: caml_ba_uint8_setf32_indexed_by_int32 ++//Alias: caml_ba_uint8_setf32_indexed_by_nativeint + //Requires: caml_ba_uint8_set32, caml_int32_bits_of_float + function caml_ba_uint8_setf32(ba, i0, v) { + return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); + } + ++//Provides: caml_ba_uint8_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_setf32 ++function caml_ba_uint8_setf32_indexed_by_int64(ba, i, v) { ++ return caml_ba_uint8_setf32(ba, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_string_getf32 ++//Alias: caml_string_getf32_indexed_by_int32 ++//Alias: caml_string_getf32_indexed_by_nativeint + //Requires: caml_string_get32, caml_int32_float_of_bits + function caml_string_getf32(s, i) { + return caml_int32_float_of_bits(caml_string_get32(s, i)); + } + ++//Provides: caml_string_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_getf32 ++function caml_string_getf32_indexed_by_int64(s, i) { ++ return caml_string_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_getf32 ++//Alias: caml_bytes_getf32_indexed_by_int32 ++//Alias: caml_bytes_getf32_indexed_by_nativeint + //Requires: caml_bytes_get32, caml_int32_float_of_bits + function caml_bytes_getf32(s, i) { + return caml_int32_float_of_bits(caml_bytes_get32(s, i)); + } + ++//Provides: caml_bytes_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_getf32 ++function caml_bytes_getf32_indexed_by_int64(s, i) { ++ return caml_bytes_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_setf32 ++//Alias: caml_bytes_setf32_indexed_by_int32 ++//Alias: caml_bytes_setf32_indexed_by_nativeint + //Requires: caml_bytes_set32, caml_int32_bits_of_float + function caml_bytes_setf32(s, i, f32) { + return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); + } + ++//Provides: caml_bytes_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_setf32 ++function caml_bytes_setf32_indexed_by_int64(s, i, f32) { ++ return caml_bytes_setf32(s, caml_checked_int64_to_int(i), f32) ++} ++ + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_failwith + //If: js-string + function caml_string_setf32(s, i, f32) { +@@ -412,8 +454,16 @@ + } + + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_bytes_setf32 + //If: !js-string + function caml_string_setf32(s, i, f32) { + return caml_bytes_setf32(s, i, f32); + } ++ ++//Provides: caml_string_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_setf32 ++function caml_string_setf32_indexed_by_int64(s, i, f32) { ++ return caml_string_setf32(s, caml_checked_int64_to_int(i), f32) ++} +--- a/runtime/js/int64.js ++++ b/runtime/js/int64.js +@@ -352,6 +352,27 @@ + return x.toInt(); + } + ++//Provides: caml_checked_int64_to_int const ++//Requires: caml_int64_of_int32, caml_failwith ++function caml_checked_int64_to_int (x) { ++ if (x.compare(caml_int64_of_int32(0x7FFFFFFF)) == 1 ++ || x.compare(caml_int64_of_int32(0x80000000)) == -1) ++ caml_failwith("error while converting from int64") ++ return x.toInt() ++} ++ ++//Provides: caml_array_unsafe_get_indexed_by_int64 (mutable, const) ++//Requires: caml_int64_to_int32, caml_array_get ++function caml_array_unsafe_get_indexed_by_int64 (array, index) { ++ return caml_array_get(array, caml_int64_to_int32(index)); ++} ++ ++//Provides: caml_array_unsafe_set_indexed_by_int64 (mutable, const, mutable) ++//Requires: caml_int64_to_int32, caml_array_set ++function caml_array_unsafe_set_indexed_by_int64 (array, index, newval) { ++ return caml_array_set(array, caml_int64_to_int32(index), newval) ++} ++ + //Provides: caml_int64_to_float const + function caml_int64_to_float(x) { + return x.toFloat(); +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -251,6 +251,8 @@ + } + + //Provides: caml_string_get16 ++//Alias: caml_string_get16_indexed_by_int32 ++//Alias: caml_string_get16_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get16(s, i) { +@@ -260,7 +262,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_string_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get16 ++function caml_string_get16_indexed_by_int64(s, i) { ++ return caml_string_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get16 ++//Alias: caml_bytes_get16_indexed_by_int32 ++//Alias: caml_bytes_get16_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get16(s, i) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -269,7 +279,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get16 ++function caml_bytes_get16_indexed_by_int64(s, i) { ++ return caml_bytes_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get32 ++//Alias: caml_string_get32_indexed_by_int32 ++//Alias: caml_string_get32_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get32(s, i) { +@@ -281,7 +299,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_string_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get32 ++function caml_string_get32_indexed_by_int64(s, i) { ++ return caml_string_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get32 ++//Alias: caml_bytes_get32_indexed_by_int32 ++//Alias: caml_bytes_get32_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get32(s, i) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -292,7 +318,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get32 ++function caml_bytes_get32_indexed_by_int64(s, i) { ++ return caml_bytes_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get64 ++//Alias: caml_string_get64_indexed_by_int32 ++//Alias: caml_string_get64_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_int64_of_bytes + //Requires: caml_ml_string_length +@@ -305,7 +339,15 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_string_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get64 ++function caml_string_get64_indexed_by_int64(s, i) { ++ return caml_string_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get64 ++//Alias: caml_bytes_get64_indexed_by_int32 ++//Alias: caml_bytes_get64_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + //Requires: caml_int64_of_bytes + function caml_bytes_get64(s, i) { +@@ -317,6 +359,12 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_bytes_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get64 ++function caml_bytes_get64_indexed_by_int64(s, i) { ++ return caml_bytes_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_get + function caml_bytes_get(s, i) { +@@ -340,6 +388,8 @@ + } + + //Provides: caml_bytes_set16 ++//Alias: caml_bytes_set16_indexed_by_int32 ++//Alias: caml_bytes_set16_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set16(s, i, i16) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -350,7 +400,15 @@ + return 0; + } + ++//Provides: caml_bytes_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set16 ++function caml_bytes_set16_indexed_by_int64(s, i, i16) { ++ return caml_bytes_set16(s, caml_checked_int64_to_int(i), i16) ++} ++ + //Provides: caml_bytes_set32 ++//Alias: caml_bytes_set32_indexed_by_int32 ++//Alias: caml_bytes_set32_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set32(s, i, i32) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -365,7 +423,15 @@ + return 0; + } + ++//Provides: caml_bytes_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set32 ++function caml_bytes_set32_indexed_by_int64(s, i, i32) { ++ return caml_bytes_set32(s, caml_checked_int64_to_int(i), i32) ++} ++ + //Provides: caml_bytes_set64 ++//Alias: caml_bytes_set64_indexed_by_int32 ++//Alias: caml_bytes_set64_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + //Requires: caml_int64_to_bytes + function caml_bytes_set64(s, i, i64) { +@@ -377,6 +443,12 @@ + return 0; + } + ++//Provides: caml_bytes_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set64 ++function caml_bytes_set64_indexed_by_int64(s, i, i64) { ++ return caml_bytes_set64(s, caml_checked_int64_to_int(i), i64) ++} ++ + //Provides: caml_bytes_set + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set(s, i, c) { +--- a/runtime/wasm/bigarray.wat ++++ b/runtime/wasm/bigarray.wat +@@ -90,6 +90,8 @@ + (func $Int32_val (param (ref eq)) (result i32))) + (import "int32" "caml_copy_nativeint" + (func $caml_copy_nativeint (param i32) (result (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + (import "int64" "caml_copy_int64" + (func $caml_copy_int64 (param i64) (result (ref eq)))) + (import "int64" "Int64_val" +@@ -176,7 +178,9 @@ + (field $ba_kind i8) ;; kind + (field $ba_layout i8)))) ;; layout + +- (func $double_to_float16 (param $f f64) (result i32) ++ (func $double_to_float16 ++ (export "caml_float16_of_double") ++ (param $f f64) (result i32) + (local $x i32) (local $sign i32) (local $o i32) + (local.set $x (i32.reinterpret_f32 (f32.demote_f64 (local.get $f)))) + (local.set $sign (i32.and (local.get $x) (i32.const 0x80000000))) +@@ -206,7 +210,9 @@ + (i32.const 13))))))) + (i32.or (local.get $o) (i32.shr_u (local.get $sign) (i32.const 16)))) + +- (func $float16_to_double (param $d i32) (result f64) ++ (func $float16_to_double ++ (export "caml_double_of_float16") ++ (param $d i32) (result f64) + (local $f f32) + (local.set $f + (f32.mul +@@ -2009,125 +2015,207 @@ + (br $loop)))) + (return (i32.const 0))) + +- (func (export "caml_ba_uint8_get16") +- (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (func $caml_ba_uint8_get16_indexed_by_int32 ++ (export "caml_ba_uint8_get16_indexed_by_int32") ++ (export "caml_ba_uint8_get16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $p)))) ++ (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get32") +- (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (func (export "caml_ba_uint8_get16") ++ (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get32_indexed_by_int32 ++ (export "caml_ba_uint8_get32_indexed_by_int32") ++ (export "caml_ba_uint8_get32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i32) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (return_call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (return_call $ta_get32_ui8 (local.get $data) (local.get $i))) ++ ++ (func (export "caml_ba_uint8_get32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get64") +- (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (func (export "caml_ba_uint8_get32") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get64_indexed_by_int32 ++ (export "caml_ba_uint8_get64_indexed_by_int32") ++ (export "caml_ba_uint8_get64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i64) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) + (i64.or + (i64.extend_i32_u +- (call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (call $ta_get32_ui8 (local.get $data) (local.get $i))) + (i64.shl (i64.extend_i32_u + (call $ta_get32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)))) + +- (func (export "caml_ba_uint8_set16") +- (param $vba (ref eq)) (param $i (ref eq)) (param $v (ref eq)) ++ (func (export "caml_ba_uint8_get64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get64") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_set16_indexed_by_int32 ++ (export "caml_ba_uint8_set16_indexed_by_int32") ++ (export "caml_ba_uint8_set16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $v (ref eq)) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) (local $d (ref i31)) ++ (local $d (ref i31)) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) + (local.set $d (ref.cast (ref i31) (local.get $v))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set16_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set16_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set32") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) ++ (func (export "caml_ba_uint8_set16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set16") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set32_indexed_by_int32 ++ (export "caml_ba_uint8_set32_indexed_by_int32") ++ (export "caml_ba_uint8_set32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i32) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set64") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) ++ (func (export "caml_ba_uint8_set32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set32") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set64_indexed_by_int32 ++ (export "caml_ba_uint8_set64_indexed_by_int32") ++ (export "caml_ba_uint8_set64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i64) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) + (i32.wrap_i64 (local.get $d))) + (call $ta_set32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $d) (i64.const 32)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_ba_uint8_set64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set64") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ + (export "caml_bytes_of_uint8_array" (func $caml_string_of_uint8_array)) + (func $caml_string_of_uint8_array (export "caml_string_of_uint8_array") + (param (ref eq)) (result (ref eq)) +--- a/runtime/wasm/float32.wat ++++ b/runtime/wasm/float32.wat +@@ -41,14 +41,34 @@ + (func $caml_ba_set_3 (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)))) + (import "bigarray" "caml_ba_uint8_get32" + (func $caml_ba_uint8_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int32" ++ (func $caml_ba_uint8_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int64" ++ (func $caml_ba_uint8_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "bigarray" "caml_ba_uint8_set32" + (func $caml_ba_uint8_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int32" ++ (func $caml_ba_uint8_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int64" ++ (func $caml_ba_uint8_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "string" "caml_string_get32" + (func $caml_string_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int32" ++ (func $caml_string_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int64" ++ (func $caml_string_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_get32" + (func $caml_bytes_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int32" ++ (func $caml_bytes_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int64" ++ (func $caml_bytes_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_set32" + (func $caml_bytes_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int32" ++ (func $caml_bytes_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int64" ++ (func $caml_bytes_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "array" "caml_make_vect" + (func $caml_make_vect (param (ref eq)) (param (ref eq)) (result (ref eq)))) + +@@ -686,23 +706,87 @@ + (call $box_float32 (f32.reinterpret_i32 + (call $caml_ba_uint8_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_ba_uint8_getf32_indexed_by_int32 ++ (export "caml_ba_uint8_getf32_indexed_by_int32") ++ (export "caml_ba_uint8_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_ba_uint8_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_ba_uint8_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_ba_uint8_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ++ (func $caml_ba_uint8_setf32_indexed_by_int32 ++ (export "caml_ba_uint8_setf32_indexed_by_int32") ++ (export "caml_ba_uint8_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_ba_uint8_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ + (func (export "caml_string_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_string_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_string_getf32_indexed_by_int32 ++ (export "caml_string_getf32_indexed_by_int32") ++ (export "caml_string_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_string_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_bytes_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_bytes_getf32_indexed_by_int32 ++ (export "caml_bytes_getf32_indexed_by_int32") ++ (export "caml_bytes_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_bytes_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func $caml_bytes_setf32_indexed_by_int32 ++ (export "caml_bytes_setf32_indexed_by_int32") ++ (export "caml_bytes_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_bytes_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ) +--- a/runtime/wasm/int32.wat ++++ b/runtime/wasm/int32.wat +@@ -124,6 +124,21 @@ + (call $parse_int + (local.get $v) (i32.const 32) (global.get $INT32_ERRMSG)))) + ++ (data $integer_conversion_error "error while converting from int32") ++ ++ (func $caml_checked_int32_to_int (export "caml_checked_int32_to_int") ++ (param i32) (result (ref eq)) ++ (if (i32.or (i32.gt_s (local.get 0) (i32.const 0x3FFFFFFF)) ++ (i32.lt_s (local.get 0) (i32.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (local.get 0))) ++ ++ (func $caml_checked_nativeint_to_int (export "caml_checked_nativeint_to_int") ++ (param i32) (result (ref eq)) ++ (call $caml_checked_int32_to_int (local.get 0))) ++ + (export "caml_nativeint_compare" (func $caml_int32_compare)) + (func $caml_int32_compare (export "caml_int32_compare") + (param $i1 i32) (param $i2 i32) (result (ref eq)) +@@ -177,4 +192,6 @@ + (return_call $format_int (local.get 0) + (struct.get $int32 1 + (ref.cast (ref $int32) (local.get 1))) (i32.const 0))) ++ ++ + ) +--- a/runtime/wasm/int64.wat ++++ b/runtime/wasm/int64.wat +@@ -317,4 +317,26 @@ + (local.get $uppercase))))))))) + (local.get $s)) + ++ (data $integer_conversion_error "error while converting from int64") ++ ++ (func $caml_checked_int64_to_int (export "caml_checked_int64_to_int") ++ (param (ref eq)) (result (ref eq)) ++ (local $i i64) ++ (local.set $i ++ (struct.get $int64 1 (ref.cast (ref $int64) (local.get 0)))) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (i32.wrap_i64 (local.get $i)))) ++ ++ (func (export "caml_checked_int64_to_int32") ++ (param $i i64) (result i32) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (i32.wrap_i64 (local.get $i))) + ) +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -19,6 +19,8 @@ + (import "fail" "caml_bound_error" (func $caml_bound_error)) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param $arg (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + + (type $bytes (array (mut i8))) + +@@ -153,171 +155,274 @@ + (i31.get_u (ref.cast (ref i31) (local.get $len)))) + (ref.i31 (i32.const 0))) + +- (export "caml_string_get16" (func $caml_bytes_get16)) +- (func $caml_bytes_get16 (export "caml_bytes_get16") +- (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int32 ++ (export "caml_bytes_get16_indexed_by_int32") ++ (export "caml_bytes_get16_indexed_by_nativeint") ++ (export "caml_string_get16_indexed_by_int32") ++ (export "caml_string_get16_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (ref.i31 (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))))) + +- (export "caml_string_get32" (func $caml_bytes_get32)) +- (func $caml_bytes_get32 (export "caml_bytes_get32") +- (param $v (ref eq)) (param $i (ref eq)) (result i32) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int64 ++ (export "caml_bytes_get16_indexed_by_int64") ++ (export "caml_string_get16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get16 ++ (export "caml_bytes_get16") ++ (export "caml_string_get16") ++ (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get32_indexed_by_int32 ++ (export "caml_bytes_get32_indexed_by_int32") ++ (export "caml_bytes_get32_indexed_by_nativeint") ++ (export "caml_string_get32_indexed_by_int32") ++ (export "caml_string_get32_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i32) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i32.or + (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))) + (i32.or + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2))) ++ (i32.add (local.get $i) (i32.const 2))) + (i32.const 16)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3))) ++ (i32.add (local.get $i) (i32.const 3))) + (i32.const 24))))) + +- (export "caml_string_get64" (func $caml_bytes_get64)) +- (func $caml_bytes_get64 (export "caml_bytes_get64") +- (param $v (ref eq)) (param $i (ref eq)) (result i64) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get32_indexed_by_int64 ++ (export "caml_bytes_get32_indexed_by_int64") ++ (export "caml_string_get32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get32 ++ (export "caml_bytes_get32") ++ (export "caml_string_get32") ++ (param $v (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get64_indexed_by_int32 ++ (export "caml_bytes_get64_indexed_by_int32") ++ (export "caml_bytes_get64_indexed_by_nativeint") ++ (export "caml_string_get64_indexed_by_int32") ++ (export "caml_string_get64_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i64) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i64.or + (i64.or + (i64.or + (i64.extend_i32_u +- (array.get_u $bytes (local.get $s) (local.get $p))) ++ (array.get_u $bytes (local.get $s) (local.get $i))) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)))) ++ (i32.add (local.get $i) (i32.const 1)))) + (i64.const 8))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)))) ++ (i32.add (local.get $i) (i32.const 2)))) + (i64.const 16)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)))) ++ (i32.add (local.get $i) (i32.const 3)))) + (i64.const 24)))) + (i64.or + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)))) ++ (i32.add (local.get $i) (i32.const 5)))) + (i64.const 40))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)))) ++ (i32.add (local.get $i) (i32.const 6)))) + (i64.const 48)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)))) ++ (i32.add (local.get $i) (i32.const 7)))) + (i64.const 56)))))) + +- (func (export "caml_bytes_set16") +- (param (ref eq) (ref eq) (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) (local $v i32) ++ (func $caml_bytes_get64_indexed_by_int64 ++ (export "caml_bytes_get64_indexed_by_int64") ++ (export "caml_string_get64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get64 ++ (export "caml_bytes_get64") ++ (export "caml_string_get64") ++ (param $v (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_bytes_set16_indexed_by_int32 ++ (export "caml_bytes_set16_indexed_by_int32") ++ (export "caml_bytes_set16_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param (ref eq)) (result (ref eq)) ++ (local $s (ref $bytes)) (local $v i32) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $v (i31.get_s (ref.cast (ref i31) (local.get 2)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set32") +- (param (ref eq)) (param (ref eq)) (param $v i32) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set16") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set32_indexed_by_int32 ++ (export "caml_bytes_set32_indexed_by_int32") ++ (export "caml_bytes_set32_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.shr_u (local.get $v) (i32.const 16))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.shr_u (local.get $v) (i32.const 24))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set64") +- (param (ref eq)) (param (ref eq)) (param $v i64) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set32") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set64_indexed_by_int32 ++ (export "caml_bytes_set64_indexed_by_int32") ++ (export "caml_bytes_set64_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i64) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) ++ (array.set $bytes (local.get $s) (local.get $i) + (i32.wrap_i64 (local.get $v))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 8)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 16)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 24)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 32)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)) ++ (i32.add (local.get $i) (i32.const 5)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 40)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)) ++ (i32.add (local.get $i) (i32.const 6)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 48)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)) ++ (i32.add (local.get $i) (i32.const 7)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 56)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_bytes_set64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set64") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ + (func (export "caml_string_concat") + (param $vs1 (ref eq)) (param $vs2 (ref eq)) (result (ref eq)) + (local $s1 (ref $bytes)) (local $s2 (ref $bytes)) diff --git a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/opam b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/opam index 28420e513f..470c23e4f5 100644 --- a/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/opam +++ b/packages/js_of_ocaml-compiler/js_of_ocaml-compiler.6.0.1+ox/opam @@ -18,7 +18,7 @@ depends: [ "num" {with-test} "ppx_expect" {>= "v0.16.1" & with-test} "ppxlib" {= "0.33.0+ox"} - "re" {with-test} + "re" {with-test & = "1.14.0+ox"} "cmdliner" {>= "1.1.0"} "sedlex" {= "3.3+ox"} "qcheck" {with-test} @@ -38,12 +38,11 @@ build: [ ["dune" "build" "-p" name "-j" jobs "@install" "@doc" {with-doc}] ] dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git" -x-commit-hash: "b6d60e4f8ff35e7c7b3bb52b97ffedc3eb8e3d08" url { src: - "https://github.com/ocsigen/js_of_ocaml/archive/a8e8d2c1696a5fb3ddb4fe15495b1a8625a29b4b.tar.gz" + "https://github.com/ocsigen/js_of_ocaml/archive/246df644334aa97103d1051aec128337ea1868f9.tar.gz" checksum: - "sha256=b1e1ebd799547b33eec43b4d934bfde475b0ff4d20eba36d36147ee6d8db173c" + "sha256=c43572970512140facf02a30f16d4b34c10d55326bbd3d3c125bc2e549ef4ab8" } patches: [ "js_of_ocaml-magic_number.ml.patch" @@ -53,6 +52,7 @@ patches: [ "js_of_ocaml-add-unboxed-and-float-block.patch" "js_of_ocaml-ident-is_global.patch" "js_of_ocaml-remove-float-externals.patch" + "js_of_ocaml-ocaml_version-ppx.patch" "js_of_ocaml-test-diffs-caused-by-build-differences.patch" "js_of_ocaml-fix-build_fs.patch" "js_of_ocaml-iarray-primitives.patch" @@ -62,17 +62,13 @@ patches: [ "js_of_ocaml-caml_provides_sub_local.patch" "js_of_ocaml-caml_hash_exn.patch" "wasm_of_ocaml-bring-back-eval.patch" - "js_of_ocaml-index-by-unboxed-int.patch" "js_of_ocaml-mixed-block-bytecode-op.patch" "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" "js_of_ocaml-int_u-array-primitives.patch" - "js_of_ocaml-n-ary-functions.patch" "js_of_ocaml-symtable-5.2-api.patch" - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" "js_of_ocaml-jane-street-5.2-compatibility.patch" "js_of_ocaml-migrate-labeled-tuples-shims.patch" "js_of_ocaml-floatarray_create_local.patch" - "wasm_of_ocaml-sourcemap-contents.patch" "js_of_ocaml-jane-street-const_null-support.patch" "js_of_ocaml-float32.patch" "js_of_ocaml-caml_array_append.patch" @@ -80,21 +76,30 @@ patches: [ "js_of_ocaml-5.3-tests-runtime.patch" "js_of_ocaml-caml_bigstring_strncmp.patch" "wasm_of_ocaml-stub-caml_ml_set_channel_refill.patch" - "js_of_ocaml-version-directive-removal.patch" + "js_of_ocaml-no-compression-module-5.2.patch" "js_of_ocaml-obj_stubs.patch" - "js_of_ocaml-float32-2.patch" + "js_of_ocaml-global_deadcode-fix.patch" + "js_of_ocaml-local-bytes.patch" + "js_of_ocaml-n-ary-functions.patch" + "js_of_ocaml-optcomp_lite_fixes.patch" + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "js_of_ocaml-gh2034.patch" + "js_of_ocaml-unboxed-indexing.patch" + "js_of_ocaml-atomics.patch" + "js_of_ocaml-flipped-conditions-in-test.patch" + "js_of_ocaml-atomic-cmpxchg.patch" + "js_of_ocaml-small-int-literals.patch" "dune.patch" - "js_of_ocaml-top-effects.patch" - "js_of_ocaml-toplevel.patch" ] extra-files: [ [ "js_of_ocaml-magic_number.ml.patch" - "sha256=7feef837352414b5f102705c01915da98c3186f3559d92e94b63ad912c11dddd" + "sha256=05e204eac0338a76ca02db89ebb9505d80a7e268b93b746408356be913e219e6" ] [ "js_of_ocaml-compilation_unit-name.patch" - "sha256=63ebbb630149ade7f377dc8940d58968d7a44cef4911d67fc49a7fe10446eb1f" + "sha256=1e00a73f66cbaa87eefb45702eaaf431978f8eb9ed95684c781b0ebb035d1a7f" ] [ "js_of_ocaml-with_async_exns.patch" @@ -106,7 +111,7 @@ extra-files: [ ] [ "js_of_ocaml-add-unboxed-and-float-block.patch" - "sha256=625447650ca1c56f597000c3a7191309d1f1ed795f3670bc367d6383a07fc07e" + "sha256=db409edb2be9be828015b6722fb51d7bccdd1e4a7edf982b5c8d89808713af7b" ] [ "js_of_ocaml-ident-is_global.patch" @@ -114,19 +119,23 @@ extra-files: [ ] [ "js_of_ocaml-remove-float-externals.patch" - "sha256=a3aa95ee08210377c1470e5bf0f832bc27ad98299bca22c7a88eb9fd6c32e655" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-ocaml_version-ppx.patch" + "sha256=df6bcb6da8aa3dfd6bd0a178679987d41c400ec1803f4a66659cfc822d1b280f" ] [ "js_of_ocaml-test-diffs-caused-by-build-differences.patch" - "sha256=00d38ead67c67220351605d72c2b3a4e3faa8053087ef8ab47b7067b42900ba9" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-fix-build_fs.patch" - "sha256=6373ba10c70f77a2c5999bfec2484657a32450e44a3dfb04ce6bcaa05464d890" + "sha256=abaa404bf23a77cf1badfe30ab9fcc13c6fb0446a81fa10b0962ed1ba9005d6a" ] [ "js_of_ocaml-iarray-primitives.patch" - "sha256=1cefd949dad720858306c87e349dd927c402f292d7b7c770542f0b28bc8dc1b8" + "sha256=037ad55684c9ac3801ff284839d8bb1290d2e750cd4bcb03b75e5f4ab69559c9" ] [ "js_of_ocaml-important-config-changes.patch" @@ -134,7 +143,7 @@ extra-files: [ ] [ "js_of_ocaml-internal-ocaml-5-compatibility.patch" - "sha256=60cef558cd8c6ec4679c02e38e97933c9427d7de5e18bc151a60b4be9512fb36" + "sha256=6b7e17df7f0142158eca19a953422eb6eaf97a3f7f3f2443648bfd069fbcb90f" ] [ "js_of_ocaml-wasm-temp-differences.patch" @@ -152,13 +161,9 @@ extra-files: [ "wasm_of_ocaml-bring-back-eval.patch" "sha256=c413d9617e1122a9fdad8f1f63859bdf9f17a8440f78bdfbaecc432bae580fac" ] - [ - "js_of_ocaml-index-by-unboxed-int.patch" - "sha256=9983ff547de81845e0da06da547c6191671a72a5e1b321594b6d326b0e079e80" - ] [ "js_of_ocaml-mixed-block-bytecode-op.patch" - "sha256=289db81bcf2d12c5aa98e7cc14d4831eac38ba4795da862a4a78ed771c3c8ad9" + "sha256=ed6cfee285491515d497e8871c8534236e9a77939c3838dfd5b3fdb20626e347" ] [ "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" @@ -168,18 +173,10 @@ extra-files: [ "js_of_ocaml-int_u-array-primitives.patch" "sha256=99eba4301613d03e0305017a687c768bd24a22cef0db25ab62cbc3d304f647ba" ] - [ - "js_of_ocaml-n-ary-functions.patch" - "sha256=0f6c5da3756755db191492701c2df598426cdf57254b5366798dbd1f893e7e90" - ] [ "js_of_ocaml-symtable-5.2-api.patch" "sha256=9a999950e8984cc582e3830f447111e1082dc720609334de66a011347d26da9b" ] - [ - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" - "sha256=66afc6da651cd22984aec74f64ad6aaf1b211c6ce5a070fe444377cdaa44f14a" - ] [ "js_of_ocaml-jane-street-5.2-compatibility.patch" "sha256=45391a7a7da6c5bfbe97ec1272cb369d533c2d95cf7a7a56d754db94871eb043" @@ -192,17 +189,13 @@ extra-files: [ "js_of_ocaml-floatarray_create_local.patch" "sha256=f17e392acc941dde475cb7be0654037df9b8d550aeae0d96b65394e4c4a1d4ca" ] - [ - "wasm_of_ocaml-sourcemap-contents.patch" - "sha256=93b7dddf6313836ce02fbe762c40380e20daefdd8b87ec885ee0f4ef779ad76b" - ] [ "js_of_ocaml-jane-street-const_null-support.patch" "sha256=e708cdc01c0cef3fce1cb9f31b33324977dcca1c166601905fcac1ef10262c3a" ] [ "js_of_ocaml-float32.patch" - "sha256=5f83c34b274dd002e28ace3a93c7beca470bfb85d0037da5e090dcc05a792a20" + "sha256=8d6ebad1481711f57c5ed6dd36187b96ce8fcc51cdf3b0e9d5c277687601c625" ] [ "js_of_ocaml-caml_array_append.patch" @@ -210,11 +203,11 @@ extra-files: [ ] [ "js_of_ocaml-5.2.0-compiler-changes.patch" - "sha256=f71cba10b0c5ca093aa5150cc63ee3ee5bba390b3342601f77421559d8ae14fe" + "sha256=12626322e63a8eaf68d4c8a1a1d3f428832869fae7020588e0fe40bbd8fd8cf8" ] [ "js_of_ocaml-5.3-tests-runtime.patch" - "sha256=bb46bb5c80ace0140edd40c5858c7117f27dc2d0edd869a8b3b4e90aab7199f0" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-caml_bigstring_strncmp.patch" @@ -225,27 +218,63 @@ extra-files: [ "sha256=005bce63009b9539b65036b22a7b7cc531755c7caa3cf1ed8d8697698090e136" ] [ - "js_of_ocaml-version-directive-removal.patch" - "sha256=4b1565454d0b61bc2450ab7b5fff8c5c82babc104ea6b7b9a5446eb9a929740c" + "js_of_ocaml-no-compression-module-5.2.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-obj_stubs.patch" "sha256=9e9064f255c065a3152f665bd5b464040f3cfbbd2580aa4bb6e17be9c2b7fcc8" ] [ - "js_of_ocaml-float32-2.patch" - "sha256=3ff1eda6175f96cc3a5b2c2ae1ee395c9317d248554282c5f157c723a9fae32f" + "js_of_ocaml-global_deadcode-fix.patch" + "sha256=5b49d6ee62ae87c77d88ea8022b022830f906367dc9b9ea2e582f037a739292f" ] [ - "dune.patch" - "sha256=f76da998ab76de56309bd0da3e4db1fb496d6d235d7a0ac2f78e3bafe098714e" + "js_of_ocaml-local-bytes.patch" + "sha256=1c6170fec57089f515ec71bd9873d48bd5ae9c4a85f14b80f33039cce9f232ae" ] [ - "js_of_ocaml-top-effects.patch" - "sha256=638247bd3f7bacb99612353b29c0afdcc48598c5771a52602a96baabbc141370" + "js_of_ocaml-n-ary-functions.patch" + "sha256=b9b078c1f227624cc5fc9dd574c19785354267c19299dcf2f9b9642d0114eddf" ] [ - "js_of_ocaml-toplevel.patch" - "sha256=56c305aa9ed8cb35e9a3bee9fb17aaae244522bacb54a78115b03182a746b7b2" + "js_of_ocaml-optcomp_lite_fixes.patch" + "sha256=b98305f8885c0377714677b2ca6d0d561c18bee6a8fc0d2f9d0abf52694968e0" + ] + [ + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "sha256=899ec90b4c1f5f1251d2c77fdb842f11b5a07d01430da4e5c75610d4bf541faa" + ] + [ + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "sha256=483e848b0dfe54b75c31cd990191730c0070ad8a21912b1beca97111e01a718e" + ] + [ + "js_of_ocaml-gh2034.patch" + "sha256=ec01ea15a9d21c22790ad3c93e9d68154e364462de6a2ce1dbbb62e8af25fc2d" + ] + [ + "js_of_ocaml-unboxed-indexing.patch" + "sha256=2c8b76947795fa34683e7c2bf1022a95058bde146c7832e1bd6e8a33b8d6cfc7" + ] + [ + "js_of_ocaml-atomics.patch" + "sha256=cfe956bb047c252faa2397ff2badca80972d74e1dca0cb633202313dfb8f5da4" + ] + [ + "js_of_ocaml-flipped-conditions-in-test.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-atomic-cmpxchg.patch" + "sha256=89612eb8c1e64898205c0b59c6b73987d2ff993a8c366fb61dac6db90e2806bc" + ] + [ + "js_of_ocaml-small-int-literals.patch" + "sha256=4c3fd2d3a50d220af2bdd377016e3f3354b98b770457ff200494be70bc9bb5b2" + ] + [ + "dune.patch" + "sha256=f76da998ab76de56309bd0da3e4db1fb496d6d235d7a0ac2f78e3bafe098714e" ] ] diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch index 1518edcaf2..2ad0a64b33 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch @@ -1,22 +1,40 @@ +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -1075,6 +1075,13 @@ + | NativeInt i -> + let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in + return (Const, e) ++ | Null -> ++ let* var = ++ register_import ++ ~name:"null" ++ (Global { mut = false; typ = Type.value }) ++ in ++ return (Const, W.GlobalGet var) + + let translate c = + let* const, c = translate_rec c in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -333,6 +333,7 @@ +@@ -329,6 +329,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (* Native int are 32bit on all known backend *) | Tuple of int * constant array * array_or_not + | Null - + module Constant = struct type t = constant -@@ -360,6 +361,7 @@ - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) - | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -361,6 +362,9 @@ + b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Null, Null -> Some true | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None | Int _, Float32 _ | Float32 _, Int _ -> None -@@ -405,6 +407,7 @@ +@@ -409,6 +413,7 @@ | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> Some false @@ -24,44 +42,37 @@ (* Note: the following cases should not occur when compiling to Javascript *) | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) -@@ -524,6 +527,7 @@ +@@ -529,6 +534,7 @@ constant f a.(i) done; Format.fprintf f ")") + | Null -> Format.fprintf f "null" - + let arg f a = match a with -@@ -885,7 +889,7 @@ - | `Wasm -> true - | _ -> false) - | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ -- | Tuple (_, _, _) -> () -+ | Tuple (_, _, _) | Null -> () - in - let check_prim_arg = function - | Pc c -> check_constant c --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -179,6 +179,7 @@ +@@ -151,6 +151,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (** Only produced when compiling to WebAssembly. *) | Tuple of int * constant array * array_or_not + | Null - + module Constant : sig type t = constant --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -255,6 +255,7 @@ +@@ -458,7 +458,8 @@ | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) +- | Int _, Float _ | Float _, Int _ -> None + | Null, Null -> Some true - | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None ++ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None (* All other values may be distinct objects and thus different by [caml_js_equals]. *) | String _, _ -@@ -270,7 +271,9 @@ + | _, String _ +@@ -473,7 +474,9 @@ | NativeInt _, _ | _, NativeInt _ | Tuple _, _ @@ -69,46 +80,43 @@ + | _, Tuple _ + | Null, _ + | _, Null -> None - - let eval_instr ~target info ((x, loc) as i) = - match x with -@@ -408,6 +411,7 @@ + + (* [eval_prim] does not distinguish the two constants *) + let constant_equal a b = +@@ -486,10 +489,11 @@ + | Int32 a, Int32 b -> Int32.equal a b + | NativeInt a, NativeInt b -> Int32.equal a b + | Int64 a, Int64 b -> Int64.equal a b ++ | Null, Null -> true + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ (fun x -> match Flow.Info.def info x with | Some (Constant (Int x)) -> if Targetint.is_zero x then Zero else Non_zero + | Some (Constant Null) -> Zero | Some (Constant - ( Int32 _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -371,11 +371,12 @@ - | NativeInt _, NativeInt _, `Wasm -> - false (* [NativeInt]s are boxed in Wasm and are possibly different objects *) - | NativeInt _, NativeInt _, `JavaScript -> assert false -+ | Null, Null, _ -> true - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - + ( Int32 _ --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -497,6 +497,7 @@ +@@ -524,6 +524,7 @@ + Mlvalue.Block.make ~tag ~args:l, instrs) | Int i -> targetint i, instrs - | Int32 i | NativeInt i -> - J.ENum (J.Num.of_targetint (Targetint.of_int32_exn i)), instrs + | Int32 i | NativeInt i -> targetint (Targetint.of_int32_exn i), instrs + | Null -> s_var "null", instrs - + let constant ~ctx x level = let expr, instr = constant_rec ~ctx x level [] in --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -45,9 +45,7 @@ +@@ -36,9 +36,7 @@ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> let l = Array.of_list (List.map l ~f:constant_of_const) in Tuple (tag, l, Unknown) @@ -116,15 +124,17 @@ - - failwith "[Const_null] not supported in JavaScript yet." + | Const_null -> Null - - let rec find_loc_in_summary ident' = function - | Env.Env_empty -> None + + module Symtable = struct + (* Copied from ocaml/bytecomp/symtable.ml *) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -479,8 +479,14 @@ - - let ident_f32 = ident_of_custom (Obj.repr 0.s) - +@@ -471,8 +471,16 @@ + + let ident_native = ident_of_custom (Obj.repr 0n) + ++ let ident_f32 = ident_of_custom (Obj.repr 0.s) ++ + external is_null : Obj.t -> bool = "%is_null" + + let is_null obj = is_null (Sys.opaque_identity obj) @@ -137,131 +147,85 @@ then let tag = Obj.tag x in if tag = Obj.string_tag -@@ -528,6 +534,7 @@ - | Tuple _ -> false - | Int _ -> true - | Int32 _ | NativeInt _ -> false +@@ -523,6 +531,7 @@ + match target with + | `JavaScript -> true + | `Wasm -> false) + | Null -> true end - + let const32 i = Constant (Int (Targetint.of_int32_exn i)) -@@ -2960,9 +2967,6 @@ +@@ -2877,9 +2886,6 @@ } - + let constant_of_const x = Ocaml_compiler.constant_of_const x - [@@if ocaml_version < (5, 1, 0)] - - let constant_of_const x = Constants.parse x [@@if ocaml_version >= (5, 1, 0)] - + (* We currently rely on constants to be relocated before globals. *) let step1 t compunit code = ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -1068,6 +1068,13 @@ - | NativeInt i -> - let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in - return (Const, e) -+ | Null -> -+ let* var = -+ register_import -+ ~name:"null" -+ (Global { mut = false; typ = Type.value }) -+ in -+ return (Const, W.GlobalGet var) - - let translate c = - let* const, c = translate_rec c in ---- a/compiler/tests-ocaml/lib-atomic/test_atomic.ml -+++ b/compiler/tests-ocaml/lib-atomic/test_atomic.ml -@@ -1,39 +1,39 @@ - (* TEST *) - --let r = Atomic.make 1 --let () = assert (Atomic.get r = 1) -+let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 1 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 1) - --let () = Atomic.set r 2 --let () = assert (Atomic.get r = 2) -+let () = (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r 2 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 2) - --let () = assert (Atomic.exchange r 3 = 2) -+let () = assert ((Atomic.exchange [@ocaml.alert "-unsafe_multidomain"]) r 3 = 2) - --let () = assert (Atomic.compare_and_set r 3 4 = true) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = true) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert (Atomic.compare_and_set r 3 (-4) = false) --let () = assert (Atomic.get r = 4 ) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 (-4) = false) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4 ) - --let () = assert (Atomic.compare_and_set r 3 4 = false) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = false) - - let () = assert (Atomic.fetch_and_add r 2 = 4) --let () = assert (Atomic.get r = 6) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 6) - - let () = assert (Atomic.fetch_and_add r (-2) = 6) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert ((Atomic.incr r; Atomic.get r) = 5) -+let () = assert ((Atomic.incr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 5) - --let () = assert ((Atomic.decr r; Atomic.get r) = 4) -+let () = assert ((Atomic.decr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 4) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -- ignore (Atomic.set r (cur + 1), Atomic.set r (cur - 1)); -- assert (Atomic.get r <> cur) -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in -+ ignore ((Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur + 1), (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur - 1)); -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r <> cur) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in - ignore (Atomic.incr r, Atomic.decr r); -- assert (Atomic.get r = cur) -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = cur) --- a/lib/js_of_ocaml/js.ml +++ b/lib/js_of_ocaml/js.ml @@ -813,7 +813,7 @@ if isNaN s then failwith "parseFloat" else s - + let _ = - Printexc.register_printer (fun e -> + (Printexc.register_printer [@ocaml.alert "-unsafe_multidomain"]) (fun e -> if instanceof (Obj.magic e : < .. > t) error_constr then - let e = Js_error.of_error (Obj.magic e : error t) in[] + let e = Js_error.of_error (Obj.magic e : error t) in --- a/lib/runtime/jsoo_runtime.ml +++ b/lib/runtime/jsoo_runtime.ml -@@ -162,7 +162,7 @@ - +@@ -175,7 +175,7 @@ + exception Exn of t - + - let _ = Callback.register_exception "jsError" (Exn (Obj.magic [||])) + let _ = (Callback.register_exception [@ocaml.alert "-unsafe_multidomain"]) "jsError" (Exn (Obj.magic [||])) - - let raise_ : t -> 'a = Js.js_expr "(function (exn) { throw exn })" - + + external raise_ : t -> 'a = "caml_throw_js_exception" + +--- a/runtime/js/compare.js ++++ b/runtime/js/compare.js +@@ -18,6 +18,7 @@ + //Provides: caml_compare_val_tag + //Requires: caml_is_ml_string, caml_is_ml_bytes + function caml_compare_val_tag(a) { ++ if (a === null) return 1010; // null_tag + if (typeof a === "number") + return 1000; // int_tag (we use it for all numbers) + else if (caml_is_ml_bytes(a)) +@@ -93,6 +94,13 @@ + + // tags are different + if (tag_a !== tag_b) { ++ if (tag_a === 1010) { ++ // Null is less than anything else ++ return -1; ++ } ++ if (tag_b === 1010) { ++ return 1; ++ } + if (tag_a === 1000) { + if (tag_b === 1255) { + //immediate can compare against custom +@@ -193,6 +201,8 @@ + if (!Number.isNaN(b)) return -1; + } + break; ++ case 1010: // Null pointer ++ return 0; + case 1001: // The rest + // Here we can be in the following cases: + // 1. JavaScript primitive types --- a/runtime/js/domain.js +++ b/runtime/js/domain.js -@@ -36,6 +36,13 @@ +@@ -41,6 +41,13 @@ return 0; } - + +//Provides: caml_atomic_compare_exchange +function caml_atomic_compare_exchange(ref, o, n) { + var old = ref[1]; @@ -270,12 +234,12 @@ +} + //Provides: caml_atomic_fetch_add + //Version: >= 5 function caml_atomic_fetch_add(ref, i) { - var old = ref[1]; -@@ -43,6 +50,41 @@ +@@ -49,6 +56,41 @@ return old; } - + +//Provides: caml_atomic_add +function caml_atomic_add(ref, i) { + var old = ref[1]; @@ -312,8 +276,8 @@ +} + //Provides: caml_atomic_exchange + //Version: >= 5 function caml_atomic_exchange(ref, v) { - var r = ref[1]; --- a/runtime/js/marshal.js +++ b/runtime/js/marshal.js @@ -44,6 +44,7 @@ @@ -322,9 +286,9 @@ CODE_CUSTOM_FIXED: 0x19, + CODE_NULL: 0x1f }; - + //Provides: UInt8ArrayReader -@@ -539,6 +540,8 @@ +@@ -492,6 +493,8 @@ } if (intern_obj_table) intern_obj_table[obj_counter++] = v; return v; @@ -333,9 +297,9 @@ default: caml_failwith("input_value: ill-formed message"); } -@@ -742,7 +745,9 @@ +@@ -684,7 +687,9 @@ } - + function extern_rec(v) { - if (v.caml_custom) { + if (v === null) { @@ -346,7 +310,7 @@ var ops = caml_custom_ops[name]; --- a/runtime/js/obj.js +++ b/runtime/js/obj.js -@@ -46,7 +46,8 @@ +@@ -41,7 +41,8 @@ //Provides: caml_obj_tag //Requires: caml_is_ml_bytes, caml_is_ml_string function caml_obj_tag(x) { @@ -355,8 +319,8 @@ + else if (Array.isArray(x) && x[0] === x[0] >>> 0) return x[0]; else if (caml_is_ml_bytes(x)) return 252; else if (caml_is_ml_string(x)) return 252; - else if (x instanceof Function || typeof x == "function") return 247; -@@ -272,3 +273,16 @@ + else if (x instanceof Function || typeof x === "function") return 247; +@@ -244,3 +245,16 @@ function caml_custom_identifier(o) { return caml_string_of_jsstring(o.caml_custom); } @@ -373,12 +337,36 @@ +function caml_is_null(o) { + return o === null; +} +--- a/runtime/wasm/compare.wat ++++ b/runtime/wasm/compare.wat +@@ -25,6 +25,7 @@ + (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) + (import "obj" "caml_is_closure" + (func $caml_is_closure (param (ref eq)) (result i32))) ++ (import "obj" "null" (global $null (ref eq))) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param (ref eq)))) + (import "effect" "caml_is_continuation" +@@ -238,6 +239,13 @@ + (if (local.get $total) + (then + (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) ++ (if (ref.eq (local.get $v1) (global.get $null)) ++ (then ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 0))) ++ (else (return (i32.const -1)))))) ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 1)))) + (drop (block $v1_is_not_int (result (ref eq)) + (local.set $i1 + (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) --- a/runtime/wasm/domain.wat +++ b/runtime/wasm/domain.wat -@@ -34,6 +34,21 @@ +@@ -38,6 +38,21 @@ (else (ref.i31 (i32.const 0))))) - + + (func (export "caml_atomic_compare_exchange") + (param $ref (ref eq)) (param $o (ref eq)) (param $n (ref eq)) + (result (ref eq)) @@ -396,11 +384,11 @@ + (func (export "caml_atomic_load") (param (ref eq)) (result (ref eq)) (array.get $block (ref.cast (ref $block) (local.get 0)) (i32.const 1))) - -@@ -48,6 +63,61 @@ + +@@ -52,6 +67,61 @@ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) (local.get $old)) - + + (func (export "caml_atomic_add") + (param $ref (ref eq)) (param $i (ref eq)) (result (ref eq)) + (local $b (ref $block)) @@ -461,30 +449,29 @@ (local $b (ref $block)) --- a/runtime/wasm/obj.wat +++ b/runtime/wasm/obj.wat -@@ -86,6 +86,9 @@ +@@ -89,6 +89,9 @@ (field (ref $function_2)) (field (mut (ref null $cps_closure)))))) - + + (type $null (struct)) + (global $null (export "null") (ref eq) (struct.new $null)) + (global $forcing_tag i32 (i32.const 244)) (global $cont_tag (export "cont_tag") i32 (i32.const 245)) (global $lazy_tag (export "lazy_tag") i32 (i32.const 246)) -@@ -239,6 +242,8 @@ +@@ -243,6 +246,8 @@ (local.get $res)) - + (func (export "caml_obj_tag") (param $v (ref eq)) (result (ref eq)) + (if (ref.eq (local.get $v) (global.get $null)) + (then (return (ref.i31 (i32.const 1010))))) (if (ref.test (ref i31) (local.get $v)) (then (return (ref.i31 (i32.const 1000))))) (drop (block $not_block (result (ref eq)) -@@ -487,4 +492,20 @@ - (array.new_fixed $block 3 (ref.i31 (i32.const 0)) - (local.get $x) (local.get $y)) - (ref.as_non_null (global.get $caml_trampoline_ref)))))) --) +@@ -491,4 +496,22 @@ + (call $caml_callback_1 (local.get $f) (local.get $x)) + (local.get $y))) + )) + + (func (export "caml_is_null") (param $x (ref eq)) (result (ref eq)) + (if (result (ref eq)) (ref.eq (local.get $x) (global.get $null)) @@ -501,61 +488,6 @@ + (call $caml_failwith + (array.new_data $bytes $int_as_pointer_not_implemented + (i32.const 0) (i32.const 35))) -+ (ref.i31 (i32.const 0)))))) ---- a/runtime/js/compare.js -+++ b/runtime/js/compare.js -@@ -18,6 +18,7 @@ - //Provides: caml_compare_val_tag - //Requires: caml_is_ml_string, caml_is_ml_bytes - function caml_compare_val_tag(a) { -+ if (a === null) return 1010; // null_tag - if (typeof a === "number") - return 1000; // int_tag (we use it for all numbers) - else if (caml_is_ml_bytes(a)) -@@ -93,6 +94,13 @@ - - // tags are different - if (tag_a !== tag_b) { -+ if (tag_a === 1010) { -+ // Null is less than anything else -+ return -1; -+ } -+ if (tag_b === 1010) { -+ return 1; -+ } - if (tag_a === 1000) { - if (tag_b === 1255) { - //immediate can compare against custom -@@ -193,6 +201,8 @@ - if (!Number.isNaN(b)) return -1; - } - break; -+ case 1010: // Null pointer -+ return 0; - case 1001: // The rest - // Here we can be in the following cases: - // 1. JavaScript primitive types ---- a/runtime/wasm/compare.wat -+++ b/runtime/wasm/compare.wat -@@ -25,6 +25,7 @@ - (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) - (import "obj" "caml_is_closure" - (func $caml_is_closure (param (ref eq)) (result i32))) -+ (import "obj" "null" (global $null (ref eq))) - (import "fail" "caml_invalid_argument" - (func $caml_invalid_argument (param (ref eq)))) - (import "effect" "caml_is_continuation" -@@ -238,6 +239,13 @@ - (if (local.get $total) - (then - (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) -+ (if (ref.eq (local.get $v1) (global.get $null)) -+ (then -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 0))) -+ (else (return (i32.const -1)))))) -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 1)))) - (drop (block $v1_is_not_int (result (ref eq)) - (local.set $i1 - (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) ++ (ref.i31 (i32.const 0))))) ++ + ) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch index 43e4b69d0f..e69de29bb2 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch @@ -1,84 +0,0 @@ ---- a/compiler/tests-ocaml/lib-list/test.ml -+++ b/compiler/tests-ocaml/lib-list/test.ml -@@ -64,7 +64,7 @@ - let hello = ['H';'e';'l';'l';'o'] in - let world = ['W';'o';'r';'l';'d';'!'] in - let hello_world = hello @ [' '] @ world in -- assert (List.take 5 hello_world = hello); -+ (* assert (List.take 5 hello_world = hello); - assert (List.take 3 [1; 2; 3; 4; 5] = [1; 2; 3]); - assert (List.take 3 [1; 2] = [1; 2]); - assert (List.take 3 [] = []); -@@ -83,7 +83,7 @@ - assert (List.drop_while (fun x -> x < 3) [1; 2; 3; 4; 5; 1; 2; 3] - = [3; 4; 5; 1; 2; 3]); - assert (List.drop_while (fun x -> x < 9) [1; 2; 3] = []); -- assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); -+ assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); *) - assert (List.partition is_even [1; 2; 3; 4; 5] - = ([2; 4], [1; 3; 5])); - assert (List.partition_map string_of_even_or_int [1; 2; 3; 4; 5] ---- a/compiler/tests-ocaml/lib-queue/test.ml -+++ b/compiler/tests-ocaml/lib-queue/test.ml -@@ -137,11 +137,11 @@ - assert (Q.length q2 = 8); assert (Q.to_list q2 = [5; 6; 7; 8; 1; 2; 3; 4]); - ;; - --let () = -+(* let () = - let q = Q.create () in - Q.add 1 q; Q.drop q; assert (does_raise Q.drop q); - Q.add 2 q; Q.drop q; assert (does_raise Q.drop q); - assert (Q.length q = 0); --;; -+;; *) - - let () = print_endline "OK" ---- a/compiler/tests-ocaml/lib-hashtbl/hfun.expected -+++ b/compiler/tests-ocaml/lib-hashtbl/hfun.expected -@@ -8,19 +8,19 @@ - 2^30-1 23c392d0 - -2^30 0c66fde3 - -- Floats: --+0.0 0f478b8c ---0.0 0f478b8c -++0.0 07be548a -+-0.0 07be548a - +infty 23ea56fb - -infty 059f7872 - NaN 3228858d - NaN#2 3228858d - NaN#3 3228858d - -- Native integers: --0 3f19274a -+0 07be548a - -1 3653e015 --42 3e33aef8 --2^30-1 3711bf46 ---2^30 2e71f39c -+42 1792870b -+2^30-1 23c392d0 -+-2^30 0c66fde3 - -- Lists: - [0..10] 0ade0fc9 - [0..12] 0ade0fc9 ---- a/compiler/tests-ocaml/lib-uchar/test.ml -+++ b/compiler/tests-ocaml/lib-uchar/test.ml -@@ -74,7 +74,7 @@ - let test_hash () = - let f u = - assert (Hashtbl.hash u = Uchar.hash u); -- assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) -+ (* assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) *) - in - List.iter (Fun.compose f Uchar.of_int) - [0x0000; 0x002D; 0x00E9; 0x062D; 0x2014; 0x1F349] -@@ -117,7 +117,7 @@ - test_to_char (); - test_equal (); - test_compare (); -- test_hash (); -+ (* test_hash (); *) - test_utf_decode (); - test_utf_x_byte_length (); - () diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch index 81cc808404..401b0473f1 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch @@ -1,30 +1,25 @@ --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -31,22 +31,21 @@ +@@ -20,17 +20,16 @@ + + let rec constant_of_const c : Code.constant = let open Lambda in - let open Asttypes in match c with | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -- | Const_base (Const_int32 i) -> ( -+ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) - | `Wasm -> Int32 i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_int32 i) -> Int32 i - | Const_base (Const_int64 i) -> Int64 i +- | Const_base (Const_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i -- | Const_base (Const_nativeint i) -> ( -+ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_nativeint_warning_on_overflow i) - | `Wasm -> NativeInt (Int32.of_nativeint_warning_on_overflow i)) ++ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) | Const_immstring s -> String s - | Const_float_array sl -> + | Const_float_array sl | Const_float_block sl -> - let l = List.map ~f:(fun f -> float_of_string f) sl in + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> + | Const_block (tag, l) -> diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch new file mode 100644 index 0000000000..d3ce2130c0 --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch @@ -0,0 +1,41 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -216,6 +216,16 @@ + return 0; + } + ++//Provides: caml_atomic_compare_exchange_field ++//Version: >= 5 ++function caml_atomic_compare_exchange_field(ref, field, o, n) { ++ var old = ref[field + 1]; ++ if (old === o) { ++ ref[field + 1] = n; ++ } ++ return old; ++} ++ + //Provides: caml_atomic_set_field + //Version: >= 5 + function caml_atomic_set_field(ref, field, v) { +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -329,6 +329,19 @@ + (return (ref.i31 (i32.const 1))))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_atomic_compare_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)))) ++ (local.get $old)) ++ + (func (export "caml_atomic_exchange_field") + (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) + (local $b (ref $block)) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-atomics.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-atomics.patch new file mode 100644 index 0000000000..202c01205d --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-atomics.patch @@ -0,0 +1,238 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -99,6 +99,14 @@ + return r; + } + ++//Provides: caml_atomic_set ++//Version: >= 5 ++function caml_atomic_set(ref, v) { ++ var r = ref[1]; ++ ref[1] = v; ++ return 0; ++} ++ + //Provides: caml_atomic_make_contended + //Version: >= 5.2 + function caml_atomic_make_contended(a) { +@@ -175,3 +183,78 @@ + function caml_ml_domain_cpu_relax(unit) { + return 0; + } ++ ++//Provides: caml_atomic_load_field ++//Version: >= 5 ++function caml_atomic_load_field(ref, field) { ++ return ref[field + 1]; ++} ++ ++//Provides: caml_atomic_add_field ++//Version: >= 5 ++function caml_atomic_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return 0; ++} ++ ++//Provides: caml_atomic_fetch_add_field ++//Version: >= 5 ++function caml_atomic_fetch_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return old; ++} ++ ++//Provides: caml_atomic_cas_field ++//Version: >= 5 ++function caml_atomic_cas_field(ref, field, o, n) { ++ if (ref[field + 1] === o) { ++ ref[field + 1] = n; ++ return 1; ++ } ++ return 0; ++} ++ ++//Provides: caml_atomic_set_field ++//Version: >= 5 ++function caml_atomic_set_field(ref, field, v) { ++ ref[field + 1] = v; ++ return 0; ++} ++ ++//Provides: caml_atomic_exchange_field ++//Version: >= 5 ++function caml_atomic_exchange_field(ref, field, v) { ++ var old = ref[field + 1]; ++ ref[field + 1] = v; ++ return old; ++} ++ ++//Provides: caml_atomic_sub_field ++//Version: >= 5 ++function caml_atomic_sub_field(ref, field, i) { ++ ref[field + 1] -= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_land_field ++//Version: >= 5 ++function caml_atomic_land_field(ref, field, i) { ++ ref[field + 1] &= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lor_field ++//Version: >= 5 ++function caml_atomic_lor_field(ref, field, i) { ++ ref[field + 1] |= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lxor_field ++//Version: >= 5 ++function caml_atomic_lxor_field(ref, field, i) { ++ ref[field + 1] ^= i; ++ return 0; ++} +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -131,6 +131,15 @@ + (array.set $block (local.get $b) (i32.const 1) (local.get $v)) + (local.get $r)) + ++ (func (export "caml_atomic_set") ++ (param $ref (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $r (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $r (array.get $block (local.get $b) (i32.const 1))) ++ (array.set $block (local.get $b) (i32.const 1) (local.get $v)) ++ (ref.i31 (i32.const 0))) ++ + (func (export "caml_atomic_make_contended") + (param $v (ref eq)) (result (ref eq)) + (array.new_fixed $block 2 (ref.i31 (i32.const 0)) (local.get $v))) +@@ -220,4 +229,123 @@ + + (func (export "caml_ml_domain_cpu_relax") (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) ++ ++ ;; Atomic field operations ++ (func (export "caml_atomic_load_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (result (ref eq)) ++ (array.get $block ++ (ref.cast (ref $block) (local.get $ref)) ++ (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1)))) ++ ++ (func (export "caml_atomic_fetch_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_sub_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.sub (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_land_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.and (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.or (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lxor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.xor (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_cas_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)) ++ (return (ref.i31 (i32.const 1))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_set_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (ref.i31 (i32.const 0))) + ) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch index 48c3a6fc3b..4e4c985cb6 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch @@ -1,6 +1,6 @@ --- a/compiler/bin-js_of_ocaml/compile.ml +++ b/compiler/bin-js_of_ocaml/compile.ml -@@ -235,7 +235,7 @@ +@@ -311,7 +311,7 @@ sm in let output_partial @@ -11,48 +11,48 @@ code --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -213,16 +213,16 @@ +@@ -208,16 +208,16 @@ end - + module Cmo_format = struct - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + - let name (t : t) = t.cu_name [@@if ocaml_version < (5, 2, 0)] + let name (t : t) = t.cu_name |> Compilation_unit.name_as_string [@@if ocaml_version < (5, 2, 0)] - + let name (t : t) = let (Compunit name) = t.cu_name in name [@@if ocaml_version >= (5, 2, 0)] - + - let requires (t : t) = List.map ~f:Ident.name t.cu_required_globals + let requires (t : t) = List.map ~f:Compilation_unit.name_as_string t.cu_required_globals [@@if ocaml_version < (5, 2, 0)] - + let requires (t : t) = List.map t.cu_required_compunits ~f:(fun (Compunit u) -> u) --- a/compiler/lib/ocaml_compiler.mli +++ b/compiler/lib/ocaml_compiler.mli -@@ -55,7 +55,7 @@ +@@ -53,7 +53,7 @@ end - + module Cmo_format : sig - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + val name : t -> string - + @@ -65,5 +65,5 @@ - + val force_link : t -> bool - + - val imports : t -> (string * string option) list + val imports : t -> Import_info.t array end --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -2633,8 +2633,10 @@ - +@@ -2593,8 +2593,10 @@ + let read_crcs toc ic = ignore (seek_section toc ic "CRCS"); - let orig_crcs : (string * Digest.t option) list = input_value ic in @@ -61,10 +61,10 @@ + List.map (Array.to_list orig_crcs) ~f:(fun import -> + Import_info.name import |> Compilation_unit.Name.to_string, + Import_info.crc import) - + let read_prim toc ic = let prim_size = seek_section toc ic "PRIM" in -@@ -3096,7 +3098,7 @@ +@@ -3042,7 +3044,7 @@ then raise Magic_number.(Bad_magic_version magic); let compunit_pos = input_binary_int ic in seek_in ic compunit_pos; @@ -72,10 +72,10 @@ + let compunit : Cmo_format.compilation_unit_descr = input_value ic in `Cmo compunit | `Cma -> - if Config.Flag.check_magic () + if --- a/compiler/lib/parse_bytecode.mli +++ b/compiler/lib/parse_bytecode.mli -@@ -65,7 +65,7 @@ +@@ -58,7 +58,7 @@ ?includes:string list -> ?include_cmis:bool -> ?debug:bool @@ -83,34 +83,35 @@ + -> Cmo_format.compilation_unit_descr -> in_channel -> one - -@@ -79,7 +79,7 @@ - + +@@ -72,7 +72,7 @@ + val from_channel : in_channel - -> [ `Cmo of Cmo_format.compilation_unit | `Cma of Cmo_format.library | `Exe ] + -> [ `Cmo of Cmo_format.compilation_unit_descr | `Cma of Cmo_format.library | `Exe ] - + val from_string : - prims:string array + prims:string array -> debug:Instruct.debug_event list array -> string -> Code.program --- a/compiler/lib/unit_info.ml +++ b/compiler/lib/unit_info.ml -@@ -37,7 +37,7 @@ +@@ -46,7 +46,7 @@ ; effects_without_cps = false } - + -let of_cmo (cmo : Cmo_format.compilation_unit) = +let of_cmo (cmo : Cmo_format.compilation_unit_descr) = let open Ocaml_compiler in - let provides = StringSet.singleton (Cmo_format.name cmo) in - let requires = StringSet.of_list (Cmo_format.requires cmo) in + (* A packed librariy register global for packed modules. *) + let provides = StringSet.of_list (Cmo_format.name cmo :: Cmo_format.provides cmo) in --- a/compiler/lib/unit_info.mli +++ b/compiler/lib/unit_info.mli -@@ -26,6 +26,6 @@ +@@ -28,7 +28,7 @@ ; effects_without_cps : bool } - + -val of_cmo : Cmo_format.compilation_unit -> t +val of_cmo : Cmo_format.compilation_unit_descr -> t - - val union : t -> t -> t + + val of_primitives : aliases:(string * string) list -> string list -> t + diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch index 9d342bdecc..5879719115 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch @@ -14,17 +14,6 @@ if(!globalThis.jsoo_fs_tmp) globalThis.jsoo_fs_tmp = []; globalThis.jsoo_fs_tmp.push({name:name,content:content}); } ---- a/compiler/tests-full/fs.expected.js -+++ b/compiler/tests-full/fs.expected.js -@@ -18,6 +18,8 @@ - function a(a, b){ - if(c.jsoo_create_file) - c.jsoo_create_file(a, b); -+ else if(c.caml_create_file) -+ c.caml_create_file(a, b); - else{ - if(! c.caml_fs_tmp) c.caml_fs_tmp = []; - c.caml_fs_tmp.push({name: a, content: b}); --- a/runtime/js/fs.js +++ b/runtime/js/fs.js @@ -318,7 +318,7 @@ diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-float32.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-float32.patch index d1712d15e0..ba11933537 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-float32.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-float32.patch @@ -6,8 +6,8 @@ ; ieee_754 + ; float32 ; int64 - ; internalMod ; ints + ; io --- a/compiler/lib-runtime-files/tests/all.ml +++ b/compiler/lib-runtime-files/tests/all.ml @@ -21,6 +21,7 @@ @@ -18,17 +18,7 @@ +format.js +fs.js +fs_fake.js -@@ -52,7 +53,8 @@ - +toplevel.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl runtime; - [%expect - {| -@@ -65,6 +67,7 @@ +@@ -64,6 +65,7 @@ +domain.js +effect.js +fail.js @@ -36,52 +26,91 @@ +format.js +fs.js +fs_fake.js -@@ -94,7 +97,8 @@ - +sys.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl extra; - [%expect {| - +dynlink.js +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -170,6 +170,22 @@ + ] + }) + ++ let float32_type = ++ register_type "float32" (fun () -> ++ let* custom_operations = custom_operations_type in ++ let* custom = custom_type in ++ return ++ { supertype = Some custom ++ ; final = true ++ ; typ = ++ W.Struct ++ [ { mut = false ++ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) ++ } ++ ; { mut = false; typ = Value F32 } ++ ] ++ }) ++ + let int32_type = + register_type "int32" (fun () -> + let* custom_operations = custom_operations_type in +@@ -855,6 +871,18 @@ + in + if_mismatch + ++ let make_float32 e = ++ let* custom_operations = Type.custom_operations_type in ++ let* float32_ops = ++ register_import ++ ~name:"float32_ops" ++ (Global ++ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) ++ in ++ let* ty = Type.float32_type in ++ let* e = e in ++ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) ++ + let make_int32 ~kind e = + let* custom_operations = Type.custom_operations_type in + let* int32_ops = +@@ -1026,6 +1054,9 @@ + | Float f -> + let* ty = Type.float_type in + return (Const, W.StructNew (ty, [ Const (F64 (Int64.float_of_bits f)) ])) ++ | Float32 f -> ++ let* e = Memory.make_float32 (return (W.Const (F32 (Int64.float_of_bits f)))) in ++ return (Const, e) + | Float_array l -> + let l = Array.to_list l in + let* ty = Type.float_array_type in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -326,6 +326,7 @@ +@@ -260,6 +260,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t -@@ -358,8 +359,10 @@ - | NativeInt a, NativeInt b -> Some (Int32.equal a b) - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -300,6 +301,7 @@ + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None + | Int _, Float32 _ | Float32 _, Int _ -> None | Tuple ((0 | 254), _, _), Float_array _ -> None | Float_array _, Tuple ((0 | 254), _, _) -> None | ( Tuple _ -@@ -369,7 +372,7 @@ - | Int _ +@@ -310,6 +312,7 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Float_array _ ) ) -> Some false | ( Float_array _ , ( String _ -@@ -378,13 +381,13 @@ - | Int _ +@@ -319,12 +322,13 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ ) ) -> Some false | ( String _ - , (Int64 _ | Int _ | Int32 _ | NativeInt _ | Float _ | Tuple _ | Float_array _) ) -> @@ -93,12 +122,11 @@ Some false | ( Int64 _ , ( String _ -@@ -392,10 +395,12 @@ - | Int _ +@@ -333,9 +337,12 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ | Float_array _ ) ) -> Some false - | Float _, (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) -> @@ -108,7 +136,7 @@ Some false | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> -@@ -404,8 +409,8 @@ +@@ -344,8 +351,8 @@ | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) | NativeInt _, (Int _ | Int32 _) @@ -119,49 +147,54 @@ end type loc = -@@ -491,6 +496,7 @@ +@@ -432,6 +439,7 @@ | NativeString (Byte s) -> Format.fprintf f "%Sj" s | NativeString (Utf (Utf8 s)) -> Format.fprintf f "%Sj" s - | Float fl -> Format.fprintf f "%.12g" fl -+ | Float32 fl -> Format.fprintf f "%.9g" fl + | Float fl -> Format.fprintf f "%.12g" (Int64.float_of_bits fl) ++ | Float32 fl -> Format.fprintf f "%.9g" (Int64.float_of_bits fl) | Float_array a -> Format.fprintf f "[|"; for i = 0 to Array.length a - 1 do -@@ -878,7 +884,7 @@ - match target with - | `Wasm -> true - | _ -> false) -- | String _ | NativeString _ | Float _ | Float_array _ | Int _ | Int64 _ -+ | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ - | Tuple (_, _, _) -> () - in - let check_prim_arg = function --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -172,6 +172,7 @@ +@@ -148,6 +148,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t (** Only produced when compiling to WebAssembly. *) --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -251,9 +251,11 @@ - match a, b with +@@ -452,6 +452,9 @@ | Int i, Int j -> Some (Targetint.equal i j) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) -- | Int _, Float _ | Float _, Int _ -> None -+ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | String _, _ - | _, String _ -@@ -413,6 +415,7 @@ + | Int _, Float _ | Float _, Int _ -> None +@@ -476,6 +479,7 @@ + match a, b with + | Int i, Int j -> Targetint.equal i j + | Float a, Float b -> Int64.equal a b ++ | Float32 a, Float32 b -> Int64.equal a b + | NativeString a, NativeString b -> Native_string.equal a b + | String a, String b -> String.equal a b + | Int32 a, Int32 b -> Int32.equal a b +@@ -484,7 +488,7 @@ + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ ( Int32 _ | NativeInt _ | Float _ @@ -169,30 +202,9 @@ | Tuple _ | String _ | NativeString _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -354,7 +354,9 @@ - match a, b, target with - | Int i, Int j, _ -> Targetint.equal i j - | Float a, Float b, `JavaScript -> Float.bitwise_equal a b -+ | Float32 a, Float32 b, `JavaScript -> Float.bitwise_equal a b - | Float _, Float _, `Wasm -> false -+ | Float32 _, Float32 _, `Wasm -> false - | NativeString a, NativeString b, `JavaScript -> Native_string.equal a b - | NativeString _, NativeString _, `Wasm -> - false -@@ -373,7 +375,7 @@ - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -438,6 +438,7 @@ +@@ -466,6 +466,7 @@ | Byte x -> Share.get_byte_string str_js_byte x ctx.Ctx.share, instrs | Utf (Utf8 x) -> Share.get_utf_string str_js_utf8 x ctx.Ctx.share, instrs) | Float f -> float_const f, instrs @@ -200,7 +212,7 @@ | Float_array a -> ( Mlvalue.Array.make ~tag:Obj.double_array_tag -@@ -964,6 +965,13 @@ +@@ -1215,6 +1216,13 @@ register_bin_prim "caml_le_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Le, cx, cy))); register_bin_prim "caml_gt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cy, cx))); register_bin_prim "caml_lt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cx, cy))); @@ -216,171 +228,38 @@ register_bin_prim "caml_mul_float" `Pure (fun cx cy _ -> J.EBin (J.Mul, cx, cy)); --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -25,7 +25,8 @@ +@@ -24,7 +24,8 @@ + | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 Float32.(of_string s |> to_float) -+ | Const_base (Const_float s | Const_unboxed_float s) -> Float (float_of_string s) - | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -477,6 +477,8 @@ - - let ident_native = ident_of_custom (Obj.repr 0n) - -+ let ident_f32 = ident_of_custom (Obj.repr 0.s) -+ - let rec parse x = - if Obj.is_block x - then -@@ -490,6 +492,8 @@ +@@ -481,6 +481,8 @@ else if tag = Obj.custom_tag then match ident_of_custom x with + | Some name when same_ident name ident_f32 -> -+ Float32 ((Obj.magic x : float32) |> Float32.to_float) - | Some name when same_ident name ident_32 -> ( ++ Float32 (Int64.bits_of_float (Obj.magic x : float)) + | Some name when same_ident name ident_32 -> let i : int32 = Obj.magic x in - match Config.target () with -@@ -518,6 +522,7 @@ - let inlined = function + Int32 i +@@ -506,6 +508,7 @@ + match c with | String _ | NativeString _ -> false | Float _ -> true + | Float32 _ -> true | Float_array _ -> false | Int64 _ -> false | Tuple _ -> false ---- a/compiler/lib/stdlib.ml -+++ b/compiler/lib/stdlib.ml -@@ -417,6 +417,17 @@ - external ( >= ) : t -> t -> bool = "%greaterequal" - end - -+module Float32 = struct -+ type t = float32 -+ -+ external of_float : float -> t = "%float32offloat" -+ external to_float : t -> float = "%floatoffloat32" -+ -+ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. -+ This is not equivalent to native code, which parses to 32 bits directly. *) -+ let of_string s = float_of_string s |> of_float -+end -+ - module Bool = struct - external ( <> ) : bool -> bool -> bool = "%notequal" - ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -170,6 +170,22 @@ - ] - }) - -+ let float32_type = -+ register_type "float32" (fun () -> -+ let* custom_operations = custom_operations_type in -+ let* custom = custom_type in -+ return -+ { supertype = Some custom -+ ; final = true -+ ; typ = -+ W.Struct -+ [ { mut = false -+ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) -+ } -+ ; { mut = false; typ = Value F32 } -+ ] -+ }) -+ - let int32_type = - register_type "int32" (fun () -> - let* custom_operations = custom_operations_type in -@@ -853,6 +869,18 @@ - in - if_mismatch - -+ let make_float32 e = -+ let* custom_operations = Type.custom_operations_type in -+ let* float32_ops = -+ register_import -+ ~name:"float32_ops" -+ (Global -+ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) -+ in -+ let* ty = Type.float32_type in -+ let* e = e in -+ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) -+ - let make_int32 ~kind e = - let* custom_operations = Type.custom_operations_type in - let* int32_ops = -@@ -1023,6 +1051,9 @@ - | Float f -> - let* ty = Type.float_type in - return (Const, W.StructNew (ty, [ Const (F64 f) ])) -+ | Float32 f -> -+ let* e = Memory.make_float32 (return (W.Const (F32 f))) in -+ return (Const, e) - | Float_array l -> - let l = Array.to_list l in - let* ty = Type.float_array_type in ---- /dev/null -+++ b/compiler/tests-jsoo/test_marshal_float32.ml -@@ -0,0 +1,47 @@ -+ -+(* In javascript, float32s are represented as floats. -+ In native code and wasm, float32s are custom blocks containing a float32 field. *) -+ -+external float_of_float32 : float32 -> float = "%floatoffloat32" -+ -+type float64s = { a : float; b : float } -+ -+let%expect_test "float64 javascript" [@tags "js-only", "no-wasm"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\n\000\000\000\001\000\000\000\003\000\000\000\003\b\000\000\b\254\000{\001\001\200" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+let%expect_test "float64 wasm" [@tags "wasm-only"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\018\000\000\000\001\000\000\000\005\000\000\000\003\014\002\000\000\000\000\000\192^@\000\000\000\000\000\128|@" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+type float32s = { a : float32; b : float32 } -+ -+let%expect_test "float32 javascript" [@tags "js-only", "no-wasm"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\006\000\000\000\001\000\000\000\003\000\000\000\003\160\000{\001\001\200" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] -+ -+let%expect_test "float32 wasm" [@tags "wasm-only"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\021\000\000\000\003\000\000\000\t\000\000\000\t\160\025_f32\000B\246\000\000\025_f32\000C\228\000\000" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] --- /dev/null +++ b/runtime/js/float32.js -@@ -0,0 +1,361 @@ +@@ -0,0 +1,419 @@ + +/* + 32-bit floats are represented as javascript numbers, i.e. 64-bit floats. @@ -729,19 +608,77 @@ + return Math.fround(Math.trunc(x)); +} + -+//Provides: caml_simd_float32_round_neg_inf_bytecode const -+function caml_simd_float32_round_neg_inf_bytecode(x) { -+ return Math.fround(Math.floor(x)); ++//Provides: caml_make_unboxed_float32_vect_bytecode const (const) ++//Requires: caml_make_float_vect ++let caml_make_unboxed_float32_vect_bytecode = caml_make_float_vect ++ ++//Provides: caml_ba_float32_get_1 ++//Requires: caml_ba_get_1 ++let caml_ba_float32_get_1 = caml_ba_get_1 ++ ++//Provides: caml_ba_float32_get_2 ++//Requires: caml_ba_get_2 ++let caml_ba_float32_get_2 = caml_ba_get_2 ++ ++//Provides: caml_ba_float32_get_3 ++//Requires: caml_ba_get_3 ++let caml_ba_float32_get_3 = caml_ba_get_3 ++ ++//Provides: caml_ba_float32_set_1 ++//Requires: caml_ba_set_1 ++let caml_ba_float32_set_1 = caml_ba_set_1 ++ ++//Provides: caml_ba_float32_set_2 ++//Requires: caml_ba_set_2 ++let caml_ba_float32_set_2 = caml_ba_set_2 ++ ++//Provides: caml_ba_float32_set_3 ++//Requires: caml_ba_set_3 ++let caml_ba_float32_set_3 = caml_ba_set_3 ++ ++//Provides: caml_ba_uint8_getf32 ++//Requires: caml_ba_uint8_get32, caml_int32_float_of_bits ++function caml_ba_uint8_getf32(ba, i0) { ++ return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); +} + -+//Provides: caml_simd_float32_round_pos_inf_bytecode const -+function caml_simd_float32_round_pos_inf_bytecode(x) { -+ return Math.fround(Math.ceil(x)); ++//Provides: caml_ba_uint8_setf32 ++//Requires: caml_ba_uint8_set32, caml_int32_bits_of_float ++function caml_ba_uint8_setf32(ba, i0, v) { ++ return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); +} + -+//Provides: caml_simd_float32_round_towards_zero_bytecode const -+function caml_simd_float32_round_towards_zero_bytecode(x) { -+ return Math.fround(Math.trunc(x)); ++//Provides: caml_string_getf32 ++//Requires: caml_string_get32, caml_int32_float_of_bits ++function caml_string_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_string_get32(s, i)); ++} ++ ++//Provides: caml_bytes_getf32 ++//Requires: caml_bytes_get32, caml_int32_float_of_bits ++function caml_bytes_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_bytes_get32(s, i)); ++} ++ ++//Provides: caml_bytes_setf32 ++//Requires: caml_bytes_set32, caml_int32_bits_of_float ++function caml_bytes_setf32(s, i, f32) { ++ return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_failwith ++//If: js-string ++function caml_string_setf32(s, i, f32) { ++ caml_failwith("caml_string_setf32"); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_bytes_setf32 ++//If: !js-string ++function caml_string_setf32(s, i, f32) { ++ return caml_bytes_setf32(s, i, f32); ++} --- a/runtime/wasm/custom.wat +++ b/runtime/wasm/custom.wat @@ -16,6 +16,7 @@ @@ -1471,3 +1408,45 @@ + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) +) +--- a/compiler/lib/parse_bytecode.ml ++++ b/compiler/lib/parse_bytecode.ml +@@ -496,7 +496,7 @@ + then + match ident_of_custom x with + | Some name when same_ident name ident_f32 -> +- Float32 (Int64.bits_of_float (Obj.magic x : float)) ++ Float32 (Int64.bits_of_float ((Obj.magic x : float32) |> Float32.to_float)) + | Some name when same_ident name ident_32 -> + let i : int32 = Obj.magic x in + Int32 i +--- a/compiler/lib/stdlib.ml ++++ b/compiler/lib/stdlib.ml +@@ -369,6 +369,17 @@ + external ( >= ) : t -> t -> bool = "%greaterequal" + end + ++module Float32 = struct ++ type t = float32 ++ ++ external of_float : float -> t = "%float32offloat" ++ external to_float : t -> float = "%floatoffloat32" ++ ++ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. ++ This is not equivalent to native code, which parses to 32 bits directly. *) ++ let of_string s = float_of_string s |> of_float ++end ++ + module Bool = struct + include Bool + +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -25,7 +25,7 @@ + | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-gh2034.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-gh2034.patch new file mode 100644 index 0000000000..3dc5610654 --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-gh2034.patch @@ -0,0 +1,83 @@ +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -387,14 +387,18 @@ + (global.set $method_cache (local.get $a)))) + (local.set $ofs + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) (local.get $ofs))))) ++ (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (return +- (array.get $block +- (local.get $meths) (i32.sub (local.get $ofs) (i32.const 1)))))) ++ (if (i32.eq (local.get $tag) ++ (i31.get_s ++ (ref.cast (ref i31) ++ (array.get $block (local.get $meths) ++ (local.get $ofs))))) ++ (then ++ (return ++ (array.get $block ++ (local.get $meths) ++ (i32.sub (local.get $ofs) (i32.const 1)))))))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -382,7 +382,8 @@ + (array.new $int_array (i32.const 0) (i32.const 8))) + + (func (export "caml_get_public_method") +- (param $obj (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) ++ (param $obj (ref eq)) (param $vtag (ref eq)) (param (ref eq)) ++ (result (ref eq)) + (local $meths (ref $block)) + (local $tag i32) (local $cacheid i32) (local $ofs i32) + (local $li i32) (local $mi i32) (local $hi i32) +@@ -391,7 +392,6 @@ + (ref.cast (ref $block) + (array.get $block + (ref.cast (ref $block) (local.get $obj)) (i32.const 1)))) +- (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $cacheid (i31.get_u (ref.cast (ref i31) (local.get 2)))) + (local.set $len (array.len (global.get $method_cache))) + (if (i32.ge_s (local.get $cacheid) (local.get $len)) +@@ -409,16 +409,14 @@ + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) + (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (local.get $ofs))))) ++ (if (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) (local.get $ofs))) + (then + (return + (array.get $block + (local.get $meths) + (i32.sub (local.get $ofs) (i32.const 1)))))))) ++ (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get $vtag)))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +@@ -450,11 +448,9 @@ + (array.set $int_array (global.get $method_cache) (local.get $cacheid) + (i32.add (local.get $li) (i32.const 1))) + (if (result (ref eq)) +- (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (i32.add (local.get $li) (i32.const 1)))))) ++ (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) ++ (i32.add (local.get $li) (i32.const 1)))) + (then + (array.get $block (local.get $meths) (local.get $li))) + (else diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch new file mode 100644 index 0000000000..46d1621024 --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch @@ -0,0 +1,42 @@ +--- a/compiler/lib/global_deadcode.ml ++++ b/compiler/lib/global_deadcode.ml +@@ -434,7 +434,7 @@ + + They are returned; or + + They are applied to a function. + *) +-let zero prog sentinal live_table = ++let zero prog pure_funs sentinal live_table = + let compact_vars vars = + let i = ref (Array.length vars - 1) in + while !i >= 0 && Var.equal vars.(!i) sentinal do +@@ -483,13 +483,17 @@ + (* Zero out return values in last instruction, otherwise do nothing. *) + match block.branch with + | Return x -> +- let tc = +- (* We don't want to break tailcalls. *) ++ let live_tc = ++ (* Don't break tailcalls, it's needed for generate_closure ++ and effects passes. If the (tail)call is dead, it will ++ be eliminated later by the deadcode pass, don't make it live again by ++ returning its result. *) + match List.last body with +- | Some (Let (x', Apply _)) when Code.Var.equal x' x -> true ++ | Some (Let (x', (Apply _ as e))) -> ++ Code.Var.equal x x' && (is_live x' || not (Pure_fun.pure_expr pure_funs e)) + | Some _ | None -> false + in +- if tc then Return x else Return (zero_var x) ++ if live_tc then Return x else Return (zero_var x) + | Raise (_, _) + | Stop | Branch _ + | Cond (_, _, _) +@@ -581,7 +585,7 @@ + Print.print_uses uses; + Print.print_live_tbl live_table); + (* Zero out dead fields *) +- let p = zero p deadcode_sentinal live_table in ++ let p = zero p pure_funs deadcode_sentinal live_table in + if debug () + then ( + Format.eprintf "After Zeroing:@."; diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch index a9e15c1f4c..33d9968c58 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch @@ -1,9 +1,10 @@ --- a/runtime/js/array.js +++ b/runtime/js/array.js -@@ -249,3 +249,12 @@ - return caml_array_make(len, init); +@@ -131,3 +131,13 @@ + for (var i = 1; i < len; i++) b[i] = 0; + return b } - ++ +// Provides: caml_iarray_of_array const +function caml_iarray_of_array(a) { + return a; @@ -15,7 +16,7 @@ +} --- a/runtime/wasm/array.wat +++ b/runtime/wasm/array.wat -@@ -403,4 +403,13 @@ +@@ -293,4 +293,13 @@ (struct.get $float 0 (ref.cast (ref $float) (local.get $v))) (local.get $len)))) (ref.i31 (i32.const 0))) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch index 5ac6abeadd..578d7b30ad 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch @@ -1,10 +1,9 @@ --- a/runtime/js/sys.js +++ b/runtime/js/sys.js -@@ -290,8 +290,13 @@ - function caml_sys_isatty(_chan) { +@@ -300,6 +300,11 @@ return 0; } - + +//Provides: caml_sys_const_runtime5 const +function caml_sys_const_runtime5(_unit) { + return 0; @@ -13,16 +12,16 @@ //Provides: caml_runtime_variant //Requires: caml_string_of_jsbytes function caml_runtime_variant(_unit) { - return caml_string_of_jsbytes(""); --- a/runtime/wasm/sys.wat +++ b/runtime/wasm/sys.wat -@@ -146,5 +146,9 @@ +@@ -154,6 +154,10 @@ (param (ref eq)) (result (ref eq)) (ref.i31 (i32.const 0))) - + + (func (export "caml_sys_const_runtime5") + (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) + - (func (export "caml_runtime_variant") (param (ref eq)) (result (ref eq)) - (array.new_fixed $bytes 0)) + (@string $Unix "Unix") + (@string $Win32 "Win32") + diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-local-bytes.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-local-bytes.patch new file mode 100644 index 0000000000..f1e0ec62b5 --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-local-bytes.patch @@ -0,0 +1,22 @@ +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -504,6 +504,7 @@ + } + + //Provides: caml_create_bytes const ++//Alias: caml_create_local_bytes + //Requires: MlBytes,caml_invalid_argument + function caml_create_bytes(len) { + if (len < 0) caml_invalid_argument("Bytes.create"); +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -121,7 +121,8 @@ + + (@string $Bytes_create "Bytes.create") + +- (func (export "caml_create_bytes") ++ (export "caml_create_local_bytes" (func $caml_create_bytes)) ++ (func $caml_create_bytes (export "caml_create_bytes") + (param $len (ref eq)) (result (ref eq)) + (local $l i32) + (local.set $l (i31.get_s (ref.cast (ref i31) (local.get $len)))) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch index ad24d6a85f..24ec30b5bb 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch @@ -6,7 +6,7 @@ -let v = - let current = Ocaml_version.current in -+let v = 561 ++let v = 568 + (* let current = Ocaml_version.current in match current with | 4 :: 08 :: _ -> 25 diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch index 5542a69282..e40549d323 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch @@ -1,18 +1,14 @@ --- a/compiler/lib/instr.ml +++ b/compiler/lib/instr.ml -@@ -169,6 +169,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -173,6 +173,7 @@ | RESUME | RESUMETERM -@@ -353,13 +354,14 @@ - ; RERAISE, KStop 0, "RERAISE" - ; RAISE_NOTRACE, KStop 0, "RAISE_NOTRACE" - ; GETSTRINGCHAR, KNullary, "GETSTRINGCHAR" - ; PERFORM, if_v500 KNullaryCall, "PERFORM" + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + let equal (a : t) b = Poly.equal a b +@@ -360,6 +361,7 @@ ; RESUME, if_v500 KNullaryCall, "RESUME" ; RESUMETERM, if_v500 (KStop 1), "RESUMETERM" ; REPERFORMTERM, if_v500 (KStop 1), "REPERFORMTERM" @@ -20,22 +16,30 @@ ; FIRST_UNIMPLEMENTED_OP, K_will_not_happen, "FIRST_UNIMPLEMENTED_OP" |] in - let ops = - Array.mapi ~f:(fun i (c, k, n) -> { code = c; kind = k; name = n; opcode = i }) instrs - in --- a/compiler/lib/instr.mli +++ b/compiler/lib/instr.mli -@@ -168,6 +168,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -172,6 +172,7 @@ | RESUME | RESUMETERM + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + type kind = +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -32,7 +32,7 @@ + | Const_float_array sl | Const_float_block sl -> + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in + Float_array (Array.of_list l) +- | Const_block (tag, l) -> ++ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> + let l = Array.of_list (List.map l ~f:constant_of_const) in + Tuple (tag, l, Unknown) + --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -1375,7 +1375,7 @@ +@@ -1412,7 +1412,7 @@ (pc + 2) state (Let (x, Block (i, [||], Unknown, Maybe_mutable)) :: instrs) @@ -44,13 +48,3 @@ let size = getu code (pc + 1) in let tag = getu code (pc + 2) in let state = State.push state in ---- a/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:34:59 2024 -0400 -+++ b/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:28:48 2024 -0400 -@@ -42,6 +42,6 @@ - Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> - Int (Targetint.of_int_warning_on_overflow i) -- | Const_block (tag, l) -> -+ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> - let l = Array.of_list (List.map l ~f:constant_of_const) in - Tuple (tag, l, Unknown) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch index ff51bbb6f9..3545c53168 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch @@ -1,15 +1,16 @@ --- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml +++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml -@@ -250,7 +250,7 @@ - in - let make_fun (label, pat) (label', typ) expr = - assert (label' = label); -- Exp.fun_ label None (Pat.constraint_ pat typ) expr -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr +@@ -267,7 +267,8 @@ + | _ -> c, b + in + { expr with pexp_desc = Pexp_function (params, c, b) } +- | _ -> Exp.fun_ label None (Pat.constraint_ pat typ) expr ++ | _ -> ++ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr in let invoker = List.fold_right2 -@@ -309,10 +309,10 @@ +@@ -326,10 +327,10 @@ in Exp.apply ~loc:apply_loc @@ -22,7 +23,7 @@ ~loc:gloc nolabel None -@@ -355,7 +355,7 @@ +@@ -372,7 +373,7 @@ invoker [ app_arg obj ; app_arg @@ -31,7 +32,7 @@ ~loc:gloc nolabel None -@@ -379,9 +379,8 @@ +@@ -396,9 +397,8 @@ let prop_set ~loc ~prop_loc obj prop value = let gloc = { obj.pexp_loc with Location.loc_ghost = true } in let obj = @@ -43,7 +44,7 @@ in let invoker = invoker -@@ -409,7 +408,7 @@ +@@ -426,7 +426,7 @@ [ app_arg obj ; app_arg value ; app_arg @@ -52,52 +53,9 @@ ~loc:{ loc with loc_ghost = true } nolabel None -@@ -583,11 +582,14 @@ - | Pcf_method (id, priv, Cfk_concrete (bang, body)) -> - let names = check_name id names in - let body, body_ty = drop_pexp_poly (mappper body) in - let rec create_meth_ty exp = - match exp.pexp_desc with -- | Pexp_fun (label, _, _, body) -> Arg.make ~label () :: create_meth_ty body -- | Pexp_function _ -> [ Arg.make () ] -+ | Pexp_function (params, _, _) -> -+ List.filter_map params ~f:(fun param -> -+ match param.pparam_desc with -+ | Pparam_val (label, _, _) -> Some (Arg.make ~label ()) -+ | Pparam_newtype _ -> None) -- | Pexp_newtype (_, body) -> create_meth_ty body -+ | Pexp_newtype (_, _, body) -> create_meth_ty body - | _ -> [] - in - let fun_ty = create_meth_ty body in -@@ -641,7 +643,7 @@ - let body = function - | Val (_, _, _, body) -> body - | Meth (_, _, _, body, _) -> -- Exp.fun_ ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body +@@ -935,3 +935,5 @@ + |> Ppxlib_ast.Selected_ast.to_ocaml Expression in - let extra_types = - List.concat -@@ -725,14 +727,17 @@ - invoker - (List.map fields ~f:(fun f -> app_arg (body f)) - @ [ app_arg -- { (List.fold_right -+ (let body = -+ List.fold_right - (self :: List.map fields ~f:(fun f -> (name f).txt)) - ~init:fake_object - ~f:(fun name fun_ -> -- Exp.fun_ ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_)) -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_) -+ in -+ { body - with -- pexp_attributes = [ merlin_hide ] -- } -+ pexp_attributes = body.pexp_attributes @ [ merlin_hide ] -+ }) - ]) - - let transform = + { Ocaml_ast_mapper.default_mapper with expr } ++ ++ diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch new file mode 100644 index 0000000000..d82b9d1fb8 --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch @@ -0,0 +1,24 @@ +--- a/toplevel/lib/jsooTop.ml ++++ b/toplevel/lib/jsooTop.ml +@@ -65,6 +65,7 @@ + p := !p + len''; + len'' + ++[%%if ocaml_version < (4, 14, 0)] + let use ffp content = + let fname, oc = + Filename.open_temp_file ~mode:[ Open_binary ] "jsoo_toplevel" "fake_stdin" +@@ -78,10 +79,11 @@ + with e -> + Sys.remove fname; + raise e +-[@@if ocaml_version < (4, 14, 0)] ++[%%endif] + ++[%%if ocaml_version >= (4, 14, 0)] + let use ffp content = Toploop.use_silently ffp (String content) +-[@@if ocaml_version >= (4, 14, 0)] ++[%%endif] + + let execute printval ?pp_code ?highlight_location pp_answer s = + let lb = Lexing.from_function (refill_lexbuf s (ref 0) pp_code) in diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch new file mode 100644 index 0000000000..f33c06a02c --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch @@ -0,0 +1,91 @@ +--- a/compiler/ppx/ppx_optcomp_light.ml ++++ b/compiler/ppx/ppx_optcomp_light.ml +@@ -148,7 +148,8 @@ + | [] -> true + | _ -> ( + try +- let keep_one { attr_payload; attr_loc; _ } = ++ let keep_one ({ attr_payload; attr_loc; _ } as attr) = ++ Ppxlib.Attribute.mark_as_handled_manually attr; + let e = + match attr_payload with + | PStr [ { pstr_desc = Pstr_eval (e, []); _ } ] -> e +--- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml ++++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml +@@ -537,14 +537,6 @@ + + let rec create_meth_ty exp = + match exp.pexp_desc with +- | Pexp_fun (label, _, _, body) -> label :: create_meth_ty body +- | Pexp_function _ -> [ nolabel ] +- | Pexp_newtype (_, body) -> create_meth_ty body +- | _ -> [] +-[@@if ast_version < 502] +- +-let rec create_meth_ty exp = +- match exp.pexp_desc with + | Pexp_function (params, _, body) -> ( + List.filter_map params ~f:(function + | { pparam_desc = Pparam_newtype _; _ } -> None +@@ -556,7 +548,6 @@ + (* TODO: should we recurse or not ? *) + create_meth_ty e) + | _ -> [] +-[@@if ast_version >= 502] + + let preprocess_literal_object mappper fields : + [ `Fields of field_desc list | `Error of _ ] = +@@ -685,7 +676,7 @@ + | Val (_, _, _, body) -> body + | Meth (_, _, _, (body, ty), _) -> ( + match body.pexp_desc, ty with +- | ((Pexp_function (params, c, b), None) [@if ast_version >= 502]) -> ++ | ((Pexp_function (params, c, b), None)) -> + let params = + { pparam_desc = Pparam_val (nolabel, None, self_id) + ; pparam_loc = { body.pexp_loc with loc_ghost = true } +@@ -693,9 +684,9 @@ + :: params + in + { body with pexp_desc = Pexp_function (params, c, b) } +- | ((_, Some ty) [@if ast_version >= 502]) -> ( ++ | ((_, Some ty)) -> ( + let e = +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -703,18 +694,13 @@ + body + in + match e.pexp_desc with +- | Pexp_function (params, None, b) -> +- { e with pexp_desc = Pexp_function (params, Some (Pconstraint ty), b) } ++ | Pexp_function (params, ({ ret_type_constraint = None ; _ } as function_constraint), b) -> ++ let ret_type_constraint = Some (Pconstraint ty) in ++ let function_constraint = { function_constraint with ret_type_constraint } in ++ { e with pexp_desc = Pexp_function (params, function_constraint , b) } + | _ -> assert false) +- | ((_, Some ty) [@if ast_version < 502]) -> +- Exp.fun_ +- ~loc:{ body.pexp_loc with loc_ghost = true } +- Nolabel +- None +- self_id +- (Exp.constraint_ body ty) + | _, None -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -818,7 +804,7 @@ + in + { fun_ with pexp_desc = Pexp_function (params, c, b) } + | _ -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:gloc + nolabel + None diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch index 65c5b1c5ed..e69de29bb2 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch @@ -1,29 +0,0 @@ ---- a/compiler/tests-jsoo/test_floats.ml -+++ b/compiler/tests-jsoo/test_floats.ml -@@ -26,26 +26,6 @@ - Printf.printf "%g\n" (1. /. z); - [%expect {|-inf|}] - --module Float = struct -- include Float -- -- external acosh : float -> float = "caml_acosh_float" -- -- external asinh : float -> float = "caml_asinh_float" -- -- external atanh : float -> float = "caml_atanh_float" -- -- external erf : float -> float = "caml_erf_float" -- -- external erfc : float -> float = "caml_erfc_float" -- -- external cbrt : float -> float = "caml_cbrt_float" -- -- external exp2 : float -> float = "caml_exp2_float" -- -- external log2 : float -> float = "caml_log2_float" --end -- - let print f = - match Float.classify_float f with - | FP_nan -> print_endline "nan" diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch new file mode 100644 index 0000000000..52db6e50b2 --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch @@ -0,0 +1,158 @@ +--- b/compiler/lib/reserved.ml ++++ a/compiler/lib/reserved.ml +@@ -144,7 +144,6 @@ + ; "require" (* only available in node *) + ; "Symbol" + ; "ArrayBuffer" +- ; "DataView" + ; "Float32Array" + ; "Float64Array" + ; "Int16Array" +--- b/runtime/js/ieee_754.js ++++ a/runtime/js/ieee_754.js +@@ -17,27 +17,74 @@ + // along with this program; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +-//Provides: jsoo_dataview +-var jsoo_dataview = new DataView(new ArrayBuffer(8)); ++//Provides: jsoo_floor_log2 ++var log2_ok = Math.log2 && Math.log2(1.1235582092889474e307) === 1020; ++function jsoo_floor_log2(x) { ++ if (log2_ok) return Math.floor(Math.log2(x)); ++ var i = 0; ++ if (x === 0) return Number.NEGATIVE_INFINITY; ++ if (x >= 1) { ++ while (x >= 2) { ++ x /= 2; ++ i++; ++ } ++ } else { ++ while (x < 1) { ++ x *= 2; ++ i--; ++ } ++ } ++ return i; ++} + + //Provides: caml_int64_bits_of_float const +-//Requires: caml_int64_create_lo_mi_hi +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2, caml_int64_create_lo_mi_hi + function caml_int64_bits_of_float(x) { +- jsoo_dataview.setFloat64(0, x, true); +- var lo32 = jsoo_dataview.getUint32(0, true); +- var hi32 = jsoo_dataview.getUint32(4, true); +- var r1 = lo32 & 0xffffff; +- var r2 = (lo32 >>> 24) | ((hi32 << 8) & 0xffffff); +- var r3 = (hi32 >>> 16) & 0xffff; ++ if (!Number.isFinite(x)) { ++ if (Number.isNaN(x)) return caml_int64_create_lo_mi_hi(1, 0, 0x7ff0); ++ if (x > 0) return caml_int64_create_lo_mi_hi(0, 0, 0x7ff0); ++ else return caml_int64_create_lo_mi_hi(0, 0, 0xfff0); ++ } ++ var sign = ++ x === 0 && 1 / x === Number.NEGATIVE_INFINITY ++ ? 0x8000 ++ : x >= 0 ++ ? 0 ++ : 0x8000; ++ if (sign) x = -x; ++ // Int64.bits_of_float 1.1235582092889474E+307 = 0x7fb0000000000000L ++ // using Math.LOG2E*Math.log(x) in place of Math.log2 result in precision lost ++ var exp = jsoo_floor_log2(x) + 1023; ++ if (exp <= 0) { ++ exp = 0; ++ x /= Math.pow(2, -1026); ++ } else { ++ x /= Math.pow(2, exp - 1027); ++ if (x < 16) { ++ x *= 2; ++ exp -= 1; ++ } ++ if (exp === 0) { ++ x /= 2; ++ } ++ } ++ var k = Math.pow(2, 24); ++ var r3 = x | 0; ++ x = (x - r3) * k; ++ var r2 = x | 0; ++ x = (x - r2) * k; ++ var r1 = x | 0; ++ r3 = (r3 & 0xf) | sign | (exp << 4); + return caml_int64_create_lo_mi_hi(r1, r2, r3); + } + + //Provides: caml_int32_bits_of_float const +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2 + function caml_int32_bits_of_float(x) { +- jsoo_dataview.setFloat32(0, x, true); +- return jsoo_dataview.getUint32(0, true) | 0; ++ var float32a = new Float32Array(1); ++ float32a[0] = x; ++ var int32a = new Int32Array(float32a.buffer); ++ return int32a[0] | 0; + } + + //FP literals can be written using the hexadecimal +@@ -103,14 +150,24 @@ + } + + //Provides: caml_int64_float_of_bits const +-//Requires: jsoo_dataview + function caml_int64_float_of_bits(x) { + var lo = x.lo; + var mi = x.mi; + var hi = x.hi; +- jsoo_dataview.setUint32(0, lo | (mi << 24), true); +- jsoo_dataview.setUint32(4, (mi >>> 8) | (hi << 16), true); +- return jsoo_dataview.getFloat64(0, true); ++ var exp = (hi & 0x7fff) >> 4; ++ if (exp === 2047) { ++ if ((lo | mi | (hi & 0xf)) === 0) ++ return hi & 0x8000 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY; ++ else return Number.NaN; ++ } ++ var k = Math.pow(2, -24); ++ var res = (lo * k + mi) * k + (hi & 0xf); ++ if (exp > 0) { ++ res += 16; ++ res *= Math.pow(2, exp - 1027); ++ } else res *= Math.pow(2, -1026); ++ if (hi & 0x8000) res = -res; ++ return res; + } + + //Provides: caml_nextafter_float const +@@ -135,10 +192,11 @@ + } + + //Provides: caml_int32_float_of_bits const +-//Requires: jsoo_dataview + function caml_int32_float_of_bits(x) { +- jsoo_dataview.setUint32(0, x, true); +- return jsoo_dataview.getFloat32(0, true); ++ var int32a = new Int32Array(1); ++ int32a[0] = x; ++ var float32a = new Float32Array(int32a.buffer); ++ return float32a[0]; + } + + //Provides: caml_classify_float const +@@ -186,11 +244,12 @@ + return x; + } + //Provides: caml_frexp_float const ++//Requires: jsoo_floor_log2 + function caml_frexp_float(x) { + if (x === 0 || !Number.isFinite(x)) return [0, x, 0]; + var neg = x < 0; + if (neg) x = -x; +- var exp = Math.max(-1023, Math.floor(Math.log2(x)) + 1); ++ var exp = Math.max(-1023, jsoo_floor_log2(x) + 1); + x *= Math.pow(2, -exp); + while (x < 0.5) { + x *= 2; diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch new file mode 100644 index 0000000000..3058a0eac5 --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch @@ -0,0 +1,19 @@ +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -21,8 +21,14 @@ + let rec constant_of_const c : Code.constant = + let open Lambda in + match c with +- | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) +- | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) ++ | Const_base ++ (Const_int8 i | Const_untagged_int8 i | ++ Const_int16 i | Const_untagged_int16 i | ++ Const_int i | Const_untagged_int i) -> ++ Int (Targetint.of_int_warning_on_overflow i) ++ ++ | Const_base (Const_char c | Const_untagged_char c) -> ++ Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch new file mode 100644 index 0000000000..7e3dd48e83 --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch @@ -0,0 +1,12 @@ +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -285,7 +285,8 @@ + | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) +- | "caml_int64_bits_of_float", [ Float f ] -> int64 f ++ ++ (* | "caml_int64_bits_of_float", [ Float f ] -> int64 f *) + | "caml_int64_float_of_bits", [ Int64 i ] -> Some (Float i) + | "caml_int64_of_float", [ Float f ] -> + int64 (Int64.of_float (Int64.float_of_bits f)) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch index d3b426a837..e69de29bb2 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch @@ -1,20 +0,0 @@ ---- a/compiler/tests-jsoo/gh_1307.ml -+++ b/compiler/tests-jsoo/gh_1307.ml -@@ -15,7 +15,7 @@ - test "a"; - [%expect {| - input: "a" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - test "aa"; - [%expect {| -@@ -25,7 +25,7 @@ - test "aaa"; - [%expect {| - input: "aaa" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - let (_ : bool) = Parsing.set_trace old in - () diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch new file mode 100644 index 0000000000..23d27d2bf7 --- /dev/null +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch @@ -0,0 +1,1531 @@ +--- a/compiler/lib-wasm/generate.ml ++++ b/compiler/lib-wasm/generate.ml +@@ -99,32 +99,53 @@ + + let specialized_primitives = + let h = String.Hashtbl.create 18 in ++ let caml_accessors = ++ let ( let* ) l f = List.concat_map l ~f in ++ let* index_type, index_suffix = ++ [ Value, "" ++ ; Int32, "_indexed_by_int32" ++ ; Int64, "_indexed_by_int64" ++ ; Nativeint, "_indexed_by_nativeint" ++ ] ++ in ++ let* data_type, data_type_name = ++ [ Value, "16"; Int32, "32"; Int64, "64"; Value, "f32" ] ++ in ++ let* array_type_name, accessors = ++ [ "string", [ `Get ]; "bytes", [ `Get; `Set ]; "ba_uint8", [ `Get; `Set ] ] ++ in ++ let* op = accessors in ++ [ (match op with ++ | `Get -> ++ ( "caml_" ^ array_type_name ^ "_get" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type ], data_type) ) ++ | `Set -> ++ ( "caml_" ^ array_type_name ^ "_set" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type; data_type ], Value) )) ++ ] ++ in + List.iter + ~f:(fun (nm, typ) -> String.Hashtbl.add h nm typ) ++ (caml_accessors @ + [ "caml_int32_bswap", (`Pure, [ Int32 ], Int32) + ; "caml_nativeint_bswap", (`Pure, [ Nativeint ], Nativeint) + ; "caml_int64_bswap", (`Pure, [ Int64 ], Int64) + ; "caml_int32_compare", (`Pure, [ Int32; Int32 ], Value) ++ ; "caml_checked_int32_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_nativeint_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_int64_to_int32", (`Pure, [ Int64 ], Int32) + ; "caml_nativeint_compare", (`Pure, [ Nativeint; Nativeint ], Value) + ; "caml_int64_compare", (`Pure, [ Int64; Int64 ], Value) +- ; "caml_string_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_string_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_bytes_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_bytes_set64", (`Mutator, [ Value; Value; Int64 ], Value) ++ ; "caml_float16_of_double", (`Pure, [ Float ], Int32) ++ ; "caml_double_of_float16", (`Pure, [ Int32 ], Float) + ; "caml_lxm_next", (`Pure, [ Value ], Int64) +- ; "caml_ba_uint8_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_ba_uint8_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_ba_uint8_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_ba_uint8_set64", (`Mutator, [ Value; Value; Int64 ], Value) + ; "caml_nextafter_float", (`Pure, [ Float; Float ], Float) + ; "caml_classify_float", (`Pure, [ Float ], Value) + ; "caml_ldexp_float", (`Pure, [ Float; Value ], Float) + ; "caml_erf_float", (`Pure, [ Float ], Float) + ; "caml_erfc_float", (`Pure, [ Float ], Float) + ; "caml_float_compare", (`Pure, [ Float; Float ], Value) +- ]; ++ ]); + h + + let float_bin_op' op f g = +@@ -233,8 +254,42 @@ + let () = + register_bin_prim "caml_array_unsafe_get" `Mutable Memory.gen_array_get; + register_bin_prim "caml_floatarray_unsafe_get" `Mutable Memory.float_array_get; ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int32" `Mutable (fun x y -> ++ let conv = Memory.unbox_int32 in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int64" `Mutator (fun x y -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ register_bin_prim "caml_array_unsafe_get_indexed_by_nativeint" `Mutable (fun x y -> ++ let conv = Memory.unbox_nativeint in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); + register_tern_prim "caml_array_unsafe_set" (fun x y z -> + seq (Memory.gen_array_set x y z) Value.unit); ++ let unboxed_indexed_array_access conv x y z = ++ seq (Memory.gen_array_set x (Value.val_int (conv y)) z) Value.unit ++ in ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int32" (fun x y z -> ++ let conv = Memory.unbox_int32 in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int64" (fun x y z -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_nativeint" (fun x y z -> ++ let conv = Memory.unbox_nativeint in ++ unboxed_indexed_array_access conv x y z ++ ); + register_tern_prim "caml_array_unsafe_set_addr" (fun x y z -> + seq (Memory.array_set x y z) Value.unit); + register_tern_prim "caml_floatarray_unsafe_set" (fun x y z -> +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -281,6 +281,8 @@ + | "caml_nativeint_compare", [ NativeInt i; NativeInt j ] -> + Some (Int (Targetint.of_int_exn (Int32.compare i j))) + | "caml_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) + (* CR-someday jrodriguez: [Float_u.Option.none ()] is a very specific, sentinel NaN. +@@ -650,7 +652,7 @@ + else None + in + match res with +- | Some c -> ++ | Some c when Var.idx x < Info.info_defs_length info -> + let c = Constant c in + Flow.Info.update_def info x c; + incr update_count; +--- a/compiler/lib/flow.ml ++++ b/compiler/lib/flow.ml +@@ -56,6 +56,9 @@ + let update_def { info_defs; _ } x exp = + let idx = Code.Var.idx x in + info_defs.(idx) <- Expr exp ++ ;; ++ ++ let info_defs_length { info_defs; _ } = Array.length info_defs + end + + let undefined = Phi Var.Set.empty +@@ -363,6 +366,13 @@ + let the_const_of ~eq info x = + match x with + | Pv x -> ++ ++ (* If this variable was minted after we constructed the info table, conservatively ++ assume we know nothing. Transformations of array-access primitives in ++ [specialize_js.ml] mint variables in this way. *) ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -386,11 +396,15 @@ + | Some i, Some j when eq i j -> u + | _ -> None) + x ++ ) + | Pc c -> Some c + + let the_int info x = + match x with + | Pv x -> ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -403,6 +417,7 @@ + | Some i, Some j when Targetint.equal i j -> u + | _ -> None) + x ++ ) + | Pc (Int c) -> Some c + | Pc _ -> None + +--- a/compiler/lib/flow.mli ++++ b/compiler/lib/flow.mli +@@ -45,6 +45,8 @@ + val update_def : t -> Code.Var.t -> Code.expr -> unit + + val possibly_mutable : t -> Code.Var.t -> bool ++ ++ val info_defs_length : t -> int + end + + val get_approx : +--- a/compiler/lib/generate.ml ++++ b/compiler/lib/generate.ml +@@ -1143,6 +1143,7 @@ + J.call (J.dot (s_var "Math") prim) [ cx; cy ] loc) + + let _ = ++ register_un_prim "%identity" `Pure (fun cx _ -> cx); + register_un_prim_ctx "%caml_format_int_special" `Pure (fun ctx cx loc -> + let s = J.EBin (J.Plus, str_js_utf8 "", cx) in + ocaml_string ~ctx ~loc s); +@@ -1151,6 +1152,8 @@ + [ "caml_array_unsafe_get" + ; "caml_array_unsafe_get_float" + ; "caml_floatarray_unsafe_get" ++ ; "caml_array_unsafe_get_indexed_by_int32" ++ ; "caml_array_unsafe_get_indexed_by_nativeint" + ] + `Mutable + (fun cx cy _ -> Mlvalue.Array.field cx cy); +@@ -1160,6 +1163,8 @@ + ; "caml_int32_to_float" + ; "caml_nativeint_of_int" + ; "caml_nativeint_to_int" ++ ; "caml_checked_nativeint_to_int" ++ ; "caml_checked_int32_to_int" + ; "caml_nativeint_to_int32" + ; "caml_nativeint_of_int32" + ; "caml_nativeint_to_float" +@@ -1246,6 +1251,8 @@ + ; "caml_array_unsafe_set_float" + ; "caml_floatarray_unsafe_set" + ; "caml_array_unsafe_set_addr" ++ ; "caml_array_unsafe_set_indexed_by_int32" ++ ; "caml_array_unsafe_set_indexed_by_nativeint" + ] + `Mutator + (fun cx cy cz _ -> J.EBin (J.Eq, Mlvalue.Array.field cx cy, cz)); +--- a/compiler/lib/specialize_js.ml ++++ b/compiler/lib/specialize_js.ml +@@ -303,6 +303,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_get_indexed_by_int32" ++ | "caml_array_get_indexed_by_int64" ++ | "caml_array_get_indexed_by_nativeint") ++ as prim) ++ , [ y; z ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_get_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_get_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_get_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_get] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_get", [ y; Pv z' ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_get" + | "caml_array_get_float" + | "caml_floatarray_get" +@@ -349,6 +375,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_set_indexed_by_int32" ++ | "caml_array_set_indexed_by_int64" ++ | "caml_array_set_indexed_by_nativeint") ++ as prim) ++ , [ y; z; w ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_set_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_set_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_set_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_set] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_set", [ y; Pv z'; w ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_set" + | "caml_array_set_float" + | "caml_floatarray_set" +--- a/runtime/js/bigarray.js ++++ b/runtime/js/bigarray.js +@@ -43,6 +43,7 @@ + } + + //Provides: caml_unpackFloat16 ++//Alias: caml_double_of_float16 + var caml_unpackFloat16 = (function () { + var pow = Math.pow; + +@@ -73,6 +74,7 @@ + })(); + + //Provides: caml_packFloat16 ++//Alias: caml_float16_of_double + var caml_packFloat16 = (function () { + const INVERSE_OF_EPSILON = 1 / Number.EPSILON; + +@@ -549,6 +551,8 @@ + } + + //Provides: caml_ba_uint8_get16 ++//Alias: caml_ba_uint8_get16_indexed_by_int32 ++//Alias: caml_ba_uint8_get16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get16(ba, i0) { + var ofs = ba.offset(i0); +@@ -558,7 +562,15 @@ + return b1 | (b2 << 8); + } + ++//Provides: caml_ba_uint8_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get16 ++function caml_ba_uint8_get16_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get32 ++//Alias: caml_ba_uint8_get32_indexed_by_int32 ++//Alias: caml_ba_uint8_get32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get32(ba, i0) { + var ofs = ba.offset(i0); +@@ -570,7 +582,15 @@ + return (b1 << 0) | (b2 << 8) | (b3 << 16) | (b4 << 24); + } + ++//Provides: caml_ba_uint8_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get32 ++function caml_ba_uint8_get32_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get64 ++//Alias: caml_ba_uint8_get64_indexed_by_int32 ++//Alias: caml_ba_uint8_get64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_of_bytes + function caml_ba_uint8_get64(ba, i0) { + var ofs = ba.offset(i0); +@@ -586,6 +606,12 @@ + return caml_int64_of_bytes([b8, b7, b6, b5, b4, b3, b2, b1]); + } + ++//Provides: caml_ba_uint8_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get64 ++function caml_ba_uint8_get64_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_get_1 + function caml_ba_get_1(ba, i0) { + return ba.get(ba.offset(i0)); +@@ -609,6 +635,8 @@ + } + + //Provides: caml_ba_uint8_set16 ++//Alias: caml_ba_uint8_set16_indexed_by_int32 ++//Alias: caml_ba_uint8_set16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set16(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -618,7 +646,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set16 ++function caml_ba_uint8_set16_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set16(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set32 ++//Alias: caml_ba_uint8_set32_indexed_by_int32 ++//Alias: caml_ba_uint8_set32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set32(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -630,7 +666,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set32 ++function caml_ba_uint8_set32_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set32(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set64 ++//Alias: caml_ba_uint8_set64_indexed_by_int32 ++//Alias: caml_ba_uint8_set64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_to_bytes + function caml_ba_uint8_set64(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -640,6 +684,12 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set64 ++function caml_ba_uint8_set64_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set64(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_set_1 + function caml_ba_set_1(ba, i0, v) { + ba.set(ba.offset(i0), v); +--- a/runtime/js/float32.js ++++ b/runtime/js/float32.js +@@ -375,36 +375,78 @@ + let caml_ba_float32_set_3 = caml_ba_set_3 + + //Provides: caml_ba_uint8_getf32 ++//Alias: caml_ba_uint8_getf32_indexed_by_int32 ++//Alias: caml_ba_uint8_getf32_indexed_by_nativeint + //Requires: caml_ba_uint8_get32, caml_int32_float_of_bits + function caml_ba_uint8_getf32(ba, i0) { + return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); + } + ++//Provides: caml_ba_uint8_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_getf32 ++function caml_ba_uint8_getf32_indexed_by_int64(ba, i) { ++ return caml_ba_uint8_getf32(ba, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_setf32 ++//Alias: caml_ba_uint8_setf32_indexed_by_int32 ++//Alias: caml_ba_uint8_setf32_indexed_by_nativeint + //Requires: caml_ba_uint8_set32, caml_int32_bits_of_float + function caml_ba_uint8_setf32(ba, i0, v) { + return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); + } + ++//Provides: caml_ba_uint8_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_setf32 ++function caml_ba_uint8_setf32_indexed_by_int64(ba, i, v) { ++ return caml_ba_uint8_setf32(ba, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_string_getf32 ++//Alias: caml_string_getf32_indexed_by_int32 ++//Alias: caml_string_getf32_indexed_by_nativeint + //Requires: caml_string_get32, caml_int32_float_of_bits + function caml_string_getf32(s, i) { + return caml_int32_float_of_bits(caml_string_get32(s, i)); + } + ++//Provides: caml_string_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_getf32 ++function caml_string_getf32_indexed_by_int64(s, i) { ++ return caml_string_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_getf32 ++//Alias: caml_bytes_getf32_indexed_by_int32 ++//Alias: caml_bytes_getf32_indexed_by_nativeint + //Requires: caml_bytes_get32, caml_int32_float_of_bits + function caml_bytes_getf32(s, i) { + return caml_int32_float_of_bits(caml_bytes_get32(s, i)); + } + ++//Provides: caml_bytes_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_getf32 ++function caml_bytes_getf32_indexed_by_int64(s, i) { ++ return caml_bytes_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_setf32 ++//Alias: caml_bytes_setf32_indexed_by_int32 ++//Alias: caml_bytes_setf32_indexed_by_nativeint + //Requires: caml_bytes_set32, caml_int32_bits_of_float + function caml_bytes_setf32(s, i, f32) { + return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); + } + ++//Provides: caml_bytes_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_setf32 ++function caml_bytes_setf32_indexed_by_int64(s, i, f32) { ++ return caml_bytes_setf32(s, caml_checked_int64_to_int(i), f32) ++} ++ + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_failwith + //If: js-string + function caml_string_setf32(s, i, f32) { +@@ -412,8 +454,16 @@ + } + + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_bytes_setf32 + //If: !js-string + function caml_string_setf32(s, i, f32) { + return caml_bytes_setf32(s, i, f32); + } ++ ++//Provides: caml_string_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_setf32 ++function caml_string_setf32_indexed_by_int64(s, i, f32) { ++ return caml_string_setf32(s, caml_checked_int64_to_int(i), f32) ++} +--- a/runtime/js/int64.js ++++ b/runtime/js/int64.js +@@ -352,6 +352,27 @@ + return x.toInt(); + } + ++//Provides: caml_checked_int64_to_int const ++//Requires: caml_int64_of_int32, caml_failwith ++function caml_checked_int64_to_int (x) { ++ if (x.compare(caml_int64_of_int32(0x7FFFFFFF)) == 1 ++ || x.compare(caml_int64_of_int32(0x80000000)) == -1) ++ caml_failwith("error while converting from int64") ++ return x.toInt() ++} ++ ++//Provides: caml_array_unsafe_get_indexed_by_int64 (mutable, const) ++//Requires: caml_int64_to_int32, caml_array_get ++function caml_array_unsafe_get_indexed_by_int64 (array, index) { ++ return caml_array_get(array, caml_int64_to_int32(index)); ++} ++ ++//Provides: caml_array_unsafe_set_indexed_by_int64 (mutable, const, mutable) ++//Requires: caml_int64_to_int32, caml_array_set ++function caml_array_unsafe_set_indexed_by_int64 (array, index, newval) { ++ return caml_array_set(array, caml_int64_to_int32(index), newval) ++} ++ + //Provides: caml_int64_to_float const + function caml_int64_to_float(x) { + return x.toFloat(); +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -251,6 +251,8 @@ + } + + //Provides: caml_string_get16 ++//Alias: caml_string_get16_indexed_by_int32 ++//Alias: caml_string_get16_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get16(s, i) { +@@ -260,7 +262,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_string_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get16 ++function caml_string_get16_indexed_by_int64(s, i) { ++ return caml_string_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get16 ++//Alias: caml_bytes_get16_indexed_by_int32 ++//Alias: caml_bytes_get16_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get16(s, i) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -269,7 +279,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get16 ++function caml_bytes_get16_indexed_by_int64(s, i) { ++ return caml_bytes_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get32 ++//Alias: caml_string_get32_indexed_by_int32 ++//Alias: caml_string_get32_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get32(s, i) { +@@ -281,7 +299,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_string_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get32 ++function caml_string_get32_indexed_by_int64(s, i) { ++ return caml_string_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get32 ++//Alias: caml_bytes_get32_indexed_by_int32 ++//Alias: caml_bytes_get32_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get32(s, i) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -292,7 +318,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get32 ++function caml_bytes_get32_indexed_by_int64(s, i) { ++ return caml_bytes_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get64 ++//Alias: caml_string_get64_indexed_by_int32 ++//Alias: caml_string_get64_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_int64_of_bytes + //Requires: caml_ml_string_length +@@ -305,7 +339,15 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_string_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get64 ++function caml_string_get64_indexed_by_int64(s, i) { ++ return caml_string_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get64 ++//Alias: caml_bytes_get64_indexed_by_int32 ++//Alias: caml_bytes_get64_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + //Requires: caml_int64_of_bytes + function caml_bytes_get64(s, i) { +@@ -317,6 +359,12 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_bytes_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get64 ++function caml_bytes_get64_indexed_by_int64(s, i) { ++ return caml_bytes_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_get + function caml_bytes_get(s, i) { +@@ -340,6 +388,8 @@ + } + + //Provides: caml_bytes_set16 ++//Alias: caml_bytes_set16_indexed_by_int32 ++//Alias: caml_bytes_set16_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set16(s, i, i16) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -350,7 +400,15 @@ + return 0; + } + ++//Provides: caml_bytes_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set16 ++function caml_bytes_set16_indexed_by_int64(s, i, i16) { ++ return caml_bytes_set16(s, caml_checked_int64_to_int(i), i16) ++} ++ + //Provides: caml_bytes_set32 ++//Alias: caml_bytes_set32_indexed_by_int32 ++//Alias: caml_bytes_set32_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set32(s, i, i32) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -365,7 +423,15 @@ + return 0; + } + ++//Provides: caml_bytes_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set32 ++function caml_bytes_set32_indexed_by_int64(s, i, i32) { ++ return caml_bytes_set32(s, caml_checked_int64_to_int(i), i32) ++} ++ + //Provides: caml_bytes_set64 ++//Alias: caml_bytes_set64_indexed_by_int32 ++//Alias: caml_bytes_set64_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + //Requires: caml_int64_to_bytes + function caml_bytes_set64(s, i, i64) { +@@ -377,6 +443,12 @@ + return 0; + } + ++//Provides: caml_bytes_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set64 ++function caml_bytes_set64_indexed_by_int64(s, i, i64) { ++ return caml_bytes_set64(s, caml_checked_int64_to_int(i), i64) ++} ++ + //Provides: caml_bytes_set + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set(s, i, c) { +--- a/runtime/wasm/bigarray.wat ++++ b/runtime/wasm/bigarray.wat +@@ -90,6 +90,8 @@ + (func $Int32_val (param (ref eq)) (result i32))) + (import "int32" "caml_copy_nativeint" + (func $caml_copy_nativeint (param i32) (result (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + (import "int64" "caml_copy_int64" + (func $caml_copy_int64 (param i64) (result (ref eq)))) + (import "int64" "Int64_val" +@@ -176,7 +178,9 @@ + (field $ba_kind i8) ;; kind + (field $ba_layout i8)))) ;; layout + +- (func $double_to_float16 (param $f f64) (result i32) ++ (func $double_to_float16 ++ (export "caml_float16_of_double") ++ (param $f f64) (result i32) + (local $x i32) (local $sign i32) (local $o i32) + (local.set $x (i32.reinterpret_f32 (f32.demote_f64 (local.get $f)))) + (local.set $sign (i32.and (local.get $x) (i32.const 0x80000000))) +@@ -206,7 +210,9 @@ + (i32.const 13))))))) + (i32.or (local.get $o) (i32.shr_u (local.get $sign) (i32.const 16)))) + +- (func $float16_to_double (param $d i32) (result f64) ++ (func $float16_to_double ++ (export "caml_double_of_float16") ++ (param $d i32) (result f64) + (local $f f32) + (local.set $f + (f32.mul +@@ -2009,125 +2015,207 @@ + (br $loop)))) + (return (i32.const 0))) + +- (func (export "caml_ba_uint8_get16") +- (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (func $caml_ba_uint8_get16_indexed_by_int32 ++ (export "caml_ba_uint8_get16_indexed_by_int32") ++ (export "caml_ba_uint8_get16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $p)))) ++ (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get32") +- (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (func (export "caml_ba_uint8_get16") ++ (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get32_indexed_by_int32 ++ (export "caml_ba_uint8_get32_indexed_by_int32") ++ (export "caml_ba_uint8_get32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i32) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (return_call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (return_call $ta_get32_ui8 (local.get $data) (local.get $i))) ++ ++ (func (export "caml_ba_uint8_get32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get64") +- (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (func (export "caml_ba_uint8_get32") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get64_indexed_by_int32 ++ (export "caml_ba_uint8_get64_indexed_by_int32") ++ (export "caml_ba_uint8_get64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i64) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) + (i64.or + (i64.extend_i32_u +- (call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (call $ta_get32_ui8 (local.get $data) (local.get $i))) + (i64.shl (i64.extend_i32_u + (call $ta_get32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)))) + +- (func (export "caml_ba_uint8_set16") +- (param $vba (ref eq)) (param $i (ref eq)) (param $v (ref eq)) ++ (func (export "caml_ba_uint8_get64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get64") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_set16_indexed_by_int32 ++ (export "caml_ba_uint8_set16_indexed_by_int32") ++ (export "caml_ba_uint8_set16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $v (ref eq)) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) (local $d (ref i31)) ++ (local $d (ref i31)) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) + (local.set $d (ref.cast (ref i31) (local.get $v))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set16_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set16_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set32") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) ++ (func (export "caml_ba_uint8_set16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set16") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set32_indexed_by_int32 ++ (export "caml_ba_uint8_set32_indexed_by_int32") ++ (export "caml_ba_uint8_set32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i32) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set64") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) ++ (func (export "caml_ba_uint8_set32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set32") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set64_indexed_by_int32 ++ (export "caml_ba_uint8_set64_indexed_by_int32") ++ (export "caml_ba_uint8_set64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i64) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) + (i32.wrap_i64 (local.get $d))) + (call $ta_set32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $d) (i64.const 32)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_ba_uint8_set64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set64") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ + (export "caml_bytes_of_uint8_array" (func $caml_string_of_uint8_array)) + (func $caml_string_of_uint8_array (export "caml_string_of_uint8_array") + (param (ref eq)) (result (ref eq)) +--- a/runtime/wasm/float32.wat ++++ b/runtime/wasm/float32.wat +@@ -41,14 +41,34 @@ + (func $caml_ba_set_3 (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)))) + (import "bigarray" "caml_ba_uint8_get32" + (func $caml_ba_uint8_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int32" ++ (func $caml_ba_uint8_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int64" ++ (func $caml_ba_uint8_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "bigarray" "caml_ba_uint8_set32" + (func $caml_ba_uint8_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int32" ++ (func $caml_ba_uint8_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int64" ++ (func $caml_ba_uint8_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "string" "caml_string_get32" + (func $caml_string_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int32" ++ (func $caml_string_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int64" ++ (func $caml_string_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_get32" + (func $caml_bytes_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int32" ++ (func $caml_bytes_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int64" ++ (func $caml_bytes_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_set32" + (func $caml_bytes_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int32" ++ (func $caml_bytes_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int64" ++ (func $caml_bytes_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "array" "caml_make_vect" + (func $caml_make_vect (param (ref eq)) (param (ref eq)) (result (ref eq)))) + +@@ -686,23 +706,87 @@ + (call $box_float32 (f32.reinterpret_i32 + (call $caml_ba_uint8_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_ba_uint8_getf32_indexed_by_int32 ++ (export "caml_ba_uint8_getf32_indexed_by_int32") ++ (export "caml_ba_uint8_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_ba_uint8_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_ba_uint8_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_ba_uint8_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ++ (func $caml_ba_uint8_setf32_indexed_by_int32 ++ (export "caml_ba_uint8_setf32_indexed_by_int32") ++ (export "caml_ba_uint8_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_ba_uint8_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ + (func (export "caml_string_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_string_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_string_getf32_indexed_by_int32 ++ (export "caml_string_getf32_indexed_by_int32") ++ (export "caml_string_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_string_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_bytes_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_bytes_getf32_indexed_by_int32 ++ (export "caml_bytes_getf32_indexed_by_int32") ++ (export "caml_bytes_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_bytes_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func $caml_bytes_setf32_indexed_by_int32 ++ (export "caml_bytes_setf32_indexed_by_int32") ++ (export "caml_bytes_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_bytes_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ) +--- a/runtime/wasm/int32.wat ++++ b/runtime/wasm/int32.wat +@@ -124,6 +124,21 @@ + (call $parse_int + (local.get $v) (i32.const 32) (global.get $INT32_ERRMSG)))) + ++ (data $integer_conversion_error "error while converting from int32") ++ ++ (func $caml_checked_int32_to_int (export "caml_checked_int32_to_int") ++ (param i32) (result (ref eq)) ++ (if (i32.or (i32.gt_s (local.get 0) (i32.const 0x3FFFFFFF)) ++ (i32.lt_s (local.get 0) (i32.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (local.get 0))) ++ ++ (func $caml_checked_nativeint_to_int (export "caml_checked_nativeint_to_int") ++ (param i32) (result (ref eq)) ++ (call $caml_checked_int32_to_int (local.get 0))) ++ + (export "caml_nativeint_compare" (func $caml_int32_compare)) + (func $caml_int32_compare (export "caml_int32_compare") + (param $i1 i32) (param $i2 i32) (result (ref eq)) +@@ -177,4 +192,6 @@ + (return_call $format_int (local.get 0) + (struct.get $int32 1 + (ref.cast (ref $int32) (local.get 1))) (i32.const 0))) ++ ++ + ) +--- a/runtime/wasm/int64.wat ++++ b/runtime/wasm/int64.wat +@@ -317,4 +317,26 @@ + (local.get $uppercase))))))))) + (local.get $s)) + ++ (data $integer_conversion_error "error while converting from int64") ++ ++ (func $caml_checked_int64_to_int (export "caml_checked_int64_to_int") ++ (param (ref eq)) (result (ref eq)) ++ (local $i i64) ++ (local.set $i ++ (struct.get $int64 1 (ref.cast (ref $int64) (local.get 0)))) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (i32.wrap_i64 (local.get $i)))) ++ ++ (func (export "caml_checked_int64_to_int32") ++ (param $i i64) (result i32) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (i32.wrap_i64 (local.get $i))) + ) +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -19,6 +19,8 @@ + (import "fail" "caml_bound_error" (func $caml_bound_error)) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param $arg (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + + (type $bytes (array (mut i8))) + +@@ -153,171 +155,274 @@ + (i31.get_u (ref.cast (ref i31) (local.get $len)))) + (ref.i31 (i32.const 0))) + +- (export "caml_string_get16" (func $caml_bytes_get16)) +- (func $caml_bytes_get16 (export "caml_bytes_get16") +- (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int32 ++ (export "caml_bytes_get16_indexed_by_int32") ++ (export "caml_bytes_get16_indexed_by_nativeint") ++ (export "caml_string_get16_indexed_by_int32") ++ (export "caml_string_get16_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (ref.i31 (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))))) + +- (export "caml_string_get32" (func $caml_bytes_get32)) +- (func $caml_bytes_get32 (export "caml_bytes_get32") +- (param $v (ref eq)) (param $i (ref eq)) (result i32) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int64 ++ (export "caml_bytes_get16_indexed_by_int64") ++ (export "caml_string_get16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get16 ++ (export "caml_bytes_get16") ++ (export "caml_string_get16") ++ (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get32_indexed_by_int32 ++ (export "caml_bytes_get32_indexed_by_int32") ++ (export "caml_bytes_get32_indexed_by_nativeint") ++ (export "caml_string_get32_indexed_by_int32") ++ (export "caml_string_get32_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i32) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i32.or + (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))) + (i32.or + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2))) ++ (i32.add (local.get $i) (i32.const 2))) + (i32.const 16)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3))) ++ (i32.add (local.get $i) (i32.const 3))) + (i32.const 24))))) + +- (export "caml_string_get64" (func $caml_bytes_get64)) +- (func $caml_bytes_get64 (export "caml_bytes_get64") +- (param $v (ref eq)) (param $i (ref eq)) (result i64) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get32_indexed_by_int64 ++ (export "caml_bytes_get32_indexed_by_int64") ++ (export "caml_string_get32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get32 ++ (export "caml_bytes_get32") ++ (export "caml_string_get32") ++ (param $v (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get64_indexed_by_int32 ++ (export "caml_bytes_get64_indexed_by_int32") ++ (export "caml_bytes_get64_indexed_by_nativeint") ++ (export "caml_string_get64_indexed_by_int32") ++ (export "caml_string_get64_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i64) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i64.or + (i64.or + (i64.or + (i64.extend_i32_u +- (array.get_u $bytes (local.get $s) (local.get $p))) ++ (array.get_u $bytes (local.get $s) (local.get $i))) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)))) ++ (i32.add (local.get $i) (i32.const 1)))) + (i64.const 8))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)))) ++ (i32.add (local.get $i) (i32.const 2)))) + (i64.const 16)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)))) ++ (i32.add (local.get $i) (i32.const 3)))) + (i64.const 24)))) + (i64.or + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)))) ++ (i32.add (local.get $i) (i32.const 5)))) + (i64.const 40))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)))) ++ (i32.add (local.get $i) (i32.const 6)))) + (i64.const 48)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)))) ++ (i32.add (local.get $i) (i32.const 7)))) + (i64.const 56)))))) + +- (func (export "caml_bytes_set16") +- (param (ref eq) (ref eq) (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) (local $v i32) ++ (func $caml_bytes_get64_indexed_by_int64 ++ (export "caml_bytes_get64_indexed_by_int64") ++ (export "caml_string_get64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get64 ++ (export "caml_bytes_get64") ++ (export "caml_string_get64") ++ (param $v (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_bytes_set16_indexed_by_int32 ++ (export "caml_bytes_set16_indexed_by_int32") ++ (export "caml_bytes_set16_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param (ref eq)) (result (ref eq)) ++ (local $s (ref $bytes)) (local $v i32) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $v (i31.get_s (ref.cast (ref i31) (local.get 2)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set32") +- (param (ref eq)) (param (ref eq)) (param $v i32) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set16") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set32_indexed_by_int32 ++ (export "caml_bytes_set32_indexed_by_int32") ++ (export "caml_bytes_set32_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.shr_u (local.get $v) (i32.const 16))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.shr_u (local.get $v) (i32.const 24))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set64") +- (param (ref eq)) (param (ref eq)) (param $v i64) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set32") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set64_indexed_by_int32 ++ (export "caml_bytes_set64_indexed_by_int32") ++ (export "caml_bytes_set64_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i64) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) ++ (array.set $bytes (local.get $s) (local.get $i) + (i32.wrap_i64 (local.get $v))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 8)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 16)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 24)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 32)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)) ++ (i32.add (local.get $i) (i32.const 5)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 40)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)) ++ (i32.add (local.get $i) (i32.const 6)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 48)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)) ++ (i32.add (local.get $i) (i32.const 7)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 56)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_bytes_set64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set64") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ + (func (export "caml_string_concat") + (param $vs1 (ref eq)) (param $vs2 (ref eq)) (result (ref eq)) + (local $s1 (ref $bytes)) (local $s2 (ref $bytes)) diff --git a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/opam b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/opam index 8c93abe0bd..8321966d44 100644 --- a/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/opam +++ b/packages/js_of_ocaml-ppx/js_of_ocaml-ppx.6.0.1+ox/opam @@ -19,7 +19,7 @@ depends: [ "ppxlib" {= "0.33.0+ox"} "num" {with-test} "ppx_expect" {>= "v0.14.2" & with-test} - "re" {>= "1.9.0" & with-test} + "re" {>= "1.9.0" & with-test & = "1.14.0+ox"} "odoc" {with-doc} ] build: [ @@ -30,9 +30,9 @@ dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git" x-commit-hash: "b6d60e4f8ff35e7c7b3bb52b97ffedc3eb8e3d08" url { src: - "https://github.com/ocsigen/js_of_ocaml/archive/a8e8d2c1696a5fb3ddb4fe15495b1a8625a29b4b.tar.gz" + "https://github.com/ocsigen/js_of_ocaml/archive/246df644334aa97103d1051aec128337ea1868f9.tar.gz" checksum: - "sha256=b1e1ebd799547b33eec43b4d934bfde475b0ff4d20eba36d36147ee6d8db173c" + "sha256=c43572970512140facf02a30f16d4b34c10d55326bbd3d3c125bc2e549ef4ab8" } patches: [ "js_of_ocaml-magic_number.ml.patch" @@ -42,6 +42,7 @@ patches: [ "js_of_ocaml-add-unboxed-and-float-block.patch" "js_of_ocaml-ident-is_global.patch" "js_of_ocaml-remove-float-externals.patch" + "js_of_ocaml-ocaml_version-ppx.patch" "js_of_ocaml-test-diffs-caused-by-build-differences.patch" "js_of_ocaml-fix-build_fs.patch" "js_of_ocaml-iarray-primitives.patch" @@ -51,17 +52,13 @@ patches: [ "js_of_ocaml-caml_provides_sub_local.patch" "js_of_ocaml-caml_hash_exn.patch" "wasm_of_ocaml-bring-back-eval.patch" - "js_of_ocaml-index-by-unboxed-int.patch" "js_of_ocaml-mixed-block-bytecode-op.patch" "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" "js_of_ocaml-int_u-array-primitives.patch" - "js_of_ocaml-n-ary-functions.patch" "js_of_ocaml-symtable-5.2-api.patch" - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" "js_of_ocaml-jane-street-5.2-compatibility.patch" "js_of_ocaml-migrate-labeled-tuples-shims.patch" "js_of_ocaml-floatarray_create_local.patch" - "wasm_of_ocaml-sourcemap-contents.patch" "js_of_ocaml-jane-street-const_null-support.patch" "js_of_ocaml-float32.patch" "js_of_ocaml-caml_array_append.patch" @@ -69,21 +66,30 @@ patches: [ "js_of_ocaml-5.3-tests-runtime.patch" "js_of_ocaml-caml_bigstring_strncmp.patch" "wasm_of_ocaml-stub-caml_ml_set_channel_refill.patch" - "js_of_ocaml-version-directive-removal.patch" + "js_of_ocaml-no-compression-module-5.2.patch" "js_of_ocaml-obj_stubs.patch" - "js_of_ocaml-float32-2.patch" + "js_of_ocaml-global_deadcode-fix.patch" + "js_of_ocaml-local-bytes.patch" + "js_of_ocaml-n-ary-functions.patch" + "js_of_ocaml-optcomp_lite_fixes.patch" + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "js_of_ocaml-gh2034.patch" + "js_of_ocaml-unboxed-indexing.patch" + "js_of_ocaml-atomics.patch" + "js_of_ocaml-flipped-conditions-in-test.patch" + "js_of_ocaml-atomic-cmpxchg.patch" + "js_of_ocaml-small-int-literals.patch" "dune.patch" - "js_of_ocaml-top-effects.patch" - "js_of_ocaml-toplevel.patch" ] extra-files: [ [ "js_of_ocaml-magic_number.ml.patch" - "sha256=7feef837352414b5f102705c01915da98c3186f3559d92e94b63ad912c11dddd" + "sha256=05e204eac0338a76ca02db89ebb9505d80a7e268b93b746408356be913e219e6" ] [ "js_of_ocaml-compilation_unit-name.patch" - "sha256=63ebbb630149ade7f377dc8940d58968d7a44cef4911d67fc49a7fe10446eb1f" + "sha256=1e00a73f66cbaa87eefb45702eaaf431978f8eb9ed95684c781b0ebb035d1a7f" ] [ "js_of_ocaml-with_async_exns.patch" @@ -95,7 +101,7 @@ extra-files: [ ] [ "js_of_ocaml-add-unboxed-and-float-block.patch" - "sha256=625447650ca1c56f597000c3a7191309d1f1ed795f3670bc367d6383a07fc07e" + "sha256=db409edb2be9be828015b6722fb51d7bccdd1e4a7edf982b5c8d89808713af7b" ] [ "js_of_ocaml-ident-is_global.patch" @@ -103,19 +109,23 @@ extra-files: [ ] [ "js_of_ocaml-remove-float-externals.patch" - "sha256=a3aa95ee08210377c1470e5bf0f832bc27ad98299bca22c7a88eb9fd6c32e655" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-ocaml_version-ppx.patch" + "sha256=df6bcb6da8aa3dfd6bd0a178679987d41c400ec1803f4a66659cfc822d1b280f" ] [ "js_of_ocaml-test-diffs-caused-by-build-differences.patch" - "sha256=00d38ead67c67220351605d72c2b3a4e3faa8053087ef8ab47b7067b42900ba9" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-fix-build_fs.patch" - "sha256=6373ba10c70f77a2c5999bfec2484657a32450e44a3dfb04ce6bcaa05464d890" + "sha256=abaa404bf23a77cf1badfe30ab9fcc13c6fb0446a81fa10b0962ed1ba9005d6a" ] [ "js_of_ocaml-iarray-primitives.patch" - "sha256=1cefd949dad720858306c87e349dd927c402f292d7b7c770542f0b28bc8dc1b8" + "sha256=037ad55684c9ac3801ff284839d8bb1290d2e750cd4bcb03b75e5f4ab69559c9" ] [ "js_of_ocaml-important-config-changes.patch" @@ -123,7 +133,7 @@ extra-files: [ ] [ "js_of_ocaml-internal-ocaml-5-compatibility.patch" - "sha256=60cef558cd8c6ec4679c02e38e97933c9427d7de5e18bc151a60b4be9512fb36" + "sha256=6b7e17df7f0142158eca19a953422eb6eaf97a3f7f3f2443648bfd069fbcb90f" ] [ "js_of_ocaml-wasm-temp-differences.patch" @@ -141,13 +151,9 @@ extra-files: [ "wasm_of_ocaml-bring-back-eval.patch" "sha256=c413d9617e1122a9fdad8f1f63859bdf9f17a8440f78bdfbaecc432bae580fac" ] - [ - "js_of_ocaml-index-by-unboxed-int.patch" - "sha256=9983ff547de81845e0da06da547c6191671a72a5e1b321594b6d326b0e079e80" - ] [ "js_of_ocaml-mixed-block-bytecode-op.patch" - "sha256=289db81bcf2d12c5aa98e7cc14d4831eac38ba4795da862a4a78ed771c3c8ad9" + "sha256=ed6cfee285491515d497e8871c8534236e9a77939c3838dfd5b3fdb20626e347" ] [ "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" @@ -157,18 +163,10 @@ extra-files: [ "js_of_ocaml-int_u-array-primitives.patch" "sha256=99eba4301613d03e0305017a687c768bd24a22cef0db25ab62cbc3d304f647ba" ] - [ - "js_of_ocaml-n-ary-functions.patch" - "sha256=0f6c5da3756755db191492701c2df598426cdf57254b5366798dbd1f893e7e90" - ] [ "js_of_ocaml-symtable-5.2-api.patch" "sha256=9a999950e8984cc582e3830f447111e1082dc720609334de66a011347d26da9b" ] - [ - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" - "sha256=66afc6da651cd22984aec74f64ad6aaf1b211c6ce5a070fe444377cdaa44f14a" - ] [ "js_of_ocaml-jane-street-5.2-compatibility.patch" "sha256=45391a7a7da6c5bfbe97ec1272cb369d533c2d95cf7a7a56d754db94871eb043" @@ -181,17 +179,13 @@ extra-files: [ "js_of_ocaml-floatarray_create_local.patch" "sha256=f17e392acc941dde475cb7be0654037df9b8d550aeae0d96b65394e4c4a1d4ca" ] - [ - "wasm_of_ocaml-sourcemap-contents.patch" - "sha256=93b7dddf6313836ce02fbe762c40380e20daefdd8b87ec885ee0f4ef779ad76b" - ] [ "js_of_ocaml-jane-street-const_null-support.patch" "sha256=e708cdc01c0cef3fce1cb9f31b33324977dcca1c166601905fcac1ef10262c3a" ] [ "js_of_ocaml-float32.patch" - "sha256=5f83c34b274dd002e28ace3a93c7beca470bfb85d0037da5e090dcc05a792a20" + "sha256=8d6ebad1481711f57c5ed6dd36187b96ce8fcc51cdf3b0e9d5c277687601c625" ] [ "js_of_ocaml-caml_array_append.patch" @@ -199,11 +193,11 @@ extra-files: [ ] [ "js_of_ocaml-5.2.0-compiler-changes.patch" - "sha256=f71cba10b0c5ca093aa5150cc63ee3ee5bba390b3342601f77421559d8ae14fe" + "sha256=12626322e63a8eaf68d4c8a1a1d3f428832869fae7020588e0fe40bbd8fd8cf8" ] [ "js_of_ocaml-5.3-tests-runtime.patch" - "sha256=bb46bb5c80ace0140edd40c5858c7117f27dc2d0edd869a8b3b4e90aab7199f0" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-caml_bigstring_strncmp.patch" @@ -214,27 +208,63 @@ extra-files: [ "sha256=005bce63009b9539b65036b22a7b7cc531755c7caa3cf1ed8d8697698090e136" ] [ - "js_of_ocaml-version-directive-removal.patch" - "sha256=4b1565454d0b61bc2450ab7b5fff8c5c82babc104ea6b7b9a5446eb9a929740c" + "js_of_ocaml-no-compression-module-5.2.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-obj_stubs.patch" "sha256=9e9064f255c065a3152f665bd5b464040f3cfbbd2580aa4bb6e17be9c2b7fcc8" ] [ - "js_of_ocaml-float32-2.patch" - "sha256=3ff1eda6175f96cc3a5b2c2ae1ee395c9317d248554282c5f157c723a9fae32f" + "js_of_ocaml-global_deadcode-fix.patch" + "sha256=5b49d6ee62ae87c77d88ea8022b022830f906367dc9b9ea2e582f037a739292f" ] [ - "dune.patch" - "sha256=f76da998ab76de56309bd0da3e4db1fb496d6d235d7a0ac2f78e3bafe098714e" + "js_of_ocaml-local-bytes.patch" + "sha256=1c6170fec57089f515ec71bd9873d48bd5ae9c4a85f14b80f33039cce9f232ae" ] [ - "js_of_ocaml-top-effects.patch" - "sha256=638247bd3f7bacb99612353b29c0afdcc48598c5771a52602a96baabbc141370" + "js_of_ocaml-n-ary-functions.patch" + "sha256=b9b078c1f227624cc5fc9dd574c19785354267c19299dcf2f9b9642d0114eddf" ] [ - "js_of_ocaml-toplevel.patch" - "sha256=56c305aa9ed8cb35e9a3bee9fb17aaae244522bacb54a78115b03182a746b7b2" + "js_of_ocaml-optcomp_lite_fixes.patch" + "sha256=b98305f8885c0377714677b2ca6d0d561c18bee6a8fc0d2f9d0abf52694968e0" + ] + [ + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "sha256=899ec90b4c1f5f1251d2c77fdb842f11b5a07d01430da4e5c75610d4bf541faa" + ] + [ + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "sha256=483e848b0dfe54b75c31cd990191730c0070ad8a21912b1beca97111e01a718e" + ] + [ + "js_of_ocaml-gh2034.patch" + "sha256=ec01ea15a9d21c22790ad3c93e9d68154e364462de6a2ce1dbbb62e8af25fc2d" + ] + [ + "js_of_ocaml-unboxed-indexing.patch" + "sha256=2c8b76947795fa34683e7c2bf1022a95058bde146c7832e1bd6e8a33b8d6cfc7" + ] + [ + "js_of_ocaml-atomics.patch" + "sha256=cfe956bb047c252faa2397ff2badca80972d74e1dca0cb633202313dfb8f5da4" + ] + [ + "js_of_ocaml-flipped-conditions-in-test.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-atomic-cmpxchg.patch" + "sha256=89612eb8c1e64898205c0b59c6b73987d2ff993a8c366fb61dac6db90e2806bc" + ] + [ + "js_of_ocaml-small-int-literals.patch" + "sha256=4c3fd2d3a50d220af2bdd377016e3f3354b98b770457ff200494be70bc9bb5b2" + ] + [ + "dune.patch" + "sha256=f76da998ab76de56309bd0da3e4db1fb496d6d235d7a0ac2f78e3bafe098714e" ] ] diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch index 1518edcaf2..2ad0a64b33 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch @@ -1,22 +1,40 @@ +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -1075,6 +1075,13 @@ + | NativeInt i -> + let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in + return (Const, e) ++ | Null -> ++ let* var = ++ register_import ++ ~name:"null" ++ (Global { mut = false; typ = Type.value }) ++ in ++ return (Const, W.GlobalGet var) + + let translate c = + let* const, c = translate_rec c in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -333,6 +333,7 @@ +@@ -329,6 +329,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (* Native int are 32bit on all known backend *) | Tuple of int * constant array * array_or_not + | Null - + module Constant = struct type t = constant -@@ -360,6 +361,7 @@ - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) - | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -361,6 +362,9 @@ + b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Null, Null -> Some true | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None | Int _, Float32 _ | Float32 _, Int _ -> None -@@ -405,6 +407,7 @@ +@@ -409,6 +413,7 @@ | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> Some false @@ -24,44 +42,37 @@ (* Note: the following cases should not occur when compiling to Javascript *) | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) -@@ -524,6 +527,7 @@ +@@ -529,6 +534,7 @@ constant f a.(i) done; Format.fprintf f ")") + | Null -> Format.fprintf f "null" - + let arg f a = match a with -@@ -885,7 +889,7 @@ - | `Wasm -> true - | _ -> false) - | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ -- | Tuple (_, _, _) -> () -+ | Tuple (_, _, _) | Null -> () - in - let check_prim_arg = function - | Pc c -> check_constant c --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -179,6 +179,7 @@ +@@ -151,6 +151,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (** Only produced when compiling to WebAssembly. *) | Tuple of int * constant array * array_or_not + | Null - + module Constant : sig type t = constant --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -255,6 +255,7 @@ +@@ -458,7 +458,8 @@ | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) +- | Int _, Float _ | Float _, Int _ -> None + | Null, Null -> Some true - | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None ++ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None (* All other values may be distinct objects and thus different by [caml_js_equals]. *) | String _, _ -@@ -270,7 +271,9 @@ + | _, String _ +@@ -473,7 +474,9 @@ | NativeInt _, _ | _, NativeInt _ | Tuple _, _ @@ -69,46 +80,43 @@ + | _, Tuple _ + | Null, _ + | _, Null -> None - - let eval_instr ~target info ((x, loc) as i) = - match x with -@@ -408,6 +411,7 @@ + + (* [eval_prim] does not distinguish the two constants *) + let constant_equal a b = +@@ -486,10 +489,11 @@ + | Int32 a, Int32 b -> Int32.equal a b + | NativeInt a, NativeInt b -> Int32.equal a b + | Int64 a, Int64 b -> Int64.equal a b ++ | Null, Null -> true + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ (fun x -> match Flow.Info.def info x with | Some (Constant (Int x)) -> if Targetint.is_zero x then Zero else Non_zero + | Some (Constant Null) -> Zero | Some (Constant - ( Int32 _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -371,11 +371,12 @@ - | NativeInt _, NativeInt _, `Wasm -> - false (* [NativeInt]s are boxed in Wasm and are possibly different objects *) - | NativeInt _, NativeInt _, `JavaScript -> assert false -+ | Null, Null, _ -> true - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - + ( Int32 _ --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -497,6 +497,7 @@ +@@ -524,6 +524,7 @@ + Mlvalue.Block.make ~tag ~args:l, instrs) | Int i -> targetint i, instrs - | Int32 i | NativeInt i -> - J.ENum (J.Num.of_targetint (Targetint.of_int32_exn i)), instrs + | Int32 i | NativeInt i -> targetint (Targetint.of_int32_exn i), instrs + | Null -> s_var "null", instrs - + let constant ~ctx x level = let expr, instr = constant_rec ~ctx x level [] in --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -45,9 +45,7 @@ +@@ -36,9 +36,7 @@ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> let l = Array.of_list (List.map l ~f:constant_of_const) in Tuple (tag, l, Unknown) @@ -116,15 +124,17 @@ - - failwith "[Const_null] not supported in JavaScript yet." + | Const_null -> Null - - let rec find_loc_in_summary ident' = function - | Env.Env_empty -> None + + module Symtable = struct + (* Copied from ocaml/bytecomp/symtable.ml *) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -479,8 +479,14 @@ - - let ident_f32 = ident_of_custom (Obj.repr 0.s) - +@@ -471,8 +471,16 @@ + + let ident_native = ident_of_custom (Obj.repr 0n) + ++ let ident_f32 = ident_of_custom (Obj.repr 0.s) ++ + external is_null : Obj.t -> bool = "%is_null" + + let is_null obj = is_null (Sys.opaque_identity obj) @@ -137,131 +147,85 @@ then let tag = Obj.tag x in if tag = Obj.string_tag -@@ -528,6 +534,7 @@ - | Tuple _ -> false - | Int _ -> true - | Int32 _ | NativeInt _ -> false +@@ -523,6 +531,7 @@ + match target with + | `JavaScript -> true + | `Wasm -> false) + | Null -> true end - + let const32 i = Constant (Int (Targetint.of_int32_exn i)) -@@ -2960,9 +2967,6 @@ +@@ -2877,9 +2886,6 @@ } - + let constant_of_const x = Ocaml_compiler.constant_of_const x - [@@if ocaml_version < (5, 1, 0)] - - let constant_of_const x = Constants.parse x [@@if ocaml_version >= (5, 1, 0)] - + (* We currently rely on constants to be relocated before globals. *) let step1 t compunit code = ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -1068,6 +1068,13 @@ - | NativeInt i -> - let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in - return (Const, e) -+ | Null -> -+ let* var = -+ register_import -+ ~name:"null" -+ (Global { mut = false; typ = Type.value }) -+ in -+ return (Const, W.GlobalGet var) - - let translate c = - let* const, c = translate_rec c in ---- a/compiler/tests-ocaml/lib-atomic/test_atomic.ml -+++ b/compiler/tests-ocaml/lib-atomic/test_atomic.ml -@@ -1,39 +1,39 @@ - (* TEST *) - --let r = Atomic.make 1 --let () = assert (Atomic.get r = 1) -+let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 1 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 1) - --let () = Atomic.set r 2 --let () = assert (Atomic.get r = 2) -+let () = (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r 2 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 2) - --let () = assert (Atomic.exchange r 3 = 2) -+let () = assert ((Atomic.exchange [@ocaml.alert "-unsafe_multidomain"]) r 3 = 2) - --let () = assert (Atomic.compare_and_set r 3 4 = true) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = true) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert (Atomic.compare_and_set r 3 (-4) = false) --let () = assert (Atomic.get r = 4 ) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 (-4) = false) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4 ) - --let () = assert (Atomic.compare_and_set r 3 4 = false) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = false) - - let () = assert (Atomic.fetch_and_add r 2 = 4) --let () = assert (Atomic.get r = 6) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 6) - - let () = assert (Atomic.fetch_and_add r (-2) = 6) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert ((Atomic.incr r; Atomic.get r) = 5) -+let () = assert ((Atomic.incr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 5) - --let () = assert ((Atomic.decr r; Atomic.get r) = 4) -+let () = assert ((Atomic.decr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 4) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -- ignore (Atomic.set r (cur + 1), Atomic.set r (cur - 1)); -- assert (Atomic.get r <> cur) -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in -+ ignore ((Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur + 1), (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur - 1)); -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r <> cur) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in - ignore (Atomic.incr r, Atomic.decr r); -- assert (Atomic.get r = cur) -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = cur) --- a/lib/js_of_ocaml/js.ml +++ b/lib/js_of_ocaml/js.ml @@ -813,7 +813,7 @@ if isNaN s then failwith "parseFloat" else s - + let _ = - Printexc.register_printer (fun e -> + (Printexc.register_printer [@ocaml.alert "-unsafe_multidomain"]) (fun e -> if instanceof (Obj.magic e : < .. > t) error_constr then - let e = Js_error.of_error (Obj.magic e : error t) in[] + let e = Js_error.of_error (Obj.magic e : error t) in --- a/lib/runtime/jsoo_runtime.ml +++ b/lib/runtime/jsoo_runtime.ml -@@ -162,7 +162,7 @@ - +@@ -175,7 +175,7 @@ + exception Exn of t - + - let _ = Callback.register_exception "jsError" (Exn (Obj.magic [||])) + let _ = (Callback.register_exception [@ocaml.alert "-unsafe_multidomain"]) "jsError" (Exn (Obj.magic [||])) - - let raise_ : t -> 'a = Js.js_expr "(function (exn) { throw exn })" - + + external raise_ : t -> 'a = "caml_throw_js_exception" + +--- a/runtime/js/compare.js ++++ b/runtime/js/compare.js +@@ -18,6 +18,7 @@ + //Provides: caml_compare_val_tag + //Requires: caml_is_ml_string, caml_is_ml_bytes + function caml_compare_val_tag(a) { ++ if (a === null) return 1010; // null_tag + if (typeof a === "number") + return 1000; // int_tag (we use it for all numbers) + else if (caml_is_ml_bytes(a)) +@@ -93,6 +94,13 @@ + + // tags are different + if (tag_a !== tag_b) { ++ if (tag_a === 1010) { ++ // Null is less than anything else ++ return -1; ++ } ++ if (tag_b === 1010) { ++ return 1; ++ } + if (tag_a === 1000) { + if (tag_b === 1255) { + //immediate can compare against custom +@@ -193,6 +201,8 @@ + if (!Number.isNaN(b)) return -1; + } + break; ++ case 1010: // Null pointer ++ return 0; + case 1001: // The rest + // Here we can be in the following cases: + // 1. JavaScript primitive types --- a/runtime/js/domain.js +++ b/runtime/js/domain.js -@@ -36,6 +36,13 @@ +@@ -41,6 +41,13 @@ return 0; } - + +//Provides: caml_atomic_compare_exchange +function caml_atomic_compare_exchange(ref, o, n) { + var old = ref[1]; @@ -270,12 +234,12 @@ +} + //Provides: caml_atomic_fetch_add + //Version: >= 5 function caml_atomic_fetch_add(ref, i) { - var old = ref[1]; -@@ -43,6 +50,41 @@ +@@ -49,6 +56,41 @@ return old; } - + +//Provides: caml_atomic_add +function caml_atomic_add(ref, i) { + var old = ref[1]; @@ -312,8 +276,8 @@ +} + //Provides: caml_atomic_exchange + //Version: >= 5 function caml_atomic_exchange(ref, v) { - var r = ref[1]; --- a/runtime/js/marshal.js +++ b/runtime/js/marshal.js @@ -44,6 +44,7 @@ @@ -322,9 +286,9 @@ CODE_CUSTOM_FIXED: 0x19, + CODE_NULL: 0x1f }; - + //Provides: UInt8ArrayReader -@@ -539,6 +540,8 @@ +@@ -492,6 +493,8 @@ } if (intern_obj_table) intern_obj_table[obj_counter++] = v; return v; @@ -333,9 +297,9 @@ default: caml_failwith("input_value: ill-formed message"); } -@@ -742,7 +745,9 @@ +@@ -684,7 +687,9 @@ } - + function extern_rec(v) { - if (v.caml_custom) { + if (v === null) { @@ -346,7 +310,7 @@ var ops = caml_custom_ops[name]; --- a/runtime/js/obj.js +++ b/runtime/js/obj.js -@@ -46,7 +46,8 @@ +@@ -41,7 +41,8 @@ //Provides: caml_obj_tag //Requires: caml_is_ml_bytes, caml_is_ml_string function caml_obj_tag(x) { @@ -355,8 +319,8 @@ + else if (Array.isArray(x) && x[0] === x[0] >>> 0) return x[0]; else if (caml_is_ml_bytes(x)) return 252; else if (caml_is_ml_string(x)) return 252; - else if (x instanceof Function || typeof x == "function") return 247; -@@ -272,3 +273,16 @@ + else if (x instanceof Function || typeof x === "function") return 247; +@@ -244,3 +245,16 @@ function caml_custom_identifier(o) { return caml_string_of_jsstring(o.caml_custom); } @@ -373,12 +337,36 @@ +function caml_is_null(o) { + return o === null; +} +--- a/runtime/wasm/compare.wat ++++ b/runtime/wasm/compare.wat +@@ -25,6 +25,7 @@ + (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) + (import "obj" "caml_is_closure" + (func $caml_is_closure (param (ref eq)) (result i32))) ++ (import "obj" "null" (global $null (ref eq))) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param (ref eq)))) + (import "effect" "caml_is_continuation" +@@ -238,6 +239,13 @@ + (if (local.get $total) + (then + (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) ++ (if (ref.eq (local.get $v1) (global.get $null)) ++ (then ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 0))) ++ (else (return (i32.const -1)))))) ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 1)))) + (drop (block $v1_is_not_int (result (ref eq)) + (local.set $i1 + (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) --- a/runtime/wasm/domain.wat +++ b/runtime/wasm/domain.wat -@@ -34,6 +34,21 @@ +@@ -38,6 +38,21 @@ (else (ref.i31 (i32.const 0))))) - + + (func (export "caml_atomic_compare_exchange") + (param $ref (ref eq)) (param $o (ref eq)) (param $n (ref eq)) + (result (ref eq)) @@ -396,11 +384,11 @@ + (func (export "caml_atomic_load") (param (ref eq)) (result (ref eq)) (array.get $block (ref.cast (ref $block) (local.get 0)) (i32.const 1))) - -@@ -48,6 +63,61 @@ + +@@ -52,6 +67,61 @@ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) (local.get $old)) - + + (func (export "caml_atomic_add") + (param $ref (ref eq)) (param $i (ref eq)) (result (ref eq)) + (local $b (ref $block)) @@ -461,30 +449,29 @@ (local $b (ref $block)) --- a/runtime/wasm/obj.wat +++ b/runtime/wasm/obj.wat -@@ -86,6 +86,9 @@ +@@ -89,6 +89,9 @@ (field (ref $function_2)) (field (mut (ref null $cps_closure)))))) - + + (type $null (struct)) + (global $null (export "null") (ref eq) (struct.new $null)) + (global $forcing_tag i32 (i32.const 244)) (global $cont_tag (export "cont_tag") i32 (i32.const 245)) (global $lazy_tag (export "lazy_tag") i32 (i32.const 246)) -@@ -239,6 +242,8 @@ +@@ -243,6 +246,8 @@ (local.get $res)) - + (func (export "caml_obj_tag") (param $v (ref eq)) (result (ref eq)) + (if (ref.eq (local.get $v) (global.get $null)) + (then (return (ref.i31 (i32.const 1010))))) (if (ref.test (ref i31) (local.get $v)) (then (return (ref.i31 (i32.const 1000))))) (drop (block $not_block (result (ref eq)) -@@ -487,4 +492,20 @@ - (array.new_fixed $block 3 (ref.i31 (i32.const 0)) - (local.get $x) (local.get $y)) - (ref.as_non_null (global.get $caml_trampoline_ref)))))) --) +@@ -491,4 +496,22 @@ + (call $caml_callback_1 (local.get $f) (local.get $x)) + (local.get $y))) + )) + + (func (export "caml_is_null") (param $x (ref eq)) (result (ref eq)) + (if (result (ref eq)) (ref.eq (local.get $x) (global.get $null)) @@ -501,61 +488,6 @@ + (call $caml_failwith + (array.new_data $bytes $int_as_pointer_not_implemented + (i32.const 0) (i32.const 35))) -+ (ref.i31 (i32.const 0)))))) ---- a/runtime/js/compare.js -+++ b/runtime/js/compare.js -@@ -18,6 +18,7 @@ - //Provides: caml_compare_val_tag - //Requires: caml_is_ml_string, caml_is_ml_bytes - function caml_compare_val_tag(a) { -+ if (a === null) return 1010; // null_tag - if (typeof a === "number") - return 1000; // int_tag (we use it for all numbers) - else if (caml_is_ml_bytes(a)) -@@ -93,6 +94,13 @@ - - // tags are different - if (tag_a !== tag_b) { -+ if (tag_a === 1010) { -+ // Null is less than anything else -+ return -1; -+ } -+ if (tag_b === 1010) { -+ return 1; -+ } - if (tag_a === 1000) { - if (tag_b === 1255) { - //immediate can compare against custom -@@ -193,6 +201,8 @@ - if (!Number.isNaN(b)) return -1; - } - break; -+ case 1010: // Null pointer -+ return 0; - case 1001: // The rest - // Here we can be in the following cases: - // 1. JavaScript primitive types ---- a/runtime/wasm/compare.wat -+++ b/runtime/wasm/compare.wat -@@ -25,6 +25,7 @@ - (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) - (import "obj" "caml_is_closure" - (func $caml_is_closure (param (ref eq)) (result i32))) -+ (import "obj" "null" (global $null (ref eq))) - (import "fail" "caml_invalid_argument" - (func $caml_invalid_argument (param (ref eq)))) - (import "effect" "caml_is_continuation" -@@ -238,6 +239,13 @@ - (if (local.get $total) - (then - (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) -+ (if (ref.eq (local.get $v1) (global.get $null)) -+ (then -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 0))) -+ (else (return (i32.const -1)))))) -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 1)))) - (drop (block $v1_is_not_int (result (ref eq)) - (local.set $i1 - (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) ++ (ref.i31 (i32.const 0))))) ++ + ) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch index 43e4b69d0f..e69de29bb2 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch @@ -1,84 +0,0 @@ ---- a/compiler/tests-ocaml/lib-list/test.ml -+++ b/compiler/tests-ocaml/lib-list/test.ml -@@ -64,7 +64,7 @@ - let hello = ['H';'e';'l';'l';'o'] in - let world = ['W';'o';'r';'l';'d';'!'] in - let hello_world = hello @ [' '] @ world in -- assert (List.take 5 hello_world = hello); -+ (* assert (List.take 5 hello_world = hello); - assert (List.take 3 [1; 2; 3; 4; 5] = [1; 2; 3]); - assert (List.take 3 [1; 2] = [1; 2]); - assert (List.take 3 [] = []); -@@ -83,7 +83,7 @@ - assert (List.drop_while (fun x -> x < 3) [1; 2; 3; 4; 5; 1; 2; 3] - = [3; 4; 5; 1; 2; 3]); - assert (List.drop_while (fun x -> x < 9) [1; 2; 3] = []); -- assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); -+ assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); *) - assert (List.partition is_even [1; 2; 3; 4; 5] - = ([2; 4], [1; 3; 5])); - assert (List.partition_map string_of_even_or_int [1; 2; 3; 4; 5] ---- a/compiler/tests-ocaml/lib-queue/test.ml -+++ b/compiler/tests-ocaml/lib-queue/test.ml -@@ -137,11 +137,11 @@ - assert (Q.length q2 = 8); assert (Q.to_list q2 = [5; 6; 7; 8; 1; 2; 3; 4]); - ;; - --let () = -+(* let () = - let q = Q.create () in - Q.add 1 q; Q.drop q; assert (does_raise Q.drop q); - Q.add 2 q; Q.drop q; assert (does_raise Q.drop q); - assert (Q.length q = 0); --;; -+;; *) - - let () = print_endline "OK" ---- a/compiler/tests-ocaml/lib-hashtbl/hfun.expected -+++ b/compiler/tests-ocaml/lib-hashtbl/hfun.expected -@@ -8,19 +8,19 @@ - 2^30-1 23c392d0 - -2^30 0c66fde3 - -- Floats: --+0.0 0f478b8c ---0.0 0f478b8c -++0.0 07be548a -+-0.0 07be548a - +infty 23ea56fb - -infty 059f7872 - NaN 3228858d - NaN#2 3228858d - NaN#3 3228858d - -- Native integers: --0 3f19274a -+0 07be548a - -1 3653e015 --42 3e33aef8 --2^30-1 3711bf46 ---2^30 2e71f39c -+42 1792870b -+2^30-1 23c392d0 -+-2^30 0c66fde3 - -- Lists: - [0..10] 0ade0fc9 - [0..12] 0ade0fc9 ---- a/compiler/tests-ocaml/lib-uchar/test.ml -+++ b/compiler/tests-ocaml/lib-uchar/test.ml -@@ -74,7 +74,7 @@ - let test_hash () = - let f u = - assert (Hashtbl.hash u = Uchar.hash u); -- assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) -+ (* assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) *) - in - List.iter (Fun.compose f Uchar.of_int) - [0x0000; 0x002D; 0x00E9; 0x062D; 0x2014; 0x1F349] -@@ -117,7 +117,7 @@ - test_to_char (); - test_equal (); - test_compare (); -- test_hash (); -+ (* test_hash (); *) - test_utf_decode (); - test_utf_x_byte_length (); - () diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch index 81cc808404..401b0473f1 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch @@ -1,30 +1,25 @@ --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -31,22 +31,21 @@ +@@ -20,17 +20,16 @@ + + let rec constant_of_const c : Code.constant = let open Lambda in - let open Asttypes in match c with | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -- | Const_base (Const_int32 i) -> ( -+ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) - | `Wasm -> Int32 i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_int32 i) -> Int32 i - | Const_base (Const_int64 i) -> Int64 i +- | Const_base (Const_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i -- | Const_base (Const_nativeint i) -> ( -+ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_nativeint_warning_on_overflow i) - | `Wasm -> NativeInt (Int32.of_nativeint_warning_on_overflow i)) ++ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) | Const_immstring s -> String s - | Const_float_array sl -> + | Const_float_array sl | Const_float_block sl -> - let l = List.map ~f:(fun f -> float_of_string f) sl in + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> + | Const_block (tag, l) -> diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch new file mode 100644 index 0000000000..d3ce2130c0 --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch @@ -0,0 +1,41 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -216,6 +216,16 @@ + return 0; + } + ++//Provides: caml_atomic_compare_exchange_field ++//Version: >= 5 ++function caml_atomic_compare_exchange_field(ref, field, o, n) { ++ var old = ref[field + 1]; ++ if (old === o) { ++ ref[field + 1] = n; ++ } ++ return old; ++} ++ + //Provides: caml_atomic_set_field + //Version: >= 5 + function caml_atomic_set_field(ref, field, v) { +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -329,6 +329,19 @@ + (return (ref.i31 (i32.const 1))))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_atomic_compare_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)))) ++ (local.get $old)) ++ + (func (export "caml_atomic_exchange_field") + (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) + (local $b (ref $block)) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-atomics.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-atomics.patch new file mode 100644 index 0000000000..202c01205d --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-atomics.patch @@ -0,0 +1,238 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -99,6 +99,14 @@ + return r; + } + ++//Provides: caml_atomic_set ++//Version: >= 5 ++function caml_atomic_set(ref, v) { ++ var r = ref[1]; ++ ref[1] = v; ++ return 0; ++} ++ + //Provides: caml_atomic_make_contended + //Version: >= 5.2 + function caml_atomic_make_contended(a) { +@@ -175,3 +183,78 @@ + function caml_ml_domain_cpu_relax(unit) { + return 0; + } ++ ++//Provides: caml_atomic_load_field ++//Version: >= 5 ++function caml_atomic_load_field(ref, field) { ++ return ref[field + 1]; ++} ++ ++//Provides: caml_atomic_add_field ++//Version: >= 5 ++function caml_atomic_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return 0; ++} ++ ++//Provides: caml_atomic_fetch_add_field ++//Version: >= 5 ++function caml_atomic_fetch_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return old; ++} ++ ++//Provides: caml_atomic_cas_field ++//Version: >= 5 ++function caml_atomic_cas_field(ref, field, o, n) { ++ if (ref[field + 1] === o) { ++ ref[field + 1] = n; ++ return 1; ++ } ++ return 0; ++} ++ ++//Provides: caml_atomic_set_field ++//Version: >= 5 ++function caml_atomic_set_field(ref, field, v) { ++ ref[field + 1] = v; ++ return 0; ++} ++ ++//Provides: caml_atomic_exchange_field ++//Version: >= 5 ++function caml_atomic_exchange_field(ref, field, v) { ++ var old = ref[field + 1]; ++ ref[field + 1] = v; ++ return old; ++} ++ ++//Provides: caml_atomic_sub_field ++//Version: >= 5 ++function caml_atomic_sub_field(ref, field, i) { ++ ref[field + 1] -= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_land_field ++//Version: >= 5 ++function caml_atomic_land_field(ref, field, i) { ++ ref[field + 1] &= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lor_field ++//Version: >= 5 ++function caml_atomic_lor_field(ref, field, i) { ++ ref[field + 1] |= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lxor_field ++//Version: >= 5 ++function caml_atomic_lxor_field(ref, field, i) { ++ ref[field + 1] ^= i; ++ return 0; ++} +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -131,6 +131,15 @@ + (array.set $block (local.get $b) (i32.const 1) (local.get $v)) + (local.get $r)) + ++ (func (export "caml_atomic_set") ++ (param $ref (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $r (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $r (array.get $block (local.get $b) (i32.const 1))) ++ (array.set $block (local.get $b) (i32.const 1) (local.get $v)) ++ (ref.i31 (i32.const 0))) ++ + (func (export "caml_atomic_make_contended") + (param $v (ref eq)) (result (ref eq)) + (array.new_fixed $block 2 (ref.i31 (i32.const 0)) (local.get $v))) +@@ -220,4 +229,123 @@ + + (func (export "caml_ml_domain_cpu_relax") (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) ++ ++ ;; Atomic field operations ++ (func (export "caml_atomic_load_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (result (ref eq)) ++ (array.get $block ++ (ref.cast (ref $block) (local.get $ref)) ++ (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1)))) ++ ++ (func (export "caml_atomic_fetch_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_sub_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.sub (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_land_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.and (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.or (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lxor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.xor (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_cas_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)) ++ (return (ref.i31 (i32.const 1))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_set_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (ref.i31 (i32.const 0))) + ) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch index 48c3a6fc3b..4e4c985cb6 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch @@ -1,6 +1,6 @@ --- a/compiler/bin-js_of_ocaml/compile.ml +++ b/compiler/bin-js_of_ocaml/compile.ml -@@ -235,7 +235,7 @@ +@@ -311,7 +311,7 @@ sm in let output_partial @@ -11,48 +11,48 @@ code --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -213,16 +213,16 @@ +@@ -208,16 +208,16 @@ end - + module Cmo_format = struct - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + - let name (t : t) = t.cu_name [@@if ocaml_version < (5, 2, 0)] + let name (t : t) = t.cu_name |> Compilation_unit.name_as_string [@@if ocaml_version < (5, 2, 0)] - + let name (t : t) = let (Compunit name) = t.cu_name in name [@@if ocaml_version >= (5, 2, 0)] - + - let requires (t : t) = List.map ~f:Ident.name t.cu_required_globals + let requires (t : t) = List.map ~f:Compilation_unit.name_as_string t.cu_required_globals [@@if ocaml_version < (5, 2, 0)] - + let requires (t : t) = List.map t.cu_required_compunits ~f:(fun (Compunit u) -> u) --- a/compiler/lib/ocaml_compiler.mli +++ b/compiler/lib/ocaml_compiler.mli -@@ -55,7 +55,7 @@ +@@ -53,7 +53,7 @@ end - + module Cmo_format : sig - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + val name : t -> string - + @@ -65,5 +65,5 @@ - + val force_link : t -> bool - + - val imports : t -> (string * string option) list + val imports : t -> Import_info.t array end --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -2633,8 +2633,10 @@ - +@@ -2593,8 +2593,10 @@ + let read_crcs toc ic = ignore (seek_section toc ic "CRCS"); - let orig_crcs : (string * Digest.t option) list = input_value ic in @@ -61,10 +61,10 @@ + List.map (Array.to_list orig_crcs) ~f:(fun import -> + Import_info.name import |> Compilation_unit.Name.to_string, + Import_info.crc import) - + let read_prim toc ic = let prim_size = seek_section toc ic "PRIM" in -@@ -3096,7 +3098,7 @@ +@@ -3042,7 +3044,7 @@ then raise Magic_number.(Bad_magic_version magic); let compunit_pos = input_binary_int ic in seek_in ic compunit_pos; @@ -72,10 +72,10 @@ + let compunit : Cmo_format.compilation_unit_descr = input_value ic in `Cmo compunit | `Cma -> - if Config.Flag.check_magic () + if --- a/compiler/lib/parse_bytecode.mli +++ b/compiler/lib/parse_bytecode.mli -@@ -65,7 +65,7 @@ +@@ -58,7 +58,7 @@ ?includes:string list -> ?include_cmis:bool -> ?debug:bool @@ -83,34 +83,35 @@ + -> Cmo_format.compilation_unit_descr -> in_channel -> one - -@@ -79,7 +79,7 @@ - + +@@ -72,7 +72,7 @@ + val from_channel : in_channel - -> [ `Cmo of Cmo_format.compilation_unit | `Cma of Cmo_format.library | `Exe ] + -> [ `Cmo of Cmo_format.compilation_unit_descr | `Cma of Cmo_format.library | `Exe ] - + val from_string : - prims:string array + prims:string array -> debug:Instruct.debug_event list array -> string -> Code.program --- a/compiler/lib/unit_info.ml +++ b/compiler/lib/unit_info.ml -@@ -37,7 +37,7 @@ +@@ -46,7 +46,7 @@ ; effects_without_cps = false } - + -let of_cmo (cmo : Cmo_format.compilation_unit) = +let of_cmo (cmo : Cmo_format.compilation_unit_descr) = let open Ocaml_compiler in - let provides = StringSet.singleton (Cmo_format.name cmo) in - let requires = StringSet.of_list (Cmo_format.requires cmo) in + (* A packed librariy register global for packed modules. *) + let provides = StringSet.of_list (Cmo_format.name cmo :: Cmo_format.provides cmo) in --- a/compiler/lib/unit_info.mli +++ b/compiler/lib/unit_info.mli -@@ -26,6 +26,6 @@ +@@ -28,7 +28,7 @@ ; effects_without_cps : bool } - + -val of_cmo : Cmo_format.compilation_unit -> t +val of_cmo : Cmo_format.compilation_unit_descr -> t - - val union : t -> t -> t + + val of_primitives : aliases:(string * string) list -> string list -> t + diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch index 9d342bdecc..5879719115 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch @@ -14,17 +14,6 @@ if(!globalThis.jsoo_fs_tmp) globalThis.jsoo_fs_tmp = []; globalThis.jsoo_fs_tmp.push({name:name,content:content}); } ---- a/compiler/tests-full/fs.expected.js -+++ b/compiler/tests-full/fs.expected.js -@@ -18,6 +18,8 @@ - function a(a, b){ - if(c.jsoo_create_file) - c.jsoo_create_file(a, b); -+ else if(c.caml_create_file) -+ c.caml_create_file(a, b); - else{ - if(! c.caml_fs_tmp) c.caml_fs_tmp = []; - c.caml_fs_tmp.push({name: a, content: b}); --- a/runtime/js/fs.js +++ b/runtime/js/fs.js @@ -318,7 +318,7 @@ diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-float32.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-float32.patch index d1712d15e0..ba11933537 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-float32.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-float32.patch @@ -6,8 +6,8 @@ ; ieee_754 + ; float32 ; int64 - ; internalMod ; ints + ; io --- a/compiler/lib-runtime-files/tests/all.ml +++ b/compiler/lib-runtime-files/tests/all.ml @@ -21,6 +21,7 @@ @@ -18,17 +18,7 @@ +format.js +fs.js +fs_fake.js -@@ -52,7 +53,8 @@ - +toplevel.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl runtime; - [%expect - {| -@@ -65,6 +67,7 @@ +@@ -64,6 +65,7 @@ +domain.js +effect.js +fail.js @@ -36,52 +26,91 @@ +format.js +fs.js +fs_fake.js -@@ -94,7 +97,8 @@ - +sys.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl extra; - [%expect {| - +dynlink.js +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -170,6 +170,22 @@ + ] + }) + ++ let float32_type = ++ register_type "float32" (fun () -> ++ let* custom_operations = custom_operations_type in ++ let* custom = custom_type in ++ return ++ { supertype = Some custom ++ ; final = true ++ ; typ = ++ W.Struct ++ [ { mut = false ++ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) ++ } ++ ; { mut = false; typ = Value F32 } ++ ] ++ }) ++ + let int32_type = + register_type "int32" (fun () -> + let* custom_operations = custom_operations_type in +@@ -855,6 +871,18 @@ + in + if_mismatch + ++ let make_float32 e = ++ let* custom_operations = Type.custom_operations_type in ++ let* float32_ops = ++ register_import ++ ~name:"float32_ops" ++ (Global ++ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) ++ in ++ let* ty = Type.float32_type in ++ let* e = e in ++ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) ++ + let make_int32 ~kind e = + let* custom_operations = Type.custom_operations_type in + let* int32_ops = +@@ -1026,6 +1054,9 @@ + | Float f -> + let* ty = Type.float_type in + return (Const, W.StructNew (ty, [ Const (F64 (Int64.float_of_bits f)) ])) ++ | Float32 f -> ++ let* e = Memory.make_float32 (return (W.Const (F32 (Int64.float_of_bits f)))) in ++ return (Const, e) + | Float_array l -> + let l = Array.to_list l in + let* ty = Type.float_array_type in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -326,6 +326,7 @@ +@@ -260,6 +260,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t -@@ -358,8 +359,10 @@ - | NativeInt a, NativeInt b -> Some (Int32.equal a b) - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -300,6 +301,7 @@ + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None + | Int _, Float32 _ | Float32 _, Int _ -> None | Tuple ((0 | 254), _, _), Float_array _ -> None | Float_array _, Tuple ((0 | 254), _, _) -> None | ( Tuple _ -@@ -369,7 +372,7 @@ - | Int _ +@@ -310,6 +312,7 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Float_array _ ) ) -> Some false | ( Float_array _ , ( String _ -@@ -378,13 +381,13 @@ - | Int _ +@@ -319,12 +322,13 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ ) ) -> Some false | ( String _ - , (Int64 _ | Int _ | Int32 _ | NativeInt _ | Float _ | Tuple _ | Float_array _) ) -> @@ -93,12 +122,11 @@ Some false | ( Int64 _ , ( String _ -@@ -392,10 +395,12 @@ - | Int _ +@@ -333,9 +337,12 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ | Float_array _ ) ) -> Some false - | Float _, (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) -> @@ -108,7 +136,7 @@ Some false | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> -@@ -404,8 +409,8 @@ +@@ -344,8 +351,8 @@ | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) | NativeInt _, (Int _ | Int32 _) @@ -119,49 +147,54 @@ end type loc = -@@ -491,6 +496,7 @@ +@@ -432,6 +439,7 @@ | NativeString (Byte s) -> Format.fprintf f "%Sj" s | NativeString (Utf (Utf8 s)) -> Format.fprintf f "%Sj" s - | Float fl -> Format.fprintf f "%.12g" fl -+ | Float32 fl -> Format.fprintf f "%.9g" fl + | Float fl -> Format.fprintf f "%.12g" (Int64.float_of_bits fl) ++ | Float32 fl -> Format.fprintf f "%.9g" (Int64.float_of_bits fl) | Float_array a -> Format.fprintf f "[|"; for i = 0 to Array.length a - 1 do -@@ -878,7 +884,7 @@ - match target with - | `Wasm -> true - | _ -> false) -- | String _ | NativeString _ | Float _ | Float_array _ | Int _ | Int64 _ -+ | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ - | Tuple (_, _, _) -> () - in - let check_prim_arg = function --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -172,6 +172,7 @@ +@@ -148,6 +148,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t (** Only produced when compiling to WebAssembly. *) --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -251,9 +251,11 @@ - match a, b with +@@ -452,6 +452,9 @@ | Int i, Int j -> Some (Targetint.equal i j) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) -- | Int _, Float _ | Float _, Int _ -> None -+ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | String _, _ - | _, String _ -@@ -413,6 +415,7 @@ + | Int _, Float _ | Float _, Int _ -> None +@@ -476,6 +479,7 @@ + match a, b with + | Int i, Int j -> Targetint.equal i j + | Float a, Float b -> Int64.equal a b ++ | Float32 a, Float32 b -> Int64.equal a b + | NativeString a, NativeString b -> Native_string.equal a b + | String a, String b -> String.equal a b + | Int32 a, Int32 b -> Int32.equal a b +@@ -484,7 +488,7 @@ + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ ( Int32 _ | NativeInt _ | Float _ @@ -169,30 +202,9 @@ | Tuple _ | String _ | NativeString _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -354,7 +354,9 @@ - match a, b, target with - | Int i, Int j, _ -> Targetint.equal i j - | Float a, Float b, `JavaScript -> Float.bitwise_equal a b -+ | Float32 a, Float32 b, `JavaScript -> Float.bitwise_equal a b - | Float _, Float _, `Wasm -> false -+ | Float32 _, Float32 _, `Wasm -> false - | NativeString a, NativeString b, `JavaScript -> Native_string.equal a b - | NativeString _, NativeString _, `Wasm -> - false -@@ -373,7 +375,7 @@ - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -438,6 +438,7 @@ +@@ -466,6 +466,7 @@ | Byte x -> Share.get_byte_string str_js_byte x ctx.Ctx.share, instrs | Utf (Utf8 x) -> Share.get_utf_string str_js_utf8 x ctx.Ctx.share, instrs) | Float f -> float_const f, instrs @@ -200,7 +212,7 @@ | Float_array a -> ( Mlvalue.Array.make ~tag:Obj.double_array_tag -@@ -964,6 +965,13 @@ +@@ -1215,6 +1216,13 @@ register_bin_prim "caml_le_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Le, cx, cy))); register_bin_prim "caml_gt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cy, cx))); register_bin_prim "caml_lt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cx, cy))); @@ -216,171 +228,38 @@ register_bin_prim "caml_mul_float" `Pure (fun cx cy _ -> J.EBin (J.Mul, cx, cy)); --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -25,7 +25,8 @@ +@@ -24,7 +24,8 @@ + | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 Float32.(of_string s |> to_float) -+ | Const_base (Const_float s | Const_unboxed_float s) -> Float (float_of_string s) - | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -477,6 +477,8 @@ - - let ident_native = ident_of_custom (Obj.repr 0n) - -+ let ident_f32 = ident_of_custom (Obj.repr 0.s) -+ - let rec parse x = - if Obj.is_block x - then -@@ -490,6 +492,8 @@ +@@ -481,6 +481,8 @@ else if tag = Obj.custom_tag then match ident_of_custom x with + | Some name when same_ident name ident_f32 -> -+ Float32 ((Obj.magic x : float32) |> Float32.to_float) - | Some name when same_ident name ident_32 -> ( ++ Float32 (Int64.bits_of_float (Obj.magic x : float)) + | Some name when same_ident name ident_32 -> let i : int32 = Obj.magic x in - match Config.target () with -@@ -518,6 +522,7 @@ - let inlined = function + Int32 i +@@ -506,6 +508,7 @@ + match c with | String _ | NativeString _ -> false | Float _ -> true + | Float32 _ -> true | Float_array _ -> false | Int64 _ -> false | Tuple _ -> false ---- a/compiler/lib/stdlib.ml -+++ b/compiler/lib/stdlib.ml -@@ -417,6 +417,17 @@ - external ( >= ) : t -> t -> bool = "%greaterequal" - end - -+module Float32 = struct -+ type t = float32 -+ -+ external of_float : float -> t = "%float32offloat" -+ external to_float : t -> float = "%floatoffloat32" -+ -+ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. -+ This is not equivalent to native code, which parses to 32 bits directly. *) -+ let of_string s = float_of_string s |> of_float -+end -+ - module Bool = struct - external ( <> ) : bool -> bool -> bool = "%notequal" - ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -170,6 +170,22 @@ - ] - }) - -+ let float32_type = -+ register_type "float32" (fun () -> -+ let* custom_operations = custom_operations_type in -+ let* custom = custom_type in -+ return -+ { supertype = Some custom -+ ; final = true -+ ; typ = -+ W.Struct -+ [ { mut = false -+ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) -+ } -+ ; { mut = false; typ = Value F32 } -+ ] -+ }) -+ - let int32_type = - register_type "int32" (fun () -> - let* custom_operations = custom_operations_type in -@@ -853,6 +869,18 @@ - in - if_mismatch - -+ let make_float32 e = -+ let* custom_operations = Type.custom_operations_type in -+ let* float32_ops = -+ register_import -+ ~name:"float32_ops" -+ (Global -+ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) -+ in -+ let* ty = Type.float32_type in -+ let* e = e in -+ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) -+ - let make_int32 ~kind e = - let* custom_operations = Type.custom_operations_type in - let* int32_ops = -@@ -1023,6 +1051,9 @@ - | Float f -> - let* ty = Type.float_type in - return (Const, W.StructNew (ty, [ Const (F64 f) ])) -+ | Float32 f -> -+ let* e = Memory.make_float32 (return (W.Const (F32 f))) in -+ return (Const, e) - | Float_array l -> - let l = Array.to_list l in - let* ty = Type.float_array_type in ---- /dev/null -+++ b/compiler/tests-jsoo/test_marshal_float32.ml -@@ -0,0 +1,47 @@ -+ -+(* In javascript, float32s are represented as floats. -+ In native code and wasm, float32s are custom blocks containing a float32 field. *) -+ -+external float_of_float32 : float32 -> float = "%floatoffloat32" -+ -+type float64s = { a : float; b : float } -+ -+let%expect_test "float64 javascript" [@tags "js-only", "no-wasm"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\n\000\000\000\001\000\000\000\003\000\000\000\003\b\000\000\b\254\000{\001\001\200" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+let%expect_test "float64 wasm" [@tags "wasm-only"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\018\000\000\000\001\000\000\000\005\000\000\000\003\014\002\000\000\000\000\000\192^@\000\000\000\000\000\128|@" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+type float32s = { a : float32; b : float32 } -+ -+let%expect_test "float32 javascript" [@tags "js-only", "no-wasm"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\006\000\000\000\001\000\000\000\003\000\000\000\003\160\000{\001\001\200" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] -+ -+let%expect_test "float32 wasm" [@tags "wasm-only"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\021\000\000\000\003\000\000\000\t\000\000\000\t\160\025_f32\000B\246\000\000\025_f32\000C\228\000\000" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] --- /dev/null +++ b/runtime/js/float32.js -@@ -0,0 +1,361 @@ +@@ -0,0 +1,419 @@ + +/* + 32-bit floats are represented as javascript numbers, i.e. 64-bit floats. @@ -729,19 +608,77 @@ + return Math.fround(Math.trunc(x)); +} + -+//Provides: caml_simd_float32_round_neg_inf_bytecode const -+function caml_simd_float32_round_neg_inf_bytecode(x) { -+ return Math.fround(Math.floor(x)); ++//Provides: caml_make_unboxed_float32_vect_bytecode const (const) ++//Requires: caml_make_float_vect ++let caml_make_unboxed_float32_vect_bytecode = caml_make_float_vect ++ ++//Provides: caml_ba_float32_get_1 ++//Requires: caml_ba_get_1 ++let caml_ba_float32_get_1 = caml_ba_get_1 ++ ++//Provides: caml_ba_float32_get_2 ++//Requires: caml_ba_get_2 ++let caml_ba_float32_get_2 = caml_ba_get_2 ++ ++//Provides: caml_ba_float32_get_3 ++//Requires: caml_ba_get_3 ++let caml_ba_float32_get_3 = caml_ba_get_3 ++ ++//Provides: caml_ba_float32_set_1 ++//Requires: caml_ba_set_1 ++let caml_ba_float32_set_1 = caml_ba_set_1 ++ ++//Provides: caml_ba_float32_set_2 ++//Requires: caml_ba_set_2 ++let caml_ba_float32_set_2 = caml_ba_set_2 ++ ++//Provides: caml_ba_float32_set_3 ++//Requires: caml_ba_set_3 ++let caml_ba_float32_set_3 = caml_ba_set_3 ++ ++//Provides: caml_ba_uint8_getf32 ++//Requires: caml_ba_uint8_get32, caml_int32_float_of_bits ++function caml_ba_uint8_getf32(ba, i0) { ++ return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); +} + -+//Provides: caml_simd_float32_round_pos_inf_bytecode const -+function caml_simd_float32_round_pos_inf_bytecode(x) { -+ return Math.fround(Math.ceil(x)); ++//Provides: caml_ba_uint8_setf32 ++//Requires: caml_ba_uint8_set32, caml_int32_bits_of_float ++function caml_ba_uint8_setf32(ba, i0, v) { ++ return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); +} + -+//Provides: caml_simd_float32_round_towards_zero_bytecode const -+function caml_simd_float32_round_towards_zero_bytecode(x) { -+ return Math.fround(Math.trunc(x)); ++//Provides: caml_string_getf32 ++//Requires: caml_string_get32, caml_int32_float_of_bits ++function caml_string_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_string_get32(s, i)); ++} ++ ++//Provides: caml_bytes_getf32 ++//Requires: caml_bytes_get32, caml_int32_float_of_bits ++function caml_bytes_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_bytes_get32(s, i)); ++} ++ ++//Provides: caml_bytes_setf32 ++//Requires: caml_bytes_set32, caml_int32_bits_of_float ++function caml_bytes_setf32(s, i, f32) { ++ return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_failwith ++//If: js-string ++function caml_string_setf32(s, i, f32) { ++ caml_failwith("caml_string_setf32"); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_bytes_setf32 ++//If: !js-string ++function caml_string_setf32(s, i, f32) { ++ return caml_bytes_setf32(s, i, f32); ++} --- a/runtime/wasm/custom.wat +++ b/runtime/wasm/custom.wat @@ -16,6 +16,7 @@ @@ -1471,3 +1408,45 @@ + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) +) +--- a/compiler/lib/parse_bytecode.ml ++++ b/compiler/lib/parse_bytecode.ml +@@ -496,7 +496,7 @@ + then + match ident_of_custom x with + | Some name when same_ident name ident_f32 -> +- Float32 (Int64.bits_of_float (Obj.magic x : float)) ++ Float32 (Int64.bits_of_float ((Obj.magic x : float32) |> Float32.to_float)) + | Some name when same_ident name ident_32 -> + let i : int32 = Obj.magic x in + Int32 i +--- a/compiler/lib/stdlib.ml ++++ b/compiler/lib/stdlib.ml +@@ -369,6 +369,17 @@ + external ( >= ) : t -> t -> bool = "%greaterequal" + end + ++module Float32 = struct ++ type t = float32 ++ ++ external of_float : float -> t = "%float32offloat" ++ external to_float : t -> float = "%floatoffloat32" ++ ++ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. ++ This is not equivalent to native code, which parses to 32 bits directly. *) ++ let of_string s = float_of_string s |> of_float ++end ++ + module Bool = struct + include Bool + +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -25,7 +25,7 @@ + | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-gh2034.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-gh2034.patch new file mode 100644 index 0000000000..3dc5610654 --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-gh2034.patch @@ -0,0 +1,83 @@ +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -387,14 +387,18 @@ + (global.set $method_cache (local.get $a)))) + (local.set $ofs + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) (local.get $ofs))))) ++ (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (return +- (array.get $block +- (local.get $meths) (i32.sub (local.get $ofs) (i32.const 1)))))) ++ (if (i32.eq (local.get $tag) ++ (i31.get_s ++ (ref.cast (ref i31) ++ (array.get $block (local.get $meths) ++ (local.get $ofs))))) ++ (then ++ (return ++ (array.get $block ++ (local.get $meths) ++ (i32.sub (local.get $ofs) (i32.const 1)))))))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -382,7 +382,8 @@ + (array.new $int_array (i32.const 0) (i32.const 8))) + + (func (export "caml_get_public_method") +- (param $obj (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) ++ (param $obj (ref eq)) (param $vtag (ref eq)) (param (ref eq)) ++ (result (ref eq)) + (local $meths (ref $block)) + (local $tag i32) (local $cacheid i32) (local $ofs i32) + (local $li i32) (local $mi i32) (local $hi i32) +@@ -391,7 +392,6 @@ + (ref.cast (ref $block) + (array.get $block + (ref.cast (ref $block) (local.get $obj)) (i32.const 1)))) +- (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $cacheid (i31.get_u (ref.cast (ref i31) (local.get 2)))) + (local.set $len (array.len (global.get $method_cache))) + (if (i32.ge_s (local.get $cacheid) (local.get $len)) +@@ -409,16 +409,14 @@ + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) + (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (local.get $ofs))))) ++ (if (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) (local.get $ofs))) + (then + (return + (array.get $block + (local.get $meths) + (i32.sub (local.get $ofs) (i32.const 1)))))))) ++ (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get $vtag)))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +@@ -450,11 +448,9 @@ + (array.set $int_array (global.get $method_cache) (local.get $cacheid) + (i32.add (local.get $li) (i32.const 1))) + (if (result (ref eq)) +- (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (i32.add (local.get $li) (i32.const 1)))))) ++ (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) ++ (i32.add (local.get $li) (i32.const 1)))) + (then + (array.get $block (local.get $meths) (local.get $li))) + (else diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch new file mode 100644 index 0000000000..46d1621024 --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch @@ -0,0 +1,42 @@ +--- a/compiler/lib/global_deadcode.ml ++++ b/compiler/lib/global_deadcode.ml +@@ -434,7 +434,7 @@ + + They are returned; or + + They are applied to a function. + *) +-let zero prog sentinal live_table = ++let zero prog pure_funs sentinal live_table = + let compact_vars vars = + let i = ref (Array.length vars - 1) in + while !i >= 0 && Var.equal vars.(!i) sentinal do +@@ -483,13 +483,17 @@ + (* Zero out return values in last instruction, otherwise do nothing. *) + match block.branch with + | Return x -> +- let tc = +- (* We don't want to break tailcalls. *) ++ let live_tc = ++ (* Don't break tailcalls, it's needed for generate_closure ++ and effects passes. If the (tail)call is dead, it will ++ be eliminated later by the deadcode pass, don't make it live again by ++ returning its result. *) + match List.last body with +- | Some (Let (x', Apply _)) when Code.Var.equal x' x -> true ++ | Some (Let (x', (Apply _ as e))) -> ++ Code.Var.equal x x' && (is_live x' || not (Pure_fun.pure_expr pure_funs e)) + | Some _ | None -> false + in +- if tc then Return x else Return (zero_var x) ++ if live_tc then Return x else Return (zero_var x) + | Raise (_, _) + | Stop | Branch _ + | Cond (_, _, _) +@@ -581,7 +585,7 @@ + Print.print_uses uses; + Print.print_live_tbl live_table); + (* Zero out dead fields *) +- let p = zero p deadcode_sentinal live_table in ++ let p = zero p pure_funs deadcode_sentinal live_table in + if debug () + then ( + Format.eprintf "After Zeroing:@."; diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch index a9e15c1f4c..33d9968c58 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch @@ -1,9 +1,10 @@ --- a/runtime/js/array.js +++ b/runtime/js/array.js -@@ -249,3 +249,12 @@ - return caml_array_make(len, init); +@@ -131,3 +131,13 @@ + for (var i = 1; i < len; i++) b[i] = 0; + return b } - ++ +// Provides: caml_iarray_of_array const +function caml_iarray_of_array(a) { + return a; @@ -15,7 +16,7 @@ +} --- a/runtime/wasm/array.wat +++ b/runtime/wasm/array.wat -@@ -403,4 +403,13 @@ +@@ -293,4 +293,13 @@ (struct.get $float 0 (ref.cast (ref $float) (local.get $v))) (local.get $len)))) (ref.i31 (i32.const 0))) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch index 5ac6abeadd..578d7b30ad 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch @@ -1,10 +1,9 @@ --- a/runtime/js/sys.js +++ b/runtime/js/sys.js -@@ -290,8 +290,13 @@ - function caml_sys_isatty(_chan) { +@@ -300,6 +300,11 @@ return 0; } - + +//Provides: caml_sys_const_runtime5 const +function caml_sys_const_runtime5(_unit) { + return 0; @@ -13,16 +12,16 @@ //Provides: caml_runtime_variant //Requires: caml_string_of_jsbytes function caml_runtime_variant(_unit) { - return caml_string_of_jsbytes(""); --- a/runtime/wasm/sys.wat +++ b/runtime/wasm/sys.wat -@@ -146,5 +146,9 @@ +@@ -154,6 +154,10 @@ (param (ref eq)) (result (ref eq)) (ref.i31 (i32.const 0))) - + + (func (export "caml_sys_const_runtime5") + (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) + - (func (export "caml_runtime_variant") (param (ref eq)) (result (ref eq)) - (array.new_fixed $bytes 0)) + (@string $Unix "Unix") + (@string $Win32 "Win32") + diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-local-bytes.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-local-bytes.patch new file mode 100644 index 0000000000..f1e0ec62b5 --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-local-bytes.patch @@ -0,0 +1,22 @@ +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -504,6 +504,7 @@ + } + + //Provides: caml_create_bytes const ++//Alias: caml_create_local_bytes + //Requires: MlBytes,caml_invalid_argument + function caml_create_bytes(len) { + if (len < 0) caml_invalid_argument("Bytes.create"); +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -121,7 +121,8 @@ + + (@string $Bytes_create "Bytes.create") + +- (func (export "caml_create_bytes") ++ (export "caml_create_local_bytes" (func $caml_create_bytes)) ++ (func $caml_create_bytes (export "caml_create_bytes") + (param $len (ref eq)) (result (ref eq)) + (local $l i32) + (local.set $l (i31.get_s (ref.cast (ref i31) (local.get $len)))) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch index ad24d6a85f..24ec30b5bb 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch @@ -6,7 +6,7 @@ -let v = - let current = Ocaml_version.current in -+let v = 561 ++let v = 568 + (* let current = Ocaml_version.current in match current with | 4 :: 08 :: _ -> 25 diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch index 5542a69282..e40549d323 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch @@ -1,18 +1,14 @@ --- a/compiler/lib/instr.ml +++ b/compiler/lib/instr.ml -@@ -169,6 +169,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -173,6 +173,7 @@ | RESUME | RESUMETERM -@@ -353,13 +354,14 @@ - ; RERAISE, KStop 0, "RERAISE" - ; RAISE_NOTRACE, KStop 0, "RAISE_NOTRACE" - ; GETSTRINGCHAR, KNullary, "GETSTRINGCHAR" - ; PERFORM, if_v500 KNullaryCall, "PERFORM" + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + let equal (a : t) b = Poly.equal a b +@@ -360,6 +361,7 @@ ; RESUME, if_v500 KNullaryCall, "RESUME" ; RESUMETERM, if_v500 (KStop 1), "RESUMETERM" ; REPERFORMTERM, if_v500 (KStop 1), "REPERFORMTERM" @@ -20,22 +16,30 @@ ; FIRST_UNIMPLEMENTED_OP, K_will_not_happen, "FIRST_UNIMPLEMENTED_OP" |] in - let ops = - Array.mapi ~f:(fun i (c, k, n) -> { code = c; kind = k; name = n; opcode = i }) instrs - in --- a/compiler/lib/instr.mli +++ b/compiler/lib/instr.mli -@@ -168,6 +168,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -172,6 +172,7 @@ | RESUME | RESUMETERM + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + type kind = +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -32,7 +32,7 @@ + | Const_float_array sl | Const_float_block sl -> + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in + Float_array (Array.of_list l) +- | Const_block (tag, l) -> ++ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> + let l = Array.of_list (List.map l ~f:constant_of_const) in + Tuple (tag, l, Unknown) + --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -1375,7 +1375,7 @@ +@@ -1412,7 +1412,7 @@ (pc + 2) state (Let (x, Block (i, [||], Unknown, Maybe_mutable)) :: instrs) @@ -44,13 +48,3 @@ let size = getu code (pc + 1) in let tag = getu code (pc + 2) in let state = State.push state in ---- a/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:34:59 2024 -0400 -+++ b/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:28:48 2024 -0400 -@@ -42,6 +42,6 @@ - Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> - Int (Targetint.of_int_warning_on_overflow i) -- | Const_block (tag, l) -> -+ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> - let l = Array.of_list (List.map l ~f:constant_of_const) in - Tuple (tag, l, Unknown) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch index ff51bbb6f9..3545c53168 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch @@ -1,15 +1,16 @@ --- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml +++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml -@@ -250,7 +250,7 @@ - in - let make_fun (label, pat) (label', typ) expr = - assert (label' = label); -- Exp.fun_ label None (Pat.constraint_ pat typ) expr -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr +@@ -267,7 +267,8 @@ + | _ -> c, b + in + { expr with pexp_desc = Pexp_function (params, c, b) } +- | _ -> Exp.fun_ label None (Pat.constraint_ pat typ) expr ++ | _ -> ++ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr in let invoker = List.fold_right2 -@@ -309,10 +309,10 @@ +@@ -326,10 +327,10 @@ in Exp.apply ~loc:apply_loc @@ -22,7 +23,7 @@ ~loc:gloc nolabel None -@@ -355,7 +355,7 @@ +@@ -372,7 +373,7 @@ invoker [ app_arg obj ; app_arg @@ -31,7 +32,7 @@ ~loc:gloc nolabel None -@@ -379,9 +379,8 @@ +@@ -396,9 +397,8 @@ let prop_set ~loc ~prop_loc obj prop value = let gloc = { obj.pexp_loc with Location.loc_ghost = true } in let obj = @@ -43,7 +44,7 @@ in let invoker = invoker -@@ -409,7 +408,7 @@ +@@ -426,7 +426,7 @@ [ app_arg obj ; app_arg value ; app_arg @@ -52,52 +53,9 @@ ~loc:{ loc with loc_ghost = true } nolabel None -@@ -583,11 +582,14 @@ - | Pcf_method (id, priv, Cfk_concrete (bang, body)) -> - let names = check_name id names in - let body, body_ty = drop_pexp_poly (mappper body) in - let rec create_meth_ty exp = - match exp.pexp_desc with -- | Pexp_fun (label, _, _, body) -> Arg.make ~label () :: create_meth_ty body -- | Pexp_function _ -> [ Arg.make () ] -+ | Pexp_function (params, _, _) -> -+ List.filter_map params ~f:(fun param -> -+ match param.pparam_desc with -+ | Pparam_val (label, _, _) -> Some (Arg.make ~label ()) -+ | Pparam_newtype _ -> None) -- | Pexp_newtype (_, body) -> create_meth_ty body -+ | Pexp_newtype (_, _, body) -> create_meth_ty body - | _ -> [] - in - let fun_ty = create_meth_ty body in -@@ -641,7 +643,7 @@ - let body = function - | Val (_, _, _, body) -> body - | Meth (_, _, _, body, _) -> -- Exp.fun_ ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body +@@ -935,3 +935,5 @@ + |> Ppxlib_ast.Selected_ast.to_ocaml Expression in - let extra_types = - List.concat -@@ -725,14 +727,17 @@ - invoker - (List.map fields ~f:(fun f -> app_arg (body f)) - @ [ app_arg -- { (List.fold_right -+ (let body = -+ List.fold_right - (self :: List.map fields ~f:(fun f -> (name f).txt)) - ~init:fake_object - ~f:(fun name fun_ -> -- Exp.fun_ ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_)) -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_) -+ in -+ { body - with -- pexp_attributes = [ merlin_hide ] -- } -+ pexp_attributes = body.pexp_attributes @ [ merlin_hide ] -+ }) - ]) - - let transform = + { Ocaml_ast_mapper.default_mapper with expr } ++ ++ diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch new file mode 100644 index 0000000000..d82b9d1fb8 --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch @@ -0,0 +1,24 @@ +--- a/toplevel/lib/jsooTop.ml ++++ b/toplevel/lib/jsooTop.ml +@@ -65,6 +65,7 @@ + p := !p + len''; + len'' + ++[%%if ocaml_version < (4, 14, 0)] + let use ffp content = + let fname, oc = + Filename.open_temp_file ~mode:[ Open_binary ] "jsoo_toplevel" "fake_stdin" +@@ -78,10 +79,11 @@ + with e -> + Sys.remove fname; + raise e +-[@@if ocaml_version < (4, 14, 0)] ++[%%endif] + ++[%%if ocaml_version >= (4, 14, 0)] + let use ffp content = Toploop.use_silently ffp (String content) +-[@@if ocaml_version >= (4, 14, 0)] ++[%%endif] + + let execute printval ?pp_code ?highlight_location pp_answer s = + let lb = Lexing.from_function (refill_lexbuf s (ref 0) pp_code) in diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch new file mode 100644 index 0000000000..f33c06a02c --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch @@ -0,0 +1,91 @@ +--- a/compiler/ppx/ppx_optcomp_light.ml ++++ b/compiler/ppx/ppx_optcomp_light.ml +@@ -148,7 +148,8 @@ + | [] -> true + | _ -> ( + try +- let keep_one { attr_payload; attr_loc; _ } = ++ let keep_one ({ attr_payload; attr_loc; _ } as attr) = ++ Ppxlib.Attribute.mark_as_handled_manually attr; + let e = + match attr_payload with + | PStr [ { pstr_desc = Pstr_eval (e, []); _ } ] -> e +--- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml ++++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml +@@ -537,14 +537,6 @@ + + let rec create_meth_ty exp = + match exp.pexp_desc with +- | Pexp_fun (label, _, _, body) -> label :: create_meth_ty body +- | Pexp_function _ -> [ nolabel ] +- | Pexp_newtype (_, body) -> create_meth_ty body +- | _ -> [] +-[@@if ast_version < 502] +- +-let rec create_meth_ty exp = +- match exp.pexp_desc with + | Pexp_function (params, _, body) -> ( + List.filter_map params ~f:(function + | { pparam_desc = Pparam_newtype _; _ } -> None +@@ -556,7 +548,6 @@ + (* TODO: should we recurse or not ? *) + create_meth_ty e) + | _ -> [] +-[@@if ast_version >= 502] + + let preprocess_literal_object mappper fields : + [ `Fields of field_desc list | `Error of _ ] = +@@ -685,7 +676,7 @@ + | Val (_, _, _, body) -> body + | Meth (_, _, _, (body, ty), _) -> ( + match body.pexp_desc, ty with +- | ((Pexp_function (params, c, b), None) [@if ast_version >= 502]) -> ++ | ((Pexp_function (params, c, b), None)) -> + let params = + { pparam_desc = Pparam_val (nolabel, None, self_id) + ; pparam_loc = { body.pexp_loc with loc_ghost = true } +@@ -693,9 +684,9 @@ + :: params + in + { body with pexp_desc = Pexp_function (params, c, b) } +- | ((_, Some ty) [@if ast_version >= 502]) -> ( ++ | ((_, Some ty)) -> ( + let e = +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -703,18 +694,13 @@ + body + in + match e.pexp_desc with +- | Pexp_function (params, None, b) -> +- { e with pexp_desc = Pexp_function (params, Some (Pconstraint ty), b) } ++ | Pexp_function (params, ({ ret_type_constraint = None ; _ } as function_constraint), b) -> ++ let ret_type_constraint = Some (Pconstraint ty) in ++ let function_constraint = { function_constraint with ret_type_constraint } in ++ { e with pexp_desc = Pexp_function (params, function_constraint , b) } + | _ -> assert false) +- | ((_, Some ty) [@if ast_version < 502]) -> +- Exp.fun_ +- ~loc:{ body.pexp_loc with loc_ghost = true } +- Nolabel +- None +- self_id +- (Exp.constraint_ body ty) + | _, None -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -818,7 +804,7 @@ + in + { fun_ with pexp_desc = Pexp_function (params, c, b) } + | _ -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:gloc + nolabel + None diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch index 65c5b1c5ed..e69de29bb2 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch @@ -1,29 +0,0 @@ ---- a/compiler/tests-jsoo/test_floats.ml -+++ b/compiler/tests-jsoo/test_floats.ml -@@ -26,26 +26,6 @@ - Printf.printf "%g\n" (1. /. z); - [%expect {|-inf|}] - --module Float = struct -- include Float -- -- external acosh : float -> float = "caml_acosh_float" -- -- external asinh : float -> float = "caml_asinh_float" -- -- external atanh : float -> float = "caml_atanh_float" -- -- external erf : float -> float = "caml_erf_float" -- -- external erfc : float -> float = "caml_erfc_float" -- -- external cbrt : float -> float = "caml_cbrt_float" -- -- external exp2 : float -> float = "caml_exp2_float" -- -- external log2 : float -> float = "caml_log2_float" --end -- - let print f = - match Float.classify_float f with - | FP_nan -> print_endline "nan" diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch new file mode 100644 index 0000000000..52db6e50b2 --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch @@ -0,0 +1,158 @@ +--- b/compiler/lib/reserved.ml ++++ a/compiler/lib/reserved.ml +@@ -144,7 +144,6 @@ + ; "require" (* only available in node *) + ; "Symbol" + ; "ArrayBuffer" +- ; "DataView" + ; "Float32Array" + ; "Float64Array" + ; "Int16Array" +--- b/runtime/js/ieee_754.js ++++ a/runtime/js/ieee_754.js +@@ -17,27 +17,74 @@ + // along with this program; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +-//Provides: jsoo_dataview +-var jsoo_dataview = new DataView(new ArrayBuffer(8)); ++//Provides: jsoo_floor_log2 ++var log2_ok = Math.log2 && Math.log2(1.1235582092889474e307) === 1020; ++function jsoo_floor_log2(x) { ++ if (log2_ok) return Math.floor(Math.log2(x)); ++ var i = 0; ++ if (x === 0) return Number.NEGATIVE_INFINITY; ++ if (x >= 1) { ++ while (x >= 2) { ++ x /= 2; ++ i++; ++ } ++ } else { ++ while (x < 1) { ++ x *= 2; ++ i--; ++ } ++ } ++ return i; ++} + + //Provides: caml_int64_bits_of_float const +-//Requires: caml_int64_create_lo_mi_hi +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2, caml_int64_create_lo_mi_hi + function caml_int64_bits_of_float(x) { +- jsoo_dataview.setFloat64(0, x, true); +- var lo32 = jsoo_dataview.getUint32(0, true); +- var hi32 = jsoo_dataview.getUint32(4, true); +- var r1 = lo32 & 0xffffff; +- var r2 = (lo32 >>> 24) | ((hi32 << 8) & 0xffffff); +- var r3 = (hi32 >>> 16) & 0xffff; ++ if (!Number.isFinite(x)) { ++ if (Number.isNaN(x)) return caml_int64_create_lo_mi_hi(1, 0, 0x7ff0); ++ if (x > 0) return caml_int64_create_lo_mi_hi(0, 0, 0x7ff0); ++ else return caml_int64_create_lo_mi_hi(0, 0, 0xfff0); ++ } ++ var sign = ++ x === 0 && 1 / x === Number.NEGATIVE_INFINITY ++ ? 0x8000 ++ : x >= 0 ++ ? 0 ++ : 0x8000; ++ if (sign) x = -x; ++ // Int64.bits_of_float 1.1235582092889474E+307 = 0x7fb0000000000000L ++ // using Math.LOG2E*Math.log(x) in place of Math.log2 result in precision lost ++ var exp = jsoo_floor_log2(x) + 1023; ++ if (exp <= 0) { ++ exp = 0; ++ x /= Math.pow(2, -1026); ++ } else { ++ x /= Math.pow(2, exp - 1027); ++ if (x < 16) { ++ x *= 2; ++ exp -= 1; ++ } ++ if (exp === 0) { ++ x /= 2; ++ } ++ } ++ var k = Math.pow(2, 24); ++ var r3 = x | 0; ++ x = (x - r3) * k; ++ var r2 = x | 0; ++ x = (x - r2) * k; ++ var r1 = x | 0; ++ r3 = (r3 & 0xf) | sign | (exp << 4); + return caml_int64_create_lo_mi_hi(r1, r2, r3); + } + + //Provides: caml_int32_bits_of_float const +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2 + function caml_int32_bits_of_float(x) { +- jsoo_dataview.setFloat32(0, x, true); +- return jsoo_dataview.getUint32(0, true) | 0; ++ var float32a = new Float32Array(1); ++ float32a[0] = x; ++ var int32a = new Int32Array(float32a.buffer); ++ return int32a[0] | 0; + } + + //FP literals can be written using the hexadecimal +@@ -103,14 +150,24 @@ + } + + //Provides: caml_int64_float_of_bits const +-//Requires: jsoo_dataview + function caml_int64_float_of_bits(x) { + var lo = x.lo; + var mi = x.mi; + var hi = x.hi; +- jsoo_dataview.setUint32(0, lo | (mi << 24), true); +- jsoo_dataview.setUint32(4, (mi >>> 8) | (hi << 16), true); +- return jsoo_dataview.getFloat64(0, true); ++ var exp = (hi & 0x7fff) >> 4; ++ if (exp === 2047) { ++ if ((lo | mi | (hi & 0xf)) === 0) ++ return hi & 0x8000 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY; ++ else return Number.NaN; ++ } ++ var k = Math.pow(2, -24); ++ var res = (lo * k + mi) * k + (hi & 0xf); ++ if (exp > 0) { ++ res += 16; ++ res *= Math.pow(2, exp - 1027); ++ } else res *= Math.pow(2, -1026); ++ if (hi & 0x8000) res = -res; ++ return res; + } + + //Provides: caml_nextafter_float const +@@ -135,10 +192,11 @@ + } + + //Provides: caml_int32_float_of_bits const +-//Requires: jsoo_dataview + function caml_int32_float_of_bits(x) { +- jsoo_dataview.setUint32(0, x, true); +- return jsoo_dataview.getFloat32(0, true); ++ var int32a = new Int32Array(1); ++ int32a[0] = x; ++ var float32a = new Float32Array(int32a.buffer); ++ return float32a[0]; + } + + //Provides: caml_classify_float const +@@ -186,11 +244,12 @@ + return x; + } + //Provides: caml_frexp_float const ++//Requires: jsoo_floor_log2 + function caml_frexp_float(x) { + if (x === 0 || !Number.isFinite(x)) return [0, x, 0]; + var neg = x < 0; + if (neg) x = -x; +- var exp = Math.max(-1023, Math.floor(Math.log2(x)) + 1); ++ var exp = Math.max(-1023, jsoo_floor_log2(x) + 1); + x *= Math.pow(2, -exp); + while (x < 0.5) { + x *= 2; diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch new file mode 100644 index 0000000000..3058a0eac5 --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch @@ -0,0 +1,19 @@ +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -21,8 +21,14 @@ + let rec constant_of_const c : Code.constant = + let open Lambda in + match c with +- | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) +- | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) ++ | Const_base ++ (Const_int8 i | Const_untagged_int8 i | ++ Const_int16 i | Const_untagged_int16 i | ++ Const_int i | Const_untagged_int i) -> ++ Int (Targetint.of_int_warning_on_overflow i) ++ ++ | Const_base (Const_char c | Const_untagged_char c) -> ++ Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch new file mode 100644 index 0000000000..7e3dd48e83 --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch @@ -0,0 +1,12 @@ +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -285,7 +285,8 @@ + | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) +- | "caml_int64_bits_of_float", [ Float f ] -> int64 f ++ ++ (* | "caml_int64_bits_of_float", [ Float f ] -> int64 f *) + | "caml_int64_float_of_bits", [ Int64 i ] -> Some (Float i) + | "caml_int64_of_float", [ Float f ] -> + int64 (Int64.of_float (Int64.float_of_bits f)) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch index d3b426a837..e69de29bb2 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch @@ -1,20 +0,0 @@ ---- a/compiler/tests-jsoo/gh_1307.ml -+++ b/compiler/tests-jsoo/gh_1307.ml -@@ -15,7 +15,7 @@ - test "a"; - [%expect {| - input: "a" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - test "aa"; - [%expect {| -@@ -25,7 +25,7 @@ - test "aaa"; - [%expect {| - input: "aaa" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - let (_ : bool) = Parsing.set_trace old in - () diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch new file mode 100644 index 0000000000..23d27d2bf7 --- /dev/null +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch @@ -0,0 +1,1531 @@ +--- a/compiler/lib-wasm/generate.ml ++++ b/compiler/lib-wasm/generate.ml +@@ -99,32 +99,53 @@ + + let specialized_primitives = + let h = String.Hashtbl.create 18 in ++ let caml_accessors = ++ let ( let* ) l f = List.concat_map l ~f in ++ let* index_type, index_suffix = ++ [ Value, "" ++ ; Int32, "_indexed_by_int32" ++ ; Int64, "_indexed_by_int64" ++ ; Nativeint, "_indexed_by_nativeint" ++ ] ++ in ++ let* data_type, data_type_name = ++ [ Value, "16"; Int32, "32"; Int64, "64"; Value, "f32" ] ++ in ++ let* array_type_name, accessors = ++ [ "string", [ `Get ]; "bytes", [ `Get; `Set ]; "ba_uint8", [ `Get; `Set ] ] ++ in ++ let* op = accessors in ++ [ (match op with ++ | `Get -> ++ ( "caml_" ^ array_type_name ^ "_get" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type ], data_type) ) ++ | `Set -> ++ ( "caml_" ^ array_type_name ^ "_set" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type; data_type ], Value) )) ++ ] ++ in + List.iter + ~f:(fun (nm, typ) -> String.Hashtbl.add h nm typ) ++ (caml_accessors @ + [ "caml_int32_bswap", (`Pure, [ Int32 ], Int32) + ; "caml_nativeint_bswap", (`Pure, [ Nativeint ], Nativeint) + ; "caml_int64_bswap", (`Pure, [ Int64 ], Int64) + ; "caml_int32_compare", (`Pure, [ Int32; Int32 ], Value) ++ ; "caml_checked_int32_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_nativeint_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_int64_to_int32", (`Pure, [ Int64 ], Int32) + ; "caml_nativeint_compare", (`Pure, [ Nativeint; Nativeint ], Value) + ; "caml_int64_compare", (`Pure, [ Int64; Int64 ], Value) +- ; "caml_string_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_string_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_bytes_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_bytes_set64", (`Mutator, [ Value; Value; Int64 ], Value) ++ ; "caml_float16_of_double", (`Pure, [ Float ], Int32) ++ ; "caml_double_of_float16", (`Pure, [ Int32 ], Float) + ; "caml_lxm_next", (`Pure, [ Value ], Int64) +- ; "caml_ba_uint8_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_ba_uint8_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_ba_uint8_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_ba_uint8_set64", (`Mutator, [ Value; Value; Int64 ], Value) + ; "caml_nextafter_float", (`Pure, [ Float; Float ], Float) + ; "caml_classify_float", (`Pure, [ Float ], Value) + ; "caml_ldexp_float", (`Pure, [ Float; Value ], Float) + ; "caml_erf_float", (`Pure, [ Float ], Float) + ; "caml_erfc_float", (`Pure, [ Float ], Float) + ; "caml_float_compare", (`Pure, [ Float; Float ], Value) +- ]; ++ ]); + h + + let float_bin_op' op f g = +@@ -233,8 +254,42 @@ + let () = + register_bin_prim "caml_array_unsafe_get" `Mutable Memory.gen_array_get; + register_bin_prim "caml_floatarray_unsafe_get" `Mutable Memory.float_array_get; ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int32" `Mutable (fun x y -> ++ let conv = Memory.unbox_int32 in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int64" `Mutator (fun x y -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ register_bin_prim "caml_array_unsafe_get_indexed_by_nativeint" `Mutable (fun x y -> ++ let conv = Memory.unbox_nativeint in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); + register_tern_prim "caml_array_unsafe_set" (fun x y z -> + seq (Memory.gen_array_set x y z) Value.unit); ++ let unboxed_indexed_array_access conv x y z = ++ seq (Memory.gen_array_set x (Value.val_int (conv y)) z) Value.unit ++ in ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int32" (fun x y z -> ++ let conv = Memory.unbox_int32 in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int64" (fun x y z -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_nativeint" (fun x y z -> ++ let conv = Memory.unbox_nativeint in ++ unboxed_indexed_array_access conv x y z ++ ); + register_tern_prim "caml_array_unsafe_set_addr" (fun x y z -> + seq (Memory.array_set x y z) Value.unit); + register_tern_prim "caml_floatarray_unsafe_set" (fun x y z -> +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -281,6 +281,8 @@ + | "caml_nativeint_compare", [ NativeInt i; NativeInt j ] -> + Some (Int (Targetint.of_int_exn (Int32.compare i j))) + | "caml_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) + (* CR-someday jrodriguez: [Float_u.Option.none ()] is a very specific, sentinel NaN. +@@ -650,7 +652,7 @@ + else None + in + match res with +- | Some c -> ++ | Some c when Var.idx x < Info.info_defs_length info -> + let c = Constant c in + Flow.Info.update_def info x c; + incr update_count; +--- a/compiler/lib/flow.ml ++++ b/compiler/lib/flow.ml +@@ -56,6 +56,9 @@ + let update_def { info_defs; _ } x exp = + let idx = Code.Var.idx x in + info_defs.(idx) <- Expr exp ++ ;; ++ ++ let info_defs_length { info_defs; _ } = Array.length info_defs + end + + let undefined = Phi Var.Set.empty +@@ -363,6 +366,13 @@ + let the_const_of ~eq info x = + match x with + | Pv x -> ++ ++ (* If this variable was minted after we constructed the info table, conservatively ++ assume we know nothing. Transformations of array-access primitives in ++ [specialize_js.ml] mint variables in this way. *) ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -386,11 +396,15 @@ + | Some i, Some j when eq i j -> u + | _ -> None) + x ++ ) + | Pc c -> Some c + + let the_int info x = + match x with + | Pv x -> ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -403,6 +417,7 @@ + | Some i, Some j when Targetint.equal i j -> u + | _ -> None) + x ++ ) + | Pc (Int c) -> Some c + | Pc _ -> None + +--- a/compiler/lib/flow.mli ++++ b/compiler/lib/flow.mli +@@ -45,6 +45,8 @@ + val update_def : t -> Code.Var.t -> Code.expr -> unit + + val possibly_mutable : t -> Code.Var.t -> bool ++ ++ val info_defs_length : t -> int + end + + val get_approx : +--- a/compiler/lib/generate.ml ++++ b/compiler/lib/generate.ml +@@ -1143,6 +1143,7 @@ + J.call (J.dot (s_var "Math") prim) [ cx; cy ] loc) + + let _ = ++ register_un_prim "%identity" `Pure (fun cx _ -> cx); + register_un_prim_ctx "%caml_format_int_special" `Pure (fun ctx cx loc -> + let s = J.EBin (J.Plus, str_js_utf8 "", cx) in + ocaml_string ~ctx ~loc s); +@@ -1151,6 +1152,8 @@ + [ "caml_array_unsafe_get" + ; "caml_array_unsafe_get_float" + ; "caml_floatarray_unsafe_get" ++ ; "caml_array_unsafe_get_indexed_by_int32" ++ ; "caml_array_unsafe_get_indexed_by_nativeint" + ] + `Mutable + (fun cx cy _ -> Mlvalue.Array.field cx cy); +@@ -1160,6 +1163,8 @@ + ; "caml_int32_to_float" + ; "caml_nativeint_of_int" + ; "caml_nativeint_to_int" ++ ; "caml_checked_nativeint_to_int" ++ ; "caml_checked_int32_to_int" + ; "caml_nativeint_to_int32" + ; "caml_nativeint_of_int32" + ; "caml_nativeint_to_float" +@@ -1246,6 +1251,8 @@ + ; "caml_array_unsafe_set_float" + ; "caml_floatarray_unsafe_set" + ; "caml_array_unsafe_set_addr" ++ ; "caml_array_unsafe_set_indexed_by_int32" ++ ; "caml_array_unsafe_set_indexed_by_nativeint" + ] + `Mutator + (fun cx cy cz _ -> J.EBin (J.Eq, Mlvalue.Array.field cx cy, cz)); +--- a/compiler/lib/specialize_js.ml ++++ b/compiler/lib/specialize_js.ml +@@ -303,6 +303,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_get_indexed_by_int32" ++ | "caml_array_get_indexed_by_int64" ++ | "caml_array_get_indexed_by_nativeint") ++ as prim) ++ , [ y; z ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_get_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_get_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_get_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_get] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_get", [ y; Pv z' ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_get" + | "caml_array_get_float" + | "caml_floatarray_get" +@@ -349,6 +375,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_set_indexed_by_int32" ++ | "caml_array_set_indexed_by_int64" ++ | "caml_array_set_indexed_by_nativeint") ++ as prim) ++ , [ y; z; w ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_set_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_set_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_set_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_set] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_set", [ y; Pv z'; w ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_set" + | "caml_array_set_float" + | "caml_floatarray_set" +--- a/runtime/js/bigarray.js ++++ b/runtime/js/bigarray.js +@@ -43,6 +43,7 @@ + } + + //Provides: caml_unpackFloat16 ++//Alias: caml_double_of_float16 + var caml_unpackFloat16 = (function () { + var pow = Math.pow; + +@@ -73,6 +74,7 @@ + })(); + + //Provides: caml_packFloat16 ++//Alias: caml_float16_of_double + var caml_packFloat16 = (function () { + const INVERSE_OF_EPSILON = 1 / Number.EPSILON; + +@@ -549,6 +551,8 @@ + } + + //Provides: caml_ba_uint8_get16 ++//Alias: caml_ba_uint8_get16_indexed_by_int32 ++//Alias: caml_ba_uint8_get16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get16(ba, i0) { + var ofs = ba.offset(i0); +@@ -558,7 +562,15 @@ + return b1 | (b2 << 8); + } + ++//Provides: caml_ba_uint8_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get16 ++function caml_ba_uint8_get16_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get32 ++//Alias: caml_ba_uint8_get32_indexed_by_int32 ++//Alias: caml_ba_uint8_get32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get32(ba, i0) { + var ofs = ba.offset(i0); +@@ -570,7 +582,15 @@ + return (b1 << 0) | (b2 << 8) | (b3 << 16) | (b4 << 24); + } + ++//Provides: caml_ba_uint8_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get32 ++function caml_ba_uint8_get32_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get64 ++//Alias: caml_ba_uint8_get64_indexed_by_int32 ++//Alias: caml_ba_uint8_get64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_of_bytes + function caml_ba_uint8_get64(ba, i0) { + var ofs = ba.offset(i0); +@@ -586,6 +606,12 @@ + return caml_int64_of_bytes([b8, b7, b6, b5, b4, b3, b2, b1]); + } + ++//Provides: caml_ba_uint8_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get64 ++function caml_ba_uint8_get64_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_get_1 + function caml_ba_get_1(ba, i0) { + return ba.get(ba.offset(i0)); +@@ -609,6 +635,8 @@ + } + + //Provides: caml_ba_uint8_set16 ++//Alias: caml_ba_uint8_set16_indexed_by_int32 ++//Alias: caml_ba_uint8_set16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set16(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -618,7 +646,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set16 ++function caml_ba_uint8_set16_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set16(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set32 ++//Alias: caml_ba_uint8_set32_indexed_by_int32 ++//Alias: caml_ba_uint8_set32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set32(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -630,7 +666,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set32 ++function caml_ba_uint8_set32_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set32(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set64 ++//Alias: caml_ba_uint8_set64_indexed_by_int32 ++//Alias: caml_ba_uint8_set64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_to_bytes + function caml_ba_uint8_set64(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -640,6 +684,12 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set64 ++function caml_ba_uint8_set64_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set64(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_set_1 + function caml_ba_set_1(ba, i0, v) { + ba.set(ba.offset(i0), v); +--- a/runtime/js/float32.js ++++ b/runtime/js/float32.js +@@ -375,36 +375,78 @@ + let caml_ba_float32_set_3 = caml_ba_set_3 + + //Provides: caml_ba_uint8_getf32 ++//Alias: caml_ba_uint8_getf32_indexed_by_int32 ++//Alias: caml_ba_uint8_getf32_indexed_by_nativeint + //Requires: caml_ba_uint8_get32, caml_int32_float_of_bits + function caml_ba_uint8_getf32(ba, i0) { + return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); + } + ++//Provides: caml_ba_uint8_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_getf32 ++function caml_ba_uint8_getf32_indexed_by_int64(ba, i) { ++ return caml_ba_uint8_getf32(ba, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_setf32 ++//Alias: caml_ba_uint8_setf32_indexed_by_int32 ++//Alias: caml_ba_uint8_setf32_indexed_by_nativeint + //Requires: caml_ba_uint8_set32, caml_int32_bits_of_float + function caml_ba_uint8_setf32(ba, i0, v) { + return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); + } + ++//Provides: caml_ba_uint8_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_setf32 ++function caml_ba_uint8_setf32_indexed_by_int64(ba, i, v) { ++ return caml_ba_uint8_setf32(ba, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_string_getf32 ++//Alias: caml_string_getf32_indexed_by_int32 ++//Alias: caml_string_getf32_indexed_by_nativeint + //Requires: caml_string_get32, caml_int32_float_of_bits + function caml_string_getf32(s, i) { + return caml_int32_float_of_bits(caml_string_get32(s, i)); + } + ++//Provides: caml_string_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_getf32 ++function caml_string_getf32_indexed_by_int64(s, i) { ++ return caml_string_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_getf32 ++//Alias: caml_bytes_getf32_indexed_by_int32 ++//Alias: caml_bytes_getf32_indexed_by_nativeint + //Requires: caml_bytes_get32, caml_int32_float_of_bits + function caml_bytes_getf32(s, i) { + return caml_int32_float_of_bits(caml_bytes_get32(s, i)); + } + ++//Provides: caml_bytes_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_getf32 ++function caml_bytes_getf32_indexed_by_int64(s, i) { ++ return caml_bytes_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_setf32 ++//Alias: caml_bytes_setf32_indexed_by_int32 ++//Alias: caml_bytes_setf32_indexed_by_nativeint + //Requires: caml_bytes_set32, caml_int32_bits_of_float + function caml_bytes_setf32(s, i, f32) { + return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); + } + ++//Provides: caml_bytes_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_setf32 ++function caml_bytes_setf32_indexed_by_int64(s, i, f32) { ++ return caml_bytes_setf32(s, caml_checked_int64_to_int(i), f32) ++} ++ + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_failwith + //If: js-string + function caml_string_setf32(s, i, f32) { +@@ -412,8 +454,16 @@ + } + + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_bytes_setf32 + //If: !js-string + function caml_string_setf32(s, i, f32) { + return caml_bytes_setf32(s, i, f32); + } ++ ++//Provides: caml_string_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_setf32 ++function caml_string_setf32_indexed_by_int64(s, i, f32) { ++ return caml_string_setf32(s, caml_checked_int64_to_int(i), f32) ++} +--- a/runtime/js/int64.js ++++ b/runtime/js/int64.js +@@ -352,6 +352,27 @@ + return x.toInt(); + } + ++//Provides: caml_checked_int64_to_int const ++//Requires: caml_int64_of_int32, caml_failwith ++function caml_checked_int64_to_int (x) { ++ if (x.compare(caml_int64_of_int32(0x7FFFFFFF)) == 1 ++ || x.compare(caml_int64_of_int32(0x80000000)) == -1) ++ caml_failwith("error while converting from int64") ++ return x.toInt() ++} ++ ++//Provides: caml_array_unsafe_get_indexed_by_int64 (mutable, const) ++//Requires: caml_int64_to_int32, caml_array_get ++function caml_array_unsafe_get_indexed_by_int64 (array, index) { ++ return caml_array_get(array, caml_int64_to_int32(index)); ++} ++ ++//Provides: caml_array_unsafe_set_indexed_by_int64 (mutable, const, mutable) ++//Requires: caml_int64_to_int32, caml_array_set ++function caml_array_unsafe_set_indexed_by_int64 (array, index, newval) { ++ return caml_array_set(array, caml_int64_to_int32(index), newval) ++} ++ + //Provides: caml_int64_to_float const + function caml_int64_to_float(x) { + return x.toFloat(); +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -251,6 +251,8 @@ + } + + //Provides: caml_string_get16 ++//Alias: caml_string_get16_indexed_by_int32 ++//Alias: caml_string_get16_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get16(s, i) { +@@ -260,7 +262,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_string_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get16 ++function caml_string_get16_indexed_by_int64(s, i) { ++ return caml_string_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get16 ++//Alias: caml_bytes_get16_indexed_by_int32 ++//Alias: caml_bytes_get16_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get16(s, i) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -269,7 +279,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get16 ++function caml_bytes_get16_indexed_by_int64(s, i) { ++ return caml_bytes_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get32 ++//Alias: caml_string_get32_indexed_by_int32 ++//Alias: caml_string_get32_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get32(s, i) { +@@ -281,7 +299,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_string_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get32 ++function caml_string_get32_indexed_by_int64(s, i) { ++ return caml_string_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get32 ++//Alias: caml_bytes_get32_indexed_by_int32 ++//Alias: caml_bytes_get32_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get32(s, i) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -292,7 +318,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get32 ++function caml_bytes_get32_indexed_by_int64(s, i) { ++ return caml_bytes_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get64 ++//Alias: caml_string_get64_indexed_by_int32 ++//Alias: caml_string_get64_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_int64_of_bytes + //Requires: caml_ml_string_length +@@ -305,7 +339,15 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_string_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get64 ++function caml_string_get64_indexed_by_int64(s, i) { ++ return caml_string_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get64 ++//Alias: caml_bytes_get64_indexed_by_int32 ++//Alias: caml_bytes_get64_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + //Requires: caml_int64_of_bytes + function caml_bytes_get64(s, i) { +@@ -317,6 +359,12 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_bytes_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get64 ++function caml_bytes_get64_indexed_by_int64(s, i) { ++ return caml_bytes_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_get + function caml_bytes_get(s, i) { +@@ -340,6 +388,8 @@ + } + + //Provides: caml_bytes_set16 ++//Alias: caml_bytes_set16_indexed_by_int32 ++//Alias: caml_bytes_set16_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set16(s, i, i16) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -350,7 +400,15 @@ + return 0; + } + ++//Provides: caml_bytes_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set16 ++function caml_bytes_set16_indexed_by_int64(s, i, i16) { ++ return caml_bytes_set16(s, caml_checked_int64_to_int(i), i16) ++} ++ + //Provides: caml_bytes_set32 ++//Alias: caml_bytes_set32_indexed_by_int32 ++//Alias: caml_bytes_set32_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set32(s, i, i32) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -365,7 +423,15 @@ + return 0; + } + ++//Provides: caml_bytes_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set32 ++function caml_bytes_set32_indexed_by_int64(s, i, i32) { ++ return caml_bytes_set32(s, caml_checked_int64_to_int(i), i32) ++} ++ + //Provides: caml_bytes_set64 ++//Alias: caml_bytes_set64_indexed_by_int32 ++//Alias: caml_bytes_set64_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + //Requires: caml_int64_to_bytes + function caml_bytes_set64(s, i, i64) { +@@ -377,6 +443,12 @@ + return 0; + } + ++//Provides: caml_bytes_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set64 ++function caml_bytes_set64_indexed_by_int64(s, i, i64) { ++ return caml_bytes_set64(s, caml_checked_int64_to_int(i), i64) ++} ++ + //Provides: caml_bytes_set + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set(s, i, c) { +--- a/runtime/wasm/bigarray.wat ++++ b/runtime/wasm/bigarray.wat +@@ -90,6 +90,8 @@ + (func $Int32_val (param (ref eq)) (result i32))) + (import "int32" "caml_copy_nativeint" + (func $caml_copy_nativeint (param i32) (result (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + (import "int64" "caml_copy_int64" + (func $caml_copy_int64 (param i64) (result (ref eq)))) + (import "int64" "Int64_val" +@@ -176,7 +178,9 @@ + (field $ba_kind i8) ;; kind + (field $ba_layout i8)))) ;; layout + +- (func $double_to_float16 (param $f f64) (result i32) ++ (func $double_to_float16 ++ (export "caml_float16_of_double") ++ (param $f f64) (result i32) + (local $x i32) (local $sign i32) (local $o i32) + (local.set $x (i32.reinterpret_f32 (f32.demote_f64 (local.get $f)))) + (local.set $sign (i32.and (local.get $x) (i32.const 0x80000000))) +@@ -206,7 +210,9 @@ + (i32.const 13))))))) + (i32.or (local.get $o) (i32.shr_u (local.get $sign) (i32.const 16)))) + +- (func $float16_to_double (param $d i32) (result f64) ++ (func $float16_to_double ++ (export "caml_double_of_float16") ++ (param $d i32) (result f64) + (local $f f32) + (local.set $f + (f32.mul +@@ -2009,125 +2015,207 @@ + (br $loop)))) + (return (i32.const 0))) + +- (func (export "caml_ba_uint8_get16") +- (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (func $caml_ba_uint8_get16_indexed_by_int32 ++ (export "caml_ba_uint8_get16_indexed_by_int32") ++ (export "caml_ba_uint8_get16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $p)))) ++ (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get32") +- (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (func (export "caml_ba_uint8_get16") ++ (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get32_indexed_by_int32 ++ (export "caml_ba_uint8_get32_indexed_by_int32") ++ (export "caml_ba_uint8_get32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i32) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (return_call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (return_call $ta_get32_ui8 (local.get $data) (local.get $i))) ++ ++ (func (export "caml_ba_uint8_get32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get64") +- (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (func (export "caml_ba_uint8_get32") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get64_indexed_by_int32 ++ (export "caml_ba_uint8_get64_indexed_by_int32") ++ (export "caml_ba_uint8_get64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i64) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) + (i64.or + (i64.extend_i32_u +- (call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (call $ta_get32_ui8 (local.get $data) (local.get $i))) + (i64.shl (i64.extend_i32_u + (call $ta_get32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)))) + +- (func (export "caml_ba_uint8_set16") +- (param $vba (ref eq)) (param $i (ref eq)) (param $v (ref eq)) ++ (func (export "caml_ba_uint8_get64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get64") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_set16_indexed_by_int32 ++ (export "caml_ba_uint8_set16_indexed_by_int32") ++ (export "caml_ba_uint8_set16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $v (ref eq)) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) (local $d (ref i31)) ++ (local $d (ref i31)) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) + (local.set $d (ref.cast (ref i31) (local.get $v))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set16_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set16_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set32") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) ++ (func (export "caml_ba_uint8_set16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set16") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set32_indexed_by_int32 ++ (export "caml_ba_uint8_set32_indexed_by_int32") ++ (export "caml_ba_uint8_set32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i32) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set64") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) ++ (func (export "caml_ba_uint8_set32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set32") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set64_indexed_by_int32 ++ (export "caml_ba_uint8_set64_indexed_by_int32") ++ (export "caml_ba_uint8_set64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i64) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) + (i32.wrap_i64 (local.get $d))) + (call $ta_set32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $d) (i64.const 32)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_ba_uint8_set64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set64") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ + (export "caml_bytes_of_uint8_array" (func $caml_string_of_uint8_array)) + (func $caml_string_of_uint8_array (export "caml_string_of_uint8_array") + (param (ref eq)) (result (ref eq)) +--- a/runtime/wasm/float32.wat ++++ b/runtime/wasm/float32.wat +@@ -41,14 +41,34 @@ + (func $caml_ba_set_3 (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)))) + (import "bigarray" "caml_ba_uint8_get32" + (func $caml_ba_uint8_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int32" ++ (func $caml_ba_uint8_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int64" ++ (func $caml_ba_uint8_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "bigarray" "caml_ba_uint8_set32" + (func $caml_ba_uint8_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int32" ++ (func $caml_ba_uint8_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int64" ++ (func $caml_ba_uint8_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "string" "caml_string_get32" + (func $caml_string_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int32" ++ (func $caml_string_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int64" ++ (func $caml_string_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_get32" + (func $caml_bytes_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int32" ++ (func $caml_bytes_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int64" ++ (func $caml_bytes_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_set32" + (func $caml_bytes_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int32" ++ (func $caml_bytes_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int64" ++ (func $caml_bytes_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "array" "caml_make_vect" + (func $caml_make_vect (param (ref eq)) (param (ref eq)) (result (ref eq)))) + +@@ -686,23 +706,87 @@ + (call $box_float32 (f32.reinterpret_i32 + (call $caml_ba_uint8_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_ba_uint8_getf32_indexed_by_int32 ++ (export "caml_ba_uint8_getf32_indexed_by_int32") ++ (export "caml_ba_uint8_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_ba_uint8_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_ba_uint8_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_ba_uint8_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ++ (func $caml_ba_uint8_setf32_indexed_by_int32 ++ (export "caml_ba_uint8_setf32_indexed_by_int32") ++ (export "caml_ba_uint8_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_ba_uint8_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ + (func (export "caml_string_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_string_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_string_getf32_indexed_by_int32 ++ (export "caml_string_getf32_indexed_by_int32") ++ (export "caml_string_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_string_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_bytes_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_bytes_getf32_indexed_by_int32 ++ (export "caml_bytes_getf32_indexed_by_int32") ++ (export "caml_bytes_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_bytes_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func $caml_bytes_setf32_indexed_by_int32 ++ (export "caml_bytes_setf32_indexed_by_int32") ++ (export "caml_bytes_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_bytes_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ) +--- a/runtime/wasm/int32.wat ++++ b/runtime/wasm/int32.wat +@@ -124,6 +124,21 @@ + (call $parse_int + (local.get $v) (i32.const 32) (global.get $INT32_ERRMSG)))) + ++ (data $integer_conversion_error "error while converting from int32") ++ ++ (func $caml_checked_int32_to_int (export "caml_checked_int32_to_int") ++ (param i32) (result (ref eq)) ++ (if (i32.or (i32.gt_s (local.get 0) (i32.const 0x3FFFFFFF)) ++ (i32.lt_s (local.get 0) (i32.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (local.get 0))) ++ ++ (func $caml_checked_nativeint_to_int (export "caml_checked_nativeint_to_int") ++ (param i32) (result (ref eq)) ++ (call $caml_checked_int32_to_int (local.get 0))) ++ + (export "caml_nativeint_compare" (func $caml_int32_compare)) + (func $caml_int32_compare (export "caml_int32_compare") + (param $i1 i32) (param $i2 i32) (result (ref eq)) +@@ -177,4 +192,6 @@ + (return_call $format_int (local.get 0) + (struct.get $int32 1 + (ref.cast (ref $int32) (local.get 1))) (i32.const 0))) ++ ++ + ) +--- a/runtime/wasm/int64.wat ++++ b/runtime/wasm/int64.wat +@@ -317,4 +317,26 @@ + (local.get $uppercase))))))))) + (local.get $s)) + ++ (data $integer_conversion_error "error while converting from int64") ++ ++ (func $caml_checked_int64_to_int (export "caml_checked_int64_to_int") ++ (param (ref eq)) (result (ref eq)) ++ (local $i i64) ++ (local.set $i ++ (struct.get $int64 1 (ref.cast (ref $int64) (local.get 0)))) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (i32.wrap_i64 (local.get $i)))) ++ ++ (func (export "caml_checked_int64_to_int32") ++ (param $i i64) (result i32) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (i32.wrap_i64 (local.get $i))) + ) +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -19,6 +19,8 @@ + (import "fail" "caml_bound_error" (func $caml_bound_error)) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param $arg (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + + (type $bytes (array (mut i8))) + +@@ -153,171 +155,274 @@ + (i31.get_u (ref.cast (ref i31) (local.get $len)))) + (ref.i31 (i32.const 0))) + +- (export "caml_string_get16" (func $caml_bytes_get16)) +- (func $caml_bytes_get16 (export "caml_bytes_get16") +- (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int32 ++ (export "caml_bytes_get16_indexed_by_int32") ++ (export "caml_bytes_get16_indexed_by_nativeint") ++ (export "caml_string_get16_indexed_by_int32") ++ (export "caml_string_get16_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (ref.i31 (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))))) + +- (export "caml_string_get32" (func $caml_bytes_get32)) +- (func $caml_bytes_get32 (export "caml_bytes_get32") +- (param $v (ref eq)) (param $i (ref eq)) (result i32) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int64 ++ (export "caml_bytes_get16_indexed_by_int64") ++ (export "caml_string_get16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get16 ++ (export "caml_bytes_get16") ++ (export "caml_string_get16") ++ (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get32_indexed_by_int32 ++ (export "caml_bytes_get32_indexed_by_int32") ++ (export "caml_bytes_get32_indexed_by_nativeint") ++ (export "caml_string_get32_indexed_by_int32") ++ (export "caml_string_get32_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i32) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i32.or + (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))) + (i32.or + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2))) ++ (i32.add (local.get $i) (i32.const 2))) + (i32.const 16)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3))) ++ (i32.add (local.get $i) (i32.const 3))) + (i32.const 24))))) + +- (export "caml_string_get64" (func $caml_bytes_get64)) +- (func $caml_bytes_get64 (export "caml_bytes_get64") +- (param $v (ref eq)) (param $i (ref eq)) (result i64) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get32_indexed_by_int64 ++ (export "caml_bytes_get32_indexed_by_int64") ++ (export "caml_string_get32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get32 ++ (export "caml_bytes_get32") ++ (export "caml_string_get32") ++ (param $v (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get64_indexed_by_int32 ++ (export "caml_bytes_get64_indexed_by_int32") ++ (export "caml_bytes_get64_indexed_by_nativeint") ++ (export "caml_string_get64_indexed_by_int32") ++ (export "caml_string_get64_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i64) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i64.or + (i64.or + (i64.or + (i64.extend_i32_u +- (array.get_u $bytes (local.get $s) (local.get $p))) ++ (array.get_u $bytes (local.get $s) (local.get $i))) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)))) ++ (i32.add (local.get $i) (i32.const 1)))) + (i64.const 8))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)))) ++ (i32.add (local.get $i) (i32.const 2)))) + (i64.const 16)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)))) ++ (i32.add (local.get $i) (i32.const 3)))) + (i64.const 24)))) + (i64.or + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)))) ++ (i32.add (local.get $i) (i32.const 5)))) + (i64.const 40))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)))) ++ (i32.add (local.get $i) (i32.const 6)))) + (i64.const 48)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)))) ++ (i32.add (local.get $i) (i32.const 7)))) + (i64.const 56)))))) + +- (func (export "caml_bytes_set16") +- (param (ref eq) (ref eq) (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) (local $v i32) ++ (func $caml_bytes_get64_indexed_by_int64 ++ (export "caml_bytes_get64_indexed_by_int64") ++ (export "caml_string_get64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get64 ++ (export "caml_bytes_get64") ++ (export "caml_string_get64") ++ (param $v (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_bytes_set16_indexed_by_int32 ++ (export "caml_bytes_set16_indexed_by_int32") ++ (export "caml_bytes_set16_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param (ref eq)) (result (ref eq)) ++ (local $s (ref $bytes)) (local $v i32) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $v (i31.get_s (ref.cast (ref i31) (local.get 2)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set32") +- (param (ref eq)) (param (ref eq)) (param $v i32) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set16") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set32_indexed_by_int32 ++ (export "caml_bytes_set32_indexed_by_int32") ++ (export "caml_bytes_set32_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.shr_u (local.get $v) (i32.const 16))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.shr_u (local.get $v) (i32.const 24))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set64") +- (param (ref eq)) (param (ref eq)) (param $v i64) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set32") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set64_indexed_by_int32 ++ (export "caml_bytes_set64_indexed_by_int32") ++ (export "caml_bytes_set64_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i64) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) ++ (array.set $bytes (local.get $s) (local.get $i) + (i32.wrap_i64 (local.get $v))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 8)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 16)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 24)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 32)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)) ++ (i32.add (local.get $i) (i32.const 5)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 40)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)) ++ (i32.add (local.get $i) (i32.const 6)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 48)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)) ++ (i32.add (local.get $i) (i32.const 7)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 56)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_bytes_set64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set64") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ + (func (export "caml_string_concat") + (param $vs1 (ref eq)) (param $vs2 (ref eq)) (result (ref eq)) + (local $s1 (ref $bytes)) (local $s2 (ref $bytes)) diff --git a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/opam b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/opam index b105be5763..2c9f83e60c 100644 --- a/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/opam +++ b/packages/js_of_ocaml-toplevel/js_of_ocaml-toplevel.6.0.1+ox/opam @@ -22,7 +22,7 @@ depends: [ "num" {with-test} "ppx_expect" {>= "v0.14.2" & with-test} "ppxlib" {= "0.33.0+ox"} - "re" {>= "1.9.0" & with-test} + "re" {>= "1.9.0" & with-test & = "1.14.0+ox"} "odoc" {with-doc} ] build: [ @@ -33,9 +33,9 @@ dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git" x-commit-hash: "b6d60e4f8ff35e7c7b3bb52b97ffedc3eb8e3d08" url { src: - "https://github.com/ocsigen/js_of_ocaml/archive/a8e8d2c1696a5fb3ddb4fe15495b1a8625a29b4b.tar.gz" + "https://github.com/ocsigen/js_of_ocaml/archive/246df644334aa97103d1051aec128337ea1868f9.tar.gz" checksum: - "sha256=b1e1ebd799547b33eec43b4d934bfde475b0ff4d20eba36d36147ee6d8db173c" + "sha256=c43572970512140facf02a30f16d4b34c10d55326bbd3d3c125bc2e549ef4ab8" } patches: [ "js_of_ocaml-magic_number.ml.patch" @@ -45,6 +45,7 @@ patches: [ "js_of_ocaml-add-unboxed-and-float-block.patch" "js_of_ocaml-ident-is_global.patch" "js_of_ocaml-remove-float-externals.patch" + "js_of_ocaml-ocaml_version-ppx.patch" "js_of_ocaml-test-diffs-caused-by-build-differences.patch" "js_of_ocaml-fix-build_fs.patch" "js_of_ocaml-iarray-primitives.patch" @@ -54,17 +55,13 @@ patches: [ "js_of_ocaml-caml_provides_sub_local.patch" "js_of_ocaml-caml_hash_exn.patch" "wasm_of_ocaml-bring-back-eval.patch" - "js_of_ocaml-index-by-unboxed-int.patch" "js_of_ocaml-mixed-block-bytecode-op.patch" "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" "js_of_ocaml-int_u-array-primitives.patch" - "js_of_ocaml-n-ary-functions.patch" "js_of_ocaml-symtable-5.2-api.patch" - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" "js_of_ocaml-jane-street-5.2-compatibility.patch" "js_of_ocaml-migrate-labeled-tuples-shims.patch" "js_of_ocaml-floatarray_create_local.patch" - "wasm_of_ocaml-sourcemap-contents.patch" "js_of_ocaml-jane-street-const_null-support.patch" "js_of_ocaml-float32.patch" "js_of_ocaml-caml_array_append.patch" @@ -72,21 +69,30 @@ patches: [ "js_of_ocaml-5.3-tests-runtime.patch" "js_of_ocaml-caml_bigstring_strncmp.patch" "wasm_of_ocaml-stub-caml_ml_set_channel_refill.patch" - "js_of_ocaml-version-directive-removal.patch" + "js_of_ocaml-no-compression-module-5.2.patch" "js_of_ocaml-obj_stubs.patch" - "js_of_ocaml-float32-2.patch" + "js_of_ocaml-global_deadcode-fix.patch" + "js_of_ocaml-local-bytes.patch" + "js_of_ocaml-n-ary-functions.patch" + "js_of_ocaml-optcomp_lite_fixes.patch" + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "js_of_ocaml-gh2034.patch" + "js_of_ocaml-unboxed-indexing.patch" + "js_of_ocaml-atomics.patch" + "js_of_ocaml-flipped-conditions-in-test.patch" + "js_of_ocaml-atomic-cmpxchg.patch" + "js_of_ocaml-small-int-literals.patch" "dune.patch" - "js_of_ocaml-top-effects.patch" - "js_of_ocaml-toplevel.patch" ] extra-files: [ [ "js_of_ocaml-magic_number.ml.patch" - "sha256=7feef837352414b5f102705c01915da98c3186f3559d92e94b63ad912c11dddd" + "sha256=05e204eac0338a76ca02db89ebb9505d80a7e268b93b746408356be913e219e6" ] [ "js_of_ocaml-compilation_unit-name.patch" - "sha256=63ebbb630149ade7f377dc8940d58968d7a44cef4911d67fc49a7fe10446eb1f" + "sha256=1e00a73f66cbaa87eefb45702eaaf431978f8eb9ed95684c781b0ebb035d1a7f" ] [ "js_of_ocaml-with_async_exns.patch" @@ -98,7 +104,7 @@ extra-files: [ ] [ "js_of_ocaml-add-unboxed-and-float-block.patch" - "sha256=625447650ca1c56f597000c3a7191309d1f1ed795f3670bc367d6383a07fc07e" + "sha256=db409edb2be9be828015b6722fb51d7bccdd1e4a7edf982b5c8d89808713af7b" ] [ "js_of_ocaml-ident-is_global.patch" @@ -106,19 +112,23 @@ extra-files: [ ] [ "js_of_ocaml-remove-float-externals.patch" - "sha256=a3aa95ee08210377c1470e5bf0f832bc27ad98299bca22c7a88eb9fd6c32e655" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-ocaml_version-ppx.patch" + "sha256=df6bcb6da8aa3dfd6bd0a178679987d41c400ec1803f4a66659cfc822d1b280f" ] [ "js_of_ocaml-test-diffs-caused-by-build-differences.patch" - "sha256=00d38ead67c67220351605d72c2b3a4e3faa8053087ef8ab47b7067b42900ba9" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-fix-build_fs.patch" - "sha256=6373ba10c70f77a2c5999bfec2484657a32450e44a3dfb04ce6bcaa05464d890" + "sha256=abaa404bf23a77cf1badfe30ab9fcc13c6fb0446a81fa10b0962ed1ba9005d6a" ] [ "js_of_ocaml-iarray-primitives.patch" - "sha256=1cefd949dad720858306c87e349dd927c402f292d7b7c770542f0b28bc8dc1b8" + "sha256=037ad55684c9ac3801ff284839d8bb1290d2e750cd4bcb03b75e5f4ab69559c9" ] [ "js_of_ocaml-important-config-changes.patch" @@ -126,7 +136,7 @@ extra-files: [ ] [ "js_of_ocaml-internal-ocaml-5-compatibility.patch" - "sha256=60cef558cd8c6ec4679c02e38e97933c9427d7de5e18bc151a60b4be9512fb36" + "sha256=6b7e17df7f0142158eca19a953422eb6eaf97a3f7f3f2443648bfd069fbcb90f" ] [ "js_of_ocaml-wasm-temp-differences.patch" @@ -144,13 +154,9 @@ extra-files: [ "wasm_of_ocaml-bring-back-eval.patch" "sha256=c413d9617e1122a9fdad8f1f63859bdf9f17a8440f78bdfbaecc432bae580fac" ] - [ - "js_of_ocaml-index-by-unboxed-int.patch" - "sha256=9983ff547de81845e0da06da547c6191671a72a5e1b321594b6d326b0e079e80" - ] [ "js_of_ocaml-mixed-block-bytecode-op.patch" - "sha256=289db81bcf2d12c5aa98e7cc14d4831eac38ba4795da862a4a78ed771c3c8ad9" + "sha256=ed6cfee285491515d497e8871c8534236e9a77939c3838dfd5b3fdb20626e347" ] [ "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" @@ -160,18 +166,10 @@ extra-files: [ "js_of_ocaml-int_u-array-primitives.patch" "sha256=99eba4301613d03e0305017a687c768bd24a22cef0db25ab62cbc3d304f647ba" ] - [ - "js_of_ocaml-n-ary-functions.patch" - "sha256=0f6c5da3756755db191492701c2df598426cdf57254b5366798dbd1f893e7e90" - ] [ "js_of_ocaml-symtable-5.2-api.patch" "sha256=9a999950e8984cc582e3830f447111e1082dc720609334de66a011347d26da9b" ] - [ - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" - "sha256=66afc6da651cd22984aec74f64ad6aaf1b211c6ce5a070fe444377cdaa44f14a" - ] [ "js_of_ocaml-jane-street-5.2-compatibility.patch" "sha256=45391a7a7da6c5bfbe97ec1272cb369d533c2d95cf7a7a56d754db94871eb043" @@ -184,17 +182,13 @@ extra-files: [ "js_of_ocaml-floatarray_create_local.patch" "sha256=f17e392acc941dde475cb7be0654037df9b8d550aeae0d96b65394e4c4a1d4ca" ] - [ - "wasm_of_ocaml-sourcemap-contents.patch" - "sha256=93b7dddf6313836ce02fbe762c40380e20daefdd8b87ec885ee0f4ef779ad76b" - ] [ "js_of_ocaml-jane-street-const_null-support.patch" "sha256=e708cdc01c0cef3fce1cb9f31b33324977dcca1c166601905fcac1ef10262c3a" ] [ "js_of_ocaml-float32.patch" - "sha256=5f83c34b274dd002e28ace3a93c7beca470bfb85d0037da5e090dcc05a792a20" + "sha256=8d6ebad1481711f57c5ed6dd36187b96ce8fcc51cdf3b0e9d5c277687601c625" ] [ "js_of_ocaml-caml_array_append.patch" @@ -202,11 +196,11 @@ extra-files: [ ] [ "js_of_ocaml-5.2.0-compiler-changes.patch" - "sha256=f71cba10b0c5ca093aa5150cc63ee3ee5bba390b3342601f77421559d8ae14fe" + "sha256=12626322e63a8eaf68d4c8a1a1d3f428832869fae7020588e0fe40bbd8fd8cf8" ] [ "js_of_ocaml-5.3-tests-runtime.patch" - "sha256=bb46bb5c80ace0140edd40c5858c7117f27dc2d0edd869a8b3b4e90aab7199f0" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-caml_bigstring_strncmp.patch" @@ -217,27 +211,63 @@ extra-files: [ "sha256=005bce63009b9539b65036b22a7b7cc531755c7caa3cf1ed8d8697698090e136" ] [ - "js_of_ocaml-version-directive-removal.patch" - "sha256=4b1565454d0b61bc2450ab7b5fff8c5c82babc104ea6b7b9a5446eb9a929740c" + "js_of_ocaml-no-compression-module-5.2.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-obj_stubs.patch" "sha256=9e9064f255c065a3152f665bd5b464040f3cfbbd2580aa4bb6e17be9c2b7fcc8" ] [ - "js_of_ocaml-float32-2.patch" - "sha256=3ff1eda6175f96cc3a5b2c2ae1ee395c9317d248554282c5f157c723a9fae32f" + "js_of_ocaml-global_deadcode-fix.patch" + "sha256=5b49d6ee62ae87c77d88ea8022b022830f906367dc9b9ea2e582f037a739292f" ] [ - "dune.patch" - "sha256=f76da998ab76de56309bd0da3e4db1fb496d6d235d7a0ac2f78e3bafe098714e" + "js_of_ocaml-local-bytes.patch" + "sha256=1c6170fec57089f515ec71bd9873d48bd5ae9c4a85f14b80f33039cce9f232ae" ] [ - "js_of_ocaml-top-effects.patch" - "sha256=638247bd3f7bacb99612353b29c0afdcc48598c5771a52602a96baabbc141370" + "js_of_ocaml-n-ary-functions.patch" + "sha256=b9b078c1f227624cc5fc9dd574c19785354267c19299dcf2f9b9642d0114eddf" ] [ - "js_of_ocaml-toplevel.patch" - "sha256=56c305aa9ed8cb35e9a3bee9fb17aaae244522bacb54a78115b03182a746b7b2" + "js_of_ocaml-optcomp_lite_fixes.patch" + "sha256=b98305f8885c0377714677b2ca6d0d561c18bee6a8fc0d2f9d0abf52694968e0" + ] + [ + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "sha256=899ec90b4c1f5f1251d2c77fdb842f11b5a07d01430da4e5c75610d4bf541faa" + ] + [ + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "sha256=483e848b0dfe54b75c31cd990191730c0070ad8a21912b1beca97111e01a718e" + ] + [ + "js_of_ocaml-gh2034.patch" + "sha256=ec01ea15a9d21c22790ad3c93e9d68154e364462de6a2ce1dbbb62e8af25fc2d" + ] + [ + "js_of_ocaml-unboxed-indexing.patch" + "sha256=2c8b76947795fa34683e7c2bf1022a95058bde146c7832e1bd6e8a33b8d6cfc7" + ] + [ + "js_of_ocaml-atomics.patch" + "sha256=cfe956bb047c252faa2397ff2badca80972d74e1dca0cb633202313dfb8f5da4" + ] + [ + "js_of_ocaml-flipped-conditions-in-test.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-atomic-cmpxchg.patch" + "sha256=89612eb8c1e64898205c0b59c6b73987d2ff993a8c366fb61dac6db90e2806bc" + ] + [ + "js_of_ocaml-small-int-literals.patch" + "sha256=4c3fd2d3a50d220af2bdd377016e3f3354b98b770457ff200494be70bc9bb5b2" + ] + [ + "dune.patch" + "sha256=f76da998ab76de56309bd0da3e4db1fb496d6d235d7a0ac2f78e3bafe098714e" ] ] diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch index 1518edcaf2..2ad0a64b33 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch @@ -1,22 +1,40 @@ +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -1075,6 +1075,13 @@ + | NativeInt i -> + let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in + return (Const, e) ++ | Null -> ++ let* var = ++ register_import ++ ~name:"null" ++ (Global { mut = false; typ = Type.value }) ++ in ++ return (Const, W.GlobalGet var) + + let translate c = + let* const, c = translate_rec c in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -333,6 +333,7 @@ +@@ -329,6 +329,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (* Native int are 32bit on all known backend *) | Tuple of int * constant array * array_or_not + | Null - + module Constant = struct type t = constant -@@ -360,6 +361,7 @@ - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) - | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -361,6 +362,9 @@ + b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Null, Null -> Some true | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None | Int _, Float32 _ | Float32 _, Int _ -> None -@@ -405,6 +407,7 @@ +@@ -409,6 +413,7 @@ | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> Some false @@ -24,44 +42,37 @@ (* Note: the following cases should not occur when compiling to Javascript *) | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) -@@ -524,6 +527,7 @@ +@@ -529,6 +534,7 @@ constant f a.(i) done; Format.fprintf f ")") + | Null -> Format.fprintf f "null" - + let arg f a = match a with -@@ -885,7 +889,7 @@ - | `Wasm -> true - | _ -> false) - | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ -- | Tuple (_, _, _) -> () -+ | Tuple (_, _, _) | Null -> () - in - let check_prim_arg = function - | Pc c -> check_constant c --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -179,6 +179,7 @@ +@@ -151,6 +151,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (** Only produced when compiling to WebAssembly. *) | Tuple of int * constant array * array_or_not + | Null - + module Constant : sig type t = constant --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -255,6 +255,7 @@ +@@ -458,7 +458,8 @@ | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) +- | Int _, Float _ | Float _, Int _ -> None + | Null, Null -> Some true - | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None ++ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None (* All other values may be distinct objects and thus different by [caml_js_equals]. *) | String _, _ -@@ -270,7 +271,9 @@ + | _, String _ +@@ -473,7 +474,9 @@ | NativeInt _, _ | _, NativeInt _ | Tuple _, _ @@ -69,46 +80,43 @@ + | _, Tuple _ + | Null, _ + | _, Null -> None - - let eval_instr ~target info ((x, loc) as i) = - match x with -@@ -408,6 +411,7 @@ + + (* [eval_prim] does not distinguish the two constants *) + let constant_equal a b = +@@ -486,10 +489,11 @@ + | Int32 a, Int32 b -> Int32.equal a b + | NativeInt a, NativeInt b -> Int32.equal a b + | Int64 a, Int64 b -> Int64.equal a b ++ | Null, Null -> true + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ (fun x -> match Flow.Info.def info x with | Some (Constant (Int x)) -> if Targetint.is_zero x then Zero else Non_zero + | Some (Constant Null) -> Zero | Some (Constant - ( Int32 _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -371,11 +371,12 @@ - | NativeInt _, NativeInt _, `Wasm -> - false (* [NativeInt]s are boxed in Wasm and are possibly different objects *) - | NativeInt _, NativeInt _, `JavaScript -> assert false -+ | Null, Null, _ -> true - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - + ( Int32 _ --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -497,6 +497,7 @@ +@@ -524,6 +524,7 @@ + Mlvalue.Block.make ~tag ~args:l, instrs) | Int i -> targetint i, instrs - | Int32 i | NativeInt i -> - J.ENum (J.Num.of_targetint (Targetint.of_int32_exn i)), instrs + | Int32 i | NativeInt i -> targetint (Targetint.of_int32_exn i), instrs + | Null -> s_var "null", instrs - + let constant ~ctx x level = let expr, instr = constant_rec ~ctx x level [] in --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -45,9 +45,7 @@ +@@ -36,9 +36,7 @@ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> let l = Array.of_list (List.map l ~f:constant_of_const) in Tuple (tag, l, Unknown) @@ -116,15 +124,17 @@ - - failwith "[Const_null] not supported in JavaScript yet." + | Const_null -> Null - - let rec find_loc_in_summary ident' = function - | Env.Env_empty -> None + + module Symtable = struct + (* Copied from ocaml/bytecomp/symtable.ml *) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -479,8 +479,14 @@ - - let ident_f32 = ident_of_custom (Obj.repr 0.s) - +@@ -471,8 +471,16 @@ + + let ident_native = ident_of_custom (Obj.repr 0n) + ++ let ident_f32 = ident_of_custom (Obj.repr 0.s) ++ + external is_null : Obj.t -> bool = "%is_null" + + let is_null obj = is_null (Sys.opaque_identity obj) @@ -137,131 +147,85 @@ then let tag = Obj.tag x in if tag = Obj.string_tag -@@ -528,6 +534,7 @@ - | Tuple _ -> false - | Int _ -> true - | Int32 _ | NativeInt _ -> false +@@ -523,6 +531,7 @@ + match target with + | `JavaScript -> true + | `Wasm -> false) + | Null -> true end - + let const32 i = Constant (Int (Targetint.of_int32_exn i)) -@@ -2960,9 +2967,6 @@ +@@ -2877,9 +2886,6 @@ } - + let constant_of_const x = Ocaml_compiler.constant_of_const x - [@@if ocaml_version < (5, 1, 0)] - - let constant_of_const x = Constants.parse x [@@if ocaml_version >= (5, 1, 0)] - + (* We currently rely on constants to be relocated before globals. *) let step1 t compunit code = ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -1068,6 +1068,13 @@ - | NativeInt i -> - let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in - return (Const, e) -+ | Null -> -+ let* var = -+ register_import -+ ~name:"null" -+ (Global { mut = false; typ = Type.value }) -+ in -+ return (Const, W.GlobalGet var) - - let translate c = - let* const, c = translate_rec c in ---- a/compiler/tests-ocaml/lib-atomic/test_atomic.ml -+++ b/compiler/tests-ocaml/lib-atomic/test_atomic.ml -@@ -1,39 +1,39 @@ - (* TEST *) - --let r = Atomic.make 1 --let () = assert (Atomic.get r = 1) -+let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 1 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 1) - --let () = Atomic.set r 2 --let () = assert (Atomic.get r = 2) -+let () = (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r 2 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 2) - --let () = assert (Atomic.exchange r 3 = 2) -+let () = assert ((Atomic.exchange [@ocaml.alert "-unsafe_multidomain"]) r 3 = 2) - --let () = assert (Atomic.compare_and_set r 3 4 = true) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = true) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert (Atomic.compare_and_set r 3 (-4) = false) --let () = assert (Atomic.get r = 4 ) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 (-4) = false) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4 ) - --let () = assert (Atomic.compare_and_set r 3 4 = false) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = false) - - let () = assert (Atomic.fetch_and_add r 2 = 4) --let () = assert (Atomic.get r = 6) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 6) - - let () = assert (Atomic.fetch_and_add r (-2) = 6) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert ((Atomic.incr r; Atomic.get r) = 5) -+let () = assert ((Atomic.incr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 5) - --let () = assert ((Atomic.decr r; Atomic.get r) = 4) -+let () = assert ((Atomic.decr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 4) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -- ignore (Atomic.set r (cur + 1), Atomic.set r (cur - 1)); -- assert (Atomic.get r <> cur) -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in -+ ignore ((Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur + 1), (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur - 1)); -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r <> cur) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in - ignore (Atomic.incr r, Atomic.decr r); -- assert (Atomic.get r = cur) -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = cur) --- a/lib/js_of_ocaml/js.ml +++ b/lib/js_of_ocaml/js.ml @@ -813,7 +813,7 @@ if isNaN s then failwith "parseFloat" else s - + let _ = - Printexc.register_printer (fun e -> + (Printexc.register_printer [@ocaml.alert "-unsafe_multidomain"]) (fun e -> if instanceof (Obj.magic e : < .. > t) error_constr then - let e = Js_error.of_error (Obj.magic e : error t) in[] + let e = Js_error.of_error (Obj.magic e : error t) in --- a/lib/runtime/jsoo_runtime.ml +++ b/lib/runtime/jsoo_runtime.ml -@@ -162,7 +162,7 @@ - +@@ -175,7 +175,7 @@ + exception Exn of t - + - let _ = Callback.register_exception "jsError" (Exn (Obj.magic [||])) + let _ = (Callback.register_exception [@ocaml.alert "-unsafe_multidomain"]) "jsError" (Exn (Obj.magic [||])) - - let raise_ : t -> 'a = Js.js_expr "(function (exn) { throw exn })" - + + external raise_ : t -> 'a = "caml_throw_js_exception" + +--- a/runtime/js/compare.js ++++ b/runtime/js/compare.js +@@ -18,6 +18,7 @@ + //Provides: caml_compare_val_tag + //Requires: caml_is_ml_string, caml_is_ml_bytes + function caml_compare_val_tag(a) { ++ if (a === null) return 1010; // null_tag + if (typeof a === "number") + return 1000; // int_tag (we use it for all numbers) + else if (caml_is_ml_bytes(a)) +@@ -93,6 +94,13 @@ + + // tags are different + if (tag_a !== tag_b) { ++ if (tag_a === 1010) { ++ // Null is less than anything else ++ return -1; ++ } ++ if (tag_b === 1010) { ++ return 1; ++ } + if (tag_a === 1000) { + if (tag_b === 1255) { + //immediate can compare against custom +@@ -193,6 +201,8 @@ + if (!Number.isNaN(b)) return -1; + } + break; ++ case 1010: // Null pointer ++ return 0; + case 1001: // The rest + // Here we can be in the following cases: + // 1. JavaScript primitive types --- a/runtime/js/domain.js +++ b/runtime/js/domain.js -@@ -36,6 +36,13 @@ +@@ -41,6 +41,13 @@ return 0; } - + +//Provides: caml_atomic_compare_exchange +function caml_atomic_compare_exchange(ref, o, n) { + var old = ref[1]; @@ -270,12 +234,12 @@ +} + //Provides: caml_atomic_fetch_add + //Version: >= 5 function caml_atomic_fetch_add(ref, i) { - var old = ref[1]; -@@ -43,6 +50,41 @@ +@@ -49,6 +56,41 @@ return old; } - + +//Provides: caml_atomic_add +function caml_atomic_add(ref, i) { + var old = ref[1]; @@ -312,8 +276,8 @@ +} + //Provides: caml_atomic_exchange + //Version: >= 5 function caml_atomic_exchange(ref, v) { - var r = ref[1]; --- a/runtime/js/marshal.js +++ b/runtime/js/marshal.js @@ -44,6 +44,7 @@ @@ -322,9 +286,9 @@ CODE_CUSTOM_FIXED: 0x19, + CODE_NULL: 0x1f }; - + //Provides: UInt8ArrayReader -@@ -539,6 +540,8 @@ +@@ -492,6 +493,8 @@ } if (intern_obj_table) intern_obj_table[obj_counter++] = v; return v; @@ -333,9 +297,9 @@ default: caml_failwith("input_value: ill-formed message"); } -@@ -742,7 +745,9 @@ +@@ -684,7 +687,9 @@ } - + function extern_rec(v) { - if (v.caml_custom) { + if (v === null) { @@ -346,7 +310,7 @@ var ops = caml_custom_ops[name]; --- a/runtime/js/obj.js +++ b/runtime/js/obj.js -@@ -46,7 +46,8 @@ +@@ -41,7 +41,8 @@ //Provides: caml_obj_tag //Requires: caml_is_ml_bytes, caml_is_ml_string function caml_obj_tag(x) { @@ -355,8 +319,8 @@ + else if (Array.isArray(x) && x[0] === x[0] >>> 0) return x[0]; else if (caml_is_ml_bytes(x)) return 252; else if (caml_is_ml_string(x)) return 252; - else if (x instanceof Function || typeof x == "function") return 247; -@@ -272,3 +273,16 @@ + else if (x instanceof Function || typeof x === "function") return 247; +@@ -244,3 +245,16 @@ function caml_custom_identifier(o) { return caml_string_of_jsstring(o.caml_custom); } @@ -373,12 +337,36 @@ +function caml_is_null(o) { + return o === null; +} +--- a/runtime/wasm/compare.wat ++++ b/runtime/wasm/compare.wat +@@ -25,6 +25,7 @@ + (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) + (import "obj" "caml_is_closure" + (func $caml_is_closure (param (ref eq)) (result i32))) ++ (import "obj" "null" (global $null (ref eq))) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param (ref eq)))) + (import "effect" "caml_is_continuation" +@@ -238,6 +239,13 @@ + (if (local.get $total) + (then + (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) ++ (if (ref.eq (local.get $v1) (global.get $null)) ++ (then ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 0))) ++ (else (return (i32.const -1)))))) ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 1)))) + (drop (block $v1_is_not_int (result (ref eq)) + (local.set $i1 + (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) --- a/runtime/wasm/domain.wat +++ b/runtime/wasm/domain.wat -@@ -34,6 +34,21 @@ +@@ -38,6 +38,21 @@ (else (ref.i31 (i32.const 0))))) - + + (func (export "caml_atomic_compare_exchange") + (param $ref (ref eq)) (param $o (ref eq)) (param $n (ref eq)) + (result (ref eq)) @@ -396,11 +384,11 @@ + (func (export "caml_atomic_load") (param (ref eq)) (result (ref eq)) (array.get $block (ref.cast (ref $block) (local.get 0)) (i32.const 1))) - -@@ -48,6 +63,61 @@ + +@@ -52,6 +67,61 @@ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) (local.get $old)) - + + (func (export "caml_atomic_add") + (param $ref (ref eq)) (param $i (ref eq)) (result (ref eq)) + (local $b (ref $block)) @@ -461,30 +449,29 @@ (local $b (ref $block)) --- a/runtime/wasm/obj.wat +++ b/runtime/wasm/obj.wat -@@ -86,6 +86,9 @@ +@@ -89,6 +89,9 @@ (field (ref $function_2)) (field (mut (ref null $cps_closure)))))) - + + (type $null (struct)) + (global $null (export "null") (ref eq) (struct.new $null)) + (global $forcing_tag i32 (i32.const 244)) (global $cont_tag (export "cont_tag") i32 (i32.const 245)) (global $lazy_tag (export "lazy_tag") i32 (i32.const 246)) -@@ -239,6 +242,8 @@ +@@ -243,6 +246,8 @@ (local.get $res)) - + (func (export "caml_obj_tag") (param $v (ref eq)) (result (ref eq)) + (if (ref.eq (local.get $v) (global.get $null)) + (then (return (ref.i31 (i32.const 1010))))) (if (ref.test (ref i31) (local.get $v)) (then (return (ref.i31 (i32.const 1000))))) (drop (block $not_block (result (ref eq)) -@@ -487,4 +492,20 @@ - (array.new_fixed $block 3 (ref.i31 (i32.const 0)) - (local.get $x) (local.get $y)) - (ref.as_non_null (global.get $caml_trampoline_ref)))))) --) +@@ -491,4 +496,22 @@ + (call $caml_callback_1 (local.get $f) (local.get $x)) + (local.get $y))) + )) + + (func (export "caml_is_null") (param $x (ref eq)) (result (ref eq)) + (if (result (ref eq)) (ref.eq (local.get $x) (global.get $null)) @@ -501,61 +488,6 @@ + (call $caml_failwith + (array.new_data $bytes $int_as_pointer_not_implemented + (i32.const 0) (i32.const 35))) -+ (ref.i31 (i32.const 0)))))) ---- a/runtime/js/compare.js -+++ b/runtime/js/compare.js -@@ -18,6 +18,7 @@ - //Provides: caml_compare_val_tag - //Requires: caml_is_ml_string, caml_is_ml_bytes - function caml_compare_val_tag(a) { -+ if (a === null) return 1010; // null_tag - if (typeof a === "number") - return 1000; // int_tag (we use it for all numbers) - else if (caml_is_ml_bytes(a)) -@@ -93,6 +94,13 @@ - - // tags are different - if (tag_a !== tag_b) { -+ if (tag_a === 1010) { -+ // Null is less than anything else -+ return -1; -+ } -+ if (tag_b === 1010) { -+ return 1; -+ } - if (tag_a === 1000) { - if (tag_b === 1255) { - //immediate can compare against custom -@@ -193,6 +201,8 @@ - if (!Number.isNaN(b)) return -1; - } - break; -+ case 1010: // Null pointer -+ return 0; - case 1001: // The rest - // Here we can be in the following cases: - // 1. JavaScript primitive types ---- a/runtime/wasm/compare.wat -+++ b/runtime/wasm/compare.wat -@@ -25,6 +25,7 @@ - (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) - (import "obj" "caml_is_closure" - (func $caml_is_closure (param (ref eq)) (result i32))) -+ (import "obj" "null" (global $null (ref eq))) - (import "fail" "caml_invalid_argument" - (func $caml_invalid_argument (param (ref eq)))) - (import "effect" "caml_is_continuation" -@@ -238,6 +239,13 @@ - (if (local.get $total) - (then - (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) -+ (if (ref.eq (local.get $v1) (global.get $null)) -+ (then -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 0))) -+ (else (return (i32.const -1)))))) -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 1)))) - (drop (block $v1_is_not_int (result (ref eq)) - (local.set $i1 - (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) ++ (ref.i31 (i32.const 0))))) ++ + ) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch index 43e4b69d0f..e69de29bb2 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch @@ -1,84 +0,0 @@ ---- a/compiler/tests-ocaml/lib-list/test.ml -+++ b/compiler/tests-ocaml/lib-list/test.ml -@@ -64,7 +64,7 @@ - let hello = ['H';'e';'l';'l';'o'] in - let world = ['W';'o';'r';'l';'d';'!'] in - let hello_world = hello @ [' '] @ world in -- assert (List.take 5 hello_world = hello); -+ (* assert (List.take 5 hello_world = hello); - assert (List.take 3 [1; 2; 3; 4; 5] = [1; 2; 3]); - assert (List.take 3 [1; 2] = [1; 2]); - assert (List.take 3 [] = []); -@@ -83,7 +83,7 @@ - assert (List.drop_while (fun x -> x < 3) [1; 2; 3; 4; 5; 1; 2; 3] - = [3; 4; 5; 1; 2; 3]); - assert (List.drop_while (fun x -> x < 9) [1; 2; 3] = []); -- assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); -+ assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); *) - assert (List.partition is_even [1; 2; 3; 4; 5] - = ([2; 4], [1; 3; 5])); - assert (List.partition_map string_of_even_or_int [1; 2; 3; 4; 5] ---- a/compiler/tests-ocaml/lib-queue/test.ml -+++ b/compiler/tests-ocaml/lib-queue/test.ml -@@ -137,11 +137,11 @@ - assert (Q.length q2 = 8); assert (Q.to_list q2 = [5; 6; 7; 8; 1; 2; 3; 4]); - ;; - --let () = -+(* let () = - let q = Q.create () in - Q.add 1 q; Q.drop q; assert (does_raise Q.drop q); - Q.add 2 q; Q.drop q; assert (does_raise Q.drop q); - assert (Q.length q = 0); --;; -+;; *) - - let () = print_endline "OK" ---- a/compiler/tests-ocaml/lib-hashtbl/hfun.expected -+++ b/compiler/tests-ocaml/lib-hashtbl/hfun.expected -@@ -8,19 +8,19 @@ - 2^30-1 23c392d0 - -2^30 0c66fde3 - -- Floats: --+0.0 0f478b8c ---0.0 0f478b8c -++0.0 07be548a -+-0.0 07be548a - +infty 23ea56fb - -infty 059f7872 - NaN 3228858d - NaN#2 3228858d - NaN#3 3228858d - -- Native integers: --0 3f19274a -+0 07be548a - -1 3653e015 --42 3e33aef8 --2^30-1 3711bf46 ---2^30 2e71f39c -+42 1792870b -+2^30-1 23c392d0 -+-2^30 0c66fde3 - -- Lists: - [0..10] 0ade0fc9 - [0..12] 0ade0fc9 ---- a/compiler/tests-ocaml/lib-uchar/test.ml -+++ b/compiler/tests-ocaml/lib-uchar/test.ml -@@ -74,7 +74,7 @@ - let test_hash () = - let f u = - assert (Hashtbl.hash u = Uchar.hash u); -- assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) -+ (* assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) *) - in - List.iter (Fun.compose f Uchar.of_int) - [0x0000; 0x002D; 0x00E9; 0x062D; 0x2014; 0x1F349] -@@ -117,7 +117,7 @@ - test_to_char (); - test_equal (); - test_compare (); -- test_hash (); -+ (* test_hash (); *) - test_utf_decode (); - test_utf_x_byte_length (); - () diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch index 81cc808404..401b0473f1 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch @@ -1,30 +1,25 @@ --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -31,22 +31,21 @@ +@@ -20,17 +20,16 @@ + + let rec constant_of_const c : Code.constant = let open Lambda in - let open Asttypes in match c with | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -- | Const_base (Const_int32 i) -> ( -+ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) - | `Wasm -> Int32 i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_int32 i) -> Int32 i - | Const_base (Const_int64 i) -> Int64 i +- | Const_base (Const_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i -- | Const_base (Const_nativeint i) -> ( -+ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_nativeint_warning_on_overflow i) - | `Wasm -> NativeInt (Int32.of_nativeint_warning_on_overflow i)) ++ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) | Const_immstring s -> String s - | Const_float_array sl -> + | Const_float_array sl | Const_float_block sl -> - let l = List.map ~f:(fun f -> float_of_string f) sl in + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> + | Const_block (tag, l) -> diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch new file mode 100644 index 0000000000..d3ce2130c0 --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch @@ -0,0 +1,41 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -216,6 +216,16 @@ + return 0; + } + ++//Provides: caml_atomic_compare_exchange_field ++//Version: >= 5 ++function caml_atomic_compare_exchange_field(ref, field, o, n) { ++ var old = ref[field + 1]; ++ if (old === o) { ++ ref[field + 1] = n; ++ } ++ return old; ++} ++ + //Provides: caml_atomic_set_field + //Version: >= 5 + function caml_atomic_set_field(ref, field, v) { +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -329,6 +329,19 @@ + (return (ref.i31 (i32.const 1))))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_atomic_compare_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)))) ++ (local.get $old)) ++ + (func (export "caml_atomic_exchange_field") + (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) + (local $b (ref $block)) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-atomics.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-atomics.patch new file mode 100644 index 0000000000..202c01205d --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-atomics.patch @@ -0,0 +1,238 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -99,6 +99,14 @@ + return r; + } + ++//Provides: caml_atomic_set ++//Version: >= 5 ++function caml_atomic_set(ref, v) { ++ var r = ref[1]; ++ ref[1] = v; ++ return 0; ++} ++ + //Provides: caml_atomic_make_contended + //Version: >= 5.2 + function caml_atomic_make_contended(a) { +@@ -175,3 +183,78 @@ + function caml_ml_domain_cpu_relax(unit) { + return 0; + } ++ ++//Provides: caml_atomic_load_field ++//Version: >= 5 ++function caml_atomic_load_field(ref, field) { ++ return ref[field + 1]; ++} ++ ++//Provides: caml_atomic_add_field ++//Version: >= 5 ++function caml_atomic_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return 0; ++} ++ ++//Provides: caml_atomic_fetch_add_field ++//Version: >= 5 ++function caml_atomic_fetch_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return old; ++} ++ ++//Provides: caml_atomic_cas_field ++//Version: >= 5 ++function caml_atomic_cas_field(ref, field, o, n) { ++ if (ref[field + 1] === o) { ++ ref[field + 1] = n; ++ return 1; ++ } ++ return 0; ++} ++ ++//Provides: caml_atomic_set_field ++//Version: >= 5 ++function caml_atomic_set_field(ref, field, v) { ++ ref[field + 1] = v; ++ return 0; ++} ++ ++//Provides: caml_atomic_exchange_field ++//Version: >= 5 ++function caml_atomic_exchange_field(ref, field, v) { ++ var old = ref[field + 1]; ++ ref[field + 1] = v; ++ return old; ++} ++ ++//Provides: caml_atomic_sub_field ++//Version: >= 5 ++function caml_atomic_sub_field(ref, field, i) { ++ ref[field + 1] -= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_land_field ++//Version: >= 5 ++function caml_atomic_land_field(ref, field, i) { ++ ref[field + 1] &= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lor_field ++//Version: >= 5 ++function caml_atomic_lor_field(ref, field, i) { ++ ref[field + 1] |= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lxor_field ++//Version: >= 5 ++function caml_atomic_lxor_field(ref, field, i) { ++ ref[field + 1] ^= i; ++ return 0; ++} +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -131,6 +131,15 @@ + (array.set $block (local.get $b) (i32.const 1) (local.get $v)) + (local.get $r)) + ++ (func (export "caml_atomic_set") ++ (param $ref (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $r (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $r (array.get $block (local.get $b) (i32.const 1))) ++ (array.set $block (local.get $b) (i32.const 1) (local.get $v)) ++ (ref.i31 (i32.const 0))) ++ + (func (export "caml_atomic_make_contended") + (param $v (ref eq)) (result (ref eq)) + (array.new_fixed $block 2 (ref.i31 (i32.const 0)) (local.get $v))) +@@ -220,4 +229,123 @@ + + (func (export "caml_ml_domain_cpu_relax") (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) ++ ++ ;; Atomic field operations ++ (func (export "caml_atomic_load_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (result (ref eq)) ++ (array.get $block ++ (ref.cast (ref $block) (local.get $ref)) ++ (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1)))) ++ ++ (func (export "caml_atomic_fetch_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_sub_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.sub (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_land_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.and (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.or (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lxor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.xor (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_cas_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)) ++ (return (ref.i31 (i32.const 1))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_set_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (ref.i31 (i32.const 0))) + ) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch index 48c3a6fc3b..4e4c985cb6 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch @@ -1,6 +1,6 @@ --- a/compiler/bin-js_of_ocaml/compile.ml +++ b/compiler/bin-js_of_ocaml/compile.ml -@@ -235,7 +235,7 @@ +@@ -311,7 +311,7 @@ sm in let output_partial @@ -11,48 +11,48 @@ code --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -213,16 +213,16 @@ +@@ -208,16 +208,16 @@ end - + module Cmo_format = struct - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + - let name (t : t) = t.cu_name [@@if ocaml_version < (5, 2, 0)] + let name (t : t) = t.cu_name |> Compilation_unit.name_as_string [@@if ocaml_version < (5, 2, 0)] - + let name (t : t) = let (Compunit name) = t.cu_name in name [@@if ocaml_version >= (5, 2, 0)] - + - let requires (t : t) = List.map ~f:Ident.name t.cu_required_globals + let requires (t : t) = List.map ~f:Compilation_unit.name_as_string t.cu_required_globals [@@if ocaml_version < (5, 2, 0)] - + let requires (t : t) = List.map t.cu_required_compunits ~f:(fun (Compunit u) -> u) --- a/compiler/lib/ocaml_compiler.mli +++ b/compiler/lib/ocaml_compiler.mli -@@ -55,7 +55,7 @@ +@@ -53,7 +53,7 @@ end - + module Cmo_format : sig - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + val name : t -> string - + @@ -65,5 +65,5 @@ - + val force_link : t -> bool - + - val imports : t -> (string * string option) list + val imports : t -> Import_info.t array end --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -2633,8 +2633,10 @@ - +@@ -2593,8 +2593,10 @@ + let read_crcs toc ic = ignore (seek_section toc ic "CRCS"); - let orig_crcs : (string * Digest.t option) list = input_value ic in @@ -61,10 +61,10 @@ + List.map (Array.to_list orig_crcs) ~f:(fun import -> + Import_info.name import |> Compilation_unit.Name.to_string, + Import_info.crc import) - + let read_prim toc ic = let prim_size = seek_section toc ic "PRIM" in -@@ -3096,7 +3098,7 @@ +@@ -3042,7 +3044,7 @@ then raise Magic_number.(Bad_magic_version magic); let compunit_pos = input_binary_int ic in seek_in ic compunit_pos; @@ -72,10 +72,10 @@ + let compunit : Cmo_format.compilation_unit_descr = input_value ic in `Cmo compunit | `Cma -> - if Config.Flag.check_magic () + if --- a/compiler/lib/parse_bytecode.mli +++ b/compiler/lib/parse_bytecode.mli -@@ -65,7 +65,7 @@ +@@ -58,7 +58,7 @@ ?includes:string list -> ?include_cmis:bool -> ?debug:bool @@ -83,34 +83,35 @@ + -> Cmo_format.compilation_unit_descr -> in_channel -> one - -@@ -79,7 +79,7 @@ - + +@@ -72,7 +72,7 @@ + val from_channel : in_channel - -> [ `Cmo of Cmo_format.compilation_unit | `Cma of Cmo_format.library | `Exe ] + -> [ `Cmo of Cmo_format.compilation_unit_descr | `Cma of Cmo_format.library | `Exe ] - + val from_string : - prims:string array + prims:string array -> debug:Instruct.debug_event list array -> string -> Code.program --- a/compiler/lib/unit_info.ml +++ b/compiler/lib/unit_info.ml -@@ -37,7 +37,7 @@ +@@ -46,7 +46,7 @@ ; effects_without_cps = false } - + -let of_cmo (cmo : Cmo_format.compilation_unit) = +let of_cmo (cmo : Cmo_format.compilation_unit_descr) = let open Ocaml_compiler in - let provides = StringSet.singleton (Cmo_format.name cmo) in - let requires = StringSet.of_list (Cmo_format.requires cmo) in + (* A packed librariy register global for packed modules. *) + let provides = StringSet.of_list (Cmo_format.name cmo :: Cmo_format.provides cmo) in --- a/compiler/lib/unit_info.mli +++ b/compiler/lib/unit_info.mli -@@ -26,6 +26,6 @@ +@@ -28,7 +28,7 @@ ; effects_without_cps : bool } - + -val of_cmo : Cmo_format.compilation_unit -> t +val of_cmo : Cmo_format.compilation_unit_descr -> t - - val union : t -> t -> t + + val of_primitives : aliases:(string * string) list -> string list -> t + diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch index 9d342bdecc..5879719115 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch @@ -14,17 +14,6 @@ if(!globalThis.jsoo_fs_tmp) globalThis.jsoo_fs_tmp = []; globalThis.jsoo_fs_tmp.push({name:name,content:content}); } ---- a/compiler/tests-full/fs.expected.js -+++ b/compiler/tests-full/fs.expected.js -@@ -18,6 +18,8 @@ - function a(a, b){ - if(c.jsoo_create_file) - c.jsoo_create_file(a, b); -+ else if(c.caml_create_file) -+ c.caml_create_file(a, b); - else{ - if(! c.caml_fs_tmp) c.caml_fs_tmp = []; - c.caml_fs_tmp.push({name: a, content: b}); --- a/runtime/js/fs.js +++ b/runtime/js/fs.js @@ -318,7 +318,7 @@ diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-float32.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-float32.patch index d1712d15e0..ba11933537 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-float32.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-float32.patch @@ -6,8 +6,8 @@ ; ieee_754 + ; float32 ; int64 - ; internalMod ; ints + ; io --- a/compiler/lib-runtime-files/tests/all.ml +++ b/compiler/lib-runtime-files/tests/all.ml @@ -21,6 +21,7 @@ @@ -18,17 +18,7 @@ +format.js +fs.js +fs_fake.js -@@ -52,7 +53,8 @@ - +toplevel.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl runtime; - [%expect - {| -@@ -65,6 +67,7 @@ +@@ -64,6 +65,7 @@ +domain.js +effect.js +fail.js @@ -36,52 +26,91 @@ +format.js +fs.js +fs_fake.js -@@ -94,7 +97,8 @@ - +sys.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl extra; - [%expect {| - +dynlink.js +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -170,6 +170,22 @@ + ] + }) + ++ let float32_type = ++ register_type "float32" (fun () -> ++ let* custom_operations = custom_operations_type in ++ let* custom = custom_type in ++ return ++ { supertype = Some custom ++ ; final = true ++ ; typ = ++ W.Struct ++ [ { mut = false ++ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) ++ } ++ ; { mut = false; typ = Value F32 } ++ ] ++ }) ++ + let int32_type = + register_type "int32" (fun () -> + let* custom_operations = custom_operations_type in +@@ -855,6 +871,18 @@ + in + if_mismatch + ++ let make_float32 e = ++ let* custom_operations = Type.custom_operations_type in ++ let* float32_ops = ++ register_import ++ ~name:"float32_ops" ++ (Global ++ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) ++ in ++ let* ty = Type.float32_type in ++ let* e = e in ++ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) ++ + let make_int32 ~kind e = + let* custom_operations = Type.custom_operations_type in + let* int32_ops = +@@ -1026,6 +1054,9 @@ + | Float f -> + let* ty = Type.float_type in + return (Const, W.StructNew (ty, [ Const (F64 (Int64.float_of_bits f)) ])) ++ | Float32 f -> ++ let* e = Memory.make_float32 (return (W.Const (F32 (Int64.float_of_bits f)))) in ++ return (Const, e) + | Float_array l -> + let l = Array.to_list l in + let* ty = Type.float_array_type in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -326,6 +326,7 @@ +@@ -260,6 +260,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t -@@ -358,8 +359,10 @@ - | NativeInt a, NativeInt b -> Some (Int32.equal a b) - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -300,6 +301,7 @@ + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None + | Int _, Float32 _ | Float32 _, Int _ -> None | Tuple ((0 | 254), _, _), Float_array _ -> None | Float_array _, Tuple ((0 | 254), _, _) -> None | ( Tuple _ -@@ -369,7 +372,7 @@ - | Int _ +@@ -310,6 +312,7 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Float_array _ ) ) -> Some false | ( Float_array _ , ( String _ -@@ -378,13 +381,13 @@ - | Int _ +@@ -319,12 +322,13 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ ) ) -> Some false | ( String _ - , (Int64 _ | Int _ | Int32 _ | NativeInt _ | Float _ | Tuple _ | Float_array _) ) -> @@ -93,12 +122,11 @@ Some false | ( Int64 _ , ( String _ -@@ -392,10 +395,12 @@ - | Int _ +@@ -333,9 +337,12 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ | Float_array _ ) ) -> Some false - | Float _, (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) -> @@ -108,7 +136,7 @@ Some false | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> -@@ -404,8 +409,8 @@ +@@ -344,8 +351,8 @@ | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) | NativeInt _, (Int _ | Int32 _) @@ -119,49 +147,54 @@ end type loc = -@@ -491,6 +496,7 @@ +@@ -432,6 +439,7 @@ | NativeString (Byte s) -> Format.fprintf f "%Sj" s | NativeString (Utf (Utf8 s)) -> Format.fprintf f "%Sj" s - | Float fl -> Format.fprintf f "%.12g" fl -+ | Float32 fl -> Format.fprintf f "%.9g" fl + | Float fl -> Format.fprintf f "%.12g" (Int64.float_of_bits fl) ++ | Float32 fl -> Format.fprintf f "%.9g" (Int64.float_of_bits fl) | Float_array a -> Format.fprintf f "[|"; for i = 0 to Array.length a - 1 do -@@ -878,7 +884,7 @@ - match target with - | `Wasm -> true - | _ -> false) -- | String _ | NativeString _ | Float _ | Float_array _ | Int _ | Int64 _ -+ | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ - | Tuple (_, _, _) -> () - in - let check_prim_arg = function --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -172,6 +172,7 @@ +@@ -148,6 +148,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t (** Only produced when compiling to WebAssembly. *) --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -251,9 +251,11 @@ - match a, b with +@@ -452,6 +452,9 @@ | Int i, Int j -> Some (Targetint.equal i j) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) -- | Int _, Float _ | Float _, Int _ -> None -+ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | String _, _ - | _, String _ -@@ -413,6 +415,7 @@ + | Int _, Float _ | Float _, Int _ -> None +@@ -476,6 +479,7 @@ + match a, b with + | Int i, Int j -> Targetint.equal i j + | Float a, Float b -> Int64.equal a b ++ | Float32 a, Float32 b -> Int64.equal a b + | NativeString a, NativeString b -> Native_string.equal a b + | String a, String b -> String.equal a b + | Int32 a, Int32 b -> Int32.equal a b +@@ -484,7 +488,7 @@ + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ ( Int32 _ | NativeInt _ | Float _ @@ -169,30 +202,9 @@ | Tuple _ | String _ | NativeString _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -354,7 +354,9 @@ - match a, b, target with - | Int i, Int j, _ -> Targetint.equal i j - | Float a, Float b, `JavaScript -> Float.bitwise_equal a b -+ | Float32 a, Float32 b, `JavaScript -> Float.bitwise_equal a b - | Float _, Float _, `Wasm -> false -+ | Float32 _, Float32 _, `Wasm -> false - | NativeString a, NativeString b, `JavaScript -> Native_string.equal a b - | NativeString _, NativeString _, `Wasm -> - false -@@ -373,7 +375,7 @@ - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -438,6 +438,7 @@ +@@ -466,6 +466,7 @@ | Byte x -> Share.get_byte_string str_js_byte x ctx.Ctx.share, instrs | Utf (Utf8 x) -> Share.get_utf_string str_js_utf8 x ctx.Ctx.share, instrs) | Float f -> float_const f, instrs @@ -200,7 +212,7 @@ | Float_array a -> ( Mlvalue.Array.make ~tag:Obj.double_array_tag -@@ -964,6 +965,13 @@ +@@ -1215,6 +1216,13 @@ register_bin_prim "caml_le_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Le, cx, cy))); register_bin_prim "caml_gt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cy, cx))); register_bin_prim "caml_lt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cx, cy))); @@ -216,171 +228,38 @@ register_bin_prim "caml_mul_float" `Pure (fun cx cy _ -> J.EBin (J.Mul, cx, cy)); --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -25,7 +25,8 @@ +@@ -24,7 +24,8 @@ + | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 Float32.(of_string s |> to_float) -+ | Const_base (Const_float s | Const_unboxed_float s) -> Float (float_of_string s) - | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -477,6 +477,8 @@ - - let ident_native = ident_of_custom (Obj.repr 0n) - -+ let ident_f32 = ident_of_custom (Obj.repr 0.s) -+ - let rec parse x = - if Obj.is_block x - then -@@ -490,6 +492,8 @@ +@@ -481,6 +481,8 @@ else if tag = Obj.custom_tag then match ident_of_custom x with + | Some name when same_ident name ident_f32 -> -+ Float32 ((Obj.magic x : float32) |> Float32.to_float) - | Some name when same_ident name ident_32 -> ( ++ Float32 (Int64.bits_of_float (Obj.magic x : float)) + | Some name when same_ident name ident_32 -> let i : int32 = Obj.magic x in - match Config.target () with -@@ -518,6 +522,7 @@ - let inlined = function + Int32 i +@@ -506,6 +508,7 @@ + match c with | String _ | NativeString _ -> false | Float _ -> true + | Float32 _ -> true | Float_array _ -> false | Int64 _ -> false | Tuple _ -> false ---- a/compiler/lib/stdlib.ml -+++ b/compiler/lib/stdlib.ml -@@ -417,6 +417,17 @@ - external ( >= ) : t -> t -> bool = "%greaterequal" - end - -+module Float32 = struct -+ type t = float32 -+ -+ external of_float : float -> t = "%float32offloat" -+ external to_float : t -> float = "%floatoffloat32" -+ -+ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. -+ This is not equivalent to native code, which parses to 32 bits directly. *) -+ let of_string s = float_of_string s |> of_float -+end -+ - module Bool = struct - external ( <> ) : bool -> bool -> bool = "%notequal" - ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -170,6 +170,22 @@ - ] - }) - -+ let float32_type = -+ register_type "float32" (fun () -> -+ let* custom_operations = custom_operations_type in -+ let* custom = custom_type in -+ return -+ { supertype = Some custom -+ ; final = true -+ ; typ = -+ W.Struct -+ [ { mut = false -+ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) -+ } -+ ; { mut = false; typ = Value F32 } -+ ] -+ }) -+ - let int32_type = - register_type "int32" (fun () -> - let* custom_operations = custom_operations_type in -@@ -853,6 +869,18 @@ - in - if_mismatch - -+ let make_float32 e = -+ let* custom_operations = Type.custom_operations_type in -+ let* float32_ops = -+ register_import -+ ~name:"float32_ops" -+ (Global -+ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) -+ in -+ let* ty = Type.float32_type in -+ let* e = e in -+ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) -+ - let make_int32 ~kind e = - let* custom_operations = Type.custom_operations_type in - let* int32_ops = -@@ -1023,6 +1051,9 @@ - | Float f -> - let* ty = Type.float_type in - return (Const, W.StructNew (ty, [ Const (F64 f) ])) -+ | Float32 f -> -+ let* e = Memory.make_float32 (return (W.Const (F32 f))) in -+ return (Const, e) - | Float_array l -> - let l = Array.to_list l in - let* ty = Type.float_array_type in ---- /dev/null -+++ b/compiler/tests-jsoo/test_marshal_float32.ml -@@ -0,0 +1,47 @@ -+ -+(* In javascript, float32s are represented as floats. -+ In native code and wasm, float32s are custom blocks containing a float32 field. *) -+ -+external float_of_float32 : float32 -> float = "%floatoffloat32" -+ -+type float64s = { a : float; b : float } -+ -+let%expect_test "float64 javascript" [@tags "js-only", "no-wasm"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\n\000\000\000\001\000\000\000\003\000\000\000\003\b\000\000\b\254\000{\001\001\200" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+let%expect_test "float64 wasm" [@tags "wasm-only"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\018\000\000\000\001\000\000\000\005\000\000\000\003\014\002\000\000\000\000\000\192^@\000\000\000\000\000\128|@" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+type float32s = { a : float32; b : float32 } -+ -+let%expect_test "float32 javascript" [@tags "js-only", "no-wasm"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\006\000\000\000\001\000\000\000\003\000\000\000\003\160\000{\001\001\200" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] -+ -+let%expect_test "float32 wasm" [@tags "wasm-only"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\021\000\000\000\003\000\000\000\t\000\000\000\t\160\025_f32\000B\246\000\000\025_f32\000C\228\000\000" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] --- /dev/null +++ b/runtime/js/float32.js -@@ -0,0 +1,361 @@ +@@ -0,0 +1,419 @@ + +/* + 32-bit floats are represented as javascript numbers, i.e. 64-bit floats. @@ -729,19 +608,77 @@ + return Math.fround(Math.trunc(x)); +} + -+//Provides: caml_simd_float32_round_neg_inf_bytecode const -+function caml_simd_float32_round_neg_inf_bytecode(x) { -+ return Math.fround(Math.floor(x)); ++//Provides: caml_make_unboxed_float32_vect_bytecode const (const) ++//Requires: caml_make_float_vect ++let caml_make_unboxed_float32_vect_bytecode = caml_make_float_vect ++ ++//Provides: caml_ba_float32_get_1 ++//Requires: caml_ba_get_1 ++let caml_ba_float32_get_1 = caml_ba_get_1 ++ ++//Provides: caml_ba_float32_get_2 ++//Requires: caml_ba_get_2 ++let caml_ba_float32_get_2 = caml_ba_get_2 ++ ++//Provides: caml_ba_float32_get_3 ++//Requires: caml_ba_get_3 ++let caml_ba_float32_get_3 = caml_ba_get_3 ++ ++//Provides: caml_ba_float32_set_1 ++//Requires: caml_ba_set_1 ++let caml_ba_float32_set_1 = caml_ba_set_1 ++ ++//Provides: caml_ba_float32_set_2 ++//Requires: caml_ba_set_2 ++let caml_ba_float32_set_2 = caml_ba_set_2 ++ ++//Provides: caml_ba_float32_set_3 ++//Requires: caml_ba_set_3 ++let caml_ba_float32_set_3 = caml_ba_set_3 ++ ++//Provides: caml_ba_uint8_getf32 ++//Requires: caml_ba_uint8_get32, caml_int32_float_of_bits ++function caml_ba_uint8_getf32(ba, i0) { ++ return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); +} + -+//Provides: caml_simd_float32_round_pos_inf_bytecode const -+function caml_simd_float32_round_pos_inf_bytecode(x) { -+ return Math.fround(Math.ceil(x)); ++//Provides: caml_ba_uint8_setf32 ++//Requires: caml_ba_uint8_set32, caml_int32_bits_of_float ++function caml_ba_uint8_setf32(ba, i0, v) { ++ return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); +} + -+//Provides: caml_simd_float32_round_towards_zero_bytecode const -+function caml_simd_float32_round_towards_zero_bytecode(x) { -+ return Math.fround(Math.trunc(x)); ++//Provides: caml_string_getf32 ++//Requires: caml_string_get32, caml_int32_float_of_bits ++function caml_string_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_string_get32(s, i)); ++} ++ ++//Provides: caml_bytes_getf32 ++//Requires: caml_bytes_get32, caml_int32_float_of_bits ++function caml_bytes_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_bytes_get32(s, i)); ++} ++ ++//Provides: caml_bytes_setf32 ++//Requires: caml_bytes_set32, caml_int32_bits_of_float ++function caml_bytes_setf32(s, i, f32) { ++ return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_failwith ++//If: js-string ++function caml_string_setf32(s, i, f32) { ++ caml_failwith("caml_string_setf32"); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_bytes_setf32 ++//If: !js-string ++function caml_string_setf32(s, i, f32) { ++ return caml_bytes_setf32(s, i, f32); ++} --- a/runtime/wasm/custom.wat +++ b/runtime/wasm/custom.wat @@ -16,6 +16,7 @@ @@ -1471,3 +1408,45 @@ + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) +) +--- a/compiler/lib/parse_bytecode.ml ++++ b/compiler/lib/parse_bytecode.ml +@@ -496,7 +496,7 @@ + then + match ident_of_custom x with + | Some name when same_ident name ident_f32 -> +- Float32 (Int64.bits_of_float (Obj.magic x : float)) ++ Float32 (Int64.bits_of_float ((Obj.magic x : float32) |> Float32.to_float)) + | Some name when same_ident name ident_32 -> + let i : int32 = Obj.magic x in + Int32 i +--- a/compiler/lib/stdlib.ml ++++ b/compiler/lib/stdlib.ml +@@ -369,6 +369,17 @@ + external ( >= ) : t -> t -> bool = "%greaterequal" + end + ++module Float32 = struct ++ type t = float32 ++ ++ external of_float : float -> t = "%float32offloat" ++ external to_float : t -> float = "%floatoffloat32" ++ ++ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. ++ This is not equivalent to native code, which parses to 32 bits directly. *) ++ let of_string s = float_of_string s |> of_float ++end ++ + module Bool = struct + include Bool + +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -25,7 +25,7 @@ + | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-gh2034.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-gh2034.patch new file mode 100644 index 0000000000..3dc5610654 --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-gh2034.patch @@ -0,0 +1,83 @@ +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -387,14 +387,18 @@ + (global.set $method_cache (local.get $a)))) + (local.set $ofs + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) (local.get $ofs))))) ++ (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (return +- (array.get $block +- (local.get $meths) (i32.sub (local.get $ofs) (i32.const 1)))))) ++ (if (i32.eq (local.get $tag) ++ (i31.get_s ++ (ref.cast (ref i31) ++ (array.get $block (local.get $meths) ++ (local.get $ofs))))) ++ (then ++ (return ++ (array.get $block ++ (local.get $meths) ++ (i32.sub (local.get $ofs) (i32.const 1)))))))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -382,7 +382,8 @@ + (array.new $int_array (i32.const 0) (i32.const 8))) + + (func (export "caml_get_public_method") +- (param $obj (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) ++ (param $obj (ref eq)) (param $vtag (ref eq)) (param (ref eq)) ++ (result (ref eq)) + (local $meths (ref $block)) + (local $tag i32) (local $cacheid i32) (local $ofs i32) + (local $li i32) (local $mi i32) (local $hi i32) +@@ -391,7 +392,6 @@ + (ref.cast (ref $block) + (array.get $block + (ref.cast (ref $block) (local.get $obj)) (i32.const 1)))) +- (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $cacheid (i31.get_u (ref.cast (ref i31) (local.get 2)))) + (local.set $len (array.len (global.get $method_cache))) + (if (i32.ge_s (local.get $cacheid) (local.get $len)) +@@ -409,16 +409,14 @@ + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) + (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (local.get $ofs))))) ++ (if (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) (local.get $ofs))) + (then + (return + (array.get $block + (local.get $meths) + (i32.sub (local.get $ofs) (i32.const 1)))))))) ++ (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get $vtag)))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +@@ -450,11 +448,9 @@ + (array.set $int_array (global.get $method_cache) (local.get $cacheid) + (i32.add (local.get $li) (i32.const 1))) + (if (result (ref eq)) +- (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (i32.add (local.get $li) (i32.const 1)))))) ++ (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) ++ (i32.add (local.get $li) (i32.const 1)))) + (then + (array.get $block (local.get $meths) (local.get $li))) + (else diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch new file mode 100644 index 0000000000..46d1621024 --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch @@ -0,0 +1,42 @@ +--- a/compiler/lib/global_deadcode.ml ++++ b/compiler/lib/global_deadcode.ml +@@ -434,7 +434,7 @@ + + They are returned; or + + They are applied to a function. + *) +-let zero prog sentinal live_table = ++let zero prog pure_funs sentinal live_table = + let compact_vars vars = + let i = ref (Array.length vars - 1) in + while !i >= 0 && Var.equal vars.(!i) sentinal do +@@ -483,13 +483,17 @@ + (* Zero out return values in last instruction, otherwise do nothing. *) + match block.branch with + | Return x -> +- let tc = +- (* We don't want to break tailcalls. *) ++ let live_tc = ++ (* Don't break tailcalls, it's needed for generate_closure ++ and effects passes. If the (tail)call is dead, it will ++ be eliminated later by the deadcode pass, don't make it live again by ++ returning its result. *) + match List.last body with +- | Some (Let (x', Apply _)) when Code.Var.equal x' x -> true ++ | Some (Let (x', (Apply _ as e))) -> ++ Code.Var.equal x x' && (is_live x' || not (Pure_fun.pure_expr pure_funs e)) + | Some _ | None -> false + in +- if tc then Return x else Return (zero_var x) ++ if live_tc then Return x else Return (zero_var x) + | Raise (_, _) + | Stop | Branch _ + | Cond (_, _, _) +@@ -581,7 +585,7 @@ + Print.print_uses uses; + Print.print_live_tbl live_table); + (* Zero out dead fields *) +- let p = zero p deadcode_sentinal live_table in ++ let p = zero p pure_funs deadcode_sentinal live_table in + if debug () + then ( + Format.eprintf "After Zeroing:@."; diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch index a9e15c1f4c..33d9968c58 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch @@ -1,9 +1,10 @@ --- a/runtime/js/array.js +++ b/runtime/js/array.js -@@ -249,3 +249,12 @@ - return caml_array_make(len, init); +@@ -131,3 +131,13 @@ + for (var i = 1; i < len; i++) b[i] = 0; + return b } - ++ +// Provides: caml_iarray_of_array const +function caml_iarray_of_array(a) { + return a; @@ -15,7 +16,7 @@ +} --- a/runtime/wasm/array.wat +++ b/runtime/wasm/array.wat -@@ -403,4 +403,13 @@ +@@ -293,4 +293,13 @@ (struct.get $float 0 (ref.cast (ref $float) (local.get $v))) (local.get $len)))) (ref.i31 (i32.const 0))) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch index 5ac6abeadd..578d7b30ad 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch @@ -1,10 +1,9 @@ --- a/runtime/js/sys.js +++ b/runtime/js/sys.js -@@ -290,8 +290,13 @@ - function caml_sys_isatty(_chan) { +@@ -300,6 +300,11 @@ return 0; } - + +//Provides: caml_sys_const_runtime5 const +function caml_sys_const_runtime5(_unit) { + return 0; @@ -13,16 +12,16 @@ //Provides: caml_runtime_variant //Requires: caml_string_of_jsbytes function caml_runtime_variant(_unit) { - return caml_string_of_jsbytes(""); --- a/runtime/wasm/sys.wat +++ b/runtime/wasm/sys.wat -@@ -146,5 +146,9 @@ +@@ -154,6 +154,10 @@ (param (ref eq)) (result (ref eq)) (ref.i31 (i32.const 0))) - + + (func (export "caml_sys_const_runtime5") + (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) + - (func (export "caml_runtime_variant") (param (ref eq)) (result (ref eq)) - (array.new_fixed $bytes 0)) + (@string $Unix "Unix") + (@string $Win32 "Win32") + diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-local-bytes.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-local-bytes.patch new file mode 100644 index 0000000000..f1e0ec62b5 --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-local-bytes.patch @@ -0,0 +1,22 @@ +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -504,6 +504,7 @@ + } + + //Provides: caml_create_bytes const ++//Alias: caml_create_local_bytes + //Requires: MlBytes,caml_invalid_argument + function caml_create_bytes(len) { + if (len < 0) caml_invalid_argument("Bytes.create"); +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -121,7 +121,8 @@ + + (@string $Bytes_create "Bytes.create") + +- (func (export "caml_create_bytes") ++ (export "caml_create_local_bytes" (func $caml_create_bytes)) ++ (func $caml_create_bytes (export "caml_create_bytes") + (param $len (ref eq)) (result (ref eq)) + (local $l i32) + (local.set $l (i31.get_s (ref.cast (ref i31) (local.get $len)))) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch index ad24d6a85f..24ec30b5bb 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch @@ -6,7 +6,7 @@ -let v = - let current = Ocaml_version.current in -+let v = 561 ++let v = 568 + (* let current = Ocaml_version.current in match current with | 4 :: 08 :: _ -> 25 diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch index 5542a69282..e40549d323 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch @@ -1,18 +1,14 @@ --- a/compiler/lib/instr.ml +++ b/compiler/lib/instr.ml -@@ -169,6 +169,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -173,6 +173,7 @@ | RESUME | RESUMETERM -@@ -353,13 +354,14 @@ - ; RERAISE, KStop 0, "RERAISE" - ; RAISE_NOTRACE, KStop 0, "RAISE_NOTRACE" - ; GETSTRINGCHAR, KNullary, "GETSTRINGCHAR" - ; PERFORM, if_v500 KNullaryCall, "PERFORM" + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + let equal (a : t) b = Poly.equal a b +@@ -360,6 +361,7 @@ ; RESUME, if_v500 KNullaryCall, "RESUME" ; RESUMETERM, if_v500 (KStop 1), "RESUMETERM" ; REPERFORMTERM, if_v500 (KStop 1), "REPERFORMTERM" @@ -20,22 +16,30 @@ ; FIRST_UNIMPLEMENTED_OP, K_will_not_happen, "FIRST_UNIMPLEMENTED_OP" |] in - let ops = - Array.mapi ~f:(fun i (c, k, n) -> { code = c; kind = k; name = n; opcode = i }) instrs - in --- a/compiler/lib/instr.mli +++ b/compiler/lib/instr.mli -@@ -168,6 +168,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -172,6 +172,7 @@ | RESUME | RESUMETERM + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + type kind = +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -32,7 +32,7 @@ + | Const_float_array sl | Const_float_block sl -> + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in + Float_array (Array.of_list l) +- | Const_block (tag, l) -> ++ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> + let l = Array.of_list (List.map l ~f:constant_of_const) in + Tuple (tag, l, Unknown) + --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -1375,7 +1375,7 @@ +@@ -1412,7 +1412,7 @@ (pc + 2) state (Let (x, Block (i, [||], Unknown, Maybe_mutable)) :: instrs) @@ -44,13 +48,3 @@ let size = getu code (pc + 1) in let tag = getu code (pc + 2) in let state = State.push state in ---- a/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:34:59 2024 -0400 -+++ b/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:28:48 2024 -0400 -@@ -42,6 +42,6 @@ - Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> - Int (Targetint.of_int_warning_on_overflow i) -- | Const_block (tag, l) -> -+ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> - let l = Array.of_list (List.map l ~f:constant_of_const) in - Tuple (tag, l, Unknown) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch index ff51bbb6f9..3545c53168 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch @@ -1,15 +1,16 @@ --- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml +++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml -@@ -250,7 +250,7 @@ - in - let make_fun (label, pat) (label', typ) expr = - assert (label' = label); -- Exp.fun_ label None (Pat.constraint_ pat typ) expr -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr +@@ -267,7 +267,8 @@ + | _ -> c, b + in + { expr with pexp_desc = Pexp_function (params, c, b) } +- | _ -> Exp.fun_ label None (Pat.constraint_ pat typ) expr ++ | _ -> ++ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr in let invoker = List.fold_right2 -@@ -309,10 +309,10 @@ +@@ -326,10 +327,10 @@ in Exp.apply ~loc:apply_loc @@ -22,7 +23,7 @@ ~loc:gloc nolabel None -@@ -355,7 +355,7 @@ +@@ -372,7 +373,7 @@ invoker [ app_arg obj ; app_arg @@ -31,7 +32,7 @@ ~loc:gloc nolabel None -@@ -379,9 +379,8 @@ +@@ -396,9 +397,8 @@ let prop_set ~loc ~prop_loc obj prop value = let gloc = { obj.pexp_loc with Location.loc_ghost = true } in let obj = @@ -43,7 +44,7 @@ in let invoker = invoker -@@ -409,7 +408,7 @@ +@@ -426,7 +426,7 @@ [ app_arg obj ; app_arg value ; app_arg @@ -52,52 +53,9 @@ ~loc:{ loc with loc_ghost = true } nolabel None -@@ -583,11 +582,14 @@ - | Pcf_method (id, priv, Cfk_concrete (bang, body)) -> - let names = check_name id names in - let body, body_ty = drop_pexp_poly (mappper body) in - let rec create_meth_ty exp = - match exp.pexp_desc with -- | Pexp_fun (label, _, _, body) -> Arg.make ~label () :: create_meth_ty body -- | Pexp_function _ -> [ Arg.make () ] -+ | Pexp_function (params, _, _) -> -+ List.filter_map params ~f:(fun param -> -+ match param.pparam_desc with -+ | Pparam_val (label, _, _) -> Some (Arg.make ~label ()) -+ | Pparam_newtype _ -> None) -- | Pexp_newtype (_, body) -> create_meth_ty body -+ | Pexp_newtype (_, _, body) -> create_meth_ty body - | _ -> [] - in - let fun_ty = create_meth_ty body in -@@ -641,7 +643,7 @@ - let body = function - | Val (_, _, _, body) -> body - | Meth (_, _, _, body, _) -> -- Exp.fun_ ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body +@@ -935,3 +935,5 @@ + |> Ppxlib_ast.Selected_ast.to_ocaml Expression in - let extra_types = - List.concat -@@ -725,14 +727,17 @@ - invoker - (List.map fields ~f:(fun f -> app_arg (body f)) - @ [ app_arg -- { (List.fold_right -+ (let body = -+ List.fold_right - (self :: List.map fields ~f:(fun f -> (name f).txt)) - ~init:fake_object - ~f:(fun name fun_ -> -- Exp.fun_ ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_)) -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_) -+ in -+ { body - with -- pexp_attributes = [ merlin_hide ] -- } -+ pexp_attributes = body.pexp_attributes @ [ merlin_hide ] -+ }) - ]) - - let transform = + { Ocaml_ast_mapper.default_mapper with expr } ++ ++ diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch new file mode 100644 index 0000000000..d82b9d1fb8 --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-ocaml_version-ppx.patch @@ -0,0 +1,24 @@ +--- a/toplevel/lib/jsooTop.ml ++++ b/toplevel/lib/jsooTop.ml +@@ -65,6 +65,7 @@ + p := !p + len''; + len'' + ++[%%if ocaml_version < (4, 14, 0)] + let use ffp content = + let fname, oc = + Filename.open_temp_file ~mode:[ Open_binary ] "jsoo_toplevel" "fake_stdin" +@@ -78,10 +79,11 @@ + with e -> + Sys.remove fname; + raise e +-[@@if ocaml_version < (4, 14, 0)] ++[%%endif] + ++[%%if ocaml_version >= (4, 14, 0)] + let use ffp content = Toploop.use_silently ffp (String content) +-[@@if ocaml_version >= (4, 14, 0)] ++[%%endif] + + let execute printval ?pp_code ?highlight_location pp_answer s = + let lb = Lexing.from_function (refill_lexbuf s (ref 0) pp_code) in diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch new file mode 100644 index 0000000000..f33c06a02c --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch @@ -0,0 +1,91 @@ +--- a/compiler/ppx/ppx_optcomp_light.ml ++++ b/compiler/ppx/ppx_optcomp_light.ml +@@ -148,7 +148,8 @@ + | [] -> true + | _ -> ( + try +- let keep_one { attr_payload; attr_loc; _ } = ++ let keep_one ({ attr_payload; attr_loc; _ } as attr) = ++ Ppxlib.Attribute.mark_as_handled_manually attr; + let e = + match attr_payload with + | PStr [ { pstr_desc = Pstr_eval (e, []); _ } ] -> e +--- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml ++++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml +@@ -537,14 +537,6 @@ + + let rec create_meth_ty exp = + match exp.pexp_desc with +- | Pexp_fun (label, _, _, body) -> label :: create_meth_ty body +- | Pexp_function _ -> [ nolabel ] +- | Pexp_newtype (_, body) -> create_meth_ty body +- | _ -> [] +-[@@if ast_version < 502] +- +-let rec create_meth_ty exp = +- match exp.pexp_desc with + | Pexp_function (params, _, body) -> ( + List.filter_map params ~f:(function + | { pparam_desc = Pparam_newtype _; _ } -> None +@@ -556,7 +548,6 @@ + (* TODO: should we recurse or not ? *) + create_meth_ty e) + | _ -> [] +-[@@if ast_version >= 502] + + let preprocess_literal_object mappper fields : + [ `Fields of field_desc list | `Error of _ ] = +@@ -685,7 +676,7 @@ + | Val (_, _, _, body) -> body + | Meth (_, _, _, (body, ty), _) -> ( + match body.pexp_desc, ty with +- | ((Pexp_function (params, c, b), None) [@if ast_version >= 502]) -> ++ | ((Pexp_function (params, c, b), None)) -> + let params = + { pparam_desc = Pparam_val (nolabel, None, self_id) + ; pparam_loc = { body.pexp_loc with loc_ghost = true } +@@ -693,9 +684,9 @@ + :: params + in + { body with pexp_desc = Pexp_function (params, c, b) } +- | ((_, Some ty) [@if ast_version >= 502]) -> ( ++ | ((_, Some ty)) -> ( + let e = +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -703,18 +694,13 @@ + body + in + match e.pexp_desc with +- | Pexp_function (params, None, b) -> +- { e with pexp_desc = Pexp_function (params, Some (Pconstraint ty), b) } ++ | Pexp_function (params, ({ ret_type_constraint = None ; _ } as function_constraint), b) -> ++ let ret_type_constraint = Some (Pconstraint ty) in ++ let function_constraint = { function_constraint with ret_type_constraint } in ++ { e with pexp_desc = Pexp_function (params, function_constraint , b) } + | _ -> assert false) +- | ((_, Some ty) [@if ast_version < 502]) -> +- Exp.fun_ +- ~loc:{ body.pexp_loc with loc_ghost = true } +- Nolabel +- None +- self_id +- (Exp.constraint_ body ty) + | _, None -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -818,7 +804,7 @@ + in + { fun_ with pexp_desc = Pexp_function (params, c, b) } + | _ -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:gloc + nolabel + None diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch index 65c5b1c5ed..e69de29bb2 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch @@ -1,29 +0,0 @@ ---- a/compiler/tests-jsoo/test_floats.ml -+++ b/compiler/tests-jsoo/test_floats.ml -@@ -26,26 +26,6 @@ - Printf.printf "%g\n" (1. /. z); - [%expect {|-inf|}] - --module Float = struct -- include Float -- -- external acosh : float -> float = "caml_acosh_float" -- -- external asinh : float -> float = "caml_asinh_float" -- -- external atanh : float -> float = "caml_atanh_float" -- -- external erf : float -> float = "caml_erf_float" -- -- external erfc : float -> float = "caml_erfc_float" -- -- external cbrt : float -> float = "caml_cbrt_float" -- -- external exp2 : float -> float = "caml_exp2_float" -- -- external log2 : float -> float = "caml_log2_float" --end -- - let print f = - match Float.classify_float f with - | FP_nan -> print_endline "nan" diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch new file mode 100644 index 0000000000..52db6e50b2 --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch @@ -0,0 +1,158 @@ +--- b/compiler/lib/reserved.ml ++++ a/compiler/lib/reserved.ml +@@ -144,7 +144,6 @@ + ; "require" (* only available in node *) + ; "Symbol" + ; "ArrayBuffer" +- ; "DataView" + ; "Float32Array" + ; "Float64Array" + ; "Int16Array" +--- b/runtime/js/ieee_754.js ++++ a/runtime/js/ieee_754.js +@@ -17,27 +17,74 @@ + // along with this program; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +-//Provides: jsoo_dataview +-var jsoo_dataview = new DataView(new ArrayBuffer(8)); ++//Provides: jsoo_floor_log2 ++var log2_ok = Math.log2 && Math.log2(1.1235582092889474e307) === 1020; ++function jsoo_floor_log2(x) { ++ if (log2_ok) return Math.floor(Math.log2(x)); ++ var i = 0; ++ if (x === 0) return Number.NEGATIVE_INFINITY; ++ if (x >= 1) { ++ while (x >= 2) { ++ x /= 2; ++ i++; ++ } ++ } else { ++ while (x < 1) { ++ x *= 2; ++ i--; ++ } ++ } ++ return i; ++} + + //Provides: caml_int64_bits_of_float const +-//Requires: caml_int64_create_lo_mi_hi +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2, caml_int64_create_lo_mi_hi + function caml_int64_bits_of_float(x) { +- jsoo_dataview.setFloat64(0, x, true); +- var lo32 = jsoo_dataview.getUint32(0, true); +- var hi32 = jsoo_dataview.getUint32(4, true); +- var r1 = lo32 & 0xffffff; +- var r2 = (lo32 >>> 24) | ((hi32 << 8) & 0xffffff); +- var r3 = (hi32 >>> 16) & 0xffff; ++ if (!Number.isFinite(x)) { ++ if (Number.isNaN(x)) return caml_int64_create_lo_mi_hi(1, 0, 0x7ff0); ++ if (x > 0) return caml_int64_create_lo_mi_hi(0, 0, 0x7ff0); ++ else return caml_int64_create_lo_mi_hi(0, 0, 0xfff0); ++ } ++ var sign = ++ x === 0 && 1 / x === Number.NEGATIVE_INFINITY ++ ? 0x8000 ++ : x >= 0 ++ ? 0 ++ : 0x8000; ++ if (sign) x = -x; ++ // Int64.bits_of_float 1.1235582092889474E+307 = 0x7fb0000000000000L ++ // using Math.LOG2E*Math.log(x) in place of Math.log2 result in precision lost ++ var exp = jsoo_floor_log2(x) + 1023; ++ if (exp <= 0) { ++ exp = 0; ++ x /= Math.pow(2, -1026); ++ } else { ++ x /= Math.pow(2, exp - 1027); ++ if (x < 16) { ++ x *= 2; ++ exp -= 1; ++ } ++ if (exp === 0) { ++ x /= 2; ++ } ++ } ++ var k = Math.pow(2, 24); ++ var r3 = x | 0; ++ x = (x - r3) * k; ++ var r2 = x | 0; ++ x = (x - r2) * k; ++ var r1 = x | 0; ++ r3 = (r3 & 0xf) | sign | (exp << 4); + return caml_int64_create_lo_mi_hi(r1, r2, r3); + } + + //Provides: caml_int32_bits_of_float const +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2 + function caml_int32_bits_of_float(x) { +- jsoo_dataview.setFloat32(0, x, true); +- return jsoo_dataview.getUint32(0, true) | 0; ++ var float32a = new Float32Array(1); ++ float32a[0] = x; ++ var int32a = new Int32Array(float32a.buffer); ++ return int32a[0] | 0; + } + + //FP literals can be written using the hexadecimal +@@ -103,14 +150,24 @@ + } + + //Provides: caml_int64_float_of_bits const +-//Requires: jsoo_dataview + function caml_int64_float_of_bits(x) { + var lo = x.lo; + var mi = x.mi; + var hi = x.hi; +- jsoo_dataview.setUint32(0, lo | (mi << 24), true); +- jsoo_dataview.setUint32(4, (mi >>> 8) | (hi << 16), true); +- return jsoo_dataview.getFloat64(0, true); ++ var exp = (hi & 0x7fff) >> 4; ++ if (exp === 2047) { ++ if ((lo | mi | (hi & 0xf)) === 0) ++ return hi & 0x8000 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY; ++ else return Number.NaN; ++ } ++ var k = Math.pow(2, -24); ++ var res = (lo * k + mi) * k + (hi & 0xf); ++ if (exp > 0) { ++ res += 16; ++ res *= Math.pow(2, exp - 1027); ++ } else res *= Math.pow(2, -1026); ++ if (hi & 0x8000) res = -res; ++ return res; + } + + //Provides: caml_nextafter_float const +@@ -135,10 +192,11 @@ + } + + //Provides: caml_int32_float_of_bits const +-//Requires: jsoo_dataview + function caml_int32_float_of_bits(x) { +- jsoo_dataview.setUint32(0, x, true); +- return jsoo_dataview.getFloat32(0, true); ++ var int32a = new Int32Array(1); ++ int32a[0] = x; ++ var float32a = new Float32Array(int32a.buffer); ++ return float32a[0]; + } + + //Provides: caml_classify_float const +@@ -186,11 +244,12 @@ + return x; + } + //Provides: caml_frexp_float const ++//Requires: jsoo_floor_log2 + function caml_frexp_float(x) { + if (x === 0 || !Number.isFinite(x)) return [0, x, 0]; + var neg = x < 0; + if (neg) x = -x; +- var exp = Math.max(-1023, Math.floor(Math.log2(x)) + 1); ++ var exp = Math.max(-1023, jsoo_floor_log2(x) + 1); + x *= Math.pow(2, -exp); + while (x < 0.5) { + x *= 2; diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch new file mode 100644 index 0000000000..3058a0eac5 --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch @@ -0,0 +1,19 @@ +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -21,8 +21,14 @@ + let rec constant_of_const c : Code.constant = + let open Lambda in + match c with +- | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) +- | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) ++ | Const_base ++ (Const_int8 i | Const_untagged_int8 i | ++ Const_int16 i | Const_untagged_int16 i | ++ Const_int i | Const_untagged_int i) -> ++ Int (Targetint.of_int_warning_on_overflow i) ++ ++ | Const_base (Const_char c | Const_untagged_char c) -> ++ Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch new file mode 100644 index 0000000000..7e3dd48e83 --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch @@ -0,0 +1,12 @@ +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -285,7 +285,8 @@ + | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) +- | "caml_int64_bits_of_float", [ Float f ] -> int64 f ++ ++ (* | "caml_int64_bits_of_float", [ Float f ] -> int64 f *) + | "caml_int64_float_of_bits", [ Int64 i ] -> Some (Float i) + | "caml_int64_of_float", [ Float f ] -> + int64 (Int64.of_float (Int64.float_of_bits f)) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch index d3b426a837..e69de29bb2 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch @@ -1,20 +0,0 @@ ---- a/compiler/tests-jsoo/gh_1307.ml -+++ b/compiler/tests-jsoo/gh_1307.ml -@@ -15,7 +15,7 @@ - test "a"; - [%expect {| - input: "a" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - test "aa"; - [%expect {| -@@ -25,7 +25,7 @@ - test "aaa"; - [%expect {| - input: "aaa" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - let (_ : bool) = Parsing.set_trace old in - () diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch new file mode 100644 index 0000000000..23d27d2bf7 --- /dev/null +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch @@ -0,0 +1,1531 @@ +--- a/compiler/lib-wasm/generate.ml ++++ b/compiler/lib-wasm/generate.ml +@@ -99,32 +99,53 @@ + + let specialized_primitives = + let h = String.Hashtbl.create 18 in ++ let caml_accessors = ++ let ( let* ) l f = List.concat_map l ~f in ++ let* index_type, index_suffix = ++ [ Value, "" ++ ; Int32, "_indexed_by_int32" ++ ; Int64, "_indexed_by_int64" ++ ; Nativeint, "_indexed_by_nativeint" ++ ] ++ in ++ let* data_type, data_type_name = ++ [ Value, "16"; Int32, "32"; Int64, "64"; Value, "f32" ] ++ in ++ let* array_type_name, accessors = ++ [ "string", [ `Get ]; "bytes", [ `Get; `Set ]; "ba_uint8", [ `Get; `Set ] ] ++ in ++ let* op = accessors in ++ [ (match op with ++ | `Get -> ++ ( "caml_" ^ array_type_name ^ "_get" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type ], data_type) ) ++ | `Set -> ++ ( "caml_" ^ array_type_name ^ "_set" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type; data_type ], Value) )) ++ ] ++ in + List.iter + ~f:(fun (nm, typ) -> String.Hashtbl.add h nm typ) ++ (caml_accessors @ + [ "caml_int32_bswap", (`Pure, [ Int32 ], Int32) + ; "caml_nativeint_bswap", (`Pure, [ Nativeint ], Nativeint) + ; "caml_int64_bswap", (`Pure, [ Int64 ], Int64) + ; "caml_int32_compare", (`Pure, [ Int32; Int32 ], Value) ++ ; "caml_checked_int32_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_nativeint_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_int64_to_int32", (`Pure, [ Int64 ], Int32) + ; "caml_nativeint_compare", (`Pure, [ Nativeint; Nativeint ], Value) + ; "caml_int64_compare", (`Pure, [ Int64; Int64 ], Value) +- ; "caml_string_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_string_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_bytes_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_bytes_set64", (`Mutator, [ Value; Value; Int64 ], Value) ++ ; "caml_float16_of_double", (`Pure, [ Float ], Int32) ++ ; "caml_double_of_float16", (`Pure, [ Int32 ], Float) + ; "caml_lxm_next", (`Pure, [ Value ], Int64) +- ; "caml_ba_uint8_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_ba_uint8_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_ba_uint8_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_ba_uint8_set64", (`Mutator, [ Value; Value; Int64 ], Value) + ; "caml_nextafter_float", (`Pure, [ Float; Float ], Float) + ; "caml_classify_float", (`Pure, [ Float ], Value) + ; "caml_ldexp_float", (`Pure, [ Float; Value ], Float) + ; "caml_erf_float", (`Pure, [ Float ], Float) + ; "caml_erfc_float", (`Pure, [ Float ], Float) + ; "caml_float_compare", (`Pure, [ Float; Float ], Value) +- ]; ++ ]); + h + + let float_bin_op' op f g = +@@ -233,8 +254,42 @@ + let () = + register_bin_prim "caml_array_unsafe_get" `Mutable Memory.gen_array_get; + register_bin_prim "caml_floatarray_unsafe_get" `Mutable Memory.float_array_get; ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int32" `Mutable (fun x y -> ++ let conv = Memory.unbox_int32 in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int64" `Mutator (fun x y -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ register_bin_prim "caml_array_unsafe_get_indexed_by_nativeint" `Mutable (fun x y -> ++ let conv = Memory.unbox_nativeint in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); + register_tern_prim "caml_array_unsafe_set" (fun x y z -> + seq (Memory.gen_array_set x y z) Value.unit); ++ let unboxed_indexed_array_access conv x y z = ++ seq (Memory.gen_array_set x (Value.val_int (conv y)) z) Value.unit ++ in ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int32" (fun x y z -> ++ let conv = Memory.unbox_int32 in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int64" (fun x y z -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_nativeint" (fun x y z -> ++ let conv = Memory.unbox_nativeint in ++ unboxed_indexed_array_access conv x y z ++ ); + register_tern_prim "caml_array_unsafe_set_addr" (fun x y z -> + seq (Memory.array_set x y z) Value.unit); + register_tern_prim "caml_floatarray_unsafe_set" (fun x y z -> +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -281,6 +281,8 @@ + | "caml_nativeint_compare", [ NativeInt i; NativeInt j ] -> + Some (Int (Targetint.of_int_exn (Int32.compare i j))) + | "caml_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) + (* CR-someday jrodriguez: [Float_u.Option.none ()] is a very specific, sentinel NaN. +@@ -650,7 +652,7 @@ + else None + in + match res with +- | Some c -> ++ | Some c when Var.idx x < Info.info_defs_length info -> + let c = Constant c in + Flow.Info.update_def info x c; + incr update_count; +--- a/compiler/lib/flow.ml ++++ b/compiler/lib/flow.ml +@@ -56,6 +56,9 @@ + let update_def { info_defs; _ } x exp = + let idx = Code.Var.idx x in + info_defs.(idx) <- Expr exp ++ ;; ++ ++ let info_defs_length { info_defs; _ } = Array.length info_defs + end + + let undefined = Phi Var.Set.empty +@@ -363,6 +366,13 @@ + let the_const_of ~eq info x = + match x with + | Pv x -> ++ ++ (* If this variable was minted after we constructed the info table, conservatively ++ assume we know nothing. Transformations of array-access primitives in ++ [specialize_js.ml] mint variables in this way. *) ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -386,11 +396,15 @@ + | Some i, Some j when eq i j -> u + | _ -> None) + x ++ ) + | Pc c -> Some c + + let the_int info x = + match x with + | Pv x -> ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -403,6 +417,7 @@ + | Some i, Some j when Targetint.equal i j -> u + | _ -> None) + x ++ ) + | Pc (Int c) -> Some c + | Pc _ -> None + +--- a/compiler/lib/flow.mli ++++ b/compiler/lib/flow.mli +@@ -45,6 +45,8 @@ + val update_def : t -> Code.Var.t -> Code.expr -> unit + + val possibly_mutable : t -> Code.Var.t -> bool ++ ++ val info_defs_length : t -> int + end + + val get_approx : +--- a/compiler/lib/generate.ml ++++ b/compiler/lib/generate.ml +@@ -1143,6 +1143,7 @@ + J.call (J.dot (s_var "Math") prim) [ cx; cy ] loc) + + let _ = ++ register_un_prim "%identity" `Pure (fun cx _ -> cx); + register_un_prim_ctx "%caml_format_int_special" `Pure (fun ctx cx loc -> + let s = J.EBin (J.Plus, str_js_utf8 "", cx) in + ocaml_string ~ctx ~loc s); +@@ -1151,6 +1152,8 @@ + [ "caml_array_unsafe_get" + ; "caml_array_unsafe_get_float" + ; "caml_floatarray_unsafe_get" ++ ; "caml_array_unsafe_get_indexed_by_int32" ++ ; "caml_array_unsafe_get_indexed_by_nativeint" + ] + `Mutable + (fun cx cy _ -> Mlvalue.Array.field cx cy); +@@ -1160,6 +1163,8 @@ + ; "caml_int32_to_float" + ; "caml_nativeint_of_int" + ; "caml_nativeint_to_int" ++ ; "caml_checked_nativeint_to_int" ++ ; "caml_checked_int32_to_int" + ; "caml_nativeint_to_int32" + ; "caml_nativeint_of_int32" + ; "caml_nativeint_to_float" +@@ -1246,6 +1251,8 @@ + ; "caml_array_unsafe_set_float" + ; "caml_floatarray_unsafe_set" + ; "caml_array_unsafe_set_addr" ++ ; "caml_array_unsafe_set_indexed_by_int32" ++ ; "caml_array_unsafe_set_indexed_by_nativeint" + ] + `Mutator + (fun cx cy cz _ -> J.EBin (J.Eq, Mlvalue.Array.field cx cy, cz)); +--- a/compiler/lib/specialize_js.ml ++++ b/compiler/lib/specialize_js.ml +@@ -303,6 +303,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_get_indexed_by_int32" ++ | "caml_array_get_indexed_by_int64" ++ | "caml_array_get_indexed_by_nativeint") ++ as prim) ++ , [ y; z ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_get_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_get_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_get_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_get] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_get", [ y; Pv z' ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_get" + | "caml_array_get_float" + | "caml_floatarray_get" +@@ -349,6 +375,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_set_indexed_by_int32" ++ | "caml_array_set_indexed_by_int64" ++ | "caml_array_set_indexed_by_nativeint") ++ as prim) ++ , [ y; z; w ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_set_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_set_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_set_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_set] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_set", [ y; Pv z'; w ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_set" + | "caml_array_set_float" + | "caml_floatarray_set" +--- a/runtime/js/bigarray.js ++++ b/runtime/js/bigarray.js +@@ -43,6 +43,7 @@ + } + + //Provides: caml_unpackFloat16 ++//Alias: caml_double_of_float16 + var caml_unpackFloat16 = (function () { + var pow = Math.pow; + +@@ -73,6 +74,7 @@ + })(); + + //Provides: caml_packFloat16 ++//Alias: caml_float16_of_double + var caml_packFloat16 = (function () { + const INVERSE_OF_EPSILON = 1 / Number.EPSILON; + +@@ -549,6 +551,8 @@ + } + + //Provides: caml_ba_uint8_get16 ++//Alias: caml_ba_uint8_get16_indexed_by_int32 ++//Alias: caml_ba_uint8_get16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get16(ba, i0) { + var ofs = ba.offset(i0); +@@ -558,7 +562,15 @@ + return b1 | (b2 << 8); + } + ++//Provides: caml_ba_uint8_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get16 ++function caml_ba_uint8_get16_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get32 ++//Alias: caml_ba_uint8_get32_indexed_by_int32 ++//Alias: caml_ba_uint8_get32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get32(ba, i0) { + var ofs = ba.offset(i0); +@@ -570,7 +582,15 @@ + return (b1 << 0) | (b2 << 8) | (b3 << 16) | (b4 << 24); + } + ++//Provides: caml_ba_uint8_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get32 ++function caml_ba_uint8_get32_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get64 ++//Alias: caml_ba_uint8_get64_indexed_by_int32 ++//Alias: caml_ba_uint8_get64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_of_bytes + function caml_ba_uint8_get64(ba, i0) { + var ofs = ba.offset(i0); +@@ -586,6 +606,12 @@ + return caml_int64_of_bytes([b8, b7, b6, b5, b4, b3, b2, b1]); + } + ++//Provides: caml_ba_uint8_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get64 ++function caml_ba_uint8_get64_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_get_1 + function caml_ba_get_1(ba, i0) { + return ba.get(ba.offset(i0)); +@@ -609,6 +635,8 @@ + } + + //Provides: caml_ba_uint8_set16 ++//Alias: caml_ba_uint8_set16_indexed_by_int32 ++//Alias: caml_ba_uint8_set16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set16(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -618,7 +646,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set16 ++function caml_ba_uint8_set16_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set16(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set32 ++//Alias: caml_ba_uint8_set32_indexed_by_int32 ++//Alias: caml_ba_uint8_set32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set32(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -630,7 +666,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set32 ++function caml_ba_uint8_set32_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set32(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set64 ++//Alias: caml_ba_uint8_set64_indexed_by_int32 ++//Alias: caml_ba_uint8_set64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_to_bytes + function caml_ba_uint8_set64(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -640,6 +684,12 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set64 ++function caml_ba_uint8_set64_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set64(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_set_1 + function caml_ba_set_1(ba, i0, v) { + ba.set(ba.offset(i0), v); +--- a/runtime/js/float32.js ++++ b/runtime/js/float32.js +@@ -375,36 +375,78 @@ + let caml_ba_float32_set_3 = caml_ba_set_3 + + //Provides: caml_ba_uint8_getf32 ++//Alias: caml_ba_uint8_getf32_indexed_by_int32 ++//Alias: caml_ba_uint8_getf32_indexed_by_nativeint + //Requires: caml_ba_uint8_get32, caml_int32_float_of_bits + function caml_ba_uint8_getf32(ba, i0) { + return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); + } + ++//Provides: caml_ba_uint8_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_getf32 ++function caml_ba_uint8_getf32_indexed_by_int64(ba, i) { ++ return caml_ba_uint8_getf32(ba, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_setf32 ++//Alias: caml_ba_uint8_setf32_indexed_by_int32 ++//Alias: caml_ba_uint8_setf32_indexed_by_nativeint + //Requires: caml_ba_uint8_set32, caml_int32_bits_of_float + function caml_ba_uint8_setf32(ba, i0, v) { + return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); + } + ++//Provides: caml_ba_uint8_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_setf32 ++function caml_ba_uint8_setf32_indexed_by_int64(ba, i, v) { ++ return caml_ba_uint8_setf32(ba, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_string_getf32 ++//Alias: caml_string_getf32_indexed_by_int32 ++//Alias: caml_string_getf32_indexed_by_nativeint + //Requires: caml_string_get32, caml_int32_float_of_bits + function caml_string_getf32(s, i) { + return caml_int32_float_of_bits(caml_string_get32(s, i)); + } + ++//Provides: caml_string_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_getf32 ++function caml_string_getf32_indexed_by_int64(s, i) { ++ return caml_string_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_getf32 ++//Alias: caml_bytes_getf32_indexed_by_int32 ++//Alias: caml_bytes_getf32_indexed_by_nativeint + //Requires: caml_bytes_get32, caml_int32_float_of_bits + function caml_bytes_getf32(s, i) { + return caml_int32_float_of_bits(caml_bytes_get32(s, i)); + } + ++//Provides: caml_bytes_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_getf32 ++function caml_bytes_getf32_indexed_by_int64(s, i) { ++ return caml_bytes_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_setf32 ++//Alias: caml_bytes_setf32_indexed_by_int32 ++//Alias: caml_bytes_setf32_indexed_by_nativeint + //Requires: caml_bytes_set32, caml_int32_bits_of_float + function caml_bytes_setf32(s, i, f32) { + return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); + } + ++//Provides: caml_bytes_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_setf32 ++function caml_bytes_setf32_indexed_by_int64(s, i, f32) { ++ return caml_bytes_setf32(s, caml_checked_int64_to_int(i), f32) ++} ++ + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_failwith + //If: js-string + function caml_string_setf32(s, i, f32) { +@@ -412,8 +454,16 @@ + } + + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_bytes_setf32 + //If: !js-string + function caml_string_setf32(s, i, f32) { + return caml_bytes_setf32(s, i, f32); + } ++ ++//Provides: caml_string_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_setf32 ++function caml_string_setf32_indexed_by_int64(s, i, f32) { ++ return caml_string_setf32(s, caml_checked_int64_to_int(i), f32) ++} +--- a/runtime/js/int64.js ++++ b/runtime/js/int64.js +@@ -352,6 +352,27 @@ + return x.toInt(); + } + ++//Provides: caml_checked_int64_to_int const ++//Requires: caml_int64_of_int32, caml_failwith ++function caml_checked_int64_to_int (x) { ++ if (x.compare(caml_int64_of_int32(0x7FFFFFFF)) == 1 ++ || x.compare(caml_int64_of_int32(0x80000000)) == -1) ++ caml_failwith("error while converting from int64") ++ return x.toInt() ++} ++ ++//Provides: caml_array_unsafe_get_indexed_by_int64 (mutable, const) ++//Requires: caml_int64_to_int32, caml_array_get ++function caml_array_unsafe_get_indexed_by_int64 (array, index) { ++ return caml_array_get(array, caml_int64_to_int32(index)); ++} ++ ++//Provides: caml_array_unsafe_set_indexed_by_int64 (mutable, const, mutable) ++//Requires: caml_int64_to_int32, caml_array_set ++function caml_array_unsafe_set_indexed_by_int64 (array, index, newval) { ++ return caml_array_set(array, caml_int64_to_int32(index), newval) ++} ++ + //Provides: caml_int64_to_float const + function caml_int64_to_float(x) { + return x.toFloat(); +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -251,6 +251,8 @@ + } + + //Provides: caml_string_get16 ++//Alias: caml_string_get16_indexed_by_int32 ++//Alias: caml_string_get16_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get16(s, i) { +@@ -260,7 +262,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_string_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get16 ++function caml_string_get16_indexed_by_int64(s, i) { ++ return caml_string_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get16 ++//Alias: caml_bytes_get16_indexed_by_int32 ++//Alias: caml_bytes_get16_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get16(s, i) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -269,7 +279,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get16 ++function caml_bytes_get16_indexed_by_int64(s, i) { ++ return caml_bytes_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get32 ++//Alias: caml_string_get32_indexed_by_int32 ++//Alias: caml_string_get32_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get32(s, i) { +@@ -281,7 +299,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_string_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get32 ++function caml_string_get32_indexed_by_int64(s, i) { ++ return caml_string_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get32 ++//Alias: caml_bytes_get32_indexed_by_int32 ++//Alias: caml_bytes_get32_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get32(s, i) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -292,7 +318,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get32 ++function caml_bytes_get32_indexed_by_int64(s, i) { ++ return caml_bytes_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get64 ++//Alias: caml_string_get64_indexed_by_int32 ++//Alias: caml_string_get64_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_int64_of_bytes + //Requires: caml_ml_string_length +@@ -305,7 +339,15 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_string_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get64 ++function caml_string_get64_indexed_by_int64(s, i) { ++ return caml_string_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get64 ++//Alias: caml_bytes_get64_indexed_by_int32 ++//Alias: caml_bytes_get64_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + //Requires: caml_int64_of_bytes + function caml_bytes_get64(s, i) { +@@ -317,6 +359,12 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_bytes_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get64 ++function caml_bytes_get64_indexed_by_int64(s, i) { ++ return caml_bytes_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_get + function caml_bytes_get(s, i) { +@@ -340,6 +388,8 @@ + } + + //Provides: caml_bytes_set16 ++//Alias: caml_bytes_set16_indexed_by_int32 ++//Alias: caml_bytes_set16_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set16(s, i, i16) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -350,7 +400,15 @@ + return 0; + } + ++//Provides: caml_bytes_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set16 ++function caml_bytes_set16_indexed_by_int64(s, i, i16) { ++ return caml_bytes_set16(s, caml_checked_int64_to_int(i), i16) ++} ++ + //Provides: caml_bytes_set32 ++//Alias: caml_bytes_set32_indexed_by_int32 ++//Alias: caml_bytes_set32_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set32(s, i, i32) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -365,7 +423,15 @@ + return 0; + } + ++//Provides: caml_bytes_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set32 ++function caml_bytes_set32_indexed_by_int64(s, i, i32) { ++ return caml_bytes_set32(s, caml_checked_int64_to_int(i), i32) ++} ++ + //Provides: caml_bytes_set64 ++//Alias: caml_bytes_set64_indexed_by_int32 ++//Alias: caml_bytes_set64_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + //Requires: caml_int64_to_bytes + function caml_bytes_set64(s, i, i64) { +@@ -377,6 +443,12 @@ + return 0; + } + ++//Provides: caml_bytes_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set64 ++function caml_bytes_set64_indexed_by_int64(s, i, i64) { ++ return caml_bytes_set64(s, caml_checked_int64_to_int(i), i64) ++} ++ + //Provides: caml_bytes_set + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set(s, i, c) { +--- a/runtime/wasm/bigarray.wat ++++ b/runtime/wasm/bigarray.wat +@@ -90,6 +90,8 @@ + (func $Int32_val (param (ref eq)) (result i32))) + (import "int32" "caml_copy_nativeint" + (func $caml_copy_nativeint (param i32) (result (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + (import "int64" "caml_copy_int64" + (func $caml_copy_int64 (param i64) (result (ref eq)))) + (import "int64" "Int64_val" +@@ -176,7 +178,9 @@ + (field $ba_kind i8) ;; kind + (field $ba_layout i8)))) ;; layout + +- (func $double_to_float16 (param $f f64) (result i32) ++ (func $double_to_float16 ++ (export "caml_float16_of_double") ++ (param $f f64) (result i32) + (local $x i32) (local $sign i32) (local $o i32) + (local.set $x (i32.reinterpret_f32 (f32.demote_f64 (local.get $f)))) + (local.set $sign (i32.and (local.get $x) (i32.const 0x80000000))) +@@ -206,7 +210,9 @@ + (i32.const 13))))))) + (i32.or (local.get $o) (i32.shr_u (local.get $sign) (i32.const 16)))) + +- (func $float16_to_double (param $d i32) (result f64) ++ (func $float16_to_double ++ (export "caml_double_of_float16") ++ (param $d i32) (result f64) + (local $f f32) + (local.set $f + (f32.mul +@@ -2009,125 +2015,207 @@ + (br $loop)))) + (return (i32.const 0))) + +- (func (export "caml_ba_uint8_get16") +- (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (func $caml_ba_uint8_get16_indexed_by_int32 ++ (export "caml_ba_uint8_get16_indexed_by_int32") ++ (export "caml_ba_uint8_get16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $p)))) ++ (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get32") +- (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (func (export "caml_ba_uint8_get16") ++ (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get32_indexed_by_int32 ++ (export "caml_ba_uint8_get32_indexed_by_int32") ++ (export "caml_ba_uint8_get32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i32) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (return_call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (return_call $ta_get32_ui8 (local.get $data) (local.get $i))) ++ ++ (func (export "caml_ba_uint8_get32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get64") +- (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (func (export "caml_ba_uint8_get32") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get64_indexed_by_int32 ++ (export "caml_ba_uint8_get64_indexed_by_int32") ++ (export "caml_ba_uint8_get64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i64) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) + (i64.or + (i64.extend_i32_u +- (call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (call $ta_get32_ui8 (local.get $data) (local.get $i))) + (i64.shl (i64.extend_i32_u + (call $ta_get32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)))) + +- (func (export "caml_ba_uint8_set16") +- (param $vba (ref eq)) (param $i (ref eq)) (param $v (ref eq)) ++ (func (export "caml_ba_uint8_get64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get64") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_set16_indexed_by_int32 ++ (export "caml_ba_uint8_set16_indexed_by_int32") ++ (export "caml_ba_uint8_set16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $v (ref eq)) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) (local $d (ref i31)) ++ (local $d (ref i31)) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) + (local.set $d (ref.cast (ref i31) (local.get $v))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set16_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set16_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set32") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) ++ (func (export "caml_ba_uint8_set16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set16") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set32_indexed_by_int32 ++ (export "caml_ba_uint8_set32_indexed_by_int32") ++ (export "caml_ba_uint8_set32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i32) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set64") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) ++ (func (export "caml_ba_uint8_set32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set32") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set64_indexed_by_int32 ++ (export "caml_ba_uint8_set64_indexed_by_int32") ++ (export "caml_ba_uint8_set64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i64) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) + (i32.wrap_i64 (local.get $d))) + (call $ta_set32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $d) (i64.const 32)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_ba_uint8_set64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set64") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ + (export "caml_bytes_of_uint8_array" (func $caml_string_of_uint8_array)) + (func $caml_string_of_uint8_array (export "caml_string_of_uint8_array") + (param (ref eq)) (result (ref eq)) +--- a/runtime/wasm/float32.wat ++++ b/runtime/wasm/float32.wat +@@ -41,14 +41,34 @@ + (func $caml_ba_set_3 (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)))) + (import "bigarray" "caml_ba_uint8_get32" + (func $caml_ba_uint8_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int32" ++ (func $caml_ba_uint8_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int64" ++ (func $caml_ba_uint8_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "bigarray" "caml_ba_uint8_set32" + (func $caml_ba_uint8_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int32" ++ (func $caml_ba_uint8_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int64" ++ (func $caml_ba_uint8_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "string" "caml_string_get32" + (func $caml_string_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int32" ++ (func $caml_string_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int64" ++ (func $caml_string_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_get32" + (func $caml_bytes_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int32" ++ (func $caml_bytes_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int64" ++ (func $caml_bytes_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_set32" + (func $caml_bytes_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int32" ++ (func $caml_bytes_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int64" ++ (func $caml_bytes_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "array" "caml_make_vect" + (func $caml_make_vect (param (ref eq)) (param (ref eq)) (result (ref eq)))) + +@@ -686,23 +706,87 @@ + (call $box_float32 (f32.reinterpret_i32 + (call $caml_ba_uint8_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_ba_uint8_getf32_indexed_by_int32 ++ (export "caml_ba_uint8_getf32_indexed_by_int32") ++ (export "caml_ba_uint8_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_ba_uint8_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_ba_uint8_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_ba_uint8_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ++ (func $caml_ba_uint8_setf32_indexed_by_int32 ++ (export "caml_ba_uint8_setf32_indexed_by_int32") ++ (export "caml_ba_uint8_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_ba_uint8_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ + (func (export "caml_string_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_string_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_string_getf32_indexed_by_int32 ++ (export "caml_string_getf32_indexed_by_int32") ++ (export "caml_string_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_string_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_bytes_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_bytes_getf32_indexed_by_int32 ++ (export "caml_bytes_getf32_indexed_by_int32") ++ (export "caml_bytes_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_bytes_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func $caml_bytes_setf32_indexed_by_int32 ++ (export "caml_bytes_setf32_indexed_by_int32") ++ (export "caml_bytes_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_bytes_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ) +--- a/runtime/wasm/int32.wat ++++ b/runtime/wasm/int32.wat +@@ -124,6 +124,21 @@ + (call $parse_int + (local.get $v) (i32.const 32) (global.get $INT32_ERRMSG)))) + ++ (data $integer_conversion_error "error while converting from int32") ++ ++ (func $caml_checked_int32_to_int (export "caml_checked_int32_to_int") ++ (param i32) (result (ref eq)) ++ (if (i32.or (i32.gt_s (local.get 0) (i32.const 0x3FFFFFFF)) ++ (i32.lt_s (local.get 0) (i32.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (local.get 0))) ++ ++ (func $caml_checked_nativeint_to_int (export "caml_checked_nativeint_to_int") ++ (param i32) (result (ref eq)) ++ (call $caml_checked_int32_to_int (local.get 0))) ++ + (export "caml_nativeint_compare" (func $caml_int32_compare)) + (func $caml_int32_compare (export "caml_int32_compare") + (param $i1 i32) (param $i2 i32) (result (ref eq)) +@@ -177,4 +192,6 @@ + (return_call $format_int (local.get 0) + (struct.get $int32 1 + (ref.cast (ref $int32) (local.get 1))) (i32.const 0))) ++ ++ + ) +--- a/runtime/wasm/int64.wat ++++ b/runtime/wasm/int64.wat +@@ -317,4 +317,26 @@ + (local.get $uppercase))))))))) + (local.get $s)) + ++ (data $integer_conversion_error "error while converting from int64") ++ ++ (func $caml_checked_int64_to_int (export "caml_checked_int64_to_int") ++ (param (ref eq)) (result (ref eq)) ++ (local $i i64) ++ (local.set $i ++ (struct.get $int64 1 (ref.cast (ref $int64) (local.get 0)))) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (i32.wrap_i64 (local.get $i)))) ++ ++ (func (export "caml_checked_int64_to_int32") ++ (param $i i64) (result i32) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (i32.wrap_i64 (local.get $i))) + ) +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -19,6 +19,8 @@ + (import "fail" "caml_bound_error" (func $caml_bound_error)) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param $arg (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + + (type $bytes (array (mut i8))) + +@@ -153,171 +155,274 @@ + (i31.get_u (ref.cast (ref i31) (local.get $len)))) + (ref.i31 (i32.const 0))) + +- (export "caml_string_get16" (func $caml_bytes_get16)) +- (func $caml_bytes_get16 (export "caml_bytes_get16") +- (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int32 ++ (export "caml_bytes_get16_indexed_by_int32") ++ (export "caml_bytes_get16_indexed_by_nativeint") ++ (export "caml_string_get16_indexed_by_int32") ++ (export "caml_string_get16_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (ref.i31 (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))))) + +- (export "caml_string_get32" (func $caml_bytes_get32)) +- (func $caml_bytes_get32 (export "caml_bytes_get32") +- (param $v (ref eq)) (param $i (ref eq)) (result i32) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int64 ++ (export "caml_bytes_get16_indexed_by_int64") ++ (export "caml_string_get16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get16 ++ (export "caml_bytes_get16") ++ (export "caml_string_get16") ++ (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get32_indexed_by_int32 ++ (export "caml_bytes_get32_indexed_by_int32") ++ (export "caml_bytes_get32_indexed_by_nativeint") ++ (export "caml_string_get32_indexed_by_int32") ++ (export "caml_string_get32_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i32) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i32.or + (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))) + (i32.or + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2))) ++ (i32.add (local.get $i) (i32.const 2))) + (i32.const 16)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3))) ++ (i32.add (local.get $i) (i32.const 3))) + (i32.const 24))))) + +- (export "caml_string_get64" (func $caml_bytes_get64)) +- (func $caml_bytes_get64 (export "caml_bytes_get64") +- (param $v (ref eq)) (param $i (ref eq)) (result i64) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get32_indexed_by_int64 ++ (export "caml_bytes_get32_indexed_by_int64") ++ (export "caml_string_get32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get32 ++ (export "caml_bytes_get32") ++ (export "caml_string_get32") ++ (param $v (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get64_indexed_by_int32 ++ (export "caml_bytes_get64_indexed_by_int32") ++ (export "caml_bytes_get64_indexed_by_nativeint") ++ (export "caml_string_get64_indexed_by_int32") ++ (export "caml_string_get64_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i64) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i64.or + (i64.or + (i64.or + (i64.extend_i32_u +- (array.get_u $bytes (local.get $s) (local.get $p))) ++ (array.get_u $bytes (local.get $s) (local.get $i))) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)))) ++ (i32.add (local.get $i) (i32.const 1)))) + (i64.const 8))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)))) ++ (i32.add (local.get $i) (i32.const 2)))) + (i64.const 16)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)))) ++ (i32.add (local.get $i) (i32.const 3)))) + (i64.const 24)))) + (i64.or + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)))) ++ (i32.add (local.get $i) (i32.const 5)))) + (i64.const 40))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)))) ++ (i32.add (local.get $i) (i32.const 6)))) + (i64.const 48)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)))) ++ (i32.add (local.get $i) (i32.const 7)))) + (i64.const 56)))))) + +- (func (export "caml_bytes_set16") +- (param (ref eq) (ref eq) (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) (local $v i32) ++ (func $caml_bytes_get64_indexed_by_int64 ++ (export "caml_bytes_get64_indexed_by_int64") ++ (export "caml_string_get64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get64 ++ (export "caml_bytes_get64") ++ (export "caml_string_get64") ++ (param $v (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_bytes_set16_indexed_by_int32 ++ (export "caml_bytes_set16_indexed_by_int32") ++ (export "caml_bytes_set16_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param (ref eq)) (result (ref eq)) ++ (local $s (ref $bytes)) (local $v i32) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $v (i31.get_s (ref.cast (ref i31) (local.get 2)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set32") +- (param (ref eq)) (param (ref eq)) (param $v i32) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set16") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set32_indexed_by_int32 ++ (export "caml_bytes_set32_indexed_by_int32") ++ (export "caml_bytes_set32_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.shr_u (local.get $v) (i32.const 16))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.shr_u (local.get $v) (i32.const 24))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set64") +- (param (ref eq)) (param (ref eq)) (param $v i64) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set32") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set64_indexed_by_int32 ++ (export "caml_bytes_set64_indexed_by_int32") ++ (export "caml_bytes_set64_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i64) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) ++ (array.set $bytes (local.get $s) (local.get $i) + (i32.wrap_i64 (local.get $v))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 8)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 16)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 24)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 32)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)) ++ (i32.add (local.get $i) (i32.const 5)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 40)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)) ++ (i32.add (local.get $i) (i32.const 6)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 48)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)) ++ (i32.add (local.get $i) (i32.const 7)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 56)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_bytes_set64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set64") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ + (func (export "caml_string_concat") + (param $vs1 (ref eq)) (param $vs2 (ref eq)) (result (ref eq)) + (local $s1 (ref $bytes)) (local $s2 (ref $bytes)) diff --git a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/opam b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/opam index 44a1fcc3ba..f3b8c5fa84 100644 --- a/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/opam +++ b/packages/js_of_ocaml/js_of_ocaml.6.0.1+ox/opam @@ -19,7 +19,7 @@ depends: [ "ppxlib" {= "0.33.0+ox"} "num" {with-test} "ppx_expect" {>= "v0.14.2" & with-test} - "re" {>= "1.9.0" & with-test} + "re" {>= "1.9.0" & with-test & = "1.14.0+ox"} "odoc" {with-doc} ] build: [ @@ -30,9 +30,9 @@ dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git" x-commit-hash: "b6d60e4f8ff35e7c7b3bb52b97ffedc3eb8e3d08" url { src: - "https://github.com/ocsigen/js_of_ocaml/archive/a8e8d2c1696a5fb3ddb4fe15495b1a8625a29b4b.tar.gz" + "https://github.com/ocsigen/js_of_ocaml/archive/246df644334aa97103d1051aec128337ea1868f9.tar.gz" checksum: - "sha256=b1e1ebd799547b33eec43b4d934bfde475b0ff4d20eba36d36147ee6d8db173c" + "sha256=c43572970512140facf02a30f16d4b34c10d55326bbd3d3c125bc2e549ef4ab8" } patches: [ "js_of_ocaml-magic_number.ml.patch" @@ -42,6 +42,7 @@ patches: [ "js_of_ocaml-add-unboxed-and-float-block.patch" "js_of_ocaml-ident-is_global.patch" "js_of_ocaml-remove-float-externals.patch" + "js_of_ocaml-ocaml_version-ppx.patch" "js_of_ocaml-test-diffs-caused-by-build-differences.patch" "js_of_ocaml-fix-build_fs.patch" "js_of_ocaml-iarray-primitives.patch" @@ -51,17 +52,13 @@ patches: [ "js_of_ocaml-caml_provides_sub_local.patch" "js_of_ocaml-caml_hash_exn.patch" "wasm_of_ocaml-bring-back-eval.patch" - "js_of_ocaml-index-by-unboxed-int.patch" "js_of_ocaml-mixed-block-bytecode-op.patch" "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" "js_of_ocaml-int_u-array-primitives.patch" - "js_of_ocaml-n-ary-functions.patch" "js_of_ocaml-symtable-5.2-api.patch" - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" "js_of_ocaml-jane-street-5.2-compatibility.patch" "js_of_ocaml-migrate-labeled-tuples-shims.patch" "js_of_ocaml-floatarray_create_local.patch" - "wasm_of_ocaml-sourcemap-contents.patch" "js_of_ocaml-jane-street-const_null-support.patch" "js_of_ocaml-float32.patch" "js_of_ocaml-caml_array_append.patch" @@ -69,21 +66,30 @@ patches: [ "js_of_ocaml-5.3-tests-runtime.patch" "js_of_ocaml-caml_bigstring_strncmp.patch" "wasm_of_ocaml-stub-caml_ml_set_channel_refill.patch" - "js_of_ocaml-version-directive-removal.patch" + "js_of_ocaml-no-compression-module-5.2.patch" "js_of_ocaml-obj_stubs.patch" - "js_of_ocaml-float32-2.patch" + "js_of_ocaml-global_deadcode-fix.patch" + "js_of_ocaml-local-bytes.patch" + "js_of_ocaml-n-ary-functions.patch" + "js_of_ocaml-optcomp_lite_fixes.patch" + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "js_of_ocaml-gh2034.patch" + "js_of_ocaml-unboxed-indexing.patch" + "js_of_ocaml-atomics.patch" + "js_of_ocaml-flipped-conditions-in-test.patch" + "js_of_ocaml-atomic-cmpxchg.patch" + "js_of_ocaml-small-int-literals.patch" "dune.patch" - "js_of_ocaml-top-effects.patch" - "js_of_ocaml-toplevel.patch" ] extra-files: [ [ "js_of_ocaml-magic_number.ml.patch" - "sha256=7feef837352414b5f102705c01915da98c3186f3559d92e94b63ad912c11dddd" + "sha256=05e204eac0338a76ca02db89ebb9505d80a7e268b93b746408356be913e219e6" ] [ "js_of_ocaml-compilation_unit-name.patch" - "sha256=63ebbb630149ade7f377dc8940d58968d7a44cef4911d67fc49a7fe10446eb1f" + "sha256=1e00a73f66cbaa87eefb45702eaaf431978f8eb9ed95684c781b0ebb035d1a7f" ] [ "js_of_ocaml-with_async_exns.patch" @@ -95,7 +101,7 @@ extra-files: [ ] [ "js_of_ocaml-add-unboxed-and-float-block.patch" - "sha256=625447650ca1c56f597000c3a7191309d1f1ed795f3670bc367d6383a07fc07e" + "sha256=db409edb2be9be828015b6722fb51d7bccdd1e4a7edf982b5c8d89808713af7b" ] [ "js_of_ocaml-ident-is_global.patch" @@ -103,19 +109,23 @@ extra-files: [ ] [ "js_of_ocaml-remove-float-externals.patch" - "sha256=a3aa95ee08210377c1470e5bf0f832bc27ad98299bca22c7a88eb9fd6c32e655" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-ocaml_version-ppx.patch" + "sha256=df6bcb6da8aa3dfd6bd0a178679987d41c400ec1803f4a66659cfc822d1b280f" ] [ "js_of_ocaml-test-diffs-caused-by-build-differences.patch" - "sha256=00d38ead67c67220351605d72c2b3a4e3faa8053087ef8ab47b7067b42900ba9" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-fix-build_fs.patch" - "sha256=6373ba10c70f77a2c5999bfec2484657a32450e44a3dfb04ce6bcaa05464d890" + "sha256=abaa404bf23a77cf1badfe30ab9fcc13c6fb0446a81fa10b0962ed1ba9005d6a" ] [ "js_of_ocaml-iarray-primitives.patch" - "sha256=1cefd949dad720858306c87e349dd927c402f292d7b7c770542f0b28bc8dc1b8" + "sha256=037ad55684c9ac3801ff284839d8bb1290d2e750cd4bcb03b75e5f4ab69559c9" ] [ "js_of_ocaml-important-config-changes.patch" @@ -123,7 +133,7 @@ extra-files: [ ] [ "js_of_ocaml-internal-ocaml-5-compatibility.patch" - "sha256=60cef558cd8c6ec4679c02e38e97933c9427d7de5e18bc151a60b4be9512fb36" + "sha256=6b7e17df7f0142158eca19a953422eb6eaf97a3f7f3f2443648bfd069fbcb90f" ] [ "js_of_ocaml-wasm-temp-differences.patch" @@ -141,13 +151,9 @@ extra-files: [ "wasm_of_ocaml-bring-back-eval.patch" "sha256=c413d9617e1122a9fdad8f1f63859bdf9f17a8440f78bdfbaecc432bae580fac" ] - [ - "js_of_ocaml-index-by-unboxed-int.patch" - "sha256=9983ff547de81845e0da06da547c6191671a72a5e1b321594b6d326b0e079e80" - ] [ "js_of_ocaml-mixed-block-bytecode-op.patch" - "sha256=289db81bcf2d12c5aa98e7cc14d4831eac38ba4795da862a4a78ed771c3c8ad9" + "sha256=ed6cfee285491515d497e8871c8534236e9a77939c3838dfd5b3fdb20626e347" ] [ "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" @@ -157,18 +163,10 @@ extra-files: [ "js_of_ocaml-int_u-array-primitives.patch" "sha256=99eba4301613d03e0305017a687c768bd24a22cef0db25ab62cbc3d304f647ba" ] - [ - "js_of_ocaml-n-ary-functions.patch" - "sha256=0f6c5da3756755db191492701c2df598426cdf57254b5366798dbd1f893e7e90" - ] [ "js_of_ocaml-symtable-5.2-api.patch" "sha256=9a999950e8984cc582e3830f447111e1082dc720609334de66a011347d26da9b" ] - [ - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" - "sha256=66afc6da651cd22984aec74f64ad6aaf1b211c6ce5a070fe444377cdaa44f14a" - ] [ "js_of_ocaml-jane-street-5.2-compatibility.patch" "sha256=45391a7a7da6c5bfbe97ec1272cb369d533c2d95cf7a7a56d754db94871eb043" @@ -181,17 +179,13 @@ extra-files: [ "js_of_ocaml-floatarray_create_local.patch" "sha256=f17e392acc941dde475cb7be0654037df9b8d550aeae0d96b65394e4c4a1d4ca" ] - [ - "wasm_of_ocaml-sourcemap-contents.patch" - "sha256=93b7dddf6313836ce02fbe762c40380e20daefdd8b87ec885ee0f4ef779ad76b" - ] [ "js_of_ocaml-jane-street-const_null-support.patch" "sha256=e708cdc01c0cef3fce1cb9f31b33324977dcca1c166601905fcac1ef10262c3a" ] [ "js_of_ocaml-float32.patch" - "sha256=5f83c34b274dd002e28ace3a93c7beca470bfb85d0037da5e090dcc05a792a20" + "sha256=8d6ebad1481711f57c5ed6dd36187b96ce8fcc51cdf3b0e9d5c277687601c625" ] [ "js_of_ocaml-caml_array_append.patch" @@ -199,11 +193,11 @@ extra-files: [ ] [ "js_of_ocaml-5.2.0-compiler-changes.patch" - "sha256=f71cba10b0c5ca093aa5150cc63ee3ee5bba390b3342601f77421559d8ae14fe" + "sha256=12626322e63a8eaf68d4c8a1a1d3f428832869fae7020588e0fe40bbd8fd8cf8" ] [ "js_of_ocaml-5.3-tests-runtime.patch" - "sha256=bb46bb5c80ace0140edd40c5858c7117f27dc2d0edd869a8b3b4e90aab7199f0" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-caml_bigstring_strncmp.patch" @@ -214,27 +208,63 @@ extra-files: [ "sha256=005bce63009b9539b65036b22a7b7cc531755c7caa3cf1ed8d8697698090e136" ] [ - "js_of_ocaml-version-directive-removal.patch" - "sha256=4b1565454d0b61bc2450ab7b5fff8c5c82babc104ea6b7b9a5446eb9a929740c" + "js_of_ocaml-no-compression-module-5.2.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-obj_stubs.patch" "sha256=9e9064f255c065a3152f665bd5b464040f3cfbbd2580aa4bb6e17be9c2b7fcc8" ] [ - "js_of_ocaml-float32-2.patch" - "sha256=3ff1eda6175f96cc3a5b2c2ae1ee395c9317d248554282c5f157c723a9fae32f" + "js_of_ocaml-global_deadcode-fix.patch" + "sha256=5b49d6ee62ae87c77d88ea8022b022830f906367dc9b9ea2e582f037a739292f" ] [ - "dune.patch" - "sha256=f76da998ab76de56309bd0da3e4db1fb496d6d235d7a0ac2f78e3bafe098714e" + "js_of_ocaml-local-bytes.patch" + "sha256=1c6170fec57089f515ec71bd9873d48bd5ae9c4a85f14b80f33039cce9f232ae" ] [ - "js_of_ocaml-top-effects.patch" - "sha256=638247bd3f7bacb99612353b29c0afdcc48598c5771a52602a96baabbc141370" + "js_of_ocaml-n-ary-functions.patch" + "sha256=b9b078c1f227624cc5fc9dd574c19785354267c19299dcf2f9b9642d0114eddf" ] [ - "js_of_ocaml-toplevel.patch" - "sha256=56c305aa9ed8cb35e9a3bee9fb17aaae244522bacb54a78115b03182a746b7b2" + "js_of_ocaml-optcomp_lite_fixes.patch" + "sha256=b98305f8885c0377714677b2ca6d0d561c18bee6a8fc0d2f9d0abf52694968e0" + ] + [ + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "sha256=899ec90b4c1f5f1251d2c77fdb842f11b5a07d01430da4e5c75610d4bf541faa" + ] + [ + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "sha256=483e848b0dfe54b75c31cd990191730c0070ad8a21912b1beca97111e01a718e" + ] + [ + "js_of_ocaml-gh2034.patch" + "sha256=ec01ea15a9d21c22790ad3c93e9d68154e364462de6a2ce1dbbb62e8af25fc2d" + ] + [ + "js_of_ocaml-unboxed-indexing.patch" + "sha256=2c8b76947795fa34683e7c2bf1022a95058bde146c7832e1bd6e8a33b8d6cfc7" + ] + [ + "js_of_ocaml-atomics.patch" + "sha256=cfe956bb047c252faa2397ff2badca80972d74e1dca0cb633202313dfb8f5da4" + ] + [ + "js_of_ocaml-flipped-conditions-in-test.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-atomic-cmpxchg.patch" + "sha256=89612eb8c1e64898205c0b59c6b73987d2ff993a8c366fb61dac6db90e2806bc" + ] + [ + "js_of_ocaml-small-int-literals.patch" + "sha256=4c3fd2d3a50d220af2bdd377016e3f3354b98b770457ff200494be70bc9bb5b2" + ] + [ + "dune.patch" + "sha256=f76da998ab76de56309bd0da3e4db1fb496d6d235d7a0ac2f78e3bafe098714e" ] ] diff --git a/packages/js_of_ocaml_patches/js_of_ocaml_patches.v0.18~preview.130.36+326/opam b/packages/js_of_ocaml_patches/js_of_ocaml_patches.v0.18~preview.130.55+197/opam similarity index 83% rename from packages/js_of_ocaml_patches/js_of_ocaml_patches.v0.18~preview.130.36+326/opam rename to packages/js_of_ocaml_patches/js_of_ocaml_patches.v0.18~preview.130.55+197/opam index bc428b748c..eb98971ace 100644 --- a/packages/js_of_ocaml_patches/js_of_ocaml_patches.v0.18~preview.130.36+326/opam +++ b/packages/js_of_ocaml_patches/js_of_ocaml_patches.v0.18~preview.130.55+197/opam @@ -24,7 +24,7 @@ Additions to js_of_ocaml's standard library that are required by Jane Street lib """ url { src: - "https://github.com/janestreet/js_of_ocaml_patches/archive/2e1817a80d97f720291cc72248fc48b78ad23d96.tar.gz" + "https://github.com/janestreet/js_of_ocaml_patches/archive/789194e43fb8692779638078c603d34f86ff29cd.tar.gz" checksum: - "sha256=724263b3fbafee16394570063ef49ddf7b0c3d5300ce36301e6e4389c371689a" + "sha256=68efd90e1a95f3db6030a33aabec39658ea7da630a8540625d10c6becb3f8af8" } diff --git a/packages/jsonaf/jsonaf.v0.18~preview.130.36+326/opam b/packages/jsonaf/jsonaf.v0.18~preview.130.55+197/opam similarity index 74% rename from packages/jsonaf/jsonaf.v0.18~preview.130.36+326/opam rename to packages/jsonaf/jsonaf.v0.18~preview.130.55+197/opam index e3e9f6acc9..40dc4b6d27 100644 --- a/packages/jsonaf/jsonaf.v0.18~preview.130.36+326/opam +++ b/packages/jsonaf/jsonaf.v0.18~preview.130.55+197/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "angstrom" {>= "0.15.0"} "bigstringaf" "dune" {>= "3.17.0"} @@ -26,7 +26,7 @@ A library for parsing, manipulating, and serializing data structured as JSON. """ url { src: - "https://github.com/janestreet/jsonaf/archive/a6bf947d0510ab3b03049b67d29840462129bea4.tar.gz" + "https://github.com/janestreet/jsonaf/archive/c4c9054b7ba0800baa2095c188f0541e88b0ee76.tar.gz" checksum: - "sha256=83ee8fc9993d40bc5ff2756881e4c0f2d4293f2b8ee98a467b9c49f198235e36" + "sha256=e96f7cd3b156cc71f95579951610e23b40c2825e81ffef11b2e21fd319e4dd65" } diff --git a/packages/jsonrpc/jsonrpc.1.19.0+ox/opam b/packages/jsonrpc/jsonrpc.1.19.0+ox/opam index 759e118047..4f1d8cf056 100644 --- a/packages/jsonrpc/jsonrpc.1.19.0+ox/opam +++ b/packages/jsonrpc/jsonrpc.1.19.0+ox/opam @@ -20,9 +20,9 @@ license: "ISC" homepage: "https://github.com/ocaml/ocaml-lsp" bug-reports: "https://github.com/ocaml/ocaml-lsp/issues" depends: [ - "dune" {>= "3.0"} + "dune" {>= "3.0"} "ocaml" {>= "4.08"} - "odoc" {with-doc} + "odoc" {with-doc & <= "3.0.0"} "yojson" {>= "2.0.0" & < "3.0.0"} ] build: [ @@ -31,10 +31,13 @@ build: [ ] dev-repo: "git+https://github.com/ocaml/ocaml-lsp.git" x-commit-hash: "45f5ddac12bb580b4ecaec2d93ee7fac2c903aff" +x-opam-repository-commit-hash-at-time-of-archiving: + "08d8c16c16dc6b23a5278b06dff0ac6c7a217356" +x-reason-for-archiving: ["maintenance-intent"] url { src: - "https://github.com/oxcaml/ocaml-lsp/archive/c0a3e5d5fdffa5fc362c0c8190e4794cd731d09a.tar.gz" + "https://github.com/oxcaml/ocaml-lsp/archive/78eb8d73509e24bb7b3ac36d34a6a41c05665b1a.tar.gz" checksum: - "sha256=7d38472fa68c6aa283941f15fe4155d04164904db2a9740904b67b62ff44a282" + "sha256=9dd1e2822f0334d064c714464acf7a45188063b5f3fc69f77cab83ddfdc1edc0" } diff --git a/packages/jst-config/jst-config.v0.18~preview.130.36+326/opam b/packages/jst-config/jst-config.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/jst-config/jst-config.v0.18~preview.130.36+326/opam rename to packages/jst-config/jst-config.v0.18~preview.130.55+197/opam index 6f18c0cede..5333ce265d 100644 --- a/packages/jst-config/jst-config.v0.18~preview.130.36+326/opam +++ b/packages/jst-config/jst-config.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_assert" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_assert" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "dune-configurator" ] @@ -29,7 +29,7 @@ do not recommend using this package directly. """ url { src: - "https://github.com/janestreet/jst-config/archive/c048d2c9a9db1ba62642d11233686d2996e1d8f0.tar.gz" + "https://github.com/janestreet/jst-config/archive/5d519710f74f3c3ed9f9e5f8ffb7d918b66ee7e3.tar.gz" checksum: - "sha256=a59af32da822c6bb5ce6abf8fb005511df39ef27535262fbdcd16152993a4cb4" + "sha256=885c0e87818008dbf62a22225cebf14fb177f977eb8e90ea4a938b653eff7e0e" } diff --git a/packages/legacy_diffable/legacy_diffable.v0.18~preview.130.36+326/opam b/packages/legacy_diffable/legacy_diffable.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/legacy_diffable/legacy_diffable.v0.18~preview.130.36+326/opam rename to packages/legacy_diffable/legacy_diffable.v0.18~preview.130.55+197/opam index 363380eb9c..ac155db85f 100644 --- a/packages/legacy_diffable/legacy_diffable.v0.18~preview.130.36+326/opam +++ b/packages/legacy_diffable/legacy_diffable.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stored_reversed" {= "v0.18~preview.130.36+326"} - "streamable" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stored_reversed" {= "v0.18~preview.130.55+197"} + "streamable" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ Diffable interface. """ url { src: - "https://github.com/janestreet/legacy_diffable/archive/df30ccf2df4d698b1078a9e6b2a8c822f177d50d.tar.gz" + "https://github.com/janestreet/legacy_diffable/archive/2dccea9447e49d539425c20c78c7efad7d3929da.tar.gz" checksum: - "sha256=1d1929deedd3fab0e9b43b2dceacc7431db2ddb9aadf0e0efb445f64006c1136" + "sha256=04fefe48c14ba1ed7aa79a66e28325dc4a0f69fe3dd92b34c8f46dd9b9f3d902" } diff --git a/packages/line-up-words/line-up-words.v0.18~preview.130.36+326/opam b/packages/line-up-words/line-up-words.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/line-up-words/line-up-words.v0.18~preview.130.36+326/opam rename to packages/line-up-words/line-up-words.v0.18~preview.130.55+197/opam index 1a9158b44c..cf69673d26 100644 --- a/packages/line-up-words/line-up-words.v0.18~preview.130.36+326/opam +++ b/packages/line-up-words/line-up-words.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "patience_diff" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "re2" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "patience_diff" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "re2" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "pcre" ] @@ -30,7 +30,7 @@ It comes as a binary and an emacs mode. """ url { src: - "https://github.com/janestreet/line-up-words/archive/5c121c704abe797d7503968d07c3bf0db4e7cab8.tar.gz" + "https://github.com/janestreet/line-up-words/archive/5f3e02b4f903e22f62a1fb10c0f2c49dcf1e9197.tar.gz" checksum: - "sha256=acff305e8372b823492fef051932d3587345411df5bc57aee5d73ab42a391e9e" + "sha256=b5a28d5c2034ba067b89324be4ca496750e6db92cb2b58d6027205ac6cc68bd0" } diff --git a/packages/lsp/lsp.1.19.0+ox/opam b/packages/lsp/lsp.1.19.0+ox/opam index 700e1f5277..7a187b0f9e 100644 --- a/packages/lsp/lsp.1.19.0+ox/opam +++ b/packages/lsp/lsp.1.19.0+ox/opam @@ -41,8 +41,8 @@ dev-repo: "git+https://github.com/ocaml/ocaml-lsp.git" x-commit-hash: "45f5ddac12bb580b4ecaec2d93ee7fac2c903aff" url { src: - "https://github.com/oxcaml/ocaml-lsp/archive/c0a3e5d5fdffa5fc362c0c8190e4794cd731d09a.tar.gz" + "https://github.com/oxcaml/ocaml-lsp/archive/78eb8d73509e24bb7b3ac36d34a6a41c05665b1a.tar.gz" checksum: - "sha256=7d38472fa68c6aa283941f15fe4155d04164904db2a9740904b67b62ff44a282" + "sha256=9dd1e2822f0334d064c714464acf7a45188063b5f3fc69f77cab83ddfdc1edc0" } diff --git a/packages/lsp_rpc/lsp_rpc.v0.18~preview.130.36+326/opam b/packages/lsp_rpc/lsp_rpc.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/lsp_rpc/lsp_rpc.v0.18~preview.130.36+326/opam rename to packages/lsp_rpc/lsp_rpc.v0.18~preview.130.55+197/opam index 92bc174005..646d3753f9 100644 --- a/packages/lsp_rpc/lsp_rpc.v0.18~preview.130.36+326/opam +++ b/packages/lsp_rpc/lsp_rpc.v0.18~preview.130.55+197/opam @@ -11,12 +11,12 @@ build: [ ] depends: [ "ocaml" {>= "4.14.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_yojson_conv" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_yojson_conv" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "jsonrpc" {= "1.19.0+ox"} "lsp" {= "1.19.0+ox"} @@ -32,7 +32,7 @@ OCaml-LSP project; this library provides an Async RPC layer on top of them. """ url { src: - "https://github.com/janestreet/lsp_rpc/archive/978136a7133432b49b9055c9eac78e3b0f753588.tar.gz" + "https://github.com/janestreet/lsp_rpc/archive/329e72efb0fb1b5bc5484fbac9d63cf816ce4257.tar.gz" checksum: - "sha256=4acc2d6fe399540f3fc32fe7a5c6bc604c320d8a4fadd291514ff1ea5ec094cf" + "sha256=0bb161ed499e701a452658bda691132177c3b8925dbfe626eae9dc2fb391337c" } diff --git a/packages/lwt/lwt.5.9.2+ox/files/oxcaml-lwt.patch b/packages/lwt/lwt.5.9.2+ox/files/oxcaml-lwt.patch new file mode 100644 index 0000000000..5c4959d958 --- /dev/null +++ b/packages/lwt/lwt.5.9.2+ox/files/oxcaml-lwt.patch @@ -0,0 +1,22 @@ +diff --git a/src/unix/lwt_unix.cppo.ml b/src/unix/lwt_unix.cppo.ml +index 6fb9f8044..fe4039997 100644 +--- a/src/unix/lwt_unix.cppo.ml ++++ b/src/unix/lwt_unix.cppo.ml +@@ -1584,7 +1584,7 @@ let send ch buf pos len flags = + if pos < 0 || len < 0 || pos > Bytes.length buf - len then + invalid_arg "Lwt_unix.send" + else +- let do_send = if Sys.win32 then Unix.send else stub_send in ++ let do_send fd buf = if Sys.win32 then Unix.send fd buf else stub_send fd buf in + wrap_syscall Write ch (fun () -> do_send ch.fd buf pos len flags) + + external stub_recvfrom : Unix.file_descr -> Bytes.t -> int -> int -> Unix.msg_flag list -> int * Unix.sockaddr = "lwt_unix_recvfrom" +@@ -1602,7 +1602,7 @@ let sendto ch buf pos len flags addr = + if pos < 0 || len < 0 || pos > Bytes.length buf - len then + invalid_arg "Lwt_unix.sendto" + else +- let do_sendto = if Sys.win32 then Unix.sendto else stub_sendto in ++ let do_sendto fd buf = if Sys.win32 then Unix.sendto fd buf else stub_sendto fd buf in + wrap_syscall Write ch (fun () -> do_sendto ch.fd buf pos len flags addr) + + external stub_recv_msg : diff --git a/packages/lwt/lwt.5.9.2+ox/opam b/packages/lwt/lwt.5.9.2+ox/opam new file mode 100644 index 0000000000..2cd15a8ae1 --- /dev/null +++ b/packages/lwt/lwt.5.9.2+ox/opam @@ -0,0 +1,72 @@ +opam-version: "2.0" +version: "5.9.2+ox" +name: "lwt" +synopsis: "Promises and event-driven I/O" +description: """\ +A promise is a value that may become determined in the future. + +Lwt provides typed, composable promises. Promises that are resolved by I/O are +resolved by Lwt in parallel. + +Meanwhile, OCaml code, including code creating and waiting on promises, runs in +a single thread by default. This reduces the need for locks or other +synchronization primitives. Code can be run in parallel on an opt-in basis.""" +maintainer: [ + "Raphaël Proust " "Anton Bachin " +] +authors: ["Jérôme Vouillon" "Jérémie Dimino"] +license: "MIT" +homepage: "https://github.com/ocsigen/lwt" +doc: "https://ocsigen.org/lwt" +bug-reports: "https://github.com/ocsigen/lwt/issues" +depends: [ + "dune" {>= "3.15"} + "ocaml" {>= "4.08"} + "cppo" {build & >= "1.1"} + "ocamlfind" {dev & >= "1.7.3-1"} + "odoc" {with-doc & >= "2.3"} + "dune-configurator" + "ocplib-endian" +] +depopts: ["base-threads" "base-unix" "conf-libev"] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "exec" + "-p" + name + "src/unix/config/discover.exe" + "--" + "--save" + "--use-libev" + "%{conf-libev:installed}%" + ] + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/ocsigen/lwt.git" +url { + src: "https://github.com/ocsigen/lwt/archive/refs/tags/5.9.2.tar.gz" + checksum: [ + "md5=9687c14532a90af1098b646bde219a70" + "sha512=44ad793741a3ba52dfc07a190790d6e3207f146c42a4e1e11adc76f9d7fc9bee93d7fe18376882bb27e7e7e286be5807498884367b172a4ebc067028fa0c824c" + ] +} +x-maintenance-intent: ["(latest)"] +patches: ["oxcaml-lwt.patch"] +extra-files: [ + [ + "oxcaml-lwt.patch" + "sha256=97dbcee73e200403694c9b9fd95f9ec7a1d08428343d4d163c945e7f0c431551" + ] +] diff --git a/packages/man_in_the_middle_debugger/man_in_the_middle_debugger.v0.18~preview.130.36+326/opam b/packages/man_in_the_middle_debugger/man_in_the_middle_debugger.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/man_in_the_middle_debugger/man_in_the_middle_debugger.v0.18~preview.130.36+326/opam rename to packages/man_in_the_middle_debugger/man_in_the_middle_debugger.v0.18~preview.130.55+197/opam index 071758f6e6..fb25e6c0a2 100644 --- a/packages/man_in_the_middle_debugger/man_in_the_middle_debugger.v0.18~preview.130.36+326/opam +++ b/packages/man_in_the_middle_debugger/man_in_the_middle_debugger.v0.18~preview.130.55+197/opam @@ -13,9 +13,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "angstrom" {>= "0.15.0"} "angstrom-async" {>= "0.15.0"} "dune" {>= "3.17.0"} @@ -28,7 +28,7 @@ protocol by capturing the traffic that passes between them. """ url { src: - "https://github.com/janestreet/man_in_the_middle_debugger/archive/b2f18a09670ad136b9815b056e48d35b793858b4.tar.gz" + "https://github.com/janestreet/man_in_the_middle_debugger/archive/7cdc3af2c1687e06f2e91b89eb19b31497d82238.tar.gz" checksum: - "sha256=20e7239c5e38fc7fdc2e264d88f11aaa67637a1d6e1ba863bf52c8a6c319c8db" + "sha256=340dc41284561a94274abd7792cec052b4e7c00316de3c69023a6779575aec14" } diff --git a/packages/maybe_pushback/maybe_pushback.v0.18~preview.130.36+326/opam b/packages/maybe_pushback/maybe_pushback.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/maybe_pushback/maybe_pushback.v0.18~preview.130.36+326/opam rename to packages/maybe_pushback/maybe_pushback.v0.18~preview.130.55+197/opam index e0a42fe236..ae64a36957 100644 --- a/packages/maybe_pushback/maybe_pushback.v0.18~preview.130.36+326/opam +++ b/packages/maybe_pushback/maybe_pushback.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -29,7 +29,7 @@ yield to the scheduler. """ url { src: - "https://github.com/janestreet/maybe_pushback/archive/cb6b5b704565ebef64d61845bbe36f1568ca0947.tar.gz" + "https://github.com/janestreet/maybe_pushback/archive/abdd30154625565a32f0bfbf9e360f74ddfb80f1.tar.gz" checksum: - "sha256=5bfee32bc833f536601fbf3b35a6a9332fef40601041a1b796222472ea0a4c7e" + "sha256=0b7303fae46e4501aea07f8601153a94b52403e5faf0feaafd52f6f64adf656a" } diff --git a/packages/mdx/mdx.2.5.0+ox/opam b/packages/mdx/mdx.2.5.0+ox/opam index de59be42b2..5d55ed2312 100644 --- a/packages/mdx/mdx.2.5.0+ox/opam +++ b/packages/mdx/mdx.2.5.0+ox/opam @@ -20,7 +20,7 @@ homepage: "https://github.com/realworldocaml/mdx" bug-reports: "https://github.com/realworldocaml/mdx/issues" depends: [ "dune" {>= "3.5"} - "ocaml" {>= "4.08.0"} + "ocaml" {>= "4.08.0" & < "5.4"} "ocamlfind" "fmt" {>= "0.8.7"} "cppo" {build & >= "1.1.0"} @@ -28,7 +28,7 @@ depends: [ "astring" "logs" {>= "0.7.0"} "cmdliner" {>= "1.1.0" & < "2.0.0"} - "re" {>= "1.7.2"} + "re" {= "1.14.0+ox"} "ocaml-version" {>= "2.3.0"} "lwt" {with-test} "camlp-streams" @@ -56,6 +56,6 @@ build: [ dev-repo: "git+https://github.com/realworldocaml/mdx.git" url { src: - "git+https://github.com/oxcaml/mdx.git#aae25c16a7f093a7c23bb966951e4c73daf8b54c" + "git+https://github.com/oxcaml/mdx.git#d711549bc1d735a1995c271c12011a937cce6917" } diff --git a/packages/memtrace_viewer/memtrace_viewer.v0.18~preview.130.36+326/opam b/packages/memtrace_viewer/memtrace_viewer.v0.18~preview.130.36+326/opam deleted file mode 100644 index 5810b00662..0000000000 --- a/packages/memtrace_viewer/memtrace_viewer.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,57 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/memtrace_viewer" -bug-reports: "https://github.com/janestreet/memtrace_viewer/issues" -dev-repo: "git+https://github.com/janestreet/memtrace_viewer.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/memtrace_viewer/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_js" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_websocket" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "bonsai" {= "v0.18~preview.130.36+326"} - "bonsai_web" {= "v0.18~preview.130.36+326"} - "bonsai_web_components" {= "v0.18~preview.130.36+326"} - "codicons" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "incr_dom" {= "v0.18~preview.130.36+326"} - "incr_map" {= "v0.18~preview.130.36+326"} - "ocaml-embed-file" {= "v0.18~preview.130.36+326"} - "ppx_css" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_pattern_bind" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} - "cohttp" {>= "2.5.6"} - "cohttp-async" {>= "2.5.7" & < "3.0.0" | >= "5.1.1" & < "6.0.0"} - "dune" {>= "3.17.0"} - "js_of_ocaml" {= "6.0.1+ox"} - "js_of_ocaml-ppx" {= "6.0.1+ox"} - "memtrace" {>= "0.2.1.2"} - "uri" {>= "3.0.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "Interactive memory profiler based on Memtrace" -description: """ -Processes traces produced by the Memtrace library and displays the -top allocators in a table or flame graph. To help find space leaks, -events can be filtered by lifetime, showing only allocations of -objects that are still live at peak memory usage. -""" -url { - src: - "https://github.com/janestreet/memtrace_viewer/archive/396c8c5735a5b7a34f92cf525d069a9941041f18.tar.gz" - checksum: - "sha256=8a0826ac7fd43fd3f48595f513330939b41bebad6328144f6a9de2444a2b77b6" -} diff --git a/packages/memtrace_viewer/memtrace_viewer.v0.18~preview.130.55+197/opam b/packages/memtrace_viewer/memtrace_viewer.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..f397b0a233 --- /dev/null +++ b/packages/memtrace_viewer/memtrace_viewer.v0.18~preview.130.55+197/opam @@ -0,0 +1,57 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/memtrace_viewer" +bug-reports: "https://github.com/janestreet/memtrace_viewer/issues" +dev-repo: "git+https://github.com/janestreet/memtrace_viewer.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/memtrace_viewer/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "async" {= "v0.18~preview.130.55+197"} + "async_js" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_websocket" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "bonsai" {= "v0.18~preview.130.55+197"} + "bonsai_web" {= "v0.18~preview.130.55+197"} + "bonsai_web_components" {= "v0.18~preview.130.55+197"} + "codicons" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "incr_dom" {= "v0.18~preview.130.55+197"} + "incr_map" {= "v0.18~preview.130.55+197"} + "ocaml-embed-file" {= "v0.18~preview.130.55+197"} + "ppx_css" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_pattern_bind" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} + "cohttp" {>= "2.5.6"} + "cohttp-async" {>= "2.5.7" & < "3.0.0" | >= "5.1.1" & < "6.0.0"} + "dune" {>= "3.17.0"} + "js_of_ocaml" {= "6.0.1+ox"} + "js_of_ocaml-ppx" {= "6.0.1+ox"} + "memtrace" {>= "0.2.1.2"} + "uri" {>= "3.0.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Interactive memory profiler based on Memtrace" +description: """ +Processes traces produced by the Memtrace library and displays the +top allocators in a table or flame graph. To help find space leaks, +events can be filtered by lifetime, showing only allocations of +objects that are still live at peak memory usage. +""" +url { + src: + "https://github.com/janestreet/memtrace_viewer/archive/9a65972a537feb006362d6e58b4882f26c0704f5.tar.gz" + checksum: + "sha256=e48edc0941b1187ac7ab3a35092f7887863080805125f3e0387d722dc353d199" +} diff --git a/packages/merlin-lib/merlin-lib.5.2.1-502+ox/opam b/packages/merlin-lib/merlin-lib.5.2.1-502+ox/opam index d1e99433dc..76f116acf3 100644 --- a/packages/merlin-lib/merlin-lib.5.2.1-502+ox/opam +++ b/packages/merlin-lib/merlin-lib.5.2.1-502+ox/opam @@ -13,12 +13,12 @@ homepage: "https://github.com/ocaml/merlin" bug-reports: "https://github.com/ocaml/merlin/issues" depends: [ "ocaml" {>= "5.2" & < "5.3"} - "dune" {>= "3.0.0"} - "csexp" {>= "1.5.1"} - "alcotest" {with-test & = "1.9.0+ox"} - "menhir" {dev & >= "20201216"} - "menhirLib" {dev & >= "20201216"} - "menhirSdk" {dev & >= "20201216"} + "dune" {>= "3.0"} + "csexp" {>= "1.5.1" & <= "1.5.2"} + "alcotest" {with-test & <= "1.9.0" & = "1.9.0+ox"} + "menhir" {dev & >= "20201216" & <= "20240715"} + "menhirLib" {dev & >= "20201216" & <= "20240715"} + "menhirSdk" {dev & >= "20201216" & <= "20240715"} ] build: [ ["dune" "subst"] {dev} @@ -26,10 +26,13 @@ build: [ ] dev-repo: "git+https://github.com/ocaml/merlin.git" x-commit-hash: "0eaccc1b8520d605b1e00685e1c3f8acb5da534c" +x-opam-repository-commit-hash-at-time-of-archiving: + "08d8c16c16dc6b23a5278b06dff0ac6c7a217356" +x-reason-for-archiving: ["maintenance-intent"] url { src: - "https://github.com/oxcaml/merlin/archive/ea30d975583ede2946f0cc4950489a4f6fa33872.tar.gz" + "https://github.com/oxcaml/merlin/archive/b55ad32ea2e3367e5b78e0177bff5324a9c55517.tar.gz" checksum: - "sha256=aca9f110b46c51d71c440d87e3d0ffbfa6d71fccbc7f826ccbbcc896e84e8ffc" + "sha256=627bb415a97e93f8efe89156525f2283b24468b17b1d5268186c9eb888a89df5" } diff --git a/packages/merlin/merlin.5.2.1-502+ox/opam b/packages/merlin/merlin.5.2.1-502+ox/opam index 7fb94dd4bd..efeadd1022 100644 --- a/packages/merlin/merlin.5.2.1-502+ox/opam +++ b/packages/merlin/merlin.5.2.1-502+ox/opam @@ -76,8 +76,8 @@ dev-repo: "git+https://github.com/ocaml/merlin.git" x-commit-hash: "0eaccc1b8520d605b1e00685e1c3f8acb5da534c" url { src: - "https://github.com/oxcaml/merlin/archive/ea30d975583ede2946f0cc4950489a4f6fa33872.tar.gz" + "https://github.com/oxcaml/merlin/archive/b55ad32ea2e3367e5b78e0177bff5324a9c55517.tar.gz" checksum: - "sha256=aca9f110b46c51d71c440d87e3d0ffbfa6d71fccbc7f826ccbbcc896e84e8ffc" + "sha256=627bb415a97e93f8efe89156525f2283b24468b17b1d5268186c9eb888a89df5" } diff --git a/packages/mlt_parser/mlt_parser.v0.18~preview.130.36+326/opam b/packages/mlt_parser/mlt_parser.v0.18~preview.130.55+197/opam similarity index 73% rename from packages/mlt_parser/mlt_parser.v0.18~preview.130.36+326/opam rename to packages/mlt_parser/mlt_parser.v0.18~preview.130.55+197/opam index d1005b592b..89d0bc53ac 100644 --- a/packages/mlt_parser/mlt_parser.v0.18~preview.130.36+326/opam +++ b/packages/mlt_parser/mlt_parser.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -27,7 +27,7 @@ sessions) both to power toplevel expect tests and to support a tool that convert """ url { src: - "https://github.com/janestreet/mlt_parser/archive/74d55103e3066b7151ba6b8371b32a3a17e059d7.tar.gz" + "https://github.com/janestreet/mlt_parser/archive/bb2e3e7b56de8190d535d5f85a3daec62005b2e3.tar.gz" checksum: - "sha256=5cd4fe6ce7fdeeaaf03b8ec10c018954c1b3ad220ab243bcf964ad4c685208b5" + "sha256=87ecbd4d41d5d920b29f1946b43a5a8062c0ccfeb6fd62c85bbbaf2dfd5b1956" } diff --git a/packages/n_ary/n_ary.v0.18~preview.130.36+326/opam b/packages/n_ary/n_ary.v0.18~preview.130.55+197/opam similarity index 54% rename from packages/n_ary/n_ary.v0.18~preview.130.36+326/opam rename to packages/n_ary/n_ary.v0.18~preview.130.55+197/opam index 4da1211556..23d94fdda2 100644 --- a/packages/n_ary/n_ary.v0.18~preview.130.36+326/opam +++ b/packages/n_ary/n_ary.v0.18~preview.130.55+197/opam @@ -11,14 +11,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_enumerate" {= "v0.18~preview.130.36+326"} - "ppx_hash" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_enumerate" {= "v0.18~preview.130.55+197"} + "ppx_hash" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -32,7 +32,7 @@ implemented for N from 2 to 16, inclusive. """ url { src: - "https://github.com/janestreet/n_ary/archive/b93a519ef17fdf40378c2e47f1f9809928983dd0.tar.gz" + "https://github.com/janestreet/n_ary/archive/1bd48b563f4d166c3415415fe5fba40c690ee0ae.tar.gz" checksum: - "sha256=ca707b0f752de2d4aeabb5175c373473cc7b5b7288ac1d96c2ee3025e4bfda3d" + "sha256=da614b9ab82aa57db3b4ba9ccf14c504aafa60cad970530ad0907917653f5b7a" } diff --git a/packages/netsnmp/netsnmp.v0.18~preview.130.36+326/opam b/packages/netsnmp/netsnmp.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/netsnmp/netsnmp.v0.18~preview.130.36+326/opam rename to packages/netsnmp/netsnmp.v0.18~preview.130.55+197/opam index 1105b1c61a..3b96414a98 100644 --- a/packages/netsnmp/netsnmp.v0.18~preview.130.36+326/opam +++ b/packages/netsnmp/netsnmp.v0.18~preview.130.55+197/opam @@ -11,12 +11,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "conf-netsnmp" {>= "1.0.0"} "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "An interface to the Net-SNMP client library" @@ -29,7 +29,7 @@ depexts: [ ] url { src: - "https://github.com/janestreet/netsnmp/archive/592dcb80295fddb5f671932a1666869d5ca07d8b.tar.gz" + "https://github.com/janestreet/netsnmp/archive/e68f3a00c91d9ceec36c5c69037e0b75f0b9d779.tar.gz" checksum: - "sha256=0d4eeb37c713fee5cad081eaf9adc861b0ce27f213d28656dab01bd8ed8f768f" + "sha256=6572a96c2002613a40412319bd6170e1f7a6eac907dd662f76331fa9c77cab6e" } diff --git a/packages/nonempty_interval_lib/.generated b/packages/nonempty_interval_lib/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/nonempty_interval_lib/nonempty_interval_lib.v0.18~preview.130.55+197/opam b/packages/nonempty_interval_lib/nonempty_interval_lib.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..e4ac2d753d --- /dev/null +++ b/packages/nonempty_interval_lib/nonempty_interval_lib.v0.18~preview.130.55+197/opam @@ -0,0 +1,31 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/nonempty_interval_lib" +bug-reports: "https://github.com/janestreet/nonempty_interval_lib/issues" +dev-repo: "git+https://github.com/janestreet/nonempty_interval_lib.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/nonempty_interval_lib/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "An Interval_lib.Interval but with empty intervals disallowed." +description: """ +An interval with an extra layer of safety and more convenient accessors that return values instead of value options. +""" +url { + src: + "https://github.com/janestreet/nonempty_interval_lib/archive/a15089ff4844e7bc5f6716635d325c05dd6046d3.tar.gz" + checksum: + "sha256=5ee546a17dba8a637142acb0d059affafc9c9c8f14fc97bd2645e2204e85d2bd" +} diff --git a/packages/notty_async/notty_async.v0.18~preview.130.36+326/opam b/packages/notty_async/notty_async.v0.18~preview.130.55+197/opam similarity index 72% rename from packages/notty_async/notty_async.v0.18~preview.130.36+326/opam rename to packages/notty_async/notty_async.v0.18~preview.130.55+197/opam index 71ceceaae3..65c257e180 100644 --- a/packages/notty_async/notty_async.v0.18~preview.130.36+326/opam +++ b/packages/notty_async/notty_async.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "notty" {>= "0.2.1"} ] @@ -27,7 +27,7 @@ Async for managing concurrency. """ url { src: - "https://github.com/janestreet/notty_async/archive/823044bb78571f6c03bf31ca496f6b01b7061347.tar.gz" + "https://github.com/janestreet/notty_async/archive/d5f10f4f0611add8d99588c71a3b0247e230b591.tar.gz" checksum: - "sha256=6746667c7fe26e6ecfb592c714750ed175acd88d001407f9405a5c8702cf77e4" + "sha256=c66a6eb42c0af28e59b98b84dd22a0ea7cfee2f8070fc32af151f00404dfe6f2" } diff --git a/packages/numeric_string/numeric_string.v0.18~preview.130.36+326/opam b/packages/numeric_string/numeric_string.v0.18~preview.130.55+197/opam similarity index 83% rename from packages/numeric_string/numeric_string.v0.18~preview.130.36+326/opam rename to packages/numeric_string/numeric_string.v0.18~preview.130.55+197/opam index 763ebb48c1..0a41438cad 100644 --- a/packages/numeric_string/numeric_string.v0.18~preview.130.36+326/opam +++ b/packages/numeric_string/numeric_string.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -37,7 +37,7 @@ or punctuation, etc.) """ url { src: - "https://github.com/janestreet/numeric_string/archive/180eb0828544f1cd48c487163d78d8a7ffe80ee7.tar.gz" + "https://github.com/janestreet/numeric_string/archive/1bfbe630c04d7db16b37e392a70f277bd7c6b01b.tar.gz" checksum: - "sha256=93092daf6b9f42818350d19db7dd157609cea7a426a22fee037178b9133bd247" + "sha256=d5f65bd8efd806a1b156bf803aa8714aae011ae7b452c020a687e0896e1aa468" } diff --git a/packages/ocaml-embed-file/ocaml-embed-file.v0.18~preview.130.36+326/opam b/packages/ocaml-embed-file/ocaml-embed-file.v0.18~preview.130.55+197/opam similarity index 62% rename from packages/ocaml-embed-file/ocaml-embed-file.v0.18~preview.130.36+326/opam rename to packages/ocaml-embed-file/ocaml-embed-file.v0.18~preview.130.55+197/opam index f734752d06..cd5754d6d1 100644 --- a/packages/ocaml-embed-file/ocaml-embed-file.v0.18~preview.130.36+326/opam +++ b/packages/ocaml-embed-file/ocaml-embed-file.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -28,7 +28,7 @@ defining string constants containing the contents of those files. """ url { src: - "https://github.com/janestreet/ocaml-embed-file/archive/2396094f836c928a77fe876d448db0863bced5f0.tar.gz" + "https://github.com/janestreet/ocaml-embed-file/archive/2a85b42a92ef12d4efe986babecb785451dc576a.tar.gz" checksum: - "sha256=1fcd0faa0e813581c42195877776cef0580926a6ee8abbc4018270078c85c8db" + "sha256=9e379825370b934926f8ae140afe50880667bfd735e63a62166e9f1e9f32ce23" } diff --git a/packages/ocaml-index/ocaml-index.1.1+ox/opam b/packages/ocaml-index/ocaml-index.1.1+ox/opam index fabf2fe093..f232622dc2 100644 --- a/packages/ocaml-index/ocaml-index.1.1+ox/opam +++ b/packages/ocaml-index/ocaml-index.1.1+ox/opam @@ -37,8 +37,8 @@ dev-repo: "git+https://github.com/ocaml/merlin.git" x-commit-hash: "0eaccc1b8520d605b1e00685e1c3f8acb5da534c" url { src: - "https://github.com/oxcaml/merlin/archive/ea30d975583ede2946f0cc4950489a4f6fa33872.tar.gz" + "https://github.com/oxcaml/merlin/archive/b55ad32ea2e3367e5b78e0177bff5324a9c55517.tar.gz" checksum: - "sha256=aca9f110b46c51d71c440d87e3d0ffbfa6d71fccbc7f826ccbbcc896e84e8ffc" + "sha256=627bb415a97e93f8efe89156525f2283b24468b17b1d5268186c9eb888a89df5" } diff --git a/packages/ocaml-lsp-server/ocaml-lsp-server.1.19.0+ox/opam b/packages/ocaml-lsp-server/ocaml-lsp-server.1.19.0+ox/opam index e51f8712a4..f44e2ad7e8 100644 --- a/packages/ocaml-lsp-server/ocaml-lsp-server.1.19.0+ox/opam +++ b/packages/ocaml-lsp-server/ocaml-lsp-server.1.19.0+ox/opam @@ -25,7 +25,7 @@ depends: [ "base" {>= "v0.18~"} "lsp" {= version & = "1.19.0+ox"} "jsonrpc" {= version & = "1.19.0+ox"} - "re" {>= "1.5.0"} + "re" {= "1.14.0+ox"} "ppx_yojson_conv_lib" {>= "v0.14"} "dune-rpc" {>= "3.4.0"} "chrome-trace" {>= "3.3.0"} @@ -36,11 +36,11 @@ depends: [ "xdg" "ordering" "dune-build-info" - "spawn" + "spawn" {= "v0.15.1+ox"} "astring" "camlp-streams" "ppx_expect" {>= "v0.15.0" & < "0.17.0" & with-test} - "ocamlformat" {with-test & = "0.26.2" & = "0.26.2+ox"} + "ocamlformat" {with-test & = "0.26.2+ox" & = "0.26.2+ox"} "ocamlc-loc" {>= "3.7.0"} "pp" {>= "1.1.2"} "csexp" {>= "1.5"} @@ -64,16 +64,8 @@ dev-repo: "git+https://github.com/ocaml/ocaml-lsp.git" x-commit-hash: "45f5ddac12bb580b4ecaec2d93ee7fac2c903aff" url { src: - "https://github.com/oxcaml/ocaml-lsp/archive/c0a3e5d5fdffa5fc362c0c8190e4794cd731d09a.tar.gz" + "https://github.com/oxcaml/ocaml-lsp/archive/78eb8d73509e24bb7b3ac36d34a6a41c05665b1a.tar.gz" checksum: - "sha256=7d38472fa68c6aa283941f15fe4155d04164904db2a9740904b67b62ff44a282" + "sha256=9dd1e2822f0334d064c714464acf7a45188063b5f3fc69f77cab83ddfdc1edc0" } -patches: [ - "odoc-parser.patch" -] -extra-files: [ - [ - "odoc-parser.patch" - "sha256=e27b2c24d6f548746f171dd5b0489190ed4e0b76d58bfd509d48a819bab0c066" - ] -] + diff --git a/packages/ocaml-probes/ocaml-probes.v0.18~preview.130.36+326/opam b/packages/ocaml-probes/ocaml-probes.v0.18~preview.130.55+197/opam similarity index 81% rename from packages/ocaml-probes/ocaml-probes.v0.18~preview.130.36+326/opam rename to packages/ocaml-probes/ocaml-probes.v0.18~preview.130.55+197/opam index fba586ccd6..e86be61dd0 100644 --- a/packages/ocaml-probes/ocaml-probes.v0.18~preview.130.36+326/opam +++ b/packages/ocaml-probes/ocaml-probes.v0.18~preview.130.55+197/opam @@ -24,7 +24,7 @@ depexts: ["linux-headers"] {os-family = "alpine"} available: (arch = "x86_64" | arch = "arm64") & os = "linux" url { src: - "https://github.com/janestreet/ocaml-probes/archive/578cce64ac74ec5864cb7a95c664611dd03b5fad.tar.gz" + "https://github.com/janestreet/ocaml-probes/archive/6f4f0de23397e29fcda5b5f2811e882051c92fec.tar.gz" checksum: - "sha256=71c53ab9090fba2454e7ce1f8e747e5f028282a70b42497f9b1a1d8c66bdc11b" + "sha256=389e7364eb280ca0d7b7d208c87e66430ac967ff50eda3c71bc5d55e88f385d7" } diff --git a/packages/ocaml-variants/ocaml-variants.5.2.0+ox/files/ignore-opam.patch b/packages/ocaml-variants/ocaml-variants.5.2.0+ox/files/ignore-opam.patch index 191ea21778..8daf272b59 100644 --- a/packages/ocaml-variants/ocaml-variants.5.2.0+ox/files/ignore-opam.patch +++ b/packages/ocaml-variants/ocaml-variants.5.2.0+ox/files/ignore-opam.patch @@ -5,10 +5,10 @@ $(ocamldir)/dune.runtime_selection: if [ "$(RUNTIME_DIR)" = "runtime4" ]; then \ - echo "(dirs (:standard \ runtime debugger))" > $@; \ -+ echo "(dirs (:standard \ runtime debugger init_deps dune-3.9.3 menhir-20231231-d3d815e4f554da68b8c247241c8f8678926eecaa ocaml-4.14.2))" > $@; \ ++ echo "(dirs (:standard \ runtime debugger init_deps dune-3.20.2 menhir-20231231-d3d815e4f554da68b8c247241c8f8678926eecaa ocaml-4.14.2))" > $@; \ else \ - echo "(dirs (:standard \ runtime4 debugger4))" > $@; \ -+ echo "(dirs (:standard \ runtime4 debugger4 init_deps dune-3.9.3 menhir-20231231-d3d815e4f554da68b8c247241c8f8678926eecaa ocaml-4.14.2))" > $@; \ ++ echo "(dirs (:standard \ runtime4 debugger4 init_deps dune-3.20.2 menhir-20231231-d3d815e4f554da68b8c247241c8f8678926eecaa ocaml-4.14.2))" > $@; \ fi _build/_bootinstall: Makefile.config $(dune_config_targets) diff --git a/packages/ocaml-variants/ocaml-variants.5.2.0+ox/opam b/packages/ocaml-variants/ocaml-variants.5.2.0+ox/opam index 5c7c5f08d5..877a695ace 100644 --- a/packages/ocaml-variants/ocaml-variants.5.2.0+ox/opam +++ b/packages/ocaml-variants/ocaml-variants.5.2.0+ox/opam @@ -1,9 +1,10 @@ opam-version: "2.0" version: "5.2.0+ox" -synopsis: "flambda2" +synopsis: "OxCaml" license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" authors: "Xavier Leroy and many contributors" -homepage: "https://ocaml.org" +maintainer: "Jane Street " +homepage: "https://oxcaml.org" bug-reports: "https://github.com/oxcaml/oxcaml/issues" dev-repo: "git+https://github.com/oxcaml/oxcaml/flambda-backend#main" depends: [ @@ -39,17 +40,17 @@ build: [ [ "sh" "-exc" - "cd dune-3.9.3; PATH=%{build}%/init_deps/bin/:$PATH ocaml boot/bootstrap.ml -j %{jobs}%" + "cd dune-3.20.2; PATH=%{build}%/init_deps/bin/:$PATH ocaml boot/bootstrap.ml -j %{jobs}%" ] [ "sh" "-exc" - "cd dune-3.9.3; PATH=%{build}%/init_deps/bin/:$PATH ./_boot/dune.exe build dune.install --release --profile dune-bootstrap -j %{jobs}%" + "cd dune-3.20.2; PATH=%{build}%/init_deps/bin/:$PATH ./_boot/dune.exe build dune.install --release --profile dune-bootstrap -j %{jobs}%" ] [ "sh" "-exc" - "cd dune-3.9.3; PATH=%{build}%/init_deps/bin/:$PATH ./_boot/dune.exe install --root %{build}%/dune-3.9.3 --prefix %{build}%/init_deps/ dune" + "cd dune-3.20.2; PATH=%{build}%/init_deps/bin/:$PATH ./_boot/dune.exe install --root %{build}%/dune-3.20.2 --prefix %{build}%/init_deps/ dune" ] [ "sh" @@ -59,13 +60,13 @@ build: [ [ "sh" "-exc" - "cd menhir-20231231-d3d815e4f554da68b8c247241c8f8678926eecaa; PATH=%{build}%/init_deps/bin/:$PATH %{build}%/init_deps/bin/dune install --prefix %{build}%/init_deps/ -p menhirLib -j %{jobs}%" + "cd menhir-20231231-d3d815e4f554da68b8c247241c8f8678926eecaa; PATH=%{build}%/init_deps/bin/:$PATH %{build}%/init_deps/bin/dune install --prefix %{build}%/init_deps/ -p menhirLib,menhir -j %{jobs}%" ] ["sh" "-exc" "autoconf || autoconf27"] [ "sh" "-exc" - "PATH=%{build}%/init_deps/bin/:$PATH ./configure --enable-runtime5 --enable-middle-end=flambda2 --enable-poll-insertion --enable-multidomain --enable-stack-checks --disable-naked-pointers '--prefix=%{prefix}%' '--with-dune=%{build}%/init_deps/bin/dune'" + "PATH=%{build}%/init_deps/bin/:$PATH ./configure --enable-middle-end=flambda2 --enable-runtime5 --enable-stack-checks --enable-poll-insertion --enable-multidomain --disable-warn-error '--prefix=%{prefix}%' '--with-dune=%{build}%/init_deps/bin/dune'" ] ["sh" "-exc" "PATH=%{build}%/init_deps/bin/:$PATH make -j%{jobs}%"] ] @@ -76,10 +77,10 @@ extra-source "init-compiler.tar.gz" { "sha256=c2d706432f93ba85bd3383fa451d74543c32a4e84a1afaf3e8ace18f7f097b43" } extra-source "init-dune.tbz" { - src: "https://github.com/ocaml/dune/releases/download/3.9.3/dune-3.9.3.tbz" + src: + "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" checksum: [ - "sha256=96bf755da267fb46e4af2dda0db56d5863761589618089c429ff85e0f7f65783" - "sha512=ce05560a2cff0beb805a259df449b5dbd15420e353cc686a482904b837969bce6f91eedec608ecef4be0ebc232fa013652745a7cc831af1a7f8fe06a391e5488" + "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" ] } extra-source "init-menhir.tar.gz" { @@ -92,21 +93,23 @@ extra-source "init-menhir.tar.gz" { } url { src: - "https://github.com/oxcaml/oxcaml/archive/refs/tags/5.2.0minus-11-opam.tar.gz" + "https://github.com/oxcaml/oxcaml/archive/refs/tags/5.2.0minus-19-opam.tar.gz" checksum: - "sha256=c33697ad5ee104d2029babbf50a7613405996d971bd47fe33ca851db6270f731" + "sha256=30c9030e82cc282058bece5759dcf5b208dd5f1423e9a2c013933d6226c344b6" } patches: ["ignore-opam.patch"] extra-files: [ [ "ignore-opam.patch" - "sha256=ae78f4b19b09b7a3011368118c2141869ea25f1e3a3a5ef10da4c07754557320" + "sha256=6ece96cd3f06c3ed90f768bf63659266a670e5be0b2302354a2d0e87629ba049" ] ] conflicts: [ "base" {< "v0.18~"} "alcotest" {!= "1.9.0+ox"} "backoff" {!= "0.1.1+ox"} + "ctypes" {!= "0.23.0+ox"} + "ctypes-foreign" {!= "0.23.0+ox"} "dot-merlin-reader" {!= "5.2.1-502+ox"} "gen_js_api" {!= "1.1.2+ox"} "js_of_ocaml" {!= "6.0.1+ox"} @@ -128,13 +131,15 @@ conflicts: [ "ojs" {!= "1.1.2+ox"} "ppxlib" {!= "0.33.0+ox"} "ppxlib_ast" {!= "0.33.0+ox"} + "re" {!= "1.14.0+ox"} "sedlex" {!= "3.3+ox"} + "spawn" {!= "v0.15.1+ox"} "topkg" {!= "1.0.8+ox"} - "uTop" {!= "2.15.0+ox"} + "uTop" {!= "2.16.0+ox"} "uutf" {!= "1.0.3+ox"} "wasm_of_ocaml-compiler" {!= "6.0.1+ox"} "zarith" {<"1.12"} "zarith" {="1.12"} "zarith" {="1.13"} "zarith" {="1.14"} -] + ] diff --git a/packages/ocaml_intrinsics/ocaml_intrinsics.v0.18~preview.130.36+326/opam b/packages/ocaml_intrinsics/ocaml_intrinsics.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/ocaml_intrinsics/ocaml_intrinsics.v0.18~preview.130.36+326/opam rename to packages/ocaml_intrinsics/ocaml_intrinsics.v0.18~preview.130.55+197/opam index 0328c3a573..c0fd979fa6 100644 --- a/packages/ocaml_intrinsics/ocaml_intrinsics.v0.18~preview.130.36+326/opam +++ b/packages/ocaml_intrinsics/ocaml_intrinsics.v0.18~preview.130.55+197/opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ocaml_intrinsics_kernel" {= "v0.18~preview.130.36+326"} + "ocaml_intrinsics_kernel" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "dune-configurator" ] @@ -24,7 +24,7 @@ Provides functions to invoke amd64 instructions (such as clz,popcnt,rdtsc,rdpmc) available: (arch = "x86_64" | arch = "arm64") & os != "win32" url { src: - "https://github.com/janestreet/ocaml_intrinsics/archive/b798cf370b0dab77080509dc105e18d940437132.tar.gz" + "https://github.com/janestreet/ocaml_intrinsics/archive/b7b99d3284dd310400af346abd6b5dfff0192216.tar.gz" checksum: - "sha256=488e4bcd29b64140b31d8d241bd7de65e81fe078dc0a49edb8cb9657b4d8087d" + "sha256=8e9bb506c76f8f7acd732ae6d87fb288fc76e181f886899fa5a84676f90429b4" } diff --git a/packages/ocaml_intrinsics_kernel/ocaml_intrinsics_kernel.v0.18~preview.130.36+326/opam b/packages/ocaml_intrinsics_kernel/ocaml_intrinsics_kernel.v0.18~preview.130.55+197/opam similarity index 87% rename from packages/ocaml_intrinsics_kernel/ocaml_intrinsics_kernel.v0.18~preview.130.36+326/opam rename to packages/ocaml_intrinsics_kernel/ocaml_intrinsics_kernel.v0.18~preview.130.55+197/opam index 49cba8bf50..870500c07c 100644 --- a/packages/ocaml_intrinsics_kernel/ocaml_intrinsics_kernel.v0.18~preview.130.36+326/opam +++ b/packages/ocaml_intrinsics_kernel/ocaml_intrinsics_kernel.v0.18~preview.130.55+197/opam @@ -23,7 +23,7 @@ Provides functions to invoke amd64 instructions (such as cmov, min/maxsd, popcnt """ url { src: - "https://github.com/janestreet/ocaml_intrinsics_kernel/archive/e27ddc4e47b2c7a208ff0fb4756b4e48764c025c.tar.gz" + "https://github.com/janestreet/ocaml_intrinsics_kernel/archive/b0dde41b810832b894c725fcab9f992a55d1f230.tar.gz" checksum: - "sha256=befe1b91df37e2bed9e6a95703c64a8769b8334cea0dcd9f626d46241933990a" + "sha256=1888cae1e68f8f03a4cdfbea93d3ae81a9a067022c49447510856347e8da7c12" } diff --git a/packages/ocaml_openapi_generator/ocaml_openapi_generator.v0.18~preview.130.36+326/opam b/packages/ocaml_openapi_generator/ocaml_openapi_generator.v0.18~preview.130.55+197/opam similarity index 59% rename from packages/ocaml_openapi_generator/ocaml_openapi_generator.v0.18~preview.130.36+326/opam rename to packages/ocaml_openapi_generator/ocaml_openapi_generator.v0.18~preview.130.55+197/opam index 2b5e0c3e81..40bc71ccd2 100644 --- a/packages/ocaml_openapi_generator/ocaml_openapi_generator.v0.18~preview.130.36+326/opam +++ b/packages/ocaml_openapi_generator/ocaml_openapi_generator.v0.18~preview.130.55+197/opam @@ -12,15 +12,15 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "jsonaf" {= "v0.18~preview.130.36+326"} - "ocaml-embed-file" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_jsonaf_conv" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "jsonaf" {= "v0.18~preview.130.55+197"} + "ocaml-embed-file" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_jsonaf_conv" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "httpaf" {>= "0.7.1"} "jingoo" {>= "1.4.4" & < "1.5.0"} @@ -32,7 +32,7 @@ An OpenAPI 3 to OCaml client generator. """ url { src: - "https://github.com/janestreet/ocaml_openapi_generator/archive/6b63d9f084635d6a243202b1f059cd5a8438792f.tar.gz" + "https://github.com/janestreet/ocaml_openapi_generator/archive/85ac63241ebff41e70cc1f05a4844d8fdd046b60.tar.gz" checksum: - "sha256=66743f050f318fde0454ed12ee0bfb6aa9da92e88f4255007143c688afe469f0" + "sha256=c63546623a2060454b761177dd311255311e622d733593cd4b8ff9508ba82b0d" } diff --git a/packages/ocaml_simd/ocaml_simd.v0.18~preview.130.36+326/opam b/packages/ocaml_simd/ocaml_simd.v0.18~preview.130.55+197/opam similarity index 55% rename from packages/ocaml_simd/ocaml_simd.v0.18~preview.130.36+326/opam rename to packages/ocaml_simd/ocaml_simd.v0.18~preview.130.55+197/opam index 620d8518c3..cbe88e96d3 100644 --- a/packages/ocaml_simd/ocaml_simd.v0.18~preview.130.36+326/opam +++ b/packages/ocaml_simd/ocaml_simd.v0.18~preview.130.55+197/opam @@ -12,13 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.2.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ocaml_intrinsics" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "unboxed" {= "v0.18~preview.130.36+326"} - "vec" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ocaml_intrinsics" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "unboxed" {= "v0.18~preview.130.55+197"} + "vec" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -29,7 +30,7 @@ description: """ """ url { src: - "https://github.com/janestreet/ocaml_simd/archive/11052cb6467e4ed3459d519a2b3da90eb5748ac2.tar.gz" + "https://github.com/janestreet/ocaml_simd/archive/97a46879ef79427d97596ced718ae693f4cf046f.tar.gz" checksum: - "sha256=ddfc6907bd2c7dfc5ebb64ac73ef923a0b977dae551b0433f63ef55280804a4b" + "sha256=6ef92bba933d324091d6795992f58427f5c6710eb30aad71f9578d5d13e8e04b" } diff --git a/packages/ocamlc-loc/ocamlc-loc.3.20.2+ox/files/oxcaml-dune.patch b/packages/ocamlc-loc/ocamlc-loc.3.20.2+ox/files/oxcaml-dune.patch new file mode 100644 index 0000000000..43482816b6 --- /dev/null +++ b/packages/ocamlc-loc/ocamlc-loc.3.20.2+ox/files/oxcaml-dune.patch @@ -0,0 +1,39 @@ +diff --git a/otherlibs/stdune/src/queue.ml b/otherlibs/stdune/src/queue.ml +index 6a5fbb493..fb3db35a9 100644 +--- a/otherlibs/stdune/src/queue.ml ++++ b/otherlibs/stdune/src/queue.ml +@@ -1,10 +1,16 @@ + include Stdlib.Queue + ++let create () = create () + let push t x = add x t + let peek_exn t = peek t + let pop_exn t = pop t + let pop t = if is_empty t then None else Some (pop_exn t) + let peek t = if is_empty t then None else Some (peek t) ++let clear t = clear t ++let copy t = copy t ++let is_empty t = is_empty t ++let length t = length t + let iter t ~f = iter f t + let fold t ~f ~init = fold f init t ++let transfer t1 t2 = transfer t1 t2 + let to_list t = List.rev (fold t ~f:(fun acc a -> a :: acc) ~init:[]) +diff --git a/src/csexp_rpc/csexp_rpc.ml b/src/csexp_rpc/csexp_rpc.ml +index 0a5d308c1..1c1485d9c 100644 +--- a/src/csexp_rpc/csexp_rpc.ml ++++ b/src/csexp_rpc/csexp_rpc.ml +@@ -236,10 +236,10 @@ module Session = struct + + external send : Unix.file_descr -> Bytes.t -> int -> int -> int = "dune_send" + +- let write = ++ let write t b = + match Platform.OS.value with +- | Linux -> send +- | _ -> Unix.single_write ++ | Linux -> send t b ++ | _ -> Unix.single_write t b + ;; + + let rec csexp_write_loop fd out_buf token = diff --git a/packages/ocamlc-loc/ocamlc-loc.3.20.2+ox/opam b/packages/ocamlc-loc/ocamlc-loc.3.20.2+ox/opam new file mode 100644 index 0000000000..4c80d7e6ca --- /dev/null +++ b/packages/ocamlc-loc/ocamlc-loc.3.20.2+ox/opam @@ -0,0 +1,45 @@ +opam-version: "2.0" +version: "3.20.2+ox" +name: "ocamlc-loc" +synopsis: "Parse ocaml compiler output into structured form" +description: + "This library offers no backwards compatibility guarantees. Use at your own risk." +maintainer: "Jane Street Group, LLC " +authors: "Jane Street Group, LLC " +license: "MIT" +homepage: "https://github.com/ocaml/dune" +doc: "https://dune.readthedocs.io/" +bug-reports: "https://github.com/ocaml/dune/issues" +depends: [ + "dune" {>= "3.20"} + "ocaml" {>= "4.08.0"} + "dyn" {= version} + "odoc" {with-doc} +] +conflicts: [ + "ocaml-lsp-server" {< "1.15.0"} +] +build: [ + ["dune" "subst"] {dev} + ["rm" "-rf" "vendor/csexp"] + ["rm" "-rf" "vendor/pp"] + ["dune" "build" "-p" name "-j" jobs "@install" "@doc" {with-doc}] +] +dev-repo: "git+https://github.com/ocaml/dune.git" +url { + src: + "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + checksum: [ + "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + ] +} +x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-maintenance-intent: ["(latest)"] +patches: ["oxcaml-dune.patch"] +extra-files: [ + [ + "oxcaml-dune.patch" + "sha256=fe1d266b70e4f7bc884eda337f68c6a539bebc4e9b3e2ed0fdf7293797fc3f33" + ] +] diff --git a/packages/ocamlformat-lib/ocamlformat-lib.0.26.2+ox/opam b/packages/ocamlformat-lib/ocamlformat-lib.0.26.2+ox/opam index 60db0173bd..534bce9df4 100644 --- a/packages/ocamlformat-lib/ocamlformat-lib.0.26.2+ox/opam +++ b/packages/ocamlformat-lib/ocamlformat-lib.0.26.2+ox/opam @@ -22,6 +22,7 @@ bug-reports: "https://github.com/ocaml-ppx/ocamlformat/issues" depends: [ "ocaml" {>= "4.08" & < "5.3"} "alcotest" {with-test & >= "1.3.0" & = "1.9.0+ox"} + "cmdliner" {>= "1.1.0" & < "2.0"} "base" {>= "v0.12.0"} "dune" {>= "2.8"} "dune-build-info" @@ -61,8 +62,8 @@ dev-repo: "git+https://github.com/ocaml-ppx/ocamlformat.git" x-commit-hash: "f5727b32127730a2722f86c7119eb6d8f884e26d" url { src: - "https://github.com/oxcaml/ocamlformat/archive/dd596214d5c8612a2242447767c9fedc49c7fc58.tar.gz" + "https://github.com/oxcaml/ocamlformat/archive/a6f113c6211de01c8188e95ca5fc5fe8d78fb992.tar.gz" checksum: - "sha256=6e2329afc063710677c2aebf8695a1c201e6b70020e95c4e701f9ac5014b763e" + "sha256=3f251df04145372d68b8f3f592572761e7db68e382355828479c9baf3bb60a5f" } diff --git a/packages/ocamlformat/ocamlformat.0.26.2+ox/opam b/packages/ocamlformat/ocamlformat.0.26.2+ox/opam index 9ca82b7b93..f6f140b279 100644 --- a/packages/ocamlformat/ocamlformat.0.26.2+ox/opam +++ b/packages/ocamlformat/ocamlformat.0.26.2+ox/opam @@ -30,7 +30,7 @@ depends: [ "dune" {>= "2.8"} "ocamlformat-lib" {= version & = "0.26.2+ox"} "ocamlformat-rpc-lib" {with-test & = version} - "re" {>= "1.10.3"} + "re" {= "1.14.0+ox"} "odoc" {with-doc} ] build: [ @@ -51,8 +51,8 @@ dev-repo: "git+https://github.com/ocaml-ppx/ocamlformat.git" x-commit-hash: "f5727b32127730a2722f86c7119eb6d8f884e26d" url { src: - "https://github.com/oxcaml/ocamlformat/archive/dd596214d5c8612a2242447767c9fedc49c7fc58.tar.gz" + "https://github.com/oxcaml/ocamlformat/archive/a6f113c6211de01c8188e95ca5fc5fe8d78fb992.tar.gz" checksum: - "sha256=6e2329afc063710677c2aebf8695a1c201e6b70020e95c4e701f9ac5014b763e" + "sha256=3f251df04145372d68b8f3f592572761e7db68e382355828479c9baf3bb60a5f" } diff --git a/packages/of_json/of_json.v0.18~preview.130.36+326/opam b/packages/of_json/of_json.v0.18~preview.130.55+197/opam similarity index 68% rename from packages/of_json/of_json.v0.18~preview.130.36+326/opam rename to packages/of_json/of_json.v0.18~preview.130.55+197/opam index f3bb52afd5..3cf7ae4f69 100644 --- a/packages/of_json/of_json.v0.18~preview.130.36+326/opam +++ b/packages/of_json/of_json.v0.18~preview.130.55+197/opam @@ -11,10 +11,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_extended" {= "v0.18~preview.130.36+326"} - "jsonaf" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_extended" {= "v0.18~preview.130.55+197"} + "jsonaf" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ This library provides an applicative interface for extracting values from JSON o """ url { src: - "https://github.com/janestreet/of_json/archive/07537eacd606d47c7a5ffe949fef48c7f59b42ef.tar.gz" + "https://github.com/janestreet/of_json/archive/8a5157afce3f0620914b64d0373eacdf4514808f.tar.gz" checksum: - "sha256=729cf0cb0ceef9a923231d203c07593baef9efb90d964d6b8a7f3efa4c384823" + "sha256=35c482b0ab0f783a4cc9babcdb820afa6af166351acb32fd52fb52cc87e29ea2" } diff --git a/packages/ojs/ojs.1.1.2+ox/files/gen-js-api-ast.patch b/packages/ojs/ojs.1.1.2+ox/files/gen-js-api-ast.patch new file mode 100644 index 0000000000..8f402a2b2f --- /dev/null +++ b/packages/ojs/ojs.1.1.2+ox/files/gen-js-api-ast.patch @@ -0,0 +1,14 @@ +--- a/ppx-lib/gen_js_api_ppx.ml ++++ b/ppx-lib/gen_js_api_ppx.ml +@@ -2179,9 +2179,9 @@ let standalone () = + if !out = "" then out := Filename.chop_extension src ^ ".ml"; + let oc = if !out = "-" then stdout else open_out !out in + let sg = +- Ocaml_common.Pparse.parse_interface ++ (Ocaml_common.Pparse.parse_interface + ~tool_name:"gen_js_iface" +- src |> Selected_ast.Of_ocaml.copy_signature ++ src).ast |> Selected_ast.Of_ocaml.copy_signature + in + let str = str_of_sg ~global_attrs:[] sg in + ignore (check_loc_mapper # signature sg); diff --git a/packages/ojs/ojs.1.1.2+ox/opam b/packages/ojs/ojs.1.1.2+ox/opam index 23600d5541..8638fd4470 100644 --- a/packages/ojs/ojs.1.1.2+ox/opam +++ b/packages/ojs/ojs.1.1.2+ox/opam @@ -34,6 +34,7 @@ patches: [ "gen-js-api+ppx-driver+gen_js_api_ppx_driver.ml.patch" "gen-js-api+ppx-lib+gen_js_api_ppx.ml.patch" "gen-js-api+unsafe_multidomain_alert.patch" + "gen-js-api-ast.patch" "dune.patch" ] extra-files: [ @@ -53,6 +54,10 @@ extra-files: [ "gen-js-api+unsafe_multidomain_alert.patch" "sha256=41fd51a6dd20b44bc07451e4635623554c4aa80e5e5f9472faf4161c7a7b0a7a" ] + [ + "gen-js-api-ast.patch" + "sha256=969f7ae0ac3a269f5fecffc659a875d7ba458364aa85da2e9bfa8cd3a214ae2f" + ] [ "dune.patch" "sha256=486d4235a5baa84b63b867ceaa9000b8c7fa6c9429999ab247e4ba3401da214e" diff --git a/packages/oklab/oklab.v0.18~preview.130.36+326/opam b/packages/oklab/oklab.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/oklab/oklab.v0.18~preview.130.36+326/opam rename to packages/oklab/oklab.v0.18~preview.130.55+197/opam index 53c29c87d1..6e0451cfa1 100644 --- a/packages/oklab/oklab.v0.18~preview.130.36+326/opam +++ b/packages/oklab/oklab.v0.18~preview.130.55+197/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -22,7 +22,7 @@ A library for the oklab color space. Also includes oklch. """ url { src: - "https://github.com/janestreet/oklab/archive/abc92c46bd30110bc42530442aec899de425ed50.tar.gz" + "https://github.com/janestreet/oklab/archive/213a833e770ac1dc0fc3a3aa6d88f6133dfa0dff.tar.gz" checksum: - "sha256=54424096b63974d603f83e428d0e5f336e0371f73c1746294ef010e12b7f9d58" + "sha256=04c55ede8b4ac74b0604443849bcd32ec9f911051d3490dbe36c362251ba5c72" } diff --git a/packages/ordering/ordering.3.20.2+ox/files/oxcaml-dune.patch b/packages/ordering/ordering.3.20.2+ox/files/oxcaml-dune.patch new file mode 100644 index 0000000000..43482816b6 --- /dev/null +++ b/packages/ordering/ordering.3.20.2+ox/files/oxcaml-dune.patch @@ -0,0 +1,39 @@ +diff --git a/otherlibs/stdune/src/queue.ml b/otherlibs/stdune/src/queue.ml +index 6a5fbb493..fb3db35a9 100644 +--- a/otherlibs/stdune/src/queue.ml ++++ b/otherlibs/stdune/src/queue.ml +@@ -1,10 +1,16 @@ + include Stdlib.Queue + ++let create () = create () + let push t x = add x t + let peek_exn t = peek t + let pop_exn t = pop t + let pop t = if is_empty t then None else Some (pop_exn t) + let peek t = if is_empty t then None else Some (peek t) ++let clear t = clear t ++let copy t = copy t ++let is_empty t = is_empty t ++let length t = length t + let iter t ~f = iter f t + let fold t ~f ~init = fold f init t ++let transfer t1 t2 = transfer t1 t2 + let to_list t = List.rev (fold t ~f:(fun acc a -> a :: acc) ~init:[]) +diff --git a/src/csexp_rpc/csexp_rpc.ml b/src/csexp_rpc/csexp_rpc.ml +index 0a5d308c1..1c1485d9c 100644 +--- a/src/csexp_rpc/csexp_rpc.ml ++++ b/src/csexp_rpc/csexp_rpc.ml +@@ -236,10 +236,10 @@ module Session = struct + + external send : Unix.file_descr -> Bytes.t -> int -> int -> int = "dune_send" + +- let write = ++ let write t b = + match Platform.OS.value with +- | Linux -> send +- | _ -> Unix.single_write ++ | Linux -> send t b ++ | _ -> Unix.single_write t b + ;; + + let rec csexp_write_loop fd out_buf token = diff --git a/packages/ordering/ordering.3.20.2+ox/opam b/packages/ordering/ordering.3.20.2+ox/opam new file mode 100644 index 0000000000..ee7f8f8e56 --- /dev/null +++ b/packages/ordering/ordering.3.20.2+ox/opam @@ -0,0 +1,40 @@ +opam-version: "2.0" +version: "3.20.2+ox" +name: "ordering" +synopsis: "Element ordering" +description: "Element ordering" +maintainer: "Jane Street Group, LLC " +authors: "Jane Street Group, LLC " +license: "MIT" +homepage: "https://github.com/ocaml/dune" +doc: "https://dune.readthedocs.io/" +bug-reports: "https://github.com/ocaml/dune/issues" +depends: [ + "dune" {>= "3.20"} + "ocaml" {>= "4.08.0"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + ["rm" "-rf" "vendor/csexp"] + ["rm" "-rf" "vendor/pp"] + ["dune" "build" "-p" name "-j" jobs "@install" "@doc" {with-doc}] +] +dev-repo: "git+https://github.com/ocaml/dune.git" +url { + src: + "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + checksum: [ + "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + ] +} +x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-maintenance-intent: ["(latest)"] +patches: ["oxcaml-dune.patch"] +extra-files: [ + [ + "oxcaml-dune.patch" + "sha256=fe1d266b70e4f7bc884eda337f68c6a539bebc4e9b3e2ed0fdf7293797fc3f33" + ] +] diff --git a/packages/ordinal_abbreviation/ordinal_abbreviation.v0.18~preview.130.36+326/opam b/packages/ordinal_abbreviation/ordinal_abbreviation.v0.18~preview.130.55+197/opam similarity index 79% rename from packages/ordinal_abbreviation/ordinal_abbreviation.v0.18~preview.130.36+326/opam rename to packages/ordinal_abbreviation/ordinal_abbreviation.v0.18~preview.130.55+197/opam index 3cf584cb78..1c8de35895 100644 --- a/packages/ordinal_abbreviation/ordinal_abbreviation.v0.18~preview.130.36+326/opam +++ b/packages/ordinal_abbreviation/ordinal_abbreviation.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -23,7 +23,7 @@ A minimal library for generating ordinal names of integers. """ url { src: - "https://github.com/janestreet/ordinal_abbreviation/archive/6f588bf114c9f3f38c7cf3e25488e78ac1c5c7ea.tar.gz" + "https://github.com/janestreet/ordinal_abbreviation/archive/e84c434ea17fd07b94e85f32778201c7c1d53890.tar.gz" checksum: - "sha256=3f56d7f4e8cb55d5fcc4a214eae0400e81371ccdc30793cea6b0a9cbe6d350f0" + "sha256=f54454a822d80214b5be36cfd3992a116c2f4b7591f8e1b4e383f9ee06c4a297" } diff --git a/packages/oxcaml_effect/oxcaml_effect.v0.18~preview.130.36+326/opam b/packages/oxcaml_effect/oxcaml_effect.v0.18~preview.130.55+197/opam similarity index 72% rename from packages/oxcaml_effect/oxcaml_effect.v0.18~preview.130.36+326/opam rename to packages/oxcaml_effect/oxcaml_effect.v0.18~preview.130.55+197/opam index a68abb7f2a..53acccf99c 100644 --- a/packages/oxcaml_effect/oxcaml_effect.v0.18~preview.130.36+326/opam +++ b/packages/oxcaml_effect/oxcaml_effect.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "basement" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "basement" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ Effect provides a type-safe wrapper for algebraic effects """ url { src: - "https://github.com/janestreet/oxcaml_effect/archive/fda8891ea1249a9d184c56ae75c33ed614671e42.tar.gz" + "https://github.com/janestreet/oxcaml_effect/archive/d926132f7c5be96987f397126451e811787d4bb0.tar.gz" checksum: - "sha256=f2dca9b924d5d0844adedea6fab634e9a631ce19b56b12199401b4ca7e99aae1" + "sha256=48010e4807dcd211efa887359936f946b2e7b1bc5d56271dc902219c2cdc3651" } diff --git a/packages/pam/pam.v0.18~preview.130.36+326/opam b/packages/pam/pam.v0.18~preview.130.55+197/opam similarity index 76% rename from packages/pam/pam.v0.18~preview.130.36+326/opam rename to packages/pam/pam.v0.18~preview.130.55+197/opam index f2b135ea71..e3f3e3b152 100644 --- a/packages/pam/pam.v0.18~preview.130.36+326/opam +++ b/packages/pam/pam.v0.18~preview.130.55+197/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "conf-pam" "dune" {>= "3.17.0"} ] @@ -28,7 +28,7 @@ depexts: [ ] url { src: - "https://github.com/janestreet/pam/archive/2daf253ec4cb5bf5eb50f0f0806066ae97c54442.tar.gz" + "https://github.com/janestreet/pam/archive/d4cd5ba896ae95357c41e8be6e7132a1ec2dbac0.tar.gz" checksum: - "sha256=108c279fea46438c6e45b5c8d299ca9b1610671b003008ae18bd54587661385f" + "sha256=2d1310b9b002eb57c25d0b9ee79d02cb68f2edac5f5a35ba9b0698c324d41d32" } diff --git a/packages/parallel/parallel.v0.18~preview.130.36+326/opam b/packages/parallel/parallel.v0.18~preview.130.36+326/opam deleted file mode 100644 index 5e2ac407e5..0000000000 --- a/packages/parallel/parallel.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,38 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/parallel" -bug-reports: "https://github.com/janestreet/parallel/issues" -dev-repo: "git+https://github.com/janestreet/parallel.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/parallel/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.2.0"} - "base" {= "v0.18~preview.130.36+326"} - "base_bigstring" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "int_repr" {= "v0.18~preview.130.36+326"} - "oxcaml_effect" {= "v0.18~preview.130.36+326"} - "portable" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "unboxed" {= "v0.18~preview.130.36+326"} - "unique" {= "v0.18~preview.130.36+326"} - "vec" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "OxCaml Parallelism" -description: """ - Parallelism infrastructure. -""" -url { - src: - "https://github.com/janestreet/parallel/archive/0b50242dc88ca0f45dac25590be93b873cdcae70.tar.gz" - checksum: - "sha256=831406636385442cf8a3ec41971aadb0a02d48fd382ed186fbaa4600631d9ef3" -} diff --git a/packages/parallel/parallel.v0.18~preview.130.55+197/opam b/packages/parallel/parallel.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..23673de699 --- /dev/null +++ b/packages/parallel/parallel.v0.18~preview.130.55+197/opam @@ -0,0 +1,43 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/parallel" +bug-reports: "https://github.com/janestreet/parallel/issues" +dev-repo: "git+https://github.com/janestreet/parallel.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/parallel/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.2.0"} + "await" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "base_bigstring" {= "v0.18~preview.130.55+197"} + "concurrent" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "int_repr" {= "v0.18~preview.130.55+197"} + "oxcaml_effect" {= "v0.18~preview.130.55+197"} + "portable" {= "v0.18~preview.130.55+197"} + "portable_ws_deque" {= "v0.18~preview.130.55+197"} + "ppx_fuelproof" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "unboxed" {= "v0.18~preview.130.55+197"} + "unique" {= "v0.18~preview.130.55+197"} + "vec" {= "v0.18~preview.130.55+197"} + "base-threads" + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "OxCaml Parallelism" +description: """ + Parallelism infrastructure. +""" +url { + src: + "https://github.com/janestreet/parallel/archive/fa624f8283de0f178ab955d322aafc8969f23e46.tar.gz" + checksum: + "sha256=9b7aaa4898c161809a647918dc91b17bd2a979f193c3333abf1d2a0992fface1" +} diff --git a/packages/parsexp/parsexp.v0.18~preview.130.36+326/opam b/packages/parsexp/parsexp.v0.18~preview.130.55+197/opam similarity index 74% rename from packages/parsexp/parsexp.v0.18~preview.130.36+326/opam rename to packages/parsexp/parsexp.v0.18~preview.130.55+197/opam index bbb455ab37..1910b231d9 100644 --- a/packages/parsexp/parsexp.v0.18~preview.130.36+326/opam +++ b/packages/parsexp/parsexp.v0.18~preview.130.55+197/opam @@ -10,10 +10,13 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.1.0"} - "basement" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} + "ocaml" {>= "5.1.0"} + "basement" {= "v0.18~preview.130.55+197"} + "ppx_js_style" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} + "unique" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "S-expression parsing library" @@ -40,7 +43,7 @@ parsexp_io. """ url { src: - "https://github.com/janestreet/parsexp/archive/cbd2f6a88c9ff1182cc8b14b5bb8b50a768b25e6.tar.gz" + "https://github.com/janestreet/parsexp/archive/d3fca09d82ab3fd3572de5e5f8849a6bd6f86878.tar.gz" checksum: - "sha256=8c48cbf70c5fe2d5137441314e46acf8984589e2b53fc37684449e963a2d4af5" + "sha256=ea1cebc7d001fe884b31b989b8a517774f23c52f57dd3d1d08731f93fdaf17a0" } diff --git a/packages/parsexp_io/parsexp_io.v0.18~preview.130.36+326/opam b/packages/parsexp_io/parsexp_io.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/parsexp_io/parsexp_io.v0.18~preview.130.36+326/opam rename to packages/parsexp_io/parsexp_io.v0.18~preview.130.55+197/opam index e24b6b6545..c7ff986363 100644 --- a/packages/parsexp_io/parsexp_io.v0.18~preview.130.36+326/opam +++ b/packages/parsexp_io/parsexp_io.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "parsexp" {= "v0.18~preview.130.36+326"} - "ppx_js_style" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "ppx_js_style" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ Parsexp_io provides functions for loading s-expressions from files. """ url { src: - "https://github.com/janestreet/parsexp_io/archive/98b45bf547598443192a66b08a7855e1dd9e1c42.tar.gz" + "https://github.com/janestreet/parsexp_io/archive/d13b378b91fe2c4d35f83aeb3e62e7918473bb9c.tar.gz" checksum: - "sha256=0b517e2c547afeb2f581258ac07cf1c9de2eca47151d894a9764d8f2393b7643" + "sha256=767a5798da24a70c5db7eba955d52c7b872eccaf1d3ea9dcaf651b9dad24be22" } diff --git a/packages/parsexp_prefix/parsexp_prefix.v0.18~preview.130.36+326/opam b/packages/parsexp_prefix/parsexp_prefix.v0.18~preview.130.55+197/opam similarity index 54% rename from packages/parsexp_prefix/parsexp_prefix.v0.18~preview.130.36+326/opam rename to packages/parsexp_prefix/parsexp_prefix.v0.18~preview.130.55+197/opam index 6cc0ad2430..8a92cb01d3 100644 --- a/packages/parsexp_prefix/parsexp_prefix.v0.18~preview.130.36+326/opam +++ b/packages/parsexp_prefix/parsexp_prefix.v0.18~preview.130.55+197/opam @@ -12,15 +12,15 @@ build: [ ] depends: [ "ocaml" {>= "4.14.0"} - "parsexp" {= "v0.18~preview.130.36+326"} - "parsexp_symbolic_automaton" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_enumerate" {= "v0.18~preview.130.36+326"} - "ppx_hash" {= "v0.18~preview.130.36+326"} - "ppx_js_style" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_variants_conv" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} + "parsexp" {= "v0.18~preview.130.55+197"} + "parsexp_symbolic_automaton" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_enumerate" {= "v0.18~preview.130.55+197"} + "ppx_hash" {= "v0.18~preview.130.55+197"} + "ppx_js_style" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_variants_conv" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -32,7 +32,7 @@ This library provides utility parsers for prefixes of sexps, where the sexp """ url { src: - "https://github.com/janestreet/parsexp_prefix/archive/14341846723e2d0c678811aad496031227f0d0cc.tar.gz" + "https://github.com/janestreet/parsexp_prefix/archive/f72c704c58ea9655d4482bc3495348f96bee081a.tar.gz" checksum: - "sha256=5e9d53d87114c372c1a64dde0d9a9860bffd96b491d198ba6f090515a1482b38" + "sha256=89dec4511b8fc9406eeb61c0e23259f305de2b84f2c464b40026aa47d0ff7284" } diff --git a/packages/parsexp_symbolic_automaton/parsexp_symbolic_automaton.v0.18~preview.130.36+326/opam b/packages/parsexp_symbolic_automaton/parsexp_symbolic_automaton.v0.18~preview.130.55+197/opam similarity index 80% rename from packages/parsexp_symbolic_automaton/parsexp_symbolic_automaton.v0.18~preview.130.36+326/opam rename to packages/parsexp_symbolic_automaton/parsexp_symbolic_automaton.v0.18~preview.130.55+197/opam index e8eac00fdf..3d8ad4db84 100644 --- a/packages/parsexp_symbolic_automaton/parsexp_symbolic_automaton.v0.18~preview.130.36+326/opam +++ b/packages/parsexp_symbolic_automaton/parsexp_symbolic_automaton.v0.18~preview.130.55+197/opam @@ -13,8 +13,8 @@ build: [ ] depends: [ "ocaml" {>= "4.14.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ This library is an abstract verion of the parsing automaton. It is used to defin """ url { src: - "https://github.com/janestreet/parsexp_symbolic_automaton/archive/3cba5b1f9f17af4bbefeb403a2111b90bf2c7727.tar.gz" + "https://github.com/janestreet/parsexp_symbolic_automaton/archive/f152223c486d456ac7f4d2da47079956887ce054.tar.gz" checksum: - "sha256=75ade9478726e6ab3f2725c0e395fc6120566da9682dae9e90dd52396ab3fe0d" + "sha256=20dd8653f58deee1128af55ec5c10d8db638be61b70e15f1ad5b1403813b9b8d" } diff --git a/packages/patdiff/patdiff.v0.18~preview.130.36+326/opam b/packages/patdiff/patdiff.v0.18~preview.130.55+197/opam similarity index 50% rename from packages/patdiff/patdiff.v0.18~preview.130.36+326/opam rename to packages/patdiff/patdiff.v0.18~preview.130.55+197/opam index 127ba8b4d7..7263a02bc1 100644 --- a/packages/patdiff/patdiff.v0.18~preview.130.36+326/opam +++ b/packages/patdiff/patdiff.v0.18~preview.130.55+197/opam @@ -11,15 +11,15 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "patience_diff" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "patience_diff" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} "uucp" ] available: arch != "arm32" & arch != "x86_32" @@ -28,7 +28,7 @@ description: """ """ url { src: - "https://github.com/janestreet/patdiff/archive/f7b87493ac5fdab15304af1ddc91363e29b2c741.tar.gz" + "https://github.com/janestreet/patdiff/archive/ec9a4e62960e10e8f0e5625879b6211683ed2a9a.tar.gz" checksum: - "sha256=bd1d718ecd7d0225902e7acbf4a2905afa3fe4976db0761c3c06d18f090bb38c" + "sha256=2564427df2d648c00c6d5f64d59294186db6ee8c66a84a8a307649133e1f2589" } diff --git a/packages/patience_diff/patience_diff.v0.18~preview.130.36+326/opam b/packages/patience_diff/patience_diff.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/patience_diff/patience_diff.v0.18~preview.130.36+326/opam rename to packages/patience_diff/patience_diff.v0.18~preview.130.55+197/opam index feb84eed54..3c34ab6480 100644 --- a/packages/patience_diff/patience_diff.v0.18~preview.130.36+326/opam +++ b/packages/patience_diff/patience_diff.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -23,7 +23,7 @@ description: """ """ url { src: - "https://github.com/janestreet/patience_diff/archive/8a57eac5fdc186b92ca7e3eaffa32d397ec891db.tar.gz" + "https://github.com/janestreet/patience_diff/archive/acb160732f4f4ba3cc0298cb589c970a9677abec.tar.gz" checksum: - "sha256=7fca4dbbe2f88943fbfde377a9e279c9bc37cdd7452a3a215bbef5a40d9be54c" + "sha256=e1ffffee48d7d93c52ec70a83a4b8f14f3c8a1c2721dd9cd2eb592dc556473f1" } diff --git a/packages/pending_or_error/.generated b/packages/pending_or_error/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/pending_or_error/pending_or_error.v0.18~preview.130.55+197/opam b/packages/pending_or_error/pending_or_error.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..50c5982fa1 --- /dev/null +++ b/packages/pending_or_error/pending_or_error.v0.18~preview.130.55+197/opam @@ -0,0 +1,31 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/pending_or_error" +bug-reports: "https://github.com/janestreet/pending_or_error/issues" +dev-repo: "git+https://github.com/janestreet/pending_or_error.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/pending_or_error/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.2.0"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_diff" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "A type useful for representing asynchronous results." +description: """ +A `'a Pending_or_error.t` is a value that comes from an RPC server or some other fallible, asynchronous place. It's isomorphic to an `'a Or_error.t option`, but flattened out and slightly more semantically specific. + +""" +url { + src: + "https://github.com/janestreet/pending_or_error/archive/d8420587c361d9ff9e8e349a35628d6719e81bee.tar.gz" + checksum: + "sha256=ca61f4b743c830092caa6fb61ea287a952fcbd5dde6d0f92c3ec7577c9d6a7e0" +} diff --git a/packages/pipe_with_writer_error/pipe_with_writer_error.v0.18~preview.130.36+326/opam b/packages/pipe_with_writer_error/pipe_with_writer_error.v0.18~preview.130.55+197/opam similarity index 85% rename from packages/pipe_with_writer_error/pipe_with_writer_error.v0.18~preview.130.36+326/opam rename to packages/pipe_with_writer_error/pipe_with_writer_error.v0.18~preview.130.55+197/opam index c37bd4dc89..d3c32b2db1 100644 --- a/packages/pipe_with_writer_error/pipe_with_writer_error.v0.18~preview.130.36+326/opam +++ b/packages/pipe_with_writer_error/pipe_with_writer_error.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -36,7 +36,7 @@ variety of write functions (namely, `write`, `write_when_ready`, """ url { src: - "https://github.com/janestreet/pipe_with_writer_error/archive/77de811fb6f949af85d974f53c03eef93647145c.tar.gz" + "https://github.com/janestreet/pipe_with_writer_error/archive/9f07304156cf14ac3a7db8dda24e06bffcc424e9.tar.gz" checksum: - "sha256=6a6d0c0583fad32c82c301e358b8b58a1bda5200e54cbeebbbf619b95f638ffc" + "sha256=1833e2ee2902e20413c89184b14985076b213962bb124b6e08e8ced91b269e11" } diff --git a/packages/polling_state_rpc/polling_state_rpc.v0.18~preview.130.36+326/opam b/packages/polling_state_rpc/polling_state_rpc.v0.18~preview.130.55+197/opam similarity index 60% rename from packages/polling_state_rpc/polling_state_rpc.v0.18~preview.130.36+326/opam rename to packages/polling_state_rpc/polling_state_rpc.v0.18~preview.130.55+197/opam index 4fe7073dcb..1d77858a4f 100644 --- a/packages/polling_state_rpc/polling_state_rpc.v0.18~preview.130.36+326/opam +++ b/packages/polling_state_rpc/polling_state_rpc.v0.18~preview.130.55+197/opam @@ -12,13 +12,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "babel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_diff" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "babel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_diff" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -29,7 +29,7 @@ An RPC which tracks state on the client and server so it only needs to send diff """ url { src: - "https://github.com/janestreet/polling_state_rpc/archive/ba16509db34a1203144359f4e958a256941f9a53.tar.gz" + "https://github.com/janestreet/polling_state_rpc/archive/ce68baf70a33bc529c69745b3c5e805a005e12ce.tar.gz" checksum: - "sha256=e0dd1d3828e47242c53f7135371ebf49d184393c70f421c5847370b3b2af103b" + "sha256=c91f5d45d7d22425d413e9ed8d9dbffd3dbdf0ee35c57ecb29ed4e9fc4154d24" } diff --git a/packages/portable/portable.v0.18~preview.130.36+326/opam b/packages/portable/portable.v0.18~preview.130.55+197/opam similarity index 54% rename from packages/portable/portable.v0.18~preview.130.36+326/opam rename to packages/portable/portable.v0.18~preview.130.55+197/opam index e0de1ca19b..629a083a40 100644 --- a/packages/portable/portable.v0.18~preview.130.36+326/opam +++ b/packages/portable/portable.v0.18~preview.130.55+197/opam @@ -10,13 +10,15 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "basement" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "uopt" {= "v0.18~preview.130.36+326"} - "backoff" {= "0.1.1+ox"} - "dune" {>= "3.17.0"} + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "base_quickcheck" {= "v0.18~preview.130.55+197"} + "basement" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_shorthand" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Library for parallel programming in OCaml and OxCaml" @@ -27,7 +29,7 @@ programming using OCaml and OxCaml """ url { src: - "https://github.com/janestreet/portable/archive/f4f649bba98aed83a2e9f3c928678de81bf0429c.tar.gz" + "https://github.com/janestreet/portable/archive/bbd0db99999565564cc39c7ffee5959fcba8b316.tar.gz" checksum: - "sha256=e5b553314ac48e5a7e1987daa3d41911fc2f3c2ac4351c3dcc1ae4f0a34f56d8" + "sha256=69437dc6aaae3545f405a917a10729e222d36eff185b1faf81e07cdf1d54abe1" } diff --git a/packages/portable_async/.generated b/packages/portable_async/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/portable_async/portable_async.v0.18~preview.130.55+197/opam b/packages/portable_async/portable_async.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..3457cbdbbd --- /dev/null +++ b/packages/portable_async/portable_async.v0.18~preview.130.55+197/opam @@ -0,0 +1,34 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/portable_async" +bug-reports: "https://github.com/janestreet/portable_async/issues" +dev-repo: "git+https://github.com/janestreet/portable_async.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/portable_async/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "await" {= "v0.18~preview.130.55+197"} + "concurrent" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "parallel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Integration between Async and Parallel OxCaml" +description: """ +Portable_async provides a compatibility layer between Async and parallelism for + OxCaml +""" +url { + src: + "https://github.com/janestreet/portable_async/archive/a3442a800b328a80162a8de7ac93f10bf8b1a06a.tar.gz" + checksum: + "sha256=49ddadd9072bd1e1b01662f1aa09afa06b8c0641c80877394966e7e11d8e584e" +} diff --git a/packages/portable_ws_deque/.generated b/packages/portable_ws_deque/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/portable_ws_deque/portable_ws_deque.v0.18~preview.130.55+197/opam b/packages/portable_ws_deque/portable_ws_deque.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..bb968e8776 --- /dev/null +++ b/packages/portable_ws_deque/portable_ws_deque.v0.18~preview.130.55+197/opam @@ -0,0 +1,31 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/portable_ws_deque" +bug-reports: "https://github.com/janestreet/portable_ws_deque/issues" +dev-repo: "git+https://github.com/janestreet/portable_ws_deque.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/portable_ws_deque/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "basement" {= "v0.18~preview.130.55+197"} + "portable" {= "v0.18~preview.130.55+197"} + "uopt" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Portable work-stealing deque for OxCaml" +description: """ +Portable lock-free chase-lev work-stealing deque for OxCaml +""" +url { + src: + "https://github.com/janestreet/portable_ws_deque/archive/b01e8d359cc6fa16a9034749725480e5edff6489.tar.gz" + checksum: + "sha256=f4ccbca5e9e41391c9dc7b374eca5fa8d1438553f576250232120443ecbd4071" +} diff --git a/packages/posixat/posixat.v0.18~preview.130.36+326/opam b/packages/posixat/posixat.v0.18~preview.130.55+197/opam similarity index 73% rename from packages/posixat/posixat.v0.18~preview.130.36+326/opam rename to packages/posixat/posixat.v0.18~preview.130.55+197/opam index 9815dd8a89..8e0c2d6c8d 100644 --- a/packages/posixat/posixat.v0.18~preview.130.36+326/opam +++ b/packages/posixat/posixat.v0.18~preview.130.55+197/opam @@ -11,9 +11,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -28,7 +28,7 @@ working directories inside the same process. """ url { src: - "https://github.com/janestreet/posixat/archive/dba9d850d62870db9a150c9adceb12fac62a3bb3.tar.gz" + "https://github.com/janestreet/posixat/archive/e6ff0d603f8f78baf8d4c7bcf417845b0bc93671.tar.gz" checksum: - "sha256=f9f4fc2b8738903a7a57f472799fcd8509e3b2e64e0869d10d5913aef27dea6b" + "sha256=ec2ad8edc9d1423a20ce309d636880ad7f782ccd8666a4455c4197d860aa232e" } diff --git a/packages/postgres_async/postgres_async.v0.18~preview.130.36+326/opam b/packages/postgres_async/postgres_async.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/postgres_async/postgres_async.v0.18~preview.130.36+326/opam rename to packages/postgres_async/postgres_async.v0.18~preview.130.55+197/opam index f3f7adde18..c3e531712e 100644 --- a/packages/postgres_async/postgres_async.v0.18~preview.130.36+326/opam +++ b/packages/postgres_async/postgres_async.v0.18~preview.130.55+197/opam @@ -12,13 +12,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_ssl" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_ssl" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -33,7 +33,7 @@ for now, though in the future a layer on top may add convenience functions. """ url { src: - "https://github.com/janestreet/postgres_async/archive/f77f90f191cf3fca16fa08e68f3284b9d604d0f4.tar.gz" + "https://github.com/janestreet/postgres_async/archive/07d38313cd9ab9d6cfad498ecdac482de5f2e836.tar.gz" checksum: - "sha256=cd645a8a11967a71fa324755985346b321fc0e601859b53049b2bcedd3600756" + "sha256=dd90e777993fa87d6f70942fcb4b1bae6f8de00339a340146e35a8ac67370efb" } diff --git a/packages/ppx_accessor/ppx_accessor.v0.18~preview.130.36+326/opam b/packages/ppx_accessor/ppx_accessor.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/ppx_accessor/ppx_accessor.v0.18~preview.130.36+326/opam rename to packages/ppx_accessor/ppx_accessor.v0.18~preview.130.55+197/opam index 08ff77f064..126bd334dc 100644 --- a/packages/ppx_accessor/ppx_accessor.v0.18~preview.130.36+326/opam +++ b/packages/ppx_accessor/ppx_accessor.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "accessor" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "accessor" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -26,7 +26,7 @@ Automatically generate accessors given a type definition. """ url { src: - "https://github.com/janestreet/ppx_accessor/archive/923ca1deb77f17fb95eeb503b9f0f9f9236a1e75.tar.gz" + "https://github.com/janestreet/ppx_accessor/archive/79235a3ac1d270f7170baa7c4ad56c3ffdda6665.tar.gz" checksum: - "sha256=2ce057cf89088d8f2cf6561c06922cf1a98b4204b3e220f7ad8e17a2a66d4a43" + "sha256=58611ae70106d839a72e5c3715e9aabbe35745df22097f1da5a4a6e5d4abf8a6" } diff --git a/packages/ppx_anonymous_record/.generated b/packages/ppx_anonymous_record/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/ppx_anonymous_record/ppx_anonymous_record.v0.18~preview.130.55+197/opam b/packages/ppx_anonymous_record/ppx_anonymous_record.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..1db2f9d64c --- /dev/null +++ b/packages/ppx_anonymous_record/ppx_anonymous_record.v0.18~preview.130.55+197/opam @@ -0,0 +1,33 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_anonymous_record" +bug-reports: "https://github.com/janestreet/ppx_anonymous_record/issues" +dev-repo: "git+https://github.com/janestreet/ppx_anonymous_record.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_anonymous_record/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_string" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "A ppx expander that expands anonymous records into (typed) tuples." +description: """ +A ppx expander that allows you to write safer code by (effectively) labelling tuples. +""" +url { + src: + "https://github.com/janestreet/ppx_anonymous_record/archive/b0622d3a92ab2ac1d23783083b8384ad8335805f.tar.gz" + checksum: + "sha256=3c97980a0d1b0d7eecb2feef491181904469e3ba5bc67402a2170c0b39bf3427" +} diff --git a/packages/ppx_array/.generated b/packages/ppx_array/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/ppx_array/ppx_array.v0.18~preview.130.55+197/opam b/packages/ppx_array/ppx_array.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..df904032e2 --- /dev/null +++ b/packages/ppx_array/ppx_array.v0.18~preview.130.55+197/opam @@ -0,0 +1,34 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_array" +bug-reports: "https://github.com/janestreet/ppx_array/issues" +dev-repo: "git+https://github.com/janestreet/ppx_array.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_array/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_array_base" {= "v0.18~preview.130.55+197"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "Copies array functions for unboxed types so they can be compiled for the type's specific layout." +description: """ +This deriving PPX rewriter is used internally at Jane Street to allow unboxed types to use common array functions. The deriver copies array functions under unboxed types so they can be compiled for the type's specific layout. It is used to simulate layout polymorphism until it is supported first class by the compiler. The long-term goal is thus to delete it entirely. +""" +url { + src: + "https://github.com/janestreet/ppx_array/archive/64b88c3ef7665a03bdc789526147b94d1757caca.tar.gz" + checksum: + "sha256=fa100441348373e3e9f9d838dda4d8b01c5dbbcce00df7f6b188b6d7f4714e9b" +} diff --git a/packages/ppx_array_base/.generated b/packages/ppx_array_base/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/ppx_array_base/ppx_array_base.v0.18~preview.130.55+197/opam b/packages/ppx_array_base/ppx_array_base.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..b9645e82f8 --- /dev/null +++ b/packages/ppx_array_base/ppx_array_base.v0.18~preview.130.55+197/opam @@ -0,0 +1,30 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_array_base" +bug-reports: "https://github.com/janestreet/ppx_array_base/issues" +dev-repo: "git+https://github.com/janestreet/ppx_array_base.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_array_base/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Defines array functions used in [Base.Array]." +description: """ +This PPX defines array functions used in [Base.Array] via attribute expansion. It also contains the expansion code for [ppx_array], which registers the deriving and extension PPXes. +""" +url { + src: + "https://github.com/janestreet/ppx_array_base/archive/ef85534c1b41d02289f78c56b82fa7aacf364a40.tar.gz" + checksum: + "sha256=679aeeb2bb638a372683e09c9a15f0c8ca3bf443eadb674977727ed49d489c69" +} diff --git a/packages/ppx_assert/ppx_assert.v0.18~preview.130.36+326/opam b/packages/ppx_assert/ppx_assert.v0.18~preview.130.55+197/opam similarity index 61% rename from packages/ppx_assert/ppx_assert.v0.18~preview.130.36+326/opam rename to packages/ppx_assert/ppx_assert.v0.18~preview.130.55+197/opam index e4e717fabb..783b1f37dc 100644 --- a/packages/ppx_assert/ppx_assert.v0.18~preview.130.36+326/opam +++ b/packages/ppx_assert/ppx_assert.v0.18~preview.130.55+197/opam @@ -12,11 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_cold" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_cold" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -27,7 +28,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_assert/archive/88fb0b8bb7eff7e6242f57581911c1f2b0d6d81e.tar.gz" + "https://github.com/janestreet/ppx_assert/archive/74551c3aeea77c12078c068f28f32e72f2c1b2f5.tar.gz" checksum: - "sha256=5a77459b5d12334f415998551354e2458e90cd5ece8da55d1df538b69e407478" + "sha256=d74ade59641e3a3a6e8fe5d555b727886e6700894a4ae929861d86452ead8aca" } diff --git a/packages/ppx_base/ppx_base.v0.18~preview.130.36+326/opam b/packages/ppx_base/ppx_base.v0.18~preview.130.55+197/opam similarity index 57% rename from packages/ppx_base/ppx_base.v0.18~preview.130.36+326/opam rename to packages/ppx_base/ppx_base.v0.18~preview.130.55+197/opam index d2295fd7ee..c9cf0561f3 100644 --- a/packages/ppx_base/ppx_base.v0.18~preview.130.36+326/opam +++ b/packages/ppx_base/ppx_base.v0.18~preview.130.55+197/opam @@ -11,14 +11,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ppx_cold" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_enumerate" {= "v0.18~preview.130.36+326"} - "ppx_globalize" {= "v0.18~preview.130.36+326"} - "ppx_hash" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_shorthand" {= "v0.18~preview.130.36+326"} - "ppx_template" {= "v0.18~preview.130.36+326"} + "ppx_cold" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_enumerate" {= "v0.18~preview.130.55+197"} + "ppx_globalize" {= "v0.18~preview.130.55+197"} + "ppx_hash" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_shorthand" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -32,7 +32,7 @@ verification tool. """ url { src: - "https://github.com/janestreet/ppx_base/archive/fe02cffaf891ffe32b511fe2fdac9a79eeebf377.tar.gz" + "https://github.com/janestreet/ppx_base/archive/37790aa19a1b35c1c9f7bcc2aaeca585032b71b6.tar.gz" checksum: - "sha256=581a096748276109f89f621ff367431beba9f970d5b05608c470cc73b860f3e2" + "sha256=75873c9d4ddb5abde050f9bb444207614f0c5ace6e0b5e7ea6e1885694810d66" } diff --git a/packages/ppx_bench/ppx_bench.v0.18~preview.130.36+326/opam b/packages/ppx_bench/ppx_bench.v0.18~preview.130.55+197/opam similarity index 72% rename from packages/ppx_bench/ppx_bench.v0.18~preview.130.36+326/opam rename to packages/ppx_bench/ppx_bench.v0.18~preview.130.55+197/opam index f3d306dc5d..f25b38e605 100644 --- a/packages/ppx_bench/ppx_bench.v0.18~preview.130.36+326/opam +++ b/packages/ppx_bench/ppx_bench.v0.18~preview.130.55+197/opam @@ -12,7 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ppx_inline_test" {= "v0.18~preview.130.36+326"} + "ppx_inline_test" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -23,7 +24,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_bench/archive/8b5712e017856ffcdb8bb6384ca4fd859d602212.tar.gz" + "https://github.com/janestreet/ppx_bench/archive/d6e83d847bcaf274536147b94efd17d505e75d25.tar.gz" checksum: - "sha256=a17fb368dfbde65a61ba9a00ace90f1f1b9087f63b81c11f690eac866940b196" + "sha256=ef3a92a05ca51200c07dc3edc2e80c9b3a6b5b27521a20fbef7bf256d7d1b859" } diff --git a/packages/ppx_bin_prot/ppx_bin_prot.v0.18~preview.130.36+326/opam b/packages/ppx_bin_prot/ppx_bin_prot.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/ppx_bin_prot/ppx_bin_prot.v0.18~preview.130.36+326/opam rename to packages/ppx_bin_prot/ppx_bin_prot.v0.18~preview.130.55+197/opam index aa54926ccf..5080f0ef88 100644 --- a/packages/ppx_bin_prot/ppx_bin_prot.v0.18~preview.130.36+326/opam +++ b/packages/ppx_bin_prot/ppx_bin_prot.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ocaml-compiler-libs" {= "v0.17.0+ox"} "ppxlib" {= "0.33.0+ox"} @@ -27,7 +27,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_bin_prot/archive/e7bf762cb416bfe0bb0719bdd1a5401ee332bc64.tar.gz" + "https://github.com/janestreet/ppx_bin_prot/archive/171503d455621fb0c9384f7cba269b1b017523af.tar.gz" checksum: - "sha256=a75f35b2239cef7d70a7745737ab8636eefb9bb4ecfd8338e598b536971bef2d" + "sha256=a427274d4e036c06fa5f7dfaed7f4316fbdf0543a58eb50c74262826212f5696" } diff --git a/packages/ppx_box/.generated b/packages/ppx_box/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/ppx_box/ppx_box.v0.18~preview.130.55+197/opam b/packages/ppx_box/ppx_box.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..4959cda480 --- /dev/null +++ b/packages/ppx_box/ppx_box.v0.18~preview.130.55+197/opam @@ -0,0 +1,30 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_box" +bug-reports: "https://github.com/janestreet/ppx_box/issues" +dev-repo: "git+https://github.com/janestreet/ppx_box.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_box/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Boxes and unboxes product types." +description: """ +This deriving PPX rewriter provides functions that convert product types (records and tuples) between their boxed and unboxed OxCaml representations. There is also an extension ppx that can be used for anonymous tuple types. +""" +url { + src: + "https://github.com/janestreet/ppx_box/archive/fefdc8f6a1c46df9407c34124eb4f2f40666e736.tar.gz" + checksum: + "sha256=b972e141c2994a0475cbdeedbbde39bfcc415c1b43c884002ebbc3430e597f6c" +} diff --git a/packages/ppx_cold/ppx_cold.v0.18~preview.130.36+326/opam b/packages/ppx_cold/ppx_cold.v0.18~preview.130.55+197/opam similarity index 80% rename from packages/ppx_cold/ppx_cold.v0.18~preview.130.36+326/opam rename to packages/ppx_cold/ppx_cold.v0.18~preview.130.55+197/opam index 927aabd8fd..8ee82f6675 100644 --- a/packages/ppx_cold/ppx_cold.v0.18~preview.130.36+326/opam +++ b/packages/ppx_cold/ppx_cold.v0.18~preview.130.55+197/opam @@ -22,7 +22,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_cold/archive/ead225ed5484a6f65ee0078462f8c9d24cbf5b31.tar.gz" + "https://github.com/janestreet/ppx_cold/archive/4ffdf1adc2bfa518584df1aab12618ba8df0a600.tar.gz" checksum: - "sha256=bf5512b69c3c1ecc4d7f3f49221a62f4aa0b75f9226ab6ec422272cac2b1da4f" + "sha256=9ad1bd94aacea1b091ccde2083d386302f77eb611867f69dc9afb253465e6dc0" } diff --git a/packages/ppx_compare/ppx_compare.v0.18~preview.130.36+326/opam b/packages/ppx_compare/ppx_compare.v0.18~preview.130.55+197/opam similarity index 57% rename from packages/ppx_compare/ppx_compare.v0.18~preview.130.36+326/opam rename to packages/ppx_compare/ppx_compare.v0.18~preview.130.55+197/opam index cb95e8ee8f..2c4e0fbecd 100644 --- a/packages/ppx_compare/ppx_compare.v0.18~preview.130.36+326/opam +++ b/packages/ppx_compare/ppx_compare.v0.18~preview.130.55+197/opam @@ -11,10 +11,13 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.1.0"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} + "ocaml" {>= "5.1.0"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppx_shorthand" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Generation of comparison functions from types" @@ -23,7 +26,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_compare/archive/07b843b399df5c920b09e1bf79c58bc188ebab4e.tar.gz" + "https://github.com/janestreet/ppx_compare/archive/e9db622b91b8ef84edbf7974eb94e4f117a9b405.tar.gz" checksum: - "sha256=9e0a63aebb4c03484bd611117f4671c26d3587b56c7ec42497d22deb7580463f" + "sha256=106de00263d6bfb8b01080e7a59430b7ccf17eed0579e040ce5aac68216a5669" } diff --git a/packages/ppx_conv_func/ppx_conv_func.v0.18~preview.130.36+326/opam b/packages/ppx_conv_func/ppx_conv_func.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/ppx_conv_func/ppx_conv_func.v0.18~preview.130.36+326/opam rename to packages/ppx_conv_func/ppx_conv_func.v0.18~preview.130.55+197/opam index 7887ef2f60..d34efbac9f 100644 --- a/packages/ppx_conv_func/ppx_conv_func.v0.18~preview.130.36+326/opam +++ b/packages/ppx_conv_func/ppx_conv_func.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -24,7 +24,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_conv_func/archive/81cfdd646b7f96a9e3ae01b30d95a04fee2b2054.tar.gz" + "https://github.com/janestreet/ppx_conv_func/archive/ef2bb331bbb7468ea501dba92d17d23092304db6.tar.gz" checksum: - "sha256=a98031bacfb80e75f7fdd6f7d9070521f2a6e08a9c5c7542a3a377ecd46995a1" + "sha256=7815f04aecb313844aa9b09baa91f89d7c3ac5a4e797acf5599dfe73fcc8d10f" } diff --git a/packages/ppx_css/ppx_css.v0.18~preview.130.36+326/opam b/packages/ppx_css/ppx_css.v0.18~preview.130.55+197/opam similarity index 52% rename from packages/ppx_css/ppx_css.v0.18~preview.130.36+326/opam rename to packages/ppx_css/ppx_css.v0.18~preview.130.55+197/opam index 7431f198bb..94d5e82393 100644 --- a/packages/ppx_css/ppx_css.v0.18~preview.130.36+326/opam +++ b/packages/ppx_css/ppx_css.v0.18~preview.130.55+197/opam @@ -11,19 +11,20 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "am_running_how_js" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "file_path" {= "v0.18~preview.130.36+326"} - "filesystem" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_let" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_string" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "am_running_how_js" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "file_path" {= "v0.18~preview.130.55+197"} + "filesystem" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_module_timer" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_string" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml" {= "6.0.1+ox"} "js_of_ocaml-ppx" {= "6.0.1+ox"} @@ -40,7 +41,7 @@ A ppx that takes in css strings and produces a module for accessing the unique n """ url { src: - "https://github.com/janestreet/ppx_css/archive/6d514cadc457a185af9f2f063d21dc8bd06fe025.tar.gz" + "https://github.com/janestreet/ppx_css/archive/b74abcba0486d782f73e6d27b7b581f867217cf2.tar.gz" checksum: - "sha256=968e125b06b2aaf669bdf095cc91c7effcb5ec99ef46cd7222c7999e18081e49" + "sha256=5a79ab68d0771acca7f1dcfe73ccab5f0afe56d955ffbe4adecc78ed8baa5290" } diff --git a/packages/ppx_csv_conv/ppx_csv_conv.v0.18~preview.130.36+326/opam b/packages/ppx_csv_conv/ppx_csv_conv.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/ppx_csv_conv/ppx_csv_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_csv_conv/ppx_csv_conv.v0.18~preview.130.55+197/opam index 02af00342f..a30fa00dd6 100644 --- a/packages/ppx_csv_conv/ppx_csv_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_csv_conv/ppx_csv_conv.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "csvfields" {= "v0.18~preview.130.36+326"} - "ppx_conv_func" {= "v0.18~preview.130.36+326"} - "ppx_fields_conv" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "csvfields" {= "v0.18~preview.130.55+197"} + "ppx_conv_func" {= "v0.18~preview.130.55+197"} + "ppx_fields_conv" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -26,7 +26,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_csv_conv/archive/e68bc79377530856d5a690c93c768cce2064684d.tar.gz" + "https://github.com/janestreet/ppx_csv_conv/archive/25267ff6b3d4cd6832e4041f67fa5c54ec65af16.tar.gz" checksum: - "sha256=e3bcc20de99e9d95410abc051d4cefe9e595ae07a0da026c75d22834bee354bd" + "sha256=f53b875f2f36589d0b05a6b288490d831c806c0622f012169ff1cf8375e1a266" } diff --git a/packages/ppx_custom_printf/ppx_custom_printf.v0.18~preview.130.36+326/opam b/packages/ppx_custom_printf/ppx_custom_printf.v0.18~preview.130.55+197/opam similarity index 73% rename from packages/ppx_custom_printf/ppx_custom_printf.v0.18~preview.130.36+326/opam rename to packages/ppx_custom_printf/ppx_custom_printf.v0.18~preview.130.55+197/opam index 3c86164a39..dcdccb7abc 100644 --- a/packages/ppx_custom_printf/ppx_custom_printf.v0.18~preview.130.36+326/opam +++ b/packages/ppx_custom_printf/ppx_custom_printf.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -24,7 +24,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_custom_printf/archive/8ffdc00a06738fc5c2664e294a9bb2e0d5e04556.tar.gz" + "https://github.com/janestreet/ppx_custom_printf/archive/bcd742ae35f6999dabb5b56aaba9269a107cd96f.tar.gz" checksum: - "sha256=b9492e1e7656968cd04f766194be2fd42ae504abbdcc71ff70e1973c19c3367d" + "sha256=45fdd79931fb49620bb882a5c60f78b147d2601f2e44759e28ef061516409d11" } diff --git a/packages/ppx_debug_assert/ppx_debug_assert.v0.18~preview.130.36+326/opam b/packages/ppx_debug_assert/ppx_debug_assert.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/ppx_debug_assert/ppx_debug_assert.v0.18~preview.130.36+326/opam rename to packages/ppx_debug_assert/ppx_debug_assert.v0.18~preview.130.55+197/opam index 2c03014a2d..a906001f69 100644 --- a/packages/ppx_debug_assert/ppx_debug_assert.v0.18~preview.130.36+326/opam +++ b/packages/ppx_debug_assert/ppx_debug_assert.v0.18~preview.130.55+197/opam @@ -11,11 +11,9 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.2.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} + "ocaml" {>= "5.2.0"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Ppx for debug assertions" @@ -24,7 +22,7 @@ A ppx rewriter for debug assertions. """ url { src: - "https://github.com/janestreet/ppx_debug_assert/archive/efbf0b6369c4687353e641ef7c5a4b0612361c04.tar.gz" + "https://github.com/janestreet/ppx_debug_assert/archive/99db83036000ae4386f745aa4f64823f172a2697.tar.gz" checksum: - "sha256=440786c6661b44bee64dae050573d83cea6f7fd617dcb0f0d04925cfe5230b07" + "sha256=8394cccfd7305455f6a6eb03397afc5b402f8b247a1125a1589a2fd3776c7707" } diff --git a/packages/ppx_demo/ppx_demo.v0.18~preview.130.36+326/opam b/packages/ppx_demo/ppx_demo.v0.18~preview.130.36+326/opam deleted file mode 100644 index cb0239ce21..0000000000 --- a/packages/ppx_demo/ppx_demo.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,31 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/ppx_demo" -bug-reports: "https://github.com/janestreet/ppx_demo/issues" -dev-repo: "git+https://github.com/janestreet/ppx_demo.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_demo/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "dedent" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: - "PPX that exposes the source code string of an expression/module structure." -description: """ -PPX that exposes the source code string of an expression/module structure. -""" -url { - src: - "https://github.com/janestreet/ppx_demo/archive/3b2196ff03ddbdc7b8b19372b103e4ae3526f825.tar.gz" - checksum: - "sha256=8d9239909d3c11c18dbd32b296c903bf062ef073bf2a7419ea9afac1063d4c82" -} diff --git a/packages/ppx_demo/ppx_demo.v0.18~preview.130.55+197/opam b/packages/ppx_demo/ppx_demo.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..72cb91b9ed --- /dev/null +++ b/packages/ppx_demo/ppx_demo.v0.18~preview.130.55+197/opam @@ -0,0 +1,37 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_demo" +bug-reports: "https://github.com/janestreet/ppx_demo/issues" +dev-repo: "git+https://github.com/janestreet/ppx_demo.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_demo/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "dedent" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_module_timer" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "re2" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "PPX that exposes the source code string of an expression/module structure." +description: """ +PPX that exposes the source code string of an expression/module structure. +""" +url { + src: + "https://github.com/janestreet/ppx_demo/archive/7a94f8cf47743dde73f378199b99122ca17c86bb.tar.gz" + checksum: + "sha256=006da03dda861fab0e75fbe1ad8ef80f1e14e4bf849389d5a9e1b31d44016e59" +} diff --git a/packages/ppx_derive_at_runtime/ppx_derive_at_runtime.v0.18~preview.130.36+326/opam b/packages/ppx_derive_at_runtime/ppx_derive_at_runtime.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/ppx_derive_at_runtime/ppx_derive_at_runtime.v0.18~preview.130.36+326/opam rename to packages/ppx_derive_at_runtime/ppx_derive_at_runtime.v0.18~preview.130.55+197/opam index 8a7bf74f1b..f290afad05 100644 --- a/packages/ppx_derive_at_runtime/ppx_derive_at_runtime.v0.18~preview.130.36+326/opam +++ b/packages/ppx_derive_at_runtime/ppx_derive_at_runtime.v0.18~preview.130.55+197/opam @@ -12,10 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ocaml-compiler-libs" {= "v0.17.0+ox"} "ppxlib" {= "0.33.0+ox"} @@ -30,7 +31,7 @@ specify a module path such as `My_library.Foo`. """ url { src: - "https://github.com/janestreet/ppx_derive_at_runtime/archive/2c1ae8963b51511be1a7670bbe4aad03f1911f10.tar.gz" + "https://github.com/janestreet/ppx_derive_at_runtime/archive/909456f2be9cd75ddc2e3ae91ca8cbca7bf9b93c.tar.gz" checksum: - "sha256=93e6926595db5c9f852414530d30c273f0da0bd6941f7904cba4f4cde50dfc42" + "sha256=e361554cffe2cb8ad04b22623213d704dc42d2de2c3ad9e3ae8a3d09e95dc38a" } diff --git a/packages/ppx_diff/ppx_diff.v0.18~preview.130.36+326/opam b/packages/ppx_diff/ppx_diff.v0.18~preview.130.55+197/opam similarity index 62% rename from packages/ppx_diff/ppx_diff.v0.18~preview.130.36+326/opam rename to packages/ppx_diff/ppx_diff.v0.18~preview.130.55+197/opam index c03ceeb649..e17f404485 100644 --- a/packages/ppx_diff/ppx_diff.v0.18~preview.130.36+326/opam +++ b/packages/ppx_diff/ppx_diff.v0.18~preview.130.55+197/opam @@ -11,12 +11,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_enumerate" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_enumerate" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -28,7 +28,7 @@ A PPX rewriter that generates the implementation of [Ldiffable.S]. Generates dif """ url { src: - "https://github.com/janestreet/ppx_diff/archive/740b76fa2a39439e13e7ea0d0e509a8daa95e882.tar.gz" + "https://github.com/janestreet/ppx_diff/archive/b0e4b0ba8cab6fdfacc327f9b73619f51d47267c.tar.gz" checksum: - "sha256=26f1f9bbf652e0aa0b695e02c69e0802326431f82076fd138b77cc40ffa96dee" + "sha256=23fdeb4ca373c08b1464b03519fec46c25216ea6dd44f51a8fd70a6261883a6d" } diff --git a/packages/ppx_disable_unused_warnings/ppx_disable_unused_warnings.v0.18~preview.130.36+326/opam b/packages/ppx_disable_unused_warnings/ppx_disable_unused_warnings.v0.18~preview.130.55+197/opam similarity index 83% rename from packages/ppx_disable_unused_warnings/ppx_disable_unused_warnings.v0.18~preview.130.36+326/opam rename to packages/ppx_disable_unused_warnings/ppx_disable_unused_warnings.v0.18~preview.130.55+197/opam index 2d16c1ac71..40e8194f30 100644 --- a/packages/ppx_disable_unused_warnings/ppx_disable_unused_warnings.v0.18~preview.130.36+326/opam +++ b/packages/ppx_disable_unused_warnings/ppx_disable_unused_warnings.v0.18~preview.130.55+197/opam @@ -13,7 +13,6 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +24,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_disable_unused_warnings/archive/cd4e07db084ea7504cba573cf1413cb720c5923f.tar.gz" + "https://github.com/janestreet/ppx_disable_unused_warnings/archive/1159e3d1e624b4b1f2912080e50657d3520e1ff7.tar.gz" checksum: - "sha256=ee8283480256ed6cdf98aa36349d04e831a8d4870ac08a804fd2ea97ce402af2" + "sha256=3ca05f9c4713db1e982e5567d9a521ee3731add6b239060f2b36657465207d8d" } diff --git a/packages/ppx_embed_file/ppx_embed_file.v0.18~preview.130.36+326/opam b/packages/ppx_embed_file/ppx_embed_file.v0.18~preview.130.55+197/opam similarity index 74% rename from packages/ppx_embed_file/ppx_embed_file.v0.18~preview.130.36+326/opam rename to packages/ppx_embed_file/ppx_embed_file.v0.18~preview.130.55+197/opam index edc45fdbb2..05344da111 100644 --- a/packages/ppx_embed_file/ppx_embed_file.v0.18~preview.130.36+326/opam +++ b/packages/ppx_embed_file/ppx_embed_file.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +25,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_embed_file/archive/8c955a6fcb53baf0de8345471599888ce5d85f43.tar.gz" + "https://github.com/janestreet/ppx_embed_file/archive/35637f0827c385a0fe565bfdd5a1dd0902f5982d.tar.gz" checksum: - "sha256=3be677da300395b8d7506de3ed5cf969329c1b5b34e9c2ddf2ebfbc6547d9f50" + "sha256=a8d6dc00c9380dfc7f9a69117d10369925e35b7d84a362497195c7cbdc677511" } diff --git a/packages/ppx_enumerate/ppx_enumerate.v0.18~preview.130.36+326/opam b/packages/ppx_enumerate/ppx_enumerate.v0.18~preview.130.55+197/opam similarity index 76% rename from packages/ppx_enumerate/ppx_enumerate.v0.18~preview.130.36+326/opam rename to packages/ppx_enumerate/ppx_enumerate.v0.18~preview.130.55+197/opam index 9e7a23faef..50e1b21ea1 100644 --- a/packages/ppx_enumerate/ppx_enumerate.v0.18~preview.130.36+326/opam +++ b/packages/ppx_enumerate/ppx_enumerate.v0.18~preview.130.55+197/opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -23,7 +23,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_enumerate/archive/1bbaa813819cc1b1f9462ae6c6743d2f96024bf4.tar.gz" + "https://github.com/janestreet/ppx_enumerate/archive/290553cfb8d276820ed928c7d00e01acea2c29a1.tar.gz" checksum: - "sha256=408a926bc814c118ea6edc5dba17b55622cbeb2d9d0ea7d585d9bd970ef54c25" + "sha256=af1eb3b295f669efb5cccc703d4226665bca3bff5f036c730ee4fc21df963417" } diff --git a/packages/ppx_expect/ppx_expect.v0.18~preview.130.36+326/opam b/packages/ppx_expect/ppx_expect.v0.18~preview.130.55+197/opam similarity index 57% rename from packages/ppx_expect/ppx_expect.v0.18~preview.130.36+326/opam rename to packages/ppx_expect/ppx_expect.v0.18~preview.130.55+197/opam index df628a4fd2..074c8d35c6 100644 --- a/packages/ppx_expect/ppx_expect.v0.18~preview.130.36+326/opam +++ b/packages/ppx_expect/ppx_expect.v0.18~preview.130.55+197/opam @@ -12,10 +12,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_inline_test" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "basement" {= "v0.18~preview.130.55+197"} + "portable" {= "v0.18~preview.130.55+197"} + "ppx_fuelproof" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_inline_test" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -26,7 +29,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_expect/archive/1605047ed9d43a88698d4591e073df2468780475.tar.gz" + "https://github.com/janestreet/ppx_expect/archive/79f199d82e0c0aad95a5929ab7edd8810a7e2aaf.tar.gz" checksum: - "sha256=a862525bb7c7364168006e5c96fd5837d3c940685a660864687cd2bebda5e95a" + "sha256=909827c7efe7af21f65b71a362b0470cdc2db853ccc0119eac1315baa4936f8c" } diff --git a/packages/ppx_fields_conv/ppx_fields_conv.v0.18~preview.130.36+326/opam b/packages/ppx_fields_conv/ppx_fields_conv.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/ppx_fields_conv/ppx_fields_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_fields_conv/ppx_fields_conv.v0.18~preview.130.55+197/opam index b582b3052e..2cc8e6680f 100644 --- a/packages/ppx_fields_conv/ppx_fields_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_fields_conv/ppx_fields_conv.v0.18~preview.130.55+197/opam @@ -12,9 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "fieldslib" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "fieldslib" {= "v0.18~preview.130.55+197"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +26,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_fields_conv/archive/467490d63e6926cb9675209a6bc729ff59f34663.tar.gz" + "https://github.com/janestreet/ppx_fields_conv/archive/4878c9ae5aa61e4f7022cf00107ed7fcd3c989e9.tar.gz" checksum: - "sha256=965041c25be47d146bba354e9c07f4eedf327904578062ab527273789fab8ee1" + "sha256=44b45853dff7e3d0f211d393cc91cbc05c8916a40fb5ce3dec167431b892abd0" } diff --git a/packages/ppx_fixed_literal/ppx_fixed_literal.v0.18~preview.130.36+326/opam b/packages/ppx_fixed_literal/ppx_fixed_literal.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/ppx_fixed_literal/ppx_fixed_literal.v0.18~preview.130.36+326/opam rename to packages/ppx_fixed_literal/ppx_fixed_literal.v0.18~preview.130.55+197/opam index 0d4d045e88..dc64592735 100644 --- a/packages/ppx_fixed_literal/ppx_fixed_literal.v0.18~preview.130.36+326/opam +++ b/packages/ppx_fixed_literal/ppx_fixed_literal.v0.18~preview.130.55+197/opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -24,7 +24,7 @@ form 1.0v to conversion functions currently in scope. """ url { src: - "https://github.com/janestreet/ppx_fixed_literal/archive/92de132b657901651533b4d284dc73753234dc0c.tar.gz" + "https://github.com/janestreet/ppx_fixed_literal/archive/181131270fb1e20fbe0f59695b84cf6919bd161e.tar.gz" checksum: - "sha256=a06b64838b513948a9ed21eda754ac5f22306f00869c9dd57caff723479d9a6a" + "sha256=8bdaa2f9b07caefae41838a88f2a9204e21244fafc8f3e1f84d52bce025ad6c9" } diff --git a/packages/ppx_for_loop/ppx_for_loop.v0.18~preview.130.36+326/opam b/packages/ppx_for_loop/ppx_for_loop.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/ppx_for_loop/ppx_for_loop.v0.18~preview.130.36+326/opam rename to packages/ppx_for_loop/ppx_for_loop.v0.18~preview.130.55+197/opam index 5087b5dec4..a86e969ed9 100644 --- a/packages/ppx_for_loop/ppx_for_loop.v0.18~preview.130.36+326/opam +++ b/packages/ppx_for_loop/ppx_for_loop.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "unboxed" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "unboxed" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +25,7 @@ ppx_for_loop is a ppx rewriter that allows one to write `for` loops indexed by u """ url { src: - "https://github.com/janestreet/ppx_for_loop/archive/63a381c6715b1e44db213ee369a032538e5aa921.tar.gz" + "https://github.com/janestreet/ppx_for_loop/archive/17a186ba71f555cda09c0fdd80050ce0f7f9d4b7.tar.gz" checksum: - "sha256=10bd390131d5710952f0c72158ea4802bd2fdd255678d0b08d022b44f0a62db8" + "sha256=4cc2f1bd97d726e2714c57666e20285daadec8d54b297570c32a532648aff7af" } diff --git a/packages/ppx_fuelproof/.generated b/packages/ppx_fuelproof/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/ppx_fuelproof/ppx_fuelproof.v0.18~preview.130.55+197/opam b/packages/ppx_fuelproof/ppx_fuelproof.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..e094df151a --- /dev/null +++ b/packages/ppx_fuelproof/ppx_fuelproof.v0.18~preview.130.55+197/opam @@ -0,0 +1,39 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_fuelproof" +bug-reports: "https://github.com/janestreet/ppx_fuelproof/issues" +dev-repo: "git+https://github.com/janestreet/ppx_fuelproof.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_fuelproof/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Get better error messages and improve mode crossing for types" +description: """ +ppx_fuelproof helps work around several issues when trying to make your +type mode-cross in the way you want: + + 1. It generates better error messages when your type doesn't mode-cross. + 2. It helps you avoid running out of fuel. (The mode-crossing check in + the compiler limits how hard it will try to prove mode-crossing.) + 3. It lets you have some amount of mode-crossing GADTs. +""" +url { + src: + "https://github.com/janestreet/ppx_fuelproof/archive/2f8f27509658813a0711e49a343066ba47f61ce9.tar.gz" + checksum: + "sha256=407e412eb81575fbb64eb0903a9f53968c9aad37f2e3e3ec6a31dded5fe92702" +} diff --git a/packages/ppx_globalize/ppx_globalize.v0.18~preview.130.36+326/opam b/packages/ppx_globalize/ppx_globalize.v0.18~preview.130.55+197/opam similarity index 73% rename from packages/ppx_globalize/ppx_globalize.v0.18~preview.130.36+326/opam rename to packages/ppx_globalize/ppx_globalize.v0.18~preview.130.55+197/opam index 8c906818d6..94a14aa89e 100644 --- a/packages/ppx_globalize/ppx_globalize.v0.18~preview.130.36+326/opam +++ b/packages/ppx_globalize/ppx_globalize.v0.18~preview.130.55+197/opam @@ -12,7 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -24,7 +25,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_globalize/archive/2e0a3adea96db6877e97dcbafac453901f41d747.tar.gz" + "https://github.com/janestreet/ppx_globalize/archive/7aa1eed751b68385bb3b2ce680667563e9bfd54f.tar.gz" checksum: - "sha256=19a02431586778e303f81c966cb60fa7bbda1f116087ee6fc7464da0cff63af7" + "sha256=48f81070f92c764c46eab8736a86bf28547e76ee3eb31ff1de8fb675512c8577" } diff --git a/packages/ppx_hardcaml/ppx_hardcaml.v0.18~preview.130.36+326/opam b/packages/ppx_hardcaml/ppx_hardcaml.v0.18~preview.130.55+197/opam similarity index 76% rename from packages/ppx_hardcaml/ppx_hardcaml.v0.18~preview.130.36+326/opam rename to packages/ppx_hardcaml/ppx_hardcaml.v0.18~preview.130.55+197/opam index 3dc83297fd..cbe46802f4 100644 --- a/packages/ppx_hardcaml/ppx_hardcaml.v0.18~preview.130.36+326/opam +++ b/packages/ppx_hardcaml/ppx_hardcaml.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "hardcaml" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "hardcaml" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -29,7 +29,7 @@ hierarchical designs. """ url { src: - "https://github.com/janestreet/ppx_hardcaml/archive/0046ebebcd52a87e64977721e7162ac1a9b7ee2b.tar.gz" + "https://github.com/janestreet/ppx_hardcaml/archive/dca24b319ba17c23d3666f7e7c136f7855fbf6b4.tar.gz" checksum: - "sha256=8686188e7f82495e231ffb7912b319952d17c8465bb244acdc31f71206f5c4ec" + "sha256=e405ac926990862490d4a259b6534abc7addbe410b0bf669b49df4f70a9fbd9b" } diff --git a/packages/ppx_hash/ppx_hash.v0.18~preview.130.36+326/opam b/packages/ppx_hash/ppx_hash.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/ppx_hash/ppx_hash.v0.18~preview.130.36+326/opam rename to packages/ppx_hash/ppx_hash.v0.18~preview.130.55+197/opam index 6f2cdfcd6d..be8bf163bb 100644 --- a/packages/ppx_hash/ppx_hash.v0.18~preview.130.36+326/opam +++ b/packages/ppx_hash/ppx_hash.v0.18~preview.130.55+197/opam @@ -11,9 +11,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ocaml-compiler-libs" {= "v0.17.0+ox"} "ppxlib" {= "0.33.0+ox"} @@ -26,7 +27,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_hash/archive/06d37b576ce05878961bb03f8c49252b3f9a2695.tar.gz" + "https://github.com/janestreet/ppx_hash/archive/a96445f9170ec9c71725080752e5883906f25e00.tar.gz" checksum: - "sha256=de996f891cf8900665edfa332f4ddab91b707e26488d813bfcee6483e9a2b999" + "sha256=0335a6603e9ca4567b1677d95b4e5869510fb8a23de63e43e3a7463d898353f4" } diff --git a/packages/ppx_helpers/ppx_helpers.v0.18~preview.130.36+326/opam b/packages/ppx_helpers/ppx_helpers.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/ppx_helpers/ppx_helpers.v0.18~preview.130.36+326/opam rename to packages/ppx_helpers/ppx_helpers.v0.18~preview.130.55+197/opam index 50ae4dce6f..38c7a74400 100644 --- a/packages/ppx_helpers/ppx_helpers.v0.18~preview.130.36+326/opam +++ b/packages/ppx_helpers/ppx_helpers.v0.18~preview.130.55+197/opam @@ -11,9 +11,10 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.1.0"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} + "ocaml" {>= "5.1.0"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Miscellaneous helpers for writing PPXes" @@ -22,7 +23,7 @@ Part of the Jane Street PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_helpers/archive/9350551d390e8a64ccff7ec4f3d4c288bc92cbba.tar.gz" + "https://github.com/janestreet/ppx_helpers/archive/0b47c7893f067baf36b9128607d844f646b6cd32.tar.gz" checksum: - "sha256=d59a1f0703e5b5a4a87a29834d067cfcbf6911412197744ecb0df02f45fbed6f" + "sha256=6fdeff284d56a956dbcabe6c54f95295fcfabc72e74387c3cc2ad5f57aa05c03" } diff --git a/packages/ppx_here/ppx_here.v0.18~preview.130.36+326/opam b/packages/ppx_here/ppx_here.v0.18~preview.130.55+197/opam similarity index 75% rename from packages/ppx_here/ppx_here.v0.18~preview.130.36+326/opam rename to packages/ppx_here/ppx_here.v0.18~preview.130.55+197/opam index c325372a87..2849831c67 100644 --- a/packages/ppx_here/ppx_here.v0.18~preview.130.36+326/opam +++ b/packages/ppx_here/ppx_here.v0.18~preview.130.55+197/opam @@ -11,7 +11,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -22,7 +22,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_here/archive/0d027c845611a0f2bce5423c7262c0a9e80a4e62.tar.gz" + "https://github.com/janestreet/ppx_here/archive/af1c502efeeae19e51a3011f97de3d534c35247d.tar.gz" checksum: - "sha256=e44c507cf1e9790faac6e3ef2d6a8ffdff254013d2b14a961a92f32ad7337a65" + "sha256=d5dfa41252f621cffc619d6ca137b6df9582093652cf9161b50960ed023b455c" } diff --git a/packages/ppx_html/ppx_html.v0.18~preview.130.36+326/opam b/packages/ppx_html/ppx_html.v0.18~preview.130.55+197/opam similarity index 55% rename from packages/ppx_html/ppx_html.v0.18~preview.130.36+326/opam rename to packages/ppx_html/ppx_html.v0.18~preview.130.55+197/opam index 3dd59ef1ee..66d25dce85 100644 --- a/packages/ppx_html/ppx_html.v0.18~preview.130.36+326/opam +++ b/packages/ppx_html/ppx_html.v0.18~preview.130.55+197/opam @@ -11,15 +11,15 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "expectable" {= "v0.18~preview.130.36+326"} - "patdiff" {= "v0.18~preview.130.36+326"} - "ppx_css" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "expectable" {= "v0.18~preview.130.55+197"} + "patdiff" {= "v0.18~preview.130.55+197"} + "ppx_css" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "angstrom" {>= "0.15.0"} "dune" {>= "3.17.0"} "ocaml-compiler-libs" {= "v0.17.0+ox"} @@ -33,7 +33,7 @@ PPX_HTML is a way of constructing Vdom.Node.t's using HTML syntax. """ url { src: - "https://github.com/janestreet/ppx_html/archive/d4333560cb8b3af3d35b000f7a8c673bbd2eb285.tar.gz" + "https://github.com/janestreet/ppx_html/archive/1e78ea9cd732d6c0cb6914a56a11114352f3f7bc.tar.gz" checksum: - "sha256=a24c1b6af55ace197fc360f4d4d0e734a1d3bac517b6a9a2764be54c81b15c00" + "sha256=1b7a13f86c5b8f1be62c7a6238d12d6ba73c0eb52dc50c210c29af31cdfa6494" } diff --git a/packages/ppx_ignore_instrumentation/ppx_ignore_instrumentation.v0.18~preview.130.36+326/opam b/packages/ppx_ignore_instrumentation/ppx_ignore_instrumentation.v0.18~preview.130.55+197/opam similarity index 87% rename from packages/ppx_ignore_instrumentation/ppx_ignore_instrumentation.v0.18~preview.130.36+326/opam rename to packages/ppx_ignore_instrumentation/ppx_ignore_instrumentation.v0.18~preview.130.55+197/opam index 931683c20e..096f54a59a 100644 --- a/packages/ppx_ignore_instrumentation/ppx_ignore_instrumentation.v0.18~preview.130.36+326/opam +++ b/packages/ppx_ignore_instrumentation/ppx_ignore_instrumentation.v0.18~preview.130.55+197/opam @@ -24,7 +24,7 @@ Ignore Jane Street specific instrumentation extensions from internal PPXs or com """ url { src: - "https://github.com/janestreet/ppx_ignore_instrumentation/archive/71b3d7af6e7f4fe2617b447fb71b233211f919d4.tar.gz" + "https://github.com/janestreet/ppx_ignore_instrumentation/archive/b460cf50594ce91f70c962f9c7ff393499ab79cf.tar.gz" checksum: - "sha256=41f20849284b815ee73a10a5987a9e625ad29cab7d4beeff5fab8f0a9d3338b5" + "sha256=492b06578131f87c40d0454793e80c96322adc010b138bdce3c4e67349453594" } diff --git a/packages/ppx_inline_test/ppx_inline_test.v0.18~preview.130.36+326/opam b/packages/ppx_inline_test/ppx_inline_test.v0.18~preview.130.55+197/opam similarity index 56% rename from packages/ppx_inline_test/ppx_inline_test.v0.18~preview.130.36+326/opam rename to packages/ppx_inline_test/ppx_inline_test.v0.18~preview.130.55+197/opam index 57cc27f4f1..40668f7b39 100644 --- a/packages/ppx_inline_test/ppx_inline_test.v0.18~preview.130.36+326/opam +++ b/packages/ppx_inline_test/ppx_inline_test.v0.18~preview.130.55+197/opam @@ -11,12 +11,14 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} - "time_now" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "basement" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} + "time_now" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Syntax extension for writing in-line tests in ocaml code" @@ -25,7 +27,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_inline_test/archive/646c8a197e0f258478fe43558bae48adb287794b.tar.gz" + "https://github.com/janestreet/ppx_inline_test/archive/ba7de8054a76c8402fbddc62cc3a07bf5a6b64f0.tar.gz" checksum: - "sha256=04a0a354a560e8cf5748885b5b75f558e9ae4389394b22c2b966105af00913f5" + "sha256=c8777cd65d8932930be0d7688f6be72be2c67ff0d2efe0bba7df73588526dfd8" } diff --git a/packages/ppx_jane/ppx_jane.v0.18~preview.130.36+326/opam b/packages/ppx_jane/ppx_jane.v0.18~preview.130.36+326/opam deleted file mode 100644 index 137ff5bc09..0000000000 --- a/packages/ppx_jane/ppx_jane.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,59 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/ppx_jane" -bug-reports: "https://github.com/janestreet/ppx_jane/issues" -dev-repo: "git+https://github.com/janestreet/ppx_jane.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_jane/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "base_quickcheck" {= "v0.18~preview.130.36+326"} - "ppx_assert" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "ppx_bench" {= "v0.18~preview.130.36+326"} - "ppx_bin_prot" {= "v0.18~preview.130.36+326"} - "ppx_custom_printf" {= "v0.18~preview.130.36+326"} - "ppx_disable_unused_warnings" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_fields_conv" {= "v0.18~preview.130.36+326"} - "ppx_fixed_literal" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_ignore_instrumentation" {= "v0.18~preview.130.36+326"} - "ppx_inline_test" {= "v0.18~preview.130.36+326"} - "ppx_let" {= "v0.18~preview.130.36+326"} - "ppx_log" {= "v0.18~preview.130.36+326"} - "ppx_module_timer" {= "v0.18~preview.130.36+326"} - "ppx_optional" {= "v0.18~preview.130.36+326"} - "ppx_pipebang" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} - "ppx_sexp_value" {= "v0.18~preview.130.36+326"} - "ppx_shorthand" {= "v0.18~preview.130.36+326"} - "ppx_stable" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "ppx_string" {= "v0.18~preview.130.36+326"} - "ppx_string_conv" {= "v0.18~preview.130.36+326"} - "ppx_template" {= "v0.18~preview.130.36+326"} - "ppx_tydi" {= "v0.18~preview.130.36+326"} - "ppx_typed_fields" {= "v0.18~preview.130.36+326"} - "ppx_typerep_conv" {= "v0.18~preview.130.36+326"} - "ppx_var_name" {= "v0.18~preview.130.36+326"} - "ppx_variants_conv" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "Standard Jane Street ppx rewriters" -description: """ -This package installs a ppx-jane executable, which is a ppx driver -including all standard Jane Street ppx rewriters. -""" -url { - src: - "https://github.com/janestreet/ppx_jane/archive/fc8f6ed19d12ff72587b3a6bf075a8c98aab958f.tar.gz" - checksum: - "sha256=34025a520b8f3d36373d2d4b2c640f37845fc715226286565979959b7e88cd8f" -} diff --git a/packages/ppx_jane/ppx_jane.v0.18~preview.130.55+197/opam b/packages/ppx_jane/ppx_jane.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..776a845fe2 --- /dev/null +++ b/packages/ppx_jane/ppx_jane.v0.18~preview.130.55+197/opam @@ -0,0 +1,59 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_jane" +bug-reports: "https://github.com/janestreet/ppx_jane/issues" +dev-repo: "git+https://github.com/janestreet/ppx_jane.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_jane/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base_quickcheck" {= "v0.18~preview.130.55+197"} + "ppx_assert" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "ppx_bench" {= "v0.18~preview.130.55+197"} + "ppx_bin_prot" {= "v0.18~preview.130.55+197"} + "ppx_custom_printf" {= "v0.18~preview.130.55+197"} + "ppx_disable_unused_warnings" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_fields_conv" {= "v0.18~preview.130.55+197"} + "ppx_fixed_literal" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_ignore_instrumentation" {= "v0.18~preview.130.55+197"} + "ppx_inline_test" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_log" {= "v0.18~preview.130.55+197"} + "ppx_module_timer" {= "v0.18~preview.130.55+197"} + "ppx_optional" {= "v0.18~preview.130.55+197"} + "ppx_pipebang" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} + "ppx_sexp_value" {= "v0.18~preview.130.55+197"} + "ppx_shorthand" {= "v0.18~preview.130.55+197"} + "ppx_stable" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "ppx_string" {= "v0.18~preview.130.55+197"} + "ppx_string_conv" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "ppx_tydi" {= "v0.18~preview.130.55+197"} + "ppx_typed_fields" {= "v0.18~preview.130.55+197"} + "ppx_typerep_conv" {= "v0.18~preview.130.55+197"} + "ppx_var_name" {= "v0.18~preview.130.55+197"} + "ppx_variants_conv" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Standard Jane Street ppx rewriters" +description: """ +This package installs a ppx-jane executable, which is a ppx driver +including all standard Jane Street ppx rewriters. +""" +url { + src: + "https://github.com/janestreet/ppx_jane/archive/20654d9f0590a264519e5895320d6a02945b9c67.tar.gz" + checksum: + "sha256=157269bc4eb78e14be22949de0df0bd4ba8d0a1965eb5f0b8aaf5cfe6164166f" +} diff --git a/packages/ppx_js_style/ppx_js_style.v0.18~preview.130.36+326/opam b/packages/ppx_js_style/ppx_js_style.v0.18~preview.130.55+197/opam similarity index 76% rename from packages/ppx_js_style/ppx_js_style.v0.18~preview.130.36+326/opam rename to packages/ppx_js_style/ppx_js_style.v0.18~preview.130.55+197/opam index d7b6102377..0097a9636e 100644 --- a/packages/ppx_js_style/ppx_js_style.v0.18~preview.130.36+326/opam +++ b/packages/ppx_js_style/ppx_js_style.v0.18~preview.130.55+197/opam @@ -12,7 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ocaml-compiler-libs" {= "v0.17.0+ox"} "odoc-parser" @@ -28,7 +29,7 @@ enforce some coding conventions across all Jane Street packages. """ url { src: - "https://github.com/janestreet/ppx_js_style/archive/2133476dea9e842f328d27124d5cc4901aaa5b1e.tar.gz" + "https://github.com/janestreet/ppx_js_style/archive/064914d7e339951b4754befbbd3edeb17e84c962.tar.gz" checksum: - "sha256=d208b71b5a13b71984a1d463eedaa43ef513c12ae1e3d94332d67e24bfcf7292" + "sha256=1215065d382f82b77131d151abda90234f94e7d9826539c125dd46aab095fa1c" } diff --git a/packages/ppx_jsonaf_conv/ppx_jsonaf_conv.v0.18~preview.130.36+326/opam b/packages/ppx_jsonaf_conv/ppx_jsonaf_conv.v0.18~preview.130.55+197/opam similarity index 55% rename from packages/ppx_jsonaf_conv/ppx_jsonaf_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_jsonaf_conv/ppx_jsonaf_conv.v0.18~preview.130.55+197/opam index a6862cf2e4..0c3eab66a0 100644 --- a/packages/ppx_jsonaf_conv/ppx_jsonaf_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_jsonaf_conv/ppx_jsonaf_conv.v0.18~preview.130.55+197/opam @@ -11,13 +11,14 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "jsonaf" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "capitalization" {= "v0.18~preview.130.55+197"} + "jsonaf" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "[@@deriving] plugin to generate Jsonaf conversion functions" @@ -26,7 +27,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_jsonaf_conv/archive/b76726b0cd2566abdc865ed78892dbf5fd041721.tar.gz" + "https://github.com/janestreet/ppx_jsonaf_conv/archive/ac829a5e3c7e8fe0710d8736cb41845c6d1ed771.tar.gz" checksum: - "sha256=589e7a1f47ac6a6115618f4f18c1a9f97a375caa9651cbd47923772e821149c9" + "sha256=a7aedd039cfded41a5f6c5b5ec5597fa2ee93d982ecc32d4e314e152f1c37971" } diff --git a/packages/ppx_let/ppx_let.v0.18~preview.130.36+326/opam b/packages/ppx_let/ppx_let.v0.18~preview.130.55+197/opam similarity index 68% rename from packages/ppx_let/ppx_let.v0.18~preview.130.36+326/opam rename to packages/ppx_let/ppx_let.v0.18~preview.130.55+197/opam index 8c5d948ff1..a659220f63 100644 --- a/packages/ppx_let/ppx_let.v0.18~preview.130.36+326/opam +++ b/packages/ppx_let/ppx_let.v0.18~preview.130.55+197/opam @@ -11,9 +11,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -24,7 +24,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_let/archive/67a4f29a4f20486b6e5d61850a6694e62a15daa9.tar.gz" + "https://github.com/janestreet/ppx_let/archive/71ecad8e1b7c4bce0e0be983d54373048213ef37.tar.gz" checksum: - "sha256=1b55b292ff61945f2dc20ff51707addcf934c2f7a4ab7e3840274287d3d309fe" + "sha256=b6cf607998359bebae94d7e2a48a567bee4d012408c2a733ca45702597e657c7" } diff --git a/packages/ppx_log/ppx_log.v0.18~preview.130.36+326/opam b/packages/ppx_log/ppx_log.v0.18~preview.130.36+326/opam deleted file mode 100644 index 87fe3dfce7..0000000000 --- a/packages/ppx_log/ppx_log.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,42 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/ppx_log" -bug-reports: "https://github.com/janestreet/ppx_log/issues" -dev-repo: "git+https://github.com/janestreet/ppx_log.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_log/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_enumerate" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_fields_conv" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_let" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} - "ppx_sexp_value" {= "v0.18~preview.130.36+326"} - "ppx_string" {= "v0.18~preview.130.36+326"} - "ppx_variants_conv" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: - "Ppx_sexp_message-like extension nodes for lazily rendering log messages" -description: """ -Part of the Jane Street's PPX rewriters collection. -""" -url { - src: - "https://github.com/janestreet/ppx_log/archive/ef3ade47f85a078b8e60ad3af97114806122c8d3.tar.gz" - checksum: - "sha256=b258c6e5db02a236a34b323f2e9c7c802a18bdfc282717921f519d9837b7c797" -} diff --git a/packages/ppx_log/ppx_log.v0.18~preview.130.55+197/opam b/packages/ppx_log/ppx_log.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..9a51ca812f --- /dev/null +++ b/packages/ppx_log/ppx_log.v0.18~preview.130.55+197/opam @@ -0,0 +1,42 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_log" +bug-reports: "https://github.com/janestreet/ppx_log/issues" +dev-repo: "git+https://github.com/janestreet/ppx_log.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_log/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_enumerate" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_fields_conv" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} + "ppx_sexp_value" {= "v0.18~preview.130.55+197"} + "ppx_string" {= "v0.18~preview.130.55+197"} + "ppx_variants_conv" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "Ppx_sexp_message-like extension nodes for lazily rendering log messages" +description: """ +Part of the Jane Street's PPX rewriters collection. +""" +url { + src: + "https://github.com/janestreet/ppx_log/archive/f2e575559dd1a3ab392ed6b4e9d2144ef6a2db41.tar.gz" + checksum: + "sha256=1be7093966f4107beafae370c0a4dfc15baea1d28d9df94c25aaebf49c9ccc5b" +} diff --git a/packages/ppx_module_timer/ppx_module_timer.v0.18~preview.130.36+326/opam b/packages/ppx_module_timer/ppx_module_timer.v0.18~preview.130.55+197/opam similarity index 64% rename from packages/ppx_module_timer/ppx_module_timer.v0.18~preview.130.36+326/opam rename to packages/ppx_module_timer/ppx_module_timer.v0.18~preview.130.55+197/opam index 0f0e7f10cf..2a75e5792d 100644 --- a/packages/ppx_module_timer/ppx_module_timer.v0.18~preview.130.36+326/opam +++ b/packages/ppx_module_timer/ppx_module_timer.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "time_now" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "time_now" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -27,7 +27,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_module_timer/archive/df753f77a910c73a32b1a404dea66b3cc87ac34f.tar.gz" + "https://github.com/janestreet/ppx_module_timer/archive/99e4e225ecc3eb6395c6977bbd176724362cd9ce.tar.gz" checksum: - "sha256=0c496ca96642db6298e8f476a29f5fe9f6b0f72ba6182b79f7b643beed3a213e" + "sha256=6cb051d357658e4e0092b902ed1761e2619cf8ee12bcafce636a5956bccc55bc" } diff --git a/packages/ppx_optcomp/ppx_optcomp.v0.18~preview.130.36+326/opam b/packages/ppx_optcomp/ppx_optcomp.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/ppx_optcomp/ppx_optcomp.v0.18~preview.130.36+326/opam rename to packages/ppx_optcomp/ppx_optcomp.v0.18~preview.130.55+197/opam index 0e99ef5850..05782c86ab 100644 --- a/packages/ppx_optcomp/ppx_optcomp.v0.18~preview.130.36+326/opam +++ b/packages/ppx_optcomp/ppx_optcomp.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ocaml-compiler-libs" {= "v0.17.0+ox"} "ppxlib" {= "0.33.0+ox"} @@ -26,7 +26,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_optcomp/archive/2a93b7d2d61d7802e85b43d73dec8d1144ae0c10.tar.gz" + "https://github.com/janestreet/ppx_optcomp/archive/4a6ace4d2a488ca5a350d3939edc99326e43b7cc.tar.gz" checksum: - "sha256=f1229160319477cd7c0e836c2a04af5d3bce261fbe2486450083455e8c099228" + "sha256=d14321688b5b38a3ef98a78c3cd6f0f2ef64c6a4f8233ddf81b16133f1c7d918" } diff --git a/packages/ppx_optional/ppx_optional.v0.18~preview.130.36+326/opam b/packages/ppx_optional/ppx_optional.v0.18~preview.130.55+197/opam similarity index 73% rename from packages/ppx_optional/ppx_optional.v0.18~preview.130.36+326/opam rename to packages/ppx_optional/ppx_optional.v0.18~preview.130.55+197/opam index 79f33bbc20..81758a3a73 100644 --- a/packages/ppx_optional/ppx_optional.v0.18~preview.130.36+326/opam +++ b/packages/ppx_optional/ppx_optional.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +25,7 @@ else expression. """ url { src: - "https://github.com/janestreet/ppx_optional/archive/b98289b958c361675722809e54fd4eb0063dd8a6.tar.gz" + "https://github.com/janestreet/ppx_optional/archive/e82403c538ac504cc88377ea1fcb70ca8b07011d.tar.gz" checksum: - "sha256=aad821a92d0e5a07eb90edaaec0462d93b18fe9f7fef0d32468e6695324fc6ec" + "sha256=c29bcda0402ed215c6831ba0b5f153617dca07fefd5ffafc85781ef4cbcc80ae" } diff --git a/packages/ppx_pattern_bind/ppx_pattern_bind.v0.18~preview.130.36+326/opam b/packages/ppx_pattern_bind/ppx_pattern_bind.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/ppx_pattern_bind/ppx_pattern_bind.v0.18~preview.130.36+326/opam rename to packages/ppx_pattern_bind/ppx_pattern_bind.v0.18~preview.130.55+197/opam index 5754e67c57..1af6cede07 100644 --- a/packages/ppx_pattern_bind/ppx_pattern_bind.v0.18~preview.130.36+326/opam +++ b/packages/ppx_pattern_bind/ppx_pattern_bind.v0.18~preview.130.55+197/opam @@ -11,11 +11,12 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_let" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "A ppx for writing fast incremental bind nodes in a pattern match" @@ -26,7 +27,7 @@ way that causes incremental nodes to fire as little as possible. """ url { src: - "https://github.com/janestreet/ppx_pattern_bind/archive/07028ba54cb0f5011810492aa0f8e7612f9baff1.tar.gz" + "https://github.com/janestreet/ppx_pattern_bind/archive/20ebe67317acf2538bed22f6f34c047f86c818dd.tar.gz" checksum: - "sha256=7d7bedef2d3db2745682e46b0ee74789e54bf10685ffebbd42975ce425d967fd" + "sha256=da930c3383826c8219199a8a8f485ff248341fb68b0ef52045eb75aa94db1bb1" } diff --git a/packages/ppx_pipebang/ppx_pipebang.v0.18~preview.130.36+326/opam b/packages/ppx_pipebang/ppx_pipebang.v0.18~preview.130.55+197/opam similarity index 80% rename from packages/ppx_pipebang/ppx_pipebang.v0.18~preview.130.36+326/opam rename to packages/ppx_pipebang/ppx_pipebang.v0.18~preview.130.55+197/opam index fff6483bf0..952e0c63f1 100644 --- a/packages/ppx_pipebang/ppx_pipebang.v0.18~preview.130.36+326/opam +++ b/packages/ppx_pipebang/ppx_pipebang.v0.18~preview.130.55+197/opam @@ -23,7 +23,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_pipebang/archive/abe92c102a0e83899a932fa682cec15110b07fd9.tar.gz" + "https://github.com/janestreet/ppx_pipebang/archive/782c0a6be69ba7933664ebd3b880232fbf942d44.tar.gz" checksum: - "sha256=9cdfc47ea6b75af1d9dd1a1a6d7fc8cdfb63c1eddf7e61f4d78d3f1cff83bae1" + "sha256=bf6fe929a731fe7dab6f6e6ce18a5a6b5767550a1554597e1c68e46e3cfc6e7b" } diff --git a/packages/ppx_portable/.generated b/packages/ppx_portable/.generated new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/ppx_portable/ppx_portable.v0.18~preview.130.55+197/opam b/packages/ppx_portable/ppx_portable.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..fdeabe988a --- /dev/null +++ b/packages/ppx_portable/ppx_portable.v0.18~preview.130.55+197/opam @@ -0,0 +1,35 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_portable" +bug-reports: "https://github.com/janestreet/ppx_portable/issues" +dev-repo: "git+https://github.com/janestreet/ppx_portable.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_portable/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_js_style" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "Syntactic help for writing portable code, especially Portable_lazy values." +description: """ + +Syntactic help for writing portable code, especially Portable_lazy values. Provides +`lazy%portable` for constructing them and `let%portable rec` for defining recursive and +mutually recursive values using Portable_lazy. +""" +url { + src: + "https://github.com/janestreet/ppx_portable/archive/921c21424489a19dd28767cda12c8f65e4374d6f.tar.gz" + checksum: + "sha256=6f23bc1c95b8072218028c02641302622b82d67c50cdc59069392ed0e95276cc" +} diff --git a/packages/ppx_quick_test/ppx_quick_test.v0.18~preview.130.36+326/opam b/packages/ppx_quick_test/ppx_quick_test.v0.18~preview.130.36+326/opam deleted file mode 100644 index 683357aebe..0000000000 --- a/packages/ppx_quick_test/ppx_quick_test.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,44 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/ppx_quick_test" -bug-reports: "https://github.com/janestreet/ppx_quick_test/issues" -dev-repo: "git+https://github.com/janestreet/ppx_quick_test.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_quick_test/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "base_quickcheck" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_async" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: - "Spiritual equivalent of let%expect_test, but for property based tests as an ergonomic wrapper to write quickcheck tests." -description: """ -Part of the Jane Street's PPX rewriters collection. -""" -url { - src: - "https://github.com/janestreet/ppx_quick_test/archive/87eab3a2a5e48bf45baf4772bbe6b1150d5b0c9e.tar.gz" - checksum: - "sha256=c4356d01c21126e5698d01da10eeb62ba76d1175b66f7c7ab97c9caa074b8d66" -} diff --git a/packages/ppx_quick_test/ppx_quick_test.v0.18~preview.130.55+197/opam b/packages/ppx_quick_test/ppx_quick_test.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..a884dceae6 --- /dev/null +++ b/packages/ppx_quick_test/ppx_quick_test.v0.18~preview.130.55+197/opam @@ -0,0 +1,44 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_quick_test" +bug-reports: "https://github.com/janestreet/ppx_quick_test/issues" +dev-repo: "git+https://github.com/janestreet/ppx_quick_test.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_quick_test/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "async" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "base_quickcheck" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_async" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: + "Spiritual equivalent of let%expect_test, but for property based tests as an ergonomic wrapper to write quickcheck tests." +description: """ +Part of the Jane Street's PPX rewriters collection. +""" +url { + src: + "https://github.com/janestreet/ppx_quick_test/archive/015c83ec6ceea417d3a672e2144011d7e9469bd4.tar.gz" + checksum: + "sha256=fdd09bfda8d311104655633fec927871ac22fe0d86f4697722270f4cd0ffa45f" +} diff --git a/packages/ppx_rope/ppx_rope.v0.18~preview.130.36+326/opam b/packages/ppx_rope/ppx_rope.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/ppx_rope/ppx_rope.v0.18~preview.130.36+326/opam rename to packages/ppx_rope/ppx_rope.v0.18~preview.130.55+197/opam index 2a5dc2da87..9e73a6192d 100644 --- a/packages/ppx_rope/ppx_rope.v0.18~preview.130.36+326/opam +++ b/packages/ppx_rope/ppx_rope.v0.18~preview.130.55+197/opam @@ -11,10 +11,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "dedent" {= "v0.18~preview.130.36+326"} - "jane_rope" {= "v0.18~preview.130.36+326"} - "ppx_string" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "dedent" {= "v0.18~preview.130.55+197"} + "jane_rope" {= "v0.18~preview.130.55+197"} + "ppx_string" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +25,7 @@ Construct ropes using using a PPX extension based on ppx_string """ url { src: - "https://github.com/janestreet/ppx_rope/archive/1d021d2b3b997cf3b4c6da60f3766e62af4b148b.tar.gz" + "https://github.com/janestreet/ppx_rope/archive/5ec507b94d0a828dbefb1aa6863931d6153869ef.tar.gz" checksum: - "sha256=27f17a52507ea6df485c28bdb51158ee15697e13c911995198ebc8f587925369" + "sha256=68605adc6c0e8ce16c5848c37201e6ce5cdf28fbf2a20a0e973e72e3d745acc7" } diff --git a/packages/ppx_sexp_conv/ppx_sexp_conv.v0.18~preview.130.36+326/opam b/packages/ppx_sexp_conv/ppx_sexp_conv.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/ppx_sexp_conv/ppx_sexp_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_sexp_conv/ppx_sexp_conv.v0.18~preview.130.55+197/opam index 2b3a9d2b28..4619a28066 100644 --- a/packages/ppx_sexp_conv/ppx_sexp_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_sexp_conv/ppx_sexp_conv.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "basement" {= "v0.18~preview.130.36+326"} - "ppx_helpers" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} + "basement" {= "v0.18~preview.130.55+197"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -26,7 +26,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_sexp_conv/archive/cda919f36b3b6c683369d4cdc031d06883cd91a9.tar.gz" + "https://github.com/janestreet/ppx_sexp_conv/archive/c5e62791166b03ce4c11cbff21e11088b730a059.tar.gz" checksum: - "sha256=8e97c8a01360ca91b19c778fa2a9da7e180f97db50ed6436fbf08ef95337f96e" + "sha256=3e596a47afb5788c136e47d100d4b75a4030c7304d0163bb167bfac92d91509b" } diff --git a/packages/ppx_sexp_message/ppx_sexp_message.v0.18~preview.130.36+326/opam b/packages/ppx_sexp_message/ppx_sexp_message.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/ppx_sexp_message/ppx_sexp_message.v0.18~preview.130.36+326/opam rename to packages/ppx_sexp_message/ppx_sexp_message.v0.18~preview.130.55+197/opam index f8182ad162..33df723f2c 100644 --- a/packages/ppx_sexp_message/ppx_sexp_message.v0.18~preview.130.36+326/opam +++ b/packages/ppx_sexp_message/ppx_sexp_message.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +25,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_sexp_message/archive/738d5d30085410535d998bbbb3bf92ccccec20e8.tar.gz" + "https://github.com/janestreet/ppx_sexp_message/archive/005a191d62119a40859cf99ce247614cb2e2f1e4.tar.gz" checksum: - "sha256=6db599a88a462b240c25b90343ea3dc95d62dcd3014c8d0b55d9d6e975371b48" + "sha256=3abf9f5f32231496b35c8fdc14c3aa9647f10f816a47bdf1b5a4e6d395c6de59" } diff --git a/packages/ppx_sexp_value/ppx_sexp_value.v0.18~preview.130.36+326/opam b/packages/ppx_sexp_value/ppx_sexp_value.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/ppx_sexp_value/ppx_sexp_value.v0.18~preview.130.36+326/opam rename to packages/ppx_sexp_value/ppx_sexp_value.v0.18~preview.130.55+197/opam index d43930fe94..c0c35580ff 100644 --- a/packages/ppx_sexp_value/ppx_sexp_value.v0.18~preview.130.36+326/opam +++ b/packages/ppx_sexp_value/ppx_sexp_value.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -26,7 +26,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_sexp_value/archive/2a09566dd9fc0765f9bf3a527e4b035761e8bb02.tar.gz" + "https://github.com/janestreet/ppx_sexp_value/archive/33473ef6fcd7b35a25bae1ac3369eaa07511a083.tar.gz" checksum: - "sha256=247e555624549b0b03ddbfeb41e92de945352530774cd3aceb2149c87d118c97" + "sha256=0b562ef302a1d964536d14b38d8c726df6d8784ebbc823ae6123946e1bb5c029" } diff --git a/packages/ppx_shorthand/ppx_shorthand.v0.18~preview.130.36+326/opam b/packages/ppx_shorthand/ppx_shorthand.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/ppx_shorthand/ppx_shorthand.v0.18~preview.130.36+326/opam rename to packages/ppx_shorthand/ppx_shorthand.v0.18~preview.130.55+197/opam index 6125ad4c34..88c26faa07 100644 --- a/packages/ppx_shorthand/ppx_shorthand.v0.18~preview.130.36+326/opam +++ b/packages/ppx_shorthand/ppx_shorthand.v0.18~preview.130.55+197/opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -23,7 +23,7 @@ This ppx is a collection of small AST transformations that might not otherwise w """ url { src: - "https://github.com/janestreet/ppx_shorthand/archive/805d22fea524ab99926413c9b93aefdfee407feb.tar.gz" + "https://github.com/janestreet/ppx_shorthand/archive/a67dac3b7656dc5d0ad03d83a094df430c502f47.tar.gz" checksum: - "sha256=a31696cd509439622b2f8e8aa802b4c258d74eb0479792da14e35cb92bb3b684" + "sha256=9a0b06eb8a9f9e7c9052dfaf576454cb5a1c6bdfcaa7164112dbe470688523c7" } diff --git a/packages/ppx_simple_xml_conv/ppx_simple_xml_conv.v0.18~preview.130.36+326/opam b/packages/ppx_simple_xml_conv/ppx_simple_xml_conv.v0.18~preview.130.55+197/opam similarity index 64% rename from packages/ppx_simple_xml_conv/ppx_simple_xml_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_simple_xml_conv/ppx_simple_xml_conv.v0.18~preview.130.55+197/opam index 983f3835de..56e5a76960 100644 --- a/packages/ppx_simple_xml_conv/ppx_simple_xml_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_simple_xml_conv/ppx_simple_xml_conv.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_js_style" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "simple_xml" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_js_style" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "simple_xml" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} "xmlm" {>= "1.4.0"} @@ -33,7 +33,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_simple_xml_conv/archive/a3fb0d5f5269caea3adbad3052a555eadbe93359.tar.gz" + "https://github.com/janestreet/ppx_simple_xml_conv/archive/f30238bf939d9e9e19b8d25dde416f4755266583.tar.gz" checksum: - "sha256=9eee7df5474de3ba2a2c1c5b908d87ac972f1d4981797d03a38b9cf3aece0079" + "sha256=9b681028fd175706a742df9003ad1d2822c622d93fd4733395a3b48fc6d22ef6" } diff --git a/packages/ppx_stable/ppx_stable.v0.18~preview.130.36+326/opam b/packages/ppx_stable/ppx_stable.v0.18~preview.130.55+197/opam similarity index 73% rename from packages/ppx_stable/ppx_stable.v0.18~preview.130.36+326/opam rename to packages/ppx_stable/ppx_stable.v0.18~preview.130.55+197/opam index fbc8bc7ed3..bfed2e0e33 100644 --- a/packages/ppx_stable/ppx_stable.v0.18~preview.130.36+326/opam +++ b/packages/ppx_stable/ppx_stable.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +25,7 @@ identical types. """ url { src: - "https://github.com/janestreet/ppx_stable/archive/8913426c6b2826592e0fad12b0af78e7ae1da657.tar.gz" + "https://github.com/janestreet/ppx_stable/archive/112cae78805104b1fcdb47ef0ab4051a296db819.tar.gz" checksum: - "sha256=dcd4b68e2c9493e8fe225e5317c0a7e1fbbdbbed1460aa4f848b844a26091ac3" + "sha256=510d2d2c22b114b6dedc2302b0b30f047b8d3abdba08702df3f566635945ee79" } diff --git a/packages/ppx_stable_witness/ppx_stable_witness.v0.18~preview.130.36+326/opam b/packages/ppx_stable_witness/ppx_stable_witness.v0.18~preview.130.55+197/opam similarity index 74% rename from packages/ppx_stable_witness/ppx_stable_witness.v0.18~preview.130.36+326/opam rename to packages/ppx_stable_witness/ppx_stable_witness.v0.18~preview.130.55+197/opam index 4b94bce1b5..19171ed874 100644 --- a/packages/ppx_stable_witness/ppx_stable_witness.v0.18~preview.130.36+326/opam +++ b/packages/ppx_stable_witness/ppx_stable_witness.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "basement" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "basement" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -28,7 +28,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_stable_witness/archive/1eb418ee70116df7d78314214e5f6ebeff8ef50a.tar.gz" + "https://github.com/janestreet/ppx_stable_witness/archive/8c5e881059f38b35c6fa81182ee4d217a61dac43.tar.gz" checksum: - "sha256=1dcb383fff419997a4d55bf2b52beb0bbb7834c36c9c5c249ea2436b4ebb68d8" + "sha256=d1b113ae2d0eb104c59595d203ca8b31b2f5687966a5fe80c8e1b791a94e6169" } diff --git a/packages/ppx_string/ppx_string.v0.18~preview.130.36+326/opam b/packages/ppx_string/ppx_string.v0.18~preview.130.55+197/opam similarity index 68% rename from packages/ppx_string/ppx_string.v0.18~preview.130.36+326/opam rename to packages/ppx_string/ppx_string.v0.18~preview.130.55+197/opam index 284eb2c79a..973c923ad0 100644 --- a/packages/ppx_string/ppx_string.v0.18~preview.130.36+326/opam +++ b/packages/ppx_string/ppx_string.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "ppx_template" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +25,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_string/archive/b6ed3a0ad0cd3190b9c1e6a3668db7fa4f2a748e.tar.gz" + "https://github.com/janestreet/ppx_string/archive/d24ea5e3a90ce6c18831d0c06745c57291ce852f.tar.gz" checksum: - "sha256=462aca0b25b1f9bc9670a58a1bc1c13fefc572d16856e47b0e1126a37dbf0481" + "sha256=d4085d5973ca5ca2b2e9db6c9a0b74ccd98dfebfe701fcc7d172a0ae21255161" } diff --git a/packages/ppx_string_conv/ppx_string_conv.v0.18~preview.130.36+326/opam b/packages/ppx_string_conv/ppx_string_conv.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/ppx_string_conv/ppx_string_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_string_conv/ppx_string_conv.v0.18~preview.130.55+197/opam index c0fdcaf1fa..ddfc25832d 100644 --- a/packages/ppx_string_conv/ppx_string_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_string_conv/ppx_string_conv.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "capitalization" {= "v0.18~preview.130.36+326"} - "ppx_let" {= "v0.18~preview.130.36+326"} - "ppx_string" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "capitalization" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_string" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -27,7 +27,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_string_conv/archive/e3d24cd4074326218473c34be6c33736be00ac65.tar.gz" + "https://github.com/janestreet/ppx_string_conv/archive/e9072ce59ab14d0f2dd9b11ac0832e0eeb4bc92b.tar.gz" checksum: - "sha256=6cae4a24abe52821cd5e66a2295d44e74edd88f04e775889ba193a9bd2c1f24a" + "sha256=3ba8163c6b8316b4469eb343f70bc54aadfda1fca0babb66fc01b6174ee8b9e3" } diff --git a/packages/ppx_template/ppx_template.v0.18~preview.130.36+326/opam b/packages/ppx_template/ppx_template.v0.18~preview.130.55+197/opam similarity index 74% rename from packages/ppx_template/ppx_template.v0.18~preview.130.36+326/opam rename to packages/ppx_template/ppx_template.v0.18~preview.130.55+197/opam index 11feef6a58..d37ced4d43 100644 --- a/packages/ppx_template/ppx_template.v0.18~preview.130.36+326/opam +++ b/packages/ppx_template/ppx_template.v0.18~preview.130.55+197/opam @@ -12,8 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} + "ppx_helpers" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +26,7 @@ This PPX rewriter is used internally at Jane Street to simulate polymorphism ove """ url { src: - "https://github.com/janestreet/ppx_template/archive/cca8f54dbd891becf96eafb542afa81d73fad30d.tar.gz" + "https://github.com/janestreet/ppx_template/archive/45c878db6a591436207fe7fbcbf5781ff956a669.tar.gz" checksum: - "sha256=101e6db3d39cef64352b8efdb2a0056d6f97368fc38154d52a33e7d04d6943f2" + "sha256=64596c9a6cc1f358e7c8bb496579054b2a4a22cdb744e5c6aa06f2ba35356f7a" } diff --git a/packages/ppx_tydi/ppx_tydi.v0.18~preview.130.36+326/opam b/packages/ppx_tydi/ppx_tydi.v0.18~preview.130.55+197/opam similarity index 80% rename from packages/ppx_tydi/ppx_tydi.v0.18~preview.130.36+326/opam rename to packages/ppx_tydi/ppx_tydi.v0.18~preview.130.55+197/opam index 54bbc0e7ac..baea2c8f21 100644 --- a/packages/ppx_tydi/ppx_tydi.v0.18~preview.130.36+326/opam +++ b/packages/ppx_tydi/ppx_tydi.v0.18~preview.130.55+197/opam @@ -11,7 +11,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -22,7 +22,7 @@ Provides a ppx for [let%tydi]: type-directed [let] bindings. In [let%tydi a = b """ url { src: - "https://github.com/janestreet/ppx_tydi/archive/ddfda2a0915ac1d94c8b174e20d3bbe36269dae1.tar.gz" + "https://github.com/janestreet/ppx_tydi/archive/085142941df7de438a86db44ebebc0351136afeb.tar.gz" checksum: - "sha256=02e209af848a9be44c2a933a3e29369f94150a4f690ea26450286366947abb42" + "sha256=86222f4134743e8140e34675329c6f5e45174d6d8a724cf90cf48f183f804e4e" } diff --git a/packages/ppx_typed_fields/ppx_typed_fields.v0.18~preview.130.36+326/opam b/packages/ppx_typed_fields/ppx_typed_fields.v0.18~preview.130.36+326/opam deleted file mode 100644 index b0d6e04ad0..0000000000 --- a/packages/ppx_typed_fields/ppx_typed_fields.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,42 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/ppx_typed_fields" -bug-reports: "https://github.com/janestreet/ppx_typed_fields/issues" -dev-repo: "git+https://github.com/janestreet/ppx_typed_fields.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_typed_fields/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_enumerate" {= "v0.18~preview.130.36+326"} - "ppx_globalize" {= "v0.18~preview.130.36+326"} - "ppx_pipebang" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} - "ppx_string" {= "v0.18~preview.130.36+326"} - "ppx_template" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} - "univ_map" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "GADT-based field accessors and utilities" -description: """ -Part of the Jane Street's PPX rewriters collection. -""" -url { - src: - "https://github.com/janestreet/ppx_typed_fields/archive/46711d92f035b06b9f7817835f27b3900d97fcd0.tar.gz" - checksum: - "sha256=a664b3295d5ec6b5a4a0fb97d49a30b377a30502aad9a256611e2988ba047370" -} diff --git a/packages/ppx_typed_fields/ppx_typed_fields.v0.18~preview.130.55+197/opam b/packages/ppx_typed_fields/ppx_typed_fields.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..e42475b277 --- /dev/null +++ b/packages/ppx_typed_fields/ppx_typed_fields.v0.18~preview.130.55+197/opam @@ -0,0 +1,43 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/ppx_typed_fields" +bug-reports: "https://github.com/janestreet/ppx_typed_fields/issues" +dev-repo: "git+https://github.com/janestreet/ppx_typed_fields.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/ppx_typed_fields/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_enumerate" {= "v0.18~preview.130.55+197"} + "ppx_globalize" {= "v0.18~preview.130.55+197"} + "ppx_hash" {= "v0.18~preview.130.55+197"} + "ppx_pipebang" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} + "ppx_string" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} + "univ_map" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "GADT-based field accessors and utilities" +description: """ +Part of the Jane Street's PPX rewriters collection. +""" +url { + src: + "https://github.com/janestreet/ppx_typed_fields/archive/cc947be161c2c9d32fba350eb6d03d0b88e3bba2.tar.gz" + checksum: + "sha256=597aa9c307a088afb51f2a104dd672a73e0cbd6a89e1e3ab7de95f897d102042" +} diff --git a/packages/ppx_typerep_conv/ppx_typerep_conv.v0.18~preview.130.36+326/opam b/packages/ppx_typerep_conv/ppx_typerep_conv.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/ppx_typerep_conv/ppx_typerep_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_typerep_conv/ppx_typerep_conv.v0.18~preview.130.55+197/opam index aa14475d44..27b777bf8f 100644 --- a/packages/ppx_typerep_conv/ppx_typerep_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_typerep_conv/ppx_typerep_conv.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "typerep" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "typerep" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -25,7 +25,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_typerep_conv/archive/fb252c7f7e7bb6989b2a209220165eb8a7f52e2b.tar.gz" + "https://github.com/janestreet/ppx_typerep_conv/archive/efeebaaecd27d03bb4dea2ffb1ca63079d4cd02e.tar.gz" checksum: - "sha256=50939a6dd5e6b9599444f8614669f1ac3aaef3b6ae067b11ce12f524bf65e6e6" + "sha256=023d8ca993220e6ca8aa00dbda41c218fe2381ba554b35e043e726b83bf4d658" } diff --git a/packages/ppx_var_name/ppx_var_name.v0.18~preview.130.36+326/opam b/packages/ppx_var_name/ppx_var_name.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/ppx_var_name/ppx_var_name.v0.18~preview.130.36+326/opam rename to packages/ppx_var_name/ppx_var_name.v0.18~preview.130.55+197/opam index c0fcf015d2..6bcc259390 100644 --- a/packages/ppx_var_name/ppx_var_name.v0.18~preview.130.36+326/opam +++ b/packages/ppx_var_name/ppx_var_name.v0.18~preview.130.55+197/opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -24,7 +24,7 @@ Allows you to reference the OCaml variable name in RHS expressions. """ url { src: - "https://github.com/janestreet/ppx_var_name/archive/c7429ee0851938a9af4b3869d09b0fecfbb97a82.tar.gz" + "https://github.com/janestreet/ppx_var_name/archive/0da8fefda39226b7e2fcdd4ec5671dd56b406b6f.tar.gz" checksum: - "sha256=638e407c1bb561cd1484c3a7a7f348b356bb61059ebd45a8c9cb35b2ab2e9ad4" + "sha256=5c9bc9529cd5c8ef34999b855a4ff34370540032cb4810140c739b8a5ea853f3" } diff --git a/packages/ppx_variants_conv/ppx_variants_conv.v0.18~preview.130.36+326/opam b/packages/ppx_variants_conv/ppx_variants_conv.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/ppx_variants_conv/ppx_variants_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_variants_conv/ppx_variants_conv.v0.18~preview.130.55+197/opam index 659faa8643..7d7e9fffa3 100644 --- a/packages/ppx_variants_conv/ppx_variants_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_variants_conv/ppx_variants_conv.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} - "variantslib" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} + "variantslib" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -26,7 +26,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_variants_conv/archive/933ee8ce9531b4e1706b20811ce21fe0bf40cc01.tar.gz" + "https://github.com/janestreet/ppx_variants_conv/archive/3d99f3353110435608e416fcc2e9193ad193674e.tar.gz" checksum: - "sha256=018eb83e6c5e3e07a3e4186552428e01593ca0e671333eb02ad9ba338ef094c7" + "sha256=7ba39b11ef830432a06f36160972d8eccc4063c986683a69002ab8dd59bbe787" } diff --git a/packages/ppx_with/ppx_with.v0.18~preview.130.36+326/opam b/packages/ppx_with/ppx_with.v0.18~preview.130.55+197/opam similarity index 74% rename from packages/ppx_with/ppx_with.v0.18~preview.130.36+326/opam rename to packages/ppx_with/ppx_with.v0.18~preview.130.55+197/opam index e1fdc3f3fe..639bd5c913 100644 --- a/packages/ppx_with/ppx_with.v0.18~preview.130.36+326/opam +++ b/packages/ppx_with/ppx_with.v0.18~preview.130.55+197/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -24,7 +24,7 @@ A ppx rewriter for building scoped operations, which must do cleanup or similar """ url { src: - "https://github.com/janestreet/ppx_with/archive/878053c2da2814d715cce3a588761882ce20aa9c.tar.gz" + "https://github.com/janestreet/ppx_with/archive/f64531ab18f3f42f2de7243e37c9df63d908f264.tar.gz" checksum: - "sha256=ee01f4dab79985b0935e54d87de8f0b7387f1227e38b363288761c85610e9c15" + "sha256=adbf2988d8040663806818e4b151d384dd7341913b76669d9b1429ed459e91f0" } diff --git a/packages/ppx_xml_conv/ppx_xml_conv.v0.18~preview.130.36+326/opam b/packages/ppx_xml_conv/ppx_xml_conv.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/ppx_xml_conv/ppx_xml_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_xml_conv/ppx_xml_conv.v0.18~preview.130.55+197/opam index 983b8edea1..3fc06df25e 100644 --- a/packages/ppx_xml_conv/ppx_xml_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_xml_conv/ppx_xml_conv.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "csvfields" {= "v0.18~preview.130.36+326"} - "ppx_conv_func" {= "v0.18~preview.130.36+326"} - "ppx_fields_conv" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "csvfields" {= "v0.18~preview.130.55+197"} + "ppx_conv_func" {= "v0.18~preview.130.55+197"} + "ppx_fields_conv" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -26,7 +26,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_xml_conv/archive/08f50c305bbac2701ff2da8735b2f58a0f1110d8.tar.gz" + "https://github.com/janestreet/ppx_xml_conv/archive/f1f4eccb18f9c27f083344883871f9526be2a148.tar.gz" checksum: - "sha256=b86bd046929f39ee6b1f3ba7b144dc9635a5e96bb870be01c97be7e4a979c60c" + "sha256=9320439f4daca434d7688b170f08608fb6b796890d30e829ac504f501f144140" } diff --git a/packages/ppx_yojson_conv/ppx_yojson_conv.v0.18~preview.130.36+326/opam b/packages/ppx_yojson_conv/ppx_yojson_conv.v0.18~preview.130.55+197/opam similarity index 62% rename from packages/ppx_yojson_conv/ppx_yojson_conv.v0.18~preview.130.36+326/opam rename to packages/ppx_yojson_conv/ppx_yojson_conv.v0.18~preview.130.55+197/opam index b9202c7004..c6300b48cc 100644 --- a/packages/ppx_yojson_conv/ppx_yojson_conv.v0.18~preview.130.36+326/opam +++ b/packages/ppx_yojson_conv/ppx_yojson_conv.v0.18~preview.130.55+197/opam @@ -12,10 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_js_style" {= "v0.18~preview.130.36+326"} - "ppx_yojson_conv_lib" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "capitalization" {= "v0.18~preview.130.55+197"} + "ppx_js_style" {= "v0.18~preview.130.55+197"} + "ppx_yojson_conv_lib" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -26,7 +27,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_yojson_conv/archive/5dcf643373232005aa2452253dd5d7907789a4cd.tar.gz" + "https://github.com/janestreet/ppx_yojson_conv/archive/fa8cd543d3bb953aa7a5c024fc3dfe285ff605a4.tar.gz" checksum: - "sha256=8a8eb31b690e900a148b4c2c8aff49b5b5019effdd54a025a3f50775f5b534b3" + "sha256=21922f3afd36acab7a370d20cd254eb6b23d95e4f7c9ca8f466f51b14517c5bf" } diff --git a/packages/ppx_yojson_conv_lib/ppx_yojson_conv_lib.v0.18~preview.130.36+326/opam b/packages/ppx_yojson_conv_lib/ppx_yojson_conv_lib.v0.18~preview.130.55+197/opam similarity index 79% rename from packages/ppx_yojson_conv_lib/ppx_yojson_conv_lib.v0.18~preview.130.36+326/opam rename to packages/ppx_yojson_conv_lib/ppx_yojson_conv_lib.v0.18~preview.130.55+197/opam index f8e65e508b..68e9020dab 100644 --- a/packages/ppx_yojson_conv_lib/ppx_yojson_conv_lib.v0.18~preview.130.36+326/opam +++ b/packages/ppx_yojson_conv_lib/ppx_yojson_conv_lib.v0.18~preview.130.55+197/opam @@ -22,7 +22,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppx_yojson_conv_lib/archive/5bfb7d416b6daffbf9ab568ff89f8c48d4187a4b.tar.gz" + "https://github.com/janestreet/ppx_yojson_conv_lib/archive/7ba060106b729e689d158e309be9ad6fd0595669.tar.gz" checksum: - "sha256=7a24ecc41b35818e567b8e9cadda9461479be427e1a460ac3a71f737ed21fea1" + "sha256=1972b47e6aebc8ee9515718fbc62ff51a3518b27b6a71d4cdfd84dd684003108" } diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+doc+writing-ppxs.mld.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+doc+writing-ppxs.mld.patch new file mode 100644 index 0000000000..5871fa068b --- /dev/null +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+doc+writing-ppxs.mld.patch @@ -0,0 +1,155 @@ +--- a/doc/writing-ppxs.mld ++++ b/doc/writing-ppxs.mld +@@ -19,7 +19,7 @@ into another one. A transformation can b + [structure -> structure] or [signature -> signature], that can sometimes take + extra information as additional arguments. Such a transformation is applied in + the {{!driver."global-transfo-phase"}global transformation phase}, unless it +- has a good reason to have been registered in another phase. While global transformations are a flexible and powerful tool in the OCaml ecosystem, they come with many {{!global_transformation}drawbacks} and should only be used when really necessary. ++ has a good reason to have been registered in another phase. While global transformations are a flexible and powerful tool in the OCaml ecosystem, they come with many {{!global_transformation}drawbacks} and should only be used when really necessary. + + In order to register a transformation to the [ppxlib] driver, one should use the + {{!Ppxlib.Driver.V2.register_transformation}[Driver.V2.register_transformation]}. This function is used to register all +@@ -34,19 +34,20 @@ of the context-free pass. A rule contain + when it should be applied in the traversal, as well as the transformation to + apply. + +-Currently, rules can only be defined to apply in four different contexts: ++Currently, rules can only be defined to apply in five different contexts: + + - on extensions points, such as [\[%ext_point payload\]] +-- on some structure or signature items with an attribute, such as ++- on some structure or signature items with a deriving attribute, such as + [type t = Nil \[@@deriving show\]], ++- on AST nodes with attributes, such as [let x = 42 [@@attr]], + - on + {{:https://v2.ocaml.org/manual/extensionsyntax.html#ss:extension-literals} + litterals with modifiers}, such as [41g] or [43.2x], + - on function application or identifiers, such as [meta_function "99"] and [meta_constant]. + + In order to define rules on extensions points, we will use the {{!Ppxlib.Extension}[Extension]} +-module. In order to define rules on attributed items, we will use the +-{{!Ppxlib.Deriving}[Deriving]} module. For the two other rules, we will directly use the ++module. In order to define deriving rules, we will use the {{!Ppxlib.Deriving}[Deriving]} ++module. For the three other rules, we will directly use the + {{!Ppxlib.Context_free.Rule}[Context_free.Rule]} module. + + {2 Extenders} +@@ -101,7 +102,7 @@ See below for examples on when the above + let _ = match () with [%add_suffix "payload"] -> () (* wrong context *) + ]} + +-{3 The Payload Extraction} ++{3:extender-payload The Payload Extraction} + + An extension node contains a {{!Ppxlib.Parsetree.payload}[payload]}, which will be passed to the transformation function. However, while this payload contains all information, it is not always structured the best way for the transformation function. For instance, in [[%add_suffix "payload"]], the string ["payload"] is encoded as a structure item consisting of an expression’s evaluation, a constant that is a string. + +@@ -124,7 +125,7 @@ produced node will have to match the {{! + + The above pattern extracts a string inside an extension node pattern. It will extract ["string"] in the the extension node [[%ext_name "string"]] and will refuse [[%ext_name 1+1]]. For other ready-to-use examples of patterns, refer to the {{!"matching-code".pattern_examples}example} section. For more in-depth explanation on the types and functions used above, see the {{!"matching-code"}Destructing AST nodes} chapter and the {{!Ppxlib.Ast_pattern}[Ast_pattern] API} . + +-The unit argument in [extractor] is not important. It is added so that {{:https://v2.ocaml.org/manual/polymorphism.html#ss:valuerestriction}value restriction} does not add noise to the type variables. ++The unit argument in [extractor] is not important. It is added so that {{:https://v2.ocaml.org/manual/polymorphism.html#ss:valuerestriction}value restriction} does not add noise to the type variables. + + {3 The Expand Function} + +@@ -357,6 +358,91 @@ contexts. As the API shows, derivers are + + in both structures and signatures. + ++{2 Attribute-guided Rewriting} ++ ++There are rules that apply to AST nodes that, like derivers, apply based on their ++attributes but, like extenders, allow rewriting the entire AST node. These provide ++lighter-weight syntax than extenders but that also means it's less obvious that they're ++rewriting the syntax tree. ++ ++These are composed of: ++- The name of the rewrite rule ++- The list of attributes they define ++- The expand function ++ ++They are defined to apply in a specific context, specifically, they can be registered to ++be processed in the same contexts as extenders can occur. ++ ++{3 The List of Attributes} ++ ++A given rewrite rule can have multiple attributes that trigger it, if any of the ++attributes are present on a single node then the rule is triggered and provided with the ++AST node along with the payload of all the attributes registered by this rule. To declare ++attributes use the {{!Ppxlib.Attribute.declare}[Attribute.declare]} function (or the other ++similar functions in that module). Note that the [Context.t] must match the type of AST ++nodes that the rule will apply to. ++ ++{@ocaml[ ++ # let prefix_attr = Attribute.declare "example.prefix" Expression ++ Ast_pattern.(single_expr_payload (estring __)) Fun.id ++ and suffix_attr = Attribute.declare "example.suffix" Expression ++ Ast_pattern.(single_expr_payload (estring __)) Fun.id ;; ++ val prefix_attr : (expression, string) Attribute.t = ++ val suffix_attr : (expression, string) Attribute.t = ++]} ++ ++{3 The Expand Function} ++ ++The expand function takes the AST node (with this rule's attributes already stripped) and ++the payloads of all the declared attributes (as a list of [payload option]s to allow for ++attributes that haven't been included). ++ ++{@ocaml[ ++ # let expander ++ ~ctxt ++ expression ++ ([ prefix; suffix ] : _ Context_free.Rule.Parsed_payload_list.t) ++ = ++ match expression.pexp_desc with ++ | Pexp_ident { txt = Lident name; loc } -> ++ let prefixed = Option.value ~default:"" prefix ^ name in ++ let suffixed = prefixed ^ Option.value ~default:"" suffix in ++ { expression with pexp_desc = Pexp_ident { txt = Lident suffixed; loc } } ++ | _ -> expression ;; ++ val expander : ++ ctxt:'a -> ++ expression -> ++ (string * (string * unit)) Context_free.Rule.Parsed_payload_list.t -> expression = ++ ++]} ++ ++{3 Creating a rewriting rule} ++ ++Finally, we can create the rule using the appropriate ++{{!Ppxlib.Extension.Context}[Ppxlib.Extension.Context]} and register it with the driver. ++There's also a {{!Ppxlib.Context_free.attr_replace}[Context_free.attr_replace]} function ++with a slightly simpler API if you only use a single attribute. ++ ++{@ocaml[ ++ # let rewrite_rule = Context_free.Rule.attr_multiple_replace "example" Expression ++ [ prefix_attr; suffix_attr ] expander ;; ++ val rule : Context_free.Rule.t = ++ # Driver.register_transformation ~rules:[rewrite_rule] "example" ;; ++ - : unit = () ++]} ++ ++Now, for example, the following: ++ ++{@ocaml[ ++ let _ = foo [@prefix "p_"] [@suffix "_s"] ++]} ++ ++will be rewritten to: ++ ++{@ocaml[ ++ let _ = p_foo_s ++]} ++ + {2 Constant Rewriting} + + OCaml integrates a +@@ -441,7 +527,7 @@ With such a rewriter registered: + Global transformations are the most general kind of transformation. As such, they allow doing virtually any modifications, but this comes with several drawbacks. There are very few PPXs that really need this powerful but dangerous feature. In fact, even if, at first sight, it seems like your transformation isn't context-free, it's likely that you can find a more suitable abstraction with which it becomes context-free. Whenever that's the case, go for context-free! The mentioned drawbacks are: + + - It is harder for the user to know exactly what parts of the AST will be +- changed. Your transformation becomes a scary black box. ++ changed. Your transformation becomes a scary black box. + - It is harder for [ppxlib] to combine several global transformations, as there is no + guarantee that the effect of one will work well with the effect of another. + - The job done by two global transformations (e.g., an AST traverse) cannot be diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+metaquot+ppxlib_metaquot.ml.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+metaquot+ppxlib_metaquot.ml.patch index 222b3a3998..7f5d505b30 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+metaquot+ppxlib_metaquot.ml.patch +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+metaquot+ppxlib_metaquot.ml.patch @@ -22,7 +22,7 @@ method! pattern p = match p.ppat_desc with -@@ -217,6 +223,39 @@ module Expr = Make (struct +@@ -217,6 +223,45 @@ module Expr = Make (struct pexp_extension ~loc:(loc_of_extension ext) (Location.error_extensionf ~loc:(loc_of_extension ext) "expression expected") @@ -39,6 +39,12 @@ + Ppxlib_jane.Ast_builder.Default.coalesce_fun_arity [%expr fun P -> [%e y]] + ]} + ++ and similarly with newtypes: ++ ++ {[ ++ [%expr fun (type a) -> [%e y]] ++ ]} ++ + In this example, this makes the arity of the resulting expression equal to + [1 + arity(y)] instead of [1]. + @@ -47,22 +53,22 @@ + *) + let on_expression (input_expression : expression) (lifted : result) = + match input_expression.pexp_desc with -+ | Pexp_function _ -> -+ let loc = input_expression.pexp_loc in -+ let fun_binding = -+ Ldot -+ ( Ldot (Ldot (Lident "Ppxlib_jane", "Ast_builder") ,"Default") -+ , "coalesce_fun_arity" ) -+ in -+ pexp_apply -+ ~loc -+ (pexp_ident ~loc { txt = fun_binding; loc }) -+ [ Nolabel, lifted ] ++ | Pexp_function _ | Pexp_newtype _ -> ++ let loc = input_expression.pexp_loc in ++ let fun_binding = ++ Ldot ++ ( Ldot (Ldot (Lident "Ppxlib_jane", "Ast_builder") ,"Default") ++ , "coalesce_fun_arity" ) ++ in ++ pexp_apply ++ ~loc ++ (pexp_ident ~loc { txt = fun_binding; loc }) ++ [ Nolabel, lifted ] + | _ -> lifted end) module Patt = Make (struct -@@ -250,6 +289,9 @@ module Patt = Make (struct +@@ -250,6 +295,9 @@ module Patt = Make (struct ppat_extension ~loc:(loc_of_extension ext) (Location.error_extensionf ~loc:(loc_of_extension ext) "pattern expected")) @@ -72,7 +78,7 @@ end) let () = -@@ -281,10 +323,15 @@ let () = +@@ -281,10 +329,15 @@ let () = let lift = lifter loc in lift#typed (lift#signature s) "signature"); E.declare "metaquot.sigi" ctx diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder.ml.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder.ml.patch index e911b0c6d2..baae4da9ed 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder.ml.patch +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder.ml.patch @@ -1,6 +1,6 @@ --- a/src/ast_builder.ml +++ b/src/ast_builder.ml -@@ -1,5 +1,68 @@ +@@ -1,5 +1,70 @@ open! Import +(* Internally to Jane Street, shadow the auto-generated [pexp_fun] and [pexp_function] @@ -20,6 +20,7 @@ + let ptyp_arrow = `Shadowed + let ppat_constraint = `Shadowed + let pexp_constraint = `Shadowed ++ let pexp_let = `Shadowed + let value_binding = `Shadowed + let include_infos = `Shadowed + let psig_include = `Shadowed @@ -41,6 +42,7 @@ + ptyp_arrow, + ppat_constraint, + pexp_constraint, ++ pexp_let, + value_binding, + include_infos, + psig_include, @@ -69,8 +71,18 @@ module Default = struct module Located = struct type 'a t = 'a Loc.t -@@ -17,7 +80,15 @@ module Default = struct - let ppat_construct = ppat_construct +@@ -14,10 +79,24 @@ module Default = struct + include Ast_builder_generated.M + + module Latest = struct +- let ppat_construct = ppat_construct ++ let ppat_construct ~loc lid p = ++ { ++ ppat_loc_stack = []; ++ ppat_attributes = []; ++ ppat_loc = loc; ++ ppat_desc = Ppat_construct (lid, p); ++ } let constructor_declaration ~loc ~name ~vars ~args ~res () = + let vars = List.map vars ~f:(fun var -> var, None) in @@ -85,7 +97,7 @@ end (*------ stable layer above Ast_builder_generated.M -----*) -@@ -41,6 +112,45 @@ module Default = struct +@@ -41,6 +120,48 @@ module Default = struct (*-------------------------------------------------------*) @@ -104,6 +116,9 @@ + { arg_label; arg_type; arg_modes = [] } + { result_type; result_modes = [] } + ++ let pexp_let ~loc a b c = ++ Ppxlib_jane.Ast_builder.Default.pexp_let ~loc Immutable a b c ++ + let pexp_constraint ~loc a b = + Ppxlib_jane.Ast_builder.Default.pexp_constraint ~loc a (Some b) [] + @@ -131,7 +146,7 @@ let pstr_value_list ~loc rec_flag = function | [] -> [] | vbs -> [ pstr_value ~loc rec_flag vbs ] -@@ -88,9 +198,9 @@ module Default = struct +@@ -88,9 +209,9 @@ module Default = struct let pvar ~loc v = ppat_var ~loc (Located.mk ~loc v) let eunit ~loc = pexp_construct ~loc (Located.lident ~loc "()") None let punit ~loc = ppat_construct ~loc (Located.lident ~loc "()") None @@ -144,7 +159,7 @@ let pexp_tuple_opt ~loc l = match l with [] -> None | _ :: _ -> Some (pexp_tuple ~loc l) -@@ -98,8 +208,11 @@ module Default = struct +@@ -98,8 +219,11 @@ module Default = struct let ppat_tuple_opt ~loc l = match l with [] -> None | _ :: _ -> Some (ppat_tuple ~loc l) @@ -157,7 +172,7 @@ let pexp_apply ~loc e el = match (e, el) with -@@ -111,9 +224,23 @@ module Default = struct +@@ -111,9 +235,23 @@ module Default = struct let eapply ~loc e el = pexp_apply ~loc e (List.map el ~f:(fun e -> (Asttypes.Nolabel, e))) @@ -184,7 +199,7 @@ let esequence ~loc el = match List.rev el with -@@ -180,52 +307,62 @@ module Default = struct +@@ -180,52 +318,62 @@ module Default = struct type_constr_conv longident ~loc ~f [] let eta_reduce = @@ -284,7 +299,7 @@ in pexp_constraint ~loc expr ty else expr -@@ -248,13 +385,13 @@ module Default = struct +@@ -248,13 +396,13 @@ module Default = struct | _ -> None in fun expr -> @@ -300,7 +315,16 @@ Poly.( = ) (arg_label : arg_label) param_label && match arg with -@@ -295,6 +432,16 @@ module type S = sig +@@ -286,7 +434,7 @@ module type S = sig + + module Latest : sig + val ppat_construct : +- longident loc -> (label loc list * pattern) option -> pattern ++ longident loc -> ((label loc * jkind_annotation option) list * pattern) option -> pattern + + val constructor_declaration : + name:label loc -> +@@ -295,6 +443,16 @@ module type S = sig res:core_type option -> unit -> constructor_declaration @@ -317,7 +341,7 @@ end val ppat_construct : longident loc -> pattern option -> pattern -@@ -315,7 +462,13 @@ end) : S = struct +@@ -315,7 +473,13 @@ end) : S = struct let ppat_construct = ppat_construct let constructor_declaration ~name ~vars ~args ~res () = @@ -331,7 +355,7 @@ end (*----- stable layer above Ast_builder_generated.Make (Loc) -----*) -@@ -340,6 +493,32 @@ end) : S = struct +@@ -340,6 +504,33 @@ end) : S = struct (*---------------------------------------------------------------*) @@ -343,6 +367,7 @@ + Default.value_description ~loc ~name ~type_ ~prim + + let ptyp_arrow a b c = Default.ptyp_arrow ~loc a b c ++ let pexp_let a b c = Default.pexp_let ~loc a b c + let pexp_constraint a b = Default.pexp_constraint ~loc a b + let ppat_constraint a b = Default.ppat_constraint ~loc a b + @@ -364,7 +389,7 @@ let pstr_value_list = Default.pstr_value_list let nonrec_type_declaration ~name ~params ~cstrs ~kind ~private_ ~manifest = -@@ -359,6 +538,8 @@ end) : S = struct +@@ -359,6 +550,8 @@ end) : S = struct let ptyp_tuple l = Default.ptyp_tuple ~loc l let pexp_tuple_opt l = Default.pexp_tuple_opt ~loc l let ppat_tuple_opt l = Default.ppat_tuple_opt ~loc l @@ -373,7 +398,7 @@ let ptyp_poly vars ty = Default.ptyp_poly ~loc vars ty let pexp_apply e el = Default.pexp_apply ~loc e el let eint t = Default.eint ~loc t -@@ -389,17 +570,30 @@ end) : S = struct +@@ -389,17 +582,30 @@ end) : S = struct let elist l = Default.elist ~loc l let plist l = Default.plist ~loc l diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder.mli.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder.mli.patch index 6405a80fa7..1afbda1b43 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder.mli.patch +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder.mli.patch @@ -9,6 +9,15 @@ module Latest : sig (** This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, +@@ -32,7 +34,7 @@ module Default : sig + val ppat_construct : + loc:location -> + longident loc -> +- (label loc list * pattern) option -> ++ ((label loc * jkind_annotation option) list * pattern) option -> + pattern + + val constructor_declaration : @@ -43,6 +45,17 @@ module Default : sig res:core_type option -> unit -> @@ -27,6 +36,15 @@ end val ppat_construct : +@@ -75,7 +88,7 @@ module type S = sig + missing a feature you need. *) + + val ppat_construct : +- longident loc -> (label loc list * pattern) option -> pattern ++ longident loc -> ((label loc * jkind_annotation option) list * pattern) option -> pattern + + val constructor_declaration : + name:label loc -> @@ -84,6 +97,16 @@ module type S = sig res:core_type option -> unit -> diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder_intf.ml.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder_intf.ml.patch index fd519c96c3..4bb2a99520 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder_intf.ml.patch +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_builder_intf.ml.patch @@ -11,7 +11,7 @@ val pstr_value_list : loc:Location.t -> Asttypes.rec_flag -> -@@ -110,6 +114,72 @@ module type Additional_helpers = sig +@@ -110,6 +114,73 @@ module type Additional_helpers = sig val eta_reduce_if_possible_and_nonrec : expression -> rec_flag:rec_flag -> expression @@ -35,6 +35,7 @@ + : (arg_label -> core_type -> core_type -> core_type) with_loc + val ptyp_tuple : (core_type list -> core_type) with_loc + ++ val pexp_let : (rec_flag -> value_binding list -> expression -> expression) with_loc + val pexp_constraint : (expression -> core_type -> expression) with_loc + val pexp_tuple : (expression list -> expression) with_loc + @@ -84,7 +85,7 @@ end module type Located = sig -@@ -133,5 +203,7 @@ module type S = sig +@@ -133,5 +204,7 @@ module type S = sig let loc = Location.none end) diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_pattern.ml.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_pattern.ml.patch index 9c691724e9..5b02f65ab3 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_pattern.ml.patch +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_pattern.ml.patch @@ -1,6 +1,26 @@ --- a/src/ast_pattern.ml +++ b/src/ast_pattern.ml -@@ -205,6 +205,40 @@ let pack3 t = map t ~f:(fun f x y z -> f +@@ -175,6 +175,9 @@ let map1 (T func) ~f = T (fun ctx loc x + let map2 (T func) ~f = + T (fun ctx loc x k -> func ctx loc x (fun a b -> k (f a b))) + ++let map3 (T func) ~f = ++ T (fun ctx loc x k -> func ctx loc x (fun a b c -> k (f a b c))) ++ + let map0' (T func) ~f = T (fun ctx loc x k -> func ctx loc x (k (f loc))) + + let map1' (T func) ~f = +@@ -183,6 +186,9 @@ let map1' (T func) ~f = + let map2' (T func) ~f = + T (fun ctx loc x k -> func ctx loc x (fun a b -> k (f loc a b))) + ++let map3' (T func) ~f = ++ T (fun ctx loc x k -> func ctx loc x (fun a b c -> k (f loc a b c))) ++ + let map_value (T func) ~f = T (fun ctx loc x k -> func ctx loc (f x) k) + let map_value' (T func) ~f = T (fun ctx loc x k -> func ctx loc (f loc x) k) + +@@ -205,6 +211,42 @@ let pack3 t = map t ~f:(fun f x y z -> f include Ast_pattern_generated @@ -36,12 +56,14 @@ + +let signature t = signature ~items:t ~modalities:drop + ++let pexp_let rf vbs body = pexp_let immutable rf vbs body ++ +(* ----------------------------------------------------- *) + let echar t = pexp_constant (pconst_char t) let estring t = pexp_constant (pconst_string t drop drop) let efloat t = pexp_constant (pconst_float t drop) -@@ -235,6 +269,16 @@ let no_label t = cst Asttypes.Nolabel ~t +@@ -235,6 +277,16 @@ let no_label t = cst Asttypes.Nolabel ~t let ebool t = pexp_construct (lident (bool' t)) none let pbool t = ppat_construct (lident (bool' t)) none @@ -58,7 +80,7 @@ let extension (T f1) (T f2) = T (fun ctx loc ((name : _ Loc.t), payload) k -> -@@ -249,7 +293,7 @@ let rec parse_elist (e : Parsetree.expre +@@ -249,7 +301,7 @@ let rec parse_elist (e : Parsetree.expre | Pexp_construct ({ txt = Lident "::"; _ }, Some arg) -> ( Common.assert_no_attributes arg.pexp_attributes; match arg.pexp_desc with diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_pattern.mli.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_pattern.mli.patch index 9601c18130..0712709cb3 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_pattern.mli.patch +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ast_pattern.mli.patch @@ -1,6 +1,28 @@ --- a/src/ast_pattern.mli +++ b/src/ast_pattern.mli -@@ -171,6 +171,67 @@ include module type of Ast_pattern_gener +@@ -108,6 +108,9 @@ val map1 : ('a, 'v1 -> 'b, 'c) t -> f:(' + val map2 : + ('a, 'v1 -> 'v2 -> 'b, 'c) t -> f:('v1 -> 'v2 -> 'v) -> ('a, 'v -> 'b, 'c) t + ++val map3 : ++ ('a, 'v1 -> 'v2 -> 'v3 -> 'b, 'c) t -> f:('v1 -> 'v2 -> 'v3 -> 'v) -> ('a, 'v -> 'b, 'c) t ++ + val map0' : ('a, 'b, 'c) t -> f:(Location.t -> 'v) -> ('a, 'v -> 'b, 'c) t + + val map1' : +@@ -118,6 +121,11 @@ val map2' : + f:(Location.t -> 'v1 -> 'v2 -> 'v) -> + ('a, 'v -> 'b, 'c) t + ++val map3' : ++ ('a, 'v1 -> 'v2 -> 'v3 -> 'b, 'c) t -> ++ f:(Location.t -> 'v1 -> 'v2 -> 'v3 -> 'v) -> ++ ('a, 'v -> 'b, 'c) t ++ + val map_value : ('a, 'b, 'c) t -> f:('d -> 'a) -> ('d, 'b, 'c) t + val map_value' : ('a, 'b, 'c) t -> f:(location -> 'd -> 'a) -> ('d, 'b, 'c) t + val nil : (_ list, 'a, 'a) t +@@ -171,6 +179,72 @@ include module type of Ast_pattern_gener (expression, 'a, 'c) t ]} *) @@ -63,12 +85,17 @@ +val module_declaration: name:(string option, 'a, 'b) t -> type_:(module_type, 'b, 'c) t -> + (module_declaration, 'a, 'c) t + ++val pexp_let : ++ (rec_flag, 'a, 'b) t -> ++ (value_binding list, 'b, 'c) t -> ++ (expression, 'c, 'd) t -> (expression, 'a, 'd) t ++ +(* ----------------------------------------------------- *) + val true_ : (bool, 'a, 'a) t val false_ : (bool, 'a, 'a) t val eint : (int, 'a, 'b) t -> (expression, 'a, 'b) t -@@ -189,6 +250,8 @@ val pint64 : (int64, 'a, 'b) t -> (patte +@@ -189,6 +263,8 @@ val pint64 : (int64, 'a, 'b) t -> (patte val pnativeint : (nativeint, 'a, 'b) t -> (pattern, 'a, 'b) t val single_expr_payload : (expression, 'a, 'b) t -> (payload, 'a, 'b) t @@ -77,7 +104,7 @@ val no_label : (expression, 'a, 'b) t -> (Asttypes.arg_label * expression, 'a, 'b) t -@@ -205,6 +268,9 @@ val elist : (expression, 'a -> 'a, 'b) t +@@ -205,6 +281,9 @@ val elist : (expression, 'a -> 'a, 'b) t val esequence : (expression, 'a -> 'a, 'b) t -> (expression, 'b list -> 'c, 'c) t diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+driver.ml.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+driver.ml.patch index d49f0b2718..d0fb0d4a52 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+driver.ml.patch +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+driver.ml.patch @@ -1,14 +1,15 @@ --- a/src/driver.ml +++ b/src/driver.ml -@@ -24,6 +24,7 @@ let pretty = ref false +@@ -24,6 +24,8 @@ let pretty = ref false let styler = ref None let output_metadata_filename = ref None let corrected_suffix = ref ".ppx-corrected" +let raise_embedded_errors_flag = ref false ++let as_merlin = ref false let ghost = object -@@ -31,6 +32,15 @@ let ghost = +@@ -31,6 +33,15 @@ let ghost = method! location loc = { loc with loc_ghost = true } end @@ -24,7 +25,7 @@ let chop_prefix ~prefix x = if String.is_prefix ~prefix x then Some (String.drop_prefix x (String.length prefix)) -@@ -46,7 +56,7 @@ let get_default_path_str : structure -> +@@ -46,7 +57,7 @@ let get_default_path_str : structure -> | [] -> "" | { pstr_loc = loc; _ } :: _ -> get_default_path loc @@ -33,7 +34,7 @@ | [] -> "" | { psig_loc = loc; _ } :: _ -> get_default_path loc -@@ -151,7 +161,7 @@ module Transform = struct +@@ -151,7 +162,7 @@ module Transform = struct enclose_intf : (Expansion_context.Base.t -> Location.t option -> @@ -42,7 +43,7 @@ option; instrument : Instrument.t option; rules : Context_free.Rule.t list; -@@ -280,13 +290,13 @@ module Transform = struct +@@ -280,13 +291,13 @@ module Transform = struct map#structure base_ctxt (List.concat [ attrs; header; st; footer ]) >>= fun st -> match impl with None -> return st | Some f -> f ctxt st in @@ -60,7 +61,7 @@ let base_ctxt = Expansion_context.Base.top_level ~tool_name ~file_path ~input_name in -@@ -295,12 +305,14 @@ module Transform = struct +@@ -295,12 +306,14 @@ module Transform = struct | None -> ([], []) | Some f -> let whole_loc = @@ -78,7 +79,7 @@ in { t with impl = Some map_impl; intf = Some map_intf } -@@ -526,12 +538,12 @@ let get_whole_ast_passes ~hook ~expect_m +@@ -526,12 +539,12 @@ let get_whole_ast_passes ~hook ~expect_m in linters @ preprocess @ before_instrs @ make_generic cts @ after_instrs @@ -94,7 +95,7 @@ * label loc list * (location * label) list * exn -@@ -587,7 +599,7 @@ let apply_transforms (type t) ~tool_name +@@ -587,7 +600,7 @@ let apply_transforms (type t) ~tool_name in Ok (finish acc) with Wrapper (x, dropped, lint_errors, exn, errors) -> @@ -103,7 +104,7 @@ (*$*) -@@ -617,7 +629,12 @@ let exn_to_sig_extension exn = +@@ -617,7 +630,12 @@ let exn_to_sig_extension exn = let error_to_extension error ~(kind : Kind.t) = match kind with @@ -117,7 +118,7 @@ | Impl -> Intf_or_impl.Impl [ error_to_str_extension error ] let exn_to_extension exn ~(kind : Kind.t) = -@@ -703,6 +720,7 @@ let map_structure_gen st ~tool_name ~hoo +@@ -703,6 +721,7 @@ let map_structure_gen st ~tool_name ~hoo let file_path = get_default_path_str st in match apply_transforms st ~tool_name ~file_path @@ -125,7 +126,7 @@ ~field:(fun (ct : Transform.t) -> ct.impl) ~lint_field:(fun (ct : Transform.t) -> ct.lint_impl) ~dropped_so_far:Attribute.dropped_so_far_structure ~hook -@@ -711,9 +729,15 @@ let map_structure_gen st ~tool_name ~hoo +@@ -711,9 +730,15 @@ let map_structure_gen st ~tool_name ~hoo ~embed_errors with | Error (st, lint_errors, errors) -> @@ -143,7 +144,7 @@ let map_structure st = match -@@ -725,64 +749,67 @@ let map_structure st = +@@ -725,64 +750,67 @@ let map_structure st = with | Ok ast | Error ast -> ast @@ -235,7 +236,7 @@ ~field:(fun (ct : Transform.t) -> ct.intf) ~lint_field:(fun (ct : Transform.t) -> ct.lint_intf) ~dropped_so_far:Attribute.dropped_so_far_signature ~hook -@@ -790,10 +817,23 @@ let map_signature_gen sg ~tool_name ~hoo +@@ -790,10 +818,23 @@ let map_signature_gen sg ~tool_name ~hoo ~f_exception:(fun exn -> exn_to_sig_extension exn) ~embed_errors with @@ -263,7 +264,7 @@ let map_signature sg = match -@@ -970,46 +1010,45 @@ let add_cookies_str st = +@@ -970,46 +1011,45 @@ let add_cookies_str st = in prefix @ st @@ -323,7 +324,7 @@ | Impl x -> Impl (add_cookies_str x) let corrections = ref [] -@@ -1162,7 +1201,7 @@ let process_file (kind : Kind.t) fn ~inp +@@ -1162,7 +1202,7 @@ let process_file (kind : Kind.t) fn ~inp | Intf ast -> Pprintast.signature ppf ast | Impl ast -> Pprintast.structure ppf ast); let null_ast = @@ -332,7 +333,7 @@ in if not null_ast then Stdlib.Format.pp_print_newline ppf ()) | Dump_ast -> -@@ -1337,6 +1376,10 @@ let shared_args = +@@ -1337,6 +1377,10 @@ let shared_args = applied before all impl and intf." ); ("-cookie", Arg.String set_cookie, "NAME=EXPR Set the cookie NAME to EXPR"); ("--cookie", Arg.String set_cookie, " Same as -cookie"); @@ -343,7 +344,29 @@ ] let () = -@@ -1565,3 +1608,24 @@ let enable_checks () = +@@ -1430,6 +1474,12 @@ let standalone_args = + ( "-corrected-suffix", + Arg.Set_string corrected_suffix, + "SUFFIX Suffix to append to corrected files" ); ++ ( "-as-merlin", ++ Arg.Set as_merlin, ++ " Merlin should pass this flag to indicate that the PPX is being run by Merlin. \ ++ This allows PPXes to modify their behavior when run by Merlin rather than the \ ++ compiler. Merlin override attributes will only be generated when this flag is \ ++ included." ); + ] + + let get_args ?(standalone_args = standalone_args) () = +@@ -1556,6 +1606,8 @@ let run_as_ppx_rewriter () = + + let pretty () = !pretty + ++let as_merlin () = !as_merlin ++ + let enable_checks () = + (* We do not enable the locations check here, we currently require that one + to be specifically enabled. *) +@@ -1565,3 +1617,24 @@ let enable_checks () = let enable_location_check () = perform_locations_check := true let disable_location_check () = perform_locations_check := false let map_structure st = map_structure st diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+driver.mli.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+driver.mli.patch index f26bbe0cb2..2a4fad03e0 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+driver.mli.patch +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+driver.mli.patch @@ -18,3 +18,13 @@ ?impl:(Expansion_context.Base.t -> structure -> structure) -> ?intf:(Expansion_context.Base.t -> signature -> signature) -> ?lint_impl:(Expansion_context.Base.t -> structure -> Lint_error.t list) -> +@@ -237,6 +237,9 @@ val pretty : unit -> bool + (** If [true], code transformations should avoid generating code that is not + strictly necessary, such as extra type annotations. *) + ++val as_merlin : unit -> bool ++(** If [true], then the PPX is being run by Merlin. *) ++ + (**/**) + + val map_structure : structure -> structure diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+name.ml.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+name.ml.patch index 5495f6bd7d..5b55f34153 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+name.ml.patch +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+name.ml.patch @@ -1,6 +1,6 @@ --- a/src/name.ml +++ b/src/name.ml -@@ -97,8 +97,30 @@ module Allowlisted = struct +@@ -97,8 +97,31 @@ module Allowlisted = struct "ocaml.warn_on_literal_pattern"; "ocaml.warnerror"; "ocaml.warning"; @@ -28,10 +28,11 @@ "toplevel_printer" (*Interpreted by the toplevel/utop*); + "ocaml.unsafe_allow_any_mode_crossing"; + "ocaml.or_null_reexport"; ++ "ocaml.atomic"; ] (* Allow list the following extensions. -@@ -107,7 +129,15 @@ module Allowlisted = struct +@@ -107,7 +130,16 @@ module Allowlisted = struct at the level of a ppx rewriter that they have been properly interpreted, so we just accept them anywhere. *) @@ -44,11 +45,12 @@ + ; "ocaml.probe_is_enabled" + ; "ocaml.src_pos" + ; "ocaml.call_pos" ++ ; "ocaml.atomic.loc" + ] let is_allowlisted ~kind name = match kind with -@@ -166,6 +196,8 @@ module Reserved_namespaces = struct +@@ -166,6 +198,8 @@ module Reserved_namespaces = struct let () = reserve "metaocaml" let () = reserve "ocamlformat" let () = reserve "ppxlib.migration" @@ -57,7 +59,7 @@ let check_not_reserved ~kind name = let kind, list = -@@ -185,8 +217,13 @@ module Reserved_namespaces = struct +@@ -185,8 +219,13 @@ module Reserved_namespaces = struct kind name end diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ppxlib.ml.patch b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ppxlib.ml.patch new file mode 100644 index 0000000000..a74c5f9d44 --- /dev/null +++ b/packages/ppxlib/ppxlib.0.33.0+ox/files/ppxlib+src+ppxlib.ml.patch @@ -0,0 +1,8 @@ +--- a/src/ppxlib.ml ++++ b/src/ppxlib.ml +@@ -107,4 +107,5 @@ end + module Ppxlib_private = struct + module Common = Common + module Name = Name ++ module Utils = Utils + end diff --git a/packages/ppxlib/ppxlib.0.33.0+ox/opam b/packages/ppxlib/ppxlib.0.33.0+ox/opam index 892aefe01f..13a74d25c9 100644 --- a/packages/ppxlib/ppxlib.0.33.0+ox/opam +++ b/packages/ppxlib/ppxlib.0.33.0+ox/opam @@ -30,7 +30,7 @@ depends: [ "ppxlib_ast" "ppxlib_jane" "ocamlfind" {with-test} - "re" {with-test & >= "1.9.0"} + "re" {with-test & >= "1.9.0" & = "1.14.0+ox"} "cinaps" {with-test & >= "v0.12.1"} "odoc" {with-doc} ] @@ -64,7 +64,7 @@ url { } x-commit-hash: "563d5651e877c6f7d5561f9d8ca93fca05b07d07" patches: [ - "ppxlib+doc+writing_ppxs.mld.patch" + "ppxlib+doc+writing-ppxs.mld.patch" "ppxlib+metaquot+ppxlib_metaquot.ml.patch" "ppxlib+runner_as_ppx+ppxlib_runner_as_ppx.ml.patch" "ppxlib+src+ast_builder.ml.patch" @@ -93,6 +93,7 @@ patches: [ "ppxlib+src+location.ml.patch" "ppxlib+src+location.mli.patch" "ppxlib+src+name.ml.patch" + "ppxlib+src+ppxlib.ml.patch" "ppxlib+src+utils.mli.patch" "ppxlib+traverse+ppxlib_traverse.ml.patch" "dune.patch" @@ -101,12 +102,12 @@ patches: [ ] extra-files: [ [ - "ppxlib+doc+writing_ppxs.mld.patch" + "ppxlib+doc+writing-ppxs.mld.patch" "sha256=ce1d3c2e9ede3a6dc24b4a1bf23a5758af651bf62f7f4ee856a9b6c36047c0ab" ] [ "ppxlib+metaquot+ppxlib_metaquot.ml.patch" - "sha256=003d0352f4e730aeb961cd992b4291640ca0812dc82026841d94ab9d5a629714" + "sha256=dff0af8c3eeeeebedb154eed019815cb803bf3860778a9744c67af540043ef2e" ] [ "ppxlib+runner_as_ppx+ppxlib_runner_as_ppx.ml.patch" @@ -114,23 +115,23 @@ extra-files: [ ] [ "ppxlib+src+ast_builder.ml.patch" - "sha256=7d51efac59b7fb1a9104372b317da31de7c5f71a780117ea3b1925084ddaeffb" + "sha256=49e607a19da6cc7f95a38157be4a31473b96426eefddb5c7aa048bafd893ef95" ] [ "ppxlib+src+ast_builder.mli.patch" - "sha256=00538c2bc0a4a2da140fc434ef1e2f739f2e48b8447d9e0558a07da0e2dc1700" + "sha256=93c1d7a8d7fa5824a7ac61da6e2a35f0e661b7ea532a901b013a0dc4b03ef7f1" ] [ "ppxlib+src+ast_builder_intf.ml.patch" - "sha256=7367078d362fc570fada77005a72e3fbe01d4174f6bcd662df92876aca20acda" + "sha256=938aabfd0d4f7eb48c4524a7f03154fcc76ec0c8bbf6ea28684c52c52aa318c4" ] [ "ppxlib+src+ast_pattern.ml.patch" - "sha256=34324b2f590b27456871f640c8744d56f9fcb54599dba1becacc14e444c84239" + "sha256=061b75e7217469fd5a6d8ed6d8d74ded558eaa867aa7a3075b710675fad5ac4a" ] [ "ppxlib+src+ast_pattern.mli.patch" - "sha256=3a3ac6aa7373ddc5989e107a6993753386a14eff040ea8c77f1b7fb173d5e5aa" + "sha256=2d52385f3a734c3221ab8a7bd4cd36b4c81dd4c5b44b378bf966922fd18ce1ad" ] [ "ppxlib+src+ast_traverse.ml.patch" @@ -182,11 +183,11 @@ extra-files: [ ] [ "ppxlib+src+driver.ml.patch" - "sha256=f4752975a02cc5f7e1a19a96f34663ce068ab3b64ea8b64f18d56e6010763f2b" + "sha256=d5b7355f1351e59d0d2f9ee0b25c1d110bde50de92ef7350ffd7d8b20c6963f3" ] [ "ppxlib+src+driver.mli.patch" - "sha256=973f5bde5bfa1b952dfdc81b7670c507b91d8ba2bdf5b147471061e6361329fe" + "sha256=123484f1a855962d3e35389dc763442a3a49e717c0abedea76e74abbd22bc750" ] [ "ppxlib+src+gen+gen_ast_builder.ml.patch" @@ -214,7 +215,11 @@ extra-files: [ ] [ "ppxlib+src+name.ml.patch" - "sha256=5c742518eb2c40710f3a7ed8de2f0c5ae5fcf4eed896098830ba96c6658729b7" + "sha256=4d6b8864701a0444f0a4e3b264e2ad0d3c05b8b9cf3aee8c0c3f62cecea98989" + ] + [ + "ppxlib+src+ppxlib.ml.patch" + "sha256=d598e4d2359ec08da08644ae866fff9ab67119b7bfc400232609107231b89a5d" ] [ "ppxlib+src+utils.mli.patch" diff --git a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/cleanup.sh b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/cleanup.sh index f7b329e7bc..a2e2f9d53a 100755 --- a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/cleanup.sh +++ b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/cleanup.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - rm -rf bench dev doc examples metaquot metaquot_lifters old_rtd_doc print-diff runner runner_as_ppx src test traverse ppxlib*.opam asts_to_remove="402 403 404 405 406 407 408 409 410 411 412 413" diff --git a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+ast+ast.ml.patch b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+ast+ast.ml.patch index fff00b1985..666ba87699 100644 --- a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+ast+ast.ml.patch +++ b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+ast+ast.ml.patch @@ -17,7 +17,22 @@ (* Note on the use of Lexing.position in this module. If [pos_fname = ""], then use [!input_name] instead. If [pos_lnum = -1], then [pos_bol = 0]. Use [pos_cnum] and -@@ -116,6 +126,12 @@ and constant = Parsetree.constant = +@@ -108,6 +118,14 @@ and arg_label = Asttypes.arg_label = + and variance = Asttypes.variance = Covariant | Contravariant | NoVariance + and injectivity = Asttypes.injectivity = Injective | NoInjectivity + ++and index_kind = Asttypes.index_kind = ++ | Index_int ++ | Index_unboxed_int64 ++ | Index_unboxed_int32 ++ | Index_unboxed_int16 ++ | Index_unboxed_int8 ++ | Index_unboxed_nativeint ++ + (** Abstract syntax tree produced by parsing *) + + and constant = Parsetree.constant = +@@ -116,7 +134,14 @@ and constant = Parsetree.constant = Suffixes [\[g-z\]\[G-Z\]] are accepted by the parser. Suffixes except ['l'], ['L'] and ['n'] are rejected by the typechecker *) @@ -28,9 +43,11 @@ + Suffixes except ['l'], ['L'] and ['n'] are rejected by the typechecker + *) | Pconst_char of char (** Character such as ['c']. *) ++ | Pconst_untagged_char of char (** Untagged character such as [#'c']. *) | Pconst_string of string * location * string option (** Constant string such as ["constant"] or -@@ -125,8 +141,14 @@ and constant = Parsetree.constant = + [{delim|other constant|delim}]. +@@ -125,8 +150,14 @@ and constant = Parsetree.constant = | Pconst_float of string * char option (** Float constant such as [3.4], [2e5] or [1.4e-4]. @@ -46,7 +63,7 @@ (** {1 Extension points} *) -@@ -165,21 +187,33 @@ and core_type = Parsetree.core_type = { +@@ -165,21 +196,33 @@ and core_type = Parsetree.core_type = { } and core_type_desc = Parsetree.core_type_desc = @@ -95,7 +112,7 @@ | Ptyp_constr of longident_loc * core_type list (** [Ptyp_constr(lident, l)] represents: -@@ -199,7 +233,11 @@ and core_type_desc = Parsetree.core_type +@@ -199,7 +242,11 @@ and core_type_desc = Parsetree.core_type - [#tconstr] when [l=\[\]], - [T #tconstr] when [l=\[T\]], - [(T1, ..., Tn) #tconstr] when [l=\[T1 ; ... ; Tn\]]. *) @@ -108,7 +125,7 @@ | Ptyp_variant of row_field list * closed_flag * label list option (** [Ptyp_variant(\[`A;`B\], flag, labels)] represents: -@@ -212,8 +250,9 @@ and core_type_desc = Parsetree.core_type +@@ -212,8 +259,9 @@ and core_type_desc = Parsetree.core_type - [\[< `A|`B > `X `Y \]] when [flag] is {{!Asttypes.closed_flag.Closed} [Closed]}, and [labels] is [Some \["X";"Y"\]]. *) @@ -119,7 +136,7 @@ Can only appear in the following context: -@@ -242,6 +281,7 @@ and core_type_desc = Parsetree.core_type +@@ -242,6 +290,7 @@ and core_type_desc = Parsetree.core_type - As the {{!value_description.pval_type} [pval_type]} field of a {!value_description}. *) | Ptyp_package of package_type (** [(module S)]. *) @@ -127,7 +144,7 @@ | Ptyp_extension of extension (** [\[%id\]]. *) and package_type = longident_loc * (longident_loc * core_type) list -@@ -303,10 +343,27 @@ and pattern_desc = Parsetree.pattern_des +@@ -303,18 +352,38 @@ and pattern_desc = Parsetree.pattern_des Other forms of interval are recognized by the parser but rejected by the type-checker. *) @@ -135,6 +152,7 @@ - (** Patterns [(P1, ..., Pn)]. - - Invariant: [n >= 2] *) +- | Ppat_construct of longident_loc * (string loc list * pattern) option + | Ppat_tuple of (string option * pattern) list * closed_flag + (** [Ppat_tuple(pl, Closed)] represents + - [(P1, ..., Pn)] when [pl] is [(None, P1);...;(None, Pn)] @@ -156,10 +174,22 @@ + - If Closed, [n >= 2] + - If Open, [n >= 1] + *) - | Ppat_construct of longident_loc * (string loc list * pattern) option ++ | Ppat_construct of longident_loc * ((string loc * jkind_annotation option) list * pattern) option (** [Ppat_construct(C, args)] represents: -@@ -329,9 +386,23 @@ and pattern_desc = Parsetree.pattern_des + - [C] when [args] is [None], + - [C P] when [args] is [Some (\[\], P)] + - [C (P1, ..., Pn)] when [args] is + [Some (\[\], Ppat_tuple \[P1; ...; Pn\])] +- - [C (type a b) P] when [args] is [Some (\[a; b\], P)] *) ++ - [C (type a b) P] when [args] is [Some (\[a, None; b, None\], P)] ++ - [C (type (a : k) b) P] ++ when [args] is [Some (\[a, Some k; b, None\], P)] ++ *) + | Ppat_variant of label * pattern option + (** [Ppat_variant(`A, pat)] represents: + +@@ -329,9 +398,23 @@ and pattern_desc = Parsetree.pattern_des {{!Asttypes.closed_flag.Open} [Open]} Invariant: [n > 0] *) @@ -185,10 +215,17 @@ | Ppat_type of longident_loc (** Pattern [#tconst] *) | Ppat_lazy of pattern (** Pattern [lazy P] *) | Ppat_unpack of string option loc -@@ -367,28 +438,21 @@ and expression_desc = Parsetree.expressi - {{!Asttypes.rec_flag.Nonrecursive} [Nonrecursive]}, - - [let rec P1 = E1 and ... and Pn = EN in E] when [flag] is - {{!Asttypes.rec_flag.Recursive} [Recursive]}. *) +@@ -360,35 +443,33 @@ and expression_desc = Parsetree.expressi + | Pexp_constant of constant + (** Expressions constant such as [1], ['a'], ["true"], [1.0], [1l], [1L], + [1n] *) +- | Pexp_let of rec_flag * value_binding list * expression +- (** [Pexp_let(flag, \[(P1,E1) ; ... ; (Pn,En)\], E)] represents: +- +- - [let P1 = E1 and ... and Pn = EN in E] when [flag] is +- {{!Asttypes.rec_flag.Nonrecursive} [Nonrecursive]}, +- - [let rec P1 = E1 and ... and Pn = EN in E] when [flag] is +- {{!Asttypes.rec_flag.Recursive} [Recursive]}. *) - | Pexp_function of cases (** [function P1 -> E1 | ... | Pn -> En] *) - | Pexp_fun of arg_label * expression option * pattern * expression - (** [Pexp_fun(lbl, exp0, P, E1)] represents: @@ -211,6 +248,18 @@ - {{!expression_desc.Pexp_fun} [Pexp_fun]}. - - [let f P = E] is represented using {{!expression_desc.Pexp_fun} - [Pexp_fun]}. *) ++ | Pexp_let of mutable_flag * rec_flag * value_binding list * expression ++ (** [Pexp_let(mut, rec, [(P1,E1) ; ... ; (Pn,En)], E)] represents: ++ - [let P1 = E1 and ... and Pn = EN in E] ++ when [rec] is {{!Asttypes.rec_flag.Nonrecursive}[Nonrecursive]} ++ and [mut] = {{!Asttypes.mutable_flag.Immutable}[Immutable]}. ++ - [let rec P1 = E1 and ... and Pn = EN in E] ++ when [rec] is {{!Asttypes.rec_flag.Recursive}[Recursive]} ++ and [mut] = {{!Asttypes.mutable_flag.Immutable}[Immutable]}. ++ - [let mutable P1 = E1 in E] ++ when [rec] is {{!Asttypes.rec_flag.Nonrecursive}[Nonrecursive]} ++ and [mut] = {{!Asttypes.mutable_flag.Mutable}[Mutable]}. ++ Invariant: If [mut = Mutable] then [n = 1] and [rec = Nonrecursive] *) + | Pexp_function of + function_param list * function_constraint * function_body + (** [Pexp_function ([P1; ...; Pn], C, body)] represents any construct @@ -229,7 +278,7 @@ | Pexp_apply of expression * (arg_label * expression) list (** [Pexp_apply(E0, \[(l1, E1) ; ... ; (ln, En)\])] represents [E0 ~l1:E1 ... ~ln:En] -@@ -403,10 +467,24 @@ and expression_desc = Parsetree.expressi +@@ -403,10 +484,24 @@ and expression_desc = Parsetree.expressi (** [match E0 with P1 -> E1 | ... | Pn -> En] *) | Pexp_try of expression * cases (** [try E0 with P1 -> E1 | ... | Pn -> En] *) @@ -258,7 +307,7 @@ | Pexp_construct of longident_loc * expression option (** [Pexp_construct(C, exp)] represents: -@@ -425,10 +503,19 @@ and expression_desc = Parsetree.expressi +@@ -425,10 +520,22 @@ and expression_desc = Parsetree.expressi - [{ E0 with l1=P1; ...; ln=Pn }] when [exp0] is [Some E0] Invariant: [n > 0] *) @@ -276,10 +325,13 @@ - | Pexp_array of expression list (** [\[| E1; ...; En |\]] *) + | Pexp_array of mutable_flag * expression list + (** [[| E1; ...; En |]] or [[: E1; ...; En :]] *) ++ | Pexp_idx of block_access * unboxed_access list ++ (** [(BA1 UA1 UA2 ...)] e.g. [(.foo.#bar.#baz)] ++ Above, BA1=.foo, UA1=.#bar, and UA2=#.baz *) | Pexp_ifthenelse of expression * expression * expression option (** [if E1 then E2 else E3] *) | Pexp_sequence of expression * expression (** [E1; E2] *) -@@ -440,7 +527,7 @@ and expression_desc = Parsetree.expressi +@@ -440,7 +547,7 @@ and expression_desc = Parsetree.expressi {{!Asttypes.direction_flag.Upto} [Upto]} - [for i = E1 downto E2 do E3 done] when [direction] is {{!Asttypes.direction_flag.Downto} [Downto]} *) @@ -288,7 +340,16 @@ | Pexp_coerce of expression * core_type option * core_type (** [Pexp_coerce(E, from, T)] represents -@@ -467,7 +554,8 @@ and expression_desc = Parsetree.expressi +@@ -448,7 +555,7 @@ and expression_desc = Parsetree.expressi + - [(E : T0 :> T)] when [from] is [Some T0]. *) + | Pexp_send of expression * label loc (** [E # m] *) + | Pexp_new of longident_loc (** [new M.c] *) +- | Pexp_setinstvar of label loc * expression (** [x <- 2] *) ++ | Pexp_setvar of label loc * expression (** [x <- 2] *) + | Pexp_override of (label loc * expression) list + (** [{< x1 = E1; ...; xn = En >}] *) + | Pexp_letmodule of string option loc * module_expr * expression +@@ -467,7 +574,8 @@ and expression_desc = Parsetree.expressi {{!class_field_kind.Cfk_concrete} [Cfk_concrete]} for methods (not values). *) | Pexp_object of class_structure (** [object ... end] *) @@ -298,7 +359,7 @@ | Pexp_pack of module_expr (** [(module ME)]. -@@ -482,6 +570,15 @@ and expression_desc = Parsetree.expressi +@@ -482,6 +590,15 @@ and expression_desc = Parsetree.expressi - [let* P0 = E00 and* P1 = E01 in E1] *) | Pexp_extension of extension (** [\[%id\]] *) | Pexp_unreachable (** [.] *) @@ -314,7 +375,7 @@ and case = Parsetree.case = { pc_lhs : pattern; -@@ -503,11 +600,130 @@ and binding_op = Parsetree.binding_op = +@@ -503,11 +620,148 @@ and binding_op = Parsetree.binding_op = pbop_loc : location; } @@ -398,6 +459,24 @@ + } +(** See the comment on {{!expression_desc.Pexp_function}[Pexp_function]}. *) + ++and block_access = Parsetree.block_access = ++ | Baccess_field of longident_loc ++ (** [.foo] *) ++ | Baccess_array of mutable_flag * index_kind * expression ++ (** Mutable array accesses: [.(E)], [.L(E)], [.l(E)], [.n(E)] ++ Immutable array accesses: [.:(E)], [.:L(E)], [.:l(E)], [.:n(E)] ++ ++ Indexed by [int], [int64#], [int32#], or [nativeint#], respectively. ++ *) ++ | Baccess_block of mutable_flag * expression ++ (** Access using another block index: [.idx_imm(E)], [.idx_mut(E)] ++ (usually followed by unboxed accesses, to deepen the index). ++ *) ++ ++and unboxed_access = Parsetree.unboxed_access = ++ | Uaccess_unboxed_field of longident_loc ++ (** [.#foo] *) ++ +and comprehension_iterator = Parsetree.comprehension_iterator = + + | Pcomp_range of @@ -445,7 +524,7 @@ pval_prim : string list; pval_attributes : attributes; (** [... \[@@id1\] \[@@id2\]] *) pval_loc : location; -@@ -530,6 +746,7 @@ and type_declaration = Parsetree.type_de +@@ -530,6 +784,7 @@ and type_declaration = Parsetree.type_de ptype_private : private_flag; (** for [= private ...] *) ptype_manifest : core_type option; (** represents [= T] *) ptype_attributes : attributes; (** [... \[@@id1\] \[@@id2\]] *) @@ -453,7 +532,7 @@ ptype_loc : location; } (** Here are type declarations and their representation, for various -@@ -555,11 +772,13 @@ and type_kind = Parsetree.type_kind = +@@ -555,11 +810,13 @@ and type_kind = Parsetree.type_kind = | Ptype_abstract | Ptype_variant of constructor_declaration list | Ptype_record of label_declaration list (** Invariant: non-empty list *) @@ -467,7 +546,7 @@ pld_type : core_type; pld_loc : location; pld_attributes : attributes; (** [l : T \[@id1\] \[@id2\]] *) -@@ -573,15 +792,22 @@ and label_declaration = Parsetree.label_ +@@ -573,15 +830,22 @@ and label_declaration = Parsetree.label_ and constructor_declaration = Parsetree.constructor_declaration = { pcd_name : string loc; @@ -492,7 +571,7 @@ | Pcstr_record of label_declaration list (** Values of type {!constructor_declaration} represents the constructor arguments of: -@@ -621,7 +847,8 @@ and type_exception = Parsetree.type_exce +@@ -621,7 +885,8 @@ and type_exception = Parsetree.type_exce (** Definition of a new exception ([exception E]). *) and extension_constructor_kind = Parsetree.extension_constructor_kind = @@ -502,7 +581,7 @@ (** [Pext_decl(existentials, c_args, t_opt)] describes a new extension constructor. It can be: -@@ -647,7 +874,7 @@ and extension_constructor_kind = Parsetr +@@ -647,7 +912,7 @@ and extension_constructor_kind = Parsetr - [c_args] is [\[T1; ...; Tn\]], - [t_opt] is [Some T0]. } @@ -511,7 +590,7 @@ when - [existentials] is [\['a;...\]], -@@ -842,22 +1069,25 @@ and module_type = Parsetree.module_type +@@ -842,22 +1107,25 @@ and module_type = Parsetree.module_type and module_type_desc = Parsetree.module_type_desc = | Pmty_ident of longident_loc (** [Pmty_ident(S)] represents [S] *) | Pmty_signature of signature (** [sig ... end] *) @@ -540,7 +619,7 @@ and signature_item = Parsetree.signature_item = { psig_desc : signature_item_desc; -@@ -882,17 +1112,20 @@ and signature_item_desc = Parsetree.sign +@@ -882,17 +1150,20 @@ and signature_item_desc = Parsetree.sign (** [module type S = MT] and [module type S] *) | Psig_modtypesubst of module_type_declaration (** [module type S := ...] *) | Psig_open of open_description (** [open X] *) @@ -562,7 +641,7 @@ pmd_attributes : attributes; (** [... \[@@id1\] \[@@id2\]] *) pmd_loc : location; } -@@ -946,6 +1179,7 @@ and open_declaration = module_expr open_ +@@ -946,6 +1217,7 @@ and open_declaration = module_expr open_ - [open struct ... end] *) and 'a include_infos = 'a Parsetree.include_infos = { @@ -570,7 +649,7 @@ pincl_mod : 'a; pincl_loc : location; pincl_attributes : attributes; -@@ -987,9 +1221,18 @@ and module_expr_desc = Parsetree.module_ +@@ -987,9 +1259,18 @@ and module_expr_desc = Parsetree.module_ | Pmod_functor of functor_parameter * module_expr (** [functor(X : MT1) -> ME] *) | Pmod_apply of module_expr * module_expr (** [ME1(ME2)] *) @@ -590,7 +669,7 @@ and structure = structure_item list -@@ -1028,10 +1271,13 @@ and structure_item_desc = Parsetree.stru +@@ -1028,10 +1309,13 @@ and structure_item_desc = Parsetree.stru | Pstr_include of include_declaration (** [include ME] *) | Pstr_attribute of attribute (** [\[@@@id\]] *) | Pstr_extension of extension * attributes (** [\[%%id\]] *) @@ -604,7 +683,7 @@ pvb_attributes : attributes; pvb_loc : location; } -@@ -1044,6 +1290,19 @@ and module_binding = Parsetree.module_bi +@@ -1044,6 +1328,19 @@ and module_binding = Parsetree.module_bi } (** Values of type [module_binding] represents [module X = ME] *) @@ -624,7 +703,7 @@ (** {1 Toplevel} *) (** {2 Toplevel phrases} *) -@@ -1069,408 +1328,366 @@ and directive_argument_desc = Parsetree. +@@ -1069,408 +1366,377 @@ and directive_argument_desc = Parsetree. | Pdir_bool of bool and cases = case list [@@deriving_inline traverse] @@ -744,6 +823,7 @@ + | Optional a -> let a = self#string a in Optional a + method variance : variance -> variance= fun x -> x + method injectivity : injectivity -> injectivity= fun x -> x ++ method index_kind : index_kind -> index_kind= fun x -> x + method constant : constant -> constant= fun x -> match x with @@ -759,6 +839,7 @@ + let a = self#string a in + let b = self#char b in Pconst_unboxed_integer (a, b) + | Pconst_char a -> let a = self#char a in Pconst_char a ++ | Pconst_untagged_char a -> let a = self#char a in Pconst_untagged_char a | Pconst_string (a, b, c) -> let a = self#string a in let b = self#location b in @@ -1031,7 +1112,12 @@ - (a, b)) - b - in -+ let a = self#list (self#loc self#string) a in ++ let a = ++ self#list ++ (fun (a, b) -> ++ let a = self#loc self#string a in ++ let b = self#option self#jkind_annotation b in ++ (a, b)) a in + let b = self#pattern b in (a, b)) b in Ppat_construct (a, b) | Ppat_variant (a, b) -> @@ -1122,14 +1208,9 @@ - | Pexp_constant a -> - let a = self#constant a in - Pexp_constant a -+ method expression_desc : expression_desc -> expression_desc= -+ fun x -> -+ match x with -+ | Pexp_ident a -> let a = self#longident_loc a in Pexp_ident a -+ | Pexp_constant a -> let a = self#constant a in Pexp_constant a - | Pexp_let (a, b, c) -> - let a = self#rec_flag a in - let b = self#list self#value_binding b in +- | Pexp_let (a, b, c) -> +- let a = self#rec_flag a in +- let b = self#list self#value_binding b in - let c = self#expression c in - Pexp_let (a, b, c) - | Pexp_function a -> @@ -1141,7 +1222,16 @@ - let c = self#pattern c in - let d = self#expression d in - Pexp_fun (a, b, c, d) -+ let c = self#expression c in Pexp_let (a, b, c) ++ method expression_desc : expression_desc -> expression_desc= ++ fun x -> ++ match x with ++ | Pexp_ident a -> let a = self#longident_loc a in Pexp_ident a ++ | Pexp_constant a -> let a = self#constant a in Pexp_constant a ++ | Pexp_let (a, b, c, d) -> ++ let a = self#mutable_flag a in ++ let b = self#rec_flag b in ++ let c = self#list self#value_binding c in ++ let d = self#expression d in Pexp_let (a, b, c, d) + | Pexp_function (a, b, c) -> + let a = self#list self#function_param a in + let b = self#function_constraint b in @@ -1235,10 +1325,13 @@ + | Pexp_array (a, b) -> + let a = self#mutable_flag a in + let b = self#list self#expression b in Pexp_array (a, b) ++ | Pexp_idx (a, b) -> ++ let a = self#block_access a in ++ let b = self#list self#unboxed_access b in Pexp_idx (a, b) | Pexp_ifthenelse (a, b, c) -> let a = self#expression a in let b = self#expression b in -@@ -1478,160 +1695,210 @@ class virtual map = +@@ -1478,160 +1744,226 @@ class virtual map = Pexp_ifthenelse (a, b, c) | Pexp_sequence (a, b) -> let a = self#expression a in @@ -1278,13 +1371,14 @@ - | Pexp_new a -> - let a = self#longident_loc a in - Pexp_new a +- | Pexp_setinstvar (a, b) -> + let b = self#loc self#label b in Pexp_send (a, b) + | Pexp_new a -> let a = self#longident_loc a in Pexp_new a - | Pexp_setinstvar (a, b) -> ++ | Pexp_setvar (a, b) -> let a = self#loc self#label a in - let b = self#expression b in - Pexp_setinstvar (a, b) -+ let b = self#expression b in Pexp_setinstvar (a, b) ++ let b = self#expression b in Pexp_setvar (a, b) | Pexp_override a -> let a = self#list @@ -1425,6 +1519,22 @@ + let ret_type_constraint = + self#option self#type_constraint ret_type_constraint in + { mode_annotations; ret_mode_annotations; ret_type_constraint } ++ method block_access : block_access -> block_access= ++ fun x -> ++ match x with ++ | Baccess_field a -> let a = self#longident_loc a in Baccess_field a ++ | Baccess_array (a, b, c) -> ++ let a = self#mutable_flag a in ++ let b = self#index_kind b in ++ let c = self#expression c in Baccess_array (a, b, c) ++ | Baccess_block (a, b) -> ++ let a = self#mutable_flag a in ++ let b = self#expression b in Baccess_block (a, b) ++ method unboxed_access : unboxed_access -> unboxed_access= ++ fun x -> ++ match x with ++ | Uaccess_unboxed_field a -> ++ let a = self#longident_loc a in Uaccess_unboxed_field a + method comprehension_iterator : + comprehension_iterator -> comprehension_iterator= + fun x -> @@ -1544,7 +1654,7 @@ let ptype_loc = self#location ptype_loc in { ptype_name; -@@ -1641,10 +1908,10 @@ class virtual map = +@@ -1641,10 +1973,10 @@ class virtual map = ptype_private; ptype_manifest; ptype_attributes; @@ -1558,7 +1668,7 @@ fun x -> match x with | Ptype_abstract -> Ptype_abstract -@@ -1652,68 +1919,78 @@ class virtual map = +@@ -1652,68 +1984,78 @@ class virtual map = let a = self#list self#constructor_declaration a in Ptype_variant a | Ptype_record a -> @@ -1677,7 +1787,7 @@ let ptyext_private = self#private_flag ptyext_private in let ptyext_loc = self#location ptyext_loc in let ptyext_attributes = self#attributes ptyext_attributes in -@@ -1723,224 +2000,172 @@ class virtual map = +@@ -1723,224 +2065,172 @@ class virtual map = ptyext_constructors; ptyext_private; ptyext_loc; @@ -1968,7 +2078,7 @@ fun x -> match x with | Pcf_inherit (a, b, c) -> -@@ -1951,1090 +2176,963 @@ class virtual map = +@@ -1951,1090 +2241,980 @@ class virtual map = | Pcf_val a -> let a = (fun (a, b, c) -> @@ -2643,12 +2753,14 @@ - self#option self#char b + method variance : variance -> unit= fun _ -> () + method injectivity : injectivity -> unit= fun _ -> () ++ method index_kind : index_kind -> unit= fun _ -> () + method constant : constant -> unit= + fun x -> + match x with + | Pconst_integer (a, b) -> (self#string a; self#option self#char b) + | Pconst_unboxed_integer (a, b) -> (self#string a; self#char b) | Pconst_char a -> self#char a ++ | Pconst_untagged_char a -> self#char a | Pconst_string (a, b, c) -> - self#string a; - self#location b; @@ -2857,7 +2969,11 @@ + (self#longident_loc a; + self#option + (fun (a, b) -> -+ self#list (self#loc self#string) a; self#pattern b) b) ++ self#list ++ (fun (a, b) -> ++ self#loc self#string a; ++ self#option self#jkind_annotation b) a; ++ self#pattern b) b) + | Ppat_variant (a, b) -> (self#label a; self#option self#pattern b) | Ppat_record (a, b) -> - self#list @@ -2907,7 +3023,7 @@ match x with | Pexp_ident a -> self#longident_loc a | Pexp_constant a -> self#constant a - | Pexp_let (a, b, c) -> +- | Pexp_let (a, b, c) -> - self#rec_flag a; - self#list self#value_binding b; - self#expression c @@ -2917,9 +3033,11 @@ - self#option self#expression b; - self#pattern c; - self#expression d -+ (self#rec_flag a; -+ self#list self#value_binding b; -+ self#expression c) ++ | Pexp_let (a, b, c, d) -> ++ (self#mutable_flag a; ++ self#rec_flag b; ++ self#list self#value_binding c; ++ self#expression d) + | Pexp_function (a, b, c) -> + (self#list self#function_param a; + self#function_constraint b; @@ -2985,6 +3103,8 @@ + (self#expression a; self#longident_loc b; self#expression c) + | Pexp_array (a, b) -> + (self#mutable_flag a; self#list self#expression b) ++ | Pexp_idx (a, b) -> ++ (self#block_access a; self#list self#unboxed_access b) | Pexp_ifthenelse (a, b, c) -> - self#expression a; - self#expression b; @@ -3028,10 +3148,10 @@ + self#core_type c) + | Pexp_send (a, b) -> (self#expression a; self#loc self#label b) | Pexp_new a -> self#longident_loc a - | Pexp_setinstvar (a, b) -> +- | Pexp_setinstvar (a, b) -> - self#loc self#label a; - self#expression b -+ (self#loc self#label a; self#expression b) ++ | Pexp_setvar (a, b) -> (self#loc self#label a; self#expression b) | Pexp_override a -> self#list - (fun (a, b) -> @@ -3127,6 +3247,15 @@ + self#modes mode_annotations; + self#modes ret_mode_annotations; + self#option self#type_constraint ret_type_constraint ++ method block_access : block_access -> unit= ++ fun x -> ++ match x with ++ | Baccess_field a -> self#longident_loc a ++ | Baccess_array (a, b, c) -> ++ (self#mutable_flag a; self#index_kind b; self#expression c) ++ | Baccess_block (a, b) -> (self#mutable_flag a; self#expression b) ++ method unboxed_access : unboxed_access -> unit= ++ fun x -> match x with | Uaccess_unboxed_field a -> self#longident_loc a + method comprehension_iterator : comprehension_iterator -> unit= + fun x -> + match x with @@ -3624,7 +3753,7 @@ | Psig_typesubst a -> self#list self#type_declaration a | Psig_typext a -> self#type_extension a | Psig_exception a -> self#type_exception a -@@ -3044,125 +3142,102 @@ class virtual iter = +@@ -3044,125 +3224,102 @@ class virtual iter = | Psig_modtype a -> self#module_type_declaration a | Psig_modtypesubst a -> self#module_type_declaration a | Psig_open a -> self#open_description a @@ -3796,7 +3925,7 @@ | Pstr_typext a -> self#type_extension a | Pstr_exception a -> self#type_exception a | Pstr_module a -> self#module_binding a -@@ -3173,159 +3248,149 @@ class virtual iter = +@@ -3173,159 +3330,151 @@ class virtual iter = | Pstr_class_type a -> self#list self#class_type_declaration a | Pstr_include a -> self#include_declaration a | Pstr_attribute a -> self#attribute a @@ -3985,6 +4114,7 @@ - method constant : constant -> 'acc -> 'acc = + method variance : variance -> 'acc -> 'acc= fun _ acc -> acc + method injectivity : injectivity -> 'acc -> 'acc= fun _ acc -> acc ++ method index_kind : index_kind -> 'acc -> 'acc= fun _ acc -> acc + method constant : constant -> 'acc -> 'acc= fun x acc -> match x with @@ -3996,6 +4126,7 @@ + | Pconst_unboxed_integer (a, b) -> + let acc = self#string a acc in let acc = self#char b acc in acc | Pconst_char a -> self#char a acc ++ | Pconst_untagged_char a -> self#char a acc | Pconst_string (a, b, c) -> let acc = self#string a acc in let acc = self#location b acc in @@ -4036,7 +4167,7 @@ fun x acc -> match x with | PStr a -> self#structure a acc -@@ -3333,160 +3398,164 @@ class virtual ['acc] fold = +@@ -3333,160 +3482,169 @@ class virtual ['acc] fold = | PTyp a -> self#core_type a acc | PPat (a, b) -> let acc = self#pattern a acc in @@ -4234,7 +4365,12 @@ - acc) - b acc - in -+ let acc = self#list (self#loc self#string) a acc in ++ let acc = ++ self#list ++ (fun (a, b) acc -> ++ let acc = self#loc self#string a acc in ++ let acc = self#option self#jkind_annotation b acc in ++ acc) a acc in + let acc = self#pattern b acc in acc) b acc in acc | Ppat_variant (a, b) -> @@ -4282,7 +4418,7 @@ | Ppat_type a -> self#longident_loc a acc | Ppat_lazy a -> self#pattern a acc | Ppat_unpack a -> self#loc (self#option self#string) a acc -@@ -3494,18 +3563,14 @@ class virtual ['acc] fold = +@@ -3494,574 +3652,581 @@ class virtual ['acc] fold = | Ppat_extension a -> self#extension a acc | Ppat_open (a, b) -> let acc = self#longident_loc a acc in @@ -4305,10 +4441,10 @@ fun x acc -> match x with | Pexp_ident a -> self#longident_loc a acc -@@ -3513,555 +3578,548 @@ class virtual ['acc] fold = - | Pexp_let (a, b, c) -> - let acc = self#rec_flag a acc in - let acc = self#list self#value_binding b acc in + | Pexp_constant a -> self#constant a acc +- | Pexp_let (a, b, c) -> +- let acc = self#rec_flag a acc in +- let acc = self#list self#value_binding b acc in - let acc = self#expression c acc in - acc - | Pexp_function a -> self#cases a acc @@ -4318,7 +4454,11 @@ - let acc = self#pattern c acc in - let acc = self#expression d acc in - acc -+ let acc = self#expression c acc in acc ++ | Pexp_let (a, b, c, d) -> ++ let acc = self#mutable_flag a acc in ++ let acc = self#rec_flag b acc in ++ let acc = self#list self#value_binding c acc in ++ let acc = self#expression d acc in acc + | Pexp_function (a, b, c) -> + let acc = self#list self#function_param a acc in + let acc = self#function_constraint b acc in @@ -4406,6 +4546,9 @@ + | Pexp_array (a, b) -> + let acc = self#mutable_flag a acc in + let acc = self#list self#expression b acc in acc ++ | Pexp_idx (a, b) -> ++ let acc = self#block_access a acc in ++ let acc = self#list self#unboxed_access b acc in acc | Pexp_ifthenelse (a, b, c) -> let acc = self#expression a acc in let acc = self#expression b acc in @@ -4449,7 +4592,8 @@ - acc + let acc = self#loc self#label b acc in acc | Pexp_new a -> self#longident_loc a acc - | Pexp_setinstvar (a, b) -> +- | Pexp_setinstvar (a, b) -> ++ | Pexp_setvar (a, b) -> let acc = self#loc self#label a acc in - let acc = self#expression b acc in - acc @@ -4570,6 +4714,20 @@ - - method value_description : value_description -> 'acc -> 'acc = - fun { pval_name; pval_type; pval_prim; pval_attributes; pval_loc } acc -> ++ method block_access : block_access -> 'acc -> 'acc= ++ fun x acc -> ++ match x with ++ | Baccess_field a -> self#longident_loc a acc ++ | Baccess_array (a, b, c) -> ++ let acc = self#mutable_flag a acc in ++ let acc = self#index_kind b acc in ++ let acc = self#expression c acc in acc ++ | Baccess_block (a, b) -> ++ let acc = self#mutable_flag a acc in ++ let acc = self#expression b acc in acc ++ method unboxed_access : unboxed_access -> 'acc -> 'acc= ++ fun x acc -> ++ match x with | Uaccess_unboxed_field a -> self#longident_loc a acc + method comprehension_iterator : comprehension_iterator -> 'acc -> 'acc= + fun x acc -> + match x with @@ -5166,7 +5324,7 @@ | Psig_typesubst a -> self#list self#type_declaration a acc | Psig_typext a -> self#type_extension a acc | Psig_exception a -> self#type_exception a acc -@@ -4071,147 +4129,134 @@ class virtual ['acc] fold = +@@ -4071,147 +4236,134 @@ class virtual ['acc] fold = | Psig_modtype a -> self#module_type_declaration a acc | Psig_modtypesubst a -> self#module_type_declaration a acc | Psig_open a -> self#open_description a acc @@ -5378,7 +5536,7 @@ | Pstr_typext a -> self#type_extension a acc | Pstr_exception a -> self#type_exception a acc | Pstr_module a -> self#module_binding a acc -@@ -4224,1812 +4269,1902 @@ class virtual ['acc] fold = +@@ -4224,1812 +4376,1951 @@ class virtual ['acc] fold = | Pstr_attribute a -> self#attribute a acc | Pstr_extension (a, b) -> let acc = self#extension a acc in @@ -5635,6 +5793,8 @@ - method constant : constant -> 'acc -> constant * 'acc = + method injectivity : injectivity -> 'acc -> (injectivity * 'acc)= + fun x acc -> (x, acc) ++ method index_kind : index_kind -> 'acc -> (index_kind * 'acc)= ++ fun x acc -> (x, acc) + method constant : constant -> 'acc -> (constant * 'acc)= fun x acc -> match x with @@ -5653,6 +5813,8 @@ - let a, acc = self#char a acc in - (Pconst_char a, acc) + let (a, acc) = self#char a acc in ((Pconst_char a), acc) ++ | Pconst_untagged_char a -> ++ let (a, acc) = self#char a acc in ((Pconst_untagged_char a), acc) | Pconst_string (a, b, c) -> - let a, acc = self#string a acc in - let b, acc = self#location b acc in @@ -5959,31 +6121,16 @@ - | Ppat_tuple a -> - let a, acc = self#list self#pattern a acc in - (Ppat_tuple a, acc) +- | Ppat_construct (a, b) -> +- let a, acc = self#longident_loc a acc in +- let b, acc = +- self#option + let (a, acc) = self#constant a acc in + let (b, acc) = self#constant b acc in + ((Ppat_interval (a, b)), acc) + | Ppat_tuple (a, b) -> + let (a, acc) = + self#list -+ (fun (a, b) acc -> -+ let (a, acc) = self#option self#string a acc in -+ let (b, acc) = self#pattern b acc in ((a, b), acc)) a acc in -+ let (b, acc) = self#closed_flag b acc in -+ ((Ppat_tuple (a, b)), acc) -+ | Ppat_unboxed_tuple (a, b) -> -+ let (a, acc) = -+ self#list -+ (fun (a, b) acc -> -+ let (a, acc) = self#option self#string a acc in -+ let (b, acc) = self#pattern b acc in ((a, b), acc)) a acc in -+ let (b, acc) = self#closed_flag b acc in -+ ((Ppat_unboxed_tuple (a, b)), acc) - | Ppat_construct (a, b) -> -- let a, acc = self#longident_loc a acc in -- let b, acc = -+ let (a, acc) = self#longident_loc a acc in -+ let (b, acc) = - self#option (fun (a, b) acc -> - let a, acc = self#list (self#loc self#string) a acc in - let b, acc = self#pattern b acc in @@ -5991,18 +6138,17 @@ - b acc - in - (Ppat_construct (a, b), acc) -+ let (a, acc) = self#list (self#loc self#string) a acc in -+ let (b, acc) = self#pattern b acc in ((a, b), acc)) b acc in -+ ((Ppat_construct (a, b)), acc) - | Ppat_variant (a, b) -> +- | Ppat_variant (a, b) -> - let a, acc = self#label a acc in - let b, acc = self#option self#pattern b acc in - (Ppat_variant (a, b), acc) -+ let (a, acc) = self#label a acc in -+ let (b, acc) = self#option self#pattern b acc in -+ ((Ppat_variant (a, b)), acc) - | Ppat_record (a, b) -> +- | Ppat_record (a, b) -> - let a, acc = ++ let (a, acc) = self#option self#string a acc in ++ let (b, acc) = self#pattern b acc in ((a, b), acc)) a acc in ++ let (b, acc) = self#closed_flag b acc in ++ ((Ppat_tuple (a, b)), acc) ++ | Ppat_unboxed_tuple (a, b) -> + let (a, acc) = self#list (fun (a, b) acc -> @@ -6016,6 +6162,32 @@ - | Ppat_array a -> - let a, acc = self#list self#pattern a acc in - (Ppat_array a, acc) ++ let (a, acc) = self#option self#string a acc in ++ let (b, acc) = self#pattern b acc in ((a, b), acc)) a acc in ++ let (b, acc) = self#closed_flag b acc in ++ ((Ppat_unboxed_tuple (a, b)), acc) ++ | Ppat_construct (a, b) -> ++ let (a, acc) = self#longident_loc a acc in ++ let (b, acc) = ++ self#option ++ (fun (a, b) acc -> ++ let (a, acc) = ++ self#list ++ (fun (a, b) acc -> ++ let (a, acc) = self#loc self#string a acc in ++ let (b, acc) = ++ self#option self#jkind_annotation b acc in ++ ((a, b), acc)) a acc in ++ let (b, acc) = self#pattern b acc in ((a, b), acc)) b acc in ++ ((Ppat_construct (a, b)), acc) ++ | Ppat_variant (a, b) -> ++ let (a, acc) = self#label a acc in ++ let (b, acc) = self#option self#pattern b acc in ++ ((Ppat_variant (a, b)), acc) ++ | Ppat_record (a, b) -> ++ let (a, acc) = ++ self#list ++ (fun (a, b) acc -> + let (a, acc) = self#longident_loc a acc in + let (b, acc) = self#pattern b acc in ((a, b), acc)) a acc in + let (b, acc) = self#closed_flag b acc in @@ -6100,8 +6272,7 @@ | Pexp_constant a -> - let a, acc = self#constant a acc in - (Pexp_constant a, acc) -+ let (a, acc) = self#constant a acc in ((Pexp_constant a), acc) - | Pexp_let (a, b, c) -> +- | Pexp_let (a, b, c) -> - let a, acc = self#rec_flag a acc in - let b, acc = self#list self#value_binding b acc in - let c, acc = self#expression c acc in @@ -6115,10 +6286,13 @@ - let c, acc = self#pattern c acc in - let d, acc = self#expression d acc in - (Pexp_fun (a, b, c, d), acc) -+ let (a, acc) = self#rec_flag a acc in -+ let (b, acc) = self#list self#value_binding b acc in -+ let (c, acc) = self#expression c acc in -+ ((Pexp_let (a, b, c)), acc) ++ let (a, acc) = self#constant a acc in ((Pexp_constant a), acc) ++ | Pexp_let (a, b, c, d) -> ++ let (a, acc) = self#mutable_flag a acc in ++ let (b, acc) = self#rec_flag b acc in ++ let (c, acc) = self#list self#value_binding c acc in ++ let (d, acc) = self#expression d acc in ++ ((Pexp_let (a, b, c, d)), acc) + | Pexp_function (a, b, c) -> + let (a, acc) = self#list self#function_param a acc in + let (b, acc) = self#function_constraint b acc in @@ -6129,20 +6303,6 @@ - let b, acc = + let (a, acc) = self#expression a acc in + let (b, acc) = -+ self#list -+ (fun (a, b) acc -> -+ let (a, acc) = self#arg_label a acc in -+ let (b, acc) = self#expression b acc in ((a, b), acc)) b -+ acc in -+ ((Pexp_apply (a, b)), acc) -+ | Pexp_match (a, b) -> -+ let (a, acc) = self#expression a acc in -+ let (b, acc) = self#cases b acc in ((Pexp_match (a, b)), acc) -+ | Pexp_try (a, b) -> -+ let (a, acc) = self#expression a acc in -+ let (b, acc) = self#cases b acc in ((Pexp_try (a, b)), acc) -+ | Pexp_tuple a -> -+ let (a, acc) = self#list (fun (a, b) acc -> - let a, acc = self#arg_label a acc in @@ -6151,17 +6311,28 @@ - b acc - in - (Pexp_apply (a, b), acc) -- | Pexp_match (a, b) -> ++ let (a, acc) = self#arg_label a acc in ++ let (b, acc) = self#expression b acc in ((a, b), acc)) b ++ acc in ++ ((Pexp_apply (a, b)), acc) + | Pexp_match (a, b) -> - let a, acc = self#expression a acc in - let b, acc = self#cases b acc in - (Pexp_match (a, b), acc) -- | Pexp_try (a, b) -> ++ let (a, acc) = self#expression a acc in ++ let (b, acc) = self#cases b acc in ((Pexp_match (a, b)), acc) + | Pexp_try (a, b) -> - let a, acc = self#expression a acc in - let b, acc = self#cases b acc in - (Pexp_try (a, b), acc) -- | Pexp_tuple a -> ++ let (a, acc) = self#expression a acc in ++ let (b, acc) = self#cases b acc in ((Pexp_try (a, b)), acc) + | Pexp_tuple a -> - let a, acc = self#list self#expression a acc in - (Pexp_tuple a, acc) ++ let (a, acc) = ++ self#list ++ (fun (a, b) acc -> + let (a, acc) = self#option self#string a acc in + let (b, acc) = self#expression b acc in ((a, b), acc)) a + acc in @@ -6241,6 +6412,10 @@ + let (a, acc) = self#mutable_flag a acc in + let (b, acc) = self#list self#expression b acc in + ((Pexp_array (a, b)), acc) ++ | Pexp_idx (a, b) -> ++ let (a, acc) = self#block_access a acc in ++ let (b, acc) = self#list self#unboxed_access b acc in ++ ((Pexp_idx (a, b)), acc) | Pexp_ifthenelse (a, b, c) -> - let a, acc = self#expression a acc in - let b, acc = self#expression b acc in @@ -6305,14 +6480,15 @@ | Pexp_new a -> - let a, acc = self#longident_loc a acc in - (Pexp_new a, acc) -+ let (a, acc) = self#longident_loc a acc in ((Pexp_new a), acc) - | Pexp_setinstvar (a, b) -> +- | Pexp_setinstvar (a, b) -> - let a, acc = self#loc self#label a acc in - let b, acc = self#expression b acc in - (Pexp_setinstvar (a, b), acc) ++ let (a, acc) = self#longident_loc a acc in ((Pexp_new a), acc) ++ | Pexp_setvar (a, b) -> + let (a, acc) = self#loc self#label a acc in + let (b, acc) = self#expression b acc in -+ ((Pexp_setinstvar (a, b)), acc) ++ ((Pexp_setvar (a, b)), acc) | Pexp_override a -> - let a, acc = + let (a, acc) = @@ -6510,6 +6686,28 @@ + self#option self#type_constraint ret_type_constraint acc in + ({ mode_annotations; ret_mode_annotations; ret_type_constraint }, + acc) ++ method block_access : block_access -> 'acc -> (block_access * 'acc)= ++ fun x acc -> ++ match x with ++ | Baccess_field a -> ++ let (a, acc) = self#longident_loc a acc in ++ ((Baccess_field a), acc) ++ | Baccess_array (a, b, c) -> ++ let (a, acc) = self#mutable_flag a acc in ++ let (b, acc) = self#index_kind b acc in ++ let (c, acc) = self#expression c acc in ++ ((Baccess_array (a, b, c)), acc) ++ | Baccess_block (a, b) -> ++ let (a, acc) = self#mutable_flag a acc in ++ let (b, acc) = self#expression b acc in ++ ((Baccess_block (a, b)), acc) ++ method unboxed_access : ++ unboxed_access -> 'acc -> (unboxed_access * 'acc)= ++ fun x acc -> ++ match x with ++ | Uaccess_unboxed_field a -> ++ let (a, acc) = self#longident_loc a acc in ++ ((Uaccess_unboxed_field a), acc) + method comprehension_iterator : + comprehension_iterator -> 'acc -> (comprehension_iterator * 'acc)= + fun x acc -> @@ -8083,6 +8281,7 @@ + | Optional a -> let a = self#string ctx a in Optional a + method variance : 'ctx -> variance -> variance= fun _ctx x -> x + method injectivity : 'ctx -> injectivity -> injectivity= fun _ctx x -> x ++ method index_kind : 'ctx -> index_kind -> index_kind= fun _ctx x -> x + method constant : 'ctx -> constant -> constant= fun ctx x -> match x with @@ -8098,6 +8297,8 @@ + let a = self#string ctx a in + let b = self#char ctx b in Pconst_unboxed_integer (a, b) + | Pconst_char a -> let a = self#char ctx a in Pconst_char a ++ | Pconst_untagged_char a -> ++ let a = self#char ctx a in Pconst_untagged_char a | Pconst_string (a, b, c) -> let a = self#string ctx a in let b = self#location ctx b in @@ -8371,7 +8572,12 @@ - (a, b)) - ctx b - in -+ let a = self#list (self#loc self#string) ctx a in ++ let a = ++ self#list ++ (fun ctx (a, b) -> ++ let a = self#loc self#string ctx a in ++ let b = self#option self#jkind_annotation ctx b in ++ (a, b)) ctx a in + let b = self#pattern ctx b in (a, b)) ctx b in Ppat_construct (a, b) | Ppat_variant (a, b) -> @@ -8463,11 +8669,9 @@ - | Pexp_constant a -> - let a = self#constant ctx a in - Pexp_constant a -+ | Pexp_ident a -> let a = self#longident_loc ctx a in Pexp_ident a -+ | Pexp_constant a -> let a = self#constant ctx a in Pexp_constant a - | Pexp_let (a, b, c) -> - let a = self#rec_flag ctx a in - let b = self#list self#value_binding ctx b in +- | Pexp_let (a, b, c) -> +- let a = self#rec_flag ctx a in +- let b = self#list self#value_binding ctx b in - let c = self#expression ctx c in - Pexp_let (a, b, c) - | Pexp_function a -> @@ -8479,7 +8683,13 @@ - let c = self#pattern ctx c in - let d = self#expression ctx d in - Pexp_fun (a, b, c, d) -+ let c = self#expression ctx c in Pexp_let (a, b, c) ++ | Pexp_ident a -> let a = self#longident_loc ctx a in Pexp_ident a ++ | Pexp_constant a -> let a = self#constant ctx a in Pexp_constant a ++ | Pexp_let (a, b, c, d) -> ++ let a = self#mutable_flag ctx a in ++ let b = self#rec_flag ctx b in ++ let c = self#list self#value_binding ctx c in ++ let d = self#expression ctx d in Pexp_let (a, b, c, d) + | Pexp_function (a, b, c) -> + let a = self#list self#function_param ctx a in + let b = self#function_constraint ctx b in @@ -8572,10 +8782,13 @@ + | Pexp_array (a, b) -> + let a = self#mutable_flag ctx a in + let b = self#list self#expression ctx b in Pexp_array (a, b) ++ | Pexp_idx (a, b) -> ++ let a = self#block_access ctx a in ++ let b = self#list self#unboxed_access ctx b in Pexp_idx (a, b) | Pexp_ifthenelse (a, b, c) -> let a = self#expression ctx a in let b = self#expression ctx b in -@@ -6037,161 +6172,222 @@ class virtual ['ctx] map_with_context = +@@ -6037,161 +6328,239 @@ class virtual ['ctx] map_with_context = Pexp_ifthenelse (a, b, c) | Pexp_sequence (a, b) -> let a = self#expression ctx a in @@ -8615,13 +8828,14 @@ - | Pexp_new a -> - let a = self#longident_loc ctx a in - Pexp_new a +- | Pexp_setinstvar (a, b) -> + let b = self#loc self#label ctx b in Pexp_send (a, b) + | Pexp_new a -> let a = self#longident_loc ctx a in Pexp_new a - | Pexp_setinstvar (a, b) -> ++ | Pexp_setvar (a, b) -> let a = self#loc self#label ctx a in - let b = self#expression ctx b in - Pexp_setinstvar (a, b) -+ let b = self#expression ctx b in Pexp_setinstvar (a, b) ++ let b = self#expression ctx b in Pexp_setvar (a, b) | Pexp_override a -> let a = self#list @@ -8766,6 +8980,23 @@ + let ret_type_constraint = + self#option self#type_constraint ctx ret_type_constraint in + { mode_annotations; ret_mode_annotations; ret_type_constraint } ++ method block_access : 'ctx -> block_access -> block_access= ++ fun ctx x -> ++ match x with ++ | Baccess_field a -> ++ let a = self#longident_loc ctx a in Baccess_field a ++ | Baccess_array (a, b, c) -> ++ let a = self#mutable_flag ctx a in ++ let b = self#index_kind ctx b in ++ let c = self#expression ctx c in Baccess_array (a, b, c) ++ | Baccess_block (a, b) -> ++ let a = self#mutable_flag ctx a in ++ let b = self#expression ctx b in Baccess_block (a, b) ++ method unboxed_access : 'ctx -> unboxed_access -> unboxed_access= ++ fun ctx x -> ++ match x with ++ | Uaccess_unboxed_field a -> ++ let a = self#longident_loc ctx a in Uaccess_unboxed_field a + method comprehension_iterator : + 'ctx -> comprehension_iterator -> comprehension_iterator= + fun ctx x -> @@ -8889,7 +9120,7 @@ let ptype_loc = self#location ctx ptype_loc in { ptype_name; -@@ -6201,10 +6397,10 @@ class virtual ['ctx] map_with_context = +@@ -6201,10 +6570,10 @@ class virtual ['ctx] map_with_context = ptype_private; ptype_manifest; ptype_attributes; @@ -8903,7 +9134,7 @@ fun ctx x -> match x with | Ptype_abstract -> Ptype_abstract -@@ -6212,69 +6408,80 @@ class virtual ['ctx] map_with_context = +@@ -6212,69 +6581,80 @@ class virtual ['ctx] map_with_context = let a = self#list self#constructor_declaration ctx a in Ptype_variant a | Ptype_record a -> @@ -9023,7 +9254,7 @@ let ptyext_private = self#private_flag ctx ptyext_private in let ptyext_loc = self#location ctx ptyext_loc in let ptyext_attributes = self#attributes ctx ptyext_attributes in -@@ -6284,225 +6491,178 @@ class virtual ['ctx] map_with_context = +@@ -6284,225 +6664,178 @@ class virtual ['ctx] map_with_context = ptyext_constructors; ptyext_private; ptyext_loc; @@ -9316,7 +9547,7 @@ fun ctx x -> match x with | Pcf_inherit (a, b, c) -> -@@ -6513,3873 +6673,4049 @@ class virtual ['ctx] map_with_context = +@@ -6513,3873 +6846,4137 @@ class virtual ['ctx] map_with_context = | Pcf_val a -> let a = (fun ctx (a, b, c) -> @@ -10092,6 +10323,15 @@ | NoInjectivity -> self#constr "NoInjectivity" [] - - method constant : constant -> 'res = ++ method index_kind : index_kind -> 'res= ++ fun x -> ++ match x with ++ | Index_int -> self#constr "Index_int" [] ++ | Index_unboxed_int64 -> self#constr "Index_unboxed_int64" [] ++ | Index_unboxed_int32 -> self#constr "Index_unboxed_int32" [] ++ | Index_unboxed_int16 -> self#constr "Index_unboxed_int16" [] ++ | Index_unboxed_int8 -> self#constr "Index_unboxed_int8" [] ++ | Index_unboxed_nativeint -> self#constr "Index_unboxed_nativeint" [] + method constant : constant -> 'res= fun x -> match x with @@ -10108,6 +10348,8 @@ - let a = self#char a in - self#constr "Pconst_char" [ a ] + let a = self#char a in self#constr "Pconst_char" [a] ++ | Pconst_untagged_char a -> ++ let a = self#char a in self#constr "Pconst_untagged_char" [a] | Pconst_string (a, b, c) -> let a = self#string a in let b = self#location b in @@ -10434,7 +10676,12 @@ - b - in - self#constr "Ppat_construct" [ a; b ] -+ let a = self#list (self#loc self#string) a in ++ let a = ++ self#list ++ (fun (a, b) -> ++ let a = self#loc self#string a in ++ let b = self#option self#jkind_annotation b in ++ self#tuple [a; b]) a in + let b = self#pattern b in self#tuple [a; b]) b in + self#constr "Ppat_construct" [a; b] | Ppat_variant (a, b) -> @@ -10538,10 +10785,9 @@ | Pexp_constant a -> - let a = self#constant a in - self#constr "Pexp_constant" [ a ] -+ let a = self#constant a in self#constr "Pexp_constant" [a] - | Pexp_let (a, b, c) -> - let a = self#rec_flag a in - let b = self#list self#value_binding b in +- | Pexp_let (a, b, c) -> +- let a = self#rec_flag a in +- let b = self#list self#value_binding b in - let c = self#expression c in - self#constr "Pexp_let" [ a; b; c ] - | Pexp_function a -> @@ -10553,7 +10799,12 @@ - let c = self#pattern c in - let d = self#expression d in - self#constr "Pexp_fun" [ a; b; c; d ] -+ let c = self#expression c in self#constr "Pexp_let" [a; b; c] ++ let a = self#constant a in self#constr "Pexp_constant" [a] ++ | Pexp_let (a, b, c, d) -> ++ let a = self#mutable_flag a in ++ let b = self#rec_flag b in ++ let c = self#list self#value_binding c in ++ let d = self#expression d in self#constr "Pexp_let" [a; b; c; d] + | Pexp_function (a, b, c) -> + let a = self#list self#function_param a in + let b = self#function_constraint b in @@ -10652,6 +10903,10 @@ + let a = self#mutable_flag a in + let b = self#list self#expression b in + self#constr "Pexp_array" [a; b] ++ | Pexp_idx (a, b) -> ++ let a = self#block_access a in ++ let b = self#list self#unboxed_access b in ++ self#constr "Pexp_idx" [a; b] | Pexp_ifthenelse (a, b, c) -> let a = self#expression a in let b = self#expression b in @@ -10697,12 +10952,13 @@ | Pexp_new a -> - let a = self#longident_loc a in - self#constr "Pexp_new" [ a ] +- | Pexp_setinstvar (a, b) -> + let a = self#longident_loc a in self#constr "Pexp_new" [a] - | Pexp_setinstvar (a, b) -> ++ | Pexp_setvar (a, b) -> let a = self#loc self#label a in - let b = self#expression b in - self#constr "Pexp_setinstvar" [ a; b ] -+ let b = self#expression b in self#constr "Pexp_setinstvar" [a; b] ++ let b = self#expression b in self#constr "Pexp_setvar" [a; b] | Pexp_override a -> let a = self#list @@ -10864,6 +11120,25 @@ + [("mode_annotations", mode_annotations); + ("ret_mode_annotations", ret_mode_annotations); + ("ret_type_constraint", ret_type_constraint)] ++ method block_access : block_access -> 'res= ++ fun x -> ++ match x with ++ | Baccess_field a -> ++ let a = self#longident_loc a in self#constr "Baccess_field" [a] ++ | Baccess_array (a, b, c) -> ++ let a = self#mutable_flag a in ++ let b = self#index_kind b in ++ let c = self#expression c in ++ self#constr "Baccess_array" [a; b; c] ++ | Baccess_block (a, b) -> ++ let a = self#mutable_flag a in ++ let b = self#expression b in self#constr "Baccess_block" [a; b] ++ method unboxed_access : unboxed_access -> 'res= ++ fun x -> ++ match x with ++ | Uaccess_unboxed_field a -> ++ let a = self#longident_loc a in ++ self#constr "Uaccess_unboxed_field" [a] + method comprehension_iterator : comprehension_iterator -> 'res= + fun x -> + match x with @@ -12416,6 +12691,8 @@ + fun ctx x -> (x, (self#other ctx x)) + method injectivity : 'ctx -> injectivity -> (injectivity * 'res)= + fun ctx x -> (x, (self#other ctx x)) ++ method index_kind : 'ctx -> index_kind -> (index_kind * 'res)= ++ fun ctx x -> (x, (self#other ctx x)) + method constant : 'ctx -> constant -> (constant * 'res)= fun ctx x -> match x with @@ -12438,6 +12715,10 @@ - self#constr ctx "Pconst_char" [ Stdlib.snd a ] ) + ((Pconst_char (Stdlib.fst a)), + (self#constr ctx "Pconst_char" [Stdlib.snd a])) ++ | Pconst_untagged_char a -> ++ let a = self#char ctx a in ++ ((Pconst_untagged_char (Stdlib.fst a)), ++ (self#constr ctx "Pconst_untagged_char" [Stdlib.snd a])) | Pconst_string (a, b, c) -> let a = self#string ctx a in let b = self#location ctx b in @@ -12914,7 +13195,14 @@ - in - ( Ppat_construct (Stdlib.fst a, Stdlib.fst b), - self#constr ctx "Ppat_construct" [ Stdlib.snd a; Stdlib.snd b ] ) -+ let a = self#list (self#loc self#string) ctx a in ++ let a = ++ self#list ++ (fun ctx (a, b) -> ++ let a = self#loc self#string ctx a in ++ let b = self#option self#jkind_annotation ctx b in ++ (((Stdlib.fst a), (Stdlib.fst b)), ++ (self#tuple ctx [Stdlib.snd a; Stdlib.snd b]))) ++ ctx a in + let b = self#pattern ctx b in + (((Stdlib.fst a), (Stdlib.fst b)), + (self#tuple ctx [Stdlib.snd a; Stdlib.snd b]))) ctx b in @@ -13072,12 +13360,10 @@ let a = self#constant ctx a in - ( Pexp_constant (Stdlib.fst a), - self#constr ctx "Pexp_constant" [ Stdlib.snd a ] ) -+ ((Pexp_constant (Stdlib.fst a)), -+ (self#constr ctx "Pexp_constant" [Stdlib.snd a])) - | Pexp_let (a, b, c) -> - let a = self#rec_flag ctx a in - let b = self#list self#value_binding ctx b in - let c = self#expression ctx c in +- | Pexp_let (a, b, c) -> +- let a = self#rec_flag ctx a in +- let b = self#list self#value_binding ctx b in +- let c = self#expression ctx c in - ( Pexp_let (Stdlib.fst a, Stdlib.fst b, Stdlib.fst c), - self#constr ctx "Pexp_let" - [ Stdlib.snd a; Stdlib.snd b; Stdlib.snd c ] ) @@ -13089,13 +13375,21 @@ - let a = self#arg_label ctx a in - let b = self#option self#expression ctx b in - let c = self#pattern ctx c in -- let d = self#expression ctx d in ++ ((Pexp_constant (Stdlib.fst a)), ++ (self#constr ctx "Pexp_constant" [Stdlib.snd a])) ++ | Pexp_let (a, b, c, d) -> ++ let a = self#mutable_flag ctx a in ++ let b = self#rec_flag ctx b in ++ let c = self#list self#value_binding ctx c in + let d = self#expression ctx d in - ( Pexp_fun (Stdlib.fst a, Stdlib.fst b, Stdlib.fst c, Stdlib.fst d), - self#constr ctx "Pexp_fun" - [ Stdlib.snd a; Stdlib.snd b; Stdlib.snd c; Stdlib.snd d ] ) -+ ((Pexp_let ((Stdlib.fst a), (Stdlib.fst b), (Stdlib.fst c))), ++ ((Pexp_let ++ ((Stdlib.fst a), (Stdlib.fst b), (Stdlib.fst c), ++ (Stdlib.fst d))), + (self#constr ctx "Pexp_let" -+ [Stdlib.snd a; Stdlib.snd b; Stdlib.snd c])) ++ [Stdlib.snd a; Stdlib.snd b; Stdlib.snd c; Stdlib.snd d])) + | Pexp_function (a, b, c) -> + let a = self#list self#function_param ctx a in + let b = self#function_constraint ctx b in @@ -13236,6 +13530,11 @@ + let b = self#list self#expression ctx b in + ((Pexp_array ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pexp_array" [Stdlib.snd a; Stdlib.snd b])) ++ | Pexp_idx (a, b) -> ++ let a = self#block_access ctx a in ++ let b = self#list self#unboxed_access ctx b in ++ ((Pexp_idx ((Stdlib.fst a), (Stdlib.fst b))), ++ (self#constr ctx "Pexp_idx" [Stdlib.snd a; Stdlib.snd b])) | Pexp_ifthenelse (a, b, c) -> let a = self#expression ctx a in let b = self#expression ctx b in @@ -13324,16 +13623,17 @@ let a = self#longident_loc ctx a in - ( Pexp_new (Stdlib.fst a), - self#constr ctx "Pexp_new" [ Stdlib.snd a ] ) +- | Pexp_setinstvar (a, b) -> + ((Pexp_new (Stdlib.fst a)), + (self#constr ctx "Pexp_new" [Stdlib.snd a])) - | Pexp_setinstvar (a, b) -> ++ | Pexp_setvar (a, b) -> let a = self#loc self#label ctx a in let b = self#expression ctx b in - ( Pexp_setinstvar (Stdlib.fst a, Stdlib.fst b), - self#constr ctx "Pexp_setinstvar" [ Stdlib.snd a; Stdlib.snd b ] - ) -+ ((Pexp_setinstvar ((Stdlib.fst a), (Stdlib.fst b))), -+ (self#constr ctx "Pexp_setinstvar" [Stdlib.snd a; Stdlib.snd b])) ++ ((Pexp_setvar ((Stdlib.fst a), (Stdlib.fst b))), ++ (self#constr ctx "Pexp_setvar" [Stdlib.snd a; Stdlib.snd b])) | Pexp_override a -> let a = self#list @@ -13612,6 +13912,33 @@ + [("mode_annotations", (Stdlib.snd mode_annotations)); + ("ret_mode_annotations", (Stdlib.snd ret_mode_annotations)); + ("ret_type_constraint", (Stdlib.snd ret_type_constraint))])) ++ method block_access : 'ctx -> block_access -> (block_access * 'res)= ++ fun ctx x -> ++ match x with ++ | Baccess_field a -> ++ let a = self#longident_loc ctx a in ++ ((Baccess_field (Stdlib.fst a)), ++ (self#constr ctx "Baccess_field" [Stdlib.snd a])) ++ | Baccess_array (a, b, c) -> ++ let a = self#mutable_flag ctx a in ++ let b = self#index_kind ctx b in ++ let c = self#expression ctx c in ++ ((Baccess_array ((Stdlib.fst a), (Stdlib.fst b), (Stdlib.fst c))), ++ (self#constr ctx "Baccess_array" ++ [Stdlib.snd a; Stdlib.snd b; Stdlib.snd c])) ++ | Baccess_block (a, b) -> ++ let a = self#mutable_flag ctx a in ++ let b = self#expression ctx b in ++ ((Baccess_block ((Stdlib.fst a), (Stdlib.fst b))), ++ (self#constr ctx "Baccess_block" [Stdlib.snd a; Stdlib.snd b])) ++ method unboxed_access : ++ 'ctx -> unboxed_access -> (unboxed_access * 'res)= ++ fun ctx x -> ++ match x with ++ | Uaccess_unboxed_field a -> ++ let a = self#longident_loc ctx a in ++ ((Uaccess_unboxed_field (Stdlib.fst a)), ++ (self#constr ctx "Uaccess_unboxed_field" [Stdlib.snd a])) + method comprehension_iterator : + 'ctx -> comprehension_iterator -> (comprehension_iterator * 'res)= + fun ctx x -> diff --git a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+ast+ast_helper_lite.ml.patch b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+ast+ast_helper_lite.ml.patch index 841265bc26..ef3328ee35 100644 --- a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+ast+ast_helper_lite.ml.patch +++ b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+ast+ast_helper_lite.ml.patch @@ -113,12 +113,14 @@ let type_ ?loc ?attrs a = mk ?loc ?attrs (Ppat_type a) let lazy_ ?loc ?attrs a = mk ?loc ?attrs (Ppat_lazy a) let unpack ?loc ?attrs a = mk ?loc ?attrs (Ppat_unpack a) -@@ -201,23 +220,34 @@ module Exp = struct +@@ -200,28 +219,39 @@ module Exp = struct + let attr d a = { d with pexp_attributes = d.pexp_attributes @ [ a ] } let ident ?loc ?attrs a = mk ?loc ?attrs (Pexp_ident a) let constant ?loc ?attrs a = mk ?loc ?attrs (Pexp_constant a) - let let_ ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_let (a, b, c)) +- let let_ ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_let (a, b, c)) - let fun_ ?loc ?attrs a b c d = mk ?loc ?attrs (Pexp_fun (a, b, c, d)) - let function_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_function a) ++ let let_ ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_let (Immutable, a, b, c)) + let fun_ ?(loc = !default_loc) ?attrs a b c d = + mk ~loc ?attrs + (Pexp_function @@ -153,6 +155,11 @@ let coerce ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_coerce (a, b, c)) let send ?loc ?attrs a b = mk ?loc ?attrs (Pexp_send (a, b)) let new_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_new a) +- let setinstvar ?loc ?attrs a b = mk ?loc ?attrs (Pexp_setinstvar (a, b)) ++ let setinstvar ?loc ?attrs a b = mk ?loc ?attrs (Pexp_setvar (a, b)) + let override ?loc ?attrs a = mk ?loc ?attrs (Pexp_override a) + let letmodule ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_letmodule (a, b, c)) + let letexception ?loc ?attrs a b = mk ?loc ?attrs (Pexp_letexception (a, b)) @@ -229,7 +259,7 @@ module Exp = struct let lazy_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_lazy a) let poly ?loc ?attrs a b = mk ?loc ?attrs (Pexp_poly (a, b)) diff --git a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+ast_414.ml.patch b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+ast_414.ml.patch index c14f6ada93..bb46b16a77 100644 --- a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+ast_414.ml.patch +++ b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+ast_414.ml.patch @@ -1,6 +1,21 @@ --- a/astlib/ast_414.ml +++ b/astlib/ast_414.ml -@@ -74,6 +74,12 @@ module Parsetree = struct +@@ -62,6 +62,14 @@ module Asttypes = struct + type injectivity (*IF_CURRENT = Asttypes.injectivity *) = + | Injective + | NoInjectivity ++ ++ type index_kind (*IF_CURRENT = Asttypes.index_kind *) = ++ | Index_int ++ | Index_unboxed_int64 ++ | Index_unboxed_int32 ++ | Index_unboxed_int16 ++ | Index_unboxed_int8 ++ | Index_unboxed_nativeint + end + + module Parsetree = struct +@@ -74,7 +82,14 @@ module Parsetree = struct Suffixes [[g-z][G-Z]] are accepted by the parser. Suffixes except ['l'], ['L'] and ['n'] are rejected by the typechecker *) @@ -11,9 +26,11 @@ + Suffixes except ['l'], ['L'] and ['n'] are rejected by the typechecker + *) | Pconst_char of char (** Character such as ['c']. *) ++ | Pconst_untagged_char of char (** Untagged character such as [#'c']. *) | Pconst_string of string * Location.t * string option (** Constant string such as ["constant"] or -@@ -84,12 +90,28 @@ module Parsetree = struct + [{delim|other constant|delim}]. +@@ -84,12 +99,28 @@ module Parsetree = struct | Pconst_float of string * char option (** Float constant such as [3.4], [2e5] or [1.4e-4]. @@ -43,7 +60,7 @@ (** {1 Extension points} *) type attribute (*IF_CURRENT = Parsetree.attribute *) = { -@@ -106,7 +128,7 @@ module Parsetree = struct +@@ -106,7 +137,7 @@ module Parsetree = struct and extension = string loc * payload (** Extension points such as [[%id ARG] and [%%id ARG]]. @@ -52,7 +69,7 @@ *) and attributes = attribute list -@@ -130,20 +152,30 @@ module Parsetree = struct +@@ -130,20 +161,30 @@ module Parsetree = struct } and core_type_desc (*IF_CURRENT = Parsetree.core_type_desc *) = @@ -93,7 +110,7 @@ Invariant: [n >= 2]. *) -@@ -166,7 +198,11 @@ module Parsetree = struct +@@ -166,7 +207,11 @@ module Parsetree = struct - [T #tconstr] when [l=[T]], - [(T1, ..., Tn) #tconstr] when [l=[T1 ; ... ; Tn]]. *) @@ -106,7 +123,7 @@ | Ptyp_variant of row_field list * closed_flag * label list option (** [Ptyp_variant([`A;`B], flag, labels)] represents: - [[ `A|`B ]] -@@ -182,7 +218,7 @@ module Parsetree = struct +@@ -182,7 +227,7 @@ module Parsetree = struct when [flag] is {{!Asttypes.closed_flag.Closed}[Closed]}, and [labels] is [Some ["X";"Y"]]. *) @@ -115,7 +132,7 @@ (** ['a1 ... 'an. T] Can only appear in the following context: -@@ -211,6 +247,7 @@ module Parsetree = struct +@@ -211,6 +256,7 @@ module Parsetree = struct {!value_description}. *) | Ptyp_package of package_type (** [(module S)]. *) @@ -123,7 +140,7 @@ | Ptyp_extension of extension (** [[%id]]. *) and package_type = Longident.t loc * (Longident.t loc * core_type) list -@@ -273,10 +310,26 @@ module Parsetree = struct +@@ -273,18 +319,36 @@ module Parsetree = struct Other forms of interval are recognized by the parser but rejected by the type-checker. *) @@ -151,9 +168,21 @@ + - If Closed, [n >= 2] + - If Open, [n >= 1] *) - | Ppat_construct of Longident.t loc * (string loc list * pattern) option +- | Ppat_construct of Longident.t loc * (string loc list * pattern) option ++ | Ppat_construct of Longident.t loc * ((string loc * jkind_annotation option) list * pattern) option (** [Ppat_construct(C, args)] represents: -@@ -300,9 +353,23 @@ module Parsetree = struct + - [C] when [args] is [None], + - [C P] when [args] is [Some ([], P)] + - [C (P1, ..., Pn)] when [args] is + [Some ([], Ppat_tuple [P1; ...; Pn])] +- - [C (type a b) P] when [args] is [Some ([a; b], P)] ++ - [C (type a b) P] when [args] is [Some ([a, None; b, None], P)] ++ - [C (type (a : k) b) P] ++ when [args] is [Some ([a, Some k; b, None], P)] + *) + | Ppat_variant of label * pattern option + (** [Ppat_variant(`A, pat)] represents: +@@ -300,9 +364,23 @@ module Parsetree = struct Invariant: [n > 0] *) @@ -179,10 +208,17 @@ | Ppat_type of Longident.t loc (** Pattern [#tconst] *) | Ppat_lazy of pattern (** Pattern [lazy P] *) | Ppat_unpack of string option loc -@@ -341,30 +408,21 @@ module Parsetree = struct - - [let rec P1 = E1 and ... and Pn = EN in E] - when [flag] is {{!Asttypes.rec_flag.Recursive}[Recursive]}. - *) +@@ -334,37 +412,33 @@ module Parsetree = struct + | Pexp_constant of constant + (** Expressions constant such as [1], ['a'], ["true"], [1.0], [1l], + [1L], [1n] *) +- | Pexp_let of rec_flag * value_binding list * expression +- (** [Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E)] represents: +- - [let P1 = E1 and ... and Pn = EN in E] +- when [flag] is {{!Asttypes.rec_flag.Nonrecursive}[Nonrecursive]}, +- - [let rec P1 = E1 and ... and Pn = EN in E] +- when [flag] is {{!Asttypes.rec_flag.Recursive}[Recursive]}. +- *) - | Pexp_function of case list (** [function P1 -> E1 | ... | Pn -> En] *) - | Pexp_fun of arg_label * expression option * pattern * expression - (** [Pexp_fun(lbl, exp0, P, E1)] represents: @@ -198,6 +234,18 @@ - - [fun ?l:(P = E0) -> E1] - when [lbl] is {{!Asttypes.arg_label.Optional}[Optional l]} - and [exp0] is [Some E0] ++ | Pexp_let of mutable_flag * rec_flag * value_binding list * expression ++ (** [Pexp_let(mut, rec, [(P1,E1) ; ... ; (Pn,En)], E)] represents: ++ - [let P1 = E1 and ... and Pn = EN in E] ++ when [rec] is {{!Asttypes.rec_flag.Nonrecursive}[Nonrecursive]} ++ and [mut] = {{!Asttypes.mutable_flag.Immutable}[Immutable]}. ++ - [let rec P1 = E1 and ... and Pn = EN in E] ++ when [rec] is {{!Asttypes.rec_flag.Recursive}[Recursive]} ++ and [mut] = {{!Asttypes.mutable_flag.Immutable}[Immutable]}. ++ - [let mutable P1 = E1 in E] ++ when [rec] is {{!Asttypes.rec_flag.Nonrecursive}[Nonrecursive]} ++ and [mut] = {{!Asttypes.mutable_flag.Mutable}[Mutable]}. ++ Invariant: If [mut = Mutable] then [n = 1] and [rec = Nonrecursive] *) + | Pexp_function of + function_param list * function_constraint * function_body + (** [Pexp_function ([P1; ...; Pn], C, body)] represents any construct @@ -224,7 +272,7 @@ | Pexp_apply of expression * (arg_label * expression) list (** [Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)])] represents [E0 ~l1:E1 ... ~ln:En] -@@ -380,11 +438,24 @@ module Parsetree = struct +@@ -380,11 +454,24 @@ module Parsetree = struct (** [match E0 with P1 -> E1 | ... | Pn -> En] *) | Pexp_try of expression * case list (** [try E0 with P1 -> E1 | ... | Pn -> En] *) @@ -251,7 +299,7 @@ | Pexp_construct of Longident.t loc * expression option (** [Pexp_construct(C, exp)] represents: - [C] when [exp] is [None], -@@ -403,10 +474,19 @@ module Parsetree = struct +@@ -403,10 +490,22 @@ module Parsetree = struct Invariant: [n > 0] *) @@ -269,10 +317,13 @@ - | Pexp_array of expression list (** [[| E1; ...; En |]] *) + | Pexp_array of mutable_flag * expression list + (** [[| E1; ...; En |]] or [[: E1; ...; En :]] *) ++ | Pexp_idx of block_access * unboxed_access list ++ (** [(BA1 UA1 UA2 ...)] e.g. [(.foo.#bar.#baz)] ++ Above, BA1=.foo, UA1=.#bar, and UA2=#.baz *) | Pexp_ifthenelse of expression * expression * expression option (** [if E1 then E2 else E3] *) | Pexp_sequence of expression * expression (** [E1; E2] *) -@@ -418,7 +498,7 @@ module Parsetree = struct +@@ -418,7 +517,7 @@ module Parsetree = struct - [for i = E1 downto E2 do E3 done] when [direction] is {{!Asttypes.direction_flag.Downto}[Downto]} *) @@ -281,7 +332,16 @@ | Pexp_coerce of expression * core_type option * core_type (** [Pexp_coerce(E, from, T)] represents - [(E :> T)] when [from] is [None], -@@ -446,7 +526,7 @@ module Parsetree = struct +@@ -426,7 +525,7 @@ module Parsetree = struct + *) + | Pexp_send of expression * label loc (** [E # m] *) + | Pexp_new of Longident.t loc (** [new M.c] *) +- | Pexp_setinstvar of label loc * expression (** [x <- 2] *) ++ | Pexp_setvar of label loc * expression (** [x <- 2] *) + | Pexp_override of (label loc * expression) list + (** [{< x1 = E1; ...; xn = En >}] *) + | Pexp_letmodule of string option loc * module_expr * expression +@@ -446,7 +545,7 @@ module Parsetree = struct {{!class_field_kind.Cfk_concrete}[Cfk_concrete]} for methods (not values). *) | Pexp_object of class_structure (** [object ... end] *) @@ -290,7 +350,7 @@ | Pexp_pack of module_expr (** [(module ME)]. -@@ -461,6 +541,15 @@ module Parsetree = struct +@@ -461,6 +560,15 @@ module Parsetree = struct - [let* P0 = E00 and* P1 = E01 in E1] *) | Pexp_extension of extension (** [[%id]] *) | Pexp_unreachable (** [.] *) @@ -306,7 +366,7 @@ and case (*IF_CURRENT = Parsetree.case *) = { -@@ -485,12 +574,130 @@ module Parsetree = struct +@@ -485,12 +593,148 @@ module Parsetree = struct pbop_loc : Location.t; } @@ -390,6 +450,24 @@ + } + (** See the comment on {{!expression_desc.Pexp_function}[Pexp_function]}. *) + ++ and block_access (*IF_CURRENT = Parsetree.block_access *) = ++ | Baccess_field of Longident.t loc ++ (** [.foo] *) ++ | Baccess_array of mutable_flag * index_kind * expression ++ (** Mutable array accesses: [.(E)], [.L(E)], [.l(E)], [.n(E)] ++ Immutable array accesses: [.:(E)], [.:L(E)], [.:l(E)], [.:n(E)] ++ ++ Indexed by [int], [int64#], [int32#], or [nativeint#], respectively. ++ *) ++ | Baccess_block of mutable_flag * expression ++ (** Access using another block index: [.idx_imm(E)], [.idx_mut(E)] ++ (usually followed by unboxed accesses, to deepen the index). ++ *) ++ ++ and unboxed_access (*IF_CURRENT = Parsetree.unboxed_access *) = ++ | Uaccess_unboxed_field of Longident.t loc ++ (** [.#foo] *) ++ + and comprehension_iterator (*IF_CURRENT = Parsetree.comprehension_iterator *) = + | Pcomp_range of + { start : expression; @@ -437,7 +515,7 @@ pval_prim: string list; pval_attributes: attributes; (** [... [\@\@id1] [\@\@id2]] *) pval_loc: Location.t; -@@ -515,6 +722,7 @@ module Parsetree = struct +@@ -515,6 +759,7 @@ module Parsetree = struct ptype_private: private_flag; (** for [= private ...] *) ptype_manifest: core_type option; (** represents [= T] *) ptype_attributes: attributes; (** [... [\@\@id1] [\@\@id2]] *) @@ -445,7 +523,7 @@ ptype_loc: Location.t; } (** -@@ -547,12 +755,14 @@ module Parsetree = struct +@@ -547,12 +792,14 @@ module Parsetree = struct | Ptype_abstract | Ptype_variant of constructor_declaration list | Ptype_record of label_declaration list (** Invariant: non-empty list *) @@ -460,7 +538,7 @@ pld_type: core_type; pld_loc: Location.t; pld_attributes: attributes; (** [l : T [\@id1] [\@id2]] *) -@@ -571,15 +781,23 @@ module Parsetree = struct +@@ -571,15 +818,23 @@ module Parsetree = struct and constructor_declaration (*IF_CURRENT = Parsetree.constructor_declaration *) = { pcd_name: string loc; @@ -486,7 +564,7 @@ | Pcstr_record of label_declaration list (** Values of type {!constructor_declaration} represents the constructor arguments of: -@@ -626,7 +844,8 @@ module Parsetree = struct +@@ -626,7 +881,8 @@ module Parsetree = struct (** Definition of a new exception ([exception E]). *) and extension_constructor_kind (*IF_CURRENT = Parsetree.extension_constructor_kind *) = @@ -496,7 +574,7 @@ (** [Pext_decl(existentials, c_args, t_opt)] describes a new extension constructor. It can be: - [C of T1 * ... * Tn] when: -@@ -854,21 +1073,26 @@ module Parsetree = struct +@@ -854,21 +1110,26 @@ module Parsetree = struct and module_type_desc (*IF_CURRENT = Parsetree.module_type_desc *) = | Pmty_ident of Longident.t loc (** [Pmty_ident(S)] represents [S] *) | Pmty_signature of signature (** [sig ... end] *) @@ -526,7 +604,7 @@ and signature_item (*IF_CURRENT = Parsetree.signature_item *) = { -@@ -896,18 +1120,21 @@ module Parsetree = struct +@@ -896,18 +1157,21 @@ module Parsetree = struct | Psig_modtypesubst of module_type_declaration (** [module type S := ...] *) | Psig_open of open_description (** [open X] *) @@ -549,7 +627,7 @@ pmd_attributes: attributes; (** [... [\@\@id1] [\@\@id2]] *) pmd_loc: Location.t; } -@@ -963,6 +1190,7 @@ module Parsetree = struct +@@ -963,6 +1227,7 @@ module Parsetree = struct and 'a include_infos (*IF_CURRENT = 'a Parsetree.include_infos *) = { @@ -557,7 +635,7 @@ pincl_mod: 'a; pincl_loc: Location.t; pincl_attributes: attributes; -@@ -1006,9 +1234,17 @@ module Parsetree = struct +@@ -1006,9 +1271,17 @@ module Parsetree = struct | Pmod_functor of functor_parameter * module_expr (** [functor(X : MT1) -> ME] *) | Pmod_apply of module_expr * module_expr (** [ME1(ME2)] *) @@ -576,7 +654,7 @@ and structure = structure_item list -@@ -1048,11 +1284,14 @@ module Parsetree = struct +@@ -1048,11 +1321,14 @@ module Parsetree = struct | Pstr_include of include_declaration (** [include ME] *) | Pstr_attribute of attribute (** [[\@\@\@id]] *) | Pstr_extension of extension * attributes (** [[%%id]] *) @@ -591,7 +669,7 @@ pvb_attributes: attributes; pvb_loc: Location.t; } -@@ -1066,6 +1305,20 @@ module Parsetree = struct +@@ -1066,6 +1342,20 @@ module Parsetree = struct } (** Values of type [module_binding] represents [module X = ME] *) diff --git a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+ast_999.ml.patch b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+ast_999.ml.patch index 97fce71ddf..65b1daaf5e 100644 --- a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+ast_999.ml.patch +++ b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+ast_999.ml.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/astlib/ast_999.ml -@@ -0,0 +1,1347 @@ +@@ -0,0 +1,1385 @@ +module Asttypes = struct + type constant (*IF_CURRENT = Asttypes.constant *) = + Const_int of int @@ -46,6 +46,14 @@ + type injectivity (*IF_CURRENT = Asttypes.injectivity *) = + | Injective + | NoInjectivity ++ ++ type index_kind (*IF_CURRENT = Asttypes.index_kind *) = ++ | Index_int ++ | Index_unboxed_int64 ++ | Index_unboxed_int32 ++ | Index_unboxed_int16 ++ | Index_unboxed_int8 ++ | Index_unboxed_nativeint +end + +module Parsetree = struct @@ -65,6 +73,7 @@ + Suffixes except ['l'], ['L'] and ['n'] are rejected by the typechecker + *) + | Pconst_char of char (** Character such as ['c']. *) ++ | Pconst_untagged_char of char (** Untagged character such as [#'c']. *) + | Pconst_string of string * Location.t * string option + (** Constant string such as ["constant"] or + [{delim|other constant|delim}]. @@ -317,13 +326,16 @@ + - If Closed, [n >= 2] + - If Open, [n >= 1] + *) -+ | Ppat_construct of Longident.t loc * ((string loc * jkind_annotation option) list * pattern) option ++ | Ppat_construct of ++ Longident.t loc * ((string loc * jkind_annotation option) list * pattern) option + (** [Ppat_construct(C, args)] represents: + - [C] when [args] is [None], + - [C P] when [args] is [Some ([], P)] + - [C (P1, ..., Pn)] when [args] is + [Some ([], Ppat_tuple [P1; ...; Pn])] -+ - [C (type a b) P] when [args] is [Some ([a; b], P)] ++ - [C (type a b) P] when [args] is [Some ([a, None; b, None], P)] ++ - [C (type (a : k) b) P] ++ when [args] is [Some ([a, Some k; b, None], P)] + *) + | Ppat_variant of label * pattern option + (** [Ppat_variant(`A, pat)] represents: @@ -387,13 +399,18 @@ + | Pexp_constant of constant + (** Expressions constant such as [1], ['a'], ["true"], [1.0], [1l], + [1L], [1n] *) -+ | Pexp_let of rec_flag * value_binding list * expression -+ (** [Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E)] represents: -+ - [let P1 = E1 and ... and Pn = EN in E] -+ when [flag] is {{!Asttypes.rec_flag.Nonrecursive}[Nonrecursive]}, -+ - [let rec P1 = E1 and ... and Pn = EN in E] -+ when [flag] is {{!Asttypes.rec_flag.Recursive}[Recursive]}. -+ *) ++ | Pexp_let of mutable_flag * rec_flag * value_binding list * expression ++ (** [Pexp_let(mut, rec, [(P1,E1) ; ... ; (Pn,En)], E)] represents: ++ - [let P1 = E1 and ... and Pn = EN in E] ++ when [rec] is {{!Asttypes.rec_flag.Nonrecursive}[Nonrecursive]} ++ and [mut] = {{!Asttypes.mutable_flag.Immutable}[Immutable]}. ++ - [let rec P1 = E1 and ... and Pn = EN in E] ++ when [rec] is {{!Asttypes.rec_flag.Recursive}[Recursive]} ++ and [mut] = {{!Asttypes.mutable_flag.Immutable}[Immutable]}. ++ - [let mutable P1 = E1 in E] ++ when [rec] is {{!Asttypes.rec_flag.Nonrecursive}[Nonrecursive]} ++ and [mut] = {{!Asttypes.mutable_flag.Mutable}[Mutable]}. ++ Invariant: If [mut = Mutable] then [n = 1] and [rec = Nonrecursive] *) + | Pexp_function of + function_param list * function_constraint * function_body + (** [Pexp_function ([P1; ...; Pn], C, body)] represents any construct @@ -473,6 +490,9 @@ + (** [E1.l <- E2] *) + | Pexp_array of mutable_flag * expression list + (** [[| E1; ...; En |]] or [[: E1; ...; En :]] *) ++ | Pexp_idx of block_access * unboxed_access list ++ (** [(BA1 UA1 UA2 ...)] e.g. [(.foo.#bar.#baz)] ++ Above, BA1=.foo, UA1=.#bar, and UA2=#.baz *) + | Pexp_ifthenelse of expression * expression * expression option + (** [if E1 then E2 else E3] *) + | Pexp_sequence of expression * expression (** [E1; E2] *) @@ -492,7 +512,7 @@ + *) + | Pexp_send of expression * label loc (** [E # m] *) + | Pexp_new of Longident.t loc (** [new M.c] *) -+ | Pexp_setinstvar of label loc * expression (** [x <- 2] *) ++ | Pexp_setvar of label loc * expression (** [x <- 2] *) + | Pexp_override of (label loc * expression) list + (** [{< x1 = E1; ...; xn = En >}] *) + | Pexp_letmodule of string option loc * module_expr * expression @@ -641,6 +661,24 @@ + } + (** See the comment on {{!expression_desc.Pexp_function}[Pexp_function]}. *) + ++ and block_access (*IF_CURRENT = Parsetree.block_access *) = ++ | Baccess_field of Longident.t loc ++ (** [.foo] *) ++ | Baccess_array of mutable_flag * index_kind * expression ++ (** Mutable array accesses: [.(E)], [.L(E)], [.l(E)], [.n(E)] ++ Immutable array accesses: [.:(E)], [.:L(E)], [.:l(E)], [.:n(E)] ++ ++ Indexed by [int], [int64#], [int32#], or [nativeint#], respectively. ++ *) ++ | Baccess_block of mutable_flag * expression ++ (** Access using another block index: [.idx_imm(E)], [.idx_mut(E)] ++ (usually followed by unboxed accesses, to deepen the index). ++ *) ++ ++ and unboxed_access (*IF_CURRENT = Parsetree.unboxed_access *) = ++ | Uaccess_unboxed_field of Longident.t loc ++ (** [.#foo] *) ++ + and comprehension_iterator (*IF_CURRENT = Parsetree.comprehension_iterator *) = + | Pcomp_range of + { start : expression; @@ -1345,6 +1383,6 @@ +end + +module Config = struct -+ let ast_impl_magic_number = "Caml1999M561" -+ let ast_intf_magic_number = "Caml1999N561" ++ let ast_impl_magic_number = "Caml1999M568" ++ let ast_intf_magic_number = "Caml1999N568" +end diff --git a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+migrate_500_999.ml.patch b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+migrate_500_999.ml.patch index d7b6e2a6d0..7c7d6bd53e 100644 --- a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+migrate_500_999.ml.patch +++ b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+migrate_500_999.ml.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/astlib/migrate_500_999.ml -@@ -0,0 +1,1650 @@ +@@ -0,0 +1,1686 @@ +open Stdlib0 +module From = Ast_500 +module To = Ast_999 @@ -84,9 +84,12 @@ + Ast_999.Parsetree.Pexp_ident (copy_loc copy_Longident_t x0) + | Ast_500.Parsetree.Pexp_constant x0 -> + Ast_999.Parsetree.Pexp_constant (copy_constant x0) -+ | Ast_500.Parsetree.Pexp_let (x0, x1, x2) -> ++ | Ast_500.Parsetree.Pexp_let (x0, x1, x2, x3) -> + Ast_999.Parsetree.Pexp_let -+ (copy_rec_flag x0, List.map copy_value_binding x1, copy_expression x2) ++ ( copy_mutable_flag x0 ++ , copy_rec_flag x1 ++ , List.map copy_value_binding x2 ++ , copy_expression x3 ) + | Ast_500.Parsetree.Pexp_function (x0, x1, x2) -> + Ast_999.Parsetree.Pexp_function + ( List.map copy_function_param x0 @@ -142,6 +145,9 @@ + (copy_expression x0, copy_loc copy_Longident_t x1, copy_expression x2) + | Ast_500.Parsetree.Pexp_array (x0, x1) -> + Ast_999.Parsetree.Pexp_array (copy_mutable_flag x0, List.map copy_expression x1) ++ ++ | Ast_500.Parsetree.Pexp_idx (x0, x1) -> ++ Ast_999.Parsetree.Pexp_idx (copy_block_access x0, List.map copy_unboxed_access x1) + | Ast_500.Parsetree.Pexp_ifthenelse (x0, x1, x2) -> + Ast_999.Parsetree.Pexp_ifthenelse + (copy_expression x0, copy_expression x1, Option.map copy_expression x2) @@ -168,8 +174,8 @@ + Ast_999.Parsetree.Pexp_send (copy_expression x0, copy_loc copy_label x1) + | Ast_500.Parsetree.Pexp_new x0 -> + Ast_999.Parsetree.Pexp_new (copy_loc copy_Longident_t x0) -+ | Ast_500.Parsetree.Pexp_setinstvar (x0, x1) -> -+ Ast_999.Parsetree.Pexp_setinstvar ++ | Ast_500.Parsetree.Pexp_setvar (x0, x1) -> ++ Ast_999.Parsetree.Pexp_setvar + (copy_loc copy_label x0, copy_expression x1) + | Ast_500.Parsetree.Pexp_override x0 -> + Ast_999.Parsetree.Pexp_override @@ -216,6 +222,22 @@ + | Ast_500.Parsetree.Pexp_hole -> + Ast_999.Parsetree.Pexp_hole + ++and copy_block_access : ++ Ast_500.Parsetree.block_access -> Ast_999.Parsetree.block_access ++ = function ++ | Baccess_field lid -> ++ Baccess_field (copy_loc copy_Longident_t lid) ++ | Baccess_array (mut, ik, e) -> ++ Baccess_array (copy_mutable_flag mut, copy_index_kind ik, copy_expression e) ++ | Baccess_block (mut, e) -> ++ Baccess_block (copy_mutable_flag mut, copy_expression e) ++ ++and copy_unboxed_access : ++ Ast_500.Parsetree.unboxed_access -> Ast_999.Parsetree.unboxed_access ++ = function ++ | Uaccess_unboxed_field lid -> ++ Uaccess_unboxed_field (copy_loc copy_Longident_t lid) ++ +and copy_comprehension_iterator : + Ast_500.Parsetree.comprehension_iterator -> Ast_999.Parsetree.comprehension_iterator + = function @@ -556,7 +578,10 @@ + Option.map + (fun x -> + let x0, x1 = x in -+ (List.map (fun x -> copy_loc (fun x -> x) x, None) x0, copy_pattern x1)) ++ (List.map ++ (fun (x0, x1) -> ++ copy_loc (fun x -> x) x0, ++ Option.map copy_jkind_annotation x1) x0, copy_pattern x1)) + x1 ) + | Ast_500.Parsetree.Ppat_variant (x0, x1) -> + Ast_999.Parsetree.Ppat_variant (copy_label x0, Option.map copy_pattern x1) @@ -1538,6 +1563,15 @@ + | Ast_500.Asttypes.Contravariant -> Ast_999.Asttypes.Contravariant + | Ast_500.Asttypes.NoVariance -> Ast_999.Asttypes.NoVariance + ++and copy_index_kind : Ast_500.Asttypes.index_kind -> Ast_999.Asttypes.index_kind = ++ function ++ | Ast_500.Asttypes.Index_int -> Ast_999.Asttypes.Index_int ++ | Ast_500.Asttypes.Index_unboxed_int64 -> Ast_999.Asttypes.Index_unboxed_int64 ++ | Ast_500.Asttypes.Index_unboxed_int32 -> Ast_999.Asttypes.Index_unboxed_int32 ++ | Ast_500.Asttypes.Index_unboxed_int16 -> Ast_999.Asttypes.Index_unboxed_int16 ++ | Ast_500.Asttypes.Index_unboxed_int8 -> Ast_999.Asttypes.Index_unboxed_int8 ++ | Ast_500.Asttypes.Index_unboxed_nativeint -> Ast_999.Asttypes.Index_unboxed_nativeint ++ +and copy_value_description : + Ast_500.Parsetree.value_description -> Ast_999.Parsetree.value_description = + fun { @@ -1618,6 +1652,8 @@ + | Ast_500.Parsetree.Pconst_integer (x0, x1) -> + Ast_999.Parsetree.Pconst_integer (x0, Option.map (fun x -> x) x1) + | Ast_500.Parsetree.Pconst_char x0 -> Ast_999.Parsetree.Pconst_char x0 ++ | Ast_500.Parsetree.Pconst_untagged_char x0 -> ++ Ast_999.Parsetree.Pconst_untagged_char x0 + | Ast_500.Parsetree.Pconst_string (x0, x1, x2) -> + Ast_999.Parsetree.Pconst_string + (x0, copy_location x1, Option.map (fun x -> x) x2) diff --git a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+migrate_999_500.ml.patch b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+migrate_999_500.ml.patch index e87c5018ad..8b3ff4e1cb 100644 --- a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+migrate_999_500.ml.patch +++ b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/files/ppxlib+astlib+migrate_999_500.ml.patch @@ -1,6 +1,6 @@ --- /dev/null +++ b/astlib/migrate_999_500.ml -@@ -0,0 +1,1664 @@ +@@ -0,0 +1,1696 @@ +open Stdlib0 +module From = Ast_999 +module To = Ast_500 @@ -75,9 +75,12 @@ + Ast_500.Parsetree.Pexp_ident (copy_loc copy_Longident_t x0) + | Ast_999.Parsetree.Pexp_constant x0 -> + Ast_500.Parsetree.Pexp_constant (copy_constant x0) -+ | Ast_999.Parsetree.Pexp_let (x0, x1, x2) -> ++ | Ast_999.Parsetree.Pexp_let (x0, x1, x2, x3) -> + Ast_500.Parsetree.Pexp_let -+ (copy_rec_flag x0, List.map copy_value_binding x1, copy_expression x2) ++ ( copy_mutable_flag x0 ++ , copy_rec_flag x1 ++ , List.map copy_value_binding x2 ++ , copy_expression x3 ) + | Ast_999.Parsetree.Pexp_function (x0, x1, x2) -> + Ast_500.Parsetree.Pexp_function + ( List.map copy_function_param x0 @@ -133,6 +136,8 @@ + (copy_expression x0, copy_loc copy_Longident_t x1, copy_expression x2) + | Ast_999.Parsetree.Pexp_array (x0, x1)-> + Ast_500.Parsetree.Pexp_array (copy_mutable_flag x0, List.map copy_expression x1) ++ | Ast_999.Parsetree.Pexp_idx (x0, x1) -> ++ Ast_500.Parsetree.Pexp_idx (copy_block_access x0, List.map copy_unboxed_access x1) + | Ast_999.Parsetree.Pexp_ifthenelse (x0, x1, x2) -> + Ast_500.Parsetree.Pexp_ifthenelse + (copy_expression x0, copy_expression x1, Option.map copy_expression x2) @@ -159,8 +164,8 @@ + Ast_500.Parsetree.Pexp_send (copy_expression x0, copy_loc copy_label x1) + | Ast_999.Parsetree.Pexp_new x0 -> + Ast_500.Parsetree.Pexp_new (copy_loc copy_Longident_t x0) -+ | Ast_999.Parsetree.Pexp_setinstvar (x0, x1) -> -+ Ast_500.Parsetree.Pexp_setinstvar ++ | Ast_999.Parsetree.Pexp_setvar (x0, x1) -> ++ Ast_500.Parsetree.Pexp_setvar + (copy_loc copy_label x0, copy_expression x1) + | Ast_999.Parsetree.Pexp_override x0 -> + Ast_500.Parsetree.Pexp_override @@ -207,6 +212,22 @@ + | Ast_999.Parsetree.Pexp_hole -> + Ast_500.Parsetree.Pexp_hole + ++and copy_block_access : ++ Ast_999.Parsetree.block_access -> Ast_500.Parsetree.block_access ++ = function ++ | Baccess_field lid -> ++ Baccess_field (copy_loc copy_Longident_t lid) ++ | Baccess_array (mut, ik, e) -> ++ Baccess_array (copy_mutable_flag mut, copy_index_kind ik, copy_expression e) ++ | Baccess_block (mut, e) -> ++ Baccess_block (copy_mutable_flag mut, copy_expression e) ++ ++and copy_unboxed_access : ++ Ast_999.Parsetree.unboxed_access -> Ast_500.Parsetree.unboxed_access ++ = function ++ | Uaccess_unboxed_field lid -> ++ Uaccess_unboxed_field (copy_loc copy_Longident_t lid) ++ +and copy_comprehension_iterator : + Ast_999.Parsetree.comprehension_iterator -> Ast_500.Parsetree.comprehension_iterator + = function @@ -564,7 +585,7 @@ + Option.map + (fun x -> + let x0, x1 = x in -+ (List.map (fun (x, _) -> copy_loc (fun x -> x) x) x0, copy_pattern x1)) ++ (List.map (fun (x0, x1) -> copy_loc (fun x -> x) x0, Option.map copy_jkind_annotation x1) x0, copy_pattern x1)) + x1 ) + | Ast_999.Parsetree.Ppat_variant (x0, x1) -> + Ast_500.Parsetree.Ppat_variant (copy_label x0, Option.map copy_pattern x1) @@ -1552,6 +1573,15 @@ + | Ast_999.Asttypes.Contravariant -> Ast_500.Asttypes.Contravariant + | Ast_999.Asttypes.NoVariance -> Ast_500.Asttypes.NoVariance + ++and copy_index_kind : Ast_999.Asttypes.index_kind -> Ast_500.Asttypes.index_kind = ++ function ++ | Ast_999.Asttypes.Index_int -> Ast_500.Asttypes.Index_int ++ | Ast_999.Asttypes.Index_unboxed_int64 -> Ast_500.Asttypes.Index_unboxed_int64 ++ | Ast_999.Asttypes.Index_unboxed_int32 -> Ast_500.Asttypes.Index_unboxed_int32 ++ | Ast_999.Asttypes.Index_unboxed_int16 -> Ast_500.Asttypes.Index_unboxed_int16 ++ | Ast_999.Asttypes.Index_unboxed_int8 -> Ast_500.Asttypes.Index_unboxed_int8 ++ | Ast_999.Asttypes.Index_unboxed_nativeint -> Ast_500.Asttypes.Index_unboxed_nativeint ++ +and copy_value_description : + Ast_999.Parsetree.value_description -> Ast_500.Parsetree.value_description = + fun { @@ -1632,6 +1662,8 @@ + | Ast_999.Parsetree.Pconst_integer (x0, x1) -> + Ast_500.Parsetree.Pconst_integer (x0, Option.map (fun x -> x) x1) + | Ast_999.Parsetree.Pconst_char x0 -> Ast_500.Parsetree.Pconst_char x0 ++ | Ast_999.Parsetree.Pconst_untagged_char x0 -> ++ Ast_500.Parsetree.Pconst_untagged_char x0 + | Ast_999.Parsetree.Pconst_string (x0, x1, x2) -> + Ast_500.Parsetree.Pconst_string + (x0, copy_location x1, Option.map (fun x -> x) x2) diff --git a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/opam b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/opam index 37c292c3c3..e95e34066c 100644 --- a/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/opam +++ b/packages/ppxlib_ast/ppxlib_ast.0.33.0+ox/opam @@ -28,7 +28,7 @@ depends: [ "sexplib0" {with-test & >= "v0.15"} "stdlib-shims" "ocamlfind" {with-test} - "re" {with-test & >= "1.9.0"} + "re" {with-test & >= "1.9.0" & = "1.14.0+ox"} "cinaps" {with-test & >= "v0.12.1"} "odoc" {with-doc} "conf-bash" {build} @@ -90,15 +90,15 @@ patches: [ extra-files: [ [ "cleanup.sh" - "sha256=29db7be4fd7860181a36b8c052d1ef944f32918a7c8d6c74fc9b3e7539916d8c" + "sha256=32d1c0b93c6031afa8e27bb309fb00fc5eab10f2f88b16ee424a1c1c420275f2" ] [ "ppxlib+ast+ast.ml.patch" - "sha256=2c12102816bf5599dae10039fb4973ca97cd3a4b294a964cf8b1225e681f81da" + "sha256=1370418b4381e03d814ee4f379e517778ecce877272b0c6bcf39a036fc494a7a" ] [ "ppxlib+ast+ast_helper_lite.ml.patch" - "sha256=b20584b83318532d9bf05b695175a322ef556783beb9ac9cd6150a769041621c" + "sha256=fcb837e075692245ec576e6a336f20de55020b128bfe5df5d3c543407b823e20" ] [ "ppxlib+ast+ast_helper_lite.mli.patch" @@ -126,7 +126,7 @@ extra-files: [ ] [ "ppxlib+astlib+ast_414.ml.patch" - "sha256=6daec29f25537dae70c440cc02dd5b49164040c94ce91bc167b72c0eb73f223e" + "sha256=b5feecd4103b31e66342cb6ae70cfd72b0bccf26c9ecea414bc0b6a136eaf19e" ] [ "ppxlib+astlib+ast_500.ml.patch" @@ -134,7 +134,7 @@ extra-files: [ ] [ "ppxlib+astlib+ast_999.ml.patch" - "sha256=77386466602a452e2fca0b30efe57c800986f2cbcf9c16916c867e67be96d8bf" + "sha256=c7ccba33220660b099d80a528d391655284bc4867c5a3aaed093dbd271afb656" ] [ "ppxlib+astlib+ast_metadata.mli.patch" @@ -154,11 +154,11 @@ extra-files: [ ] [ "ppxlib+astlib+migrate_500_999.ml.patch" - "sha256=d9068afe43d4d59af4bb4b5c1bd3ab7162d3ce12bd069fcc3c1b6878438606b0" + "sha256=36947ec4fb25f6fb39ea0787cb89b5ea032ae90134540c851493ef612cb28acd" ] [ "ppxlib+astlib+migrate_999_500.ml.patch" - "sha256=eb3d0ac8a07586ed4f7d7e2c56bf86d2cbbe41f51e992267a3bb2ef35712cc29" + "sha256=49ebeb191f409e642d1ff366e83518594560161d26129494cb2c63d561dc72a4" ] [ "ppxlib+astlib+parse.mli.patch" diff --git a/packages/ppxlib_jane/ppxlib_jane.v0.18~preview.130.36+326/opam b/packages/ppxlib_jane/ppxlib_jane.v0.18~preview.130.55+197/opam similarity index 80% rename from packages/ppxlib_jane/ppxlib_jane.v0.18~preview.130.36+326/opam rename to packages/ppxlib_jane/ppxlib_jane.v0.18~preview.130.55+197/opam index 406b8ecaf9..ebd1a3b80e 100644 --- a/packages/ppxlib_jane/ppxlib_jane.v0.18~preview.130.36+326/opam +++ b/packages/ppxlib_jane/ppxlib_jane.v0.18~preview.130.55+197/opam @@ -22,7 +22,7 @@ Part of the Jane Street's PPX rewriters collection. """ url { src: - "https://github.com/janestreet/ppxlib_jane/archive/a348bab917f727e80113c4fad6b7688697d0ee89.tar.gz" + "https://github.com/janestreet/ppxlib_jane/archive/7897f9316b565aa2382382b72bfc809e4d6e075c.tar.gz" checksum: - "sha256=845c8f9865a677b15555135f5b5036c7ddd38d0b369ed4ee3a04c34464ec378f" + "sha256=37fe6d17b62d1eeff6b0cd1b6668eac16888dc67e6d683e0c0eeecdba1ce6145" } diff --git a/packages/profunctor/profunctor.v0.18~preview.130.36+326/opam b/packages/profunctor/profunctor.v0.18~preview.130.55+197/opam similarity index 72% rename from packages/profunctor/profunctor.v0.18~preview.130.36+326/opam rename to packages/profunctor/profunctor.v0.18~preview.130.55+197/opam index 494730e3ed..241507e30d 100644 --- a/packages/profunctor/profunctor.v0.18~preview.130.36+326/opam +++ b/packages/profunctor/profunctor.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "record_builder" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "record_builder" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -27,7 +27,7 @@ record_builder and the =ppx_fields= syntax extension. """ url { src: - "https://github.com/janestreet/profunctor/archive/0c38a853b1e96b05b8d26674a37a045b2a1c103f.tar.gz" + "https://github.com/janestreet/profunctor/archive/dd11a667bc0f7357df00a38b61db39f99b8bfe56.tar.gz" checksum: - "sha256=e7fc1d1f93ce8e8f02ef72c1c564e0b8a863986d9bbe8a85d5b86a50a1249377" + "sha256=6b425af17c5316e0d1ebc57f58bb26d48c1e6f0d909528a8bb778a3f411c5021" } diff --git a/packages/protocol_version_header/protocol_version_header.v0.18~preview.130.36+326/opam b/packages/protocol_version_header/protocol_version_header.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/protocol_version_header/protocol_version_header.v0.18~preview.130.36+326/opam rename to packages/protocol_version_header/protocol_version_header.v0.18~preview.130.55+197/opam index d3cf832887..2545061999 100644 --- a/packages/protocol_version_header/protocol_version_header.v0.18~preview.130.36+326/opam +++ b/packages/protocol_version_header/protocol_version_header.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -27,7 +27,7 @@ to a service while using the wrong protocol. """ url { src: - "https://github.com/janestreet/protocol_version_header/archive/3e2312897d5b8e28329d1f3f336872d0173c80ad.tar.gz" + "https://github.com/janestreet/protocol_version_header/archive/616032123173f6dc8be27e9c4fc3d0920b69aa21.tar.gz" checksum: - "sha256=66fdcc3836dc57232690730efaf5bd42d2e364df00e3ff309b6d7816bfa1219b" + "sha256=318ceec08139b1c3492fb98432cb5ba5451ae4f24b4ab5980df176c2ae4f8783" } diff --git a/packages/re/re.1.14.0+ox/files/re+fix-pcre-split.patch b/packages/re/re.1.14.0+ox/files/re+fix-pcre-split.patch new file mode 100644 index 0000000000..a8344656a7 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+fix-pcre-split.patch @@ -0,0 +1,39 @@ +--- a/lib/pcre.ml ++++ b/lib/pcre.ml +@@ -108,9 +108,10 @@ let split ~rex s = + in + match Re.exec rex s ~pos:0 with + | g -> +- if Group.start g 0 = 0 +- then List.rev (split [] (Group.stop g 0)) +- else split [ String.sub s 0 (Group.start g 0) ] (Group.stop g 0) ++ List.rev ++ (if Group.start g 0 = 0 ++ then (split [] (Group.stop g 0)) ++ else split [ String.sub s 0 (Group.start g 0) ] (Group.stop g 0)) + | exception Not_found -> if s = "" then [] else [ s ] + ;; + +--- a/lib_test/expect/test_pcre_split.ml ++++ b/lib_test/expect/test_pcre_split.ml +@@ -4,17 +4,17 @@ let split ~rex s = Re.Pcre.split ~rex s + + let%expect_test "split" = + split ~rex:re_whitespace "aa bb c d "; +- [%expect {| ["d"; "c"; "bb"; "aa"] |}]; ++ [%expect {| ["aa"; "bb"; "c"; "d"] |}]; + split ~rex:re_whitespace " a full_word bc "; + [%expect {| ["a"; "full_word"; "bc"] |}]; + split ~rex:re_empty "abcd"; + [%expect {| ["a"; "b"; "c"; "d"] |}]; + split ~rex:re_eol "a\nb"; +- [%expect {| ["\nb"; "a"] |}]; ++ [%expect {| ["a"; "\nb"] |}]; + split ~rex:re_bow "a b"; + [%expect {| ["a "; "b"] |}]; + split ~rex:re_eow "a b"; +- [%expect {| [" b"; "a"] |}]; ++ [%expect {| ["a"; " b"] |}]; + let rex = Re.Pcre.regexp "" in + split ~rex "xx"; + [%expect {| ["x"; "x"] |}] diff --git a/packages/re/re.1.14.0+ox/files/re+fix-runtime4.patch b/packages/re/re.1.14.0+ox/files/re+fix-runtime4.patch new file mode 100644 index 0000000000..e00c2d1a4f --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+fix-runtime4.patch @@ -0,0 +1,47 @@ +--- a/lib/automata.mli ++++ b/lib/automata.mli +@@ -20,6 +20,8 @@ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + ++open Import ++ + (* Regular expressions *) + + module Mark : sig +--- a/lib/import.ml ++++ b/lib/import.ml +@@ -22,3 +22,33 @@ module Int = struct + + include Stdlib.Int + end ++ ++external runtime5 : unit -> bool @@ portable = "%runtime5" ++ ++module type Mutex = sig @@ portable ++ type t : value mod portable contended ++ val create : unit -> t ++ val lock : t -> unit ++ val try_lock : t -> bool ++ val unlock : t -> unit ++ val protect : t -> (unit -> 'a) -> 'a ++end ++ ++module Mutex : Mutex = struct ++ include ( ++ val ( ++ if runtime5 () ++ then (module Mutex : Mutex) ++ else (module struct ++ (* Define a fake version of Mutex for runtime4; we're not synchronizing access for ++ the sake of systhreads, only multiple domains, and Mutex raises on runtime4 ++ unless you include the threads library (which we can't do since we need to work ++ on JSOO) *) ++ type t = unit ++ let create () = () ++ let lock () = () ++ let try_lock () = true ++ let unlock () = () ++ let protect () f = f () ++ end : Mutex))) ++end diff --git a/packages/re/re.1.14.0+ox/files/re+lib+ast.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+ast.ml.patch new file mode 100644 index 0000000000..2b04ae5db9 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+ast.ml.patch @@ -0,0 +1,32 @@ +--- a/lib/ast.ml ++++ b/lib/ast.ml +@@ -1,9 +1,10 @@ + open Import + +-type ('a, _) ast = ++type ('a, _) ast : immutable_data with 'a = + | Alternative : 'a list -> ('a, [> `Uncased ]) ast + | No_case : 'a -> ('a, [> `Cased ]) ast + | Case : 'a -> ('a, [> `Cased ]) ast ++[@@unsafe_allow_any_mode_crossing] + + let dyn_of_ast f = + let open Dyn in +@@ -46,7 +47,7 @@ let rec dyn_of_cset = + | Cast c -> variant "Cast" [ dyn_of_ast dyn_of_cset c ] + ;; + +-type ('a, 'case) gen = ++type ('a, 'case) gen : immutable_data with 'a = + | Set of 'a + | Ast of (('a, 'case) gen, 'case) ast + | Sequence of ('a, 'case) gen list +@@ -245,7 +246,7 @@ module Export = struct + let str s : t = + let l = ref [] in + for i = String.length s - 1 downto 0 do +- l := char s.[i] :: !l ++ l := (char s.[i] : t) :: !l + done; + seq !l + ;; diff --git a/packages/re/re.1.14.0+ox/files/re+lib+ast.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+ast.mli.patch new file mode 100644 index 0000000000..507757ba71 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+ast.mli.patch @@ -0,0 +1,15 @@ +--- a/lib/ast.mli ++++ b/lib/ast.mli +@@ -1,7 +1,11 @@ +-type ('a, _) ast = private ++@@ portable ++ ++type ('a, _) ast : immutable_data with 'a = private + | Alternative : 'a list -> ('a, [> `Uncased ]) ast + | No_case : 'a -> ('a, [> `Cased ]) ast + | Case : 'a -> ('a, [> `Cased ]) ast ++[@@unsafe_allow_any_mode_crossing ++ ] + + type cset = private + | Cset of Cset.t diff --git a/packages/re/re.1.14.0+ox/files/re+lib+automata.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+automata.ml.patch new file mode 100644 index 0000000000..f5b6a11f45 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+automata.ml.patch @@ -0,0 +1,113 @@ +--- a/lib/automata.ml ++++ b/lib/automata.ml +@@ -24,9 +24,9 @@ open Import + + let hash_combine h accu = (accu * 65599) + h + +-module Ids : sig ++module Ids : sig @@ portable + module Id : sig +- type t ++ type t : immediate + + val equal : t -> t -> bool + val zero : t +@@ -35,7 +35,7 @@ module Ids : sig + + module Hash_set : sig + type id := t +- type t ++ type t : mutable_data + + val create : unit -> t + val mem : t -> id -> bool +@@ -105,7 +105,7 @@ module Rep_kind = struct + let pp fmt t = Format.pp_print_string fmt (to_string t) + end + +-module Mark : sig ++module Mark : sig @@ portable + type t = private int + + val compare : t -> t -> int +@@ -136,7 +136,7 @@ end = struct + ;; + end + +-module Idx : sig ++module Idx : sig @@ portable + type t = private int + + val pp : t Fmt.t +@@ -292,10 +292,12 @@ type expr = Expr.t + include Expr + + module Marks = struct +- type t = ++ type t : immutable_data = + { marks : (Mark.t * Idx.t) list + ; pmarks : Pmark.Set.t + } ++ [@@unsafe_allow_any_mode_crossing ++ ] + + let to_dyn { marks; pmarks } : Dyn.t = + let open Dyn in +@@ -376,8 +378,8 @@ module Status = struct + | Running + end + +-module Desc : sig +- type t ++module Desc : sig @@ portable ++ type t : immutable_data + + val pp : t Fmt.t + +@@ -458,7 +460,7 @@ end = struct + | TMatch m -> variant "TMarks" [ Marks.to_dyn m ] + ;; + +- let to_dyn = to_dyn None ++ let to_dyn t = to_dyn None t + + open E + +@@ -517,10 +519,11 @@ end = struct + | _ :: r -> first_match r + ;; + +- let remove_matches = ++ let remove_matches t = + List.filter ~f:(function + | TMatch _ -> false + | _ -> true) ++ t + ;; + + let split_at_match = +@@ -590,13 +593,14 @@ end + module E = Desc.E + + module State = struct +- type t = ++ type t : immutable_data = + { idx : Idx.t + ; category : Category.t + ; desc : Desc.t + ; mutable status : Status.t option + ; hash : int + } ++ [@@unsafe_allow_any_mode_crossing] + (* Thread-safety: We use double-checked locking to access field + [status] in function [status] below. *) + +@@ -651,7 +655,7 @@ module State = struct + st + ;; + +- module Table = Hashtbl.Make (struct ++ module Table = Hashtbl.MakePortable (struct + type nonrec t = t + + let equal = equal diff --git a/packages/re/re.1.14.0+ox/files/re+lib+automata.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+automata.mli.patch new file mode 100644 index 0000000000..535d652f6b --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+automata.mli.patch @@ -0,0 +1,58 @@ +--- a/lib/automata.mli ++++ b/lib/automata.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +@@ -20,10 +22,12 @@ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + ++open Import ++ + (* Regular expressions *) + + module Mark : sig +- type t [@@immediate] ++ type t : immediate + + val compare : t -> t -> int + val start : t +@@ -54,7 +58,7 @@ module Rep_kind : sig + val pp : t Fmt.t + end + +-type expr ++type expr : immutable_data + + val is_eps : expr -> bool + val pp : expr Fmt.t +@@ -83,7 +87,7 @@ val rename : Ids.t -> expr -> expr + (* States of the automata *) + + module Idx : sig +- type t ++ type t : immediate + + val to_int : t -> int + end +@@ -96,7 +100,7 @@ module Status : sig + end + + module State : sig +- type t ++ type t : immutable_data + + val pp : t Fmt.t + val dummy : t +@@ -114,7 +118,7 @@ end + (* Computation of the states following a given state *) + + module Working_area : sig +- type t ++ type t : mutable_data + + val create : unit -> t + val index_count : t -> int diff --git a/packages/re/re.1.14.0+ox/files/re+lib+bit_vector.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+bit_vector.mli.patch new file mode 100644 index 0000000000..8d0f863eb6 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+bit_vector.mli.patch @@ -0,0 +1,10 @@ +--- a/lib/bit_vector.mli ++++ b/lib/bit_vector.mli +@@ -1,4 +1,6 @@ +-type t ++@@ portable ++ ++type t : mutable_data + + val length : t -> int + val set : t -> int -> bool -> unit diff --git a/packages/re/re.1.14.0+ox/files/re+lib+category.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+category.mli.patch new file mode 100644 index 0000000000..f797f32203 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+category.mli.patch @@ -0,0 +1,15 @@ +--- a/lib/category.mli ++++ b/lib/category.mli +@@ -1,9 +1,11 @@ ++@@ portable ++ + (** Categories represent the various kinds of characters that can be tested + by look-ahead and look-behind operations. + + This is more restricted than Cset, but faster. *) + +-type t [@@immediate] ++type t : immediate + + val ( ++ ) : t -> t -> t + val from_char : char -> t diff --git a/packages/re/re.1.14.0+ox/files/re+lib+color_map.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+color_map.mli.patch new file mode 100644 index 0000000000..4103971a23 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+color_map.mli.patch @@ -0,0 +1,29 @@ +--- a/lib/color_map.mli ++++ b/lib/color_map.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* Color maps exists to provide an optimization for the regex engine. The fact + that some characters are entirely equivalent for some regexes means that we + can use them interchangeably. +@@ -5,17 +7,17 @@ + A color map assigns a color to every character in our character set. Any two + characters with the same color will be treated equivalently by the automaton. + *) +-type t ++type t : mutable_data + + module Repr : sig +- type t ++ type t : immutable_data + + val repr : t -> Cset.c -> char + val length : t -> int + end + + module Table : sig +- type t ++ type t : immutable_data + + val get_char : t -> Cset.c -> char + val get : t -> char -> Cset.c diff --git a/packages/re/re.1.14.0+ox/files/re+lib+compile.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+compile.ml.patch new file mode 100644 index 0000000000..4eb00b478f --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+compile.ml.patch @@ -0,0 +1,151 @@ +--- a/lib/compile.ml ++++ b/lib/compile.ml +@@ -2,7 +2,7 @@ open Import + + let rec iter n f v = if Int.equal n 0 then v else iter (n - 1) f (f v) + +-module Idx : sig ++module Idx : sig @@ portable + type t [@@immediate] + + val unknown : t +@@ -54,8 +54,8 @@ type state_info = + color. For performance reason, to avoid an indirection, we manually + unbox the transition table: we allocate a single array, with the + state information at index 0, followed by the transitions. *) +-module State : sig +- type t ++module State : sig @@ portable ++ type t : mutable_data + + val make : ncol:int -> state_info -> t + val make_break : state_info -> t +@@ -64,7 +64,7 @@ module State : sig + val set_transition : t -> color:Cset.c -> t -> unit + val is_unknown_transition : t -> color:Cset.c -> bool + end = struct +- type t = Table of t array [@@unboxed] ++ type t : mutable_data = Table of t array [@@unboxed] + + (* Thread-safety: + We store the state information at index 0. For other elements +@@ -93,7 +93,7 @@ end = struct + let unknown_state = dummy { idx = Idx.unknown; final = []; desc = Automata.State.dummy } + + let make ~ncol state = +- let st = Table (Array.make (ncol + 1) unknown_state) in ++ let st = Table (Array.make (ncol + 1) (Stdlib.Obj.magic_uncontended unknown_state)) in + set_info st state; + st + ;; +@@ -102,7 +102,7 @@ end = struct + end + + (* Automata (compiled regular expression) *) +-type re = ++type re : immutable_data = + { initial : Automata.expr + ; (* The whole regular expression *) + mutable initial_states : (Category.t * State.t) list +@@ -126,6 +126,8 @@ type re = + ; (* Number of groups in the regular expression *) + mutex : Mutex.t + } ++(* See "thread-safety" comment below. *) ++[@@unsafe_allow_any_mode_crossing] + + (* Thread-safety: + We use double-checked locking to access field [initial_states]. The +@@ -151,7 +153,7 @@ module Positions = struct + mutable length : int + } + +- let empty = { positions = [||]; length = 0 } ++ let get_empty () = { positions = [||]; length = 0 } + let length t = t.length + let unsafe_set t idx pos = Array.unsafe_set t.positions idx pos + +@@ -181,7 +183,7 @@ module Positions = struct + always checking whether it is large enough before modifying it. *) + let length = Automata.Working_area.index_count re.tbl + 1 in + { positions = Array.make length 0; length }) +- else empty ++ else get_empty () + ;; + end + +@@ -414,22 +416,32 @@ let make_match_str re positions ~len ~gr + scan_str re positions s initial_state ~pos ~last ~groups + in + let state_info = State.get_info st in +- if Idx.is_break state_info.idx || (partial && not groups) ++ if Idx.is_break state_info.idx + then Automata.State.status re.mutex state_info.desc +- else if partial && groups +- then ( +- match Automata.State.status re.mutex state_info.desc with +- | (Match _ | Failed) as status -> status +- | Running -> +- (* This could be because it's still not fully matched, or it +- could be that because we need to run special end of input +- checks. *) +- (match final_boundary_check re positions ~last ~slen s state_info ~groups with +- | Match _ as status -> status +- | Failed | Running -> +- (* A failure here just means that we need more data, i.e. +- it's a partial match. *) +- Running)) ++ else if partial ++ then if groups ++ then ( ++ match Automata.State.status re.mutex state_info.desc with ++ | (Match _ | Failed) as status -> status ++ | Running -> ++ (* This could be because it's still not fully matched, or it ++ could be that because we need to run special end of input ++ checks. *) ++ (match final_boundary_check re positions ~last ~slen s state_info ~groups with ++ | Match _ as status -> status ++ | Failed | Running -> ++ (* A failure here just means that we need more data, i.e. ++ it's a partial match. *) ++ Running)) ++ else ( ++ match Automata.State.status re.mutex state_info.desc with ++ | Running as status when last = slen -> ++ (* For partial matching at end of input, check if we can transition to a ++ match *) ++ (match final_boundary_check re positions ~last ~slen s state_info ~groups with ++ | Match _ as status -> status ++ | Failed | Running -> status) ++ | (Match _ | Running | Failed) as status -> status) + else final_boundary_check re positions ~last ~slen s state_info ~groups + ;; + +@@ -466,7 +478,7 @@ module Stream = struct + let finalize t s ~pos ~len = + (* TODO bound checks? *) + let last = pos + len in +- let state = scan_str t.re Positions.empty s t.state ~last ~pos ~groups:false in ++ let state = scan_str t.re (Positions.get_empty ()) s t.state ~last ~pos ~groups:false in + let info = State.get_info state in + match + let _idx, res = +@@ -630,7 +642,7 @@ let match_str_no_bounds ~groups ~partial + let match_str_p re s ~pos ~len = + if pos < 0 || len < -1 || pos + len > String.length s + then invalid_arg "Re.exec: out of bounds"; +- match make_match_str re Positions.empty ~len ~groups:false ~partial:false s ~pos with ++ match make_match_str re (Positions.get_empty ()) ~len ~groups:false ~partial:false s ~pos with + | Match _ -> true + | _ -> false + ;; +@@ -812,7 +824,7 @@ let compile_1 regexp = + ; greedy = `Greedy + ; pos = ref A.Mark.start + ; names = ref [] +- ; cache = ref Cset.CSetMap.empty ++ ; cache = ref (Stdlib.Obj.magic_uncontended Cset.CSetMap.empty) + ; colors + } + in diff --git a/packages/re/re.1.14.0+ox/files/re+lib+compile.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+compile.mli.patch new file mode 100644 index 0000000000..2d1c04d422 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+compile.mli.patch @@ -0,0 +1,23 @@ +--- a/lib/compile.mli ++++ b/lib/compile.mli +@@ -1,7 +1,9 @@ +-type re ++@@ portable ++ ++type re : immutable_data + + module Stream : sig +- type t ++ type t : mutable_data + + type 'a feed = + | Ok of 'a +@@ -13,7 +15,7 @@ module Stream : sig + + module Group : sig + type stream := t +- type t ++ type t : mutable_data + + module Match : sig + type t diff --git a/packages/re/re.1.14.0+ox/files/re+lib+core.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+core.mli.patch new file mode 100644 index 0000000000..d39eae6e0c --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+core.mli.patch @@ -0,0 +1,26 @@ +--- a/lib/core.mli ++++ b/lib/core.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +@@ -780,7 +782,7 @@ module Stream : sig + + This module is not covered by semver's stability guarantee. *) + +- type t ++ type t : mutable_data + + type 'a feed = + | Ok of 'a +@@ -797,7 +799,7 @@ module Stream : sig + (** Match a string against a regular expression with capture groups *) + + type stream := t +- type t ++ type t : mutable_data + + module Match : sig + type t diff --git a/packages/re/re.1.14.0+ox/files/re+lib+cset.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+cset.ml.patch new file mode 100644 index 0000000000..a8ff97e1fb --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+cset.ml.patch @@ -0,0 +1,54 @@ +--- a/lib/cset.ml ++++ b/lib/cset.ml +@@ -41,8 +41,8 @@ let compare_pair (x, y) (x', y') = + ;; + + let equal_pair (x, y) (x', y') = Int.equal x x' && Int.equal y y' +-let equal = List.equal ~eq:equal_pair +-let compare : t -> t -> int = List.compare ~cmp:compare_pair ++let equal x y = List.equal ~eq:equal_pair x y ++let compare x y = List.compare ~cmp:compare_pair x y + + let rec union l l' = + match l, l' with +@@ -87,7 +87,7 @@ let rec diff l l' = + ;; + + let single = +- let single c = [ c, c ] in ++ let single (c : c) = [ c, c ] in + Dense_map.make (* an extra color for lnl *) ~size:257 ~f:single + ;; + +@@ -101,10 +101,10 @@ let rec offset o l = + | (c1, c2) :: r -> (c1 + o, c2 + o) :: offset o r + ;; + +-let empty = [] ++let empty : t = [] + let cany = [ 0, 255 ] +-let union_all : t list -> t = List.fold_left ~init:empty ~f:union +-let intersect_all : t list -> t = List.fold_left ~init:cany ~f:inter ++let union_all ts = List.fold_left ~init:empty ~f:union ts ++let intersect_all ts = List.fold_left ~init:cany ~f:inter ts + + let rec mem (c : int) s = + match s with +@@ -127,7 +127,7 @@ let print_one ch (c1, c2) = + if Int.equal c1 c2 then Format.fprintf ch "%d" c1 else Format.fprintf ch "%d-%d" c1 c2 + ;; + +-let pp = Fmt.list ~pp_sep:(Fmt.lit ", ") print_one ++let pp ts = Fmt.list ~pp_sep:(Fmt.lit ", ") print_one ts + + let to_dyn t = + let open Dyn in +@@ -149,7 +149,7 @@ let one_char = function + | _ -> None + ;; + +-module CSetMap = Map.Make (struct ++module CSetMap = Map.MakePortable (struct + type t = int * (int * int) list + + let compare (i, u) (j, v) = diff --git a/packages/re/re.1.14.0+ox/files/re+lib+cset.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+cset.mli.patch new file mode 100644 index 0000000000..bbec0204c1 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+cset.mli.patch @@ -0,0 +1,26 @@ +--- a/lib/cset.mli ++++ b/lib/cset.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +@@ -22,7 +24,7 @@ + + (* Character sets, represented as sorted list of intervals *) + +-type c [@@immediate] ++type c : immediate + + val equal_c : c -> c -> bool + val to_int : c -> int +@@ -30,7 +32,7 @@ val of_int : int -> c + val to_char : c -> char + val of_char : char -> c + +-type t ++type t : immutable_data + + (** special characters which isn't present in any set (not even in [cany]) *) + val null_char : c diff --git a/packages/re/re.1.14.0+ox/files/re+lib+dense_map.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+dense_map.ml.patch new file mode 100644 index 0000000000..c8ca17b120 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+dense_map.ml.patch @@ -0,0 +1,13 @@ +--- a/lib/dense_map.ml ++++ b/lib/dense_map.ml +@@ -1,4 +1,7 @@ +-let make ~size ~f = +- let cache = Array.init size f in +- fun i -> cache.(i) ++open Import ++ ++let make : ('a : value mod contended portable). size:int -> f:(int -> 'a) -> (int -> 'a) @ portable = ++ fun ~size ~f -> ++ let cache = Iarray.unsafe_of_array__promise_no_mutation (Array.init size f) in ++ fun i -> cache.:(i) + ;; diff --git a/packages/re/re.1.14.0+ox/files/re+lib+dense_map.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+dense_map.mli.patch new file mode 100644 index 0000000000..93c2ea8f68 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+dense_map.mli.patch @@ -0,0 +1,7 @@ +--- a/lib/dense_map.mli ++++ b/lib/dense_map.mli +@@ -1 +1,3 @@ +-val make : size:int -> f:(int -> 'a) -> int -> 'a ++@@ portable ++ ++val make : ('a : value mod contended portable). size:int -> f:(int -> 'a) -> (int -> 'a) @ portable diff --git a/packages/re/re.1.14.0+ox/files/re+lib+emacs.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+emacs.mli.patch new file mode 100644 index 0000000000..1a0b1562b3 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+emacs.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/emacs.mli ++++ b/lib/emacs.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + diff --git a/packages/re/re.1.14.0+ox/files/re+lib+fmt.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+fmt.mli.patch new file mode 100644 index 0000000000..123f6eb55d --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+fmt.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/fmt.mli ++++ b/lib/fmt.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + type formatter := Format.formatter + type 'a t = formatter -> 'a -> unit + diff --git a/packages/re/re.1.14.0+ox/files/re+lib+glob.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+glob.mli.patch new file mode 100644 index 0000000000..7676ee2be2 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+glob.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/glob.mli ++++ b/lib/glob.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + diff --git a/packages/re/re.1.14.0+ox/files/re+lib+group.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+group.mli.patch new file mode 100644 index 0000000000..7855105144 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+group.mli.patch @@ -0,0 +1,17 @@ +--- a/lib/group.mli ++++ b/lib/group.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (** Information about groups in a match. *) + + (** Result of a successful match. *) +@@ -44,7 +46,7 @@ val nb_groups : t -> int + val pp : t Fmt.t + + module Offset : sig +- type t ++ type t : immediate + + val is_present : t -> bool + val get_no_check : t -> int diff --git a/packages/re/re.1.14.0+ox/files/re+lib+hash_set.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+hash_set.ml.patch new file mode 100644 index 0000000000..14840924bf --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+hash_set.ml.patch @@ -0,0 +1,11 @@ +--- a/lib/hash_set.ml ++++ b/lib/hash_set.ml +@@ -60,7 +60,7 @@ let () = + assert (Array.unsafe_get x 0 = absent) + ;; + +-let create () = ref Option.none ++let create () = ref None + + let[@inline] index_of_offset slots index i = + let i = index + !i in diff --git a/packages/re/re.1.14.0+ox/files/re+lib+hash_set.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+hash_set.mli.patch new file mode 100644 index 0000000000..d2da764a3c --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+hash_set.mli.patch @@ -0,0 +1,10 @@ +--- a/lib/hash_set.mli ++++ b/lib/hash_set.mli +@@ -1,4 +1,6 @@ +-type t ++@@ portable ++ ++type t : mutable_data + + val create : unit -> t + val is_empty : t -> bool diff --git a/packages/re/re.1.14.0+ox/files/re+lib+iarray.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+iarray.ml.patch new file mode 100644 index 0000000000..1128282d43 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+iarray.ml.patch @@ -0,0 +1,43 @@ +--- /dev/null ++++ b/lib/iarray.ml +@@ -0,0 +1,40 @@ ++type +'a t = 'a iarray ++ ++external unsafe_to_array__promise_no_mutation ++ : 'a. ++ 'a t -> 'a array ++ @@ portable ++ = "%array_of_iarray" ++ ++external unsafe_of_array__promise_no_mutation ++ : 'a. ++ ('a array[@local_opt]) -> ('a t[@local_opt]) ++ @@ portable ++ = "%array_to_iarray" ++ ++module O = struct ++ external ( .:() ) ++ : ('a t[@local_opt]) ++ -> int ++ -> ('a[@local_opt]) ++ @@ portable ++ = "%array_safe_get" ++end ++ ++include O ++ ++external get ++ : ('a t[@local_opt]) ++ -> int ++ -> ('a[@local_opt]) ++ @@ portable ++ = "%array_safe_get" ++ ++external unsafe_get ++ : ('a t[@local_opt]) ++ -> int ++ -> ('a[@local_opt]) ++ @@ portable ++ = "%array_unsafe_get" ++ ++external length : ('a t[@local_opt]) -> int @@ portable = "%array_length" diff --git a/packages/re/re.1.14.0+ox/files/re+lib+import.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+import.ml.patch new file mode 100644 index 0000000000..11ca059a43 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+import.ml.patch @@ -0,0 +1,38 @@ +--- a/lib/import.ml ++++ b/lib/import.ml +@@ -22,3 +22,35 @@ module Int = struct + + include Stdlib.Int + end ++ ++external runtime5 : unit -> bool @@ portable = "%runtime5" ++ ++module type Mutex = sig @@ portable ++ type t : value mod portable contended ++ val create : unit -> t ++ val lock : t -> unit ++ val try_lock : t -> bool ++ val unlock : t -> unit ++ val protect : t @ local -> (unit -> 'a) -> 'a ++end ++ ++module Mutex : Mutex = struct ++ include ( ++ val ( ++ if runtime5 () ++ then (module Mutex : Mutex) ++ else (module struct ++ (* Define a fake version of Mutex for runtime4; we're not synchronizing access for ++ the sake of systhreads, only multiple domains, and Mutex raises on runtime4 ++ unless you include the threads library (which we can't do since we need to work ++ on JSOO) *) ++ type t = unit ++ let create () = () ++ let lock () = () ++ let try_lock () = true ++ let unlock () = () ++ let protect () f = f () ++ end : Mutex))) ++end ++ ++include Iarray.O diff --git a/packages/re/re.1.14.0+ox/files/re+lib+mark_infos.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+mark_infos.ml.patch new file mode 100644 index 0000000000..3f4a34f70b --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+mark_infos.ml.patch @@ -0,0 +1,65 @@ +--- a/lib/mark_infos.ml ++++ b/lib/mark_infos.ml +@@ -1,15 +1,15 @@ + open Import + +-type t = int array ++type t = int iarray + + let make marks = + let len = 1 + List.fold_left ~f:(fun ma (i, _) -> max ma i) ~init:(-1) marks in + let t = Array.make len (-1) in + List.iter ~f:(fun (i, v) -> t.(i) <- v) marks; +- t ++ Iarray.unsafe_of_array__promise_no_mutation t + ;; + +-let test t i = if 2 * i >= Array.length t then false else t.(2 * i) <> -1 ++let test t i = if 2 * i >= Iarray.length t then false else t.:(2 * i) <> -1 + + module Offset = struct + type t = int +@@ -20,35 +20,35 @@ end + + let start_offset t i = + let start_i = 2 * i in +- if start_i + 1 >= Array.length t then -1 else t.(start_i) ++ if start_i + 1 >= Iarray.length t then -1 else t.:(start_i) + ;; + + let stop_offset t i = + let stop_i = (2 * i) + 1 in +- if stop_i >= Array.length t then -1 else t.(stop_i) ++ if stop_i >= Iarray.length t then -1 else t.:(stop_i) + ;; + + let offset t i = + let start_i = 2 * i in + let stop_i = start_i + 1 in +- if stop_i >= Array.length t ++ if stop_i >= Iarray.length t + then None + else ( +- let start = t.(start_i) in ++ let start = t.:(start_i) in + if start = -1 + then None + else ( +- let stop = t.(stop_i) in ++ let stop = t.:(stop_i) in + Some (start, stop))) + ;; + + let iteri t ~f = +- for i = 0 to (Array.length t / 2) - 1 do ++ for i = 0 to (Iarray.length t / 2) - 1 do + let idx = 2 * i in +- let start = t.(idx) in ++ let start = t.:(idx) in + if start <> -1 + then ( +- let stop = t.(idx + 1) in ++ let stop = t.:(idx + 1) in + f i start stop) + done + ;; diff --git a/packages/re/re.1.14.0+ox/files/re+lib+mark_infos.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+mark_infos.mli.patch new file mode 100644 index 0000000000..542036137e --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+mark_infos.mli.patch @@ -0,0 +1,20 @@ +--- a/lib/mark_infos.mli ++++ b/lib/mark_infos.mli +@@ -1,5 +1,7 @@ ++@@ portable ++ + (** store mark information for groups in an array *) +-type t ++type t : immutable_data + + val make : (int * int) list -> t + val offset : t -> int -> (int * int) option +@@ -7,7 +9,7 @@ val test : t -> int -> bool + val iteri : t -> f:(int -> int -> int -> unit) -> unit + + module Offset : sig +- type t ++ type t : immediate + + val is_present : t -> bool + val get_no_check : t -> int diff --git a/packages/re/re.1.14.0+ox/files/re+lib+parse_buffer.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+parse_buffer.mli.patch new file mode 100644 index 0000000000..c4487e67cb --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+parse_buffer.mli.patch @@ -0,0 +1,10 @@ +--- a/lib/parse_buffer.mli ++++ b/lib/parse_buffer.mli +@@ -1,4 +1,6 @@ +-type t ++@@ portable ++ ++type t : mutable_data + + exception Parse_error + diff --git a/packages/re/re.1.14.0+ox/files/re+lib+pcre.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+pcre.ml.patch new file mode 100644 index 0000000000..6a2194eadf --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+pcre.ml.patch @@ -0,0 +1,16 @@ +--- a/lib/pcre.ml ++++ b/lib/pcre.ml +@@ -108,9 +108,10 @@ let split ~rex s = + in + match Re.exec rex s ~pos:0 with + | g -> +- if Group.start g 0 = 0 +- then List.rev (split [] (Group.stop g 0)) +- else split [ String.sub s 0 (Group.start g 0) ] (Group.stop g 0) ++ List.rev ++ (if Group.start g 0 = 0 ++ then (split [] (Group.stop g 0)) ++ else split [ String.sub s 0 (Group.start g 0) ] (Group.stop g 0)) + | exception Not_found -> if s = "" then [] else [ s ] + ;; + diff --git a/packages/re/re.1.14.0+ox/files/re+lib+pcre.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+pcre.mli.patch new file mode 100644 index 0000000000..cf8070c7d7 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+pcre.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/pcre.mli ++++ b/lib/pcre.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (** NOTE: Only a subset of the PCRE spec is supported *) + + exception Parse_error diff --git a/packages/re/re.1.14.0+ox/files/re+lib+perl.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+perl.mli.patch new file mode 100644 index 0000000000..7d1fd479aa --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+perl.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/perl.mli ++++ b/lib/perl.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + diff --git a/packages/re/re.1.14.0+ox/files/re+lib+pmark.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib+pmark.ml.patch new file mode 100644 index 0000000000..494d421c32 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+pmark.ml.patch @@ -0,0 +1,26 @@ +--- a/lib/pmark.ml ++++ b/lib/pmark.ml +@@ -3,20 +3,15 @@ module Pmark = struct + + let equal (x : int) (y : int) = x = y + let compare (x : int) (y : int) = compare x y +- let r = ref 0 +- +- let gen () = +- incr r; +- !r +- ;; +- ++ let r = Atomic.make 0 ++ let gen () = Atomic.fetch_and_add r 1 + let pp = Format.pp_print_int + end + + include Pmark + + module Set = struct +- module Set = Set.Make (Pmark) ++ module Set = Set.MakePortable (Pmark) + + let[@warning "-32"] to_list x = + let open Set in diff --git a/packages/re/re.1.14.0+ox/files/re+lib+pmark.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+pmark.mli.patch new file mode 100644 index 0000000000..0be1629054 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+pmark.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/pmark.mli ++++ b/lib/pmark.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + type t = private int + + val equal : t -> t -> bool diff --git a/packages/re/re.1.14.0+ox/files/re+lib+posix.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+posix.mli.patch new file mode 100644 index 0000000000..102b46eab0 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+posix.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/posix.mli ++++ b/lib/posix.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + diff --git a/packages/re/re.1.14.0+ox/files/re+lib+posix_class.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+posix_class.mli.patch new file mode 100644 index 0000000000..e0cc62d630 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+posix_class.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/posix_class.mli ++++ b/lib/posix_class.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + val names : string list + val of_name : string -> Core.t + val parse : Parse_buffer.t -> Core.t option diff --git a/packages/re/re.1.14.0+ox/files/re+lib+replace.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+replace.mli.patch new file mode 100644 index 0000000000..f3590d55cb --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+replace.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/replace.mli ++++ b/lib/replace.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (** [replace ~all re ~f s] iterates on [s], and replaces every occurrence + of [re] with [f substring] where [substring] is the current match. + If [all = false], then only the first occurrence of [re] is replaced. *) diff --git a/packages/re/re.1.14.0+ox/files/re+lib+slice.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+slice.mli.patch new file mode 100644 index 0000000000..9a23af2c27 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+slice.mli.patch @@ -0,0 +1,8 @@ +--- a/lib/slice.mli ++++ b/lib/slice.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + type t = + { s : string + ; pos : int diff --git a/packages/re/re.1.14.0+ox/files/re+lib+view.mli.patch b/packages/re/re.1.14.0+ox/files/re+lib+view.mli.patch new file mode 100644 index 0000000000..b2adcc1644 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib+view.mli.patch @@ -0,0 +1,16 @@ +--- a/lib/view.mli ++++ b/lib/view.mli +@@ -1,10 +1,12 @@ ++@@ portable ++ + (** A view of the top-level of a regex. This type is unstable and may change *) + + module Cset : sig + type t = Cset.t + + module Range : sig +- type t ++ type t : immutable_data + + val first : t -> Char.t + val last : t -> Char.t diff --git a/packages/re/re.1.14.0+ox/files/re+lib_test+expect+re_tests.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+re_tests.ml.patch new file mode 100644 index 0000000000..fdf03e8a6d --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+re_tests.ml.patch @@ -0,0 +1,33 @@ +--- /dev/null ++++ b/lib_test/expect/re_tests.ml +@@ -0,0 +1,30 @@ ++ ++ ++module Import = Import ++module Test_186 = Test_186 ++module Test_alternation = Test_alternation ++module Test_automata = Test_automata ++module Test_bit_vector = Test_bit_vector ++module Test_category = Test_category ++module Test_color = Test_color ++module Test_csets = Test_csets ++module Test_emacs = Test_emacs ++module Test_glob = Test_glob ++module Test_group = Test_group ++module Test_hashset = Test_hashset ++module Test_iter = Test_iter ++module Test_mark = Test_mark ++module Test_partial = Test_partial ++module Test_pcre = Test_pcre ++module Test_pcre_288 = Test_pcre_288 ++module Test_pcre_split = Test_pcre_split ++module Test_perl = Test_perl ++module Test_posix = Test_posix ++module Test_re = Test_re ++module Test_replace = Test_replace ++module Test_repn = Test_repn ++module Test_split = Test_split ++module Test_str = Test_str ++module Test_stream = Test_stream ++module Test_validation = Test_validation ++module Test_view = Test_view diff --git a/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_partial.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_partial.ml.patch new file mode 100644 index 0000000000..8180833221 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_partial.ml.patch @@ -0,0 +1,88 @@ +--- a/lib_test/expect/test_partial.ml ++++ b/lib_test/expect/test_partial.ml +@@ -19,9 +19,9 @@ let%expect_test "partial matches" = + [%expect {| `Partial |}]; + (* exec_partial 3 should be `Full *) + t (str "hello") "hello"; +- [%expect {| `Partial |}]; ++ [%expect {| `Full |}]; + t (whole_string (str "hello")) "hello"; +- [%expect {| `Partial |}]; ++ [%expect {| `Full |}]; + t (whole_string (str "hello")) "goodbye"; + [%expect {| `Mismatch |}]; + t (str "hello") ""; +@@ -29,7 +29,47 @@ let%expect_test "partial matches" = + t (str "") "hello"; + [%expect {| `Full |}]; + t (whole_string (str "hello")) ""; +- [%expect {| `Partial |}] ++ [%expect {| `Partial |}]; ++ ++ (* PCRE .* patterns *) ++ t (Re.Pcre.re ".*") "a"; ++ [%expect {| `Full |}]; ++ t (Re.Pcre.re ".*") ""; ++ [%expect {| `Full |}]; ++ t (Re.Pcre.re ".*") "hello world"; ++ [%expect {| `Full |}]; ++ ++ (* .+ patterns *) ++ t (Re.Pcre.re ".+") ""; ++ [%expect {| `Partial |}]; ++ t (Re.Pcre.re ".+") "a"; ++ [%expect {| `Full |}]; ++ t (Re.Pcre.re ".+") "hello"; ++ [%expect {| `Full |}]; ++ ++ (* Optional patterns *) ++ t (opt (char 'a')) ""; ++ [%expect {| `Full |}]; ++ t (opt (char 'a')) "a"; ++ [%expect {| `Full |}]; ++ t (opt (str "hello")) ""; ++ [%expect {| `Full |}]; ++ t (opt (str "hello")) "hello"; ++ [%expect {| `Full |}]; ++ ++ (* Repetition patterns *) ++ t (rep (char 'a')) ""; ++ [%expect {| `Full |}]; ++ t (rep (char 'a')) "a"; ++ [%expect {| `Full |}]; ++ t (rep (char 'a')) "aaa"; ++ [%expect {| `Full |}]; ++ ++ (* Alternative patterns *) ++ t (alt [str "hello"; str "world"]) "hello"; ++ [%expect {| `Full |}]; ++ t (alt [str "hello"; str "world"]) "world"; ++ [%expect {| `Full |}]; + ;; + + let t = exec_partial_detailed +@@ -65,5 +105,23 @@ let%expect_test "partial detailed" = + t ~pos:1 (seq [ not_boundary; str "b" ]) "ab"; + [%expect {| `Full [|1,2,"b"|] |}]; + t (seq [ group (str "a"); rep any; group (str "b") ]) ".acb."; +- [%expect {| `Full [|1,4,"acb";1,2,"a";3,4,"b"|] |}] ++ [%expect {| `Full [|1,4,"acb";1,2,"a";3,4,"b"|] |}]; ++ ++ (* PCRE .* patterns *) ++ t (Re.Pcre.re ".*") "a"; ++ [%expect {| `Full [|0,1,"a"|] |}]; ++ t (Re.Pcre.re ".*") ""; ++ [%expect {| `Full [|0,0,""|] |}]; ++ ++ (* Optional patterns *) ++ t (opt (char 'a')) ""; ++ [%expect {| `Full [|0,0,""|] |}]; ++ t (opt (char 'a')) "a"; ++ [%expect {| `Full [|0,1,"a"|] |}]; ++ ++ (* Repetition patterns *) ++ t (rep (char 'a')) ""; ++ [%expect {| `Full [|0,0,""|] |}]; ++ t (rep (char 'a')) "aaa"; ++ [%expect {| `Full [|0,3,"aaa"|] |}]; + ;; diff --git a/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_pcre.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_pcre.ml.patch new file mode 100644 index 0000000000..5f7b09fd4e --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_pcre.ml.patch @@ -0,0 +1,64 @@ +--- a/lib_test/expect/test_pcre.ml ++++ b/lib_test/expect/test_pcre.ml +@@ -103,3 +103,61 @@ let%expect_test "quote" = + Printf.printf "%S\n" b; + [%expect {xxx| "$()*+.?[\\^{|" |xxx}] + ;; ++ ++let%expect_test "exec_partial consistency for PCRE patterns" = ++ let open Base in ++ let open Expect_test_helpers_base in ++ let test_partial_and_execp_consistency pattern input = ++ let re = Re.compile (Re.Pcre.re pattern) in ++ let execp = Re.execp re input in ++ let exec_partial = Re.exec_partial re input in ++ let exec_partial_as_bool = ++ match exec_partial with ++ | `Full -> true ++ | `Partial | `Mismatch -> false ++ in ++ match Bool.equal execp exec_partial_as_bool with ++ | true -> print_s [%message "consistent"] ++ | false -> ++ print_cr ~cr:CR_soon [%message ++ "inconsistent" ++ (execp : bool) ++ (exec_partial : [ `Full | `Partial | `Mismatch ])] ++ in ++ ++ test_partial_and_execp_consistency ".*" "a"; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency ".*" ""; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency ".*" "hello world"; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency ".+" "a"; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency ".+" "hello"; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency "a?" ""; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency "a?" "a"; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency "a*" ""; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency "a*" "aaa"; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency "hello" "hello"; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency "hello" "he"; ++ [%expect {| consistent |}]; ++ ++ test_partial_and_execp_consistency ".+" ""; ++ [%expect {| consistent |}]; ++;; diff --git a/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_pcre_split.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_pcre_split.ml.patch new file mode 100644 index 0000000000..2f41681546 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_pcre_split.ml.patch @@ -0,0 +1,23 @@ +--- a/lib_test/expect/test_pcre_split.ml ++++ b/lib_test/expect/test_pcre_split.ml +@@ -4,17 +4,17 @@ let split ~rex s = Re.Pcre.split ~rex s + + let%expect_test "split" = + split ~rex:re_whitespace "aa bb c d "; +- [%expect {| ["d"; "c"; "bb"; "aa"] |}]; ++ [%expect {| ["aa"; "bb"; "c"; "d"] |}]; + split ~rex:re_whitespace " a full_word bc "; + [%expect {| ["a"; "full_word"; "bc"] |}]; + split ~rex:re_empty "abcd"; + [%expect {| ["a"; "b"; "c"; "d"] |}]; + split ~rex:re_eol "a\nb"; +- [%expect {| ["\nb"; "a"] |}]; ++ [%expect {| ["a"; "\nb"] |}]; + split ~rex:re_bow "a b"; + [%expect {| ["a "; "b"] |}]; + split ~rex:re_eow "a b"; +- [%expect {| [" b"; "a"] |}]; ++ [%expect {| ["a"; " b"] |}]; + let rex = Re.Pcre.regexp "" in + split ~rex "xx"; + [%expect {| ["x"; "x"] |}] diff --git a/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_re.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_re.ml.patch new file mode 100644 index 0000000000..ea52afce09 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib_test+expect+test_re.ml.patch @@ -0,0 +1,59 @@ +--- a/lib_test/expect/test_re.ml ++++ b/lib_test/expect/test_re.ml +@@ -328,3 +328,56 @@ let%expect_test "witness" = + t eol; + [%expect {| |}] + ;; ++ ++let%expect_test "exec_partial consistency with execp" = ++ let open Base in ++ let open Expect_test_helpers_base in ++ let test_exec_partial re input = ++ let compiled = compile re in ++ let execp = execp compiled input ++ and exec_partial = exec_partial compiled input ++ and exec_partial_detailed = exec_partial_detailed compiled input in ++ match ++ Bool.equal execp ++ (match exec_partial with ++ | `Full -> true ++ | `Mismatch | `Partial -> false) ++ && ++ Bool.equal execp ++ (match exec_partial_detailed with ++ | `Full _ -> true ++ | `Mismatch | `Partial _ -> false) ++ with ++ | true -> print_s [%message "consistent"] ++ | false -> ++ print_cr ~cr:CR_soon [%message ++ "inconsistent" ++ (execp : bool) ++ (exec_partial : [ `Full | `Mismatch | `Partial ]) ++ (exec_partial_detailed : [ `Full of _ | `Mismatch | `Partial of _ ])] ++ in ++ ++ test_exec_partial (Re.Pcre.re ".*") "a"; ++ [%expect {| consistent |}]; ++ ++ test_exec_partial (Re.Pcre.re ".*") ""; ++ [%expect {| consistent |}]; ++ ++ test_exec_partial (Re.Pcre.re ".*") "hello world"; ++ [%expect {| consistent |}]; ++ ++ test_exec_partial (str "hello") "hello"; ++ [%expect {| consistent |}]; ++ ++ test_exec_partial (opt (char 'a')) ""; ++ [%expect {| consistent |}]; ++ ++ test_exec_partial (opt (char 'a')) "a"; ++ [%expect {| consistent |}]; ++ ++ test_exec_partial (str "hello") "he"; ++ [%expect {| consistent |}]; ++ ++ test_exec_partial (str "hello") "goodbye"; ++ [%expect {| consistent |}]; ++;; diff --git a/packages/re/re.1.14.0+ox/files/re+lib_test+re_private.ml.patch b/packages/re/re.1.14.0+ox/files/re+lib_test+re_private.ml.patch new file mode 100644 index 0000000000..0085199a97 --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+lib_test+re_private.ml.patch @@ -0,0 +1,33 @@ +--- /dev/null ++++ b/lib_test/re_private.ml +@@ -0,0 +1,30 @@ ++module Ast = Ast ++module Automata = Automata ++module Bit_vector = Bit_vector ++module Category = Category ++module Color_map = Color_map ++module Compile = Compile ++module Core = Core ++module Cset = Cset ++module Dense_map = Dense_map ++module Dyn = Dyn ++module Emacs = Emacs ++module Fmt = Fmt ++module Glob = Glob ++module Group = Group ++module Hash_set = Hash_set ++module Iarray = Iarray ++module Import = Import ++module Mark_infos = Mark_infos ++module Parse_buffer = Parse_buffer ++module Pcre = Pcre ++module Perl = Perl ++module Pmark = Pmark ++module Posix = Posix ++module Posix_class = Posix_class ++module Re = Re ++module Replace = Replace ++module Search = Search ++module Slice = Slice ++module Str = Str ++module View = View diff --git a/packages/re/re.1.14.0+ox/files/re+portablize.patch b/packages/re/re.1.14.0+ox/files/re+portablize.patch new file mode 100644 index 0000000000..86e678be5a --- /dev/null +++ b/packages/re/re.1.14.0+ox/files/re+portablize.patch @@ -0,0 +1,825 @@ +--- a/lib/ast.ml ++++ b/lib/ast.ml +@@ -1,9 +1,10 @@ + open Import + +-type ('a, _) ast = ++type ('a, _) ast : immutable_data with 'a = + | Alternative : 'a list -> ('a, [> `Uncased ]) ast + | No_case : 'a -> ('a, [> `Cased ]) ast + | Case : 'a -> ('a, [> `Cased ]) ast ++[@@unsafe_allow_any_mode_crossing] + + let dyn_of_ast f = + let open Dyn in +@@ -46,7 +47,7 @@ let rec dyn_of_cset = + | Cast c -> variant "Cast" [ dyn_of_ast dyn_of_cset c ] + ;; + +-type ('a, 'case) gen = ++type ('a, 'case) gen : immutable_data with 'a = + | Set of 'a + | Ast of (('a, 'case) gen, 'case) ast + | Sequence of ('a, 'case) gen list +@@ -245,7 +246,7 @@ module Export = struct + let str s : t = + let l = ref [] in + for i = String.length s - 1 downto 0 do +- l := char s.[i] :: !l ++ l := (char s.[i] : t) :: !l + done; + seq !l + ;; +--- a/lib/ast.mli ++++ b/lib/ast.mli +@@ -1,7 +1,11 @@ +-type ('a, _) ast = private ++@@ portable ++ ++type ('a, _) ast : immutable_data with 'a = private + | Alternative : 'a list -> ('a, [> `Uncased ]) ast + | No_case : 'a -> ('a, [> `Cased ]) ast + | Case : 'a -> ('a, [> `Cased ]) ast ++[@@unsafe_allow_any_mode_crossing ++ ] + + type cset = private + | Cset of Cset.t +--- a/lib/automata.ml ++++ b/lib/automata.ml +@@ -24,9 +24,9 @@ open Import + + let hash_combine h accu = (accu * 65599) + h + +-module Ids : sig ++module Ids : sig @@ portable + module Id : sig +- type t ++ type t : immediate + + val equal : t -> t -> bool + val zero : t +@@ -35,7 +35,7 @@ module Ids : sig + + module Hash_set : sig + type id := t +- type t ++ type t : mutable_data + + val create : unit -> t + val mem : t -> id -> bool +@@ -105,7 +105,7 @@ module Rep_kind = struct + let pp fmt t = Format.pp_print_string fmt (to_string t) + end + +-module Mark : sig ++module Mark : sig @@ portable + type t = private int + + val compare : t -> t -> int +@@ -136,7 +136,7 @@ end = struct + ;; + end + +-module Idx : sig ++module Idx : sig @@ portable + type t = private int + + val pp : t Fmt.t +@@ -292,10 +292,12 @@ type expr = Expr.t + include Expr + + module Marks = struct +- type t = ++ type t : immutable_data = + { marks : (Mark.t * Idx.t) list + ; pmarks : Pmark.Set.t + } ++ [@@unsafe_allow_any_mode_crossing ++ ] + + let to_dyn { marks; pmarks } : Dyn.t = + let open Dyn in +@@ -376,8 +378,8 @@ module Status = struct + | Running + end + +-module Desc : sig +- type t ++module Desc : sig @@ portable ++ type t : immutable_data + + val pp : t Fmt.t + +@@ -458,7 +460,7 @@ end = struct + | TMatch m -> variant "TMarks" [ Marks.to_dyn m ] + ;; + +- let to_dyn = to_dyn None ++ let to_dyn t = to_dyn None t + + open E + +@@ -517,10 +519,11 @@ end = struct + | _ :: r -> first_match r + ;; + +- let remove_matches = ++ let remove_matches t = + List.filter ~f:(function + | TMatch _ -> false + | _ -> true) ++ t + ;; + + let split_at_match = +@@ -590,13 +593,14 @@ end + module E = Desc.E + + module State = struct +- type t = ++ type t : immutable_data = + { idx : Idx.t + ; category : Category.t + ; desc : Desc.t + ; mutable status : Status.t option + ; hash : int + } ++ [@@unsafe_allow_any_mode_crossing] + (* Thread-safety: We use double-checked locking to access field + [status] in function [status] below. *) + +@@ -651,7 +655,7 @@ module State = struct + st + ;; + +- module Table = Hashtbl.Make (struct ++ module Table = Hashtbl.MakePortable (struct + type nonrec t = t + + let equal = equal +--- a/lib/automata.mli ++++ b/lib/automata.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +@@ -25,7 +27,7 @@ open Import + (* Regular expressions *) + + module Mark : sig +- type t [@@immediate] ++ type t : immediate + + val compare : t -> t -> int + val start : t +@@ -56,7 +58,7 @@ module Rep_kind : sig + val pp : t Fmt.t + end + +-type expr ++type expr : immutable_data + + val is_eps : expr -> bool + val pp : expr Fmt.t +@@ -85,7 +87,7 @@ val rename : Ids.t -> expr -> expr + (* States of the automata *) + + module Idx : sig +- type t ++ type t : immediate + + val to_int : t -> int + end +@@ -98,7 +100,7 @@ module Status : sig + end + + module State : sig +- type t ++ type t : immutable_data + + val pp : t Fmt.t + val dummy : t +@@ -116,7 +118,7 @@ end + (* Computation of the states following a given state *) + + module Working_area : sig +- type t ++ type t : mutable_data + + val create : unit -> t + val index_count : t -> int +--- a/lib/bit_vector.mli ++++ b/lib/bit_vector.mli +@@ -1,4 +1,6 @@ +-type t ++@@ portable ++ ++type t : mutable_data + + val length : t -> int + val set : t -> int -> bool -> unit +--- a/lib/category.mli ++++ b/lib/category.mli +@@ -1,9 +1,11 @@ ++@@ portable ++ + (** Categories represent the various kinds of characters that can be tested + by look-ahead and look-behind operations. + + This is more restricted than Cset, but faster. *) + +-type t [@@immediate] ++type t : immediate + + val ( ++ ) : t -> t -> t + val from_char : char -> t +--- a/lib/color_map.mli ++++ b/lib/color_map.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* Color maps exists to provide an optimization for the regex engine. The fact + that some characters are entirely equivalent for some regexes means that we + can use them interchangeably. +@@ -5,17 +7,17 @@ + A color map assigns a color to every character in our character set. Any two + characters with the same color will be treated equivalently by the automaton. + *) +-type t ++type t : mutable_data + + module Repr : sig +- type t ++ type t : immutable_data + + val repr : t -> Cset.c -> char + val length : t -> int + end + + module Table : sig +- type t ++ type t : immutable_data + + val get_char : t -> Cset.c -> char + val get : t -> char -> Cset.c +--- a/lib/compile.ml ++++ b/lib/compile.ml +@@ -2,7 +2,7 @@ open Import + + let rec iter n f v = if Int.equal n 0 then v else iter (n - 1) f (f v) + +-module Idx : sig ++module Idx : sig @@ portable + type t [@@immediate] + + val unknown : t +@@ -54,8 +54,8 @@ type state_info = + color. For performance reason, to avoid an indirection, we manually + unbox the transition table: we allocate a single array, with the + state information at index 0, followed by the transitions. *) +-module State : sig +- type t ++module State : sig @@ portable ++ type t : mutable_data + + val make : ncol:int -> state_info -> t + val make_break : state_info -> t +@@ -64,7 +64,7 @@ module State : sig + val set_transition : t -> color:Cset.c -> t -> unit + val is_unknown_transition : t -> color:Cset.c -> bool + end = struct +- type t = Table of t array [@@unboxed] ++ type t : mutable_data = Table of t array [@@unboxed] + + (* Thread-safety: + We store the state information at index 0. For other elements +@@ -93,7 +93,7 @@ end = struct + let unknown_state = dummy { idx = Idx.unknown; final = []; desc = Automata.State.dummy } + + let make ~ncol state = +- let st = Table (Array.make (ncol + 1) unknown_state) in ++ let st = Table (Array.make (ncol + 1) (Stdlib.Obj.magic_uncontended unknown_state)) in + set_info st state; + st + ;; +@@ -102,7 +102,7 @@ end = struct + end + + (* Automata (compiled regular expression) *) +-type re = ++type re : immutable_data = + { initial : Automata.expr + ; (* The whole regular expression *) + mutable initial_states : (Category.t * State.t) list +@@ -126,6 +126,8 @@ type re = + ; (* Number of groups in the regular expression *) + mutex : Mutex.t + } ++(* See "thread-safety" comment below. *) ++[@@unsafe_allow_any_mode_crossing] + + (* Thread-safety: + We use double-checked locking to access field [initial_states]. The +@@ -151,7 +153,7 @@ module Positions = struct + mutable length : int + } + +- let empty = { positions = [||]; length = 0 } ++ let get_empty () = { positions = [||]; length = 0 } + let length t = t.length + let unsafe_set t idx pos = Array.unsafe_set t.positions idx pos + +@@ -181,7 +183,7 @@ module Positions = struct + always checking whether it is large enough before modifying it. *) + let length = Automata.Working_area.index_count re.tbl + 1 in + { positions = Array.make length 0; length }) +- else empty ++ else get_empty () + ;; + end + +@@ -466,7 +468,7 @@ module Stream = struct + let finalize t s ~pos ~len = + (* TODO bound checks? *) + let last = pos + len in +- let state = scan_str t.re Positions.empty s t.state ~last ~pos ~groups:false in ++ let state = scan_str t.re (Positions.get_empty ()) s t.state ~last ~pos ~groups:false in + let info = State.get_info state in + match + let _idx, res = +@@ -630,7 +632,7 @@ let match_str_no_bounds ~groups ~partial + let match_str_p re s ~pos ~len = + if pos < 0 || len < -1 || pos + len > String.length s + then invalid_arg "Re.exec: out of bounds"; +- match make_match_str re Positions.empty ~len ~groups:false ~partial:false s ~pos with ++ match make_match_str re (Positions.get_empty ()) ~len ~groups:false ~partial:false s ~pos with + | Match _ -> true + | _ -> false + ;; +@@ -812,7 +814,7 @@ let compile_1 regexp = + ; greedy = `Greedy + ; pos = ref A.Mark.start + ; names = ref [] +- ; cache = ref Cset.CSetMap.empty ++ ; cache = ref (Stdlib.Obj.magic_uncontended Cset.CSetMap.empty) + ; colors + } + in +--- a/lib/compile.mli ++++ b/lib/compile.mli +@@ -1,7 +1,9 @@ +-type re ++@@ portable ++ ++type re : immutable_data + + module Stream : sig +- type t ++ type t : mutable_data + + type 'a feed = + | Ok of 'a +@@ -13,7 +15,7 @@ module Stream : sig + + module Group : sig + type stream := t +- type t ++ type t : mutable_data + + module Match : sig + type t +--- a/lib/core.mli ++++ b/lib/core.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +@@ -780,7 +782,7 @@ module Stream : sig + + This module is not covered by semver's stability guarantee. *) + +- type t ++ type t : mutable_data + + type 'a feed = + | Ok of 'a +@@ -797,7 +799,7 @@ module Stream : sig + (** Match a string against a regular expression with capture groups *) + + type stream := t +- type t ++ type t : mutable_data + + module Match : sig + type t +--- a/lib/cset.ml ++++ b/lib/cset.ml +@@ -41,8 +41,8 @@ let compare_pair (x, y) (x', y') = + ;; + + let equal_pair (x, y) (x', y') = Int.equal x x' && Int.equal y y' +-let equal = List.equal ~eq:equal_pair +-let compare : t -> t -> int = List.compare ~cmp:compare_pair ++let equal x y = List.equal ~eq:equal_pair x y ++let compare x y = List.compare ~cmp:compare_pair x y + + let rec union l l' = + match l, l' with +@@ -87,7 +87,7 @@ let rec diff l l' = + ;; + + let single = +- let single c = [ c, c ] in ++ let single (c : c) = [ c, c ] in + Dense_map.make (* an extra color for lnl *) ~size:257 ~f:single + ;; + +@@ -101,10 +101,10 @@ let rec offset o l = + | (c1, c2) :: r -> (c1 + o, c2 + o) :: offset o r + ;; + +-let empty = [] ++let empty : t = [] + let cany = [ 0, 255 ] +-let union_all : t list -> t = List.fold_left ~init:empty ~f:union +-let intersect_all : t list -> t = List.fold_left ~init:cany ~f:inter ++let union_all ts = List.fold_left ~init:empty ~f:union ts ++let intersect_all ts = List.fold_left ~init:cany ~f:inter ts + + let rec mem (c : int) s = + match s with +@@ -127,7 +127,7 @@ let print_one ch (c1, c2) = + if Int.equal c1 c2 then Format.fprintf ch "%d" c1 else Format.fprintf ch "%d-%d" c1 c2 + ;; + +-let pp = Fmt.list ~pp_sep:(Fmt.lit ", ") print_one ++let pp ts = Fmt.list ~pp_sep:(Fmt.lit ", ") print_one ts + + let to_dyn t = + let open Dyn in +@@ -149,7 +149,7 @@ let one_char = function + | _ -> None + ;; + +-module CSetMap = Map.Make (struct ++module CSetMap = Map.MakePortable (struct + type t = int * (int * int) list + + let compare (i, u) (j, v) = +--- a/lib/cset.mli ++++ b/lib/cset.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +@@ -22,7 +24,7 @@ + + (* Character sets, represented as sorted list of intervals *) + +-type c [@@immediate] ++type c : immediate + + val equal_c : c -> c -> bool + val to_int : c -> int +@@ -30,7 +32,7 @@ val of_int : int -> c + val to_char : c -> char + val of_char : char -> c + +-type t ++type t : immutable_data + + (** special characters which isn't present in any set (not even in [cany]) *) + val null_char : c +--- a/lib/dense_map.ml ++++ b/lib/dense_map.ml +@@ -1,4 +1,7 @@ +-let make ~size ~f = +- let cache = Array.init size f in +- fun i -> cache.(i) ++open Import ++ ++let make : ('a : value mod contended portable). size:int -> f:(int -> 'a) -> (int -> 'a) @ portable = ++ fun ~size ~f -> ++ let cache = Iarray.unsafe_of_array__promise_no_mutation (Array.init size f) in ++ fun i -> cache.:(i) + ;; +--- a/lib/dense_map.mli ++++ b/lib/dense_map.mli +@@ -1 +1,3 @@ +-val make : size:int -> f:(int -> 'a) -> int -> 'a ++@@ portable ++ ++val make : ('a : value mod contended portable). size:int -> f:(int -> 'a) -> (int -> 'a) @ portable +--- a/lib/emacs.mli ++++ b/lib/emacs.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +--- a/lib/fmt.mli ++++ b/lib/fmt.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + type formatter := Format.formatter + type 'a t = formatter -> 'a -> unit + +--- a/lib/glob.mli ++++ b/lib/glob.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +--- a/lib/group.mli ++++ b/lib/group.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (** Information about groups in a match. *) + + (** Result of a successful match. *) +@@ -44,7 +46,7 @@ val nb_groups : t -> int + val pp : t Fmt.t + + module Offset : sig +- type t ++ type t : immediate + + val is_present : t -> bool + val get_no_check : t -> int +--- a/lib/hash_set.ml ++++ b/lib/hash_set.ml +@@ -60,7 +60,7 @@ let () = + assert (Array.unsafe_get x 0 = absent) + ;; + +-let create () = ref Option.none ++let create () = ref None + + let[@inline] index_of_offset slots index i = + let i = index + !i in +--- a/lib/hash_set.mli ++++ b/lib/hash_set.mli +@@ -1,4 +1,6 @@ +-type t ++@@ portable ++ ++type t : mutable_data + + val create : unit -> t + val is_empty : t -> bool +--- /dev/null ++++ b/lib/iarray.ml +@@ -0,0 +1,40 @@ ++type +'a t = 'a iarray ++ ++external unsafe_to_array__promise_no_mutation ++ : 'a. ++ 'a t -> 'a array ++ @@ portable ++ = "%array_of_iarray" ++ ++external unsafe_of_array__promise_no_mutation ++ : 'a. ++ ('a array[@local_opt]) -> ('a t[@local_opt]) ++ @@ portable ++ = "%array_to_iarray" ++ ++module O = struct ++ external ( .:() ) ++ : ('a t[@local_opt]) ++ -> int ++ -> ('a[@local_opt]) ++ @@ portable ++ = "%array_safe_get" ++end ++ ++include O ++ ++external get ++ : ('a t[@local_opt]) ++ -> int ++ -> ('a[@local_opt]) ++ @@ portable ++ = "%array_safe_get" ++ ++external unsafe_get ++ : ('a t[@local_opt]) ++ -> int ++ -> ('a[@local_opt]) ++ @@ portable ++ = "%array_unsafe_get" ++ ++external length : ('a t[@local_opt]) -> int @@ portable = "%array_length" +--- a/lib/import.ml ++++ b/lib/import.ml +@@ -52,3 +52,5 @@ module Mutex : Mutex = struct + let protect () f = f () + end : Mutex))) + end ++ ++include Iarray.O +--- a/lib/mark_infos.ml ++++ b/lib/mark_infos.ml +@@ -1,15 +1,15 @@ + open Import + +-type t = int array ++type t = int iarray + + let make marks = + let len = 1 + List.fold_left ~f:(fun ma (i, _) -> max ma i) ~init:(-1) marks in + let t = Array.make len (-1) in + List.iter ~f:(fun (i, v) -> t.(i) <- v) marks; +- t ++ Iarray.unsafe_of_array__promise_no_mutation t + ;; + +-let test t i = if 2 * i >= Array.length t then false else t.(2 * i) <> -1 ++let test t i = if 2 * i >= Iarray.length t then false else t.:(2 * i) <> -1 + + module Offset = struct + type t = int +@@ -20,35 +20,35 @@ end + + let start_offset t i = + let start_i = 2 * i in +- if start_i + 1 >= Array.length t then -1 else t.(start_i) ++ if start_i + 1 >= Iarray.length t then -1 else t.:(start_i) + ;; + + let stop_offset t i = + let stop_i = (2 * i) + 1 in +- if stop_i >= Array.length t then -1 else t.(stop_i) ++ if stop_i >= Iarray.length t then -1 else t.:(stop_i) + ;; + + let offset t i = + let start_i = 2 * i in + let stop_i = start_i + 1 in +- if stop_i >= Array.length t ++ if stop_i >= Iarray.length t + then None + else ( +- let start = t.(start_i) in ++ let start = t.:(start_i) in + if start = -1 + then None + else ( +- let stop = t.(stop_i) in ++ let stop = t.:(stop_i) in + Some (start, stop))) + ;; + + let iteri t ~f = +- for i = 0 to (Array.length t / 2) - 1 do ++ for i = 0 to (Iarray.length t / 2) - 1 do + let idx = 2 * i in +- let start = t.(idx) in ++ let start = t.:(idx) in + if start <> -1 + then ( +- let stop = t.(idx + 1) in ++ let stop = t.:(idx + 1) in + f i start stop) + done + ;; +--- a/lib/mark_infos.mli ++++ b/lib/mark_infos.mli +@@ -1,5 +1,7 @@ ++@@ portable ++ + (** store mark information for groups in an array *) +-type t ++type t : immutable_data + + val make : (int * int) list -> t + val offset : t -> int -> (int * int) option +@@ -7,7 +9,7 @@ val test : t -> int -> bool + val iteri : t -> f:(int -> int -> int -> unit) -> unit + + module Offset : sig +- type t ++ type t : immediate + + val is_present : t -> bool + val get_no_check : t -> int +--- a/lib/parse_buffer.mli ++++ b/lib/parse_buffer.mli +@@ -1,4 +1,6 @@ +-type t ++@@ portable ++ ++type t : mutable_data + + exception Parse_error + +--- a/lib/pcre.mli ++++ b/lib/pcre.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (** NOTE: Only a subset of the PCRE spec is supported *) + + exception Parse_error +--- a/lib/perl.mli ++++ b/lib/perl.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +--- a/lib/pmark.ml ++++ b/lib/pmark.ml +@@ -3,20 +3,15 @@ module Pmark = struct + + let equal (x : int) (y : int) = x = y + let compare (x : int) (y : int) = compare x y +- let r = ref 0 +- +- let gen () = +- incr r; +- !r +- ;; +- ++ let r = Atomic.make 0 ++ let gen () = Atomic.fetch_and_add r 1 + let pp = Format.pp_print_int + end + + include Pmark + + module Set = struct +- module Set = Set.Make (Pmark) ++ module Set = Set.MakePortable (Pmark) + + let[@warning "-32"] to_list x = + let open Set in +--- a/lib/pmark.mli ++++ b/lib/pmark.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + type t = private int + + val equal : t -> t -> bool +--- a/lib/posix.mli ++++ b/lib/posix.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (* + RE - A regular expression library + +--- a/lib/posix_class.mli ++++ b/lib/posix_class.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + val names : string list + val of_name : string -> Core.t + val parse : Parse_buffer.t -> Core.t option +--- a/lib/replace.mli ++++ b/lib/replace.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + (** [replace ~all re ~f s] iterates on [s], and replaces every occurrence + of [re] with [f substring] where [substring] is the current match. + If [all = false], then only the first occurrence of [re] is replaced. *) +--- a/lib/slice.mli ++++ b/lib/slice.mli +@@ -1,3 +1,5 @@ ++@@ portable ++ + type t = + { s : string + ; pos : int +--- a/lib/view.mli ++++ b/lib/view.mli +@@ -1,10 +1,12 @@ ++@@ portable ++ + (** A view of the top-level of a regex. This type is unstable and may change *) + + module Cset : sig + type t = Cset.t + + module Range : sig +- type t ++ type t : immutable_data + + val first : t -> Char.t + val last : t -> Char.t diff --git a/packages/re/re.1.14.0+ox/opam b/packages/re/re.1.14.0+ox/opam new file mode 100644 index 0000000000..9b202d0348 --- /dev/null +++ b/packages/re/re.1.14.0+ox/opam @@ -0,0 +1,262 @@ +opam-version: "2.0" +version: "1.14.0+ox" +name: "re" +synopsis: "RE is a regular expression library for OCaml" +description: """\ +Pure OCaml regular expressions with: +* Perl-style regular expressions (module Re.Perl) +* Posix extended regular expressions (module Re.Posix) +* Emacs-style regular expressions (module Re.Emacs) +* Shell-style file globbing (module Re.Glob) +* Compatibility layer for OCaml's built-in Str module (module Re.Str)""" +maintainer: "Rudi Grinberg " +authors: [ + "Jerome Vouillon" + "Thomas Gazagnaire" + "Anil Madhavapeddy" + "Rudi Grinberg" + "Gabriel Radanne" +] +license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" +homepage: "https://github.com/ocaml/ocaml-re" +bug-reports: "https://github.com/ocaml/ocaml-re/issues" +depends: [ + "dune" {>= "3.17"} + "ocaml" {>= "4.13.0"} + "seq" + "ppx_expect" {with-test} + "ounit2" {with-test} + "js_of_ocaml" {with-test & = "6.0.1+ox"} + "conf-npm" {with-test} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/ocaml/ocaml-re.git" +url { + src: + "https://github.com/ocaml/ocaml-re/archive/cb63cdf6d355d7eff97c88c0cf90dd567a0faf06.tar.gz" + checksum: + "sha256=9c2312f58a941393a40b389d07bb82ea51d2464c1ca76d65b36fceff222bf364" +} +patches: [ + "re+lib+ast.ml.patch" + "re+lib+ast.mli.patch" + "re+lib+automata.ml.patch" + "re+lib+automata.mli.patch" + "re+lib+bit_vector.mli.patch" + "re+lib+category.mli.patch" + "re+lib+color_map.mli.patch" + "re+lib+compile.ml.patch" + "re+lib+compile.mli.patch" + "re+lib+core.mli.patch" + "re+lib+cset.ml.patch" + "re+lib+cset.mli.patch" + "re+lib+dense_map.ml.patch" + "re+lib+dense_map.mli.patch" + "re+lib+emacs.mli.patch" + "re+lib+fmt.mli.patch" + "re+lib+glob.mli.patch" + "re+lib+group.mli.patch" + "re+lib+hash_set.ml.patch" + "re+lib+hash_set.mli.patch" + "re+lib+iarray.ml.patch" + "re+lib+import.ml.patch" + "re+lib+mark_infos.ml.patch" + "re+lib+mark_infos.mli.patch" + "re+lib+parse_buffer.mli.patch" + "re+lib+pcre.ml.patch" + "re+lib+pcre.mli.patch" + "re+lib+perl.mli.patch" + "re+lib+pmark.ml.patch" + "re+lib+pmark.mli.patch" + "re+lib+posix.mli.patch" + "re+lib+posix_class.mli.patch" + "re+lib+replace.mli.patch" + "re+lib+slice.mli.patch" + "re+lib+view.mli.patch" + "re+lib_test+expect+re_tests.ml.patch" + "re+lib_test+expect+test_partial.ml.patch" + "re+lib_test+expect+test_pcre.ml.patch" + "re+lib_test+expect+test_pcre_split.ml.patch" + "re+lib_test+expect+test_re.ml.patch" + "re+lib_test+re_private.ml.patch" +] +extra-files: [ + [ + "re+lib+ast.ml.patch" + "sha256=2bedd552999d255df78697aedba52d385d7cbd91da4643a576edea7f30773b1d" + ] + [ + "re+lib+ast.mli.patch" + "sha256=760e82e5d280c1299bb9d35a5d5150f7e8494e7a688d716b99dcfa296119c5ce" + ] + [ + "re+lib+automata.ml.patch" + "sha256=349a37a67abf5ab3ce7b7dcedd224ef95d5d829a894722df9e4354d3dfeaa174" + ] + [ + "re+lib+automata.mli.patch" + "sha256=c8b3dd69dad3716e951cfafd6fe3d184413be053c8efcb26f9de089f43465d68" + ] + [ + "re+lib+bit_vector.mli.patch" + "sha256=1d51ba85dba2d2b1255ae4535e9f13a5f8c879689e24cafc5d600f644cc1c35d" + ] + [ + "re+lib+category.mli.patch" + "sha256=1153a33076ee54c4f92f54a51868cd50ff5344d8e7a0cd409717e82c92e72b4b" + ] + [ + "re+lib+color_map.mli.patch" + "sha256=6b9d229b472b8fb8f44ba93f5c7d310613a8650efb3113990333803999c978c1" + ] + [ + "re+lib+compile.ml.patch" + "sha256=b125e28894c2d33010f904f8d31ec42624564d2d89f9b18e63fc65554f13ac83" + ] + [ + "re+lib+compile.mli.patch" + "sha256=1dcc4f24f7237200b8e156241f162aac567c33d2463fa59cb5caef6aea5e74ac" + ] + [ + "re+lib+core.mli.patch" + "sha256=ca06a185e0bc6b11d61fdf91b1862262728e3e46c2a18ec14e9c6bfa39921a85" + ] + [ + "re+lib+cset.ml.patch" + "sha256=798764c70219a81f179ed05c4a08c6c3a0b6d91f662a4e1a6e3702929bccfcea" + ] + [ + "re+lib+cset.mli.patch" + "sha256=eae907501236762e0bfcb81cedaec5dacb32ce7c854998e3963cdc10a73cd4b7" + ] + [ + "re+lib+dense_map.ml.patch" + "sha256=f656572ce04660eeee35a99fe825aa762f1df9a6abe2ea36bb6cc8e69bdf0543" + ] + [ + "re+lib+dense_map.mli.patch" + "sha256=f2f59d1efa3475cc830e27e271e5604fa21ee4bbefcdd3a7004a431c8d2f82a4" + ] + [ + "re+lib+emacs.mli.patch" + "sha256=43740791b3f06137bf062c2225167af8c952c5a8ed4a8cb6067569cb63f06f80" + ] + [ + "re+lib+fmt.mli.patch" + "sha256=b8fa15ca9f38fb391a0fdb945c6cecb92afe18c70271017afb1e084dfa064b80" + ] + [ + "re+lib+glob.mli.patch" + "sha256=10a4f6bbf4089eca476e3dfeac1d89938d666977453dbf2ca235b2e00bd6a01b" + ] + [ + "re+lib+group.mli.patch" + "sha256=139f86a032e94bce0a9e02f4cfc12e77599c47201714db250c419dd971820258" + ] + [ + "re+lib+hash_set.ml.patch" + "sha256=f5242e561f7a30a1860ea8aa3794707279677a348d208688788be5c404c424ec" + ] + [ + "re+lib+hash_set.mli.patch" + "sha256=d251fdfa57a2cebfd9c5cff286b5f6ae39cdd1643eb8bfd13dadbae13e5f9d2d" + ] + [ + "re+lib+iarray.ml.patch" + "sha256=f027af9153e3389d83f713be5707819f149d016d2d94910665afb7bcbeb4775c" + ] + [ + "re+lib+import.ml.patch" + "sha256=01a4d815caed8b59fb8e6e2476f8bce1f77e183c1c1a1880184b02961dd65244" + ] + [ + "re+lib+mark_infos.ml.patch" + "sha256=56c21e6fbbffa4d075dca85e3806d9ad4e1184bf1560a02f2c711af6f382942e" + ] + [ + "re+lib+mark_infos.mli.patch" + "sha256=fc82c6d1ae57186f5c0ce21bfbeef69495b98f2a095b6599e5ad3ef79594ad98" + ] + [ + "re+lib+parse_buffer.mli.patch" + "sha256=8e4028bf7205590732513b8c16557a9c5913f7f4c8b73ada96491f1958417e71" + ] + [ + "re+lib+pcre.ml.patch" + "sha256=87d24cbf8ed09ec166f16675c5ae29f1e22a02f6886a0a539595370df2cd87e5" + ] + [ + "re+lib+pcre.mli.patch" + "sha256=45f9cf0f4a423d6577d0b2e04cceb11cf672c9c8985995444dd22a28888e4a01" + ] + [ + "re+lib+perl.mli.patch" + "sha256=88ad29c736dd3ec386811ed3f9ecc72ac01eddf582a9b7569aea2964725a0dd5" + ] + [ + "re+lib+pmark.ml.patch" + "sha256=90e469a5d891d81511afe91271b0e62cc331c6f14e833c7cd14450416c257e92" + ] + [ + "re+lib+pmark.mli.patch" + "sha256=b4ab8b02b29bf22b6c41dc237c402be24f776931d44536976081a43486eb9cc6" + ] + [ + "re+lib+posix.mli.patch" + "sha256=7919b3e3cfb63d5baac5b36740e287dee2dfeb2a382238d17cf76851ba0db25a" + ] + [ + "re+lib+posix_class.mli.patch" + "sha256=ce2bd4adcd8cf8ec3f841bf291c3ba9c5155ae485a6670956509ab59cf1f270f" + ] + [ + "re+lib+replace.mli.patch" + "sha256=bb40364035045de319f9ebf186e77aa856f6128e14eaa0ad760dcbcd71a72bcc" + ] + [ + "re+lib+slice.mli.patch" + "sha256=e81ee39fc1eb5ca98d33a782cc5d5d15decc8c40b1cdb2a57d44e88e6b2ed91c" + ] + [ + "re+lib+view.mli.patch" + "sha256=2bca105404934893c997ade04298f2821fd9d586f179dd07d12065d07e0f0286" + ] + [ + "re+lib_test+expect+re_tests.ml.patch" + "sha256=21e7178d639651ec8d73b0d5f5402f9a5bf7f780511ce87bc77b82270d8c62a0" + ] + [ + "re+lib_test+expect+test_partial.ml.patch" + "sha256=341dd6dfc5da158304cfc35fe48831e29122c1be969041a27cf5321a66249564" + ] + [ + "re+lib_test+expect+test_pcre.ml.patch" + "sha256=39b11b76365006294c1e61baaa6e70b7b80147a1701723f0a86c42c593d7a17a" + ] + [ + "re+lib_test+expect+test_pcre_split.ml.patch" + "sha256=b23b20764f678fc1eecf2c9291f0b49eb4381762ef82daa042f9f7b95e14247d" + ] + [ + "re+lib_test+expect+test_re.ml.patch" + "sha256=92720e296aa80fc76f30a05392e7ef63e8395ab5ac8a10cd6021ca5a75043629" + ] + [ + "re+lib_test+re_private.ml.patch" + "sha256=73fa41e21e784b71b7b73bd07a24055a18cfa05aa05797c64bf7926b00039866" + ] +] diff --git a/packages/re2/re2.v0.18~preview.130.36+326/opam b/packages/re2/re2.v0.18~preview.130.55+197/opam similarity index 60% rename from packages/re2/re2.v0.18~preview.130.36+326/opam rename to packages/re2/re2.v0.18~preview.130.55+197/opam index 5403565a7f..24a1b9d58c 100644 --- a/packages/re2/re2.v0.18~preview.130.36+326/opam +++ b/packages/re2/re2.v0.18~preview.130.55+197/opam @@ -11,11 +11,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "jane_rope" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "regex_parser_intf" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "jane_rope" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "regex_parser_intf" {= "v0.18~preview.130.55+197"} "conf-g++" {build} "dune" {>= "3.17.0"} ] @@ -25,7 +25,7 @@ description: """ """ url { src: - "https://github.com/janestreet/re2/archive/6564c453223806123db6dcb97f41209003dadba6.tar.gz" + "https://github.com/janestreet/re2/archive/d3717cc69361b205bd6f6e3438a2dc830d77a938.tar.gz" checksum: - "sha256=57aec0afc545881aeb04566d452c27cc3f304df45e5ceb17aa3d9f2682f747ac" + "sha256=347fd1546b27dff20844e60ccc1479eb3bb5b7af6cbccdb34d9e9961bb36eb0b" } diff --git a/packages/re_parser/re_parser.v0.18~preview.130.36+326/opam b/packages/re_parser/re_parser.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/re_parser/re_parser.v0.18~preview.130.36+326/opam rename to packages/re_parser/re_parser.v0.18~preview.130.55+197/opam index dc6699bdbf..97728e7e3b 100644 --- a/packages/re_parser/re_parser.v0.18~preview.130.36+326/opam +++ b/packages/re_parser/re_parser.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "regex_parser_intf" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "regex_parser_intf" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Typed parsing using regular expressions." @@ -26,7 +26,7 @@ Shares its interface with `Re2.Parser`. """ url { src: - "https://github.com/janestreet/re_parser/archive/d1456360e6fd1a4f329445c434bfd1d1ba7ea4b5.tar.gz" + "https://github.com/janestreet/re_parser/archive/c835f3509696fafa3d06afcd1248b507bf8c4a70.tar.gz" checksum: - "sha256=f8c1f14934ed7102ae88b3fd3eeb8423f4613014f4d8e97f430d57be7a9b21f1" + "sha256=84dcfc042ca84d226d1552dbdd024da67f6d14b3e8ba71f44ab8a8b8e256eb4a" } diff --git a/packages/record_builder/record_builder.v0.18~preview.130.36+326/opam b/packages/record_builder/record_builder.v0.18~preview.130.55+197/opam similarity index 79% rename from packages/record_builder/record_builder.v0.18~preview.130.36+326/opam rename to packages/record_builder/record_builder.v0.18~preview.130.55+197/opam index f84d139eb8..d3a46c6d50 100644 --- a/packages/record_builder/record_builder.v0.18~preview.130.36+326/opam +++ b/packages/record_builder/record_builder.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -27,7 +27,7 @@ needed to build the record from a single applicative term for each field. """ url { src: - "https://github.com/janestreet/record_builder/archive/9bef3d47509f1ebafb3d754a88229370d08d5b25.tar.gz" + "https://github.com/janestreet/record_builder/archive/ca68f39901b5fb8176e313be00655ed46299cddb.tar.gz" checksum: - "sha256=dac688a1850e5b37d3d729d9f018f20f3795813055f799f6765e5ed8294d7d61" + "sha256=07bd8f084706a8034483b0e72b96c1337574f868c3fd8be7685ba5dca7422908" } diff --git a/packages/redis-async/redis-async.v0.18~preview.130.36+326/opam b/packages/redis-async/redis-async.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/redis-async/redis-async.v0.18~preview.130.36+326/opam rename to packages/redis-async/redis-async.v0.18~preview.130.55+197/opam index 0b057ed263..925e71a299 100644 --- a/packages/redis-async/redis-async.v0.18~preview.130.36+326/opam +++ b/packages/redis-async/redis-async.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "bignum" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "bignum" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -31,7 +31,7 @@ Supports client tracking and internally uses the RESP3 protocol. """ url { src: - "https://github.com/janestreet/redis-async/archive/d5cb1b151a3674abad49ce8c7cf6a7c174eb5ff6.tar.gz" + "https://github.com/janestreet/redis-async/archive/9830ef5ac10090624f35ae2506ef23f5507b3f2c.tar.gz" checksum: - "sha256=92a2d29060a0a7915cf3c34a419f74cd7db7819a39c31549ab9e646d4e56d99c" + "sha256=8ff5215b43cbfa15866c294712a57dce965f445d2456eb29345587032b0fec67" } diff --git a/packages/regex_parser_intf/regex_parser_intf.v0.18~preview.130.36+326/opam b/packages/regex_parser_intf/regex_parser_intf.v0.18~preview.130.55+197/opam similarity index 74% rename from packages/regex_parser_intf/regex_parser_intf.v0.18~preview.130.36+326/opam rename to packages/regex_parser_intf/regex_parser_intf.v0.18~preview.130.55+197/opam index fb52d00320..38f379c6ab 100644 --- a/packages/regex_parser_intf/regex_parser_intf.v0.18~preview.130.36+326/opam +++ b/packages/regex_parser_intf/regex_parser_intf.v0.18~preview.130.55+197/opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -21,7 +21,7 @@ description: """ """ url { src: - "https://github.com/janestreet/regex_parser_intf/archive/35f02a4a886bc6d69992842a30677764c9a003d4.tar.gz" + "https://github.com/janestreet/regex_parser_intf/archive/e01b4594706212a212053387b65ab56b5b3afca3.tar.gz" checksum: - "sha256=95a6c6b5c076b950fa7e987f8cb600d70399c66fbbb31ae3a673dcec35d35eba" + "sha256=2c14ab4f057697251380b35dca6b00b436a2443b51b783a59dce3644545ee6da" } diff --git a/packages/resource_cache/resource_cache.v0.18~preview.130.36+326/opam b/packages/resource_cache/resource_cache.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/resource_cache/resource_cache.v0.18~preview.130.36+326/opam rename to packages/resource_cache/resource_cache.v0.18~preview.130.55+197/opam index c6b05e1102..4c2a5f6027 100644 --- a/packages/resource_cache/resource_cache.v0.18~preview.130.36+326/opam +++ b/packages/resource_cache/resource_cache.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -27,7 +27,7 @@ obeying various limits. """ url { src: - "https://github.com/janestreet/resource_cache/archive/8a2faa8d8c638ac04187095a03ff5833e3efef66.tar.gz" + "https://github.com/janestreet/resource_cache/archive/9213f7471ee2267964244d6302be211eda7bc922.tar.gz" checksum: - "sha256=ce650b6344c15250c3755e2ddec9cc6d982d44f1b6656718009a9ea02d9369cb" + "sha256=5a6059417c7cac0efdae75b37343e91a6b4e30a5c2ee7d1ac9b329ee4435a738" } diff --git a/packages/rpc_parallel/rpc_parallel.v0.18~preview.130.36+326/opam b/packages/rpc_parallel/rpc_parallel.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/rpc_parallel/rpc_parallel.v0.18~preview.130.36+326/opam rename to packages/rpc_parallel/rpc_parallel.v0.18~preview.130.55+197/opam index 0cd44cd76b..519a8ea689 100644 --- a/packages/rpc_parallel/rpc_parallel.v0.18~preview.130.36+326/opam +++ b/packages/rpc_parallel/rpc_parallel.v0.18~preview.130.55+197/opam @@ -12,12 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -30,7 +30,7 @@ Async Rpc. """ url { src: - "https://github.com/janestreet/rpc_parallel/archive/3905973f992e9066ed5d4ba5f7354abe4a65c2ae.tar.gz" + "https://github.com/janestreet/rpc_parallel/archive/174365cb976dd4708d3234f355c19b00817d7925.tar.gz" checksum: - "sha256=1900c55447401077ad1519cfd539d0d4b0519c19233a692e04c4247c0ff1b9ff" + "sha256=8f3c28526ab0cb2cf85685996fb409056975ad5491ac2c6a8ebe59633e8a455e" } diff --git a/packages/sedlex/sedlex.3.3+ox/files/sedlex+syntax+ppx_sedlex.ml.patch b/packages/sedlex/sedlex.3.3+ox/files/sedlex+syntax+ppx_sedlex.ml.patch index ba24bec80c..158eb07499 100644 --- a/packages/sedlex/sedlex.3.3+ox/files/sedlex+syntax+ppx_sedlex.ml.patch +++ b/packages/sedlex/sedlex.3.3+ox/files/sedlex+syntax+ppx_sedlex.ml.patch @@ -41,9 +41,9 @@ } ) ) -> begin match (i1, i2) with | Pconst_integer (i1, _), Pconst_integer (i2, _) -> -@@ -515,14 +518,23 @@ let post_handler cookies = - Driver.Cookies.set cookies "sedlex.regexps" - (pexp_extension ~loc ({ loc; txt = "regexps" }, PStr !regexps))) +@@ -420,6 +423,13 @@ let previous = ref [] + let regexps = ref [] + let should_set_cookies = ref false +let loc_ghoster = + object @@ -51,6 +51,40 @@ + method! location location = super#location { location with loc_ghost = true } + end +;; ++ + let mapper = + object (this) + inherit Ast_traverse.map as super +@@ -458,13 +468,13 @@ let mapper = + err e.pexp_loc "'when' guards are not supported") + cases + in +- gen_definition lexbuf cases error ++ loc_ghoster#expression @@ gen_definition lexbuf cases error + | [%expr + let [%p? { ppat_desc = Ppat_var { txt = name } }] = + [%sedlex.regexp? [%p? p]] + in + [%e? body]] -> +- (this#define_regexp name p)#expression body ++ loc_ghoster#expression @@ (this#define_regexp name p)#expression body + | [%expr [%sedlex [%e? _]]] -> + err e.pexp_loc + "the %sedlex extension is only recognized on match expressions" +@@ -498,7 +508,7 @@ let mapper = + let tables = List.map table (get_tables ()) in + regexps := regexps'; + should_set_cookies := true; +- tables @ parts @ l) ++ loc_ghoster#structure (tables @ parts) @ l) + else fst (this#structure_with_regexps l) + end + +@@ -515,11 +525,15 @@ let post_handler cookies = + Driver.Cookies.set cookies "sedlex.regexps" + (pexp_extension ~loc ({ loc; txt = "regexps" }, PStr !regexps))) + ++ + let extensions = [ @@ -63,7 +97,3 @@ ] let () = - Driver.Cookies.add_handler pre_handler; - Driver.Cookies.add_post_handler post_handler; -- Driver.register_transformation "sedlex" ~impl:mapper#structure -+ Driver.register_transformation "sedlex" ~impl:(fun s -> s |> mapper#structure |> loc_ghoster#structure) diff --git a/packages/sedlex/sedlex.3.3+ox/opam b/packages/sedlex/sedlex.3.3+ox/opam index 56e9fdfaed..4222f44348 100644 --- a/packages/sedlex/sedlex.3.3+ox/opam +++ b/packages/sedlex/sedlex.3.3+ox/opam @@ -51,6 +51,6 @@ patches: ["sedlex+syntax+ppx_sedlex.ml.patch"] extra-files: [ [ "sedlex+syntax+ppx_sedlex.ml.patch" - "sha256=8167f55a342833208d830c17a50619925fcc02c1c22b4d8c8aff0d1a7efe132b" + "sha256=67fd4616d46d1c98cc6658620de963bb1ceabb6a0168faaa465626d87381bc74" ] ] diff --git a/packages/semantic_version/semantic_version.v0.18~preview.130.36+326/opam b/packages/semantic_version/semantic_version.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/semantic_version/semantic_version.v0.18~preview.130.36+326/opam rename to packages/semantic_version/semantic_version.v0.18~preview.130.55+197/opam index 16ec48f2b5..72b52220bd 100644 --- a/packages/semantic_version/semantic_version.v0.18~preview.130.36+326/opam +++ b/packages/semantic_version/semantic_version.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Semantic versioning" @@ -24,7 +24,7 @@ A library for representing semantic versions (https://semver.org) """ url { src: - "https://github.com/janestreet/semantic_version/archive/cd138954b374ff4938a763a8ceeea804cd3f4f5c.tar.gz" + "https://github.com/janestreet/semantic_version/archive/4c02229ca75a6d58f299596670874cf53b0ae5ea.tar.gz" checksum: - "sha256=ad7b3cae2d2e9edf6b9fa59b8b5bd0b6b27e49f6619d6b925688da15f26b7192" + "sha256=b1abfdb550daddb0a3f7d72c4cc54187441d3c78470dffd2a06670303b1a3593" } diff --git a/packages/sequencer_table/sequencer_table.v0.18~preview.130.36+326/opam b/packages/sequencer_table/sequencer_table.v0.18~preview.130.55+197/opam similarity index 68% rename from packages/sequencer_table/sequencer_table.v0.18~preview.130.36+326/opam rename to packages/sequencer_table/sequencer_table.v0.18~preview.130.55+197/opam index 500fee71ad..499540af03 100644 --- a/packages/sequencer_table/sequencer_table.v0.18~preview.130.36+326/opam +++ b/packages/sequencer_table/sequencer_table.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ A single-module library for a data structure. """ url { src: - "https://github.com/janestreet/sequencer_table/archive/6b5be10325b08c40d945680516a5972e8418de80.tar.gz" + "https://github.com/janestreet/sequencer_table/archive/1545b5a6ebfcd80f460fd983527934c4d1b63848.tar.gz" checksum: - "sha256=170de5746c43580bf6b397ea21d7b9153e6b51ff4725c2f2edc670f419c49874" + "sha256=a802ba92a69d16182f3f4e7409722c8b45425dc40e38ae16316599ca30370dcf" } diff --git a/packages/sexp/sexp.v0.18~preview.130.36+326/opam b/packages/sexp/sexp.v0.18~preview.130.36+326/opam deleted file mode 100644 index accef9b466..0000000000 --- a/packages/sexp/sexp.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,45 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/sexp" -bug-reports: "https://github.com/janestreet/sexp/issues" -dev-repo: "git+https://github.com/janestreet/sexp.git" -doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/sexp/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "csvfields" {= "v0.18~preview.130.36+326"} - "jsonaf" {= "v0.18~preview.130.36+326"} - "parsexp" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "re2" {= "v0.18~preview.130.36+326"} - "sexp_diff" {= "v0.18~preview.130.36+326"} - "sexp_macro" {= "v0.18~preview.130.36+326"} - "sexp_pretty" {= "v0.18~preview.130.36+326"} - "sexp_select" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "shell" {= "v0.18~preview.130.36+326"} - "angstrom" {>= "0.15.0"} - "dune" {>= "3.17.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "S-expression swiss knife" -description: """ -A suite of tools for working with s-expressions from the command line. -It contains subcommands for pretty printing, querying, and modifying -sexps, as well as some conversions to and from other formats. -""" -url { - src: - "https://github.com/janestreet/sexp/archive/5df90383ae6056ab41b2e312c5abd81082054bf2.tar.gz" - checksum: - "sha256=23b2667b3b62253c2753fffc272f0e037c2f9920e063ccb40e74070bbcfee174" -} diff --git a/packages/sexp/sexp.v0.18~preview.130.55+197/opam b/packages/sexp/sexp.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..27a46e2715 --- /dev/null +++ b/packages/sexp/sexp.v0.18~preview.130.55+197/opam @@ -0,0 +1,46 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/sexp" +bug-reports: "https://github.com/janestreet/sexp/issues" +dev-repo: "git+https://github.com/janestreet/sexp.git" +doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/sexp/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "async" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "csvfields" {= "v0.18~preview.130.55+197"} + "jsonaf" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "re2" {= "v0.18~preview.130.55+197"} + "sexp_diff" {= "v0.18~preview.130.55+197"} + "sexp_macro" {= "v0.18~preview.130.55+197"} + "sexp_pretty" {= "v0.18~preview.130.55+197"} + "sexp_select" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "shell" {= "v0.18~preview.130.55+197"} + "angstrom" {>= "0.15.0"} + "dune" {>= "3.17.0"} + "uri" {>= "3.0.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "S-expression swiss knife" +description: """ +A suite of tools for working with s-expressions from the command line. +It contains subcommands for pretty printing, querying, and modifying +sexps, as well as some conversions to and from other formats. +""" +url { + src: + "https://github.com/janestreet/sexp/archive/c98d3a53dc4711126031cb66d4f5370a906b762b.tar.gz" + checksum: + "sha256=eb5d193ae4abc36302728d64da6df861269f07b2b7d43107f8be89d67fcaa986" +} diff --git a/packages/sexp_diff/sexp_diff.v0.18~preview.130.36+326/opam b/packages/sexp_diff/sexp_diff.v0.18~preview.130.55+197/opam similarity index 72% rename from packages/sexp_diff/sexp_diff.v0.18~preview.130.36+326/opam rename to packages/sexp_diff/sexp_diff.v0.18~preview.130.55+197/opam index 4ede315c8b..fc8b8dd3a3 100644 --- a/packages/sexp_diff/sexp_diff.v0.18~preview.130.36+326/opam +++ b/packages/sexp_diff/sexp_diff.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ command line tool. """ url { src: - "https://github.com/janestreet/sexp_diff/archive/15bd7bfb254b5b9fe18e09d331b6ecf313ec2360.tar.gz" + "https://github.com/janestreet/sexp_diff/archive/f3f7c221c6693f155c358357ffe05e6faa11f840.tar.gz" checksum: - "sha256=ed07343556b3c0b5d3a4f2056e5a919a2e7780e13bb7d1a68ca8a3de3b30ffc1" + "sha256=7d3ce203d511aa467b9742010e9eafb1534c9bc03de061ba4f89c3527547857d" } diff --git a/packages/sexp_grammar/sexp_grammar.v0.18~preview.130.36+326/opam b/packages/sexp_grammar/sexp_grammar.v0.18~preview.130.36+326/opam deleted file mode 100644 index f053147cc0..0000000000 --- a/packages/sexp_grammar/sexp_grammar.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,41 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/sexp_grammar" -bug-reports: "https://github.com/janestreet/sexp_grammar/issues" -dev-repo: "git+https://github.com/janestreet/sexp_grammar.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/sexp_grammar/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "dedent" {= "v0.18~preview.130.36+326"} - "parsexp_prefix" {= "v0.18~preview.130.36+326"} - "ppx_bin_prot" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_hash" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_let" {= "v0.18~preview.130.36+326"} - "ppx_sexp_conv" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} - "ppxlib" {= "0.33.0+ox"} - "zarith" {= "1.12+ox"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "Sexp grammar helpers" -description: """ -Helpers for manipulating [Sexplib.Sexp_grammar] values. -""" -url { - src: - "https://github.com/janestreet/sexp_grammar/archive/3b0c379c1b007c89a707162efa01cd3788bfaa45.tar.gz" - checksum: - "sha256=f03ccb46846039ac7bf0ad4a940c28656933048cb9f60b815cfe26749bb84bdc" -} diff --git a/packages/sexp_grammar/sexp_grammar.v0.18~preview.130.55+197/opam b/packages/sexp_grammar/sexp_grammar.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..778b3c28af --- /dev/null +++ b/packages/sexp_grammar/sexp_grammar.v0.18~preview.130.55+197/opam @@ -0,0 +1,41 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/sexp_grammar" +bug-reports: "https://github.com/janestreet/sexp_grammar/issues" +dev-repo: "git+https://github.com/janestreet/sexp_grammar.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/sexp_grammar/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "dedent" {= "v0.18~preview.130.55+197"} + "parsexp_prefix" {= "v0.18~preview.130.55+197"} + "ppx_bin_prot" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_hash" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_sexp_conv" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} + "ppxlib" {= "0.33.0+ox"} + "zarith" {= "1.12+ox"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "Sexp grammar helpers" +description: """ +Helpers for manipulating [Sexplib.Sexp_grammar] values. +""" +url { + src: + "https://github.com/janestreet/sexp_grammar/archive/66955adea27c219338b3d7985e43e9e8b15ab211.tar.gz" + checksum: + "sha256=ff27fd4834abb6dda05d98348fea2830093b04bcd813a36dff17d8c718ad9aea" +} diff --git a/packages/sexp_macro/sexp_macro.v0.18~preview.130.36+326/opam b/packages/sexp_macro/sexp_macro.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/sexp_macro/sexp_macro.v0.18~preview.130.36+326/opam rename to packages/sexp_macro/sexp_macro.v0.18~preview.130.55+197/opam index 74adcc9b4c..297958515f 100644 --- a/packages/sexp_macro/sexp_macro.v0.18~preview.130.36+326/opam +++ b/packages/sexp_macro/sexp_macro.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ include one sexp file in another. """ url { src: - "https://github.com/janestreet/sexp_macro/archive/1acc822e6ab0f566436079d611fea0891a9e3d07.tar.gz" + "https://github.com/janestreet/sexp_macro/archive/cd600e82c554a86e95d7178a7145482b7c24d744.tar.gz" checksum: - "sha256=d5799cef6dafcf63d7dda163fd7b3bbc778a7e09f068171229ce293a9c03489c" + "sha256=c264f8ba6d7149213f1e9c5bf5b023bc769d3a4167b0b07be1d2650012eb3680" } diff --git a/packages/sexp_pretty/sexp_pretty.v0.18~preview.130.36+326/opam b/packages/sexp_pretty/sexp_pretty.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/sexp_pretty/sexp_pretty.v0.18~preview.130.36+326/opam rename to packages/sexp_pretty/sexp_pretty.v0.18~preview.130.55+197/opam index d05670f482..7a4efdc98c 100644 --- a/packages/sexp_pretty/sexp_pretty.v0.18~preview.130.36+326/opam +++ b/packages/sexp_pretty/sexp_pretty.v0.18~preview.130.55+197/opam @@ -12,11 +12,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "S-expression pretty-printer" @@ -26,7 +27,7 @@ the default pretty printer in Sexplib. """ url { src: - "https://github.com/janestreet/sexp_pretty/archive/400605024cccd036024449203541da39b32f4142.tar.gz" + "https://github.com/janestreet/sexp_pretty/archive/7f0dc7c82be2b89065f11ea804a02a9ad0ae870d.tar.gz" checksum: - "sha256=56c12dbaf70e8c4c85b2de3f3c1e0d596b96dbff2c1211ef987d623aaff3afb7" + "sha256=bffe9ec1ce269c94959bc46f198f7584f5c272e5d8bb42f16fcd3f9ef4615b71" } diff --git a/packages/sexp_select/sexp_select.v0.18~preview.130.36+326/opam b/packages/sexp_select/sexp_select.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/sexp_select/sexp_select.v0.18~preview.130.36+326/opam rename to packages/sexp_select/sexp_select.v0.18~preview.130.55+197/opam index 2085ddd3bf..d21c2adee5 100644 --- a/packages/sexp_select/sexp_select.v0.18~preview.130.36+326/opam +++ b/packages/sexp_select/sexp_select.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "parsexp" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ and return subtrees that match the given program. """ url { src: - "https://github.com/janestreet/sexp_select/archive/7b9adbfef63254aa046514d83da664b580cd6a41.tar.gz" + "https://github.com/janestreet/sexp_select/archive/ed9c9526d049f586758981c7ba1b15caee78a814.tar.gz" checksum: - "sha256=7c4514626c8ed0bdaaab1d40e23e5a7eb02810dc168f8053e1166e13e2ca17dd" + "sha256=6e50f23dbd2632d090b3569aae19ab5e759f9d0e136e6c004afa510a69531799" } diff --git a/packages/sexp_string_quickcheck/sexp_string_quickcheck.v0.18~preview.130.36+326/opam b/packages/sexp_string_quickcheck/sexp_string_quickcheck.v0.18~preview.130.55+197/opam similarity index 78% rename from packages/sexp_string_quickcheck/sexp_string_quickcheck.v0.18~preview.130.36+326/opam rename to packages/sexp_string_quickcheck/sexp_string_quickcheck.v0.18~preview.130.55+197/opam index 936304af66..8fac998987 100644 --- a/packages/sexp_string_quickcheck/sexp_string_quickcheck.v0.18~preview.130.36+326/opam +++ b/packages/sexp_string_quickcheck/sexp_string_quickcheck.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "parsexp" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ including escape sequences and comments. """ url { src: - "https://github.com/janestreet/sexp_string_quickcheck/archive/10ead708c9023f773e7b2dd7586cee5d59113518.tar.gz" + "https://github.com/janestreet/sexp_string_quickcheck/archive/d12df0bd7238962c7aae6cd1641aa61a9f170785.tar.gz" checksum: - "sha256=58695dddb0b8721cf166ae732518cee6cdf09db312cac14121e5e533f63d8d4b" + "sha256=dcf82361be0dffb2fec363c71144740819bd319cd1742f550bbc1d271d973e55" } diff --git a/packages/sexplib/sexplib.v0.18~preview.130.36+326/opam b/packages/sexplib/sexplib.v0.18~preview.130.55+197/opam similarity index 73% rename from packages/sexplib/sexplib.v0.18~preview.130.36+326/opam rename to packages/sexplib/sexplib.v0.18~preview.130.55+197/opam index b30023df43..81920a9b1e 100644 --- a/packages/sexplib/sexplib.v0.18~preview.130.36+326/opam +++ b/packages/sexplib/sexplib.v0.18~preview.130.55+197/opam @@ -11,9 +11,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "basement" {= "v0.18~preview.130.36+326"} - "parsexp" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} + "basement" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "num" ] @@ -27,7 +27,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/sexplib/archive/db083b613f01f9f1e1769e75473615d6d738c753.tar.gz" + "https://github.com/janestreet/sexplib/archive/4609961ab2a3e2ad6354d93ec537381626b370e5.tar.gz" checksum: - "sha256=b6eea5f1c701c901b9078146ff7686a8eeeed72d0845753e35f146e7442e1da5" + "sha256=ca231cefbd58e90def9a8db1e5848080035b244e9860e38d2681476e6705fdad" } diff --git a/packages/sexplib0/sexplib0.v0.18~preview.130.36+326/opam b/packages/sexplib0/sexplib0.v0.18~preview.130.55+197/opam similarity index 79% rename from packages/sexplib0/sexplib0.v0.18~preview.130.36+326/opam rename to packages/sexplib0/sexplib0.v0.18~preview.130.55+197/opam index 02d838da12..f6a5098574 100644 --- a/packages/sexplib0/sexplib0.v0.18~preview.130.36+326/opam +++ b/packages/sexplib0/sexplib0.v0.18~preview.130.55+197/opam @@ -11,7 +11,7 @@ build: [ ] depends: [ "ocaml" {>= "4.14.0"} - "basement" {= "v0.18~preview.130.36+326"} + "basement" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/sexplib0/archive/53f42fbb2b201c31692e1dee1ddd1339b2026835.tar.gz" + "https://github.com/janestreet/sexplib0/archive/518da1ac441d047cfa2cbae2f6f593a2e9d94efe.tar.gz" checksum: - "sha256=206c2a94453e0aefb5712fcb3a0eda40350fff22cb85397f3a73b62a190ad557" + "sha256=1258db5fc1d9cd3207daad8c9ad523faeb223646699d96f9b637eeac8e29d004" } diff --git a/packages/shell/shell.v0.18~preview.130.36+326/opam b/packages/shell/shell.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/shell/shell.v0.18~preview.130.36+326/opam rename to packages/shell/shell.v0.18~preview.130.55+197/opam index 718b446465..8a3ef6aa33 100644 --- a/packages/shell/shell.v0.18~preview.130.36+326/opam +++ b/packages/shell/shell.v0.18~preview.130.55+197/opam @@ -11,13 +11,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "jst-config" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "jst-config" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} - "spawn" {>= "v0.15"} + "spawn" {= "v0.15.1+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Yet another implementation of fork&exec and related functionality" @@ -27,7 +27,7 @@ This library is a relatively featureful and flexible implementation of fork&exec depexts: ["linux-headers"] {os-family = "alpine"} url { src: - "https://github.com/janestreet/shell/archive/6ff2cfd36afcacf7c4714be83f52f1c8e0973a46.tar.gz" + "https://github.com/janestreet/shell/archive/0b2c4c7d0e2491e116783c9ed9bb578ed5deea8d.tar.gz" checksum: - "sha256=3a82a2f70d1dffca4811b0b2a16f218864c254bf4adeb8056096fc73da26aecd" + "sha256=5694d1af21d40a26ab4184cf8fcea07ae1567a6d05d433f0059e80e29b6b8722" } diff --git a/packages/shexp/shexp.v0.18~preview.130.36+326/opam b/packages/shexp/shexp.v0.18~preview.130.55+197/opam similarity index 73% rename from packages/shexp/shexp.v0.18~preview.130.36+326/opam rename to packages/shexp/shexp.v0.18~preview.130.55+197/opam index aaafeeee05..b1c6ba4c8e 100644 --- a/packages/shexp/shexp.v0.18~preview.130.36+326/opam +++ b/packages/shexp/shexp.v0.18~preview.130.55+197/opam @@ -11,11 +11,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "posixat" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} + "posixat" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} "base-threads" "dune" {>= "3.17.0"} - "spawn" {>= "v0.15"} + "spawn" {= "v0.15.1+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Process library and s-expression based shell" @@ -26,7 +26,7 @@ shell interpreter. Shexp works on both Unix and Windows. """ url { src: - "https://github.com/janestreet/shexp/archive/095097c7d5129194076ba8b0d3265fba28cd1f6b.tar.gz" + "https://github.com/janestreet/shexp/archive/48789e917f086ef9617620ff8d731242f61c8cf6.tar.gz" checksum: - "sha256=cc5834c20beabe1eb93ecd0d92fe00a215296e16a8a598b4c8ac4169d2fb414c" + "sha256=44fa74ef10474f9648ce9784b79b6507d55c75878ed6db28383dd35ca4038800" } diff --git a/packages/simple_xml/simple_xml.v0.18~preview.130.36+326/opam b/packages/simple_xml/simple_xml.v0.18~preview.130.55+197/opam similarity index 83% rename from packages/simple_xml/simple_xml.v0.18~preview.130.36+326/opam rename to packages/simple_xml/simple_xml.v0.18~preview.130.55+197/opam index 464a96ad9d..7771ef568f 100644 --- a/packages/simple_xml/simple_xml.v0.18~preview.130.36+326/opam +++ b/packages/simple_xml/simple_xml.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "xmlm" {>= "1.4.0"} ] diff --git a/packages/spawn/spawn.v0.15.1+ox/files/spawn+src+spawn.ml.patch b/packages/spawn/spawn.v0.15.1+ox/files/spawn+src+spawn.ml.patch new file mode 100644 index 0000000000..ab5ec5c70a --- /dev/null +++ b/packages/spawn/spawn.v0.15.1+ox/files/spawn+src+spawn.ml.patch @@ -0,0 +1,46 @@ +--- a/src/spawn.ml ++++ b/src/spawn.ml +@@ -1,6 +1,6 @@ + open StdLabels + +-external is_osx : unit -> bool = "spawn_is_osx" [@@noalloc] ++external is_osx : unit -> bool @@ portable = "spawn_is_osx" [@@noalloc] + + let is_osx = is_osx () + +@@ -34,7 +34,7 @@ module Unix_backend = struct + Vfork + end + +-module type Env = sig ++module type Env = sig @@ portable + type t + + val of_list : string list -> t +@@ -101,7 +101,7 @@ external spawn_unix : + -> use_vfork:bool + -> setpgid:int option + -> sigprocmask:(Unix.sigprocmask_command * int list) option +- -> int = "spawn_unix_byte" "spawn_unix" ++ -> int @@ portable = "spawn_unix_byte" "spawn_unix" + + external spawn_windows : + env:Env.t option +@@ -111,7 +111,7 @@ external spawn_windows : + -> stdin:Unix.file_descr + -> stdout:Unix.file_descr + -> stderr:Unix.file_descr +- -> int = "spawn_windows_byte" "spawn_windows" ++ -> int @@ portable = "spawn_windows_byte" "spawn_windows" + + let maybe_quote f = + if +@@ -168,7 +168,7 @@ let spawn ?env ?(cwd = Working_dir.Inher + in + backend ~env ~cwd ~prog ~argv ~stdin ~stdout ~stderr ~use_vfork ~setpgid ~sigprocmask + +-external safe_pipe : unit -> Unix.file_descr * Unix.file_descr = "spawn_pipe" ++external safe_pipe : unit -> Unix.file_descr * Unix.file_descr @@ portable = "spawn_pipe" + + let safe_pipe = + if Sys.win32 then diff --git a/packages/spawn/spawn.v0.15.1+ox/files/spawn+src+spawn.mli.patch b/packages/spawn/spawn.v0.15.1+ox/files/spawn+src+spawn.mli.patch new file mode 100644 index 0000000000..fb9cd4da1b --- /dev/null +++ b/packages/spawn/spawn.v0.15.1+ox/files/spawn+src+spawn.mli.patch @@ -0,0 +1,14 @@ +--- a/src/spawn.mli ++++ b/src/spawn.mli +@@ -1,8 +1,8 @@ ++@@ portable ++ + (** Mini spawn library *) + +-(** Note: on Unix, spawn uses vfork by default. It has been tested, but if you +- believe this is causing a problem in your application, you can change this +- default at runtime by setting the environment variable [SPAWN_USE_FORK]. *) ++(** Note: on Unix, spawn uses vfork by default. It has been tested, but if you believe this is causing a problem in your application, you can change this default at runtime by setting the environment variable [SPAWN_USE_FORK]. *) + + module Working_dir : sig + type t = diff --git a/packages/spawn/spawn.v0.15.1+ox/files/spawn+src+spawn_stubs.c.patch b/packages/spawn/spawn.v0.15.1+ox/files/spawn+src+spawn_stubs.c.patch new file mode 100644 index 0000000000..a20b9f70ad --- /dev/null +++ b/packages/spawn/spawn.v0.15.1+ox/files/spawn+src+spawn_stubs.c.patch @@ -0,0 +1,24 @@ +--- a/src/spawn_stubs.c ++++ b/src/spawn_stubs.c +@@ -1,5 +1,9 @@ + #define _GNU_SOURCE + ++#define CAML_INTERNALS ++/* for [caml_convert_signal_number] */ ++#include ++#undef CAML_INTERNALS + #include + #include + #include +@@ -8,11 +12,6 @@ + + #include + +-#define CAML_INTERNALS +-/* for [caml_convert_signal_number] */ +-#include +-#undef CAML_INTERNALS +- + #if defined(__APPLE__) + + CAMLprim value spawn_is_osx() diff --git a/packages/spawn/spawn.v0.15.1+ox/opam b/packages/spawn/spawn.v0.15.1+ox/opam new file mode 100644 index 0000000000..44fdfc2e4f --- /dev/null +++ b/packages/spawn/spawn.v0.15.1+ox/opam @@ -0,0 +1,74 @@ +opam-version: "2.0" +version: "v0.15.1+ox" +name: "spawn" +synopsis: "Spawning sub-processes" +description: """\ +Spawn is a small library exposing only one functionality: spawning sub-process. + +It has three main goals: + +1. provide missing features of Unix.create_process such as providing a +working directory + +2. provide better errors when a system call fails in the +sub-process. For instance if a command is not found, you get a proper +[Unix.Unix_error] exception + +3. improve performance by using vfork when available. It is often +claimed that nowadays fork is as fast as vfork, however in practice +fork takes time proportional to the process memory while vfork is +constant time. In application using a lot of memory, vfork can be +thousands of times faster than fork.""" +maintainer: "Jane Street developers" +authors: "Jane Street Group, LLC" +license: "MIT" +homepage: "https://github.com/janestreet/spawn" +doc: "https://janestreet.github.io/spawn/" +bug-reports: "https://github.com/janestreet/spawn/issues" +depends: [ + "dune" {>= "2.8"} + "ppx_expect" {with-test} + "ocaml" {>= "4.05"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/janestreet/spawn.git" +x-commit-hash: "13d279ebfa8c40d4bafe18cddfdff0de54b4eaff" +url { + src: + "https://github.com/janestreet/spawn/archive/e24c5102490d51c50f5e77798250d95eb680a5d2.tar.gz" + checksum: + "sha256=62211a654c7885f49886422c884070a6be6b4f5d54cfc592126e7296c505ff8b" +} +patches: [ + "spawn+src+spawn.ml.patch" + "spawn+src+spawn.mli.patch" + "spawn+src+spawn_stubs.c.patch" +] +extra-files: [ + [ + "spawn+src+spawn.ml.patch" + "sha256=babfc849dc15cdfbd7622f3b2d7d5edf0e519a163b682fa3fe2bc63bbac5933f" + ] + [ + "spawn+src+spawn.mli.patch" + "sha256=58b66053584bd01bb433437a92aaecde83899d8f1be4343273fa80593581a485" + ] + [ + "spawn+src+spawn_stubs.c.patch" + "sha256=3429fd13b77648ffaa92ef808d72bbabbd82a119222deda7ddef85e4aa6d3567" + ] +] diff --git a/packages/splay_tree/splay_tree.v0.18~preview.130.36+326/opam b/packages/splay_tree/splay_tree.v0.18~preview.130.55+197/opam similarity index 80% rename from packages/splay_tree/splay_tree.v0.18~preview.130.36+326/opam rename to packages/splay_tree/splay_tree.v0.18~preview.130.55+197/opam index 3416c279ef..86724c130b 100644 --- a/packages/splay_tree/splay_tree.v0.18~preview.130.36+326/opam +++ b/packages/splay_tree/splay_tree.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -33,7 +33,7 @@ which can then be searched by efficiently. """ url { src: - "https://github.com/janestreet/splay_tree/archive/6ab289f9579f04d39d85be137c6d7987f5f1b814.tar.gz" + "https://github.com/janestreet/splay_tree/archive/ecaa5f643c05aa60ab7ea5435018cc15d90f4f7f.tar.gz" checksum: - "sha256=e0397a659946fd1117641baef5f5ea594356ae0c46443991c452f6f11410851c" + "sha256=7137e478f6071ea54f943054dc16776c94bdf16ec0846c63239a87c3aecb007c" } diff --git a/packages/splittable_random/splittable_random.v0.18~preview.130.36+326/opam b/packages/splittable_random/splittable_random.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/splittable_random/splittable_random.v0.18~preview.130.36+326/opam rename to packages/splittable_random/splittable_random.v0.18~preview.130.55+197/opam index 592e069edb..98388eec45 100644 --- a/packages/splittable_random/splittable_random.v0.18~preview.130.36+326/opam +++ b/packages/splittable_random/splittable_random.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_assert" {= "v0.18~preview.130.36+326"} - "ppx_bench" {= "v0.18~preview.130.36+326"} - "ppx_inline_test" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_assert" {= "v0.18~preview.130.55+197"} + "ppx_bench" {= "v0.18~preview.130.55+197"} + "ppx_inline_test" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -33,7 +33,7 @@ cryptographic-quality randomness in favor of performance. """ url { src: - "https://github.com/janestreet/splittable_random/archive/54963a206fb130980535f0492a5e67f633a6bb4a.tar.gz" + "https://github.com/janestreet/splittable_random/archive/f40f4b000a7f2868a7868d567bf9f22a236cf186.tar.gz" checksum: - "sha256=77c8625fbc7cd6aaee709efa9a2d888065696181141a86f04bcb75845aaa117f" + "sha256=184c777fe1d2cfed5a54592f50c4a30cca79ba0b9cecc45cd664a28a6cb1fae3" } diff --git a/packages/stdio/stdio.v0.18~preview.130.36+326/opam b/packages/stdio/stdio.v0.18~preview.130.55+197/opam similarity index 74% rename from packages/stdio/stdio.v0.18~preview.130.36+326/opam rename to packages/stdio/stdio.v0.18~preview.130.55+197/opam index f5c066421f..3f0d6e250e 100644 --- a/packages/stdio/stdio.v0.18~preview.130.36+326/opam +++ b/packages/stdio/stdio.v0.18~preview.130.55+197/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "sexplib0" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "sexplib0" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ libraries using a more consistent API. """ url { src: - "https://github.com/janestreet/stdio/archive/028a0a802557e3e078cddbfd05738d35b8a3c70f.tar.gz" + "https://github.com/janestreet/stdio/archive/c70d6a88c8f89d9571ffb3fd84f637e954552d61.tar.gz" checksum: - "sha256=e548ac6803a8dec78a5a9165572426bc254e25e9b79be07f4277913a5e92e57b" + "sha256=f8ff9053ca670212db9f07fc5ec7f2e10b4880491d1a7eea5de508489d35f7cd" } diff --git a/packages/stdune/stdune.3.20.2+ox/files/oxcaml-dune.patch b/packages/stdune/stdune.3.20.2+ox/files/oxcaml-dune.patch new file mode 100644 index 0000000000..43482816b6 --- /dev/null +++ b/packages/stdune/stdune.3.20.2+ox/files/oxcaml-dune.patch @@ -0,0 +1,39 @@ +diff --git a/otherlibs/stdune/src/queue.ml b/otherlibs/stdune/src/queue.ml +index 6a5fbb493..fb3db35a9 100644 +--- a/otherlibs/stdune/src/queue.ml ++++ b/otherlibs/stdune/src/queue.ml +@@ -1,10 +1,16 @@ + include Stdlib.Queue + ++let create () = create () + let push t x = add x t + let peek_exn t = peek t + let pop_exn t = pop t + let pop t = if is_empty t then None else Some (pop_exn t) + let peek t = if is_empty t then None else Some (peek t) ++let clear t = clear t ++let copy t = copy t ++let is_empty t = is_empty t ++let length t = length t + let iter t ~f = iter f t + let fold t ~f ~init = fold f init t ++let transfer t1 t2 = transfer t1 t2 + let to_list t = List.rev (fold t ~f:(fun acc a -> a :: acc) ~init:[]) +diff --git a/src/csexp_rpc/csexp_rpc.ml b/src/csexp_rpc/csexp_rpc.ml +index 0a5d308c1..1c1485d9c 100644 +--- a/src/csexp_rpc/csexp_rpc.ml ++++ b/src/csexp_rpc/csexp_rpc.ml +@@ -236,10 +236,10 @@ module Session = struct + + external send : Unix.file_descr -> Bytes.t -> int -> int -> int = "dune_send" + +- let write = ++ let write t b = + match Platform.OS.value with +- | Linux -> send +- | _ -> Unix.single_write ++ | Linux -> send t b ++ | _ -> Unix.single_write t b + ;; + + let rec csexp_write_loop fd out_buf token = diff --git a/packages/stdune/stdune.3.20.2+ox/opam b/packages/stdune/stdune.3.20.2+ox/opam new file mode 100644 index 0000000000..6e0cd9a462 --- /dev/null +++ b/packages/stdune/stdune.3.20.2+ox/opam @@ -0,0 +1,45 @@ +opam-version: "2.0" +version: "3.20.2+ox" +name: "stdune" +synopsis: "Dune's unstable standard library" +description: "This library offers no backwards compatibility guarantees. Use at your own risk." +maintainer: "Jane Street Group, LLC " +authors: "Jane Street Group, LLC " +license: "MIT" +homepage: "https://github.com/ocaml/dune" +doc: "https://dune.readthedocs.io/" +bug-reports: "https://github.com/ocaml/dune/issues" +depends: [ + "dune" {>= "3.20"} + "ocaml" {>= "4.08.0"} + "base-unix" + "dyn" {= "3.20.2+ox"} + "ordering" {= "3.20.2+ox"} + "pp" {>= "2.0.0"} + "csexp" {>= "1.5.0"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + ["rm" "-rf" "vendor/csexp"] + ["rm" "-rf" "vendor/pp"] + ["dune" "build" "-p" name "-j" jobs "@install" "@doc" {with-doc}] +] +dev-repo: "git+https://github.com/ocaml/dune.git" +url { + src: + "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + checksum: [ + "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + ] +} +x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-maintenance-intent: ["(latest)"] +patches: ["oxcaml-dune.patch"] +extra-files: [ + [ + "oxcaml-dune.patch" + "sha256=fe1d266b70e4f7bc884eda337f68c6a539bebc4e9b3e2ed0fdf7293797fc3f33" + ] +] diff --git a/packages/stored_reversed/stored_reversed.v0.18~preview.130.36+326/opam b/packages/stored_reversed/stored_reversed.v0.18~preview.130.55+197/opam similarity index 73% rename from packages/stored_reversed/stored_reversed.v0.18~preview.130.36+326/opam rename to packages/stored_reversed/stored_reversed.v0.18~preview.130.55+197/opam index 3234313d0a..c62193a804 100644 --- a/packages/stored_reversed/stored_reversed.v0.18~preview.130.36+326/opam +++ b/packages/stored_reversed/stored_reversed.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ A ['a list t] represents a list temporarily stored in the reverse of its logical """ url { src: - "https://github.com/janestreet/stored_reversed/archive/2cd8b8941a5715f775452eadb7f492da8a4099c9.tar.gz" + "https://github.com/janestreet/stored_reversed/archive/86e7ac6cf8f6fd3cd97b80295ad3bd8f5b358f58.tar.gz" checksum: - "sha256=0822fa6b06b4c74998a0b3b9a5e823b740ed37d045e9b82052b38b057ecd0ce0" + "sha256=8a05a197123e11c2f24fa7a042071b8bf4f5209f0543678357c7e8c01ee551e3" } diff --git a/packages/streamable/streamable.v0.18~preview.130.36+326/opam b/packages/streamable/streamable.v0.18~preview.130.55+197/opam similarity index 56% rename from packages/streamable/streamable.v0.18~preview.130.36+326/opam rename to packages/streamable/streamable.v0.18~preview.130.55+197/opam index 484c1a84db..de0689d8f2 100644 --- a/packages/streamable/streamable.v0.18~preview.130.36+326/opam +++ b/packages/streamable/streamable.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppxlib_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppxlib_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ppxlib" {= "0.33.0+ox"} ] @@ -30,7 +30,7 @@ A collection of types suitable for incremental serialization. """ url { src: - "https://github.com/janestreet/streamable/archive/39798bf9ebc3a98b29877d68e7e0619e325dab96.tar.gz" + "https://github.com/janestreet/streamable/archive/f32eaa08d6ed284e89d61bc5690a84ab8dc151fa.tar.gz" checksum: - "sha256=16459a9fe1871b73c310d58360e1dd21a19147115f7917d7f23e6719e0740865" + "sha256=491477c2db4b2234d1c20dce490500b58ad9ee8ba75ead8af5ed67fa890e8bca" } diff --git a/packages/string_dict/string_dict.v0.18~preview.130.36+326/opam b/packages/string_dict/string_dict.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/string_dict/string_dict.v0.18~preview.130.36+326/opam rename to packages/string_dict/string_dict.v0.18~preview.130.55+197/opam index 419e9d7495..f3206a6d77 100644 --- a/packages/string_dict/string_dict.v0.18~preview.130.36+326/opam +++ b/packages/string_dict/string_dict.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "basement" {= "v0.18~preview.130.36+326"} - "ppx_compare" {= "v0.18~preview.130.36+326"} - "ppx_hash" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "basement" {= "v0.18~preview.130.55+197"} + "ppx_compare" {= "v0.18~preview.130.55+197"} + "ppx_hash" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -30,7 +30,7 @@ on strings. """ url { src: - "https://github.com/janestreet/string_dict/archive/b1da30675532e990d5fca94ab6673c1f1530f45f.tar.gz" + "https://github.com/janestreet/string_dict/archive/31d6ffe84bff1ac68f4ead07166201102b474eb6.tar.gz" checksum: - "sha256=6e39ae2cba0e6541f6c5730090363eb79454b3aa5bd6651ecb2e3ed25bf1ccee" + "sha256=b856769070fbc54c0196420aef7b8aa814228193ced120cc8a09eb772a899485" } diff --git a/packages/testable_timeout/testable_timeout.v0.18~preview.130.36+326/opam b/packages/testable_timeout/testable_timeout.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/testable_timeout/testable_timeout.v0.18~preview.130.36+326/opam rename to packages/testable_timeout/testable_timeout.v0.18~preview.130.55+197/opam index fd3dd5b546..4f353fa54e 100644 --- a/packages/testable_timeout/testable_timeout.v0.18~preview.130.36+326/opam +++ b/packages/testable_timeout/testable_timeout.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml-ppx" {= "6.0.1+ox"} ] @@ -26,7 +26,7 @@ An API like the browser's setTimeout, but driven by an overridable async time so """ url { src: - "https://github.com/janestreet/testable_timeout/archive/84b3979e54ca9f4c231c2f9f8a07bf1360ab6654.tar.gz" + "https://github.com/janestreet/testable_timeout/archive/bbec9b8987648967e768aac7fa67fd8060a38fc2.tar.gz" checksum: - "sha256=3894c639cc0235bb39e0cac177d185b1c64ed2de01a23974d1e039118d737ad1" + "sha256=48d0048a0f33f9fcffae334b55db5c124cf2ed1f4f86a3dd2067567b3e1f5701" } diff --git a/packages/textutils/textutils.v0.18~preview.130.36+326/opam b/packages/textutils/textutils.v0.18~preview.130.55+197/opam similarity index 63% rename from packages/textutils/textutils.v0.18~preview.130.36+326/opam rename to packages/textutils/textutils.v0.18~preview.130.55+197/opam index fe34df142e..2863f20f29 100644 --- a/packages/textutils/textutils.v0.18~preview.130.36+326/opam +++ b/packages/textutils/textutils.v0.18~preview.130.55+197/opam @@ -12,10 +12,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "uutf" {= "1.0.3+ox"} ] @@ -25,7 +25,7 @@ description: """ """ url { src: - "https://github.com/janestreet/textutils/archive/a78f7502d6224d62f6cb32d382ce9ebcd005b1d9.tar.gz" + "https://github.com/janestreet/textutils/archive/f5a59ad8bc1e17af77b8536dd467991a5f7f87c0.tar.gz" checksum: - "sha256=ed33302a2a776e52d1b9b358f5fa4d5253ed2bfd748a830830257fdd3eb3258f" + "sha256=f8e545aad112bbf409054fcb8809fa5144ecfec60270738227e1414be84dfbf2" } diff --git a/packages/textutils_kernel/textutils_kernel.v0.18~preview.130.36+326/opam b/packages/textutils_kernel/textutils_kernel.v0.18~preview.130.55+197/opam similarity index 70% rename from packages/textutils_kernel/textutils_kernel.v0.18~preview.130.36+326/opam rename to packages/textutils_kernel/textutils_kernel.v0.18~preview.130.55+197/opam index 0d46b3e086..5822a41e9f 100644 --- a/packages/textutils_kernel/textutils_kernel.v0.18~preview.130.36+326/opam +++ b/packages/textutils_kernel/textutils_kernel.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "uutf" {= "1.0.3+ox"} ] @@ -23,7 +23,7 @@ description: """ """ url { src: - "https://github.com/janestreet/textutils_kernel/archive/5973d55bcd791d9e255c146185020303d1d8a949.tar.gz" + "https://github.com/janestreet/textutils_kernel/archive/9014d0228aed6e627b7e47711be308044e011268.tar.gz" checksum: - "sha256=d7f31ae56f62fa17d8150abd1e377fae660299dfea3c29e64b110303b37a81ab" + "sha256=30e50687df53b6012a71fa37838a93d7f3c84e78b2f1bcc5c4c6370ce50be713" } diff --git a/packages/tilde_f/tilde_f.v0.18~preview.130.36+326/opam b/packages/tilde_f/tilde_f.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/tilde_f/tilde_f.v0.18~preview.130.36+326/opam rename to packages/tilde_f/tilde_f.v0.18~preview.130.55+197/opam index 17034131eb..49899143c9 100644 --- a/packages/tilde_f/tilde_f.v0.18~preview.130.36+326/opam +++ b/packages/tilde_f/tilde_f.v0.18~preview.130.55+197/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -22,7 +22,7 @@ Provides a let-syntax for continuation-passing style. """ url { src: - "https://github.com/janestreet/tilde_f/archive/775bf64ff91deb7db3f54ca5d68e5f42cbc87286.tar.gz" + "https://github.com/janestreet/tilde_f/archive/7fd7214693d67197f686572979e5297750a0f06f.tar.gz" checksum: - "sha256=63377e96f636a818f46097594f4c205dcfef96ee9bf036ec9867f78fb1634826" + "sha256=c082e4fee84124305ebe361daa1b5c66441fd4754bb6d467cc681d7c85282065" } diff --git a/packages/time_ago/time_ago.v0.18~preview.130.36+326/opam b/packages/time_ago/time_ago.v0.18~preview.130.55+197/opam similarity index 68% rename from packages/time_ago/time_ago.v0.18~preview.130.36+326/opam rename to packages/time_ago/time_ago.v0.18~preview.130.55+197/opam index e9aabc9931..823b844822 100644 --- a/packages/time_ago/time_ago.v0.18~preview.130.36+326/opam +++ b/packages/time_ago/time_ago.v0.18~preview.130.55+197/opam @@ -11,10 +11,10 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "incr_dom" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "incr_dom" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "js_of_ocaml" {= "6.0.1+ox"} "js_of_ocaml-ppx" {= "6.0.1+ox"} @@ -27,7 +27,7 @@ A library for turning elapsed or future times into human-readable strings. """ url { src: - "https://github.com/janestreet/time_ago/archive/8b7d5950d37a264314842d9042990b479be5dd62.tar.gz" + "https://github.com/janestreet/time_ago/archive/76b2d81d59b9365919cefe927e285618cde6b2c6.tar.gz" checksum: - "sha256=45883ccafbf3bbb3de3ec92b551915c8e6715b780d80d124659ae42902cdbbac" + "sha256=b303a0b5891948165de1eb73773825803f76aee13c06b50023a91fba2d3cd6e5" } diff --git a/packages/time_now/time_now.v0.18~preview.130.36+326/opam b/packages/time_now/time_now.v0.18~preview.130.55+197/opam similarity index 61% rename from packages/time_now/time_now.v0.18~preview.130.36+326/opam rename to packages/time_now/time_now.v0.18~preview.130.55+197/opam index 9603d6eb75..56e5a7ad70 100644 --- a/packages/time_now/time_now.v0.18~preview.130.36+326/opam +++ b/packages/time_now/time_now.v0.18~preview.130.55+197/opam @@ -11,11 +11,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "jane-street-headers" {= "v0.18~preview.130.36+326"} - "jst-config" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "jane-street-headers" {= "v0.18~preview.130.55+197"} + "jst-config" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -26,7 +26,7 @@ since the start of the Unix epoch. """ url { src: - "https://github.com/janestreet/time_now/archive/2c308fb27fd556e71346c7d99726148fc1f57009.tar.gz" + "https://github.com/janestreet/time_now/archive/54bc5e246deee6853bbba8aa80157dac1b108fb4.tar.gz" checksum: - "sha256=eb515f7d8aa01541733ef6ef62478430c41893bcdacc1af8a07b571f7e1d9389" + "sha256=6aac87d3e862af096e4b37509e9c1f5017f0436b6fcc212693842eb940305dfa" } diff --git a/packages/timezone/timezone.v0.18~preview.130.36+326/opam b/packages/timezone/timezone.v0.18~preview.130.55+197/opam similarity index 59% rename from packages/timezone/timezone.v0.18~preview.130.36+326/opam rename to packages/timezone/timezone.v0.18~preview.130.55+197/opam index 087d2cf97f..ccd568fe17 100644 --- a/packages/timezone/timezone.v0.18~preview.130.36+326/opam +++ b/packages/timezone/timezone.v0.18~preview.130.55+197/opam @@ -11,12 +11,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_diff" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_diff" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -27,7 +27,7 @@ can later be used to manipulate time in core_kernel or core. """ url { src: - "https://github.com/janestreet/timezone/archive/6e5d3e8b98a660d7240cfa92c2d4b5954514d441.tar.gz" + "https://github.com/janestreet/timezone/archive/3f524e4389e9ab0f50158fffbfabc53e42359e22.tar.gz" checksum: - "sha256=06ada966ef1a626533ada79f29774ca03af1d154c8a79dc9d8a15cb6a38bd82c" + "sha256=983e71d86204554b96e30ebf6d20839d7cb3c5f0c392995134ff458a7890a942" } diff --git a/packages/toplayer/toplayer.v0.18~preview.130.36+326/opam b/packages/toplayer/toplayer.v0.18~preview.130.55+197/opam similarity index 59% rename from packages/toplayer/toplayer.v0.18~preview.130.36+326/opam rename to packages/toplayer/toplayer.v0.18~preview.130.55+197/opam index 0903aa765f..fe5820e9fd 100644 --- a/packages/toplayer/toplayer.v0.18~preview.130.36+326/opam +++ b/packages/toplayer/toplayer.v0.18~preview.130.55+197/opam @@ -11,14 +11,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "am_running_how_js" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "incr_dom" {= "v0.18~preview.130.36+326"} - "ppx_css" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "testable_timeout" {= "v0.18~preview.130.36+326"} - "virtual_dom" {= "v0.18~preview.130.36+326"} + "am_running_how_js" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "incr_dom" {= "v0.18~preview.130.55+197"} + "ppx_css" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "testable_timeout" {= "v0.18~preview.130.55+197"} + "virtual_dom" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "gen_js_api" {= "1.1.2+ox"} "js_of_ocaml" {= "6.0.1+ox"} @@ -32,7 +32,7 @@ The floating positioning library itself may be found at https://floating-ui.com/ """ url { src: - "https://github.com/janestreet/toplayer/archive/ce9d1f6b05e143e6f11a364d9e07acf44204d5e9.tar.gz" + "https://github.com/janestreet/toplayer/archive/c9cf1468460ab1bec32c737189ef66eb462088a6.tar.gz" checksum: - "sha256=d713df91bbfcb7b83d3ceb3f502970da02366822b225481fddac2c9cb5a700e6" + "sha256=fe1bf3160becc98af4607a127064c759bafad3f66a4970527062bf5c2d4619f7" } diff --git a/packages/toplevel_backend/toplevel_backend.v0.18~preview.130.36+326/opam b/packages/toplevel_backend/toplevel_backend.v0.18~preview.130.55+197/opam similarity index 59% rename from packages/toplevel_backend/toplevel_backend.v0.18~preview.130.36+326/opam rename to packages/toplevel_backend/toplevel_backend.v0.18~preview.130.55+197/opam index dd781a0578..0c29e7c07a 100644 --- a/packages/toplevel_backend/toplevel_backend.v0.18~preview.130.36+326/opam +++ b/packages/toplevel_backend/toplevel_backend.v0.18~preview.130.55+197/opam @@ -12,13 +12,13 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "parsexp" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "parsexp" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} "ocamlfind" {>= "1.7.2"} ] @@ -29,7 +29,7 @@ Module for setting up dependencies (like printers and liblinks) for toplevels. """ url { src: - "https://github.com/janestreet/toplevel_backend/archive/9acb48c88dd574158bf3ada28c6c3519c737fdba.tar.gz" + "https://github.com/janestreet/toplevel_backend/archive/ee92612a106374e30f1416a3b80ead10c968c894.tar.gz" checksum: - "sha256=b2242dfe6f44fc05168a9b9d685b9afd277610f92455f02c4f764d1b171c3775" + "sha256=1606e3ccc6d9e05d36ee474f00909711b4040ce7b65a39e64de47d169107fdf7" } diff --git a/packages/toplevel_expect_test/toplevel_expect_test.v0.18~preview.130.36+326/opam b/packages/toplevel_expect_test/toplevel_expect_test.v0.18~preview.130.55+197/opam similarity index 64% rename from packages/toplevel_expect_test/toplevel_expect_test.v0.18~preview.130.36+326/opam rename to packages/toplevel_expect_test/toplevel_expect_test.v0.18~preview.130.55+197/opam index 69cc5b29c4..a4446a580f 100644 --- a/packages/toplevel_expect_test/toplevel_expect_test.v0.18~preview.130.36+326/opam +++ b/packages/toplevel_expect_test/toplevel_expect_test.v0.18~preview.130.55+197/opam @@ -12,15 +12,15 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "mlt_parser" {= "v0.18~preview.130.36+326"} - "ppx_expect" {= "v0.18~preview.130.36+326"} - "ppx_inline_test" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "toplevel_backend" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "mlt_parser" {= "v0.18~preview.130.55+197"} + "ppx_expect" {= "v0.18~preview.130.55+197"} + "ppx_inline_test" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "toplevel_backend" {= "v0.18~preview.130.55+197"} "base-threads" "dune" {>= "3.17.0"} "ocaml-compiler-libs" {= "v0.17.0+ox"} @@ -37,7 +37,7 @@ the toplevel in a terminal. """ url { src: - "https://github.com/janestreet/toplevel_expect_test/archive/7e69c3740f5898f5e1c44387adef498ba0e0bc8e.tar.gz" + "https://github.com/janestreet/toplevel_expect_test/archive/577dd370d894cdda4a5e75a6cf60db545091eaa6.tar.gz" checksum: - "sha256=1fd4e8a6b2f3d7b7f7787573328e1212106afb47614db2956eed2cdde7c75a64" + "sha256=f01166cf599084d2615dce7067c2afcb33dc19575a34540157363f0985929ba0" } diff --git a/packages/topological_sort/topological_sort.v0.18~preview.130.36+326/opam b/packages/topological_sort/topological_sort.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/topological_sort/topological_sort.v0.18~preview.130.36+326/opam rename to packages/topological_sort/topological_sort.v0.18~preview.130.55+197/opam index 644c71cb7b..eab05ac3f5 100644 --- a/packages/topological_sort/topological_sort.v0.18~preview.130.36+326/opam +++ b/packages/topological_sort/topological_sort.v0.18~preview.130.55+197/opam @@ -12,9 +12,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ topological-sort algorithm. """ url { src: - "https://github.com/janestreet/topological_sort/archive/8db419ea78a1fb83b7a5d564142827662e89a12d.tar.gz" + "https://github.com/janestreet/topological_sort/archive/8a8e7359f31931509281d94905ef2bec19ab5de8.tar.gz" checksum: - "sha256=9ffdaf11b8b8614d2ecf058a3e677c0118af6ed06c9ee1dc88369da0d244a645" + "sha256=b16bcfff1aff91afa8b32f977603360087a517d00d8afd28eeea05368bc06d98" } diff --git a/packages/torch/torch.v0.18~preview.130.36+326/opam b/packages/torch/torch.v0.18~preview.130.55+197/opam similarity index 55% rename from packages/torch/torch.v0.18~preview.130.36+326/opam rename to packages/torch/torch.v0.18~preview.130.55+197/opam index 6b5851f17b..aca76915c0 100644 --- a/packages/torch/torch.v0.18~preview.130.36+326/opam +++ b/packages/torch/torch.v0.18~preview.130.55+197/opam @@ -11,15 +11,17 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_bench" {= "v0.18~preview.130.36+326"} - "ppx_inline_test" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_string" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "ctypes" {>= "0.18.0"} + "base" {= "v0.18~preview.130.55+197"} + "base_bigstring" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_bench" {= "v0.18~preview.130.55+197"} + "ppx_inline_test" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_let" {= "v0.18~preview.130.55+197"} + "ppx_string" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "ctypes" {= "0.23.0+ox"} "ctypes-foreign" "dune" {>= "3.17.0"} "dune-configurator" @@ -38,7 +40,7 @@ tape-based automatic differentiation. """ url { src: - "https://github.com/janestreet/torch/archive/c6332ab23181eb0cf0c4979395c51cfff4f3257a.tar.gz" + "https://github.com/janestreet/torch/archive/779d254c7a94ec5c279c0da35cbfc3c91eb1624f.tar.gz" checksum: - "sha256=fbfde230cef5dc4e07a904909b79a2e88230af8aff627806489a35dd58e60cd5" + "sha256=a1eed60b3349054ef33ffce10fbbf98c9a90393123911506acda108fa54e4dea" } diff --git a/packages/tracing/tracing.v0.18~preview.130.36+326/opam b/packages/tracing/tracing.v0.18~preview.130.55+197/opam similarity index 62% rename from packages/tracing/tracing.v0.18~preview.130.36+326/opam rename to packages/tracing/tracing.v0.18~preview.130.55+197/opam index d16d73993f..f2a14b0caa 100644 --- a/packages/tracing/tracing.v0.18~preview.130.36+326/opam +++ b/packages/tracing/tracing.v0.18~preview.130.55+197/opam @@ -11,12 +11,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "cohttp" {>= "2.5.6"} "cohttp-async" {>= "2.5.7" & < "3.0.0" | >= "5.1.1" & < "6.0.0"} "dune" {>= "3.17.0"} @@ -29,7 +29,7 @@ Utilities for creating and parsing traces in Fuchsia Trace Format. """ url { src: - "https://github.com/janestreet/tracing/archive/e4feba62eaa55de0b5f32f4ab3d05c182ac2fda3.tar.gz" + "https://github.com/janestreet/tracing/archive/519a286705fb02702a7d606e3052643313cbe60c.tar.gz" checksum: - "sha256=2e3831ba306d5993f9c5339811852d32186c7cb9d6c284a77650e6875054b3db" + "sha256=9a08083813bddbdcbd1f15b25a51df1b3bda3dd875e3b8b4cd4329626dd7c77b" } diff --git a/packages/typerep/typerep.v0.18~preview.130.36+326/opam b/packages/typerep/typerep.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/typerep/typerep.v0.18~preview.130.36+326/opam rename to packages/typerep/typerep.v0.18~preview.130.55+197/opam index c0c4b8a7b7..d255644836 100644 --- a/packages/typerep/typerep.v0.18~preview.130.36+326/opam +++ b/packages/typerep/typerep.v0.18~preview.130.55+197/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_template" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -21,7 +21,7 @@ description: """ """ url { src: - "https://github.com/janestreet/typerep/archive/f596b99ce549a9a693ae9f0d4d2c7a834ce90de4.tar.gz" + "https://github.com/janestreet/typerep/archive/256c009b920d7ebb683cce13a559f901a310e718.tar.gz" checksum: - "sha256=427c7d1fb0cca33a88aa7975d286c15221eac4042ce817eb29c791b46f9fd497" + "sha256=6835bdbebe30298bb4517b8b443807a77329432523f5da22104c9c61a0dbfecc" } diff --git a/packages/unboxed/unboxed.v0.18~preview.130.36+326/opam b/packages/unboxed/unboxed.v0.18~preview.130.55+197/opam similarity index 50% rename from packages/unboxed/unboxed.v0.18~preview.130.36+326/opam rename to packages/unboxed/unboxed.v0.18~preview.130.55+197/opam index 15dcb92613..1e6c93b453 100644 --- a/packages/unboxed/unboxed.v0.18~preview.130.36+326/opam +++ b/packages/unboxed/unboxed.v0.18~preview.130.55+197/opam @@ -11,14 +11,14 @@ build: [ ] depends: [ "ocaml" {>= "5.2.0"} - "base" {= "v0.18~preview.130.36+326"} - "bin_prot" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "float_array" {= "v0.18~preview.130.36+326"} - "ocaml_intrinsics_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "typerep" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "bin_prot" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "float_array" {= "v0.18~preview.130.55+197"} + "ocaml_intrinsics_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "typerep" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -28,7 +28,7 @@ description: """ """ url { src: - "https://github.com/janestreet/unboxed/archive/100e296680cef3a782bf87f124950a2ed5f24ce8.tar.gz" + "https://github.com/janestreet/unboxed/archive/eaff15eaa447a8dd6bfd0adb3889d36acb9a9515.tar.gz" checksum: - "sha256=27d82e29ff1d47a86487325a23554b49683bedea62e6fa4bec1f9245475f2648" + "sha256=77e0ece3c342d9b409412ff37414dc485667cce0ffc8b0a9e214f87d82e7e28f" } diff --git a/packages/unique/unique.v0.18~preview.130.36+326/opam b/packages/unique/unique.v0.18~preview.130.55+197/opam similarity index 58% rename from packages/unique/unique.v0.18~preview.130.36+326/opam rename to packages/unique/unique.v0.18~preview.130.55+197/opam index 38f52d02be..2445974af0 100644 --- a/packages/unique/unique.v0.18~preview.130.36+326/opam +++ b/packages/unique/unique.v0.18~preview.130.55+197/opam @@ -10,11 +10,12 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "5.2.0"} - "basement" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "dune" {>= "3.17.0"} + "ocaml" {>= "5.2.0"} + "base" {= "v0.18~preview.130.55+197"} + "basement" {= "v0.18~preview.130.55+197"} + "portable" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} + "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "Unique value containers for OxCaml" @@ -23,7 +24,7 @@ description: """ """ url { src: - "https://github.com/janestreet/unique/archive/b43a55566ecd8feaf5509152b55f666e6d8da0d6.tar.gz" + "https://github.com/janestreet/unique/archive/5652807c703cf9f023594a76a34ce9edb53e1891.tar.gz" checksum: - "sha256=0954f9b8bff745953ae309ced29c746a299d64472017a5848a1066a6925a0fa7" + "sha256=2a7707ca48f516dc6cb96e21118af8410b5f35b27dc5f886db0942a987f74085" } diff --git a/packages/univ_map/univ_map.v0.18~preview.130.36+326/opam b/packages/univ_map/univ_map.v0.18~preview.130.55+197/opam similarity index 65% rename from packages/univ_map/univ_map.v0.18~preview.130.36+326/opam rename to packages/univ_map/univ_map.v0.18~preview.130.55+197/opam index a51faf5ed1..d0980c7149 100644 --- a/packages/univ_map/univ_map.v0.18~preview.130.36+326/opam +++ b/packages/univ_map/univ_map.v0.18~preview.130.55+197/opam @@ -11,12 +11,12 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_base" {= "v0.18~preview.130.36+326"} - "ppx_here" {= "v0.18~preview.130.36+326"} - "ppx_inline_test" {= "v0.18~preview.130.36+326"} - "ppx_sexp_message" {= "v0.18~preview.130.36+326"} - "ppx_sexp_value" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_base" {= "v0.18~preview.130.55+197"} + "ppx_here" {= "v0.18~preview.130.55+197"} + "ppx_inline_test" {= "v0.18~preview.130.55+197"} + "ppx_sexp_message" {= "v0.18~preview.130.55+197"} + "ppx_sexp_value" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -31,7 +31,7 @@ This is similar to [Univ] in spirit. """ url { src: - "https://github.com/janestreet/univ_map/archive/fdf6b89b20694aa0793ef96655363d7fe602f082.tar.gz" + "https://github.com/janestreet/univ_map/archive/f8d4b3f1348cd10b3d8560549097b368a9b9dbed.tar.gz" checksum: - "sha256=376312d0a65364fee744d1ae1c8eb225f6bf2bba5690d51bb19f4e07ce47dd85" + "sha256=d967c13a6e2261f95ca12847db58d75cafafced1c6cdb4a01a0f472d0cffbe8e" } diff --git a/packages/uopt/uopt.v0.18~preview.130.36+326/opam b/packages/uopt/uopt.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/uopt/uopt.v0.18~preview.130.36+326/opam rename to packages/uopt/uopt.v0.18~preview.130.55+197/opam index 738246c93d..81a1c9e1de 100644 --- a/packages/uopt/uopt.v0.18~preview.130.36+326/opam +++ b/packages/uopt/uopt.v0.18~preview.130.55+197/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -23,7 +23,7 @@ Uopt_base provides an unboxed option type, for use in high-performance systems w """ url { src: - "https://github.com/janestreet/uopt/archive/652540703bb5de16bb4c03bfe11eeb27a5193f31.tar.gz" + "https://github.com/janestreet/uopt/archive/b441a55870c4a86140501e85da20dca92f740e59.tar.gz" checksum: - "sha256=14044b7858fe2ec8d8b120083e7d5488a39c7e793a9249e61ab023ff23a39a9a" + "sha256=04b24f0376a3a5d12a7fef1c008309487df48d9a05a0c1dbc0b07e9439a9a9f4" } diff --git a/packages/uri_parsing/uri_parsing.v0.18~preview.130.36+326/opam b/packages/uri_parsing/uri_parsing.v0.18~preview.130.55+197/opam similarity index 66% rename from packages/uri_parsing/uri_parsing.v0.18~preview.130.36+326/opam rename to packages/uri_parsing/uri_parsing.v0.18~preview.130.55+197/opam index 3b9290f681..52fa0ff9eb 100644 --- a/packages/uri_parsing/uri_parsing.v0.18~preview.130.36+326/opam +++ b/packages/uri_parsing/uri_parsing.v0.18~preview.130.55+197/opam @@ -12,14 +12,14 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_typed_fields" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_typed_fields" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} "base64" {>= "3.4.0"} "dune" {>= "3.17.0"} "js_of_ocaml-ppx" {= "6.0.1+ox"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} "uri" {>= "3.0.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -30,7 +30,7 @@ A library for building composable URI parsers using ppx_typed_fields. """ url { src: - "https://github.com/janestreet/uri_parsing/archive/847c71e25d98060d600eda8da24ae4d30a440f8d.tar.gz" + "https://github.com/janestreet/uri_parsing/archive/651acd0e6732647a1425d945329c62eb7258bc36.tar.gz" checksum: - "sha256=96a5665a11666326134787113b06835c6c54d60f0033a04d89e9aa58d64a7c59" + "sha256=ad1e6c5d9a67c06f2bf137b0a0f35840e07c6d4689abde1839cc08cef7d91ce4" } diff --git a/packages/username_kernel/username_kernel.v0.18~preview.130.36+326/opam b/packages/username_kernel/username_kernel.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/username_kernel/username_kernel.v0.18~preview.130.36+326/opam rename to packages/username_kernel/username_kernel.v0.18~preview.130.55+197/opam index 5f9868de8a..cb0e956a4a 100644 --- a/packages/username_kernel/username_kernel.v0.18~preview.130.36+326/opam +++ b/packages/username_kernel/username_kernel.v0.18~preview.130.55+197/opam @@ -12,8 +12,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_template" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_template" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -23,7 +23,7 @@ A string representation for a user, typically a UNIX username """ url { src: - "https://github.com/janestreet/username_kernel/archive/48a3ea37a30bb3e1d327072f4f4fb36a3f3776b6.tar.gz" + "https://github.com/janestreet/username_kernel/archive/20671c8d5b83a90bdce30602edc42ccf55ca673d.tar.gz" checksum: - "sha256=067a3ca99694944b80f0927937ff698001e135f91d91c234f023c79ca15cbbd2" + "sha256=b2b2dd95eccb66dd1a9247413f176228c924db17bc7ce67aa48c223b72c527d3" } diff --git a/packages/utop/utop.2.16.0+ox/opam b/packages/utop/utop.2.16.0+ox/opam index c0c96730c7..8ae4648835 100644 --- a/packages/utop/utop.2.16.0+ox/opam +++ b/packages/utop/utop.2.16.0+ox/opam @@ -1,5 +1,5 @@ opam-version: "2.0" -version: "2.15.0+ox" +version: "2.16.0+ox" name: "utop" synopsis: "Universal toplevel for OCaml" description: @@ -12,7 +12,7 @@ doc: "https://ocaml-community.github.io/utop/" bug-reports: "https://github.com/ocaml-community/utop/issues" depends: [ "dune" {>= "2.7"} - "ocaml" {>= "4.11.0"} + "ocaml" {>= "4.11.0" & < "5.4"} "base-unix" "base-threads" "ocamlfind" {>= "1.7.2"} @@ -44,17 +44,8 @@ build: [ dev-repo: "git+https://github.com/ocaml-community/utop.git" url { src: - "https://github.com/ocaml-community/utop/releases/download/2.16.0/utop-2.16.0.tbz" - checksum: [ - "sha256=0b9f79135d2132fb211cbe889941cfd0d54cc7bb8062b8a0443e38c540b8c763" - "sha512=073d67d898ac1b579aac050e8c88a229d67a13e9c85f1d835023a46750cdf4b2f2180d1ea70005e9e0366721503d0ba2b9c326deddfb43426d87481e461cd45e" - ] + "https://github.com/oxcaml/utop/archive/34e9c6de5245cfbe03c721994d7fdd08a9dcbce4.tar.gz" + checksum: + "sha256=de479fdbfbfbe75b6dc55f3eab174acf8b171300ae1c4b27455623a583c0c541" } -x-commit-hash: "bd6a1546e5c73c7a626e456fac5e81027106e4d6" -patches: ["diff.patch"] -extra-files: [ - [ - "diff.patch" - "sha256=06f1c6775f57ad96ed0812fd5a46977dffbb1c216389ab824e5f964dccc18df8" - ] -] + diff --git a/packages/variantslib/variantslib.v0.18~preview.130.36+326/opam b/packages/variantslib/variantslib.v0.18~preview.130.55+197/opam similarity index 77% rename from packages/variantslib/variantslib.v0.18~preview.130.36+326/opam rename to packages/variantslib/variantslib.v0.18~preview.130.55+197/opam index 4c83c55568..aaa88ded4f 100644 --- a/packages/variantslib/variantslib.v0.18~preview.130.36+326/opam +++ b/packages/variantslib/variantslib.v0.18~preview.130.55+197/opam @@ -12,7 +12,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {= "v0.18~preview.130.36+326"} + "base" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -24,7 +24,7 @@ largest industrial user of OCaml. """ url { src: - "https://github.com/janestreet/variantslib/archive/6203209c6599596bcda0c446172ab8c96d9c5a93.tar.gz" + "https://github.com/janestreet/variantslib/archive/211184518f02e48a5998e5282f75f448fc5519c8.tar.gz" checksum: - "sha256=348ac7f09a9f67e100fa3cab6e784e109a6347a15a9a9737b74c4c2812102bf0" + "sha256=6a74762f55f5601b9847e9de78f27cb2d89d64a33ec68e08a1491850cd9a14e7" } diff --git a/packages/vcaml/vcaml.v0.18~preview.130.36+326/opam b/packages/vcaml/vcaml.v0.18~preview.130.55+197/opam similarity index 56% rename from packages/vcaml/vcaml.v0.18~preview.130.36+326/opam rename to packages/vcaml/vcaml.v0.18~preview.130.55+197/opam index f6716b1789..a3fb200429 100644 --- a/packages/vcaml/vcaml.v0.18~preview.130.36+326/opam +++ b/packages/vcaml/vcaml.v0.18~preview.130.55+197/opam @@ -14,27 +14,27 @@ run-test: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async" {= "v0.18~preview.130.36+326"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "async_unix" {= "v0.18~preview.130.36+326"} - "base_trie" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "core_unix" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_async" {= "v0.18~preview.130.36+326"} - "expect_test_helpers_core" {= "v0.18~preview.130.36+326"} - "jsonaf" {= "v0.18~preview.130.36+326"} - "man_in_the_middle_debugger" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_optcomp" {= "v0.18~preview.130.36+326"} - "semantic_version" {= "v0.18~preview.130.36+326"} - "textutils" {= "v0.18~preview.130.36+326"} + "async" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "async_unix" {= "v0.18~preview.130.55+197"} + "base_trie" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "core_unix" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_async" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_core" {= "v0.18~preview.130.55+197"} + "jsonaf" {= "v0.18~preview.130.55+197"} + "man_in_the_middle_debugger" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_optcomp" {= "v0.18~preview.130.55+197"} + "semantic_version" {= "v0.18~preview.130.55+197"} + "textutils" {= "v0.18~preview.130.55+197"} "angstrom" {>= "0.15.0"} "angstrom-async" {>= "0.15.0"} "bigstringaf" "dune" {>= "3.17.0"} "faraday" {>= "0.8.1"} - "re" {>= "1.8.0"} + "re" {= "1.14.0+ox"} ] available: arch != "arm32" & arch != "x86_32" synopsis: "OCaml bindings for the Neovim API" @@ -56,7 +56,7 @@ for your plugin. """ url { src: - "https://github.com/janestreet/vcaml/archive/e482aa2a7d7d3fa4328448a3c1ce208c56162dd3.tar.gz" + "https://github.com/janestreet/vcaml/archive/760ae1aa0879a9a1a08da6c4b432bc4f0de592e0.tar.gz" checksum: - "sha256=f503a194a03055f174bb5c868304f2d6b64e23fee118769f93fcce27a101f954" + "sha256=c1ab7a42dfa35d1f2597951dfdc8e38a1b9261fbbfccf8b45860aaf5d946e739" } diff --git a/packages/vec/vec.v0.18~preview.130.36+326/opam b/packages/vec/vec.v0.18~preview.130.55+197/opam similarity index 57% rename from packages/vec/vec.v0.18~preview.130.36+326/opam rename to packages/vec/vec.v0.18~preview.130.55+197/opam index a672789688..8aea6fe951 100644 --- a/packages/vec/vec.v0.18~preview.130.36+326/opam +++ b/packages/vec/vec.v0.18~preview.130.55+197/opam @@ -11,11 +11,11 @@ build: [ ] depends: [ "ocaml" {>= "5.2.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_for_loop" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "ppx_stable_witness" {= "v0.18~preview.130.36+326"} - "unboxed" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_for_loop" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "ppx_stable_witness" {= "v0.18~preview.130.55+197"} + "unboxed" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -25,7 +25,7 @@ Growable array. """ url { src: - "https://github.com/janestreet/vec/archive/cea8f29af75bb6db72d3b22fc5a3a1bb5bd5daba.tar.gz" + "https://github.com/janestreet/vec/archive/38e38c0322b71d564d361ddbcd29cbceb3bbc454.tar.gz" checksum: - "sha256=3dab4f7f06107a9cb757916b935d2e73dd72dac8165288b213eb7290cd960c8e" + "sha256=03815f2986e84d794b88f33ee04b64f17cf1cb26b814492c874a6831b5396580" } diff --git a/packages/versioned_polling_state_rpc/versioned_polling_state_rpc.v0.18~preview.130.36+326/opam b/packages/versioned_polling_state_rpc/versioned_polling_state_rpc.v0.18~preview.130.55+197/opam similarity index 69% rename from packages/versioned_polling_state_rpc/versioned_polling_state_rpc.v0.18~preview.130.36+326/opam rename to packages/versioned_polling_state_rpc/versioned_polling_state_rpc.v0.18~preview.130.55+197/opam index 759f56b0c9..07dd1fc9ed 100644 --- a/packages/versioned_polling_state_rpc/versioned_polling_state_rpc.v0.18~preview.130.36+326/opam +++ b/packages/versioned_polling_state_rpc/versioned_polling_state_rpc.v0.18~preview.130.55+197/opam @@ -13,11 +13,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "async_rpc_kernel" {= "v0.18~preview.130.36+326"} - "babel" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "polling_state_rpc" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "async_rpc_kernel" {= "v0.18~preview.130.55+197"} + "babel" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "polling_state_rpc" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "dune" {>= "3.17.0"} ] available: arch != "arm32" & arch != "x86_32" @@ -28,7 +28,7 @@ Helper functions for creating stable/versioned `Polling_state_rpc.t`s with babel """ url { src: - "https://github.com/janestreet/versioned_polling_state_rpc/archive/c48b70e947691e43b934a24da019e07376017e5c.tar.gz" + "https://github.com/janestreet/versioned_polling_state_rpc/archive/9fabbf3ec42936b9044e15e5a7e8070800674d2a.tar.gz" checksum: - "sha256=9065e396ff8f57ae8687120f0d879385eb49ea683b244615ed865fe1a75b926e" + "sha256=1bd508ff4a80690b0e96cc78d9b39e9eced201b2aa796be8052bb402f3bae511" } diff --git a/packages/virtual_dom/virtual_dom.v0.18~preview.130.36+326/opam b/packages/virtual_dom/virtual_dom.v0.18~preview.130.36+326/opam deleted file mode 100644 index 442484847b..0000000000 --- a/packages/virtual_dom/virtual_dom.v0.18~preview.130.36+326/opam +++ /dev/null @@ -1,42 +0,0 @@ -opam-version: "2.0" -maintainer: "Jane Street developers" -authors: ["Jane Street Group, LLC"] -homepage: "https://github.com/janestreet/virtual_dom" -bug-reports: "https://github.com/janestreet/virtual_dom/issues" -dev-repo: "git+https://github.com/janestreet/virtual_dom.git" -doc: - "https://ocaml.janestreet.com/ocaml-core/latest/doc/virtual_dom/index.html" -license: "MIT" -build: [ - ["dune" "build" "-p" name "-j" jobs] -] -depends: [ - "ocaml" {>= "5.1.0"} - "async_kernel" {= "v0.18~preview.130.36+326"} - "base" {= "v0.18~preview.130.36+326"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "sexplib" {= "v0.18~preview.130.36+326"} - "stdio" {= "v0.18~preview.130.36+326"} - "base64" {>= "3.4.0"} - "dune" {>= "3.17.0"} - "gen_js_api" {= "1.1.2+ox"} - "js_of_ocaml" {= "6.0.1+ox"} - "js_of_ocaml-ppx" {= "6.0.1+ox"} - "lambdasoup" {>= "0.6.3"} - "tyxml" {>= "4.3.0"} - "uri" {>= "3.0.0"} -] -available: arch != "arm32" & arch != "x86_32" -synopsis: "OCaml bindings for the virtual-dom library" -description: """ -The library itself may be found at -https://github.com/Matt-Esch/virtual-dom. -""" -url { - src: - "https://github.com/janestreet/virtual_dom/archive/45aa06a95ec58a8c761d7c9abda28e5a1228b63d.tar.gz" - checksum: - "sha256=8299dc803644fdf154721054c0a25984dc589f88ca18a191cf8aed5d87a5ee96" -} diff --git a/packages/virtual_dom/virtual_dom.v0.18~preview.130.55+197/opam b/packages/virtual_dom/virtual_dom.v0.18~preview.130.55+197/opam new file mode 100644 index 0000000000..2125c3e51d --- /dev/null +++ b/packages/virtual_dom/virtual_dom.v0.18~preview.130.55+197/opam @@ -0,0 +1,44 @@ +opam-version: "2.0" +maintainer: "Jane Street developers" +authors: ["Jane Street Group, LLC"] +homepage: "https://github.com/janestreet/virtual_dom" +bug-reports: "https://github.com/janestreet/virtual_dom/issues" +dev-repo: "git+https://github.com/janestreet/virtual_dom.git" +doc: + "https://ocaml.janestreet.com/ocaml-core/latest/doc/virtual_dom/index.html" +license: "MIT" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" {>= "5.1.0"} + "async" {= "v0.18~preview.130.55+197"} + "async_kernel" {= "v0.18~preview.130.55+197"} + "base" {= "v0.18~preview.130.55+197"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "expect_test_helpers_async" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "sexplib" {= "v0.18~preview.130.55+197"} + "stdio" {= "v0.18~preview.130.55+197"} + "base64" {>= "3.4.0"} + "dune" {>= "3.17.0"} + "gen_js_api" {= "1.1.2+ox"} + "js_of_ocaml" {= "6.0.1+ox"} + "js_of_ocaml-ppx" {= "6.0.1+ox"} + "lambdasoup" {>= "0.6.3"} + "tyxml" {>= "4.3.0"} + "uri" {>= "3.0.0"} +] +available: arch != "arm32" & arch != "x86_32" +synopsis: "OCaml bindings for the virtual-dom library" +description: """ +The library itself may be found at +https://github.com/Matt-Esch/virtual-dom. +""" +url { + src: + "https://github.com/janestreet/virtual_dom/archive/cf26faae62cd34ea0bd8eaebb63e2a61a86de653.tar.gz" + checksum: + "sha256=5369b5deb663076605c78f03406613ccda9b8bcc194cc8839999a396d5ca9bda" +} diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch index 1518edcaf2..2ad0a64b33 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.2.0-compiler-changes.patch @@ -1,22 +1,40 @@ +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -1075,6 +1075,13 @@ + | NativeInt i -> + let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in + return (Const, e) ++ | Null -> ++ let* var = ++ register_import ++ ~name:"null" ++ (Global { mut = false; typ = Type.value }) ++ in ++ return (Const, W.GlobalGet var) + + let translate c = + let* const, c = translate_rec c in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -333,6 +333,7 @@ +@@ -329,6 +329,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (* Native int are 32bit on all known backend *) | Tuple of int * constant array * array_or_not + | Null - + module Constant = struct type t = constant -@@ -360,6 +361,7 @@ - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) - | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -361,6 +362,9 @@ + b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Null, Null -> Some true | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None | Int _, Float32 _ | Float32 _, Int _ -> None -@@ -405,6 +407,7 @@ +@@ -409,6 +413,7 @@ | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> Some false @@ -24,44 +42,37 @@ (* Note: the following cases should not occur when compiling to Javascript *) | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) -@@ -524,6 +527,7 @@ +@@ -529,6 +534,7 @@ constant f a.(i) done; Format.fprintf f ")") + | Null -> Format.fprintf f "null" - + let arg f a = match a with -@@ -885,7 +889,7 @@ - | `Wasm -> true - | _ -> false) - | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ -- | Tuple (_, _, _) -> () -+ | Tuple (_, _, _) | Null -> () - in - let check_prim_arg = function - | Pc c -> check_constant c --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -179,6 +179,7 @@ +@@ -151,6 +151,7 @@ | Int64 of Int64.t | NativeInt of Int32.t (** Only produced when compiling to WebAssembly. *) | Tuple of int * constant array * array_or_not + | Null - + module Constant : sig type t = constant --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -255,6 +255,7 @@ +@@ -458,7 +458,8 @@ | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) +- | Int _, Float _ | Float _, Int _ -> None + | Null, Null -> Some true - | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None ++ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None (* All other values may be distinct objects and thus different by [caml_js_equals]. *) | String _, _ -@@ -270,7 +271,9 @@ + | _, String _ +@@ -473,7 +474,9 @@ | NativeInt _, _ | _, NativeInt _ | Tuple _, _ @@ -69,46 +80,43 @@ + | _, Tuple _ + | Null, _ + | _, Null -> None - - let eval_instr ~target info ((x, loc) as i) = - match x with -@@ -408,6 +411,7 @@ + + (* [eval_prim] does not distinguish the two constants *) + let constant_equal a b = +@@ -486,10 +489,11 @@ + | Int32 a, Int32 b -> Int32.equal a b + | NativeInt a, NativeInt b -> Int32.equal a b + | Int64 a, Int64 b -> Int64.equal a b ++ | Null, Null -> true + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ (fun x -> match Flow.Info.def info x with | Some (Constant (Int x)) -> if Targetint.is_zero x then Zero else Non_zero + | Some (Constant Null) -> Zero | Some (Constant - ( Int32 _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -371,11 +371,12 @@ - | NativeInt _, NativeInt _, `Wasm -> - false (* [NativeInt]s are boxed in Wasm and are possibly different objects *) - | NativeInt _, NativeInt _, `JavaScript -> assert false -+ | Null, Null, _ -> true - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _ | Null), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - + ( Int32 _ --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -497,6 +497,7 @@ +@@ -524,6 +524,7 @@ + Mlvalue.Block.make ~tag ~args:l, instrs) | Int i -> targetint i, instrs - | Int32 i | NativeInt i -> - J.ENum (J.Num.of_targetint (Targetint.of_int32_exn i)), instrs + | Int32 i | NativeInt i -> targetint (Targetint.of_int32_exn i), instrs + | Null -> s_var "null", instrs - + let constant ~ctx x level = let expr, instr = constant_rec ~ctx x level [] in --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -45,9 +45,7 @@ +@@ -36,9 +36,7 @@ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> let l = Array.of_list (List.map l ~f:constant_of_const) in Tuple (tag, l, Unknown) @@ -116,15 +124,17 @@ - - failwith "[Const_null] not supported in JavaScript yet." + | Const_null -> Null - - let rec find_loc_in_summary ident' = function - | Env.Env_empty -> None + + module Symtable = struct + (* Copied from ocaml/bytecomp/symtable.ml *) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -479,8 +479,14 @@ - - let ident_f32 = ident_of_custom (Obj.repr 0.s) - +@@ -471,8 +471,16 @@ + + let ident_native = ident_of_custom (Obj.repr 0n) + ++ let ident_f32 = ident_of_custom (Obj.repr 0.s) ++ + external is_null : Obj.t -> bool = "%is_null" + + let is_null obj = is_null (Sys.opaque_identity obj) @@ -137,131 +147,85 @@ then let tag = Obj.tag x in if tag = Obj.string_tag -@@ -528,6 +534,7 @@ - | Tuple _ -> false - | Int _ -> true - | Int32 _ | NativeInt _ -> false +@@ -523,6 +531,7 @@ + match target with + | `JavaScript -> true + | `Wasm -> false) + | Null -> true end - + let const32 i = Constant (Int (Targetint.of_int32_exn i)) -@@ -2960,9 +2967,6 @@ +@@ -2877,9 +2886,6 @@ } - + let constant_of_const x = Ocaml_compiler.constant_of_const x - [@@if ocaml_version < (5, 1, 0)] - - let constant_of_const x = Constants.parse x [@@if ocaml_version >= (5, 1, 0)] - + (* We currently rely on constants to be relocated before globals. *) let step1 t compunit code = ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -1068,6 +1068,13 @@ - | NativeInt i -> - let* e = Memory.make_int32 ~kind:`Nativeint (return (W.Const (I32 i))) in - return (Const, e) -+ | Null -> -+ let* var = -+ register_import -+ ~name:"null" -+ (Global { mut = false; typ = Type.value }) -+ in -+ return (Const, W.GlobalGet var) - - let translate c = - let* const, c = translate_rec c in ---- a/compiler/tests-ocaml/lib-atomic/test_atomic.ml -+++ b/compiler/tests-ocaml/lib-atomic/test_atomic.ml -@@ -1,39 +1,39 @@ - (* TEST *) - --let r = Atomic.make 1 --let () = assert (Atomic.get r = 1) -+let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 1 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 1) - --let () = Atomic.set r 2 --let () = assert (Atomic.get r = 2) -+let () = (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r 2 -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 2) - --let () = assert (Atomic.exchange r 3 = 2) -+let () = assert ((Atomic.exchange [@ocaml.alert "-unsafe_multidomain"]) r 3 = 2) - --let () = assert (Atomic.compare_and_set r 3 4 = true) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = true) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert (Atomic.compare_and_set r 3 (-4) = false) --let () = assert (Atomic.get r = 4 ) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 (-4) = false) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4 ) - --let () = assert (Atomic.compare_and_set r 3 4 = false) -+let () = assert ((Atomic.compare_and_set [@ocaml.alert "-unsafe_multidomain"]) r 3 4 = false) - - let () = assert (Atomic.fetch_and_add r 2 = 4) --let () = assert (Atomic.get r = 6) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 6) - - let () = assert (Atomic.fetch_and_add r (-2) = 6) --let () = assert (Atomic.get r = 4) -+let () = assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = 4) - --let () = assert ((Atomic.incr r; Atomic.get r) = 5) -+let () = assert ((Atomic.incr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 5) - --let () = assert ((Atomic.decr r; Atomic.get r) = 4) -+let () = assert ((Atomic.decr r; (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r) = 4) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -- ignore (Atomic.set r (cur + 1), Atomic.set r (cur - 1)); -- assert (Atomic.get r <> cur) -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in -+ ignore ((Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur + 1), (Atomic.set [@ocaml.alert "-unsafe_multidomain"]) r (cur - 1)); -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r <> cur) - - let () = -- let r = Atomic.make 0 in -- let cur = Atomic.get r in -+ let r = (Atomic.make [@ocaml.alert "-unsafe_multidomain"]) 0 in -+ let cur = (Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r in - ignore (Atomic.incr r, Atomic.decr r); -- assert (Atomic.get r = cur) -+ assert ((Atomic.get [@ocaml.alert "-unsafe_multidomain"]) r = cur) --- a/lib/js_of_ocaml/js.ml +++ b/lib/js_of_ocaml/js.ml @@ -813,7 +813,7 @@ if isNaN s then failwith "parseFloat" else s - + let _ = - Printexc.register_printer (fun e -> + (Printexc.register_printer [@ocaml.alert "-unsafe_multidomain"]) (fun e -> if instanceof (Obj.magic e : < .. > t) error_constr then - let e = Js_error.of_error (Obj.magic e : error t) in[] + let e = Js_error.of_error (Obj.magic e : error t) in --- a/lib/runtime/jsoo_runtime.ml +++ b/lib/runtime/jsoo_runtime.ml -@@ -162,7 +162,7 @@ - +@@ -175,7 +175,7 @@ + exception Exn of t - + - let _ = Callback.register_exception "jsError" (Exn (Obj.magic [||])) + let _ = (Callback.register_exception [@ocaml.alert "-unsafe_multidomain"]) "jsError" (Exn (Obj.magic [||])) - - let raise_ : t -> 'a = Js.js_expr "(function (exn) { throw exn })" - + + external raise_ : t -> 'a = "caml_throw_js_exception" + +--- a/runtime/js/compare.js ++++ b/runtime/js/compare.js +@@ -18,6 +18,7 @@ + //Provides: caml_compare_val_tag + //Requires: caml_is_ml_string, caml_is_ml_bytes + function caml_compare_val_tag(a) { ++ if (a === null) return 1010; // null_tag + if (typeof a === "number") + return 1000; // int_tag (we use it for all numbers) + else if (caml_is_ml_bytes(a)) +@@ -93,6 +94,13 @@ + + // tags are different + if (tag_a !== tag_b) { ++ if (tag_a === 1010) { ++ // Null is less than anything else ++ return -1; ++ } ++ if (tag_b === 1010) { ++ return 1; ++ } + if (tag_a === 1000) { + if (tag_b === 1255) { + //immediate can compare against custom +@@ -193,6 +201,8 @@ + if (!Number.isNaN(b)) return -1; + } + break; ++ case 1010: // Null pointer ++ return 0; + case 1001: // The rest + // Here we can be in the following cases: + // 1. JavaScript primitive types --- a/runtime/js/domain.js +++ b/runtime/js/domain.js -@@ -36,6 +36,13 @@ +@@ -41,6 +41,13 @@ return 0; } - + +//Provides: caml_atomic_compare_exchange +function caml_atomic_compare_exchange(ref, o, n) { + var old = ref[1]; @@ -270,12 +234,12 @@ +} + //Provides: caml_atomic_fetch_add + //Version: >= 5 function caml_atomic_fetch_add(ref, i) { - var old = ref[1]; -@@ -43,6 +50,41 @@ +@@ -49,6 +56,41 @@ return old; } - + +//Provides: caml_atomic_add +function caml_atomic_add(ref, i) { + var old = ref[1]; @@ -312,8 +276,8 @@ +} + //Provides: caml_atomic_exchange + //Version: >= 5 function caml_atomic_exchange(ref, v) { - var r = ref[1]; --- a/runtime/js/marshal.js +++ b/runtime/js/marshal.js @@ -44,6 +44,7 @@ @@ -322,9 +286,9 @@ CODE_CUSTOM_FIXED: 0x19, + CODE_NULL: 0x1f }; - + //Provides: UInt8ArrayReader -@@ -539,6 +540,8 @@ +@@ -492,6 +493,8 @@ } if (intern_obj_table) intern_obj_table[obj_counter++] = v; return v; @@ -333,9 +297,9 @@ default: caml_failwith("input_value: ill-formed message"); } -@@ -742,7 +745,9 @@ +@@ -684,7 +687,9 @@ } - + function extern_rec(v) { - if (v.caml_custom) { + if (v === null) { @@ -346,7 +310,7 @@ var ops = caml_custom_ops[name]; --- a/runtime/js/obj.js +++ b/runtime/js/obj.js -@@ -46,7 +46,8 @@ +@@ -41,7 +41,8 @@ //Provides: caml_obj_tag //Requires: caml_is_ml_bytes, caml_is_ml_string function caml_obj_tag(x) { @@ -355,8 +319,8 @@ + else if (Array.isArray(x) && x[0] === x[0] >>> 0) return x[0]; else if (caml_is_ml_bytes(x)) return 252; else if (caml_is_ml_string(x)) return 252; - else if (x instanceof Function || typeof x == "function") return 247; -@@ -272,3 +273,16 @@ + else if (x instanceof Function || typeof x === "function") return 247; +@@ -244,3 +245,16 @@ function caml_custom_identifier(o) { return caml_string_of_jsstring(o.caml_custom); } @@ -373,12 +337,36 @@ +function caml_is_null(o) { + return o === null; +} +--- a/runtime/wasm/compare.wat ++++ b/runtime/wasm/compare.wat +@@ -25,6 +25,7 @@ + (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) + (import "obj" "caml_is_closure" + (func $caml_is_closure (param (ref eq)) (result i32))) ++ (import "obj" "null" (global $null (ref eq))) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param (ref eq)))) + (import "effect" "caml_is_continuation" +@@ -238,6 +239,13 @@ + (if (local.get $total) + (then + (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) ++ (if (ref.eq (local.get $v1) (global.get $null)) ++ (then ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 0))) ++ (else (return (i32.const -1)))))) ++ (if (ref.eq (local.get $v2) (global.get $null)) ++ (then (return (i32.const 1)))) + (drop (block $v1_is_not_int (result (ref eq)) + (local.set $i1 + (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) --- a/runtime/wasm/domain.wat +++ b/runtime/wasm/domain.wat -@@ -34,6 +34,21 @@ +@@ -38,6 +38,21 @@ (else (ref.i31 (i32.const 0))))) - + + (func (export "caml_atomic_compare_exchange") + (param $ref (ref eq)) (param $o (ref eq)) (param $n (ref eq)) + (result (ref eq)) @@ -396,11 +384,11 @@ + (func (export "caml_atomic_load") (param (ref eq)) (result (ref eq)) (array.get $block (ref.cast (ref $block) (local.get 0)) (i32.const 1))) - -@@ -48,6 +63,61 @@ + +@@ -52,6 +67,61 @@ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) (local.get $old)) - + + (func (export "caml_atomic_add") + (param $ref (ref eq)) (param $i (ref eq)) (result (ref eq)) + (local $b (ref $block)) @@ -461,30 +449,29 @@ (local $b (ref $block)) --- a/runtime/wasm/obj.wat +++ b/runtime/wasm/obj.wat -@@ -86,6 +86,9 @@ +@@ -89,6 +89,9 @@ (field (ref $function_2)) (field (mut (ref null $cps_closure)))))) - + + (type $null (struct)) + (global $null (export "null") (ref eq) (struct.new $null)) + (global $forcing_tag i32 (i32.const 244)) (global $cont_tag (export "cont_tag") i32 (i32.const 245)) (global $lazy_tag (export "lazy_tag") i32 (i32.const 246)) -@@ -239,6 +242,8 @@ +@@ -243,6 +246,8 @@ (local.get $res)) - + (func (export "caml_obj_tag") (param $v (ref eq)) (result (ref eq)) + (if (ref.eq (local.get $v) (global.get $null)) + (then (return (ref.i31 (i32.const 1010))))) (if (ref.test (ref i31) (local.get $v)) (then (return (ref.i31 (i32.const 1000))))) (drop (block $not_block (result (ref eq)) -@@ -487,4 +492,20 @@ - (array.new_fixed $block 3 (ref.i31 (i32.const 0)) - (local.get $x) (local.get $y)) - (ref.as_non_null (global.get $caml_trampoline_ref)))))) --) +@@ -491,4 +496,22 @@ + (call $caml_callback_1 (local.get $f) (local.get $x)) + (local.get $y))) + )) + + (func (export "caml_is_null") (param $x (ref eq)) (result (ref eq)) + (if (result (ref eq)) (ref.eq (local.get $x) (global.get $null)) @@ -501,61 +488,6 @@ + (call $caml_failwith + (array.new_data $bytes $int_as_pointer_not_implemented + (i32.const 0) (i32.const 35))) -+ (ref.i31 (i32.const 0)))))) ---- a/runtime/js/compare.js -+++ b/runtime/js/compare.js -@@ -18,6 +18,7 @@ - //Provides: caml_compare_val_tag - //Requires: caml_is_ml_string, caml_is_ml_bytes - function caml_compare_val_tag(a) { -+ if (a === null) return 1010; // null_tag - if (typeof a === "number") - return 1000; // int_tag (we use it for all numbers) - else if (caml_is_ml_bytes(a)) -@@ -93,6 +94,13 @@ - - // tags are different - if (tag_a !== tag_b) { -+ if (tag_a === 1010) { -+ // Null is less than anything else -+ return -1; -+ } -+ if (tag_b === 1010) { -+ return 1; -+ } - if (tag_a === 1000) { - if (tag_b === 1255) { - //immediate can compare against custom -@@ -193,6 +201,8 @@ - if (!Number.isNaN(b)) return -1; - } - break; -+ case 1010: // Null pointer -+ return 0; - case 1001: // The rest - // Here we can be in the following cases: - // 1. JavaScript primitive types ---- a/runtime/wasm/compare.wat -+++ b/runtime/wasm/compare.wat -@@ -25,6 +25,7 @@ - (func $caml_obj_tag (param (ref eq)) (result (ref eq)))) - (import "obj" "caml_is_closure" - (func $caml_is_closure (param (ref eq)) (result i32))) -+ (import "obj" "null" (global $null (ref eq))) - (import "fail" "caml_invalid_argument" - (func $caml_invalid_argument (param (ref eq)))) - (import "effect" "caml_is_continuation" -@@ -238,6 +239,13 @@ - (if (local.get $total) - (then - (br_if $next_item (ref.eq (local.get $v1) (local.get $v2))))) -+ (if (ref.eq (local.get $v1) (global.get $null)) -+ (then -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 0))) -+ (else (return (i32.const -1)))))) -+ (if (ref.eq (local.get $v2) (global.get $null)) -+ (then (return (i32.const 1)))) - (drop (block $v1_is_not_int (result (ref eq)) - (local.set $i1 - (br_on_cast_fail $v1_is_not_int (ref eq) (ref i31) ++ (ref.i31 (i32.const 0))))) ++ + ) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch index 43e4b69d0f..e69de29bb2 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-5.3-tests-runtime.patch @@ -1,84 +0,0 @@ ---- a/compiler/tests-ocaml/lib-list/test.ml -+++ b/compiler/tests-ocaml/lib-list/test.ml -@@ -64,7 +64,7 @@ - let hello = ['H';'e';'l';'l';'o'] in - let world = ['W';'o';'r';'l';'d';'!'] in - let hello_world = hello @ [' '] @ world in -- assert (List.take 5 hello_world = hello); -+ (* assert (List.take 5 hello_world = hello); - assert (List.take 3 [1; 2; 3; 4; 5] = [1; 2; 3]); - assert (List.take 3 [1; 2] = [1; 2]); - assert (List.take 3 [] = []); -@@ -83,7 +83,7 @@ - assert (List.drop_while (fun x -> x < 3) [1; 2; 3; 4; 5; 1; 2; 3] - = [3; 4; 5; 1; 2; 3]); - assert (List.drop_while (fun x -> x < 9) [1; 2; 3] = []); -- assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); -+ assert (List.drop_while (fun x -> x < 0) [1; 2; 3] = [1; 2; 3]); *) - assert (List.partition is_even [1; 2; 3; 4; 5] - = ([2; 4], [1; 3; 5])); - assert (List.partition_map string_of_even_or_int [1; 2; 3; 4; 5] ---- a/compiler/tests-ocaml/lib-queue/test.ml -+++ b/compiler/tests-ocaml/lib-queue/test.ml -@@ -137,11 +137,11 @@ - assert (Q.length q2 = 8); assert (Q.to_list q2 = [5; 6; 7; 8; 1; 2; 3; 4]); - ;; - --let () = -+(* let () = - let q = Q.create () in - Q.add 1 q; Q.drop q; assert (does_raise Q.drop q); - Q.add 2 q; Q.drop q; assert (does_raise Q.drop q); - assert (Q.length q = 0); --;; -+;; *) - - let () = print_endline "OK" ---- a/compiler/tests-ocaml/lib-hashtbl/hfun.expected -+++ b/compiler/tests-ocaml/lib-hashtbl/hfun.expected -@@ -8,19 +8,19 @@ - 2^30-1 23c392d0 - -2^30 0c66fde3 - -- Floats: --+0.0 0f478b8c ---0.0 0f478b8c -++0.0 07be548a -+-0.0 07be548a - +infty 23ea56fb - -infty 059f7872 - NaN 3228858d - NaN#2 3228858d - NaN#3 3228858d - -- Native integers: --0 3f19274a -+0 07be548a - -1 3653e015 --42 3e33aef8 --2^30-1 3711bf46 ---2^30 2e71f39c -+42 1792870b -+2^30-1 23c392d0 -+-2^30 0c66fde3 - -- Lists: - [0..10] 0ade0fc9 - [0..12] 0ade0fc9 ---- a/compiler/tests-ocaml/lib-uchar/test.ml -+++ b/compiler/tests-ocaml/lib-uchar/test.ml -@@ -74,7 +74,7 @@ - let test_hash () = - let f u = - assert (Hashtbl.hash u = Uchar.hash u); -- assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) -+ (* assert (Hashtbl.seeded_hash 42 u = Uchar.seeded_hash 42 u) *) - in - List.iter (Fun.compose f Uchar.of_int) - [0x0000; 0x002D; 0x00E9; 0x062D; 0x2014; 0x1F349] -@@ -117,7 +117,7 @@ - test_to_char (); - test_equal (); - test_compare (); -- test_hash (); -+ (* test_hash (); *) - test_utf_decode (); - test_utf_x_byte_length (); - () diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch index 81cc808404..401b0473f1 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-add-unboxed-and-float-block.patch @@ -1,30 +1,25 @@ --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -31,22 +31,21 @@ +@@ -20,17 +20,16 @@ + + let rec constant_of_const c : Code.constant = let open Lambda in - let open Asttypes in match c with | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -- | Const_base (Const_int32 i) -> ( -+ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) - | `Wasm -> Int32 i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_int32 i) -> Int32 i - | Const_base (Const_int64 i) -> Int64 i +- | Const_base (Const_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i -- | Const_base (Const_nativeint i) -> ( -+ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_nativeint_warning_on_overflow i) - | `Wasm -> NativeInt (Int32.of_nativeint_warning_on_overflow i)) ++ | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) | Const_immstring s -> String s - | Const_float_array sl -> + | Const_float_array sl | Const_float_block sl -> - let l = List.map ~f:(fun f -> float_of_string f) sl in + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> + | Const_block (tag, l) -> diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch new file mode 100644 index 0000000000..d3ce2130c0 --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomic-cmpxchg.patch @@ -0,0 +1,41 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -216,6 +216,16 @@ + return 0; + } + ++//Provides: caml_atomic_compare_exchange_field ++//Version: >= 5 ++function caml_atomic_compare_exchange_field(ref, field, o, n) { ++ var old = ref[field + 1]; ++ if (old === o) { ++ ref[field + 1] = n; ++ } ++ return old; ++} ++ + //Provides: caml_atomic_set_field + //Version: >= 5 + function caml_atomic_set_field(ref, field, v) { +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -329,6 +329,19 @@ + (return (ref.i31 (i32.const 1))))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_atomic_compare_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)))) ++ (local.get $old)) ++ + (func (export "caml_atomic_exchange_field") + (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) + (local $b (ref $block)) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomics.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomics.patch new file mode 100644 index 0000000000..202c01205d --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-atomics.patch @@ -0,0 +1,238 @@ +--- a/runtime/js/domain.js ++++ b/runtime/js/domain.js +@@ -99,6 +99,14 @@ + return r; + } + ++//Provides: caml_atomic_set ++//Version: >= 5 ++function caml_atomic_set(ref, v) { ++ var r = ref[1]; ++ ref[1] = v; ++ return 0; ++} ++ + //Provides: caml_atomic_make_contended + //Version: >= 5.2 + function caml_atomic_make_contended(a) { +@@ -175,3 +183,78 @@ + function caml_ml_domain_cpu_relax(unit) { + return 0; + } ++ ++//Provides: caml_atomic_load_field ++//Version: >= 5 ++function caml_atomic_load_field(ref, field) { ++ return ref[field + 1]; ++} ++ ++//Provides: caml_atomic_add_field ++//Version: >= 5 ++function caml_atomic_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return 0; ++} ++ ++//Provides: caml_atomic_fetch_add_field ++//Version: >= 5 ++function caml_atomic_fetch_add_field(ref, field, i) { ++ var old = ref[field + 1]; ++ ref[field + 1] += i; ++ return old; ++} ++ ++//Provides: caml_atomic_cas_field ++//Version: >= 5 ++function caml_atomic_cas_field(ref, field, o, n) { ++ if (ref[field + 1] === o) { ++ ref[field + 1] = n; ++ return 1; ++ } ++ return 0; ++} ++ ++//Provides: caml_atomic_set_field ++//Version: >= 5 ++function caml_atomic_set_field(ref, field, v) { ++ ref[field + 1] = v; ++ return 0; ++} ++ ++//Provides: caml_atomic_exchange_field ++//Version: >= 5 ++function caml_atomic_exchange_field(ref, field, v) { ++ var old = ref[field + 1]; ++ ref[field + 1] = v; ++ return old; ++} ++ ++//Provides: caml_atomic_sub_field ++//Version: >= 5 ++function caml_atomic_sub_field(ref, field, i) { ++ ref[field + 1] -= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_land_field ++//Version: >= 5 ++function caml_atomic_land_field(ref, field, i) { ++ ref[field + 1] &= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lor_field ++//Version: >= 5 ++function caml_atomic_lor_field(ref, field, i) { ++ ref[field + 1] |= i; ++ return 0; ++} ++ ++//Provides: caml_atomic_lxor_field ++//Version: >= 5 ++function caml_atomic_lxor_field(ref, field, i) { ++ ref[field + 1] ^= i; ++ return 0; ++} +--- a/runtime/wasm/domain.wat ++++ b/runtime/wasm/domain.wat +@@ -131,6 +131,15 @@ + (array.set $block (local.get $b) (i32.const 1) (local.get $v)) + (local.get $r)) + ++ (func (export "caml_atomic_set") ++ (param $ref (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $r (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $r (array.get $block (local.get $b) (i32.const 1))) ++ (array.set $block (local.get $b) (i32.const 1) (local.get $v)) ++ (ref.i31 (i32.const 0))) ++ + (func (export "caml_atomic_make_contended") + (param $v (ref eq)) (result (ref eq)) + (array.new_fixed $block 2 (ref.i31 (i32.const 0)) (local.get $v))) +@@ -220,4 +229,123 @@ + + (func (export "caml_ml_domain_cpu_relax") (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) ++ ++ ;; Atomic field operations ++ (func (export "caml_atomic_load_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (result (ref eq)) ++ (array.get $block ++ (ref.cast (ref $block) (local.get $ref)) ++ (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1)))) ++ ++ (func (export "caml_atomic_fetch_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_add_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.add (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_sub_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.sub (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_land_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.and (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.or (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_lxor_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) ++ (ref.i31 (i32.xor (i31.get_s (ref.cast (ref i31) (local.get $old))) ++ (i31.get_s (ref.cast (ref i31) (local.get $i)))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_cas_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $o (ref eq)) (param $n (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (if (ref.eq (local.get $old) (local.get $o)) ++ (then ++ (array.set $block (local.get $b) (local.get $idx) (local.get $n)) ++ (return (ref.i31 (i32.const 1))))) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_atomic_exchange_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local $old (ref eq)) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (local.set $old (array.get $block (local.get $b) (local.get $idx))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (local.get $old)) ++ ++ (func (export "caml_atomic_set_field") ++ (param $ref (ref eq)) (param $field (ref eq)) (param $v (ref eq)) (result (ref eq)) ++ (local $b (ref $block)) ++ (local $idx i32) ++ (local.set $b (ref.cast (ref $block) (local.get $ref))) ++ (local.set $idx (i32.add (i31.get_s (ref.cast (ref i31) (local.get $field))) (i32.const 1))) ++ (array.set $block (local.get $b) (local.get $idx) (local.get $v)) ++ (ref.i31 (i32.const 0))) + ) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch index 48c3a6fc3b..4e4c985cb6 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-compilation_unit-name.patch @@ -1,6 +1,6 @@ --- a/compiler/bin-js_of_ocaml/compile.ml +++ b/compiler/bin-js_of_ocaml/compile.ml -@@ -235,7 +235,7 @@ +@@ -311,7 +311,7 @@ sm in let output_partial @@ -11,48 +11,48 @@ code --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -213,16 +213,16 @@ +@@ -208,16 +208,16 @@ end - + module Cmo_format = struct - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + - let name (t : t) = t.cu_name [@@if ocaml_version < (5, 2, 0)] + let name (t : t) = t.cu_name |> Compilation_unit.name_as_string [@@if ocaml_version < (5, 2, 0)] - + let name (t : t) = let (Compunit name) = t.cu_name in name [@@if ocaml_version >= (5, 2, 0)] - + - let requires (t : t) = List.map ~f:Ident.name t.cu_required_globals + let requires (t : t) = List.map ~f:Compilation_unit.name_as_string t.cu_required_globals [@@if ocaml_version < (5, 2, 0)] - + let requires (t : t) = List.map t.cu_required_compunits ~f:(fun (Compunit u) -> u) --- a/compiler/lib/ocaml_compiler.mli +++ b/compiler/lib/ocaml_compiler.mli -@@ -55,7 +55,7 @@ +@@ -53,7 +53,7 @@ end - + module Cmo_format : sig - type t = Cmo_format.compilation_unit + type t = Cmo_format.compilation_unit_descr - + val name : t -> string - + @@ -65,5 +65,5 @@ - + val force_link : t -> bool - + - val imports : t -> (string * string option) list + val imports : t -> Import_info.t array end --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -2633,8 +2633,10 @@ - +@@ -2593,8 +2593,10 @@ + let read_crcs toc ic = ignore (seek_section toc ic "CRCS"); - let orig_crcs : (string * Digest.t option) list = input_value ic in @@ -61,10 +61,10 @@ + List.map (Array.to_list orig_crcs) ~f:(fun import -> + Import_info.name import |> Compilation_unit.Name.to_string, + Import_info.crc import) - + let read_prim toc ic = let prim_size = seek_section toc ic "PRIM" in -@@ -3096,7 +3098,7 @@ +@@ -3042,7 +3044,7 @@ then raise Magic_number.(Bad_magic_version magic); let compunit_pos = input_binary_int ic in seek_in ic compunit_pos; @@ -72,10 +72,10 @@ + let compunit : Cmo_format.compilation_unit_descr = input_value ic in `Cmo compunit | `Cma -> - if Config.Flag.check_magic () + if --- a/compiler/lib/parse_bytecode.mli +++ b/compiler/lib/parse_bytecode.mli -@@ -65,7 +65,7 @@ +@@ -58,7 +58,7 @@ ?includes:string list -> ?include_cmis:bool -> ?debug:bool @@ -83,34 +83,35 @@ + -> Cmo_format.compilation_unit_descr -> in_channel -> one - -@@ -79,7 +79,7 @@ - + +@@ -72,7 +72,7 @@ + val from_channel : in_channel - -> [ `Cmo of Cmo_format.compilation_unit | `Cma of Cmo_format.library | `Exe ] + -> [ `Cmo of Cmo_format.compilation_unit_descr | `Cma of Cmo_format.library | `Exe ] - + val from_string : - prims:string array + prims:string array -> debug:Instruct.debug_event list array -> string -> Code.program --- a/compiler/lib/unit_info.ml +++ b/compiler/lib/unit_info.ml -@@ -37,7 +37,7 @@ +@@ -46,7 +46,7 @@ ; effects_without_cps = false } - + -let of_cmo (cmo : Cmo_format.compilation_unit) = +let of_cmo (cmo : Cmo_format.compilation_unit_descr) = let open Ocaml_compiler in - let provides = StringSet.singleton (Cmo_format.name cmo) in - let requires = StringSet.of_list (Cmo_format.requires cmo) in + (* A packed librariy register global for packed modules. *) + let provides = StringSet.of_list (Cmo_format.name cmo :: Cmo_format.provides cmo) in --- a/compiler/lib/unit_info.mli +++ b/compiler/lib/unit_info.mli -@@ -26,6 +26,6 @@ +@@ -28,7 +28,7 @@ ; effects_without_cps : bool } - + -val of_cmo : Cmo_format.compilation_unit -> t +val of_cmo : Cmo_format.compilation_unit_descr -> t - - val union : t -> t -> t + + val of_primitives : aliases:(string * string) list -> string list -> t + diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch index 9d342bdecc..5879719115 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-fix-build_fs.patch @@ -14,17 +14,6 @@ if(!globalThis.jsoo_fs_tmp) globalThis.jsoo_fs_tmp = []; globalThis.jsoo_fs_tmp.push({name:name,content:content}); } ---- a/compiler/tests-full/fs.expected.js -+++ b/compiler/tests-full/fs.expected.js -@@ -18,6 +18,8 @@ - function a(a, b){ - if(c.jsoo_create_file) - c.jsoo_create_file(a, b); -+ else if(c.caml_create_file) -+ c.caml_create_file(a, b); - else{ - if(! c.caml_fs_tmp) c.caml_fs_tmp = []; - c.caml_fs_tmp.push({name: a, content: b}); --- a/runtime/js/fs.js +++ b/runtime/js/fs.js @@ -318,7 +318,7 @@ diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-flipped-conditions-in-test.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-float32.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-float32.patch index d1712d15e0..ba11933537 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-float32.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-float32.patch @@ -6,8 +6,8 @@ ; ieee_754 + ; float32 ; int64 - ; internalMod ; ints + ; io --- a/compiler/lib-runtime-files/tests/all.ml +++ b/compiler/lib-runtime-files/tests/all.ml @@ -21,6 +21,7 @@ @@ -18,17 +18,7 @@ +format.js +fs.js +fs_fake.js -@@ -52,7 +53,8 @@ - +toplevel.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl runtime; - [%expect - {| -@@ -65,6 +67,7 @@ +@@ -64,6 +65,7 @@ +domain.js +effect.js +fail.js @@ -36,52 +26,91 @@ +format.js +fs.js +fs_fake.js -@@ -94,7 +97,8 @@ - +sys.js - +unix.js - +weak.js -- +zstd.js |}]; -+ +zstd.js -+ |}]; - printl extra; - [%expect {| - +dynlink.js +--- a/compiler/lib-wasm/gc_target.ml ++++ b/compiler/lib-wasm/gc_target.ml +@@ -170,6 +170,22 @@ + ] + }) + ++ let float32_type = ++ register_type "float32" (fun () -> ++ let* custom_operations = custom_operations_type in ++ let* custom = custom_type in ++ return ++ { supertype = Some custom ++ ; final = true ++ ; typ = ++ W.Struct ++ [ { mut = false ++ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) ++ } ++ ; { mut = false; typ = Value F32 } ++ ] ++ }) ++ + let int32_type = + register_type "int32" (fun () -> + let* custom_operations = custom_operations_type in +@@ -855,6 +871,18 @@ + in + if_mismatch + ++ let make_float32 e = ++ let* custom_operations = Type.custom_operations_type in ++ let* float32_ops = ++ register_import ++ ~name:"float32_ops" ++ (Global ++ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) ++ in ++ let* ty = Type.float32_type in ++ let* e = e in ++ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) ++ + let make_int32 ~kind e = + let* custom_operations = Type.custom_operations_type in + let* int32_ops = +@@ -1026,6 +1054,9 @@ + | Float f -> + let* ty = Type.float_type in + return (Const, W.StructNew (ty, [ Const (F64 (Int64.float_of_bits f)) ])) ++ | Float32 f -> ++ let* e = Memory.make_float32 (return (W.Const (F32 (Int64.float_of_bits f)))) in ++ return (Const, e) + | Float_array l -> + let l = Array.to_list l in + let* ty = Type.float_array_type in --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml -@@ -326,6 +326,7 @@ +@@ -260,6 +260,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t -@@ -358,8 +359,10 @@ - | NativeInt a, NativeInt b -> Some (Int32.equal a b) - | Float_array a, Float_array b -> Some (Array.equal Float.ieee_equal a b) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) +@@ -300,6 +301,7 @@ + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) | String _, NativeString _ | NativeString _, String _ -> None | Int _, Float _ | Float _, Int _ -> None + | Int _, Float32 _ | Float32 _, Int _ -> None | Tuple ((0 | 254), _, _), Float_array _ -> None | Float_array _, Tuple ((0 | 254), _, _) -> None | ( Tuple _ -@@ -369,7 +372,7 @@ - | Int _ +@@ -310,6 +312,7 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Float_array _ ) ) -> Some false | ( Float_array _ , ( String _ -@@ -378,13 +381,13 @@ - | Int _ +@@ -319,12 +322,13 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ ) ) -> Some false | ( String _ - , (Int64 _ | Int _ | Int32 _ | NativeInt _ | Float _ | Tuple _ | Float_array _) ) -> @@ -93,12 +122,11 @@ Some false | ( Int64 _ , ( String _ -@@ -392,10 +395,12 @@ - | Int _ +@@ -333,9 +337,12 @@ | Int32 _ | NativeInt _ -- | Float _ -+ | Float _ | Float32 _ + | Float _ ++ | Float32 _ | Tuple _ | Float_array _ ) ) -> Some false - | Float _, (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) -> @@ -108,7 +136,7 @@ Some false | ( (Int _ | Int32 _ | NativeInt _) , (String _ | NativeString _ | Float_array _ | Int64 _ | Tuple (_, _, _)) ) -> -@@ -404,8 +409,8 @@ +@@ -344,8 +351,8 @@ | Int _, (Int32 _ | NativeInt _) | Int32 _, (Int _ | NativeInt _) | NativeInt _, (Int _ | Int32 _) @@ -119,49 +147,54 @@ end type loc = -@@ -491,6 +496,7 @@ +@@ -432,6 +439,7 @@ | NativeString (Byte s) -> Format.fprintf f "%Sj" s | NativeString (Utf (Utf8 s)) -> Format.fprintf f "%Sj" s - | Float fl -> Format.fprintf f "%.12g" fl -+ | Float32 fl -> Format.fprintf f "%.9g" fl + | Float fl -> Format.fprintf f "%.12g" (Int64.float_of_bits fl) ++ | Float32 fl -> Format.fprintf f "%.9g" (Int64.float_of_bits fl) | Float_array a -> Format.fprintf f "[|"; for i = 0 to Array.length a - 1 do -@@ -878,7 +884,7 @@ - match target with - | `Wasm -> true - | _ -> false) -- | String _ | NativeString _ | Float _ | Float_array _ | Int _ | Int64 _ -+ | String _ | NativeString _ | Float _ | Float32 _ | Float_array _ | Int _ | Int64 _ - | Tuple (_, _, _) -> () - in - let check_prim_arg = function --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli -@@ -172,6 +172,7 @@ +@@ -148,6 +148,7 @@ | String of string | NativeString of Native_string.t - | Float of float -+ | Float32 of float - | Float_array of float array + | Float of Int64.t ++ | Float32 of Int64.t + | Float_array of Int64.t array | Int of Targetint.t | Int32 of Int32.t (** Only produced when compiling to WebAssembly. *) --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml -@@ -251,9 +251,11 @@ - match a, b with +@@ -452,6 +452,9 @@ | Int i, Int j -> Some (Targetint.equal i j) - | Float a, Float b -> Some (Float.ieee_equal a b) -+ | Float32 a, Float32 b -> Some (Float.ieee_equal a b) + | Float a, Float b -> + Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) ++ | Float32 a, Float32 b -> ++ Some (Float.ieee_equal (Int64.float_of_bits a) (Int64.float_of_bits b)) + | Float32 _, Float _ | Float _, Float32 _ -> None | NativeString a, NativeString b -> Some (Native_string.equal a b) | String a, String b when Config.Flag.use_js_string () -> Some (String.equal a b) -- | Int _, Float _ | Float _, Int _ -> None -+ | Int _, (Float _ | Float32 _) | (Float _ | Float32 _), Int _ -> None - (* All other values may be distinct objects and thus different by [caml_js_equals]. *) - | String _, _ - | _, String _ -@@ -413,6 +415,7 @@ + | Int _, Float _ | Float _, Int _ -> None +@@ -476,6 +479,7 @@ + match a, b with + | Int i, Int j -> Targetint.equal i j + | Float a, Float b -> Int64.equal a b ++ | Float32 a, Float32 b -> Int64.equal a b + | NativeString a, NativeString b -> Native_string.equal a b + | String a, String b -> String.equal a b + | Int32 a, Int32 b -> Int32.equal a b +@@ -484,7 +488,7 @@ + (* We don't need to compare other constants, so let's just return false. *) + | Tuple _, Tuple _ -> false + | Float_array _, Float_array _ -> false +- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _ -> false ++ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _ -> false + | (String _ | NativeString _), _ -> false + | (Float_array _ | Tuple _), _ -> false + +@@ -689,6 +693,7 @@ ( Int32 _ | NativeInt _ | Float _ @@ -169,30 +202,9 @@ | Tuple _ | String _ | NativeString _ ---- a/compiler/lib/flow.ml -+++ b/compiler/lib/flow.ml -@@ -354,7 +354,9 @@ - match a, b, target with - | Int i, Int j, _ -> Targetint.equal i j - | Float a, Float b, `JavaScript -> Float.bitwise_equal a b -+ | Float32 a, Float32 b, `JavaScript -> Float.bitwise_equal a b - | Float _, Float _, `Wasm -> false -+ | Float32 _, Float32 _, `Wasm -> false - | NativeString a, NativeString b, `JavaScript -> Native_string.equal a b - | NativeString _, NativeString _, `Wasm -> - false -@@ -373,7 +375,7 @@ - | Int64 _, Int64 _, _ -> false - | Tuple _, Tuple _, _ -> false - | Float_array _, Float_array _, _ -> false -- | (Int _ | Float _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false -+ | (Int _ | Float _ | Float32 _ | Int64 _ | Int32 _ | NativeInt _), _, _ -> false - | (String _ | NativeString _), _, _ -> false - | (Float_array _ | Tuple _), _, _ -> false - --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml -@@ -438,6 +438,7 @@ +@@ -466,6 +466,7 @@ | Byte x -> Share.get_byte_string str_js_byte x ctx.Ctx.share, instrs | Utf (Utf8 x) -> Share.get_utf_string str_js_utf8 x ctx.Ctx.share, instrs) | Float f -> float_const f, instrs @@ -200,7 +212,7 @@ | Float_array a -> ( Mlvalue.Array.make ~tag:Obj.double_array_tag -@@ -964,6 +965,13 @@ +@@ -1215,6 +1216,13 @@ register_bin_prim "caml_le_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Le, cx, cy))); register_bin_prim "caml_gt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cy, cx))); register_bin_prim "caml_lt_float" `Pure (fun cx cy _ -> bool (J.EBin (J.Lt, cx, cy))); @@ -216,171 +228,38 @@ register_bin_prim "caml_mul_float" `Pure (fun cx cy _ -> J.EBin (J.Mul, cx, cy)); --- a/compiler/lib/ocaml_compiler.ml +++ b/compiler/lib/ocaml_compiler.ml -@@ -25,7 +25,8 @@ +@@ -24,7 +24,8 @@ + | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) - | ((Const_base (Const_string (s, _))) [@if ocaml_version < (4, 11, 0)]) - | ((Const_base (Const_string (s, _, _))) [@if ocaml_version >= (4, 11, 0)]) -> String s -- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (float_of_string s) -+ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 Float32.(of_string s |> to_float) -+ | Const_base (Const_float s | Const_unboxed_float s) -> Float (float_of_string s) - | Const_base (Const_int32 i | Const_unboxed_int32 i) -> ( - match Config.target () with - | `JavaScript -> Int (Targetint.of_int32_warning_on_overflow i) + | Const_base (Const_string (s, _, _)) -> String s +- | Const_base (Const_float32 s | Const_unboxed_float32 s | Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -477,6 +477,8 @@ - - let ident_native = ident_of_custom (Obj.repr 0n) - -+ let ident_f32 = ident_of_custom (Obj.repr 0.s) -+ - let rec parse x = - if Obj.is_block x - then -@@ -490,6 +492,8 @@ +@@ -481,6 +481,8 @@ else if tag = Obj.custom_tag then match ident_of_custom x with + | Some name when same_ident name ident_f32 -> -+ Float32 ((Obj.magic x : float32) |> Float32.to_float) - | Some name when same_ident name ident_32 -> ( ++ Float32 (Int64.bits_of_float (Obj.magic x : float)) + | Some name when same_ident name ident_32 -> let i : int32 = Obj.magic x in - match Config.target () with -@@ -518,6 +522,7 @@ - let inlined = function + Int32 i +@@ -506,6 +508,7 @@ + match c with | String _ | NativeString _ -> false | Float _ -> true + | Float32 _ -> true | Float_array _ -> false | Int64 _ -> false | Tuple _ -> false ---- a/compiler/lib/stdlib.ml -+++ b/compiler/lib/stdlib.ml -@@ -417,6 +417,17 @@ - external ( >= ) : t -> t -> bool = "%greaterequal" - end - -+module Float32 = struct -+ type t = float32 -+ -+ external of_float : float -> t = "%float32offloat" -+ external to_float : t -> float = "%floatoffloat32" -+ -+ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. -+ This is not equivalent to native code, which parses to 32 bits directly. *) -+ let of_string s = float_of_string s |> of_float -+end -+ - module Bool = struct - external ( <> ) : bool -> bool -> bool = "%notequal" - ---- a/compiler/lib-wasm/gc_target.ml -+++ b/compiler/lib-wasm/gc_target.ml -@@ -170,6 +170,22 @@ - ] - }) - -+ let float32_type = -+ register_type "float32" (fun () -> -+ let* custom_operations = custom_operations_type in -+ let* custom = custom_type in -+ return -+ { supertype = Some custom -+ ; final = true -+ ; typ = -+ W.Struct -+ [ { mut = false -+ ; typ = Value (Ref { nullable = false; typ = Type custom_operations }) -+ } -+ ; { mut = false; typ = Value F32 } -+ ] -+ }) -+ - let int32_type = - register_type "int32" (fun () -> - let* custom_operations = custom_operations_type in -@@ -853,6 +869,18 @@ - in - if_mismatch - -+ let make_float32 e = -+ let* custom_operations = Type.custom_operations_type in -+ let* float32_ops = -+ register_import -+ ~name:"float32_ops" -+ (Global -+ { mut = false; typ = Ref { nullable = false; typ = Type custom_operations } }) -+ in -+ let* ty = Type.float32_type in -+ let* e = e in -+ return (W.StructNew (ty, [ GlobalGet float32_ops; e ])) -+ - let make_int32 ~kind e = - let* custom_operations = Type.custom_operations_type in - let* int32_ops = -@@ -1023,6 +1051,9 @@ - | Float f -> - let* ty = Type.float_type in - return (Const, W.StructNew (ty, [ Const (F64 f) ])) -+ | Float32 f -> -+ let* e = Memory.make_float32 (return (W.Const (F32 f))) in -+ return (Const, e) - | Float_array l -> - let l = Array.to_list l in - let* ty = Type.float_array_type in ---- /dev/null -+++ b/compiler/tests-jsoo/test_marshal_float32.ml -@@ -0,0 +1,47 @@ -+ -+(* In javascript, float32s are represented as floats. -+ In native code and wasm, float32s are custom blocks containing a float32 field. *) -+ -+external float_of_float32 : float32 -> float = "%floatoffloat32" -+ -+type float64s = { a : float; b : float } -+ -+let%expect_test "float64 javascript" [@tags "js-only", "no-wasm"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\n\000\000\000\001\000\000\000\003\000\000\000\003\b\000\000\b\254\000{\001\001\200" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+let%expect_test "float64 wasm" [@tags "wasm-only"] = -+ let f64 = Marshal.to_string { a = 123.; b = 456. } [] in -+ Printf.printf "%S" f64; -+ [%expect -+ {| "\132\149\166\190\000\000\000\018\000\000\000\001\000\000\000\005\000\000\000\003\014\002\000\000\000\000\000\192^@\000\000\000\000\000\128|@" |}]; -+ let f64 : float64s = Marshal.from_string f64 0 in -+ Printf.printf "%f %f" f64.a f64.b; -+ [%expect -+ {| 123.000000 456.000000 |}] -+ -+type float32s = { a : float32; b : float32 } -+ -+let%expect_test "float32 javascript" [@tags "js-only", "no-wasm"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\006\000\000\000\001\000\000\000\003\000\000\000\003\160\000{\001\001\200" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] -+ -+let%expect_test "float32 wasm" [@tags "wasm-only"] = -+ let f32 = Marshal.to_string { a = 123.s; b = 456.s } [] in -+ Printf.printf "%S" f32; -+ [%expect -+ {| "\132\149\166\190\000\000\000\021\000\000\000\003\000\000\000\t\000\000\000\t\160\025_f32\000B\246\000\000\025_f32\000C\228\000\000" |}]; -+ let f32 : float32s = Marshal.from_string f32 0 in -+ Printf.printf "%f %f" (float_of_float32 f32.a) (float_of_float32 f32.b); -+ [%expect {| 123.000000 456.000000 |}] --- /dev/null +++ b/runtime/js/float32.js -@@ -0,0 +1,361 @@ +@@ -0,0 +1,419 @@ + +/* + 32-bit floats are represented as javascript numbers, i.e. 64-bit floats. @@ -729,19 +608,77 @@ + return Math.fround(Math.trunc(x)); +} + -+//Provides: caml_simd_float32_round_neg_inf_bytecode const -+function caml_simd_float32_round_neg_inf_bytecode(x) { -+ return Math.fround(Math.floor(x)); ++//Provides: caml_make_unboxed_float32_vect_bytecode const (const) ++//Requires: caml_make_float_vect ++let caml_make_unboxed_float32_vect_bytecode = caml_make_float_vect ++ ++//Provides: caml_ba_float32_get_1 ++//Requires: caml_ba_get_1 ++let caml_ba_float32_get_1 = caml_ba_get_1 ++ ++//Provides: caml_ba_float32_get_2 ++//Requires: caml_ba_get_2 ++let caml_ba_float32_get_2 = caml_ba_get_2 ++ ++//Provides: caml_ba_float32_get_3 ++//Requires: caml_ba_get_3 ++let caml_ba_float32_get_3 = caml_ba_get_3 ++ ++//Provides: caml_ba_float32_set_1 ++//Requires: caml_ba_set_1 ++let caml_ba_float32_set_1 = caml_ba_set_1 ++ ++//Provides: caml_ba_float32_set_2 ++//Requires: caml_ba_set_2 ++let caml_ba_float32_set_2 = caml_ba_set_2 ++ ++//Provides: caml_ba_float32_set_3 ++//Requires: caml_ba_set_3 ++let caml_ba_float32_set_3 = caml_ba_set_3 ++ ++//Provides: caml_ba_uint8_getf32 ++//Requires: caml_ba_uint8_get32, caml_int32_float_of_bits ++function caml_ba_uint8_getf32(ba, i0) { ++ return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); +} + -+//Provides: caml_simd_float32_round_pos_inf_bytecode const -+function caml_simd_float32_round_pos_inf_bytecode(x) { -+ return Math.fround(Math.ceil(x)); ++//Provides: caml_ba_uint8_setf32 ++//Requires: caml_ba_uint8_set32, caml_int32_bits_of_float ++function caml_ba_uint8_setf32(ba, i0, v) { ++ return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); +} + -+//Provides: caml_simd_float32_round_towards_zero_bytecode const -+function caml_simd_float32_round_towards_zero_bytecode(x) { -+ return Math.fround(Math.trunc(x)); ++//Provides: caml_string_getf32 ++//Requires: caml_string_get32, caml_int32_float_of_bits ++function caml_string_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_string_get32(s, i)); ++} ++ ++//Provides: caml_bytes_getf32 ++//Requires: caml_bytes_get32, caml_int32_float_of_bits ++function caml_bytes_getf32(s, i) { ++ return caml_int32_float_of_bits(caml_bytes_get32(s, i)); ++} ++ ++//Provides: caml_bytes_setf32 ++//Requires: caml_bytes_set32, caml_int32_bits_of_float ++function caml_bytes_setf32(s, i, f32) { ++ return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_failwith ++//If: js-string ++function caml_string_setf32(s, i, f32) { ++ caml_failwith("caml_string_setf32"); ++} ++ ++//Provides: caml_string_setf32 ++//Requires: caml_bytes_setf32 ++//If: !js-string ++function caml_string_setf32(s, i, f32) { ++ return caml_bytes_setf32(s, i, f32); ++} --- a/runtime/wasm/custom.wat +++ b/runtime/wasm/custom.wat @@ -16,6 +16,7 @@ @@ -1471,3 +1408,45 @@ + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) +) +--- a/compiler/lib/parse_bytecode.ml ++++ b/compiler/lib/parse_bytecode.ml +@@ -496,7 +496,7 @@ + then + match ident_of_custom x with + | Some name when same_ident name ident_f32 -> +- Float32 (Int64.bits_of_float (Obj.magic x : float)) ++ Float32 (Int64.bits_of_float ((Obj.magic x : float32) |> Float32.to_float)) + | Some name when same_ident name ident_32 -> + let i : int32 = Obj.magic x in + Int32 i +--- a/compiler/lib/stdlib.ml ++++ b/compiler/lib/stdlib.ml +@@ -369,6 +369,17 @@ + external ( >= ) : t -> t -> bool = "%greaterequal" + end + ++module Float32 = struct ++ type t = float32 ++ ++ external of_float : float -> t = "%float32offloat" ++ external to_float : t -> float = "%floatoffloat32" ++ ++ (* In javascript/wasm, we define float32 parsing as rounding the 64-bit result. ++ This is not equivalent to native code, which parses to 32 bits directly. *) ++ let of_string s = float_of_string s |> of_float ++end ++ + module Bool = struct + include Bool + +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -25,7 +25,7 @@ + | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) +- | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (float_of_string s)) ++ | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) + | Const_base (Const_int32 i | Const_unboxed_int32 i) -> Int32 i + | Const_base (Const_int64 i | Const_unboxed_int64 i) -> Int64 i + | Const_base (Const_nativeint i | Const_unboxed_nativeint i) -> NativeInt (Int32.of_nativeint_warning_on_overflow i) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-gh2034.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-gh2034.patch new file mode 100644 index 0000000000..3dc5610654 --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-gh2034.patch @@ -0,0 +1,83 @@ +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -387,14 +387,18 @@ + (global.set $method_cache (local.get $a)))) + (local.set $ofs + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) (local.get $ofs))))) ++ (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (return +- (array.get $block +- (local.get $meths) (i32.sub (local.get $ofs) (i32.const 1)))))) ++ (if (i32.eq (local.get $tag) ++ (i31.get_s ++ (ref.cast (ref i31) ++ (array.get $block (local.get $meths) ++ (local.get $ofs))))) ++ (then ++ (return ++ (array.get $block ++ (local.get $meths) ++ (i32.sub (local.get $ofs) (i32.const 1)))))))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -382,7 +382,8 @@ + (array.new $int_array (i32.const 0) (i32.const 8))) + + (func (export "caml_get_public_method") +- (param $obj (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) ++ (param $obj (ref eq)) (param $vtag (ref eq)) (param (ref eq)) ++ (result (ref eq)) + (local $meths (ref $block)) + (local $tag i32) (local $cacheid i32) (local $ofs i32) + (local $li i32) (local $mi i32) (local $hi i32) +@@ -391,7 +392,6 @@ + (ref.cast (ref $block) + (array.get $block + (ref.cast (ref $block) (local.get $obj)) (i32.const 1)))) +- (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $cacheid (i31.get_u (ref.cast (ref i31) (local.get 2)))) + (local.set $len (array.len (global.get $method_cache))) + (if (i32.ge_s (local.get $cacheid) (local.get $len)) +@@ -409,16 +409,14 @@ + (array.get $int_array (global.get $method_cache) (local.get $cacheid))) + (if (i32.lt_u (local.get $ofs) (array.len (local.get $meths))) + (then +- (if (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (local.get $ofs))))) ++ (if (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) (local.get $ofs))) + (then + (return + (array.get $block + (local.get $meths) + (i32.sub (local.get $ofs) (i32.const 1)))))))) ++ (local.set $tag (i31.get_s (ref.cast (ref i31) (local.get $vtag)))) + (local.set $li (i32.const 3)) + (local.set $hi + (i32.add +@@ -450,11 +448,9 @@ + (array.set $int_array (global.get $method_cache) (local.get $cacheid) + (i32.add (local.get $li) (i32.const 1))) + (if (result (ref eq)) +- (i32.eq (local.get $tag) +- (i31.get_s +- (ref.cast (ref i31) +- (array.get $block (local.get $meths) +- (i32.add (local.get $li) (i32.const 1)))))) ++ (ref.eq (local.get $vtag) ++ (array.get $block (local.get $meths) ++ (i32.add (local.get $li) (i32.const 1)))) + (then + (array.get $block (local.get $meths) (local.get $li))) + (else diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch new file mode 100644 index 0000000000..46d1621024 --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-global_deadcode-fix.patch @@ -0,0 +1,42 @@ +--- a/compiler/lib/global_deadcode.ml ++++ b/compiler/lib/global_deadcode.ml +@@ -434,7 +434,7 @@ + + They are returned; or + + They are applied to a function. + *) +-let zero prog sentinal live_table = ++let zero prog pure_funs sentinal live_table = + let compact_vars vars = + let i = ref (Array.length vars - 1) in + while !i >= 0 && Var.equal vars.(!i) sentinal do +@@ -483,13 +483,17 @@ + (* Zero out return values in last instruction, otherwise do nothing. *) + match block.branch with + | Return x -> +- let tc = +- (* We don't want to break tailcalls. *) ++ let live_tc = ++ (* Don't break tailcalls, it's needed for generate_closure ++ and effects passes. If the (tail)call is dead, it will ++ be eliminated later by the deadcode pass, don't make it live again by ++ returning its result. *) + match List.last body with +- | Some (Let (x', Apply _)) when Code.Var.equal x' x -> true ++ | Some (Let (x', (Apply _ as e))) -> ++ Code.Var.equal x x' && (is_live x' || not (Pure_fun.pure_expr pure_funs e)) + | Some _ | None -> false + in +- if tc then Return x else Return (zero_var x) ++ if live_tc then Return x else Return (zero_var x) + | Raise (_, _) + | Stop | Branch _ + | Cond (_, _, _) +@@ -581,7 +585,7 @@ + Print.print_uses uses; + Print.print_live_tbl live_table); + (* Zero out dead fields *) +- let p = zero p deadcode_sentinal live_table in ++ let p = zero p pure_funs deadcode_sentinal live_table in + if debug () + then ( + Format.eprintf "After Zeroing:@."; diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch index a9e15c1f4c..33d9968c58 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-iarray-primitives.patch @@ -1,9 +1,10 @@ --- a/runtime/js/array.js +++ b/runtime/js/array.js -@@ -249,3 +249,12 @@ - return caml_array_make(len, init); +@@ -131,3 +131,13 @@ + for (var i = 1; i < len; i++) b[i] = 0; + return b } - ++ +// Provides: caml_iarray_of_array const +function caml_iarray_of_array(a) { + return a; @@ -15,7 +16,7 @@ +} --- a/runtime/wasm/array.wat +++ b/runtime/wasm/array.wat -@@ -403,4 +403,13 @@ +@@ -293,4 +293,13 @@ (struct.get $float 0 (ref.cast (ref $float) (local.get $v))) (local.get $len)))) (ref.i31 (i32.const 0))) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch index 5ac6abeadd..578d7b30ad 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-internal-ocaml-5-compatibility.patch @@ -1,10 +1,9 @@ --- a/runtime/js/sys.js +++ b/runtime/js/sys.js -@@ -290,8 +290,13 @@ - function caml_sys_isatty(_chan) { +@@ -300,6 +300,11 @@ return 0; } - + +//Provides: caml_sys_const_runtime5 const +function caml_sys_const_runtime5(_unit) { + return 0; @@ -13,16 +12,16 @@ //Provides: caml_runtime_variant //Requires: caml_string_of_jsbytes function caml_runtime_variant(_unit) { - return caml_string_of_jsbytes(""); --- a/runtime/wasm/sys.wat +++ b/runtime/wasm/sys.wat -@@ -146,5 +146,9 @@ +@@ -154,6 +154,10 @@ (param (ref eq)) (result (ref eq)) (ref.i31 (i32.const 0))) - + + (func (export "caml_sys_const_runtime5") + (param (ref eq)) (result (ref eq)) + (ref.i31 (i32.const 0))) + - (func (export "caml_runtime_variant") (param (ref eq)) (result (ref eq)) - (array.new_fixed $bytes 0)) + (@string $Unix "Unix") + (@string $Win32 "Win32") + diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-local-bytes.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-local-bytes.patch new file mode 100644 index 0000000000..f1e0ec62b5 --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-local-bytes.patch @@ -0,0 +1,22 @@ +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -504,6 +504,7 @@ + } + + //Provides: caml_create_bytes const ++//Alias: caml_create_local_bytes + //Requires: MlBytes,caml_invalid_argument + function caml_create_bytes(len) { + if (len < 0) caml_invalid_argument("Bytes.create"); +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -121,7 +121,8 @@ + + (@string $Bytes_create "Bytes.create") + +- (func (export "caml_create_bytes") ++ (export "caml_create_local_bytes" (func $caml_create_bytes)) ++ (func $caml_create_bytes (export "caml_create_bytes") + (param $len (ref eq)) (result (ref eq)) + (local $l i32) + (local.set $l (i31.get_s (ref.cast (ref i31) (local.get $len)))) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch index ad24d6a85f..24ec30b5bb 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-magic_number.ml.patch @@ -6,7 +6,7 @@ -let v = - let current = Ocaml_version.current in -+let v = 561 ++let v = 568 + (* let current = Ocaml_version.current in match current with | 4 :: 08 :: _ -> 25 diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch index 5542a69282..e40549d323 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-mixed-block-bytecode-op.patch @@ -1,18 +1,14 @@ --- a/compiler/lib/instr.ml +++ b/compiler/lib/instr.ml -@@ -169,6 +169,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -173,6 +173,7 @@ | RESUME | RESUMETERM -@@ -353,13 +354,14 @@ - ; RERAISE, KStop 0, "RERAISE" - ; RAISE_NOTRACE, KStop 0, "RAISE_NOTRACE" - ; GETSTRINGCHAR, KNullary, "GETSTRINGCHAR" - ; PERFORM, if_v500 KNullaryCall, "PERFORM" + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + let equal (a : t) b = Poly.equal a b +@@ -360,6 +361,7 @@ ; RESUME, if_v500 KNullaryCall, "RESUME" ; RESUMETERM, if_v500 (KStop 1), "RESUMETERM" ; REPERFORMTERM, if_v500 (KStop 1), "REPERFORMTERM" @@ -20,22 +16,30 @@ ; FIRST_UNIMPLEMENTED_OP, K_will_not_happen, "FIRST_UNIMPLEMENTED_OP" |] in - let ops = - Array.mapi ~f:(fun i (c, k, n) -> { code = c; kind = k; name = n; opcode = i }) instrs - in --- a/compiler/lib/instr.mli +++ b/compiler/lib/instr.mli -@@ -168,6 +168,7 @@ - | RERAISE - | RAISE_NOTRACE - | GETSTRINGCHAR -+ | MAKE_FAUX_MIXEDBLOCK - | PERFORM +@@ -172,6 +172,7 @@ | RESUME | RESUMETERM + | REPERFORMTERM ++ | MAKE_FAUX_MIXEDBLOCK + | FIRST_UNIMPLEMENTED_OP + + type kind = +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -32,7 +32,7 @@ + | Const_float_array sl | Const_float_block sl -> + let l = List.map ~f:(fun f -> Int64.bits_of_float (float_of_string f)) sl in + Float_array (Array.of_list l) +- | Const_block (tag, l) -> ++ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> + let l = Array.of_list (List.map l ~f:constant_of_const) in + Tuple (tag, l, Unknown) + --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml -@@ -1375,7 +1375,7 @@ +@@ -1412,7 +1412,7 @@ (pc + 2) state (Let (x, Block (i, [||], Unknown, Maybe_mutable)) :: instrs) @@ -44,13 +48,3 @@ let size = getu code (pc + 1) in let tag = getu code (pc + 2) in let state = State.push state in ---- a/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:34:59 2024 -0400 -+++ b/compiler/lib/ocaml_compiler.ml Mon Jul 22 18:28:48 2024 -0400 -@@ -42,6 +42,6 @@ - Float_array (Array.of_list l) - | ((Const_pointer i) [@if ocaml_version < (4, 12, 0)]) -> - Int (Targetint.of_int_warning_on_overflow i) -- | Const_block (tag, l) -> -+ | Const_mixed_block (tag, _, l) | Const_block (tag, l) -> - let l = Array.of_list (List.map l ~f:constant_of_const) in - Tuple (tag, l, Unknown) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch index ff51bbb6f9..3545c53168 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-n-ary-functions.patch @@ -1,15 +1,16 @@ --- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml +++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml -@@ -250,7 +250,7 @@ - in - let make_fun (label, pat) (label', typ) expr = - assert (label' = label); -- Exp.fun_ label None (Pat.constraint_ pat typ) expr -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr +@@ -267,7 +267,8 @@ + | _ -> c, b + in + { expr with pexp_desc = Pexp_function (params, c, b) } +- | _ -> Exp.fun_ label None (Pat.constraint_ pat typ) expr ++ | _ -> ++ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:!Ppxlib.Ast_helper.default_loc label None (Pat.constraint_ pat typ) expr in let invoker = List.fold_right2 -@@ -309,10 +309,10 @@ +@@ -326,10 +327,10 @@ in Exp.apply ~loc:apply_loc @@ -22,7 +23,7 @@ ~loc:gloc nolabel None -@@ -355,7 +355,7 @@ +@@ -372,7 +373,7 @@ invoker [ app_arg obj ; app_arg @@ -31,7 +32,7 @@ ~loc:gloc nolabel None -@@ -379,9 +379,8 @@ +@@ -396,9 +397,8 @@ let prop_set ~loc ~prop_loc obj prop value = let gloc = { obj.pexp_loc with Location.loc_ghost = true } in let obj = @@ -43,7 +44,7 @@ in let invoker = invoker -@@ -409,7 +408,7 @@ +@@ -426,7 +426,7 @@ [ app_arg obj ; app_arg value ; app_arg @@ -52,52 +53,9 @@ ~loc:{ loc with loc_ghost = true } nolabel None -@@ -583,11 +582,14 @@ - | Pcf_method (id, priv, Cfk_concrete (bang, body)) -> - let names = check_name id names in - let body, body_ty = drop_pexp_poly (mappper body) in - let rec create_meth_ty exp = - match exp.pexp_desc with -- | Pexp_fun (label, _, _, body) -> Arg.make ~label () :: create_meth_ty body -- | Pexp_function _ -> [ Arg.make () ] -+ | Pexp_function (params, _, _) -> -+ List.filter_map params ~f:(fun param -> -+ match param.pparam_desc with -+ | Pparam_val (label, _, _) -> Some (Arg.make ~label ()) -+ | Pparam_newtype _ -> None) -- | Pexp_newtype (_, body) -> create_meth_ty body -+ | Pexp_newtype (_, _, body) -> create_meth_ty body - | _ -> [] - in - let fun_ty = create_meth_ty body in -@@ -641,7 +643,7 @@ - let body = function - | Val (_, _, _, body) -> body - | Meth (_, _, _, body, _) -> -- Exp.fun_ ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:{ body.pexp_loc with loc_ghost = true } Nolabel None self_id body +@@ -935,3 +935,5 @@ + |> Ppxlib_ast.Selected_ast.to_ocaml Expression in - let extra_types = - List.concat -@@ -725,14 +727,17 @@ - invoker - (List.map fields ~f:(fun f -> app_arg (body f)) - @ [ app_arg -- { (List.fold_right -+ (let body = -+ List.fold_right - (self :: List.map fields ~f:(fun f -> (name f).txt)) - ~init:fake_object - ~f:(fun name fun_ -> -- Exp.fun_ ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_)) -+ Ppxlib_jane.Ast_builder.Default.add_fun_param ~loc:gloc nolabel None (Pat.var ~loc:gloc (mknoloc name)) fun_) -+ in -+ { body - with -- pexp_attributes = [ merlin_hide ] -- } -+ pexp_attributes = body.pexp_attributes @ [ merlin_hide ] -+ }) - ]) - - let transform = + { Ocaml_ast_mapper.default_mapper with expr } ++ ++ diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-no-compression-module-5.2.patch new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-obj_stubs.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-obj_stubs.patch new file mode 100644 index 0000000000..abc1cf740b --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-obj_stubs.patch @@ -0,0 +1,49 @@ +--- a/runtime/js/obj.js ++++ b/runtime/js/obj.js +@@ -44,6 +44,22 @@ + return +Array.isArray(x); + } + ++//Provides: caml_obj_is_stack ++function caml_obj_is_stack(x) { ++ return 0; ++} ++ ++//Provides: caml_succ_scannable_prefix_len ++function caml_succ_scannable_prefix_len(x) { ++ return 0; ++} ++ ++//Provides: caml_obj_uniquely_reachable_words ++//Requires: caml_failwith ++function caml_obj_uniquely_reachable_words(x) { ++ caml_failwith("Obj.uniquely_reachable_words is not available in javascript."); ++} ++ + //Provides: caml_obj_tag + //Requires: caml_is_ml_bytes, caml_is_ml_string + function caml_obj_tag(x) { +--- a/runtime/wasm/obj.wat ++++ b/runtime/wasm/obj.wat +@@ -101,6 +101,21 @@ + (global $double_array_tag (export "double_array_tag") i32 (i32.const 254)) + (global $custom_tag i32 (i32.const 255)) + ++ (func (export "caml_obj_is_stack") ++ (param (ref eq)) (result (ref eq)) ++ (ref.i31 (i32.const 0))) ++ ++ (func (export "caml_succ_scannable_prefix_len") ++ (param (ref eq)) (result (ref eq)) ++ (ref.i31 (i32.const 0))) ++ ++ (@string $unique_words_unsupported "Obj.uniquely_reachable_words is not available in wasm.") ++ ++ (func (export "caml_obj_uniquely_reachable_words") ++ (param (ref eq)) (result (ref eq)) ++ (call $caml_failwith (global.get $unique_words_unsupported)) ++ (ref.i31 (i32.const 0))) ++ + (func $caml_is_closure (export "caml_is_closure") + (param $v (ref eq)) (result i32) + (i32.or (ref.test (ref $closure) (local.get $v)) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch new file mode 100644 index 0000000000..f33c06a02c --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-optcomp_lite_fixes.patch @@ -0,0 +1,91 @@ +--- a/compiler/ppx/ppx_optcomp_light.ml ++++ b/compiler/ppx/ppx_optcomp_light.ml +@@ -148,7 +148,8 @@ + | [] -> true + | _ -> ( + try +- let keep_one { attr_payload; attr_loc; _ } = ++ let keep_one ({ attr_payload; attr_loc; _ } as attr) = ++ Ppxlib.Attribute.mark_as_handled_manually attr; + let e = + match attr_payload with + | PStr [ { pstr_desc = Pstr_eval (e, []); _ } ] -> e +--- a/ppx/ppx_js/lib_internal/ppx_js_internal.ml ++++ b/ppx/ppx_js/lib_internal/ppx_js_internal.ml +@@ -537,14 +537,6 @@ + + let rec create_meth_ty exp = + match exp.pexp_desc with +- | Pexp_fun (label, _, _, body) -> label :: create_meth_ty body +- | Pexp_function _ -> [ nolabel ] +- | Pexp_newtype (_, body) -> create_meth_ty body +- | _ -> [] +-[@@if ast_version < 502] +- +-let rec create_meth_ty exp = +- match exp.pexp_desc with + | Pexp_function (params, _, body) -> ( + List.filter_map params ~f:(function + | { pparam_desc = Pparam_newtype _; _ } -> None +@@ -556,7 +548,6 @@ + (* TODO: should we recurse or not ? *) + create_meth_ty e) + | _ -> [] +-[@@if ast_version >= 502] + + let preprocess_literal_object mappper fields : + [ `Fields of field_desc list | `Error of _ ] = +@@ -685,7 +676,7 @@ + | Val (_, _, _, body) -> body + | Meth (_, _, _, (body, ty), _) -> ( + match body.pexp_desc, ty with +- | ((Pexp_function (params, c, b), None) [@if ast_version >= 502]) -> ++ | ((Pexp_function (params, c, b), None)) -> + let params = + { pparam_desc = Pparam_val (nolabel, None, self_id) + ; pparam_loc = { body.pexp_loc with loc_ghost = true } +@@ -693,9 +684,9 @@ + :: params + in + { body with pexp_desc = Pexp_function (params, c, b) } +- | ((_, Some ty) [@if ast_version >= 502]) -> ( ++ | ((_, Some ty)) -> ( + let e = +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -703,18 +694,13 @@ + body + in + match e.pexp_desc with +- | Pexp_function (params, None, b) -> +- { e with pexp_desc = Pexp_function (params, Some (Pconstraint ty), b) } ++ | Pexp_function (params, ({ ret_type_constraint = None ; _ } as function_constraint), b) -> ++ let ret_type_constraint = Some (Pconstraint ty) in ++ let function_constraint = { function_constraint with ret_type_constraint } in ++ { e with pexp_desc = Pexp_function (params, function_constraint , b) } + | _ -> assert false) +- | ((_, Some ty) [@if ast_version < 502]) -> +- Exp.fun_ +- ~loc:{ body.pexp_loc with loc_ghost = true } +- Nolabel +- None +- self_id +- (Exp.constraint_ body ty) + | _, None -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:{ body.pexp_loc with loc_ghost = true } + Nolabel + None +@@ -818,7 +804,7 @@ + in + { fun_ with pexp_desc = Pexp_function (params, c, b) } + | _ -> +- Exp.fun_ ++ Ppxlib_jane.Ast_builder.Default.add_fun_param + ~loc:gloc + nolabel + None diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch index 65c5b1c5ed..e69de29bb2 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-remove-float-externals.patch @@ -1,29 +0,0 @@ ---- a/compiler/tests-jsoo/test_floats.ml -+++ b/compiler/tests-jsoo/test_floats.ml -@@ -26,26 +26,6 @@ - Printf.printf "%g\n" (1. /. z); - [%expect {|-inf|}] - --module Float = struct -- include Float -- -- external acosh : float -> float = "caml_acosh_float" -- -- external asinh : float -> float = "caml_asinh_float" -- -- external atanh : float -> float = "caml_atanh_float" -- -- external erf : float -> float = "caml_erf_float" -- -- external erfc : float -> float = "caml_erfc_float" -- -- external cbrt : float -> float = "caml_cbrt_float" -- -- external exp2 : float -> float = "caml_exp2_float" -- -- external log2 : float -> float = "caml_log2_float" --end -- - let print f = - match Float.classify_float f with - | FP_nan -> print_endline "nan" diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch new file mode 100644 index 0000000000..52db6e50b2 --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch @@ -0,0 +1,158 @@ +--- b/compiler/lib/reserved.ml ++++ a/compiler/lib/reserved.ml +@@ -144,7 +144,6 @@ + ; "require" (* only available in node *) + ; "Symbol" + ; "ArrayBuffer" +- ; "DataView" + ; "Float32Array" + ; "Float64Array" + ; "Int16Array" +--- b/runtime/js/ieee_754.js ++++ a/runtime/js/ieee_754.js +@@ -17,27 +17,74 @@ + // along with this program; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +-//Provides: jsoo_dataview +-var jsoo_dataview = new DataView(new ArrayBuffer(8)); ++//Provides: jsoo_floor_log2 ++var log2_ok = Math.log2 && Math.log2(1.1235582092889474e307) === 1020; ++function jsoo_floor_log2(x) { ++ if (log2_ok) return Math.floor(Math.log2(x)); ++ var i = 0; ++ if (x === 0) return Number.NEGATIVE_INFINITY; ++ if (x >= 1) { ++ while (x >= 2) { ++ x /= 2; ++ i++; ++ } ++ } else { ++ while (x < 1) { ++ x *= 2; ++ i--; ++ } ++ } ++ return i; ++} + + //Provides: caml_int64_bits_of_float const +-//Requires: caml_int64_create_lo_mi_hi +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2, caml_int64_create_lo_mi_hi + function caml_int64_bits_of_float(x) { +- jsoo_dataview.setFloat64(0, x, true); +- var lo32 = jsoo_dataview.getUint32(0, true); +- var hi32 = jsoo_dataview.getUint32(4, true); +- var r1 = lo32 & 0xffffff; +- var r2 = (lo32 >>> 24) | ((hi32 << 8) & 0xffffff); +- var r3 = (hi32 >>> 16) & 0xffff; ++ if (!Number.isFinite(x)) { ++ if (Number.isNaN(x)) return caml_int64_create_lo_mi_hi(1, 0, 0x7ff0); ++ if (x > 0) return caml_int64_create_lo_mi_hi(0, 0, 0x7ff0); ++ else return caml_int64_create_lo_mi_hi(0, 0, 0xfff0); ++ } ++ var sign = ++ x === 0 && 1 / x === Number.NEGATIVE_INFINITY ++ ? 0x8000 ++ : x >= 0 ++ ? 0 ++ : 0x8000; ++ if (sign) x = -x; ++ // Int64.bits_of_float 1.1235582092889474E+307 = 0x7fb0000000000000L ++ // using Math.LOG2E*Math.log(x) in place of Math.log2 result in precision lost ++ var exp = jsoo_floor_log2(x) + 1023; ++ if (exp <= 0) { ++ exp = 0; ++ x /= Math.pow(2, -1026); ++ } else { ++ x /= Math.pow(2, exp - 1027); ++ if (x < 16) { ++ x *= 2; ++ exp -= 1; ++ } ++ if (exp === 0) { ++ x /= 2; ++ } ++ } ++ var k = Math.pow(2, 24); ++ var r3 = x | 0; ++ x = (x - r3) * k; ++ var r2 = x | 0; ++ x = (x - r2) * k; ++ var r1 = x | 0; ++ r3 = (r3 & 0xf) | sign | (exp << 4); + return caml_int64_create_lo_mi_hi(r1, r2, r3); + } + + //Provides: caml_int32_bits_of_float const +-//Requires: jsoo_dataview ++//Requires: jsoo_floor_log2 + function caml_int32_bits_of_float(x) { +- jsoo_dataview.setFloat32(0, x, true); +- return jsoo_dataview.getUint32(0, true) | 0; ++ var float32a = new Float32Array(1); ++ float32a[0] = x; ++ var int32a = new Int32Array(float32a.buffer); ++ return int32a[0] | 0; + } + + //FP literals can be written using the hexadecimal +@@ -103,14 +150,24 @@ + } + + //Provides: caml_int64_float_of_bits const +-//Requires: jsoo_dataview + function caml_int64_float_of_bits(x) { + var lo = x.lo; + var mi = x.mi; + var hi = x.hi; +- jsoo_dataview.setUint32(0, lo | (mi << 24), true); +- jsoo_dataview.setUint32(4, (mi >>> 8) | (hi << 16), true); +- return jsoo_dataview.getFloat64(0, true); ++ var exp = (hi & 0x7fff) >> 4; ++ if (exp === 2047) { ++ if ((lo | mi | (hi & 0xf)) === 0) ++ return hi & 0x8000 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY; ++ else return Number.NaN; ++ } ++ var k = Math.pow(2, -24); ++ var res = (lo * k + mi) * k + (hi & 0xf); ++ if (exp > 0) { ++ res += 16; ++ res *= Math.pow(2, exp - 1027); ++ } else res *= Math.pow(2, -1026); ++ if (hi & 0x8000) res = -res; ++ return res; + } + + //Provides: caml_nextafter_float const +@@ -135,10 +192,11 @@ + } + + //Provides: caml_int32_float_of_bits const +-//Requires: jsoo_dataview + function caml_int32_float_of_bits(x) { +- jsoo_dataview.setUint32(0, x, true); +- return jsoo_dataview.getFloat32(0, true); ++ var int32a = new Int32Array(1); ++ int32a[0] = x; ++ var float32a = new Float32Array(int32a.buffer); ++ return float32a[0]; + } + + //Provides: caml_classify_float const +@@ -186,11 +244,12 @@ + return x; + } + //Provides: caml_frexp_float const ++//Requires: jsoo_floor_log2 + function caml_frexp_float(x) { + if (x === 0 || !Number.isFinite(x)) return [0, x, 0]; + var neg = x < 0; + if (neg) x = -x; +- var exp = Math.max(-1023, Math.floor(Math.log2(x)) + 1); ++ var exp = Math.max(-1023, jsoo_floor_log2(x) + 1); + x *= Math.pow(2, -exp); + while (x < 0.5) { + x *= 2; diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch new file mode 100644 index 0000000000..3058a0eac5 --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-small-int-literals.patch @@ -0,0 +1,19 @@ +--- a/compiler/lib/ocaml_compiler.ml ++++ b/compiler/lib/ocaml_compiler.ml +@@ -21,8 +21,14 @@ + let rec constant_of_const c : Code.constant = + let open Lambda in + match c with +- | Const_base (Const_int i) -> Int (Targetint.of_int_warning_on_overflow i) +- | Const_base (Const_char c) -> Int (Targetint.of_int_exn (Char.code c)) ++ | Const_base ++ (Const_int8 i | Const_untagged_int8 i | ++ Const_int16 i | Const_untagged_int16 i | ++ Const_int i | Const_untagged_int i) -> ++ Int (Targetint.of_int_warning_on_overflow i) ++ ++ | Const_base (Const_char c | Const_untagged_char c) -> ++ Int (Targetint.of_int_exn (Char.code c)) + | Const_base (Const_string (s, _, _)) -> String s + | Const_base (Const_float s | Const_unboxed_float s) -> Float (Int64.bits_of_float (float_of_string s)) + | Const_base (Const_float32 s | Const_unboxed_float32 s) -> Float32 (Int64.bits_of_float (Float32.of_string s |> Float32.to_float)) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch new file mode 100644 index 0000000000..7e3dd48e83 --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch @@ -0,0 +1,12 @@ +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -285,7 +285,8 @@ + | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) +- | "caml_int64_bits_of_float", [ Float f ] -> int64 f ++ ++ (* | "caml_int64_bits_of_float", [ Float f ] -> int64 f *) + | "caml_int64_float_of_bits", [ Int64 i ] -> Some (Float i) + | "caml_int64_of_float", [ Float f ] -> + int64 (Int64.of_float (Int64.float_of_bits f)) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch index d3b426a837..e69de29bb2 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-test-diffs-caused-by-build-differences.patch @@ -1,20 +0,0 @@ ---- a/compiler/tests-jsoo/gh_1307.ml -+++ b/compiler/tests-jsoo/gh_1307.ml -@@ -15,7 +15,7 @@ - test "a"; - [%expect {| - input: "a" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - test "aa"; - [%expect {| -@@ -25,7 +25,7 @@ - test "aaa"; - [%expect {| - input: "aaa" -- Stdlib.Parsing.Parse_error -+ Stdlib__Parsing.Parse_error - failure |}]; - let (_ : bool) = Parsing.set_trace old in - () diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch new file mode 100644 index 0000000000..23d27d2bf7 --- /dev/null +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/files/js_of_ocaml-unboxed-indexing.patch @@ -0,0 +1,1531 @@ +--- a/compiler/lib-wasm/generate.ml ++++ b/compiler/lib-wasm/generate.ml +@@ -99,32 +99,53 @@ + + let specialized_primitives = + let h = String.Hashtbl.create 18 in ++ let caml_accessors = ++ let ( let* ) l f = List.concat_map l ~f in ++ let* index_type, index_suffix = ++ [ Value, "" ++ ; Int32, "_indexed_by_int32" ++ ; Int64, "_indexed_by_int64" ++ ; Nativeint, "_indexed_by_nativeint" ++ ] ++ in ++ let* data_type, data_type_name = ++ [ Value, "16"; Int32, "32"; Int64, "64"; Value, "f32" ] ++ in ++ let* array_type_name, accessors = ++ [ "string", [ `Get ]; "bytes", [ `Get; `Set ]; "ba_uint8", [ `Get; `Set ] ] ++ in ++ let* op = accessors in ++ [ (match op with ++ | `Get -> ++ ( "caml_" ^ array_type_name ^ "_get" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type ], data_type) ) ++ | `Set -> ++ ( "caml_" ^ array_type_name ^ "_set" ^ data_type_name ^ index_suffix ++ , (`Mutator, [ Value; index_type; data_type ], Value) )) ++ ] ++ in + List.iter + ~f:(fun (nm, typ) -> String.Hashtbl.add h nm typ) ++ (caml_accessors @ + [ "caml_int32_bswap", (`Pure, [ Int32 ], Int32) + ; "caml_nativeint_bswap", (`Pure, [ Nativeint ], Nativeint) + ; "caml_int64_bswap", (`Pure, [ Int64 ], Int64) + ; "caml_int32_compare", (`Pure, [ Int32; Int32 ], Value) ++ ; "caml_checked_int32_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_nativeint_to_int", (`Pure, [ Int32 ], Value) ++ ; "caml_checked_int64_to_int32", (`Pure, [ Int64 ], Int32) + ; "caml_nativeint_compare", (`Pure, [ Nativeint; Nativeint ], Value) + ; "caml_int64_compare", (`Pure, [ Int64; Int64 ], Value) +- ; "caml_string_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_string_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_bytes_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_bytes_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_bytes_set64", (`Mutator, [ Value; Value; Int64 ], Value) ++ ; "caml_float16_of_double", (`Pure, [ Float ], Int32) ++ ; "caml_double_of_float16", (`Pure, [ Int32 ], Float) + ; "caml_lxm_next", (`Pure, [ Value ], Int64) +- ; "caml_ba_uint8_get32", (`Mutator, [ Value; Value ], Int32) +- ; "caml_ba_uint8_get64", (`Mutator, [ Value; Value ], Int64) +- ; "caml_ba_uint8_set32", (`Mutator, [ Value; Value; Int32 ], Value) +- ; "caml_ba_uint8_set64", (`Mutator, [ Value; Value; Int64 ], Value) + ; "caml_nextafter_float", (`Pure, [ Float; Float ], Float) + ; "caml_classify_float", (`Pure, [ Float ], Value) + ; "caml_ldexp_float", (`Pure, [ Float; Value ], Float) + ; "caml_erf_float", (`Pure, [ Float ], Float) + ; "caml_erfc_float", (`Pure, [ Float ], Float) + ; "caml_float_compare", (`Pure, [ Float; Float ], Value) +- ]; ++ ]); + h + + let float_bin_op' op f g = +@@ -233,8 +254,42 @@ + let () = + register_bin_prim "caml_array_unsafe_get" `Mutable Memory.gen_array_get; + register_bin_prim "caml_floatarray_unsafe_get" `Mutable Memory.float_array_get; ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int32" `Mutable (fun x y -> ++ let conv = Memory.unbox_int32 in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ ++ register_bin_prim "caml_array_unsafe_get_indexed_by_int64" `Mutator (fun x y -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); ++ register_bin_prim "caml_array_unsafe_get_indexed_by_nativeint" `Mutable (fun x y -> ++ let conv = Memory.unbox_nativeint in ++ Memory.gen_array_get x (Value.val_int (conv y)) ++ ); + register_tern_prim "caml_array_unsafe_set" (fun x y z -> + seq (Memory.gen_array_set x y z) Value.unit); ++ let unboxed_indexed_array_access conv x y z = ++ seq (Memory.gen_array_set x (Value.val_int (conv y)) z) Value.unit ++ in ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int32" (fun x y z -> ++ let conv = Memory.unbox_int32 in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_int64" (fun x y z -> ++ let conv i = ++ let* i = Memory.unbox_int64 i in ++ return (W.I32WrapI64 i) ++ in ++ unboxed_indexed_array_access conv x y z ++ ); ++ register_tern_prim "caml_array_unsafe_set_indexed_by_nativeint" (fun x y z -> ++ let conv = Memory.unbox_nativeint in ++ unboxed_indexed_array_access conv x y z ++ ); + register_tern_prim "caml_array_unsafe_set_addr" (fun x y z -> + seq (Memory.array_set x y z) Value.unit); + register_tern_prim "caml_floatarray_unsafe_set" (fun x y z -> +--- a/compiler/lib/eval.ml ++++ b/compiler/lib/eval.ml +@@ -281,6 +281,8 @@ + | "caml_nativeint_compare", [ NativeInt i; NativeInt j ] -> + Some (Int (Targetint.of_int_exn (Int32.compare i j))) + | "caml_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_nativeint_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) ++ | "caml_checked_int32_to_int", [ Int32 i ] -> Some (Int (Targetint.of_int32_truncate i)) + | "caml_nativeint_of_int", [ Int i ] -> nativeint (Targetint.to_int32 i) + (* int64 *) + (* CR-someday jrodriguez: [Float_u.Option.none ()] is a very specific, sentinel NaN. +@@ -650,7 +652,7 @@ + else None + in + match res with +- | Some c -> ++ | Some c when Var.idx x < Info.info_defs_length info -> + let c = Constant c in + Flow.Info.update_def info x c; + incr update_count; +--- a/compiler/lib/flow.ml ++++ b/compiler/lib/flow.ml +@@ -56,6 +56,9 @@ + let update_def { info_defs; _ } x exp = + let idx = Code.Var.idx x in + info_defs.(idx) <- Expr exp ++ ;; ++ ++ let info_defs_length { info_defs; _ } = Array.length info_defs + end + + let undefined = Phi Var.Set.empty +@@ -363,6 +366,13 @@ + let the_const_of ~eq info x = + match x with + | Pv x -> ++ ++ (* If this variable was minted after we constructed the info table, conservatively ++ assume we know nothing. Transformations of array-access primitives in ++ [specialize_js.ml] mint variables in this way. *) ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -386,11 +396,15 @@ + | Some i, Some j when eq i j -> u + | _ -> None) + x ++ ) + | Pc c -> Some c + + let the_int info x = + match x with + | Pv x -> ++ if Var.idx x >= Array.length info.Info.info_defs ++ then None ++ else ( + get_approx + info + (fun x -> +@@ -403,6 +417,7 @@ + | Some i, Some j when Targetint.equal i j -> u + | _ -> None) + x ++ ) + | Pc (Int c) -> Some c + | Pc _ -> None + +--- a/compiler/lib/flow.mli ++++ b/compiler/lib/flow.mli +@@ -45,6 +45,8 @@ + val update_def : t -> Code.Var.t -> Code.expr -> unit + + val possibly_mutable : t -> Code.Var.t -> bool ++ ++ val info_defs_length : t -> int + end + + val get_approx : +--- a/compiler/lib/generate.ml ++++ b/compiler/lib/generate.ml +@@ -1143,6 +1143,7 @@ + J.call (J.dot (s_var "Math") prim) [ cx; cy ] loc) + + let _ = ++ register_un_prim "%identity" `Pure (fun cx _ -> cx); + register_un_prim_ctx "%caml_format_int_special" `Pure (fun ctx cx loc -> + let s = J.EBin (J.Plus, str_js_utf8 "", cx) in + ocaml_string ~ctx ~loc s); +@@ -1151,6 +1152,8 @@ + [ "caml_array_unsafe_get" + ; "caml_array_unsafe_get_float" + ; "caml_floatarray_unsafe_get" ++ ; "caml_array_unsafe_get_indexed_by_int32" ++ ; "caml_array_unsafe_get_indexed_by_nativeint" + ] + `Mutable + (fun cx cy _ -> Mlvalue.Array.field cx cy); +@@ -1160,6 +1163,8 @@ + ; "caml_int32_to_float" + ; "caml_nativeint_of_int" + ; "caml_nativeint_to_int" ++ ; "caml_checked_nativeint_to_int" ++ ; "caml_checked_int32_to_int" + ; "caml_nativeint_to_int32" + ; "caml_nativeint_of_int32" + ; "caml_nativeint_to_float" +@@ -1246,6 +1251,8 @@ + ; "caml_array_unsafe_set_float" + ; "caml_floatarray_unsafe_set" + ; "caml_array_unsafe_set_addr" ++ ; "caml_array_unsafe_set_indexed_by_int32" ++ ; "caml_array_unsafe_set_indexed_by_nativeint" + ] + `Mutator + (fun cx cy cz _ -> J.EBin (J.Eq, Mlvalue.Array.field cx cy, cz)); +--- a/compiler/lib/specialize_js.ml ++++ b/compiler/lib/specialize_js.ml +@@ -303,6 +303,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_get_indexed_by_int32" ++ | "caml_array_get_indexed_by_int64" ++ | "caml_array_get_indexed_by_nativeint") ++ as prim) ++ , [ y; z ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_get_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_get_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_get_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_get] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_get", [ y; Pv z' ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_get" + | "caml_array_get_float" + | "caml_floatarray_get" +@@ -349,6 +375,32 @@ + ( x + , Prim + ( Extern ++ (( "caml_array_set_indexed_by_int32" ++ | "caml_array_set_indexed_by_int64" ++ | "caml_array_set_indexed_by_nativeint") ++ as prim) ++ , [ y; z; w ] ) ) -> ++ let conv = ++ match prim with ++ | "caml_array_set_indexed_by_int32" -> "caml_checked_int32_to_int" ++ | "caml_array_set_indexed_by_int64" -> "caml_checked_int64_to_int" ++ | "caml_array_set_indexed_by_nativeint" -> "caml_checked_nativeint_to_int" ++ | _ -> assert false ++ in ++ let z' = Code.Var.fresh () in ++ let r = ++ (Let (z', Prim (Extern conv, [ z ]))) ++ (* The recursive call to [aux] will optimize [caml_array_set] into ++ a nominally "unsafe" (but guarded) access. ++ *) ++ :: (Let (x, Prim (Extern "caml_array_set", [ y; Pv z'; w ]))) ++ :: r ++ in ++ aux info checks r acc ++ | Let ++ ( x ++ , Prim ++ ( Extern + (( "caml_array_set" + | "caml_array_set_float" + | "caml_floatarray_set" +--- a/runtime/js/bigarray.js ++++ b/runtime/js/bigarray.js +@@ -43,6 +43,7 @@ + } + + //Provides: caml_unpackFloat16 ++//Alias: caml_double_of_float16 + var caml_unpackFloat16 = (function () { + var pow = Math.pow; + +@@ -73,6 +74,7 @@ + })(); + + //Provides: caml_packFloat16 ++//Alias: caml_float16_of_double + var caml_packFloat16 = (function () { + const INVERSE_OF_EPSILON = 1 / Number.EPSILON; + +@@ -549,6 +551,8 @@ + } + + //Provides: caml_ba_uint8_get16 ++//Alias: caml_ba_uint8_get16_indexed_by_int32 ++//Alias: caml_ba_uint8_get16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get16(ba, i0) { + var ofs = ba.offset(i0); +@@ -558,7 +562,15 @@ + return b1 | (b2 << 8); + } + ++//Provides: caml_ba_uint8_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get16 ++function caml_ba_uint8_get16_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get32 ++//Alias: caml_ba_uint8_get32_indexed_by_int32 ++//Alias: caml_ba_uint8_get32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_get32(ba, i0) { + var ofs = ba.offset(i0); +@@ -570,7 +582,15 @@ + return (b1 << 0) | (b2 << 8) | (b3 << 16) | (b4 << 24); + } + ++//Provides: caml_ba_uint8_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get32 ++function caml_ba_uint8_get32_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_get64 ++//Alias: caml_ba_uint8_get64_indexed_by_int32 ++//Alias: caml_ba_uint8_get64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_of_bytes + function caml_ba_uint8_get64(ba, i0) { + var ofs = ba.offset(i0); +@@ -586,6 +606,12 @@ + return caml_int64_of_bytes([b8, b7, b6, b5, b4, b3, b2, b1]); + } + ++//Provides: caml_ba_uint8_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_get64 ++function caml_ba_uint8_get64_indexed_by_int64(s, i) { ++ return caml_ba_uint8_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_get_1 + function caml_ba_get_1(ba, i0) { + return ba.get(ba.offset(i0)); +@@ -609,6 +635,8 @@ + } + + //Provides: caml_ba_uint8_set16 ++//Alias: caml_ba_uint8_set16_indexed_by_int32 ++//Alias: caml_ba_uint8_set16_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set16(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -618,7 +646,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set16 ++function caml_ba_uint8_set16_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set16(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set32 ++//Alias: caml_ba_uint8_set32_indexed_by_int32 ++//Alias: caml_ba_uint8_set32_indexed_by_nativeint + //Requires: caml_array_bound_error + function caml_ba_uint8_set32(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -630,7 +666,15 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set32 ++function caml_ba_uint8_set32_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set32(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_uint8_set64 ++//Alias: caml_ba_uint8_set64_indexed_by_int32 ++//Alias: caml_ba_uint8_set64_indexed_by_nativeint + //Requires: caml_array_bound_error, caml_int64_to_bytes + function caml_ba_uint8_set64(ba, i0, v) { + var ofs = ba.offset(i0); +@@ -640,6 +684,12 @@ + return 0; + } + ++//Provides: caml_ba_uint8_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_set64 ++function caml_ba_uint8_set64_indexed_by_int64(s, i, v) { ++ return caml_ba_uint8_set64(s, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_ba_set_1 + function caml_ba_set_1(ba, i0, v) { + ba.set(ba.offset(i0), v); +--- a/runtime/js/float32.js ++++ b/runtime/js/float32.js +@@ -375,36 +375,78 @@ + let caml_ba_float32_set_3 = caml_ba_set_3 + + //Provides: caml_ba_uint8_getf32 ++//Alias: caml_ba_uint8_getf32_indexed_by_int32 ++//Alias: caml_ba_uint8_getf32_indexed_by_nativeint + //Requires: caml_ba_uint8_get32, caml_int32_float_of_bits + function caml_ba_uint8_getf32(ba, i0) { + return caml_int32_float_of_bits(caml_ba_uint8_get32(ba, i0)); + } + ++//Provides: caml_ba_uint8_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_getf32 ++function caml_ba_uint8_getf32_indexed_by_int64(ba, i) { ++ return caml_ba_uint8_getf32(ba, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_ba_uint8_setf32 ++//Alias: caml_ba_uint8_setf32_indexed_by_int32 ++//Alias: caml_ba_uint8_setf32_indexed_by_nativeint + //Requires: caml_ba_uint8_set32, caml_int32_bits_of_float + function caml_ba_uint8_setf32(ba, i0, v) { + return caml_ba_uint8_set32(ba, i0, caml_int32_bits_of_float(v)); + } + ++//Provides: caml_ba_uint8_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_ba_uint8_setf32 ++function caml_ba_uint8_setf32_indexed_by_int64(ba, i, v) { ++ return caml_ba_uint8_setf32(ba, caml_checked_int64_to_int(i), v) ++} ++ + //Provides: caml_string_getf32 ++//Alias: caml_string_getf32_indexed_by_int32 ++//Alias: caml_string_getf32_indexed_by_nativeint + //Requires: caml_string_get32, caml_int32_float_of_bits + function caml_string_getf32(s, i) { + return caml_int32_float_of_bits(caml_string_get32(s, i)); + } + ++//Provides: caml_string_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_getf32 ++function caml_string_getf32_indexed_by_int64(s, i) { ++ return caml_string_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_getf32 ++//Alias: caml_bytes_getf32_indexed_by_int32 ++//Alias: caml_bytes_getf32_indexed_by_nativeint + //Requires: caml_bytes_get32, caml_int32_float_of_bits + function caml_bytes_getf32(s, i) { + return caml_int32_float_of_bits(caml_bytes_get32(s, i)); + } + ++//Provides: caml_bytes_getf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_getf32 ++function caml_bytes_getf32_indexed_by_int64(s, i) { ++ return caml_bytes_getf32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_setf32 ++//Alias: caml_bytes_setf32_indexed_by_int32 ++//Alias: caml_bytes_setf32_indexed_by_nativeint + //Requires: caml_bytes_set32, caml_int32_bits_of_float + function caml_bytes_setf32(s, i, f32) { + return caml_bytes_set32(s, i, caml_int32_bits_of_float(f32)); + } + ++//Provides: caml_bytes_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_setf32 ++function caml_bytes_setf32_indexed_by_int64(s, i, f32) { ++ return caml_bytes_setf32(s, caml_checked_int64_to_int(i), f32) ++} ++ + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_failwith + //If: js-string + function caml_string_setf32(s, i, f32) { +@@ -412,8 +454,16 @@ + } + + //Provides: caml_string_setf32 ++//Alias: caml_string_setf32_indexed_by_int32 ++//Alias: caml_string_setf32_indexed_by_nativeint + //Requires: caml_bytes_setf32 + //If: !js-string + function caml_string_setf32(s, i, f32) { + return caml_bytes_setf32(s, i, f32); + } ++ ++//Provides: caml_string_setf32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_setf32 ++function caml_string_setf32_indexed_by_int64(s, i, f32) { ++ return caml_string_setf32(s, caml_checked_int64_to_int(i), f32) ++} +--- a/runtime/js/int64.js ++++ b/runtime/js/int64.js +@@ -352,6 +352,27 @@ + return x.toInt(); + } + ++//Provides: caml_checked_int64_to_int const ++//Requires: caml_int64_of_int32, caml_failwith ++function caml_checked_int64_to_int (x) { ++ if (x.compare(caml_int64_of_int32(0x7FFFFFFF)) == 1 ++ || x.compare(caml_int64_of_int32(0x80000000)) == -1) ++ caml_failwith("error while converting from int64") ++ return x.toInt() ++} ++ ++//Provides: caml_array_unsafe_get_indexed_by_int64 (mutable, const) ++//Requires: caml_int64_to_int32, caml_array_get ++function caml_array_unsafe_get_indexed_by_int64 (array, index) { ++ return caml_array_get(array, caml_int64_to_int32(index)); ++} ++ ++//Provides: caml_array_unsafe_set_indexed_by_int64 (mutable, const, mutable) ++//Requires: caml_int64_to_int32, caml_array_set ++function caml_array_unsafe_set_indexed_by_int64 (array, index, newval) { ++ return caml_array_set(array, caml_int64_to_int32(index), newval) ++} ++ + //Provides: caml_int64_to_float const + function caml_int64_to_float(x) { + return x.toFloat(); +--- a/runtime/js/mlBytes.js ++++ b/runtime/js/mlBytes.js +@@ -251,6 +251,8 @@ + } + + //Provides: caml_string_get16 ++//Alias: caml_string_get16_indexed_by_int32 ++//Alias: caml_string_get16_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get16(s, i) { +@@ -260,7 +262,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_string_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get16 ++function caml_string_get16_indexed_by_int64(s, i) { ++ return caml_string_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get16 ++//Alias: caml_bytes_get16_indexed_by_int32 ++//Alias: caml_bytes_get16_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get16(s, i) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -269,7 +279,15 @@ + return (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get16 ++function caml_bytes_get16_indexed_by_int64(s, i) { ++ return caml_bytes_get16(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get32 ++//Alias: caml_string_get32_indexed_by_int32 ++//Alias: caml_string_get32_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_ml_string_length + function caml_string_get32(s, i) { +@@ -281,7 +299,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_string_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get32 ++function caml_string_get32_indexed_by_int64(s, i) { ++ return caml_string_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get32 ++//Alias: caml_bytes_get32_indexed_by_int32 ++//Alias: caml_bytes_get32_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + function caml_bytes_get32(s, i) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -292,7 +318,15 @@ + return (b4 << 24) | (b3 << 16) | (b2 << 8) | b1; + } + ++//Provides: caml_bytes_get32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get32 ++function caml_bytes_get32_indexed_by_int64(s, i) { ++ return caml_bytes_get32(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_string_get64 ++//Alias: caml_string_get64_indexed_by_int32 ++//Alias: caml_string_get64_indexed_by_nativeint + //Requires: caml_string_unsafe_get, caml_string_bound_error + //Requires: caml_int64_of_bytes + //Requires: caml_ml_string_length +@@ -305,7 +339,15 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_string_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_string_get64 ++function caml_string_get64_indexed_by_int64(s, i) { ++ return caml_string_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get64 ++//Alias: caml_bytes_get64_indexed_by_int32 ++//Alias: caml_bytes_get64_indexed_by_nativeint + //Requires: caml_bytes_unsafe_get, caml_bytes_bound_error + //Requires: caml_int64_of_bytes + function caml_bytes_get64(s, i) { +@@ -317,6 +359,12 @@ + return caml_int64_of_bytes(a); + } + ++//Provides: caml_bytes_get64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_get64 ++function caml_bytes_get64_indexed_by_int64(s, i) { ++ return caml_bytes_get64(s, caml_checked_int64_to_int(i)) ++} ++ + //Provides: caml_bytes_get + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_get + function caml_bytes_get(s, i) { +@@ -340,6 +388,8 @@ + } + + //Provides: caml_bytes_set16 ++//Alias: caml_bytes_set16_indexed_by_int32 ++//Alias: caml_bytes_set16_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set16(s, i, i16) { + if (i >>> 0 >= s.l - 1) caml_bytes_bound_error(); +@@ -350,7 +400,15 @@ + return 0; + } + ++//Provides: caml_bytes_set16_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set16 ++function caml_bytes_set16_indexed_by_int64(s, i, i16) { ++ return caml_bytes_set16(s, caml_checked_int64_to_int(i), i16) ++} ++ + //Provides: caml_bytes_set32 ++//Alias: caml_bytes_set32_indexed_by_int32 ++//Alias: caml_bytes_set32_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set32(s, i, i32) { + if (i >>> 0 >= s.l - 3) caml_bytes_bound_error(); +@@ -365,7 +423,15 @@ + return 0; + } + ++//Provides: caml_bytes_set32_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set32 ++function caml_bytes_set32_indexed_by_int64(s, i, i32) { ++ return caml_bytes_set32(s, caml_checked_int64_to_int(i), i32) ++} ++ + //Provides: caml_bytes_set64 ++//Alias: caml_bytes_set64_indexed_by_int32 ++//Alias: caml_bytes_set64_indexed_by_nativeint + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + //Requires: caml_int64_to_bytes + function caml_bytes_set64(s, i, i64) { +@@ -377,6 +443,12 @@ + return 0; + } + ++//Provides: caml_bytes_set64_indexed_by_int64 ++//Requires: caml_checked_int64_to_int, caml_bytes_set64 ++function caml_bytes_set64_indexed_by_int64(s, i, i64) { ++ return caml_bytes_set64(s, caml_checked_int64_to_int(i), i64) ++} ++ + //Provides: caml_bytes_set + //Requires: caml_bytes_bound_error, caml_bytes_unsafe_set + function caml_bytes_set(s, i, c) { +--- a/runtime/wasm/bigarray.wat ++++ b/runtime/wasm/bigarray.wat +@@ -90,6 +90,8 @@ + (func $Int32_val (param (ref eq)) (result i32))) + (import "int32" "caml_copy_nativeint" + (func $caml_copy_nativeint (param i32) (result (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + (import "int64" "caml_copy_int64" + (func $caml_copy_int64 (param i64) (result (ref eq)))) + (import "int64" "Int64_val" +@@ -176,7 +178,9 @@ + (field $ba_kind i8) ;; kind + (field $ba_layout i8)))) ;; layout + +- (func $double_to_float16 (param $f f64) (result i32) ++ (func $double_to_float16 ++ (export "caml_float16_of_double") ++ (param $f f64) (result i32) + (local $x i32) (local $sign i32) (local $o i32) + (local.set $x (i32.reinterpret_f32 (f32.demote_f64 (local.get $f)))) + (local.set $sign (i32.and (local.get $x) (i32.const 0x80000000))) +@@ -206,7 +210,9 @@ + (i32.const 13))))))) + (i32.or (local.get $o) (i32.shr_u (local.get $sign) (i32.const 16)))) + +- (func $float16_to_double (param $d i32) (result f64) ++ (func $float16_to_double ++ (export "caml_double_of_float16") ++ (param $d i32) (result f64) + (local $f f32) + (local.set $f + (f32.mul +@@ -2009,125 +2015,207 @@ + (br $loop)))) + (return (i32.const 0))) + +- (func (export "caml_ba_uint8_get16") +- (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (func $caml_ba_uint8_get16_indexed_by_int32 ++ (export "caml_ba_uint8_get16_indexed_by_int32") ++ (export "caml_ba_uint8_get16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $p)))) ++ (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get32") +- (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (func (export "caml_ba_uint8_get16") ++ (param $vba (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_get16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get32_indexed_by_int32 ++ (export "caml_ba_uint8_get32_indexed_by_int32") ++ (export "caml_ba_uint8_get32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i32) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (return_call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (return_call $ta_get32_ui8 (local.get $data) (local.get $i))) ++ ++ (func (export "caml_ba_uint8_get32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) + +- (func (export "caml_ba_uint8_get64") +- (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (func (export "caml_ba_uint8_get32") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_ba_uint8_get32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_get64_indexed_by_int32 ++ (export "caml_ba_uint8_get64_indexed_by_int32") ++ (export "caml_ba_uint8_get64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (result i64) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) + (i64.or + (i64.extend_i32_u +- (call $ta_get32_ui8 (local.get $data) (local.get $p))) ++ (call $ta_get32_ui8 (local.get $data) (local.get $i))) + (i64.shl (i64.extend_i32_u + (call $ta_get32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)))) + +- (func (export "caml_ba_uint8_set16") +- (param $vba (ref eq)) (param $i (ref eq)) (param $v (ref eq)) ++ (func (export "caml_ba_uint8_get64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func (export "caml_ba_uint8_get64") ++ (param $vba (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_ba_uint8_get64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_ba_uint8_set16_indexed_by_int32 ++ (export "caml_ba_uint8_set16_indexed_by_int32") ++ (export "caml_ba_uint8_set16_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $v (ref eq)) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) (local $d (ref i31)) ++ (local $d (ref i31)) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) + (local.set $d (ref.cast (ref i31) (local.get $v))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set16_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set16_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set32") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) ++ (func (export "caml_ba_uint8_set16_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set16") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set16_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set32_indexed_by_int32 ++ (export "caml_ba_uint8_set32_indexed_by_int32") ++ (export "caml_ba_uint8_set32_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i32) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) (local.get $d)) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) (local.get $d)) + (ref.i31 (i32.const 0))) + +- (func (export "caml_ba_uint8_set64") +- (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) ++ (func (export "caml_ba_uint8_set32_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set32") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ (func $caml_ba_uint8_set64_indexed_by_int32 ++ (export "caml_ba_uint8_set64_indexed_by_int32") ++ (export "caml_ba_uint8_set64_indexed_by_nativeint") ++ (param $vba (ref eq)) (param $i i32) (param $d i64) + (result (ref eq)) + (local $ba (ref $bigarray)) + (local $data (ref extern)) +- (local $p i32) + (local.set $ba (ref.cast (ref $bigarray) (local.get $vba))) + (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.get $int_array + (struct.get $bigarray $ba_dim (local.get $ba)) + (i32.const 0))) + (then (call $caml_bound_error))) +- (call $ta_set32_ui8 (local.get $data) (local.get $p) ++ (call $ta_set32_ui8 (local.get $data) (local.get $i) + (i32.wrap_i64 (local.get $d))) + (call $ta_set32_ui8 (local.get $data) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $d) (i64.const 32)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_ba_uint8_set64_indexed_by_int64") ++ (param $vba (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_ba_uint8_set64") ++ (param $vba (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_ba_uint8_set64_indexed_by_int32 ++ (local.get $vba) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ + (export "caml_bytes_of_uint8_array" (func $caml_string_of_uint8_array)) + (func $caml_string_of_uint8_array (export "caml_string_of_uint8_array") + (param (ref eq)) (result (ref eq)) +--- a/runtime/wasm/float32.wat ++++ b/runtime/wasm/float32.wat +@@ -41,14 +41,34 @@ + (func $caml_ba_set_3 (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)))) + (import "bigarray" "caml_ba_uint8_get32" + (func $caml_ba_uint8_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int32" ++ (func $caml_ba_uint8_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "bigarray" "caml_ba_uint8_get32_indexed_by_int64" ++ (func $caml_ba_uint8_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "bigarray" "caml_ba_uint8_set32" + (func $caml_ba_uint8_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int32" ++ (func $caml_ba_uint8_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "bigarray" "caml_ba_uint8_set32_indexed_by_int64" ++ (func $caml_ba_uint8_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "string" "caml_string_get32" + (func $caml_string_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int32" ++ (func $caml_string_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_string_get32_indexed_by_int64" ++ (func $caml_string_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_get32" + (func $caml_bytes_get32 (param (ref eq)) (param (ref eq)) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int32" ++ (func $caml_bytes_get32_indexed_by_int32 (param (ref eq)) (param i32) (result i32))) ++ (import "string" "caml_bytes_get32_indexed_by_int64" ++ (func $caml_bytes_get32_indexed_by_int64 (param (ref eq)) (param i64) (result i32))) + (import "string" "caml_bytes_set32" + (func $caml_bytes_set32 (param (ref eq)) (param (ref eq)) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int32" ++ (func $caml_bytes_set32_indexed_by_int32 (param (ref eq)) (param i32) (param i32) (result (ref eq)))) ++ (import "string" "caml_bytes_set32_indexed_by_int64" ++ (func $caml_bytes_set32_indexed_by_int64 (param (ref eq)) (param i64) (param i32) (result (ref eq)))) + (import "array" "caml_make_vect" + (func $caml_make_vect (param (ref eq)) (param (ref eq)) (result (ref eq)))) + +@@ -686,23 +706,87 @@ + (call $box_float32 (f32.reinterpret_i32 + (call $caml_ba_uint8_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_ba_uint8_getf32_indexed_by_int32 ++ (export "caml_ba_uint8_getf32_indexed_by_int32") ++ (export "caml_ba_uint8_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_ba_uint8_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_ba_uint8_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_ba_uint8_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_ba_uint8_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ++ (func $caml_ba_uint8_setf32_indexed_by_int32 ++ (export "caml_ba_uint8_setf32_indexed_by_int32") ++ (export "caml_ba_uint8_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_ba_uint8_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_ba_uint8_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ + (func (export "caml_string_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_string_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_string_getf32_indexed_by_int32 ++ (export "caml_string_getf32_indexed_by_int32") ++ (export "caml_string_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_string_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_string_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_getf32") + (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $box_float32 (f32.reinterpret_i32 + (call $caml_bytes_get32 (local.get 0) (local.get 1))))) + ++ (func $caml_bytes_getf32_indexed_by_int32 ++ (export "caml_bytes_getf32_indexed_by_int32") ++ (export "caml_bytes_getf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int32 (local.get 0) (local.get 1))))) ++ ++ (func (export "caml_bytes_getf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (result (ref eq)) ++ (call $box_float32 (f32.reinterpret_i32 ++ (call $caml_bytes_get32_indexed_by_int64 (local.get 0) (local.get 1))))) ++ ++ + (func (export "caml_bytes_setf32") + (param (ref eq)) (param (ref eq)) (param (ref eq)) (result (ref eq)) + (call $caml_bytes_set32 (local.get 0) (local.get 1) + (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func $caml_bytes_setf32_indexed_by_int32 ++ (export "caml_bytes_setf32_indexed_by_int32") ++ (export "caml_bytes_setf32_indexed_by_nativeint") ++ (param (ref eq)) (param i32) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) ++ ++ (func (export "caml_bytes_setf32_indexed_by_int64") ++ (param (ref eq)) (param i64) (param (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int64 (local.get 0) (local.get 1) ++ (i32.reinterpret_f32 (call $unbox_float32 (local.get 2))))) + ) +--- a/runtime/wasm/int32.wat ++++ b/runtime/wasm/int32.wat +@@ -124,6 +124,21 @@ + (call $parse_int + (local.get $v) (i32.const 32) (global.get $INT32_ERRMSG)))) + ++ (data $integer_conversion_error "error while converting from int32") ++ ++ (func $caml_checked_int32_to_int (export "caml_checked_int32_to_int") ++ (param i32) (result (ref eq)) ++ (if (i32.or (i32.gt_s (local.get 0) (i32.const 0x3FFFFFFF)) ++ (i32.lt_s (local.get 0) (i32.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (local.get 0))) ++ ++ (func $caml_checked_nativeint_to_int (export "caml_checked_nativeint_to_int") ++ (param i32) (result (ref eq)) ++ (call $caml_checked_int32_to_int (local.get 0))) ++ + (export "caml_nativeint_compare" (func $caml_int32_compare)) + (func $caml_int32_compare (export "caml_int32_compare") + (param $i1 i32) (param $i2 i32) (result (ref eq)) +@@ -177,4 +192,6 @@ + (return_call $format_int (local.get 0) + (struct.get $int32 1 + (ref.cast (ref $int32) (local.get 1))) (i32.const 0))) ++ ++ + ) +--- a/runtime/wasm/int64.wat ++++ b/runtime/wasm/int64.wat +@@ -317,4 +317,26 @@ + (local.get $uppercase))))))))) + (local.get $s)) + ++ (data $integer_conversion_error "error while converting from int64") ++ ++ (func $caml_checked_int64_to_int (export "caml_checked_int64_to_int") ++ (param (ref eq)) (result (ref eq)) ++ (local $i i64) ++ (local.set $i ++ (struct.get $int64 1 (ref.cast (ref $int64) (local.get 0)))) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (ref.i31 (i32.wrap_i64 (local.get $i)))) ++ ++ (func (export "caml_checked_int64_to_int32") ++ (param $i i64) (result i32) ++ (if (i32.or (i64.gt_s (local.get $i) (i64.const 0x3FFFFFFF)) ++ (i64.lt_s (local.get $i) (i64.const -0x40000000))) ++ (then (call $caml_failwith ++ (array.new_data $bytes $integer_conversion_error ++ (i32.const 0) (i32.const 33))))) ++ (i32.wrap_i64 (local.get $i))) + ) +--- a/runtime/wasm/string.wat ++++ b/runtime/wasm/string.wat +@@ -19,6 +19,8 @@ + (import "fail" "caml_bound_error" (func $caml_bound_error)) + (import "fail" "caml_invalid_argument" + (func $caml_invalid_argument (param $arg (ref eq)))) ++ (import "int64" "caml_checked_int64_to_int32" ++ (func $caml_checked_int64_to_int32 (param $i i64) (result i32))) + + (type $bytes (array (mut i8))) + +@@ -153,171 +155,274 @@ + (i31.get_u (ref.cast (ref i31) (local.get $len)))) + (ref.i31 (i32.const 0))) + +- (export "caml_string_get16" (func $caml_bytes_get16)) +- (func $caml_bytes_get16 (export "caml_bytes_get16") +- (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int32 ++ (export "caml_bytes_get16_indexed_by_int32") ++ (export "caml_bytes_get16_indexed_by_nativeint") ++ (export "caml_string_get16_indexed_by_int32") ++ (export "caml_string_get16_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (ref.i31 (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))))) + +- (export "caml_string_get32" (func $caml_bytes_get32)) +- (func $caml_bytes_get32 (export "caml_bytes_get32") +- (param $v (ref eq)) (param $i (ref eq)) (result i32) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get16_indexed_by_int64 ++ (export "caml_bytes_get16_indexed_by_int64") ++ (export "caml_string_get16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get16 ++ (export "caml_bytes_get16") ++ (export "caml_string_get16") ++ (param $v (ref eq)) (param $i (ref eq)) (result (ref eq)) ++ (call $caml_bytes_get16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get32_indexed_by_int32 ++ (export "caml_bytes_get32_indexed_by_int32") ++ (export "caml_bytes_get32_indexed_by_nativeint") ++ (export "caml_string_get32_indexed_by_int32") ++ (export "caml_string_get32_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i32) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i32.or + (i32.or +- (array.get_u $bytes (local.get $s) (local.get $p)) ++ (array.get_u $bytes (local.get $s) (local.get $i)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1))) ++ (i32.add (local.get $i) (i32.const 1))) + (i32.const 8))) + (i32.or + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2))) ++ (i32.add (local.get $i) (i32.const 2))) + (i32.const 16)) + (i32.shl (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3))) ++ (i32.add (local.get $i) (i32.const 3))) + (i32.const 24))))) + +- (export "caml_string_get64" (func $caml_bytes_get64)) +- (func $caml_bytes_get64 (export "caml_bytes_get64") +- (param $v (ref eq)) (param $i (ref eq)) (result i64) +- (local $s (ref $bytes)) (local $p i32) ++ (func $caml_bytes_get32_indexed_by_int64 ++ (export "caml_bytes_get32_indexed_by_int64") ++ (export "caml_string_get32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get32 ++ (export "caml_bytes_get32") ++ (export "caml_string_get32") ++ (param $v (ref eq)) (param $i (ref eq)) (result i32) ++ (call $caml_bytes_get32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ (func $caml_bytes_get64_indexed_by_int32 ++ (export "caml_bytes_get64_indexed_by_int32") ++ (export "caml_bytes_get64_indexed_by_nativeint") ++ (export "caml_string_get64_indexed_by_int32") ++ (export "caml_string_get64_indexed_by_nativeint") ++ (param $v (ref eq)) (param $i i32) (result i64) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get $v))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) + (i64.or + (i64.or + (i64.or + (i64.extend_i32_u +- (array.get_u $bytes (local.get $s) (local.get $p))) ++ (array.get_u $bytes (local.get $s) (local.get $i))) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)))) ++ (i32.add (local.get $i) (i32.const 1)))) + (i64.const 8))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)))) ++ (i32.add (local.get $i) (i32.const 2)))) + (i64.const 16)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)))) ++ (i32.add (local.get $i) (i32.const 3)))) + (i64.const 24)))) + (i64.or + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)))) ++ (i32.add (local.get $i) (i32.const 4)))) + (i64.const 32)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)))) ++ (i32.add (local.get $i) (i32.const 5)))) + (i64.const 40))) + (i64.or + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)))) ++ (i32.add (local.get $i) (i32.const 6)))) + (i64.const 48)) + (i64.shl (i64.extend_i32_u + (array.get_u $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)))) ++ (i32.add (local.get $i) (i32.const 7)))) + (i64.const 56)))))) + +- (func (export "caml_bytes_set16") +- (param (ref eq) (ref eq) (ref eq)) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) (local $v i32) ++ (func $caml_bytes_get64_indexed_by_int64 ++ (export "caml_bytes_get64_indexed_by_int64") ++ (export "caml_string_get64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)))) ++ ++ (func $caml_bytes_get64 ++ (export "caml_bytes_get64") ++ (export "caml_string_get64") ++ (param $v (ref eq)) (param $i (ref eq)) (result i64) ++ (call $caml_bytes_get64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))))) ++ ++ ++ (func $caml_bytes_set16_indexed_by_int32 ++ (export "caml_bytes_set16_indexed_by_int32") ++ (export "caml_bytes_set16_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param (ref eq)) (result (ref eq)) ++ (local $s (ref $bytes)) (local $v i32) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) + (local.set $v (i31.get_s (ref.cast (ref i31) (local.get 2)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 1)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set32") +- (param (ref eq)) (param (ref eq)) (param $v i32) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set16_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set16") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d (ref eq)) (result (ref eq)) ++ (call $caml_bytes_set16_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set32_indexed_by_int32 ++ (export "caml_bytes_set32_indexed_by_int32") ++ (export "caml_bytes_set32_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i32) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 3)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) (local.get $v)) ++ (array.set $bytes (local.get $s) (local.get $i) (local.get $v)) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.shr_u (local.get $v) (i32.const 8))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.shr_u (local.get $v) (i32.const 16))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.shr_u (local.get $v) (i32.const 24))) + (ref.i31 (i32.const 0))) + +- (func (export "caml_bytes_set64") +- (param (ref eq)) (param (ref eq)) (param $v i64) (result (ref eq)) +- (local $s (ref $bytes)) (local $p i32) ++ (func (export "caml_bytes_set32_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set32") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i32) (result (ref eq)) ++ (call $caml_bytes_set32_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ ++ (func $caml_bytes_set64_indexed_by_int32 ++ (export "caml_bytes_set64_indexed_by_int32") ++ (export "caml_bytes_set64_indexed_by_nativeint") ++ (param (ref eq)) (param $i i32) (param $v i64) (result (ref eq)) ++ (local $s (ref $bytes)) + (local.set $s (ref.cast (ref $bytes) (local.get 0))) +- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get 1)))) +- (if (i32.lt_s (local.get $p) (i32.const 0)) ++ (if (i32.lt_s (local.get $i) (i32.const 0)) + (then (call $caml_bound_error))) +- (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) ++ (if (i32.ge_u (i32.add (local.get $i) (i32.const 7)) + (array.len (local.get $s))) + (then (call $caml_bound_error))) +- (array.set $bytes (local.get $s) (local.get $p) ++ (array.set $bytes (local.get $s) (local.get $i) + (i32.wrap_i64 (local.get $v))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 1)) ++ (i32.add (local.get $i) (i32.const 1)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 8)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 2)) ++ (i32.add (local.get $i) (i32.const 2)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 16)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 3)) ++ (i32.add (local.get $i) (i32.const 3)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 24)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 4)) ++ (i32.add (local.get $i) (i32.const 4)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 32)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 5)) ++ (i32.add (local.get $i) (i32.const 5)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 40)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 6)) ++ (i32.add (local.get $i) (i32.const 6)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 48)))) + (array.set $bytes (local.get $s) +- (i32.add (local.get $p) (i32.const 7)) ++ (i32.add (local.get $i) (i32.const 7)) + (i32.wrap_i64 (i64.shr_u (local.get $v) (i64.const 56)))) + (ref.i31 (i32.const 0))) + ++ (func (export "caml_bytes_set64_indexed_by_int64") ++ (param $v (ref eq)) (param $i i64) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (call $caml_checked_int64_to_int32 (local.get $i)) ++ (local.get $d))) ++ ++ (func (export "caml_bytes_set64") ++ (param $v (ref eq)) (param $i (ref eq)) (param $d i64) (result (ref eq)) ++ (call $caml_bytes_set64_indexed_by_int32 ++ (local.get $v) ++ (i31.get_s (ref.cast (ref i31) (local.get $i))) ++ (local.get $d))) ++ ++ + (func (export "caml_string_concat") + (param $vs1 (ref eq)) (param $vs2 (ref eq)) (result (ref eq)) + (local $s1 (ref $bytes)) (local $s2 (ref $bytes)) diff --git a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/opam b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/opam index 0987f93155..de927e7396 100644 --- a/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/opam +++ b/packages/wasm_of_ocaml-compiler/wasm_of_ocaml-compiler.6.0.1+ox/opam @@ -19,7 +19,7 @@ depends: [ "num" {with-test} "ppx_expect" {>= "v0.14.2" & with-test} "ppxlib" {= "0.33.0+ox"} - "re" {with-test} + "re" {with-test & = "1.14.0+ox"} "cmdliner" {>= "1.1.0"} "opam-format" {with-test} "sedlex" {= "3.3+ox"} @@ -43,9 +43,9 @@ dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git" x-commit-hash: "b6d60e4f8ff35e7c7b3bb52b97ffedc3eb8e3d08" url { src: - "https://github.com/ocsigen/js_of_ocaml/archive/a8e8d2c1696a5fb3ddb4fe15495b1a8625a29b4b.tar.gz" + "https://github.com/ocsigen/js_of_ocaml/archive/246df644334aa97103d1051aec128337ea1868f9.tar.gz" checksum: - "sha256=b1e1ebd799547b33eec43b4d934bfde475b0ff4d20eba36d36147ee6d8db173c" + "sha256=c43572970512140facf02a30f16d4b34c10d55326bbd3d3c125bc2e549ef4ab8" } patches: [ "js_of_ocaml-magic_number.ml.patch" @@ -65,17 +65,13 @@ patches: [ "js_of_ocaml-caml_provides_sub_local.patch" "js_of_ocaml-caml_hash_exn.patch" "wasm_of_ocaml-bring-back-eval.patch" - "js_of_ocaml-index-by-unboxed-int.patch" "js_of_ocaml-mixed-block-bytecode-op.patch" "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" "js_of_ocaml-int_u-array-primitives.patch" - "js_of_ocaml-n-ary-functions.patch" "js_of_ocaml-symtable-5.2-api.patch" - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" "js_of_ocaml-jane-street-5.2-compatibility.patch" "js_of_ocaml-migrate-labeled-tuples-shims.patch" "js_of_ocaml-floatarray_create_local.patch" - "wasm_of_ocaml-sourcemap-contents.patch" "js_of_ocaml-jane-street-const_null-support.patch" "js_of_ocaml-float32.patch" "js_of_ocaml-caml_array_append.patch" @@ -83,17 +79,30 @@ patches: [ "js_of_ocaml-5.3-tests-runtime.patch" "js_of_ocaml-caml_bigstring_strncmp.patch" "wasm_of_ocaml-stub-caml_ml_set_channel_refill.patch" - "js_of_ocaml-float32-2.patch" + "js_of_ocaml-no-compression-module-5.2.patch" + "js_of_ocaml-obj_stubs.patch" + "js_of_ocaml-global_deadcode-fix.patch" + "js_of_ocaml-local-bytes.patch" + "js_of_ocaml-n-ary-functions.patch" + "js_of_ocaml-optcomp_lite_fixes.patch" + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "js_of_ocaml-gh2034.patch" + "js_of_ocaml-unboxed-indexing.patch" + "js_of_ocaml-atomics.patch" + "js_of_ocaml-flipped-conditions-in-test.patch" + "js_of_ocaml-atomic-cmpxchg.patch" + "js_of_ocaml-small-int-literals.patch" "dune.patch" ] extra-files: [ [ "js_of_ocaml-magic_number.ml.patch" - "sha256=7feef837352414b5f102705c01915da98c3186f3559d92e94b63ad912c11dddd" + "sha256=05e204eac0338a76ca02db89ebb9505d80a7e268b93b746408356be913e219e6" ] [ "js_of_ocaml-compilation_unit-name.patch" - "sha256=63ebbb630149ade7f377dc8940d58968d7a44cef4911d67fc49a7fe10446eb1f" + "sha256=1e00a73f66cbaa87eefb45702eaaf431978f8eb9ed95684c781b0ebb035d1a7f" ] [ "js_of_ocaml-with_async_exns.patch" @@ -105,7 +114,7 @@ extra-files: [ ] [ "js_of_ocaml-add-unboxed-and-float-block.patch" - "sha256=625447650ca1c56f597000c3a7191309d1f1ed795f3670bc367d6383a07fc07e" + "sha256=db409edb2be9be828015b6722fb51d7bccdd1e4a7edf982b5c8d89808713af7b" ] [ "js_of_ocaml-ident-is_global.patch" @@ -113,7 +122,7 @@ extra-files: [ ] [ "js_of_ocaml-remove-float-externals.patch" - "sha256=a3aa95ee08210377c1470e5bf0f832bc27ad98299bca22c7a88eb9fd6c32e655" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-ocaml_version-ppx.patch" @@ -121,15 +130,15 @@ extra-files: [ ] [ "js_of_ocaml-test-diffs-caused-by-build-differences.patch" - "sha256=00d38ead67c67220351605d72c2b3a4e3faa8053087ef8ab47b7067b42900ba9" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-fix-build_fs.patch" - "sha256=6373ba10c70f77a2c5999bfec2484657a32450e44a3dfb04ce6bcaa05464d890" + "sha256=abaa404bf23a77cf1badfe30ab9fcc13c6fb0446a81fa10b0962ed1ba9005d6a" ] [ "js_of_ocaml-iarray-primitives.patch" - "sha256=1cefd949dad720858306c87e349dd927c402f292d7b7c770542f0b28bc8dc1b8" + "sha256=037ad55684c9ac3801ff284839d8bb1290d2e750cd4bcb03b75e5f4ab69559c9" ] [ "js_of_ocaml-important-config-changes.patch" @@ -137,7 +146,7 @@ extra-files: [ ] [ "js_of_ocaml-internal-ocaml-5-compatibility.patch" - "sha256=60cef558cd8c6ec4679c02e38e97933c9427d7de5e18bc151a60b4be9512fb36" + "sha256=6b7e17df7f0142158eca19a953422eb6eaf97a3f7f3f2443648bfd069fbcb90f" ] [ "js_of_ocaml-wasm-temp-differences.patch" @@ -155,13 +164,9 @@ extra-files: [ "wasm_of_ocaml-bring-back-eval.patch" "sha256=c413d9617e1122a9fdad8f1f63859bdf9f17a8440f78bdfbaecc432bae580fac" ] - [ - "js_of_ocaml-index-by-unboxed-int.patch" - "sha256=9983ff547de81845e0da06da547c6191671a72a5e1b321594b6d326b0e079e80" - ] [ "js_of_ocaml-mixed-block-bytecode-op.patch" - "sha256=289db81bcf2d12c5aa98e7cc14d4831eac38ba4795da862a4a78ed771c3c8ad9" + "sha256=ed6cfee285491515d497e8871c8534236e9a77939c3838dfd5b3fdb20626e347" ] [ "js_of_ocaml-mixed-block-bytecode-op-regression-test.patch" @@ -171,18 +176,10 @@ extra-files: [ "js_of_ocaml-int_u-array-primitives.patch" "sha256=99eba4301613d03e0305017a687c768bd24a22cef0db25ab62cbc3d304f647ba" ] - [ - "js_of_ocaml-n-ary-functions.patch" - "sha256=0f6c5da3756755db191492701c2df598426cdf57254b5366798dbd1f893e7e90" - ] [ "js_of_ocaml-symtable-5.2-api.patch" "sha256=9a999950e8984cc582e3830f447111e1082dc720609334de66a011347d26da9b" ] - [ - "js_of_ocaml-re-allow-int32-nativeint-in-js.patch" - "sha256=66afc6da651cd22984aec74f64ad6aaf1b211c6ce5a070fe444377cdaa44f14a" - ] [ "js_of_ocaml-jane-street-5.2-compatibility.patch" "sha256=45391a7a7da6c5bfbe97ec1272cb369d533c2d95cf7a7a56d754db94871eb043" @@ -195,17 +192,13 @@ extra-files: [ "js_of_ocaml-floatarray_create_local.patch" "sha256=f17e392acc941dde475cb7be0654037df9b8d550aeae0d96b65394e4c4a1d4ca" ] - [ - "wasm_of_ocaml-sourcemap-contents.patch" - "sha256=93b7dddf6313836ce02fbe762c40380e20daefdd8b87ec885ee0f4ef779ad76b" - ] [ "js_of_ocaml-jane-street-const_null-support.patch" "sha256=e708cdc01c0cef3fce1cb9f31b33324977dcca1c166601905fcac1ef10262c3a" ] [ "js_of_ocaml-float32.patch" - "sha256=5f83c34b274dd002e28ace3a93c7beca470bfb85d0037da5e090dcc05a792a20" + "sha256=8d6ebad1481711f57c5ed6dd36187b96ce8fcc51cdf3b0e9d5c277687601c625" ] [ "js_of_ocaml-caml_array_append.patch" @@ -213,11 +206,11 @@ extra-files: [ ] [ "js_of_ocaml-5.2.0-compiler-changes.patch" - "sha256=f71cba10b0c5ca093aa5150cc63ee3ee5bba390b3342601f77421559d8ae14fe" + "sha256=12626322e63a8eaf68d4c8a1a1d3f428832869fae7020588e0fe40bbd8fd8cf8" ] [ "js_of_ocaml-5.3-tests-runtime.patch" - "sha256=bb46bb5c80ace0140edd40c5858c7117f27dc2d0edd869a8b3b4e90aab7199f0" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ] [ "js_of_ocaml-caml_bigstring_strncmp.patch" @@ -228,8 +221,60 @@ extra-files: [ "sha256=005bce63009b9539b65036b22a7b7cc531755c7caa3cf1ed8d8697698090e136" ] [ - "js_of_ocaml-float32-2.patch" - "sha256=3ff1eda6175f96cc3a5b2c2ae1ee395c9317d248554282c5f157c723a9fae32f" + "js_of_ocaml-no-compression-module-5.2.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-obj_stubs.patch" + "sha256=9e9064f255c065a3152f665bd5b464040f3cfbbd2580aa4bb6e17be9c2b7fcc8" + ] + [ + "js_of_ocaml-global_deadcode-fix.patch" + "sha256=5b49d6ee62ae87c77d88ea8022b022830f906367dc9b9ea2e582f037a739292f" + ] + [ + "js_of_ocaml-local-bytes.patch" + "sha256=1c6170fec57089f515ec71bd9873d48bd5ae9c4a85f14b80f33039cce9f232ae" + ] + [ + "js_of_ocaml-n-ary-functions.patch" + "sha256=b9b078c1f227624cc5fc9dd574c19785354267c19299dcf2f9b9642d0114eddf" + ] + [ + "js_of_ocaml-optcomp_lite_fixes.patch" + "sha256=b98305f8885c0377714677b2ca6d0d561c18bee6a8fc0d2f9d0abf52694968e0" + ] + [ + "js_of_ocaml-revert_9c15703872_behavior_changing_rewrite_of_float_to_bits.patch" + "sha256=899ec90b4c1f5f1251d2c77fdb842f11b5a07d01430da4e5c75610d4bf541faa" + ] + [ + "js_of_ocaml-stop_evaluating_caml_int64_bits_of_float_to_avoid_breaking_float_u.patch" + "sha256=483e848b0dfe54b75c31cd990191730c0070ad8a21912b1beca97111e01a718e" + ] + [ + "js_of_ocaml-gh2034.patch" + "sha256=ec01ea15a9d21c22790ad3c93e9d68154e364462de6a2ce1dbbb62e8af25fc2d" + ] + [ + "js_of_ocaml-unboxed-indexing.patch" + "sha256=2c8b76947795fa34683e7c2bf1022a95058bde146c7832e1bd6e8a33b8d6cfc7" + ] + [ + "js_of_ocaml-atomics.patch" + "sha256=cfe956bb047c252faa2397ff2badca80972d74e1dca0cb633202313dfb8f5da4" + ] + [ + "js_of_ocaml-flipped-conditions-in-test.patch" + "sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] + [ + "js_of_ocaml-atomic-cmpxchg.patch" + "sha256=89612eb8c1e64898205c0b59c6b73987d2ff993a8c366fb61dac6db90e2806bc" + ] + [ + "js_of_ocaml-small-int-literals.patch" + "sha256=4c3fd2d3a50d220af2bdd377016e3f3354b98b770457ff200494be70bc9bb5b2" ] [ "dune.patch" diff --git a/packages/xpath/xpath.v0.18~preview.130.36+326/opam b/packages/xpath/xpath.v0.18~preview.130.55+197/opam similarity index 71% rename from packages/xpath/xpath.v0.18~preview.130.36+326/opam rename to packages/xpath/xpath.v0.18~preview.130.55+197/opam index 650385c940..5b5c0b5a0d 100644 --- a/packages/xpath/xpath.v0.18~preview.130.36+326/opam +++ b/packages/xpath/xpath.v0.18~preview.130.55+197/opam @@ -11,9 +11,9 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} - "simple_xml" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} + "simple_xml" {= "v0.18~preview.130.55+197"} "angstrom" {>= "0.15.0"} "dune" {>= "3.17.0"} ] @@ -26,7 +26,7 @@ This library contains a type definition for XPATHs, as well as way to """ url { src: - "https://github.com/janestreet/xpath/archive/3e287ec8b45a256b5885070e6ac20dc6d6b73f2a.tar.gz" + "https://github.com/janestreet/xpath/archive/802b47c3cf220a755af9f982c9d7b4b25e09dde0.tar.gz" checksum: - "sha256=d6c678cd5e6fe0572092610c3badbcd4782d10e65d59bfb89629606fc5afed6a" + "sha256=3ad19f3b1f8769cae77772e4957fe58550117487586b288ea482914bc16b2d82" } diff --git a/packages/zarith_stubs_js/zarith_stubs_js.v0.18~preview.130.36+326/opam b/packages/zarith_stubs_js/zarith_stubs_js.v0.18~preview.130.55+197/opam similarity index 80% rename from packages/zarith_stubs_js/zarith_stubs_js.v0.18~preview.130.36+326/opam rename to packages/zarith_stubs_js/zarith_stubs_js.v0.18~preview.130.55+197/opam index 538bcc50d7..253ea93242 100644 --- a/packages/zarith_stubs_js/zarith_stubs_js.v0.18~preview.130.36+326/opam +++ b/packages/zarith_stubs_js/zarith_stubs_js.v0.18~preview.130.55+197/opam @@ -22,7 +22,7 @@ all of the Zarith C stubs in Javascript for use in Js_of_ocaml """ url { src: - "https://github.com/janestreet/zarith_stubs_js/archive/0beaa74d5ab25fa2b8088a28fb613e98bb4fc603.tar.gz" + "https://github.com/janestreet/zarith_stubs_js/archive/55f3445d744c49ec3e143bbfcdf9582e0bb2caa5.tar.gz" checksum: - "sha256=d579d0e46729821803118255ba076cf18499914051f97db8a9547871a0dcab83" + "sha256=7f8e62e623a5e9ac2c9f0a2405b3a3eef9bd01884c6ebcb1237ca3631014b7f4" } diff --git a/packages/zstandard/zstandard.v0.18~preview.130.36+326/opam b/packages/zstandard/zstandard.v0.18~preview.130.55+197/opam similarity index 67% rename from packages/zstandard/zstandard.v0.18~preview.130.36+326/opam rename to packages/zstandard/zstandard.v0.18~preview.130.55+197/opam index c7bbbdd36a..17a5541ed8 100644 --- a/packages/zstandard/zstandard.v0.18~preview.130.36+326/opam +++ b/packages/zstandard/zstandard.v0.18~preview.130.55+197/opam @@ -12,11 +12,11 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "core" {= "v0.18~preview.130.36+326"} - "core_kernel" {= "v0.18~preview.130.36+326"} - "ppx_jane" {= "v0.18~preview.130.36+326"} + "core" {= "v0.18~preview.130.55+197"} + "core_kernel" {= "v0.18~preview.130.55+197"} + "ppx_jane" {= "v0.18~preview.130.55+197"} "conf-zstd" - "ctypes" {>= "0.18.0"} + "ctypes" {= "0.23.0+ox"} "dune" {>= "3.17.0"} "integers" ] @@ -27,7 +27,7 @@ Zstandard is a real-time compression algorithm which provides high compression r available: (arch = "x86_64" | arch = "arm64") & os = "linux" url { src: - "https://github.com/janestreet/zstandard/archive/495207b2493ff76ec3aea5d01d79a82f12262282.tar.gz" + "https://github.com/janestreet/zstandard/archive/f251a7b2caa8c03b293b9654a9eaea576df1c330.tar.gz" checksum: - "sha256=e33e694029b7e7835b632e36de0dd7663070f8da5f88f524f90d86b6316694ea" + "sha256=46297c640665f09376a66415c71308ce75b1507ce2acdde8a7a76a18ce4f9626" }