diff --git a/binaryen.opam b/binaryen.opam index 0591f426..6e17312b 100644 --- a/binaryen.opam +++ b/binaryen.opam @@ -16,6 +16,6 @@ depends: [ "dune" {>= "3.0.0"} "dune-configurator" {>= "3.0.0"} "js_of_ocaml-compiler" {>= "6.0.0" < "7.0.0"} - "libbinaryen" {>= "124.0.1" < "125.0.0"} + "libbinaryen" {>= "126.0.0" < "127.0.0"} ] x-maintenance-intent: ["0.(latest)"] diff --git a/esy.lock/index.json b/esy.lock/index.json index 637fbaaf..030a24fb 100644 --- a/esy.lock/index.json +++ b/esy.lock/index.json @@ -1,5 +1,5 @@ { - "checksum": "43b607828957b76c0263dc0b329d0237", + "checksum": "96afa77af8a42ec09752b5c36ff426b3", "root": "@grain/binaryen.ml@link-dev:./package.json", "node": { "ocaml@5.3.0@d41d8cd9": { @@ -40,11 +40,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -53,29 +53,29 @@ [ "windows", "x86_64" ] ] }, - "@opam/xdg@opam:3.20.2@ade9ef81": { - "id": "@opam/xdg@opam:3.20.2@ade9ef81", + "@opam/xdg@opam:3.21.1@fae5ea52": { + "id": "@opam/xdg@opam:3.21.1@fae5ea52", "name": "@opam/xdg", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "xdg", - "version": "3.20.2", - "path": "esy.lock/opam/xdg.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/xdg.3.21.1" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -103,7 +103,7 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.1@2377d2f8", - "@opam/ocamlfind@opam:1.9.8@ee910ff5", + "@opam/ocamlfind@opam:1.9.8@4b291364", "@opam/ocamlbuild@opam:0.16.1@b3fc8209", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@esy-ocaml/substs@0.0.1@d41d8cd9" @@ -136,7 +136,7 @@ "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/uutf@opam:1.0.4@ba7fbef7", "@opam/uucp@opam:17.0.0@843de755", "@opam/topkg@opam:1.1.1@2377d2f8", - "@opam/ocamlfind@opam:1.9.8@ee910ff5", + "@opam/ocamlfind@opam:1.9.8@4b291364", "@opam/ocamlbuild@opam:0.16.1@b3fc8209", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@esy-ocaml/substs@0.0.1@d41d8cd9" @@ -170,7 +170,7 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.1@2377d2f8", - "@opam/ocamlfind@opam:1.9.8@ee910ff5", + "@opam/ocamlfind@opam:1.9.8@4b291364", "@opam/ocamlbuild@opam:0.16.1@b3fc8209", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@esy-ocaml/substs@0.0.1@d41d8cd9" @@ -201,7 +201,7 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@ee910ff5", + "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@4b291364", "@opam/ocamlbuild@opam:0.16.1@b3fc8209", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], @@ -215,36 +215,69 @@ [ "windows", "x86_64" ] ] }, - "@opam/stdune@opam:3.20.2@c89dc074": { - "id": "@opam/stdune@opam:3.20.2@c89dc074", + "@opam/top-closure@opam:3.21.1@cbb083a2": { + "id": "@opam/top-closure@opam:3.21.1@cbb083a2", + "name": "@opam/top-closure", + "version": "opam:3.21.1", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + ], + "opam": { + "name": "top-closure", + "version": "3.21.1", + "path": "esy.lock/opam/top-closure.3.21.1" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" + ], + "available": [ + [ "darwin", "x86_64" ], + [ "darwin", "arm64" ], + [ "linux", "x86_64" ], + [ "windows", "x86_64" ] + ] + }, + "@opam/stdune@opam:3.21.1@7cf9c3a0": { + "id": "@opam/stdune@opam:3.21.1@7cf9c3a0", "name": "@opam/stdune", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "stdune", - "version": "3.20.2", - "path": "esy.lock/opam/stdune.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/stdune.3.21.1" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/pp@opam:2.0.0@2177bbde", - "@opam/ordering@opam:3.20.2@6865c105", - "@opam/dyn@opam:3.20.2@a43d3aee", "@opam/dune@opam:3.20.2@8daef28d", - "@opam/csexp@opam:1.5.2@46614bf4", + "ocaml@5.3.0@d41d8cd9", "@opam/top-closure@opam:3.21.1@cbb083a2", + "@opam/pp@opam:2.0.0@2177bbde", + "@opam/ordering@opam:3.21.1@3684f509", + "@opam/fs-io@opam:3.21.1@a77fc7e6", "@opam/dyn@opam:3.21.1@7a193774", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@opam/base-unix@opam:base@87d0b2eb", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/pp@opam:2.0.0@2177bbde", - "@opam/ordering@opam:3.20.2@6865c105", - "@opam/dyn@opam:3.20.2@a43d3aee", "@opam/dune@opam:3.20.2@8daef28d", - "@opam/csexp@opam:1.5.2@46614bf4", + "ocaml@5.3.0@d41d8cd9", "@opam/top-closure@opam:3.21.1@cbb083a2", + "@opam/pp@opam:2.0.0@2177bbde", + "@opam/ordering@opam:3.21.1@3684f509", + "@opam/fs-io@opam:3.21.1@a77fc7e6", "@opam/dyn@opam:3.21.1@7a193774", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@opam/base-unix@opam:base@87d0b2eb" ], "available": [ @@ -272,11 +305,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -285,8 +318,8 @@ [ "windows", "x86_64" ] ] }, - "@opam/stdio@opam:v0.17.0@def6a62f": { - "id": "@opam/stdio@opam:v0.17.0@def6a62f", + "@opam/stdio@opam:v0.17.0@80c625cc": { + "id": "@opam/stdio@opam:v0.17.0@80c625cc", "name": "@opam/stdio", "version": "opam:v0.17.0", "source": { @@ -303,13 +336,13 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", - "@opam/base@opam:v0.17.3@78923773", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", + "@opam/base@opam:v0.17.3@4f79f92d", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", - "@opam/base@opam:v0.17.3@78923773" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", + "@opam/base@opam:v0.17.3@4f79f92d" ], "available": [ [ "darwin", "x86_64" ], @@ -336,11 +369,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -349,8 +382,8 @@ [ "windows", "x86_64" ] ] }, - "@opam/sexplib0@opam:v0.17.0@75dcb697": { - "id": "@opam/sexplib0@opam:v0.17.0@75dcb697", + "@opam/sexplib0@opam:v0.17.0@db8af2c0": { + "id": "@opam/sexplib0@opam:v0.17.0@db8af2c0", "name": "@opam/sexplib0", "version": "opam:v0.17.0", "source": { @@ -367,11 +400,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -436,12 +469,12 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/ppxlib@opam:0.37.0@42a12c9c", - "@opam/gen@opam:1.1@55327887", "@opam/dune@opam:3.20.2@8daef28d", + "@opam/gen@opam:1.1@55327887", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/ppxlib@opam:0.37.0@42a12c9c", - "@opam/gen@opam:1.1@55327887", "@opam/dune@opam:3.20.2@8daef28d" + "@opam/gen@opam:1.1@55327887", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -468,11 +501,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -500,17 +533,17 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/stdlib-shims@opam:0.3.0@72c7bc98", - "@opam/sexplib0@opam:v0.17.0@75dcb697", + "@opam/sexplib0@opam:v0.17.0@db8af2c0", "@opam/ppx_derivers@opam:1.2.1@d78727cd", "@opam/ocaml-compiler-libs@opam:v0.17.0@6bdcfede", - "@opam/dune@opam:3.20.2@8daef28d", "@esy-ocaml/substs@0.0.1@d41d8cd9" + "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/stdlib-shims@opam:0.3.0@72c7bc98", - "@opam/sexplib0@opam:v0.17.0@75dcb697", + "@opam/sexplib0@opam:v0.17.0@db8af2c0", "@opam/ppx_derivers@opam:1.2.1@d78727cd", "@opam/ocaml-compiler-libs@opam:v0.17.0@6bdcfede", - "@opam/dune@opam:3.20.2@8daef28d" + "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -519,8 +552,8 @@ [ "windows", "x86_64" ] ] }, - "@opam/ppx_yojson_conv_lib@opam:v0.17.0@2b444c0e": { - "id": "@opam/ppx_yojson_conv_lib@opam:v0.17.0@2b444c0e", + "@opam/ppx_yojson_conv_lib@opam:v0.17.0@e7e988bb": { + "id": "@opam/ppx_yojson_conv_lib@opam:v0.17.0@e7e988bb", "name": "@opam/ppx_yojson_conv_lib", "version": "opam:v0.17.0", "source": { @@ -538,11 +571,11 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", - "@opam/dune@opam:3.20.2@8daef28d", "@esy-ocaml/substs@0.0.1@d41d8cd9" + "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", - "@opam/dune@opam:3.20.2@8daef28d" + "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -569,11 +602,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -600,11 +633,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -613,29 +646,29 @@ [ "windows", "x86_64" ] ] }, - "@opam/ordering@opam:3.20.2@6865c105": { - "id": "@opam/ordering@opam:3.20.2@6865c105", + "@opam/ordering@opam:3.21.1@3684f509": { + "id": "@opam/ordering@opam:3.21.1@3684f509", "name": "@opam/ordering", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "ordering", - "version": "3.20.2", - "path": "esy.lock/opam/ordering.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/ordering.3.21.1" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -662,15 +695,15 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@ee910ff5", - "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@4b291364", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@opam/base-bytes@opam:base@785dbd33", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@ee910ff5", - "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@4b291364", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@opam/base-bytes@opam:base@785dbd33" ], @@ -699,11 +732,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4" ], "available": [ @@ -733,40 +766,40 @@ "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/uutf@opam:1.0.4@ba7fbef7", "@opam/uuseg@opam:17.0.0@52f3d276", - "@opam/stdio@opam:v0.17.0@def6a62f", + "@opam/stdio@opam:v0.17.0@80c625cc", "@opam/ocp-indent@opam:1.7.0@3e255333", "@opam/ocaml-version@opam:4.0.3@371c2527", - "@opam/menhirSdk@opam:20250912@f434747d", - "@opam/menhirLib@opam:20250912@7bcb2f61", - "@opam/menhir@opam:20250912@0ed10637", + "@opam/menhirSdk@opam:20260209@1b57a7c9", + "@opam/menhirLib@opam:20260209@f5704f2b", + "@opam/menhir@opam:20260209@61084610", "@opam/fpath@opam:0.7.3@d817a3b5", "@opam/fix@opam:20250919@2cb92ccc", "@opam/either@opam:1.0.0@378fa7c4", - "@opam/dune-build-info@opam:3.20.2@a53d0f1c", - "@opam/dune@opam:3.20.2@8daef28d", "@opam/csexp@opam:1.5.2@46614bf4", + "@opam/dune-build-info@opam:3.21.1@5dd16d55", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@opam/camlp-streams@opam:5.0.1@8e96208c", - "@opam/base@opam:v0.17.3@78923773", + "@opam/base@opam:v0.17.3@4f79f92d", "@opam/astring@opam:0.8.5@9975798d", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/uutf@opam:1.0.4@ba7fbef7", "@opam/uuseg@opam:17.0.0@52f3d276", - "@opam/stdio@opam:v0.17.0@def6a62f", + "@opam/stdio@opam:v0.17.0@80c625cc", "@opam/ocp-indent@opam:1.7.0@3e255333", "@opam/ocaml-version@opam:4.0.3@371c2527", - "@opam/menhirSdk@opam:20250912@f434747d", - "@opam/menhirLib@opam:20250912@7bcb2f61", - "@opam/menhir@opam:20250912@0ed10637", + "@opam/menhirSdk@opam:20260209@1b57a7c9", + "@opam/menhirLib@opam:20260209@f5704f2b", + "@opam/menhir@opam:20260209@61084610", "@opam/fpath@opam:0.7.3@d817a3b5", "@opam/fix@opam:20250919@2cb92ccc", "@opam/either@opam:1.0.0@378fa7c4", - "@opam/dune-build-info@opam:3.20.2@a53d0f1c", - "@opam/dune@opam:3.20.2@8daef28d", "@opam/csexp@opam:1.5.2@46614bf4", + "@opam/dune-build-info@opam:3.21.1@5dd16d55", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@opam/camlp-streams@opam:5.0.1@8e96208c", - "@opam/base@opam:v0.17.3@78923773", + "@opam/base@opam:v0.17.3@4f79f92d", "@opam/astring@opam:0.8.5@9975798d" ], "available": [ @@ -796,14 +829,14 @@ "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/re@opam:1.14.0@62aa9f42", "@opam/ocamlformat-lib@opam:0.27.0@09e368b0", - "@opam/dune@opam:3.20.2@8daef28d", "@opam/csexp@opam:1.5.2@46614bf4", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/re@opam:1.14.0@62aa9f42", "@opam/ocamlformat-lib@opam:0.27.0@09e368b0", - "@opam/dune@opam:3.20.2@8daef28d", "@opam/csexp@opam:1.5.2@46614bf4", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@opam/cmdliner@opam:1.3.0@8e6dd99f" ], "available": [ @@ -813,8 +846,8 @@ [ "windows", "x86_64" ] ] }, - "@opam/ocamlfind@opam:1.9.8@ee910ff5": { - "id": "@opam/ocamlfind@opam:1.9.8@ee910ff5", + "@opam/ocamlfind@opam:1.9.8@4b291364": { + "id": "@opam/ocamlfind@opam:1.9.8@4b291364", "name": "@opam/ocamlfind", "version": "opam:1.9.8", "source": { @@ -845,30 +878,30 @@ [ "windows", "x86_64" ] ] }, - "@opam/ocamlc-loc@opam:3.20.2@4ca99b2f": { - "id": "@opam/ocamlc-loc@opam:3.20.2@4ca99b2f", + "@opam/ocamlc-loc@opam:3.21.1@1fd0f7f3": { + "id": "@opam/ocamlc-loc@opam:3.21.1@1fd0f7f3", "name": "@opam/ocamlc-loc", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "ocamlc-loc", - "version": "3.20.2", - "path": "esy.lock/opam/ocamlc-loc.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/ocamlc-loc.3.21.1" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dyn@opam:3.20.2@a43d3aee", - "@opam/dune@opam:3.20.2@8daef28d", "@esy-ocaml/substs@0.0.1@d41d8cd9" + "ocaml@5.3.0@d41d8cd9", "@opam/dyn@opam:3.21.1@7a193774", + "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dyn@opam:3.20.2@a43d3aee", - "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dyn@opam:3.21.1@7a193774", + "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -905,8 +938,8 @@ [ "windows", "x86_64" ] ] }, - "@opam/ocaml_intrinsics_kernel@opam:v0.17.1@122c1c73": { - "id": "@opam/ocaml_intrinsics_kernel@opam:v0.17.1@122c1c73", + "@opam/ocaml_intrinsics_kernel@opam:v0.17.1@ec48e72b": { + "id": "@opam/ocaml_intrinsics_kernel@opam:v0.17.1@ec48e72b", "name": "@opam/ocaml_intrinsics_kernel", "version": "opam:v0.17.1", "source": { @@ -923,11 +956,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -954,11 +987,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -986,47 +1019,47 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", - "@opam/xdg@opam:3.20.2@ade9ef81", - "@opam/stdune@opam:3.20.2@c89dc074", + "@opam/xdg@opam:3.21.1@fae5ea52", + "@opam/stdune@opam:3.21.1@7cf9c3a0", "@opam/spawn@opam:v0.17.0@d0f69739", "@opam/re@opam:1.14.0@62aa9f42", - "@opam/ppx_yojson_conv_lib@opam:v0.17.0@2b444c0e", + "@opam/ppx_yojson_conv_lib@opam:v0.17.0@e7e988bb", "@opam/pp@opam:2.0.0@2177bbde", - "@opam/ordering@opam:3.20.2@6865c105", + "@opam/ordering@opam:3.21.1@3684f509", "@opam/ocamlformat-rpc-lib@opam:0.28.1@4c691df7", - "@opam/ocamlc-loc@opam:3.20.2@4ca99b2f", + "@opam/ocamlc-loc@opam:3.21.1@1fd0f7f3", "@opam/merlin-lib@opam:5.6-503@f2a59b18", "@opam/lsp@opam:1.23.1@22e2f8da", "@opam/jsonrpc@opam:1.23.1@f2566740", - "@opam/fiber@opam:3.7.0@bf633a34", "@opam/dyn@opam:3.20.2@a43d3aee", - "@opam/dune-rpc@opam:3.20.2@c55481ce", - "@opam/dune-build-info@opam:3.20.2@a53d0f1c", - "@opam/dune@opam:3.20.2@8daef28d", "@opam/csexp@opam:1.5.2@46614bf4", - "@opam/chrome-trace@opam:3.20.2@0904f6e5", + "@opam/fiber@opam:3.7.0@bf633a34", "@opam/dyn@opam:3.21.1@7a193774", + "@opam/dune-rpc@opam:3.21.1@440b192b", + "@opam/dune-build-info@opam:3.21.1@5dd16d55", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", + "@opam/chrome-trace@opam:3.21.1@c060f149", "@opam/camlp-streams@opam:5.0.1@8e96208c", - "@opam/base@opam:v0.17.3@78923773", + "@opam/base@opam:v0.17.3@4f79f92d", "@opam/astring@opam:0.8.5@9975798d", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", - "@opam/xdg@opam:3.20.2@ade9ef81", - "@opam/stdune@opam:3.20.2@c89dc074", + "@opam/xdg@opam:3.21.1@fae5ea52", + "@opam/stdune@opam:3.21.1@7cf9c3a0", "@opam/spawn@opam:v0.17.0@d0f69739", "@opam/re@opam:1.14.0@62aa9f42", - "@opam/ppx_yojson_conv_lib@opam:v0.17.0@2b444c0e", + "@opam/ppx_yojson_conv_lib@opam:v0.17.0@e7e988bb", "@opam/pp@opam:2.0.0@2177bbde", - "@opam/ordering@opam:3.20.2@6865c105", + "@opam/ordering@opam:3.21.1@3684f509", "@opam/ocamlformat-rpc-lib@opam:0.28.1@4c691df7", - "@opam/ocamlc-loc@opam:3.20.2@4ca99b2f", + "@opam/ocamlc-loc@opam:3.21.1@1fd0f7f3", "@opam/merlin-lib@opam:5.6-503@f2a59b18", "@opam/lsp@opam:1.23.1@22e2f8da", "@opam/jsonrpc@opam:1.23.1@f2566740", - "@opam/fiber@opam:3.7.0@bf633a34", "@opam/dyn@opam:3.20.2@a43d3aee", - "@opam/dune-rpc@opam:3.20.2@c55481ce", - "@opam/dune-build-info@opam:3.20.2@a53d0f1c", - "@opam/dune@opam:3.20.2@8daef28d", "@opam/csexp@opam:1.5.2@46614bf4", - "@opam/chrome-trace@opam:3.20.2@0904f6e5", + "@opam/fiber@opam:3.7.0@bf633a34", "@opam/dyn@opam:3.21.1@7a193774", + "@opam/dune-rpc@opam:3.21.1@440b192b", + "@opam/dune-build-info@opam:3.21.1@5dd16d55", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", + "@opam/chrome-trace@opam:3.21.1@c060f149", "@opam/camlp-streams@opam:5.0.1@8e96208c", - "@opam/base@opam:v0.17.3@78923773", + "@opam/base@opam:v0.17.3@4f79f92d", "@opam/astring@opam:0.8.5@9975798d" ], "available": [ @@ -1054,11 +1087,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1085,11 +1118,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4" ], "available": [ @@ -1099,29 +1132,29 @@ [ "windows", "x86_64" ] ] }, - "@opam/menhirSdk@opam:20250912@f434747d": { - "id": "@opam/menhirSdk@opam:20250912@f434747d", + "@opam/menhirSdk@opam:20260209@1b57a7c9": { + "id": "@opam/menhirSdk@opam:20260209@1b57a7c9", "name": "@opam/menhirSdk", - "version": "opam:20250912", + "version": "opam:20260209", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/md5/b8/b8f83df02226419f99e49f1b637dcb11#md5:b8f83df02226419f99e49f1b637dcb11", - "archive:https://gitlab.inria.fr/fpottier/menhir/-/archive/20250912/archive.tar.gz#md5:b8f83df02226419f99e49f1b637dcb11" + "archive:https://opam.ocaml.org/cache/md5/e9/e993231085db95ab011ffe0cd606d9dd#md5:e993231085db95ab011ffe0cd606d9dd", + "archive:https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz#md5:e993231085db95ab011ffe0cd606d9dd" ], "opam": { "name": "menhirSdk", - "version": "20250912", - "path": "esy.lock/opam/menhirSdk.20250912" + "version": "20260209", + "path": "esy.lock/opam/menhirSdk.20260209" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1130,29 +1163,60 @@ [ "windows", "x86_64" ] ] }, - "@opam/menhirLib@opam:20250912@7bcb2f61": { - "id": "@opam/menhirLib@opam:20250912@7bcb2f61", + "@opam/menhirLib@opam:20260209@f5704f2b": { + "id": "@opam/menhirLib@opam:20260209@f5704f2b", "name": "@opam/menhirLib", - "version": "opam:20250912", + "version": "opam:20260209", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/md5/b8/b8f83df02226419f99e49f1b637dcb11#md5:b8f83df02226419f99e49f1b637dcb11", - "archive:https://gitlab.inria.fr/fpottier/menhir/-/archive/20250912/archive.tar.gz#md5:b8f83df02226419f99e49f1b637dcb11" + "archive:https://opam.ocaml.org/cache/md5/e9/e993231085db95ab011ffe0cd606d9dd#md5:e993231085db95ab011ffe0cd606d9dd", + "archive:https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz#md5:e993231085db95ab011ffe0cd606d9dd" ], "opam": { "name": "menhirLib", - "version": "20250912", - "path": "esy.lock/opam/menhirLib.20250912" + "version": "20260209", + "path": "esy.lock/opam/menhirLib.20260209" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" + ], + "available": [ + [ "darwin", "x86_64" ], + [ "darwin", "arm64" ], + [ "linux", "x86_64" ], + [ "windows", "x86_64" ] + ] + }, + "@opam/menhirGLR@opam:20260209@4817244a": { + "id": "@opam/menhirGLR@opam:20260209@4817244a", + "name": "@opam/menhirGLR", + "version": "opam:20260209", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/md5/e9/e993231085db95ab011ffe0cd606d9dd#md5:e993231085db95ab011ffe0cd606d9dd", + "archive:https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz#md5:e993231085db95ab011ffe0cd606d9dd" + ], + "opam": { + "name": "menhirGLR", + "version": "20260209", + "path": "esy.lock/opam/menhirGLR.20260209" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1161,29 +1225,29 @@ [ "windows", "x86_64" ] ] }, - "@opam/menhirCST@opam:20250912@c495ddd4": { - "id": "@opam/menhirCST@opam:20250912@c495ddd4", + "@opam/menhirCST@opam:20260209@a164990a": { + "id": "@opam/menhirCST@opam:20260209@a164990a", "name": "@opam/menhirCST", - "version": "opam:20250912", + "version": "opam:20260209", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/md5/b8/b8f83df02226419f99e49f1b637dcb11#md5:b8f83df02226419f99e49f1b637dcb11", - "archive:https://gitlab.inria.fr/fpottier/menhir/-/archive/20250912/archive.tar.gz#md5:b8f83df02226419f99e49f1b637dcb11" + "archive:https://opam.ocaml.org/cache/md5/e9/e993231085db95ab011ffe0cd606d9dd#md5:e993231085db95ab011ffe0cd606d9dd", + "archive:https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz#md5:e993231085db95ab011ffe0cd606d9dd" ], "opam": { "name": "menhirCST", - "version": "20250912", - "path": "esy.lock/opam/menhirCST.20250912" + "version": "20260209", + "path": "esy.lock/opam/menhirCST.20260209" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1192,34 +1256,36 @@ [ "windows", "x86_64" ] ] }, - "@opam/menhir@opam:20250912@0ed10637": { - "id": "@opam/menhir@opam:20250912@0ed10637", + "@opam/menhir@opam:20260209@61084610": { + "id": "@opam/menhir@opam:20260209@61084610", "name": "@opam/menhir", - "version": "opam:20250912", + "version": "opam:20260209", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/md5/b8/b8f83df02226419f99e49f1b637dcb11#md5:b8f83df02226419f99e49f1b637dcb11", - "archive:https://gitlab.inria.fr/fpottier/menhir/-/archive/20250912/archive.tar.gz#md5:b8f83df02226419f99e49f1b637dcb11" + "archive:https://opam.ocaml.org/cache/md5/e9/e993231085db95ab011ffe0cd606d9dd#md5:e993231085db95ab011ffe0cd606d9dd", + "archive:https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz#md5:e993231085db95ab011ffe0cd606d9dd" ], "opam": { "name": "menhir", - "version": "20250912", - "path": "esy.lock/opam/menhir.20250912" + "version": "20260209", + "path": "esy.lock/opam/menhir.20260209" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/menhirSdk@opam:20250912@f434747d", - "@opam/menhirLib@opam:20250912@7bcb2f61", - "@opam/menhirCST@opam:20250912@c495ddd4", - "@opam/dune@opam:3.20.2@8daef28d", "@esy-ocaml/substs@0.0.1@d41d8cd9" + "ocaml@5.3.0@d41d8cd9", "@opam/menhirSdk@opam:20260209@1b57a7c9", + "@opam/menhirLib@opam:20260209@f5704f2b", + "@opam/menhirGLR@opam:20260209@4817244a", + "@opam/menhirCST@opam:20260209@a164990a", + "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/menhirSdk@opam:20250912@f434747d", - "@opam/menhirLib@opam:20250912@7bcb2f61", - "@opam/menhirCST@opam:20250912@c495ddd4", - "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/menhirSdk@opam:20260209@1b57a7c9", + "@opam/menhirLib@opam:20260209@f5704f2b", + "@opam/menhirGLR@opam:20260209@4817244a", + "@opam/menhirCST@opam:20260209@a164990a", + "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1248,16 +1314,16 @@ "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", "@opam/uutf@opam:1.0.4@ba7fbef7", - "@opam/ppx_yojson_conv_lib@opam:v0.17.0@2b444c0e", + "@opam/ppx_yojson_conv_lib@opam:v0.17.0@e7e988bb", "@opam/jsonrpc@opam:1.23.1@f2566740", - "@opam/dune@opam:3.20.2@8daef28d", "@esy-ocaml/substs@0.0.1@d41d8cd9" + "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", "@opam/uutf@opam:1.0.4@ba7fbef7", - "@opam/ppx_yojson_conv_lib@opam:v0.17.0@2b444c0e", + "@opam/ppx_yojson_conv_lib@opam:v0.17.0@e7e988bb", "@opam/jsonrpc@opam:1.23.1@f2566740", - "@opam/dune@opam:3.20.2@8daef28d" + "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1285,11 +1351,11 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", - "@opam/dune@opam:3.20.2@8daef28d", "@esy-ocaml/substs@0.0.1@d41d8cd9" + "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", - "@opam/dune@opam:3.20.2@8daef28d" + "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1319,11 +1385,11 @@ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", "@opam/sedlex@opam:3.7@7fb2caab", "@opam/ppxlib@opam:0.37.0@42a12c9c", - "@opam/ocamlfind@opam:1.9.8@ee910ff5", - "@opam/menhirSdk@opam:20250912@f434747d", - "@opam/menhirLib@opam:20250912@7bcb2f61", - "@opam/menhir@opam:20250912@0ed10637", - "@opam/dune@opam:3.20.2@8daef28d", + "@opam/ocamlfind@opam:1.9.8@4b291364", + "@opam/menhirSdk@opam:20260209@1b57a7c9", + "@opam/menhirLib@opam:20260209@f5704f2b", + "@opam/menhir@opam:20260209@61084610", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], @@ -1331,10 +1397,10 @@ "ocaml@5.3.0@d41d8cd9", "@opam/yojson@opam:3.0.0@b2c9a6c1", "@opam/sedlex@opam:3.7@7fb2caab", "@opam/ppxlib@opam:0.37.0@42a12c9c", - "@opam/menhirSdk@opam:20250912@f434747d", - "@opam/menhirLib@opam:20250912@7bcb2f61", - "@opam/menhir@opam:20250912@0ed10637", - "@opam/dune@opam:3.20.2@8daef28d", + "@opam/menhirSdk@opam:20260209@1b57a7c9", + "@opam/menhirLib@opam:20260209@f5704f2b", + "@opam/menhir@opam:20260209@61084610", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/cmdliner@opam:1.3.0@8e6dd99f" ], "available": [ @@ -1363,11 +1429,44 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/seq@opam:base@5ed5af70", - "@opam/dune@opam:3.20.2@8daef28d", "@esy-ocaml/substs@0.0.1@d41d8cd9" + "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/seq@opam:base@5ed5af70", - "@opam/dune@opam:3.20.2@8daef28d" + "@opam/dune@opam:3.21.1@57b8a8d1" + ], + "available": [ + [ "darwin", "x86_64" ], + [ "darwin", "arm64" ], + [ "linux", "x86_64" ], + [ "windows", "x86_64" ] + ] + }, + "@opam/fs-io@opam:3.21.1@a77fc7e6": { + "id": "@opam/fs-io@opam:3.21.1@a77fc7e6", + "name": "@opam/fs-io", + "version": "opam:3.21.1", + "source": { + "type": "install", + "source": [ + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + ], + "opam": { + "name": "fs-io", + "version": "3.21.1", + "path": "esy.lock/opam/fs-io.3.21.1" + } + }, + "overrides": [], + "dependencies": [ + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", + "@opam/base-unix@opam:base@87d0b2eb", + "@esy-ocaml/substs@0.0.1@d41d8cd9" + ], + "devDependencies": [ + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", + "@opam/base-unix@opam:base@87d0b2eb" ], "available": [ [ "darwin", "x86_64" ], @@ -1395,7 +1494,7 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.1@2377d2f8", - "@opam/ocamlfind@opam:1.9.8@ee910ff5", + "@opam/ocamlfind@opam:1.9.8@4b291364", "@opam/ocamlbuild@opam:0.16.1@b3fc8209", "@opam/astring@opam:0.8.5@9975798d", "@esy-ocaml/substs@0.0.1@d41d8cd9" @@ -1428,11 +1527,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1459,13 +1558,13 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/stdune@opam:3.20.2@c89dc074", - "@opam/dyn@opam:3.20.2@a43d3aee", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/stdune@opam:3.21.1@7cf9c3a0", + "@opam/dyn@opam:3.21.1@7a193774", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/stdune@opam:3.20.2@c89dc074", - "@opam/dyn@opam:3.20.2@a43d3aee", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/stdune@opam:3.21.1@7cf9c3a0", + "@opam/dyn@opam:3.21.1@7a193774", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1492,11 +1591,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1505,32 +1604,32 @@ [ "windows", "x86_64" ] ] }, - "@opam/dyn@opam:3.20.2@a43d3aee": { - "id": "@opam/dyn@opam:3.20.2@a43d3aee", + "@opam/dyn@opam:3.21.1@7a193774": { + "id": "@opam/dyn@opam:3.21.1@7a193774", "name": "@opam/dyn", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "dyn", - "version": "3.20.2", - "path": "esy.lock/opam/dyn.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/dyn.3.21.1" } }, "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/pp@opam:2.0.0@2177bbde", - "@opam/ordering@opam:3.20.2@6865c105", - "@opam/dune@opam:3.20.2@8daef28d", "@esy-ocaml/substs@0.0.1@d41d8cd9" + "@opam/ordering@opam:3.21.1@3684f509", + "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/pp@opam:2.0.0@2177bbde", - "@opam/ordering@opam:3.20.2@6865c105", - "@opam/dune@opam:3.20.2@8daef28d" + "@opam/ordering@opam:3.21.1@3684f509", + "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1539,37 +1638,37 @@ [ "windows", "x86_64" ] ] }, - "@opam/dune-rpc@opam:3.20.2@c55481ce": { - "id": "@opam/dune-rpc@opam:3.20.2@c55481ce", + "@opam/dune-rpc@opam:3.21.1@440b192b": { + "id": "@opam/dune-rpc@opam:3.21.1@440b192b", "name": "@opam/dune-rpc", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "dune-rpc", - "version": "3.20.2", - "path": "esy.lock/opam/dune-rpc.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/dune-rpc.3.21.1" } }, "overrides": [], "dependencies": [ - "@opam/xdg@opam:3.20.2@ade9ef81", - "@opam/stdune@opam:3.20.2@c89dc074", "@opam/pp@opam:2.0.0@2177bbde", - "@opam/ordering@opam:3.20.2@6865c105", - "@opam/ocamlc-loc@opam:3.20.2@4ca99b2f", - "@opam/dyn@opam:3.20.2@a43d3aee", "@opam/dune@opam:3.20.2@8daef28d", + "@opam/xdg@opam:3.21.1@fae5ea52", + "@opam/stdune@opam:3.21.1@7cf9c3a0", "@opam/pp@opam:2.0.0@2177bbde", + "@opam/ordering@opam:3.21.1@3684f509", + "@opam/ocamlc-loc@opam:3.21.1@1fd0f7f3", + "@opam/dyn@opam:3.21.1@7a193774", "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "@opam/xdg@opam:3.20.2@ade9ef81", - "@opam/stdune@opam:3.20.2@c89dc074", "@opam/pp@opam:2.0.0@2177bbde", - "@opam/ordering@opam:3.20.2@6865c105", - "@opam/ocamlc-loc@opam:3.20.2@4ca99b2f", - "@opam/dyn@opam:3.20.2@a43d3aee", "@opam/dune@opam:3.20.2@8daef28d", + "@opam/xdg@opam:3.21.1@fae5ea52", + "@opam/stdune@opam:3.21.1@7cf9c3a0", "@opam/pp@opam:2.0.0@2177bbde", + "@opam/ordering@opam:3.21.1@3684f509", + "@opam/ocamlc-loc@opam:3.21.1@1fd0f7f3", + "@opam/dyn@opam:3.21.1@7a193774", "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4" ], "available": [ @@ -1579,31 +1678,31 @@ [ "windows", "x86_64" ] ] }, - "@opam/dune-configurator@opam:3.20.2@7eb6ff01": { - "id": "@opam/dune-configurator@opam:3.20.2@7eb6ff01", + "@opam/dune-configurator@opam:3.21.1@a0935856": { + "id": "@opam/dune-configurator@opam:3.21.1@a0935856", "name": "@opam/dune-configurator", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "dune-configurator", - "version": "3.20.2", - "path": "esy.lock/opam/dune-configurator.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/dune-configurator.3.21.1" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@opam/base-unix@opam:base@87d0b2eb", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/csexp@opam:1.5.2@46614bf4", "@opam/base-unix@opam:base@87d0b2eb" ], @@ -1614,29 +1713,29 @@ [ "windows", "x86_64" ] ] }, - "@opam/dune-build-info@opam:3.20.2@a53d0f1c": { - "id": "@opam/dune-build-info@opam:3.20.2@a53d0f1c", + "@opam/dune-build-info@opam:3.21.1@5dd16d55": { + "id": "@opam/dune-build-info@opam:3.21.1@5dd16d55", "name": "@opam/dune-build-info", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "dune-build-info", - "version": "3.20.2", - "path": "esy.lock/opam/dune-build-info.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/dune-build-info.3.21.1" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1645,20 +1744,20 @@ [ "windows", "x86_64" ] ] }, - "@opam/dune@opam:3.20.2@8daef28d": { - "id": "@opam/dune@opam:3.20.2@8daef28d", + "@opam/dune@opam:3.21.1@57b8a8d1": { + "id": "@opam/dune@opam:3.21.1@57b8a8d1", "name": "@opam/dune", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "dune", - "version": "3.20.2", - "path": "esy.lock/opam/dune.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/dune.3.21.1" } }, "overrides": [], @@ -1696,11 +1795,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1757,29 +1856,29 @@ [ "windows", "x86_64" ] ] }, - "@opam/chrome-trace@opam:3.20.2@0904f6e5": { - "id": "@opam/chrome-trace@opam:3.20.2@0904f6e5", + "@opam/chrome-trace@opam:3.21.1@c060f149": { + "id": "@opam/chrome-trace@opam:3.21.1@c060f149", "name": "@opam/chrome-trace", - "version": "opam:3.20.2", + "version": "opam:3.21.1", "source": { "type": "install", "source": [ - "archive:https://opam.ocaml.org/cache/sha256/b1/b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549", - "archive:https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz#sha256:b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" + "archive:https://opam.ocaml.org/cache/sha256/84/84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94", + "archive:https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz#sha256:84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" ], "opam": { "name": "chrome-trace", - "version": "3.20.2", - "path": "esy.lock/opam/chrome-trace.3.20.2" + "version": "3.21.1", + "path": "esy.lock/opam/chrome-trace.3.21.1" } }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1806,11 +1905,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d", + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1880,11 +1979,11 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@ee910ff5", + "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@4b291364", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@ee910ff5" + "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@4b291364" ], "available": [ [ "darwin", "x86_64" ], @@ -1893,8 +1992,8 @@ [ "windows", "x86_64" ] ] }, - "@opam/base@opam:v0.17.3@78923773": { - "id": "@opam/base@opam:v0.17.3@78923773", + "@opam/base@opam:v0.17.3@4f79f92d": { + "id": "@opam/base@opam:v0.17.3@4f79f92d", "name": "@opam/base", "version": "opam:v0.17.3", "source": { @@ -1911,16 +2010,16 @@ }, "overrides": [], "dependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/sexplib0@opam:v0.17.0@75dcb697", - "@opam/ocaml_intrinsics_kernel@opam:v0.17.1@122c1c73", - "@opam/dune-configurator@opam:3.20.2@7eb6ff01", - "@opam/dune@opam:3.20.2@8daef28d", "@esy-ocaml/substs@0.0.1@d41d8cd9" + "ocaml@5.3.0@d41d8cd9", "@opam/sexplib0@opam:v0.17.0@db8af2c0", + "@opam/ocaml_intrinsics_kernel@opam:v0.17.1@ec48e72b", + "@opam/dune-configurator@opam:3.21.1@a0935856", + "@opam/dune@opam:3.21.1@57b8a8d1", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], "devDependencies": [ - "ocaml@5.3.0@d41d8cd9", "@opam/sexplib0@opam:v0.17.0@75dcb697", - "@opam/ocaml_intrinsics_kernel@opam:v0.17.1@122c1c73", - "@opam/dune-configurator@opam:3.20.2@7eb6ff01", - "@opam/dune@opam:3.20.2@8daef28d" + "ocaml@5.3.0@d41d8cd9", "@opam/sexplib0@opam:v0.17.0@db8af2c0", + "@opam/ocaml_intrinsics_kernel@opam:v0.17.1@ec48e72b", + "@opam/dune-configurator@opam:3.21.1@a0935856", + "@opam/dune@opam:3.21.1@57b8a8d1" ], "available": [ [ "darwin", "x86_64" ], @@ -1948,7 +2047,7 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.1@2377d2f8", - "@opam/ocamlfind@opam:1.9.8@ee910ff5", + "@opam/ocamlfind@opam:1.9.8@4b291364", "@opam/ocamlbuild@opam:0.16.1@b3fc8209", "@esy-ocaml/substs@0.0.1@d41d8cd9" ], @@ -1960,21 +2059,21 @@ [ "windows", "x86_64" ] ] }, - "@grain/libbinaryen@124.0.1@d41d8cd9": { - "id": "@grain/libbinaryen@124.0.1@d41d8cd9", + "@grain/libbinaryen@git:https://github.com/spotandjake/libbinaryen.git#c596fe826ccb9edd91e060becb6284a2d429ea6d@d41d8cd9": { + "id": "@grain/libbinaryen@git:https://github.com/spotandjake/libbinaryen.git#c596fe826ccb9edd91e060becb6284a2d429ea6d@d41d8cd9", "name": "@grain/libbinaryen", - "version": "124.0.1", + "version": "git:https://github.com/spotandjake/libbinaryen.git#c596fe826ccb9edd91e060becb6284a2d429ea6d", "source": { "type": "install", "source": [ - "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-124.0.1.tgz#sha1:7b29acc4a62ab5a849c6e01c3d8e90c78efd05f2" + "git:https://github.com/spotandjake/libbinaryen.git#c596fe826ccb9edd91e060becb6284a2d429ea6d" ] }, "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", - "@opam/dune-configurator@opam:3.20.2@7eb6ff01", - "@opam/dune@opam:3.20.2@8daef28d", + "@opam/dune-configurator@opam:3.21.1@a0935856", + "@opam/dune@opam:3.21.1@57b8a8d1", "@opam/conf-cmake@github:grain-lang/cmake:esy.json#033cab656dc71a6488b3c1ca6ea45099f794bd03@d41d8cd9" ], "devDependencies": [], @@ -1997,9 +2096,9 @@ "overrides": [], "dependencies": [ "ocaml@5.3.0@d41d8cd9", - "@opam/dune-configurator@opam:3.20.2@7eb6ff01", - "@opam/dune@opam:3.20.2@8daef28d", - "@grain/libbinaryen@124.0.1@d41d8cd9" + "@opam/dune-configurator@opam:3.21.1@a0935856", + "@opam/dune@opam:3.21.1@57b8a8d1", + "@grain/libbinaryen@git:https://github.com/spotandjake/libbinaryen.git#c596fe826ccb9edd91e060becb6284a2d429ea6d@d41d8cd9" ], "devDependencies": [ "@opam/ocamlformat@opam:0.27.0@c40d4612", diff --git a/esy.lock/opam/base.v0.17.3/opam b/esy.lock/opam/base.v0.17.3/opam index 76d5609f..39abf898 100644 --- a/esy.lock/opam/base.v0.17.3/opam +++ b/esy.lock/opam/base.v0.17.3/opam @@ -11,8 +11,8 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "ocaml_intrinsics_kernel" {>= "v0.17.0" & < "v0.18.0"} - "sexplib0" {>= "v0.17.0" & < "v0.18.0"} + "ocaml_intrinsics_kernel" {>= "v0.17.0" & < "v0.18~"} + "sexplib0" {>= "v0.17.0" & < "v0.18~"} "dune" {>= "3.11.0"} "dune-configurator" ] @@ -39,3 +39,5 @@ url { "sha512=628610caff7e124631870fa1e29661caac28bdfdb18750ee43b868037da3d65d6dd9023b4be7c4c52405679efb5e865a6632d95606a22b28a36636a6bf706ef3" ] } +x-maintenance-intent: ["(latest)"] + diff --git a/esy.lock/opam/chrome-trace.3.20.2/opam b/esy.lock/opam/chrome-trace.3.21.1/opam similarity index 68% rename from esy.lock/opam/chrome-trace.3.20.2/opam rename to esy.lock/opam/chrome-trace.3.21.1/opam index a443a690..988be034 100644 --- a/esy.lock/opam/chrome-trace.3.20.2/opam +++ b/esy.lock/opam/chrome-trace.3.21.1/opam @@ -9,7 +9,7 @@ homepage: "https://github.com/ocaml/dune" doc: "https://dune.readthedocs.io/" bug-reports: "https://github.com/ocaml/dune/issues" depends: [ - "dune" {>= "3.20"} + "dune" {>= "3.21"} "ocaml" {>= "4.08.0"} "odoc" {with-doc} ] @@ -32,10 +32,10 @@ build: [ ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/dune-build-info.3.20.2/opam b/esy.lock/opam/dune-build-info.3.21.1/opam similarity index 74% rename from esy.lock/opam/dune-build-info.3.20.2/opam rename to esy.lock/opam/dune-build-info.3.21.1/opam index b267876a..c0669e2a 100644 --- a/esy.lock/opam/dune-build-info.3.20.2/opam +++ b/esy.lock/opam/dune-build-info.3.21.1/opam @@ -15,7 +15,7 @@ homepage: "https://github.com/ocaml/dune" doc: "https://dune.readthedocs.io/" bug-reports: "https://github.com/ocaml/dune/issues" depends: [ - "dune" {>= "3.20"} + "dune" {>= "3.21"} "ocaml" {>= "4.08"} "odoc" {with-doc} ] @@ -38,10 +38,10 @@ build: [ ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/dune-configurator.3.20.2/opam b/esy.lock/opam/dune-configurator.3.21.1/opam similarity index 74% rename from esy.lock/opam/dune-configurator.3.20.2/opam rename to esy.lock/opam/dune-configurator.3.21.1/opam index 7c2d9665..68f5b92b 100644 --- a/esy.lock/opam/dune-configurator.3.20.2/opam +++ b/esy.lock/opam/dune-configurator.3.21.1/opam @@ -17,7 +17,7 @@ homepage: "https://github.com/ocaml/dune" doc: "https://dune.readthedocs.io/" bug-reports: "https://github.com/ocaml/dune/issues" depends: [ - "dune" {>= "3.20"} + "dune" {>= "3.21"} "ocaml" {>= "4.08.0"} "base-unix" "csexp" {>= "1.5.0"} @@ -42,10 +42,10 @@ build: [ ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/dune-rpc.3.20.2/opam b/esy.lock/opam/dune-rpc.3.21.1/opam similarity index 69% rename from esy.lock/opam/dune-rpc.3.20.2/opam rename to esy.lock/opam/dune-rpc.3.21.1/opam index 0711fe66..6c17bdfb 100644 --- a/esy.lock/opam/dune-rpc.3.20.2/opam +++ b/esy.lock/opam/dune-rpc.3.21.1/opam @@ -8,7 +8,7 @@ homepage: "https://github.com/ocaml/dune" doc: "https://dune.readthedocs.io/" bug-reports: "https://github.com/ocaml/dune/issues" depends: [ - "dune" {>= "3.20"} + "dune" {>= "3.21"} "ocamlc-loc" "csexp" "ordering" @@ -37,10 +37,10 @@ build: [ ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/dune.3.20.2/opam b/esy.lock/opam/dune.3.21.1/opam similarity index 85% rename from esy.lock/opam/dune.3.20.2/opam rename to esy.lock/opam/dune.3.21.1/opam index 66482648..2e226b72 100644 --- a/esy.lock/opam/dune.3.20.2/opam +++ b/esy.lock/opam/dune.3.21.1/opam @@ -58,17 +58,18 @@ depends: [ "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" } + "ppxlib" { with-dev-setup & >= "0.37.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" } + "uutf" { with-dev-setup } ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/dyn.3.20.2/opam b/esy.lock/opam/dyn.3.21.1/opam similarity index 64% rename from esy.lock/opam/dyn.3.20.2/opam rename to esy.lock/opam/dyn.3.21.1/opam index ec2b4458..d0c2a4c8 100644 --- a/esy.lock/opam/dyn.3.20.2/opam +++ b/esy.lock/opam/dyn.3.21.1/opam @@ -8,14 +8,14 @@ homepage: "https://github.com/ocaml/dune" doc: "https://dune.readthedocs.io/" bug-reports: "https://github.com/ocaml/dune/issues" depends: [ - "dune" {>= "3.20"} + "dune" {>= "3.21"} "ocaml" {>= "4.08.0"} "ordering" {= version} "pp" {>= "1.1.0"} "odoc" {with-doc} ] dev-repo: "git+https://github.com/ocaml/dune.git" -x-maintenance-intent: ["(latest)"] +x-maintenance-intent: ["none"] build: [ ["dune" "subst"] {dev} ["rm" "-rf" "vendor/csexp"] @@ -33,10 +33,10 @@ build: [ ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/fs-io.3.21.1/opam b/esy.lock/opam/fs-io.3.21.1/opam new file mode 100644 index 00000000..13097292 --- /dev/null +++ b/esy.lock/opam/fs-io.3.21.1/opam @@ -0,0 +1,41 @@ +opam-version: "2.0" +synopsis: "File System Operations" +description: "Misc. Collection of File System Operations" +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.21"} + "base-unix" + "ocaml" {>= "4.08"} + "odoc" {with-doc} +] +dev-repo: "git+https://github.com/ocaml/dune.git" +x-maintenance-intent: ["none"] +build: [ + ["dune" "subst"] {dev} + ["rm" "-rf" "vendor/csexp"] + ["rm" "-rf" "vendor/pp"] + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@doc" {with-doc} + ] +] +url { + src: + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" + checksum: [ + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" + ] +} +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/menhir.20250912/opam b/esy.lock/opam/menhir.20260209/opam similarity index 65% rename from esy.lock/opam/menhir.20250912/opam rename to esy.lock/opam/menhir.20260209/opam index 9219f17d..78601bfd 100644 --- a/esy.lock/opam/menhir.20250912/opam +++ b/esy.lock/opam/menhir.20260209/opam @@ -13,18 +13,20 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" {>= "4.03.0"} + "ocaml" {>= "4.08"} "dune" {>= "2.8.0"} "menhirLib" {= version} "menhirSdk" {= version} "menhirCST" {= version} + "menhirGLR" {= version} ] synopsis: "An LR(1) parser generator" +x-maintenance-intent: ["(latest)"] url { src: - "https://gitlab.inria.fr/fpottier/menhir/-/archive/20250912/archive.tar.gz" + "https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz" checksum: [ - "md5=b8f83df02226419f99e49f1b637dcb11" - "sha512=72c85ec63104d6a7c7b6305b4642b86909fcad2e46561427ad596e37e686b3c94cd382da440f058d32800a15b157b80a8242df8043440a209ba73d209657ea84" + "md5=e993231085db95ab011ffe0cd606d9dd" + "sha512=aafad186f328ae8dd4cc69af0f30c1a0b208cf5148a7a94c150099be03838503c5ec12918de26cd7f794b5a72f114bc1bae8d81058bd0ea10372a3b06818687e" ] } diff --git a/esy.lock/opam/menhirCST.20250912/opam b/esy.lock/opam/menhirCST.20260209/opam similarity index 69% rename from esy.lock/opam/menhirCST.20250912/opam rename to esy.lock/opam/menhirCST.20260209/opam index 576bab1f..e73eaaba 100644 --- a/esy.lock/opam/menhirCST.20250912/opam +++ b/esy.lock/opam/menhirCST.20260209/opam @@ -19,11 +19,12 @@ conflicts: [ "menhir" { != version } ] synopsis: "Runtime support library for unparsers generated by Menhir" +x-maintenance-intent: ["(latest)"] url { src: - "https://gitlab.inria.fr/fpottier/menhir/-/archive/20250912/archive.tar.gz" + "https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz" checksum: [ - "md5=b8f83df02226419f99e49f1b637dcb11" - "sha512=72c85ec63104d6a7c7b6305b4642b86909fcad2e46561427ad596e37e686b3c94cd382da440f058d32800a15b157b80a8242df8043440a209ba73d209657ea84" + "md5=e993231085db95ab011ffe0cd606d9dd" + "sha512=aafad186f328ae8dd4cc69af0f30c1a0b208cf5148a7a94c150099be03838503c5ec12918de26cd7f794b5a72f114bc1bae8d81058bd0ea10372a3b06818687e" ] } diff --git a/esy.lock/opam/menhirGLR.20260209/opam b/esy.lock/opam/menhirGLR.20260209/opam new file mode 100644 index 00000000..72063065 --- /dev/null +++ b/esy.lock/opam/menhirGLR.20260209/opam @@ -0,0 +1,30 @@ + +opam-version: "2.0" +maintainer: "francois.pottier@inria.fr" +authors: [ + "François Pottier " +] +homepage: "http://gitlab.inria.fr/fpottier/menhir" +dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" +bug-reports: "https://gitlab.inria.fr/fpottier/menhir/-/issues" +license: "LGPL-2.0-only WITH OCaml-LGPL-linking-exception" +build: [ + ["dune" "build" "-p" name "-j" jobs] +] +depends: [ + "ocaml" { >= "4.08" } + "dune" { >= "2.8.0" } +] +conflicts: [ + "menhir" { != version } +] +synopsis: "Runtime support library for GLR parsers generated by Menhir" +x-maintenance-intent: ["(latest)"] +url { + src: + "https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz" + checksum: [ + "md5=e993231085db95ab011ffe0cd606d9dd" + "sha512=aafad186f328ae8dd4cc69af0f30c1a0b208cf5148a7a94c150099be03838503c5ec12918de26cd7f794b5a72f114bc1bae8d81058bd0ea10372a3b06818687e" + ] +} diff --git a/esy.lock/opam/menhirLib.20250912/opam b/esy.lock/opam/menhirLib.20260209/opam similarity index 68% rename from esy.lock/opam/menhirLib.20250912/opam rename to esy.lock/opam/menhirLib.20260209/opam index d05cc727..2f7da4a7 100644 --- a/esy.lock/opam/menhirLib.20250912/opam +++ b/esy.lock/opam/menhirLib.20260209/opam @@ -13,18 +13,19 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" { >= "4.03.0" } + "ocaml" { >= "4.08" } "dune" { >= "2.8.0" } ] conflicts: [ "menhir" { != version } ] synopsis: "Runtime support library for parsers generated by Menhir" +x-maintenance-intent: ["(latest)"] url { src: - "https://gitlab.inria.fr/fpottier/menhir/-/archive/20250912/archive.tar.gz" + "https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz" checksum: [ - "md5=b8f83df02226419f99e49f1b637dcb11" - "sha512=72c85ec63104d6a7c7b6305b4642b86909fcad2e46561427ad596e37e686b3c94cd382da440f058d32800a15b157b80a8242df8043440a209ba73d209657ea84" + "md5=e993231085db95ab011ffe0cd606d9dd" + "sha512=aafad186f328ae8dd4cc69af0f30c1a0b208cf5148a7a94c150099be03838503c5ec12918de26cd7f794b5a72f114bc1bae8d81058bd0ea10372a3b06818687e" ] } diff --git a/esy.lock/opam/menhirSdk.20250912/opam b/esy.lock/opam/menhirSdk.20260209/opam similarity index 68% rename from esy.lock/opam/menhirSdk.20250912/opam rename to esy.lock/opam/menhirSdk.20260209/opam index 50754dd9..bec0e571 100644 --- a/esy.lock/opam/menhirSdk.20250912/opam +++ b/esy.lock/opam/menhirSdk.20260209/opam @@ -13,18 +13,19 @@ build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ - "ocaml" { >= "4.03.0" } + "ocaml" { >= "4.08" } "dune" { >= "2.8.0" } ] conflicts: [ "menhir" { != version } ] synopsis: "Compile-time library for auxiliary tools related to Menhir" +x-maintenance-intent: ["(latest)"] url { src: - "https://gitlab.inria.fr/fpottier/menhir/-/archive/20250912/archive.tar.gz" + "https://gitlab.inria.fr/fpottier/menhir/-/archive/20260209/archive.tar.gz" checksum: [ - "md5=b8f83df02226419f99e49f1b637dcb11" - "sha512=72c85ec63104d6a7c7b6305b4642b86909fcad2e46561427ad596e37e686b3c94cd382da440f058d32800a15b157b80a8242df8043440a209ba73d209657ea84" + "md5=e993231085db95ab011ffe0cd606d9dd" + "sha512=aafad186f328ae8dd4cc69af0f30c1a0b208cf5148a7a94c150099be03838503c5ec12918de26cd7f794b5a72f114bc1bae8d81058bd0ea10372a3b06818687e" ] } diff --git a/esy.lock/opam/ocaml_intrinsics_kernel.v0.17.1/opam b/esy.lock/opam/ocaml_intrinsics_kernel.v0.17.1/opam index 44be9138..f167d96b 100644 --- a/esy.lock/opam/ocaml_intrinsics_kernel.v0.17.1/opam +++ b/esy.lock/opam/ocaml_intrinsics_kernel.v0.17.1/opam @@ -28,3 +28,5 @@ url { "sha512=21e596d6407a620866cee7cab47ef1a9446d6a733b4994e809ea5566d5fa956682a5c6a6190ffb0ed48458abd658301944ed10c4389d91ecb8df677a5f87f2ab" ] } +x-maintenance-intent: ["(latest)"] + diff --git a/esy.lock/opam/ocamlc-loc.3.20.2/opam b/esy.lock/opam/ocamlc-loc.3.21.1/opam similarity index 67% rename from esy.lock/opam/ocamlc-loc.3.20.2/opam rename to esy.lock/opam/ocamlc-loc.3.21.1/opam index 2d29f55e..c73e4914 100644 --- a/esy.lock/opam/ocamlc-loc.3.20.2/opam +++ b/esy.lock/opam/ocamlc-loc.3.21.1/opam @@ -9,7 +9,7 @@ homepage: "https://github.com/ocaml/dune" doc: "https://dune.readthedocs.io/" bug-reports: "https://github.com/ocaml/dune/issues" depends: [ - "dune" {>= "3.20"} + "dune" {>= "3.21"} "ocaml" {>= "4.08.0"} "dyn" {= version} "odoc" {with-doc} @@ -18,7 +18,7 @@ conflicts: [ "ocaml-lsp-server" {< "1.15.0"} ] dev-repo: "git+https://github.com/ocaml/dune.git" -x-maintenance-intent: ["(latest)"] +x-maintenance-intent: ["none"] build: [ ["dune" "subst"] {dev} ["rm" "-rf" "vendor/csexp"] @@ -36,10 +36,10 @@ build: [ ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/ocamlfind.1.9.8/opam b/esy.lock/opam/ocamlfind.1.9.8/opam index d9fe3931..8fb38dc5 100644 --- a/esy.lock/opam/ocamlfind.1.9.8/opam +++ b/esy.lock/opam/ocamlfind.1.9.8/opam @@ -12,7 +12,7 @@ license: "MIT" homepage: "http://projects.camlcity.org/projects/findlib.html" bug-reports: "https://github.com/ocaml/ocamlfind/issues" depends: [ - "ocaml" {>= "3.08.0"} + "ocaml" {>= "3.08.0" & (os != "cygwin" & os-distribution != "msys2" | < "5.0")} ] depopts: ["graphics"] build: [ diff --git a/esy.lock/opam/ordering.3.20.2/opam b/esy.lock/opam/ordering.3.21.1/opam similarity index 62% rename from esy.lock/opam/ordering.3.20.2/opam rename to esy.lock/opam/ordering.3.21.1/opam index 79d08d53..e2c0cad6 100644 --- a/esy.lock/opam/ordering.3.20.2/opam +++ b/esy.lock/opam/ordering.3.21.1/opam @@ -8,12 +8,12 @@ homepage: "https://github.com/ocaml/dune" doc: "https://dune.readthedocs.io/" bug-reports: "https://github.com/ocaml/dune/issues" depends: [ - "dune" {>= "3.20"} + "dune" {>= "3.21"} "ocaml" {>= "4.08.0"} "odoc" {with-doc} ] dev-repo: "git+https://github.com/ocaml/dune.git" -x-maintenance-intent: ["(latest)"] +x-maintenance-intent: ["none"] build: [ ["dune" "subst"] {dev} ["rm" "-rf" "vendor/csexp"] @@ -31,10 +31,10 @@ build: [ ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/ppx_yojson_conv_lib.v0.17.0/opam b/esy.lock/opam/ppx_yojson_conv_lib.v0.17.0/opam index d58fda4f..44492a50 100644 --- a/esy.lock/opam/ppx_yojson_conv_lib.v0.17.0/opam +++ b/esy.lock/opam/ppx_yojson_conv_lib.v0.17.0/opam @@ -23,3 +23,5 @@ url { src: "https://github.com/janestreet/ppx_yojson_conv_lib/archive/refs/tags/v0.17.0.tar.gz" checksum: "sha256=f6e6ee92408c53c5ecd8bb5ae93811aa4cf71f8dc144d5943be8fc2c7697b199" } +x-maintenance-intent: ["(latest)"] + diff --git a/esy.lock/opam/sexplib0.v0.17.0/opam b/esy.lock/opam/sexplib0.v0.17.0/opam index 7cd4cf8f..78a325db 100644 --- a/esy.lock/opam/sexplib0.v0.17.0/opam +++ b/esy.lock/opam/sexplib0.v0.17.0/opam @@ -29,3 +29,5 @@ url { "sha512=ad387e40789fe70a11473db7e85fe017b801592624414e9030730b2e92ea08f98095fb6e9236430f33c801605ebee0a2a6284e0f618a26a7da4599d4fd9d395d" ] } +x-maintenance-intent: ["(latest)"] + diff --git a/esy.lock/opam/stdio.v0.17.0/opam b/esy.lock/opam/stdio.v0.17.0/opam index 6939fc7d..150104a2 100644 --- a/esy.lock/opam/stdio.v0.17.0/opam +++ b/esy.lock/opam/stdio.v0.17.0/opam @@ -11,7 +11,7 @@ build: [ ] depends: [ "ocaml" {>= "5.1.0"} - "base" {>= "v0.17" & < "v0.18"} + "base" {>= "v0.17" & < "v0.18~"} "dune" {>= "3.11.0"} ] available: arch != "x86_32" @@ -26,3 +26,5 @@ url { src: "https://github.com/janestreet/stdio/archive/refs/tags/v0.17.0.tar.gz" checksum: "sha256=e7cb473d4bffcf419f307c658cf2599fab03a2b4fe655bfd0be699f8f7af176e" } +x-maintenance-intent: ["(latest)"] + diff --git a/esy.lock/opam/stdune.3.20.2/opam b/esy.lock/opam/stdune.3.21.1/opam similarity index 65% rename from esy.lock/opam/stdune.3.20.2/opam rename to esy.lock/opam/stdune.3.21.1/opam index cd6c00da..62069618 100644 --- a/esy.lock/opam/stdune.3.20.2/opam +++ b/esy.lock/opam/stdune.3.21.1/opam @@ -9,17 +9,19 @@ homepage: "https://github.com/ocaml/dune" doc: "https://dune.readthedocs.io/" bug-reports: "https://github.com/ocaml/dune/issues" depends: [ - "dune" {>= "3.20"} + "dune" {>= "3.21"} "ocaml" {>= "4.08.0"} "base-unix" + "csexp" {>= "1.5.0"} "dyn" {= version} + "fs-io" {= version} "ordering" {= version} "pp" {>= "2.0.0"} - "csexp" {>= "1.5.0"} + "top-closure" {= version} "odoc" {with-doc} ] dev-repo: "git+https://github.com/ocaml/dune.git" -x-maintenance-intent: ["(latest)"] +x-maintenance-intent: ["none"] build: [ ["dune" "subst"] {dev} ["rm" "-rf" "vendor/csexp"] @@ -37,10 +39,10 @@ build: [ ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/top-closure.3.21.1/opam b/esy.lock/opam/top-closure.3.21.1/opam new file mode 100644 index 00000000..dbdd8003 --- /dev/null +++ b/esy.lock/opam/top-closure.3.21.1/opam @@ -0,0 +1,40 @@ +opam-version: "2.0" +synopsis: "Topological Closure" +description: "Generic Topological Closure" +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.21"} + "ocaml" {>= "4.08"} + "odoc" {with-doc} +] +dev-repo: "git+https://github.com/ocaml/dune.git" +x-maintenance-intent: ["none"] +build: [ + ["dune" "subst"] {dev} + ["rm" "-rf" "vendor/csexp"] + ["rm" "-rf" "vendor/pp"] + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@doc" {with-doc} + ] +] +url { + src: + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" + checksum: [ + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" + ] +} +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/esy.lock/opam/xdg.3.20.2/opam b/esy.lock/opam/xdg.3.21.1/opam similarity index 68% rename from esy.lock/opam/xdg.3.20.2/opam rename to esy.lock/opam/xdg.3.21.1/opam index 6383c894..23e55c26 100644 --- a/esy.lock/opam/xdg.3.20.2/opam +++ b/esy.lock/opam/xdg.3.21.1/opam @@ -9,7 +9,7 @@ homepage: "https://github.com/ocaml/dune" doc: "https://dune.readthedocs.io/" bug-reports: "https://github.com/ocaml/dune/issues" depends: [ - "dune" {>= "3.20"} + "dune" {>= "3.21"} "ocaml" {>= "4.08"} "odoc" {with-doc} ] @@ -32,10 +32,10 @@ build: [ ] url { src: - "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz" + "https://github.com/ocaml/dune/releases/download/3.21.1/dune-3.21.1.tbz" checksum: [ - "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549" - "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff" + "sha256=84f7a82c6d80a7124f3847e9a489e80cfbeafb7bed3573ac01286ef56fd08d94" + "sha512=d9fa44e24036d2593adfe59e52e0ad64f3e7e973d23f84af57fc79e38fa210630b0cb55590f314d6ef455333b96a8e0ce188c2720eaae44576222541ba78efb3" ] } -x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777" +x-commit-hash: "0b5863d9be475453b3cc2bd321fde222af2544d4" diff --git a/package.json b/package.json index b0727de4..1fd7ee94 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "Apache-2.0", "dependencies": { "ocaml": ">= 4.13.0 < 5.4.0", - "@grain/libbinaryen": ">= 124.0.0 < 125.0.0", + "@grain/libbinaryen": "*", "@opam/dune": ">= 3.0.0", "@opam/dune-configurator": ">= 3.0.0" }, @@ -16,7 +16,8 @@ "@opam/ocaml-lsp-server": ">= 1.9.1 < 2.0.0" }, "resolutions": { - "@opam/ocp-indent": "1.7.0" + "@opam/ocp-indent": "1.7.0", + "@grain/libbinaryen": "git+https://github.com/spotandjake/libbinaryen.git#c596fe826ccb9edd91e060becb6284a2d429ea6d" }, "esy": { "build": "dune build -p binaryen" diff --git a/src/dune b/src/dune index a5bcd431..b4109357 100644 --- a/src/dune +++ b/src/dune @@ -15,6 +15,7 @@ export global table + tag memory module_feature module @@ -23,6 +24,7 @@ heap_type signature_type struct_type + type_builder ocaml_helpers) (flags :standard -O2 -Wall -Wextra)) (js_of_ocaml @@ -37,6 +39,7 @@ export.js global.js table.js + tag.js memory.js module_feature.js module.js @@ -44,4 +47,5 @@ packed_type.js heap_type.js signature_type.js + type_builder.js struct_type.js))) diff --git a/src/export.c b/src/export.c index f100a704..79d701f6 100644 --- a/src/export.c +++ b/src/export.c @@ -48,6 +48,16 @@ caml_binaryen_add_global_export(value _module, value _internalName, value _exter CAMLreturn(alloc_BinaryenExportRef(exp)); } +CAMLprim value +caml_binaryen_add_tag_export(value _module, value _internalName, value _externalName) { + CAMLparam3(_module, _internalName, _externalName); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + char* internalName = Safe_String_val(_internalName); + char* externalName = Safe_String_val(_externalName); + BinaryenExportRef exp = BinaryenAddTagExport(module, internalName, externalName); + CAMLreturn(alloc_BinaryenExportRef(exp)); +} + CAMLprim value caml_binaryen_get_export(value _module, value _externalName) { CAMLparam2(_module, _externalName); diff --git a/src/export.js b/src/export.js index a0060cac..168dabf9 100644 --- a/src/export.js +++ b/src/export.js @@ -50,6 +50,19 @@ function caml_binaryen_add_global_export( ); } +//Provides: caml_binaryen_add_tag_export +//Requires: caml_jsstring_of_string +function caml_binaryen_add_tag_export( + wasm_mod, + internal_name, + external_name +) { + return wasm_mod.addTagExport( + caml_jsstring_of_string(internal_name), + caml_jsstring_of_string(external_name) + ); +} + //Provides: caml_binaryen_get_export //Requires: caml_jsstring_of_string function caml_binaryen_get_export(wasm_mod, external_name) { diff --git a/src/export.ml b/src/export.ml index 549c76b1..05787a44 100644 --- a/src/export.ml +++ b/src/export.ml @@ -16,6 +16,10 @@ external add_global_export : Module.t -> string -> string -> t = "caml_binaryen_add_global_export" (** Module, internal name, external name. *) +external add_tag_export : Module.t -> string -> string -> t + = "caml_binaryen_add_tag_export" +(** Module, internal name, external name. *) + external get_export : Module.t -> string -> t = "caml_binaryen_get_export" external remove_export : Module.t -> string -> unit diff --git a/src/export.mli b/src/export.mli index 707f7682..183297aa 100644 --- a/src/export.mli +++ b/src/export.mli @@ -4,6 +4,7 @@ val add_function_export : Module.t -> string -> string -> t val add_table_export : Module.t -> string -> string -> t val add_memory_export : Module.t -> string -> string -> t val add_global_export : Module.t -> string -> string -> t +val add_tag_export : Module.t -> string -> string -> t val get_export : Module.t -> string -> t val remove_export : Module.t -> string -> unit val get_num_exports : Module.t -> int diff --git a/src/expression.c b/src/expression.c index f20c5a9e..7f0f25cf 100644 --- a/src/expression.c +++ b/src/expression.c @@ -124,6 +124,38 @@ caml_binaryen_call_indirect__bytecode(value * argv) { return caml_binaryen_call_indirect(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } +CAMLprim value +caml_binaryen_call_ref(value _module, value _target, value _params, value _ty) { + CAMLparam4(_module, _target, _params, _ty); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenExpressionRef target = BinaryenExpressionRef_val(_target); + _params = array_of_list(_params); + int paramsLen = array_length(_params); + BinaryenExpressionRef params[paramsLen]; + for (int i = 0; i < paramsLen; i++) { + params[i] = BinaryenExpressionRef_val(Field(_params, i)); + } + BinaryenType ty = BinaryenType_val(_ty); + BinaryenExpressionRef exp = BinaryenCallRef(module, target, params, paramsLen, ty); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_return_call_ref(value _module, value _target, value _params, value _ty) { + CAMLparam4(_module, _target, _params, _ty); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenExpressionRef target = BinaryenExpressionRef_val(_target); + _params = array_of_list(_params); + int paramsLen = array_length(_params); + BinaryenExpressionRef params[paramsLen]; + for (int i = 0; i < paramsLen; i++) { + params[i] = BinaryenExpressionRef_val(Field(_params, i)); + } + BinaryenType ty = BinaryenType_val(_ty); + BinaryenExpressionRef exp = BinaryenReturnCallRef(module, target, params, paramsLen, ty); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + CAMLprim value caml_binaryen_return_call(value _module, value _name, value _params, value _retty) { CAMLparam4(_module, _name, _params, _retty); @@ -459,6 +491,38 @@ caml_binaryen_i31_get(value _module, value _val, value _signed) { CAMLreturn(alloc_BinaryenExpressionRef(exp)); } +CAMLprim value +caml_binaryen_ref_test(value _module, value _ref, value _castType) { + CAMLparam3(_module, _ref, _castType); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenType castType = BinaryenType_val(_castType); + BinaryenExpressionRef exp = BinaryenRefTest(module, ref, castType); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_ref_cast(value _module, value _ref, value _castType) { + CAMLparam3(_module, _ref, _castType); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenType castType = BinaryenType_val(_castType); + BinaryenExpressionRef exp = BinaryenRefCast(module, ref, castType); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_br_on(value _module, value _op, value _name, value _ref, value _castType) { + CAMLparam5(_module, _op, _name, _ref, _castType); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenOp op = BinaryenOp_val(_op); + char* name = Safe_String_val(_name); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenType castType = BinaryenType_val(_castType); + BinaryenExpressionRef exp = BinaryenBrOn(module, op, name, ref, castType); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + CAMLprim value caml_binaryen_expression_id_invalid(value unit) { CAMLparam1(unit); @@ -1328,6 +1392,90 @@ caml_binaryen_call_indirect_set_return(value _exp, value _isReturn) { CAMLreturn(Val_unit); } +CAMLprim value +caml_binaryen_call_ref_get_target(value _exp) { + CAMLparam1(_exp); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + BinaryenExpressionRef target = BinaryenCallRefGetTarget(exp); + CAMLreturn(alloc_BinaryenExpressionRef(target)); +} + +CAMLprim value +caml_binaryen_call_ref_set_target(value _exp, value _target) { + CAMLparam2(_exp, _target); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + BinaryenExpressionRef target = BinaryenExpressionRef_val(_target); + BinaryenCallRefSetTarget(exp, target); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_call_ref_get_num_operands(value _exp) { + CAMLparam1(_exp); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + CAMLreturn(Val_int(BinaryenCallRefGetNumOperands(exp))); +} + +CAMLprim value +caml_binaryen_call_ref_get_operand_at(value _exp, value _index) { + CAMLparam2(_exp, _index); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + BinaryenIndex index = Int_val(_index); + CAMLreturn(alloc_BinaryenExpressionRef(BinaryenCallRefGetOperandAt(exp, index))); +} + +CAMLprim value +caml_binaryen_call_ref_set_operand_at(value _exp, value _index, value _operand) { + CAMLparam3(_exp, _index, _operand); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef operand = BinaryenExpressionRef_val(_operand); + BinaryenCallRefSetOperandAt(exp, index, operand); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_call_ref_append_operand(value _exp, value _operand) { + CAMLparam2(_exp, _operand); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + BinaryenExpressionRef operand = BinaryenExpressionRef_val(_operand); + CAMLreturn(Val_int(BinaryenCallRefAppendOperand(exp, operand))); +} + +CAMLprim value +caml_binaryen_call_ref_insert_operand_at(value _exp, value _index, value _operand) { + CAMLparam3(_exp, _index, _operand); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef operand = BinaryenExpressionRef_val(_operand); + BinaryenCallRefInsertOperandAt(exp, index, operand); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_call_ref_remove_operand_at(value _exp, value _index) { + CAMLparam2(_exp, _index); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + BinaryenIndex index = Int_val(_index); + CAMLreturn(alloc_BinaryenExpressionRef(BinaryenCallRefRemoveOperandAt(exp, index))); +} + +CAMLprim value +caml_binaryen_call_ref_is_return(value _exp) { + CAMLparam1(_exp); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + CAMLreturn(Val_bool(BinaryenCallRefIsReturn(exp))); +} + +CAMLprim value +caml_binaryen_call_ref_set_return(value _exp, value _isReturn) { + CAMLparam2(_exp, _isReturn); + BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp); + int isReturn = Bool_val(_isReturn); + BinaryenCallRefSetReturn(exp, isReturn); + CAMLreturn(Val_unit); +} + CAMLprim value caml_binaryen_local_set_get_value(value _exp) { CAMLparam1(_exp); @@ -1883,6 +2031,494 @@ caml_binaryen_ref_eq(value _module, value _left, value _right) { CAMLreturn(alloc_BinaryenExpressionRef(exp)); } +// Struct operations + +CAMLprim value +caml_binaryen_struct_new(value _module, value _operands, value _type) { + CAMLparam3(_module, _operands, _type); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenHeapType type = BinaryenHeapType_val(_type); + if (Is_some(_operands)) { + _operands = array_of_list(Some_val(_operands)); + int operandsLen = array_length(_operands); + BinaryenExpressionRef operands[operandsLen]; + for (int i = 0; i < operandsLen; i++) { + operands[i] = BinaryenExpressionRef_val(Field(_operands, i)); + } + BinaryenExpressionRef exp = BinaryenStructNew(module, operands, operandsLen, type); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); + } else { + BinaryenExpressionRef exp = BinaryenStructNew(module, NULL, 0, type); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); + } +} + +CAMLprim value +caml_binaryen_struct_get(value _module, value _index, value _ref, value _type, value _signed) { + CAMLparam5(_module, _index, _ref, _type, _signed); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenType type = BinaryenType_val(_type); + bool signed_ = Bool_val(_signed); + BinaryenExpressionRef exp = BinaryenStructGet(module, index, ref, type, signed_); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_struct_set(value _module, value _index, value _ref, value _value) { + CAMLparam4(_module, _index, _ref, _value); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenExpressionRef value_ = BinaryenExpressionRef_val(_value); + BinaryenExpressionRef exp = BinaryenStructSet(module, index, ref, value_); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +// Array operations + +CAMLprim value +caml_binaryen_array_new(value _module, value _type, value _size, value _init) { + CAMLparam4(_module, _type, _size, _init); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenHeapType type = BinaryenHeapType_val(_type); + BinaryenExpressionRef size = BinaryenExpressionRef_val(_size); + BinaryenExpressionRef init = BinaryenExpressionRef_val(_init); + BinaryenExpressionRef exp = BinaryenArrayNew(module, type, size, init); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_new_data(value _module, value _type, value _name, value _offset, value _size) { + CAMLparam5(_module, _type, _name, _offset, _size); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenHeapType type = BinaryenHeapType_val(_type); + char* name = Safe_String_val(_name); + BinaryenExpressionRef offset = BinaryenExpressionRef_val(_offset); + BinaryenExpressionRef size = BinaryenExpressionRef_val(_size); + BinaryenExpressionRef exp = BinaryenArrayNewData(module, type, name, offset, size); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_new_elem(value _module, value _type, value _seg, value _offset, value _size) { + CAMLparam5(_module, _type, _seg, _offset, _size); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenHeapType type = BinaryenHeapType_val(_type); + char* seg = Safe_String_val(_seg); + BinaryenExpressionRef offset = BinaryenExpressionRef_val(_offset); + BinaryenExpressionRef size = BinaryenExpressionRef_val(_size); + BinaryenExpressionRef exp = BinaryenArrayNewElem(module, type, seg, offset, size); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_new_fixed(value _module, value _type, value _values) { + CAMLparam3(_module, _type, _values); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenHeapType type = BinaryenHeapType_val(_type); + _values = array_of_list(_values); + int valuesLen = array_length(_values); + BinaryenExpressionRef values[valuesLen]; + for (int i = 0; i < valuesLen; i++) { + values[i] = BinaryenExpressionRef_val(Field(_values, i)); + } + BinaryenExpressionRef exp = BinaryenArrayNewFixed(module, type, values, valuesLen); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_get(value _module, value _ref, value _index, value _type, value _signed) { + CAMLparam5(_module, _ref, _index, _type, _signed); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenExpressionRef index = BinaryenExpressionRef_val(_index); + BinaryenType type = BinaryenType_val(_type); + bool signed_ = Bool_val(_signed); + BinaryenExpressionRef exp = BinaryenArrayGet(module, ref, index, type, signed_); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_set(value _module, value _ref, value _index, value _value) { + CAMLparam4(_module, _ref, _index, _value); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenExpressionRef index = BinaryenExpressionRef_val(_index); + BinaryenExpressionRef value_ = BinaryenExpressionRef_val(_value); + BinaryenExpressionRef exp = BinaryenArraySet(module, ref, index, value_); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_len(value _module, value _ref) { + CAMLparam2(_module, _ref); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenExpressionRef exp = BinaryenArrayLen(module, ref); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_copy(value _module, value _destRef, value _destIndex, value _srcRef, value _srcIndex, value _length) { + CAMLparam5(_module, _destRef, _destIndex, _srcRef, _srcIndex); + CAMLxparam1(_length); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenExpressionRef destRef = BinaryenExpressionRef_val(_destRef); + BinaryenExpressionRef destIndex = BinaryenExpressionRef_val(_destIndex); + BinaryenExpressionRef srcRef = BinaryenExpressionRef_val(_srcRef); + BinaryenExpressionRef srcIndex = BinaryenExpressionRef_val(_srcIndex); + BinaryenExpressionRef length = BinaryenExpressionRef_val(_length); + BinaryenExpressionRef exp = BinaryenArrayCopy(module, destRef, destIndex, srcRef, srcIndex, length); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} +CAMLprim value +caml_binaryen_array_copy__bytecode(value * argv) { + return caml_binaryen_array_copy(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); +} + +CAMLprim value +caml_binaryen_array_fill(value _module, value _ref, value _index, value _value, value _size) { + CAMLparam5(_module, _ref, _index, _value, _size); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenExpressionRef index = BinaryenExpressionRef_val(_index); + BinaryenExpressionRef val = BinaryenExpressionRef_val(_value); + BinaryenExpressionRef size = BinaryenExpressionRef_val(_size); + BinaryenExpressionRef exp = BinaryenArrayFill(module, ref, index, val, size); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_init_data(value _module, value _name, value _ref, value _index, value _offset, value _size) { + CAMLparam5(_module, _name, _ref, _index, _offset); + CAMLxparam1(_size); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + char* name = Safe_String_val(_name); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenExpressionRef index = BinaryenExpressionRef_val(_index); + BinaryenExpressionRef offset = BinaryenExpressionRef_val(_offset); + BinaryenExpressionRef size = BinaryenExpressionRef_val(_size); + BinaryenExpressionRef exp = BinaryenArrayInitData(module, name, ref, index, offset, size); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_init_data__bytecode(value * argv) { + return caml_binaryen_array_init_data(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); +} + +CAMLprim value +caml_binaryen_array_init_elem(value _module, value _seg, value _ref, value _index, value _offset, value _size) { + CAMLparam5(_module, _seg, _ref, _index, _offset); + CAMLxparam1(_size); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + char* seg = Safe_String_val(_seg); + BinaryenExpressionRef ref = BinaryenExpressionRef_val(_ref); + BinaryenExpressionRef index = BinaryenExpressionRef_val(_index); + BinaryenExpressionRef offset = BinaryenExpressionRef_val(_offset); + BinaryenExpressionRef size = BinaryenExpressionRef_val(_size); + BinaryenExpressionRef exp = BinaryenArrayInitElem(module, seg, ref, index, offset, size); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_array_init_elem__bytecode(value * argv) { + return caml_binaryen_array_init_elem(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); +} + +// Exception handling operations +CAMLprim value +caml_binaryen_try(value _module, value _name, value _body, value _catchTags, value _catchBodies, value _delegateTarget) { + CAMLparam5(_module, _name, _body, _catchTags, _catchBodies); + CAMLxparam1(_delegateTarget); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + char *name; + if (Is_none(_name)) { + name = NULL; + } else { + name = Safe_String_val(Some_val(_name)); + } + BinaryenExpressionRef body = BinaryenExpressionRef_val(_body); + _catchTags = array_of_list(_catchTags); + int catchTagsLen = array_length(_catchTags); + const char* catchTags[catchTagsLen]; + for (int i = 0; i < catchTagsLen; i++) { + catchTags[i] = Safe_String_val(Field(_catchTags, i)); + } + _catchBodies = array_of_list(_catchBodies); + int catchBodiesLen = array_length(_catchBodies); + BinaryenExpressionRef catchBodies[catchBodiesLen]; + for (int i = 0; i < catchBodiesLen; i++) { + catchBodies[i] = BinaryenExpressionRef_val(Field(_catchBodies, i)); + } + char *delegateTarget; + if (Is_none(_delegateTarget)) { + delegateTarget = NULL; + } else { + delegateTarget = Safe_String_val(Some_val(_delegateTarget)); + } + BinaryenExpressionRef exp = BinaryenTry( + module, + name, + body, + catchTags, + catchTagsLen, + catchBodies, + catchBodiesLen, + delegateTarget + ); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value caml_binaryen_try__bytecode(value * argv) { + return caml_binaryen_try(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); +} + +CAMLprim value +caml_binaryen_throw(value _module, value _tag, value _operands) { + CAMLparam3(_module, _tag, _operands); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + char *tag = Safe_String_val(_tag); + _operands = array_of_list(_operands); + int operandsLen = array_length(_operands); + BinaryenExpressionRef operands[operandsLen]; + for (int i = 0; i < operandsLen; i++) { + operands[i] = BinaryenExpressionRef_val(Field(_operands, i)); + } + BinaryenExpressionRef exp = BinaryenThrow(module, tag, operands, operandsLen); + CAMLreturn(alloc_BinaryenExpressionRef(exp)); +} + +CAMLprim value +caml_binaryen_try_get_name(value _expr) { + CAMLparam1(_expr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + const char* name = BinaryenTryGetName(expr); + if (name == NULL) { + CAMLreturn(Val_none); + } else { + CAMLreturn(caml_alloc_some(caml_copy_string(name))); + } +} + +CAMLprim value +caml_binaryen_try_set_name(value _expr, value _name) { + CAMLparam2(_expr, _name); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + const char* name = Safe_String_val(_name); + BinaryenTrySetName(expr, name); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_try_get_body(value _expr) { + CAMLparam1(_expr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenExpressionRef binaryenRetVal = BinaryenTryGetBody(expr); + CAMLreturn(alloc_BinaryenExpressionRef(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_try_set_body(value _expr, value _bodyExpr) { + CAMLparam2(_expr, _bodyExpr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenExpressionRef bodyExpr = BinaryenExpressionRef_val(_bodyExpr); + BinaryenTrySetBody(expr, bodyExpr); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_try_get_num_catch_tags(value _expr) { + CAMLparam1(_expr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex binaryenRetVal = BinaryenTryGetNumCatchTags(expr); + CAMLreturn(Val_int(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_try_get_num_catch_bodies(value _expr) { + CAMLparam1(_expr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex binaryenRetVal = BinaryenTryGetNumCatchBodies(expr); + CAMLreturn(Val_int(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_try_get_catch_tag_at(value _expr, value _index) { + CAMLparam2(_expr, _index); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + const char* binaryenRetVal = BinaryenTryGetCatchTagAt(expr, index); + CAMLreturn(caml_copy_string(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_try_set_catch_tag_at(value _expr, value _index, value _catchTag) { + CAMLparam3(_expr, _index, _catchTag); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + const char* catchTag = Safe_String_val(_catchTag); + BinaryenTrySetCatchTagAt(expr, index, catchTag); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_try_append_catch_tag(value _expr, value _catchTag) { + CAMLparam2(_expr, _catchTag); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + const char* catchTag = Safe_String_val(_catchTag); + BinaryenIndex binaryenRetVal = BinaryenTryAppendCatchTag(expr, catchTag); + CAMLreturn(Val_int(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_try_insert_catch_tag_at(value _expr, value _index, value _catchTag) { + CAMLparam3(_expr, _index, _catchTag); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + const char* catchTag = Safe_String_val(_catchTag); + BinaryenTryInsertCatchTagAt(expr, index, catchTag); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_try_remove_catch_tag_at(value _expr, value _index) { + CAMLparam2(_expr, _index); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + const char* binaryenRetVal = BinaryenTryRemoveCatchTagAt(expr, index); + CAMLreturn(caml_copy_string(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_try_get_catch_body_at(value _expr, value _index) { + CAMLparam2(_expr, _index); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef binaryenRetVal = BinaryenTryGetCatchBodyAt(expr, index); + CAMLreturn(alloc_BinaryenExpressionRef(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_try_set_catch_body_at(value _expr, value _index, value _catchExpr) { + CAMLparam3(_expr, _index, _catchExpr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef catchExpr = BinaryenExpressionRef_val(_catchExpr); + BinaryenTrySetCatchBodyAt(expr, index, catchExpr); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_try_append_catch_body(value _expr, value _catchExpr) { + CAMLparam2(_expr, _catchExpr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenExpressionRef catchExpr = BinaryenExpressionRef_val(_catchExpr); + BinaryenIndex binaryenRetVal = BinaryenTryAppendCatchBody(expr, catchExpr); + CAMLreturn(Val_int(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_try_insert_catch_body_at(value _expr, value _index, value _catchExpr) { + CAMLparam3(_expr, _index, _catchExpr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef catchExpr = BinaryenExpressionRef_val(_catchExpr); + BinaryenTryInsertCatchBodyAt(expr, index, catchExpr); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_try_remove_catch_body_at(value _expr, value _index) { + CAMLparam2(_expr, _index); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef binaryenRetVal = BinaryenTryRemoveCatchBodyAt(expr, index); + CAMLreturn(alloc_BinaryenExpressionRef(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_try_has_catch_all(value _expr) { + CAMLparam1(_expr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + bool binaryenRetVal = BinaryenTryHasCatchAll(expr); + CAMLreturn(Val_bool(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_throw_get_tag(value _expr) { + CAMLparam1(_expr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + const char* binaryenRetVal = BinaryenThrowGetTag(expr); + CAMLreturn(caml_copy_string(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_throw_set_tag(value _expr, value _tagName) { + CAMLparam2(_expr, _tagName); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + const char* tagName = Safe_String_val(_tagName); + BinaryenThrowSetTag(expr, tagName); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_throw_get_num_operands(value _expr) { + CAMLparam1(_expr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex binaryenRetVal = BinaryenThrowGetNumOperands(expr); + CAMLreturn(Val_int(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_throw_get_operand_at(value _expr, value _index) { + CAMLparam2(_expr, _index); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef binaryenRetVal = BinaryenThrowGetOperandAt(expr, index); + CAMLreturn(alloc_BinaryenExpressionRef(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_throw_set_operand_at(value _expr, value _index, value _operandExpr) { + CAMLparam3(_expr, _index, _operandExpr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef operandExpr = BinaryenExpressionRef_val(_operandExpr); + BinaryenThrowSetOperandAt(expr, index, operandExpr); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_throw_append_operand(value _expr, value _operandExpr) { + CAMLparam2(_expr, _operandExpr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenExpressionRef operandExpr = BinaryenExpressionRef_val(_operandExpr); + BinaryenIndex binaryenRetVal = BinaryenThrowAppendOperand(expr, operandExpr); + CAMLreturn(Val_int(binaryenRetVal)); +} + +CAMLprim value +caml_binaryen_throw_insert_operand_at(value _expr, value _index, value _operandExpr) { + CAMLparam3(_expr, _index, _operandExpr); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef operandExpr = BinaryenExpressionRef_val(_operandExpr); + BinaryenThrowInsertOperandAt(expr, index, operandExpr); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_throw_remove_operand_at(value _expr, value _index) { + CAMLparam2(_expr, _index); + BinaryenExpressionRef expr = BinaryenExpressionRef_val(_expr); + BinaryenIndex index = Int_val(_index); + BinaryenExpressionRef binaryenRetVal = BinaryenThrowRemoveOperandAt(expr, index); + CAMLreturn(alloc_BinaryenExpressionRef(binaryenRetVal)); +} + // Table operations CAMLprim value caml_binaryen_table_get(value _module, value _name, value _index, value _ty) { diff --git a/src/expression.js b/src/expression.js index 13b16cf5..aa1ef15f 100644 --- a/src/expression.js +++ b/src/expression.js @@ -101,6 +101,28 @@ function caml_binaryen_call_indirect__bytecode() { ); } +//Provides: caml_binaryen_call_ref +//Requires: caml_jsstring_of_string +//Requires: caml_list_to_js_array +function caml_binaryen_call_ref(wasm_mod, target, params, typ) { + return wasm_mod.call_ref( + target, + caml_list_to_js_array(params), + typ + ); +} + +//Provides: caml_binaryen_return_call_ref +//Requires: caml_jsstring_of_string +//Requires: caml_list_to_js_array +function caml_binaryen_return_call_ref(wasm_mod, target, params, typ) { + return wasm_mod.return_call_ref( + target, + caml_list_to_js_array(params), + typ + ); +} + //Provides: caml_binaryen_return_call //Requires: caml_jsstring_of_string //Requires: caml_list_to_js_array @@ -547,6 +569,32 @@ function caml_binaryen_ref_i31(wasm_mod, typ) { return wasm_mod.ref.i31(typ); } +//Provides: caml_binaryen_ref_test +function caml_binaryen_ref_test(wasm_mod, ref, typ) { + return wasm_mod.ref.test(ref, typ); +} + +//Provides: caml_binaryen_ref_cast +function caml_binaryen_ref_cast(wasm_mod, ref, typ) { + return wasm_mod.ref.cast(ref, typ); +} + +//Provides: caml_binaryen_br_on +//Requires: caml_jsstring_of_string +//Requires: Binaryen +function caml_binaryen_br_on(wasm_mod, op, name, ref, typ) { + switch (op) { + case Binaryen.BrOnNull: + return wasm_mod.br_on_null(caml_jsstring_of_string(name), ref); + case Binaryen.BrOnNonNull: + return wasm_mod.br_on_non_null(caml_jsstring_of_string(name), ref); + case Binaryen.BrOnCast: + return wasm_mod.br_on_cast(caml_jsstring_of_string(name), ref, typ); + case Binaryen.BrOnCastFail: + return wasm_mod.br_on_cast_fail(caml_jsstring_of_string(name), ref, typ); + } +} + //Provides: caml_binaryen_i31_get function caml_binaryen_i31_get(wasm_mod, typ, signed) { if (signed) { @@ -1296,6 +1344,68 @@ function caml_binaryen_call_indirect_set_return(exp, isReturn) { return Binaryen.CallIndirect.setReturn(exp, caml_js_from_bool(isReturn)); } +//Provides: caml_binaryen_call_ref_get_target +//Requires: Binaryen +function caml_binaryen_call_ref_get_target(exp) { + return Binaryen.CallRef.getTarget(exp); +} + +//Provides: caml_binaryen_call_ref_set_target +//Requires: Binaryen +function caml_binaryen_call_ref_set_target(exp, target) { + return Binaryen.CallRef.setTarget(exp, target); +} + +//Provides: caml_binaryen_call_ref_get_num_operands +//Requires: Binaryen +function caml_binaryen_call_ref_get_num_operands(exp) { + return Binaryen.CallRef.getNumOperands(exp); +} + +//Provides: caml_binaryen_call_ref_get_operand_at +//Requires: Binaryen +function caml_binaryen_call_ref_get_operand_at(exp, index) { + return Binaryen.CallRef.getOperandAt(exp, index); +} + +//Provides: caml_binaryen_call_ref_set_operand_at +//Requires: Binaryen +function caml_binaryen_call_ref_set_operand_at(exp, index, operand) { + return Binaryen.CallRef.setOperandAt(exp, index, operand); +} + +//Provides: caml_binaryen_call_ref_append_operand +//Requires: Binaryen +function caml_binaryen_call_ref_append_operand(exp, operand) { + return Binaryen.CallRef.appendOperand(exp, operand); +} + +//Provides: caml_binaryen_call_ref_insert_operand_at +//Requires: Binaryen +function caml_binaryen_call_ref_insert_operand_at(exp, index, operand) { + return Binaryen.CallRef.insertOperandAt(exp, index, operand); +} + +//Provides: caml_binaryen_call_ref_remove_operand_at +//Requires: Binaryen +function caml_binaryen_call_ref_remove_operand_at(exp, index) { + return Binaryen.CallRef.removeOperandAt(exp, index); +} + +//Provides: caml_binaryen_call_ref_is_return +//Requires: Binaryen +//Requires: caml_js_to_bool +function caml_binaryen_call_ref_is_return(exp) { + return caml_js_to_bool(Binaryen.CallRef.isReturn(exp)); +} + +//Provides: caml_binaryen_call_ref_set_return +//Requires: Binaryen +//Requires: caml_js_from_bool +function caml_binaryen_call_ref_set_return(exp, isReturn) { + return Binaryen.CallRef.setReturn(exp, caml_js_from_bool(isReturn)); +} + //Provides: caml_binaryen_local_set_get_value //Requires: Binaryen function caml_binaryen_local_set_get_value(exp) { @@ -1707,6 +1817,303 @@ function caml_binaryen_ref_eq(wasm_mod, left, right) { return wasm_mod.ref.func(left, right); } +// Struct operations + +//Provides: caml_binaryen_struct_new +//Requires: caml_list_to_js_array +function caml_binaryen_struct_new(wasm_mod, operands, type) { + return wasm_mod.struct.new( + operands ? caml_list_to_js_array(operands[1]) : null, + type + ); +} + +//Provides: caml_binaryen_struct_get +//Requires: caml_js_from_bool +function caml_binaryen_struct_get(wasm_mod, index, ref, type, signed) { + return wasm_mod.struct.get(index, ref, type, caml_js_from_bool(signed)); +} + +//Provides: caml_binaryen_struct_set +function caml_binaryen_struct_set(wasm_mod, index, ref, value) { + return wasm_mod.struct.set(index, ref, value); +} + +// Array operations + +//Provides: caml_binaryen_array_new +function caml_binaryen_array_new(wasm_mod, type, size, init) { + return wasm_mod.array.new(type, size, init); +} + +//Provides: caml_binaryen_array_new_data +//Requires: caml_jsstring_of_string +function caml_binaryen_array_new_data(wasm_mod, type, name, offset, size) { + return wasm_mod.array.new_data( + type, + caml_jsstring_of_string(name), + offset, + size + ); +} + +//Provides: caml_binaryen_array_new_elem +//Requires: caml_jsstring_of_string +function caml_binaryen_array_new_elem(wasm_mod, type, name, offset, size) { + return wasm_mod.array.new_elem( + type, + caml_jsstring_of_string(name), + offset, + size + ); +} + +//Provides: caml_binaryen_array_new_fixed +//Requires: caml_list_to_js_array +function caml_binaryen_array_new_fixed(wasm_mod, type, values) { + return wasm_mod.array.new_fixed(type, caml_list_to_js_array(values)); +} + +//Provides: caml_binaryen_array_get +//Requires: caml_js_from_bool +function caml_binaryen_array_get(wasm_mod, ref, index, type, signed) { + return wasm_mod.array.get(ref, index, type, caml_js_from_bool(signed)); +} + +//Provides: caml_binaryen_array_set +function caml_binaryen_array_set(wasm_mod, ref, index, value) { + return wasm_mod.array.set(ref, index, value); +} + +//Provides: caml_binaryen_array_len +function caml_binaryen_array_len(wasm_mod, ref) { + return wasm_mod.array.len(ref); +} + +//Provides: caml_binaryen_array_fill +function caml_binaryen_array_fill(wasm_mod, ref, index, value, size) { + return wasm_mod.array.fill(ref, index, value, size); +} + +//Provides: caml_binaryen_array_copy +function caml_binaryen_array_copy( + wasm_mod, + destRef, + destIndex, + srcRef, + srcIndex, + length +) { + return wasm_mod.array.copy(destRef, destIndex, srcRef, srcIndex, length); +} + +//Provides: caml_binaryen_array_init_data +//Requires: caml_jsstring_of_string +function caml_binaryen_array_init_data(name, ref, index, offset, size) { + return wasm_mod.array.init_data(caml_jsstring_of_string(name), ref, index, offset, size); +} + +//Provides: caml_binaryen_array_init_elem +//Requires: caml_jsstring_of_string +function caml_binaryen_array_init_elem(name, ref, index, offset, size) { + return wasm_mod.array.init_elem(caml_jsstring_of_string(name), ref, index, offset, size); +} + +//Provides: caml_binaryen_array_copy__bytecode +//Requires: caml_binaryen_array_copy +function caml_binaryen_array_copy__bytecode() { + return caml_binaryen_array_copy( + arguments[0], + arguments[1], + arguments[2], + arguments[3], + arguments[4], + arguments[5] + ); +} + +// Exception handling operations + +//Provides: caml_binaryen_try +//Requires: caml_jsstring_of_string, caml_list_to_js_array +function caml_binaryen_try(wasm_mod, name, body, catch_tags, catch_bodies, delegate_target) { + return wasm_mod.try( + name ? caml_jsstring_of_string(name[1]) : null, + body, + caml_list_to_js_array(catch_tags).map(caml_jsstring_of_string), + caml_list_to_js_array(catch_bodies), + delegate_target ? caml_jsstring_of_string(delegate_target[1]) : null, + ); +} + +//Provides: caml_binaryen_try__bytecode +//Requires: caml_binaryen_try +function caml_binaryen_try__bytecode() { + return caml_binaryen_try(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); +} + +//Provides: caml_binaryen_throw +//Requires: caml_jsstring_of_string, caml_list_to_js_array +function caml_binaryen_throw(wasm_mod, tag, operands) { + return wasm_mod.throw( + caml_jsstring_of_string(tag), + caml_list_to_js_array(operands), + ); +} + +//Provides: caml_binaryen_try_get_name +//Requires: Binaryen, caml_string_of_jsstring, to_option +function caml_binaryen_try_get_name(expr) { + var name = Binaryen.Try.getName(expr); + var str = name != null ? caml_string_of_jsstring(name) : null; + return to_option(str); +} + +//Provides: caml_binaryen_try_set_name +//Requires: Binaryen, caml_jsstring_of_string +function caml_binaryen_try_set_name(expr, name) { + Binaryen.Try.setName(expr, caml_jsstring_of_string(name)); +} + +//Provides: caml_binaryen_try_get_body +//Requires: Binaryen +function caml_binaryen_try_get_body(expr) { + return Binaryen.Try.getBody(expr); +} + +//Provides: caml_binaryen_try_set_body +//Requires: Binaryen +function caml_binaryen_try_set_body(expr, bodyExpr) { + Binaryen.Try.setBody(expr, bodyExpr); +} + +//Provides: caml_binaryen_try_get_num_catch_tags +//Requires: Binaryen +function caml_binaryen_try_get_num_catch_tags(expr) { + return Binaryen.Try.getNumCatchTags(expr); +} + +//Provides: caml_binaryen_try_get_num_catch_bodies +//Requires: Binaryen +function caml_binaryen_try_get_num_catch_bodies(expr) { + return Binaryen.Try.getNumCatchBodies(expr); +} + +//Provides: caml_binaryen_try_get_catch_tag_at +//Requires: Binaryen, caml_string_of_jsstring +function caml_binaryen_try_get_catch_tag_at(expr, index) { + return caml_string_of_jsstring(Binaryen.Try.getCatchTagAt(expr, index)); +} + +//Provides: caml_binaryen_try_set_catch_tag_at +//Requires: Binaryen, caml_jsstring_of_string +function caml_binaryen_try_set_catch_tag_at(expr, index, catchTag) { + Binaryen.Try.setCatchTagAt(expr, index, caml_jsstring_of_string(catchTag)); +} + +//Provides: caml_binaryen_try_append_catch_tag +//Requires: Binaryen, caml_jsstring_of_string +function caml_binaryen_try_append_catch_tag(expr, catchTag) { + return Binaryen.Try.appendCatchTag(expr, caml_jsstring_of_string(catchTag)); +} + +//Provides: caml_binaryen_try_insert_catch_tag_at +//Requires: Binaryen, caml_jsstring_of_string +function caml_binaryen_try_insert_catch_tag_at(expr, index, catchTag) { + Binaryen.Try.insertCatchTagAt(expr, index, caml_jsstring_of_string(catchTag)); +} + +//Provides: caml_binaryen_try_remove_catch_tag_at +//Requires: Binaryen, caml_string_of_jsstring +function caml_binaryen_try_remove_catch_tag_at(expr, index) { + return caml_string_of_jsstring(Binaryen.Try.removeCatchTagAt(expr, index)); +} + +//Provides: caml_binaryen_try_get_catch_body_at +//Requires: Binaryen +function caml_binaryen_try_get_catch_body_at(expr, index) { + return Binaryen.Try.getCatchBodyAt(expr, index); +} + +//Provides: caml_binaryen_try_set_catch_body_at +//Requires: Binaryen +function caml_binaryen_try_set_catch_body_at(expr, index, catchExpr) { + Binaryen.Try.setCatchBodyAt(expr, index, catchExpr); +} + +//Provides: caml_binaryen_try_append_catch_body +//Requires: Binaryen +function caml_binaryen_try_append_catch_body(expr, catchExpr) { + return Binaryen.Try.appendCatchBody(expr, catchExpr); +} + +//Provides: caml_binaryen_try_insert_catch_body_at +//Requires: Binaryen +function caml_binaryen_try_insert_catch_body_at(expr, index, catchExpr) { + Binaryen.Try.insertCatchBodyAt(expr, index, catchExpr); +} + +//Provides: caml_binaryen_try_remove_catch_body_at +//Requires: Binaryen +function caml_binaryen_try_remove_catch_body_at(expr, index) { + return Binaryen.Try.removeCatchBodyAt(expr, index); +} + +//Provides: caml_binaryen_try_has_catch_all +//Requires: Binaryen +//Requires: caml_js_to_bool +function caml_binaryen_try_has_catch_all(expr) { + return caml_js_to_bool(Binaryen.Try.hasCatchAll(expr)); +} + +//Provides: caml_binaryen_throw_get_tag +//Requires: Binaryen, caml_string_of_jsstring +function caml_binaryen_throw_get_tag(expr) { + return caml_string_of_jsstring(Binaryen.Throw.getTag(expr)); +} + +//Provides: caml_binaryen_throw_set_tag +//Requires: Binaryen, caml_jsstring_of_string +function caml_binaryen_throw_set_tag(expr, tagName) { + Binaryen.Throw.setTag(expr, caml_jsstring_of_string(tagName)); +} + +//Provides: caml_binaryen_throw_get_num_operands +//Requires: Binaryen +function caml_binaryen_throw_get_num_operands(expr) { + return Binaryen.Throw.getNumOperands(expr); +} + +//Provides: caml_binaryen_throw_get_operand_at +//Requires: Binaryen +function caml_binaryen_throw_get_operand_at(expr, index) { + return Binaryen.Throw.getOperandAt(expr, index); +} + +//Provides: caml_binaryen_throw_set_operand_at +//Requires: Binaryen +function caml_binaryen_throw_set_operand_at(expr, index, operandExpr) { + Binaryen.Throw.setOperandAt(expr, index, operandExpr); +} + +//Provides: caml_binaryen_throw_append_operand +//Requires: Binaryen +function caml_binaryen_throw_append_operand(expr, operandExpr) { + return Binaryen.Throw.appendOperand(expr, operandExpr); +} + +//Provides: caml_binaryen_throw_insert_operand_at +//Requires: Binaryen +function caml_binaryen_throw_insert_operand_at(expr, index, operandExpr) { + Binaryen.Throw.insertOperandAt(expr, index, operandExpr); +} + +//Provides: caml_binaryen_throw_remove_operand_at +//Requires: Binaryen +function caml_binaryen_throw_remove_operand_at(expr, index) { + return Binaryen.Throw.removeOperandAt(expr, index); +} + // Table operations //Provides: caml_binaryen_table_get diff --git a/src/expression.ml b/src/expression.ml index 1824b6db..7c774b80 100644 --- a/src/expression.ml +++ b/src/expression.ml @@ -583,6 +583,44 @@ module Call_indirect = struct = "caml_binaryen_call_indirect_set_return" end +module Call_ref = struct + external make : Module.t -> t -> t list -> Type.t -> t + = "caml_binaryen_call_ref" + + (** Module, function value, params, type. *) + let make mod_ target params typ = make mod_ target params typ + + external make_return : Module.t -> t -> t list -> Type.t -> t + = "caml_binaryen_return_call_ref" + + (** Module, function value, params, type. *) + let make_return mod_ target params typ = make mod_ target params typ + + external get_target : t -> t = "caml_binaryen_call_ref_get_target" + external set_target : t -> t -> unit = "caml_binaryen_call_ref_set_target" + + external get_num_operands : t -> int + = "caml_binaryen_call_ref_get_num_operands" + + external get_operand_at : t -> int -> t + = "caml_binaryen_call_ref_get_operand_at" + + external set_operand_at : t -> int -> t -> unit + = "caml_binaryen_call_ref_set_operand_at" + + external append_operand : t -> t -> int + = "caml_binaryen_call_ref_append_operand" + + external insert_operand_at : t -> int -> t -> unit + = "caml_binaryen_call_ref_insert_operand_at" + + external remove_operand_at : t -> int -> t + = "caml_binaryen_call_ref_remove_operand_at" + + external is_return : t -> bool = "caml_binaryen_call_ref_is_return" + external set_return : t -> bool -> unit = "caml_binaryen_call_ref_set_return" +end + module Local_get = struct external make : Module.t -> int -> Type.t -> t = "caml_binaryen_local_get" (** Module, slot, type. *) @@ -830,6 +868,193 @@ module Ref = struct external eq : Module.t -> t -> t -> t = "caml_binaryen_ref_eq" (** Module, left, right *) + + external test : Module.t -> t -> Type.t -> t = "caml_binaryen_ref_test" + (** Module, value, type *) + + external cast : Module.t -> t -> Type.t -> t = "caml_binaryen_ref_cast" + (** Module, value, type *) +end + +module BrOn = struct + external make : Module.t -> Op.t -> string -> t -> Type.t -> t + = "caml_binaryen_br_on" + (** Module, op, label, value, type *) +end + +module Struct = struct + external new_ : Module.t -> t list option -> Heap_type.t -> t + = "caml_binaryen_struct_new" + (** Mdoule, operands, type *) + + external get : Module.t -> int -> t -> Type.t -> bool -> t + = "caml_binaryen_struct_get" + (** Module, index, struct, type, signed *) + + external set : Module.t -> int -> t -> t -> t = "caml_binaryen_struct_set" + (** Module, index, struct, value *) +end + +module Array = struct + external new_ : Module.t -> Heap_type.t -> t -> t -> t + = "caml_binaryen_array_new" + (** Module, type, size, init *) + + external new_data : Module.t -> Heap_type.t -> string -> t -> t -> t + = "caml_binaryen_array_new_data" + (** Module, type, data name, offset, size *) + + external new_elem : Module.t -> Heap_type.t -> string -> t -> t -> t + = "caml_binaryen_array_new_elem" + (** Module, type, seg, offset, size *) + + external new_fixed : Module.t -> Heap_type.t -> t list -> t + = "caml_binaryen_array_new_fixed" + (** Module, type, values *) + + external get : Module.t -> t -> t -> Type.t -> bool -> t + = "caml_binaryen_array_get" + (** Module, array, index, type, signed *) + + external set : Module.t -> t -> t -> t -> t = "caml_binaryen_array_set" + (** Module, array, index, value *) + + external len : Module.t -> t -> t = "caml_binaryen_array_len" + (** Module, array *) + + external fill : Module.t -> Heap_type.t -> t -> t -> t -> t + = "caml_binaryen_array_fill" + (** Module, type, seg, offset, size *) + + external copy : Module.t -> t -> t -> t -> t -> t -> t + = "caml_binaryen_array_copy__bytecode" "caml_binaryen_array_copy" + (** Module, dest, dest index, src, src index, length *) + + external init_data : Module.t -> string -> t -> t -> t -> t -> t + = "caml_binaryen_array_init_data__bytecode" "caml_binaryen_array_init_data" + (** Module, name, ref, index, offset, size *) + + external init_elem : Module.t -> string -> t -> t -> t -> t -> t + = "caml_binaryen_array_init_elem__bytecode" "caml_binaryen_array_init_elem" + (** Module, seg, ref, index, offset, size *) +end + +(** Bindings for `try_table` instruction. *) +module Try = struct + external make : + Module.t -> + string option -> + t -> + string list -> + t list -> + string option -> + t = "caml_binaryen_try__bytecode" "caml_binaryen_try" + (** Module, name, body, catch tags, catch bodies, delegate target *) + + (** Module, name, body, catch clauses, catch all *) + let make wasm_mod name body catch_clauses catch_all = + let catch_tags, catch_bodies = List.split catch_clauses in + let catch_bodies = + match catch_all with + | Some target -> List.append catch_bodies [ target ] + | None -> catch_bodies + in + make wasm_mod name body catch_tags catch_bodies None + + external get_name : t -> string option = "caml_binaryen_try_get_name" + (** expr *) + + external set_name : t -> string -> unit = "caml_binaryen_try_set_name" + (** expr, name *) + + external get_body : t -> t = "caml_binaryen_try_get_body" + (** expr *) + + external set_body : t -> t -> unit = "caml_binaryen_try_set_body" + (** expr, bodyExpr *) + + external get_num_catch_tags : t -> int + = "caml_binaryen_try_get_num_catch_tags" + (** expr *) + + external get_num_catch_bodies : t -> int + = "caml_binaryen_try_get_num_catch_bodies" + (** expr *) + + external get_catch_tag_at : t -> int -> string + = "caml_binaryen_try_get_catch_tag_at" + (** expr, index *) + + external set_catch_tag_at : t -> int -> string -> unit + = "caml_binaryen_try_set_catch_tag_at" + (** expr, index, catchTag *) + + external append_catch_tag : t -> string -> int + = "caml_binaryen_try_append_catch_tag" + (** expr, catchTag *) + + external insert_catch_tag_at : t -> int -> string -> unit + = "caml_binaryen_try_insert_catch_tag_at" + (** expr, index, catchTag *) + + external remove_catch_tag_at : t -> int -> string + = "caml_binaryen_try_remove_catch_tag_at" + (** expr, index *) + + external get_catch_body_at : t -> int -> t + = "caml_binaryen_try_get_catch_body_at" + (** expr, index *) + + external set_catch_body_at : t -> int -> t -> unit + = "caml_binaryen_try_set_catch_body_at" + (** expr, index, catchExpr *) + + external append_catch_body : t -> t -> int + = "caml_binaryen_try_append_catch_body" + (** expr, catchExpr *) + + external insert_catch_body_at : t -> int -> t -> unit + = "caml_binaryen_try_insert_catch_body_at" + (** expr, index, catchExpr *) + + external remove_catch_body_at : t -> int -> t + = "caml_binaryen_try_remove_catch_body_at" + (** expr, index *) + + external has_catch_all : t -> bool = "caml_binaryen_try_has_catch_all" + (** expr *) +end + +module Throw = struct + external make : Module.t -> string -> t list -> t = "caml_binaryen_throw" + (** Module, tag, operands *) + + external get_tag : t -> string = "caml_binaryen_throw_get_tag" + (** expr *) + + external set_tag : t -> string -> unit = "caml_binaryen_throw_set_tag" + (** expr, tagName *) + + external get_num_operands : t -> int = "caml_binaryen_throw_get_num_operands" + (** expr *) + + external get_operand_at : t -> int -> t = "caml_binaryen_throw_get_operand_at" + (** expr, index *) + + external set_operand_at : t -> int -> t -> unit + = "caml_binaryen_throw_set_operand_at" + (** expr, index, operandExpr *) + + external append_operand : t -> t -> int = "caml_binaryen_throw_append_operand" + (** expr, operandExpr *) + + external insert_operand_at : t -> int -> t -> unit + = "caml_binaryen_throw_insert_operand_at" + (** expr, index, operandExpr *) + + external remove_operand_at : t -> int -> t + = "caml_binaryen_throw_remove_operand_at" + (** expr, index *) end module Table = struct diff --git a/src/expression.mli b/src/expression.mli index 9abd7beb..b02d73df 100644 --- a/src/expression.mli +++ b/src/expression.mli @@ -161,6 +161,21 @@ module Call_indirect : sig val set_return : t -> bool -> unit end +module Call_ref : sig + val make : Module.t -> t -> t list -> Type.t -> t + val make_return : Module.t -> t -> t list -> Type.t -> t + val get_target : t -> t + val set_target : t -> t -> unit + val get_num_operands : t -> int + val get_operand_at : t -> int -> t + val set_operand_at : t -> int -> t -> unit + val append_operand : t -> t -> int + val insert_operand_at : t -> int -> t -> unit + val remove_operand_at : t -> int -> t + val is_return : t -> bool + val set_return : t -> bool -> unit +end + module Local_get : sig val make : Module.t -> int -> Type.t -> t end @@ -348,6 +363,150 @@ module Ref : sig val eq : Module.t -> t -> t -> t (** Module, left, right *) + + val test : Module.t -> t -> Type.t -> t + (** Module, value, type *) + + val cast : Module.t -> t -> Type.t -> t + (** Module, value, type *) +end + +module BrOn : sig + val make : Module.t -> Op.t -> string -> t -> Type.t -> t + (** Module, op, label, value, type *) +end + +module Struct : sig + val new_ : Module.t -> t list option -> Heap_type.t -> t + (** Mdoule, operands, type *) + + val get : Module.t -> int -> t -> Type.t -> bool -> t + (** Module, index, struct, type, signed *) + + val set : Module.t -> int -> t -> t -> t + (** Module, index, struct, value *) +end + +module Array : sig + val new_ : Module.t -> Heap_type.t -> t -> t -> t + (** Module, type, size, init *) + + val new_data : Module.t -> Heap_type.t -> string -> t -> t -> t + (** Module, type, data name, offset, size *) + + val new_elem : Module.t -> Heap_type.t -> string -> t -> t -> t + (** Module, type, seg, offset, size *) + + val new_fixed : Module.t -> Heap_type.t -> t list -> t + (** Module, type, values *) + + val get : Module.t -> t -> t -> Type.t -> bool -> t + (** Module, array, index, type, signed *) + + val set : Module.t -> t -> t -> t -> t + (** Module, array, index, value *) + + val len : Module.t -> t -> t + (** Module, array *) + + val fill : Module.t -> Heap_type.t -> t -> t -> t -> t + (** Module, type, seg, offset, size *) + + val copy : Module.t -> t -> t -> t -> t -> t -> t + (** Module, dest, dest index, src, src index, length *) + + val init_data : Module.t -> string -> t -> t -> t -> t -> t + (** Module, name, ref, index, offset, size *) + + val init_elem : Module.t -> string -> t -> t -> t -> t -> t + (** Module, seg, ref, index, offset, size *) +end + +(** Bindings for `try` instruction. *) +module Try : sig + val make : + Module.t -> string option -> t -> (string * t) list -> t option -> t + (** Module, name, body, catch clauses, catch all *) + + val get_name : t -> string option + (** expr *) + + val set_name : t -> string -> unit + (** expr, name *) + + val get_body : t -> t + (** expr *) + + val set_body : t -> t -> unit + (** expr, bodyExpr *) + + val get_num_catch_tags : t -> int + (** expr *) + + val get_num_catch_bodies : t -> int + (** expr *) + + val get_catch_tag_at : t -> int -> string + (** expr, index *) + + val set_catch_tag_at : t -> int -> string -> unit + (** expr, index, catchTag *) + + val append_catch_tag : t -> string -> int + (** expr, catchTag *) + + val insert_catch_tag_at : t -> int -> string -> unit + (** expr, index, catchTag *) + + val remove_catch_tag_at : t -> int -> string + (** expr, index *) + + val get_catch_body_at : t -> int -> t + (** expr, index *) + + val set_catch_body_at : t -> int -> t -> unit + (** expr, index, catchExpr *) + + val append_catch_body : t -> t -> int + (** expr, catchExpr *) + + val insert_catch_body_at : t -> int -> t -> unit + (** expr, index, catchExpr *) + + val remove_catch_body_at : t -> int -> t + (** expr, index *) + + val has_catch_all : t -> bool + (** expr *) +end + +module Throw : sig + val make : Module.t -> string -> t list -> t + (** Module, tag, operands *) + + val get_tag : t -> string + (** expr *) + + val set_tag : t -> string -> unit + (** expr, tagName *) + + val get_num_operands : t -> int + (** expr *) + + val get_operand_at : t -> int -> t + (** expr, index *) + + val set_operand_at : t -> int -> t -> unit + (** expr, index, operandExpr *) + + val append_operand : t -> t -> int + (** expr, operandExpr *) + + val insert_operand_at : t -> int -> t -> unit + (** expr, index, operandExpr *) + + val remove_operand_at : t -> int -> t + (** expr, index *) end module Table : sig diff --git a/src/heap_type.c b/src/heap_type.c index 711e4ff8..b4a78bc6 100644 --- a/src/heap_type.c +++ b/src/heap_type.c @@ -148,3 +148,22 @@ caml_binaryen_type_get_heap_type(value _ty) { BinaryenHeapType heapTy = BinaryenTypeGetHeapType(ty); CAMLreturn(alloc_BinaryenHeapType(heapTy)); } + +CAMLprim value caml_binaryen_module_set_type_name(value _module, value _heapType, value _name) { + CAMLparam3(_module, _heapType, _name); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenHeapType heapType = BinaryenHeapType_val(_heapType); + const char* name = String_val(_name); + BinaryenModuleSetTypeName(module, heapType, name); + CAMLreturn(Val_unit); +} + +CAMLprim value caml_binaryen_module_set_field_name(value _module, value _heapType, value _index, value _name) { + CAMLparam4(_module, _heapType, _index, _name); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + BinaryenHeapType heapType = BinaryenHeapType_val(_heapType); + BinaryenIndex index = Int_val(_index); + const char* name = String_val(_name); + BinaryenModuleSetFieldName(module, heapType, index, name); + CAMLreturn(Val_unit); +} \ No newline at end of file diff --git a/src/heap_type.js b/src/heap_type.js index b14ac2c7..034d3215 100644 --- a/src/heap_type.js +++ b/src/heap_type.js @@ -111,3 +111,15 @@ function caml_binaryen_heap_type_is_sub_type(left, right) { function caml_binaryen_type_get_heap_type(typ) { return Binaryen._BinaryenTypeGetHeapType(typ); } + +//Provides: caml_binaryen_module_set_type_name +//Requires: caml_jsstring_of_string +function caml_binaryen_module_set_type_name(wasm_mod, heapType, name) { + wasm_mod.setTypeName(heapType, caml_jsstring_of_string(name)); +} + +//Provides: caml_binaryen_module_set_field_name +//Requires: caml_jsstring_of_string +function caml_binaryen_module_set_field_name(heapType, index, name) { + wasm_mod.setFieldName(heapType, index, caml_jsstring_of_string(name)); +} \ No newline at end of file diff --git a/src/heap_type.ml b/src/heap_type.ml index 44271e44..d90aa16b 100644 --- a/src/heap_type.ml +++ b/src/heap_type.ml @@ -18,3 +18,12 @@ external is_array : t -> bool = "caml_binaryen_heap_type_is_array" external is_bottom : t -> bool = "caml_binaryen_heap_type_is_bottom" external get_bottom : t -> t = "caml_binaryen_heap_type_get_bottom" external is_sub_type : t -> bool = "caml_binaryen_heap_type_is_sub_type" + +external set_type_name : Module.t -> t -> string -> unit + = "caml_binaryen_module_set_type_name" +(** Sets the textual name of a compound `heapType`. Has no effect if the type + already has a canonical name. *) + +external set_field_name : Module.t -> t -> int -> string -> unit + = "caml_binaryen_module_set_field_name" +(** Sets the field name of a struct `heapType` at index `index`. *) diff --git a/src/heap_type.mli b/src/heap_type.mli index ff28fa8f..a4ea1341 100644 --- a/src/heap_type.mli +++ b/src/heap_type.mli @@ -18,3 +18,10 @@ val is_array : t -> bool val is_bottom : t -> bool val get_bottom : t -> t val is_sub_type : t -> bool + +val set_type_name : Module.t -> t -> string -> unit +(** Sets the textual name of a compound `heapType`. Has no effect if the type + already has a canonical name. *) + +val set_field_name : Module.t -> t -> int -> string -> unit +(** Sets the field name of a struct `heapType` at index `index`. *) diff --git a/src/import.c b/src/import.c index 962043ed..501ae777 100644 --- a/src/import.c +++ b/src/import.c @@ -67,6 +67,24 @@ caml_binaryen_add_global_import__bytecode(value * argv) { return caml_binaryen_add_global_import(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } +CAMLprim value +caml_binaryen_add_tag_import(value _module, value _internalName, value _externalModuleName, value _externalBaseName, value _paramsty, value _resultsty) { + CAMLparam5(_module, _internalName, _externalModuleName, _externalBaseName, _paramsty); + CAMLxparam1(_resultsty); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + char* internalName = Safe_String_val(_internalName); + char* externalModuleName = Safe_String_val(_externalModuleName); + char* externalBaseName = Safe_String_val(_externalBaseName); + BinaryenType paramsty = BinaryenType_val(_paramsty); + BinaryenType resultsty = BinaryenType_val(_resultsty); + BinaryenAddTagImport(module, internalName, externalModuleName, externalBaseName, paramsty, resultsty); + CAMLreturn(Val_unit); +} +CAMLprim value +caml_binaryen_add_tag_import__bytecode(value * argv) { + return caml_binaryen_add_tag_import(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); +} + CAMLprim value caml_binaryen_function_import_get_module(value _fun) { CAMLparam1(_fun); @@ -89,6 +107,13 @@ caml_binaryen_global_import_get_module(value _global) { CAMLreturn(caml_copy_string(BinaryenGlobalImportGetModule(global))); } +CAMLprim value +caml_binaryen_tag_import_get_module(value _tag) { + CAMLparam1(_tag); + BinaryenTagRef tag = BinaryenTagRef_val(_tag); + CAMLreturn(caml_copy_string(BinaryenTagImportGetModule(tag))); +} + CAMLprim value caml_binaryen_function_import_get_base(value _fun) { CAMLparam1(_fun); @@ -110,3 +135,10 @@ caml_binaryen_global_import_get_base(value _global) { BinaryenGlobalRef global = BinaryenGlobalRef_val(_global); CAMLreturn(caml_copy_string(BinaryenGlobalImportGetBase(global))); } + +CAMLprim value +caml_binaryen_tag_import_get_base(value _tag) { + CAMLparam1(_tag); + BinaryenTagRef tag = BinaryenTagRef_val(_tag); + CAMLreturn(caml_copy_string(BinaryenTagImportGetBase(tag))); +} diff --git a/src/import.js b/src/import.js index 465dcd25..95852d8b 100644 --- a/src/import.js +++ b/src/import.js @@ -92,6 +92,37 @@ function caml_binaryen_add_global_import__bytecode() { ); } +//Provides: caml_binaryen_add_tag_import +//Requires: caml_jsstring_of_string +function caml_binaryen_add_tag_import( + wasm_mod, + internalName, + externalModuleName, + externalBaseName, + paramsty, + resultsty +) { + return wasm_mod.addTagImport( + caml_jsstring_of_string(internalName), + caml_jsstring_of_string(externalModuleName), + caml_jsstring_of_string(externalBaseName), + paramsty, + resultsty + ); +} +//Provides: caml_binaryen_add_tag_import__bytecode +//Requires: caml_binaryen_add_tag_import +function caml_binaryen_add_tag_import__bytecode() { + return caml_binaryen_add_tag_import( + arguments[0], + arguments[1], + arguments[2], + arguments[3], + arguments[4], + arguments[5] + ); +} + //Provides: caml_binaryen_function_import_get_module //Requires: Binaryen //Requires: caml_string_of_jsstring @@ -115,6 +146,14 @@ function caml_binaryen_global_import_get_module(global) { return caml_string_of_jsstring(global_info.module); } +//Provides: caml_binaryen_tag_import_get_module +//Requires: Binaryen +//Requires: caml_string_of_jsstring +function caml_binaryen_tag_import_get_module(tag) { + var tag_info = Binaryen.getTagInfo(tag); + return caml_string_of_jsstring(tag_info.module); +} + //Provides: caml_binaryen_function_import_get_base //Requires: Binaryen //Requires: caml_string_of_jsstring @@ -137,3 +176,11 @@ function caml_binaryen_global_import_get_base(global) { var global_info = Binaryen.getGlobalInfo(global); return caml_string_of_jsstring(global_info.base); } + +//Provides: caml_binaryen_tag_import_get_base +//Requires: Binaryen +//Requires: caml_string_of_jsstring +function caml_binaryen_tag_import_get_base(tag) { + var tag_info = Binaryen.getTagInfo(tag); + return caml_string_of_jsstring(tag_info.base); +} diff --git a/src/import.ml b/src/import.ml index d29bb18c..eb9e2a18 100644 --- a/src/import.ml +++ b/src/import.ml @@ -21,6 +21,12 @@ external add_global_import : (** Module, internal name, external module name, external base name, type, mutable. *) +external add_tag_import : + Module.t -> string -> string -> string -> Type.t -> Type.t -> unit + = "caml_binaryen_add_tag_import__bytecode" "caml_binaryen_add_tag_import" +(** Module, internal name, external module name, external base name, params + type, results type. *) + external function_import_get_module : Function.t -> string = "caml_binaryen_function_import_get_module" @@ -30,6 +36,9 @@ external memory_import_get_module : Module.t -> string -> string external global_import_get_module : Global.t -> string = "caml_binaryen_global_import_get_module" +external tag_import_get_module : Tag.t -> string + = "caml_binaryen_tag_import_get_module" + external function_import_get_base : Function.t -> string = "caml_binaryen_function_import_get_base" @@ -38,3 +47,6 @@ external memory_import_get_base : Module.t -> string -> string external global_import_get_base : Global.t -> string = "caml_binaryen_global_import_get_base" + +external tag_import_get_base : Tag.t -> string + = "caml_binaryen_tag_import_get_base" diff --git a/src/import.mli b/src/import.mli index 52a69370..42c9bf96 100644 --- a/src/import.mli +++ b/src/import.mli @@ -7,9 +7,14 @@ val add_memory_import : Module.t -> string -> string -> string -> bool -> unit val add_global_import : Module.t -> string -> string -> string -> Type.t -> bool -> unit +val add_tag_import : + Module.t -> string -> string -> string -> Type.t -> Type.t -> unit + val function_import_get_module : Function.t -> string val memory_import_get_module : Module.t -> string -> string val global_import_get_module : Global.t -> string +val tag_import_get_module : Tag.t -> string val function_import_get_base : Function.t -> string val memory_import_get_base : Module.t -> string -> string val global_import_get_base : Global.t -> string +val tag_import_get_base : Tag.t -> string diff --git a/src/module.js b/src/module.js index 00167c72..d6bf5b0b 100644 --- a/src/module.js +++ b/src/module.js @@ -122,11 +122,11 @@ function caml_binaryen_module_get_debug_info_filename(wasm_mod, index) { } //Provides: caml_binaryen_add_custom_section -//Requires: caml_jsstring_of_string, caml_array_of_string +//Requires: caml_jsstring_of_string, caml_uint8_array_of_string function caml_binaryen_add_custom_section(wasm_mod, name, contents) { return wasm_mod.addCustomSection( caml_jsstring_of_string(name), - caml_array_of_string(contents) + caml_uint8_array_of_string(contents) ); } diff --git a/src/ocaml_helpers.c b/src/ocaml_helpers.c index 78a17230..be2568dc 100644 --- a/src/ocaml_helpers.c +++ b/src/ocaml_helpers.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "ocaml_helpers.h" @@ -38,6 +39,14 @@ value alloc_BinaryenGlobalRef(BinaryenGlobalRef exp) return v; } +/* Allocating an OCaml custom block to hold the given BinaryenTagRef */ +value alloc_BinaryenTagRef(BinaryenTagRef exp) +{ + value v = caml_alloc_custom(&binaryen_ops, sizeof(BinaryenTagRef), 0, 1); + BinaryenTagRef_val(v) = exp; + return v; +} + /* Allocating an OCaml custom block to hold the given BinaryenExportRef */ value alloc_BinaryenExportRef(BinaryenExportRef exp) { @@ -94,6 +103,14 @@ value alloc_BinaryenElementSegmentRef(BinaryenElementSegmentRef elem) return v; } +/* Allocating an OCaml custom block to hold the given TypeBuilderRef */ +value alloc_TypeBuilderRef(TypeBuilderRef builder) +{ + value v = caml_alloc_custom(&binaryen_ops, sizeof(TypeBuilderRef), 0, 1); + TypeBuilderRef_val(v) = builder; + return v; +} + CAMLprim value array_of_list(value list) { CAMLparam1(list); diff --git a/src/ocaml_helpers.h b/src/ocaml_helpers.h index 3e926eaf..5c32738c 100644 --- a/src/ocaml_helpers.h +++ b/src/ocaml_helpers.h @@ -23,15 +23,18 @@ static struct custom_operations binaryen_ops = { #define BinaryenModuleRef_val(v) (*((BinaryenModuleRef*) Data_custom_val(v))) #define BinaryenType_val(v) (*((BinaryenType*) Data_custom_val(v))) +#define BinaryenPackedType_val(v) Int_val(v) #define BinaryenHeapType_val(v) (*((BinaryenHeapType*) Data_custom_val(v))) #define BinaryenExpressionRef_val(v) (*((BinaryenExpressionRef*) Data_custom_val(v))) #define BinaryenOp_val(v) (*((BinaryenOp*) Data_custom_val(v))) #define BinaryenLiteral_val(v) (*((struct BinaryenLiteral*) Data_custom_val(v))) #define BinaryenFunctionRef_val(v) (*((BinaryenFunctionRef*) Data_custom_val(v))) #define BinaryenGlobalRef_val(v) (*((BinaryenGlobalRef*) Data_custom_val(v))) +#define BinaryenTagRef_val(v) (*((BinaryenTagRef*) Data_custom_val(v))) #define BinaryenExportRef_val(v) (*((BinaryenExportRef*) Data_custom_val(v))) #define BinaryenTableRef_val(v) (*((BinaryenTableRef*) Data_custom_val(v))) #define BinaryenElementSegmentRef_val(v) (*((BinaryenElementSegmentRef*) Data_custom_val(v))) +#define TypeBuilderRef_val(v) (*((TypeBuilderRef*) Data_custom_val(v))) #define Val_none Val_int(0) #define Some_val(v) Field(v, 0) @@ -53,6 +56,9 @@ value alloc_BinaryenType(BinaryenType typ); /* Allocating an OCaml custom block to hold the given BinaryenGlobalRef */ value alloc_BinaryenGlobalRef(BinaryenGlobalRef exp); +/* Allocating an OCaml custom block to hold the given BinaryenTagRef */ +value alloc_BinaryenTagRef(BinaryenTagRef exp); + /* Allocating an OCaml custom block to hold the given BinaryenExportRef */ value alloc_BinaryenExportRef(BinaryenExportRef exp); @@ -74,6 +80,9 @@ value alloc_BinaryenTableRef(BinaryenTableRef table); /* Allocating an OCaml custom block to hold the given BinaryenElementSegmentRef */ value alloc_BinaryenElementSegmentRef(BinaryenElementSegmentRef elem); +/* Allocating an OCaml custom block to hold the given TypeBuilderRef */ +value alloc_TypeBuilderRef(TypeBuilderRef builder); + CAMLprim value array_of_list(value list); diff --git a/src/tag.c b/src/tag.c new file mode 100644 index 00000000..0eb0dac5 --- /dev/null +++ b/src/tag.c @@ -0,0 +1,61 @@ +#define CAML_NAME_SPACE +#include +#include +#include +#include + +#include "binaryen-c.h" +#include "ocaml_helpers.h" + +CAMLprim value +caml_binaryen_add_tag(value _module, value _name, value _params, value _results) { + CAMLparam4(_module, _name, _params, _results); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + char* name = Safe_String_val(_name); + BinaryenType params = BinaryenType_val(_params); + BinaryenType results = BinaryenType_val(_results); + BinaryenTagRef tag = BinaryenAddTag(module, name, params, results); + CAMLreturn(alloc_BinaryenTagRef(tag)); +} + +CAMLprim value +caml_binaryen_get_tag(value _module, value _name) { + CAMLparam2(_module, _name); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + char* name = Safe_String_val(_name); + BinaryenTagRef tag = BinaryenGetTag(module, name); + CAMLreturn(alloc_BinaryenTagRef(tag)); +} + +CAMLprim value +caml_binaryen_remove_tag(value _module, value _name) { + CAMLparam2(_module, _name); + BinaryenModuleRef module = BinaryenModuleRef_val(_module); + char* name = Safe_String_val(_name); + BinaryenRemoveTag(module, name); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_binaryen_tag_get_name(value _tag) { + CAMLparam1(_tag); + BinaryenTagRef tag = BinaryenTagRef_val(_tag); + const char* name = BinaryenTagGetName(tag); + CAMLreturn(caml_copy_string(name)); +} + +CAMLprim value +caml_binaryen_tag_get_params(value _tag) { + CAMLparam1(_tag); + BinaryenTagRef tag = BinaryenTagRef_val(_tag); + BinaryenType ty = BinaryenTagGetParams(tag); + CAMLreturn(alloc_BinaryenType(ty)); +} + +CAMLprim value +caml_binaryen_tag_get_results(value _tag) { + CAMLparam1(_tag); + BinaryenTagRef tag = BinaryenTagRef_val(_tag); + BinaryenType ty = BinaryenTagGetResults(tag); + CAMLreturn(alloc_BinaryenType(ty)); +} diff --git a/src/tag.js b/src/tag.js new file mode 100644 index 00000000..63065b12 --- /dev/null +++ b/src/tag.js @@ -0,0 +1,43 @@ +//Provides: caml_binaryen_add_tag +//Requires: caml_jsstring_of_string +function caml_binaryen_add_tag(wasm_mod, name, params, results) { + return wasm_mod.addTag( + caml_jsstring_of_string(name), + params, + results, + ); +} + +//Provides: caml_binaryen_get_tag +//Requires: caml_jsstring_of_string +function caml_binaryen_get_tag(wasm_mod, name) { + return wasm_mod.getTag(caml_jsstring_of_string(name)); +} + +//Provides: caml_binaryen_remove_tag +//Requires: caml_jsstring_of_string +function caml_binaryen_remove_tag(wasm_mod, name) { + return wasm_mod.removeTag(caml_jsstring_of_string(name)); +} + +//Provides: caml_binaryen_tag_get_name +//Requires: Binaryen +//Requires: caml_string_of_jsstring +function caml_binaryen_tag_get_name(tag) { + var tag_info = Binaryen.getTagInfo(tag); + return caml_string_of_jsstring(tag_info.name); +} + +//Provides: caml_binaryen_tag_get_params +//Requires: Binaryen +function caml_binaryen_tag_get_params(tag) { + var tag_info = Binaryen.getTagInfo(tag); + return tag_info.params; +} + +//Provides: caml_binaryen_tag_get_results +//Requires: Binaryen +function caml_binaryen_tag_get_results(tag) { + var tag_info = Binaryen.getTagInfo(tag); + return tag_info.results; +} diff --git a/src/tag.ml b/src/tag.ml new file mode 100644 index 00000000..ed36e318 --- /dev/null +++ b/src/tag.ml @@ -0,0 +1,11 @@ +type t + +external add_tag : Module.t -> string -> Type.t -> Type.t -> t + = "caml_binaryen_add_tag" +(** Module, name, params, result *) + +external get_tag : Module.t -> string -> t = "caml_binaryen_get_tag" +external remove_tag : Module.t -> string -> unit = "caml_binaryen_remove_tag" +external get_name : t -> string = "caml_binaryen_tag_get_name" +external get_params : t -> Type.t = "caml_binaryen_tag_get_params" +external get_results : t -> Type.t = "caml_binaryen_tag_get_results" diff --git a/src/tag.mli b/src/tag.mli new file mode 100644 index 00000000..d75edc29 --- /dev/null +++ b/src/tag.mli @@ -0,0 +1,8 @@ +type t + +val add_tag : Module.t -> string -> Type.t -> Type.t -> t +val get_tag : Module.t -> string -> t +val remove_tag : Module.t -> string -> unit +val get_name : t -> string +val get_params : t -> Type.t +val get_results : t -> Type.t diff --git a/src/type.c b/src/type.c index 43855ec5..d5749a23 100644 --- a/src/type.c +++ b/src/type.c @@ -176,4 +176,4 @@ caml_binaryen_type_from_heap_type(value _ty, value _nullable) { bool nullable = Bool_val(_nullable); BinaryenType ty = BinaryenTypeFromHeapType(heapTy, nullable); CAMLreturn(alloc_BinaryenType(ty)); -} +} \ No newline at end of file diff --git a/src/type.js b/src/type.js index 23350368..58a58ccc 100644 --- a/src/type.js +++ b/src/type.js @@ -67,7 +67,7 @@ function caml_binaryen_type_structref() { //Provides: caml_binaryen_type_arrayref //Requires: Binaryen function caml_binaryen_type_arrayref() { - // TODO: Binaryen v111 didn't expose this directly + // TODO: Binaryen v125 doesn't expose this directly return Binaryen._BinaryenTypeArrayref(); } @@ -80,22 +80,19 @@ function caml_binaryen_type_stringref() { //Provides: caml_binaryen_type_nullref //Requires: Binaryen function caml_binaryen_type_nullref() { - // TODO: Binaryen v111 didn't expose this directly - return Binaryen._BinaryenTypeNullref(); + return Binaryen.nullref; } //Provides: caml_binaryen_type_null_externref //Requires: Binaryen function caml_binaryen_type_null_externref() { - // TODO: Binaryen v111 didn't expose this directly - return Binaryen._BinaryenTypeNullExternref(); + return Binaryen.nullexternref; } //Provides: caml_binaryen_type_null_funcref //Requires: Binaryen function caml_binaryen_type_null_funcref() { - // TODO: Binaryen v111 didn't expose this directly - return Binaryen._BinaryenTypeNullFuncref(); + return Binaryen.nullfuncref; } //Provides: caml_binaryen_type_unreachable @@ -134,4 +131,4 @@ function caml_binaryen_type_is_nullable(typ) { //Requires: Binaryen function caml_binaryen_type_from_heap_type(typ, nullable) { return Binaryen._BinaryenTypeFromHeapType(typ, nullable); -} +} \ No newline at end of file diff --git a/src/type.ml b/src/type.ml index 119be8cc..8090acb6 100644 --- a/src/type.ml +++ b/src/type.ml @@ -75,5 +75,8 @@ let auto = auto () external create : t array -> t = "caml_binaryen_type_create" external expand : t -> t array = "caml_binaryen_type_expand" external is_nullable : t -> bool = "caml_binaryen_type_is_nullable" -external from_heap_type : Heap_type.t -> t = "caml_binaryen_type_from_heap_type" + +external from_heap_type : Heap_type.t -> bool -> t + = "caml_binaryen_type_from_heap_type" + external get_heap_type : t -> Heap_type.t = "caml_binaryen_type_get_heap_type" diff --git a/src/type.mli b/src/type.mli index 874ddb37..868ac579 100644 --- a/src/type.mli +++ b/src/type.mli @@ -21,5 +21,5 @@ val auto : t val create : t array -> t val expand : t -> t array val is_nullable : t -> bool -val from_heap_type : Heap_type.t -> t +val from_heap_type : Heap_type.t -> bool -> t val get_heap_type : t -> Heap_type.t diff --git a/src/type_builder.c b/src/type_builder.c new file mode 100644 index 00000000..b9e5658f --- /dev/null +++ b/src/type_builder.c @@ -0,0 +1,176 @@ +#define CAML_NAME_SPACE +#include +#include +#include +#include + +#include "binaryen-c.h" +#include "ocaml_helpers.h" + +CAMLprim value +caml_type_builder_create(value _size) { + CAMLparam1(_size); + BinaryenIndex size = Int_val(_size); + CAMLreturn(alloc_TypeBuilderRef(TypeBuilderCreate(size))); +} + +CAMLprim value +caml_type_builder_grow(value _builder, value _count) { + CAMLparam2(_builder, _count); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenIndex count = Int_val(_count); + TypeBuilderGrow(builder, count); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_type_builder_get_size(value _builder) { + CAMLparam1(_builder); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + CAMLreturn(Val_int(TypeBuilderGetSize(builder))); +} + +CAMLprim value +caml_type_builder_set_signature_type(value _builder, value _index, value _paramTypes, value _resultTypes) { + CAMLparam4(_builder, _index, _paramTypes, _resultTypes); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenIndex index = Int_val(_index); + BinaryenType paramTypes = BinaryenType_val(_paramTypes); + BinaryenType resultTypes = BinaryenType_val(_resultTypes); + TypeBuilderSetSignatureType(builder, index, paramTypes, resultTypes); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_type_builder_set_struct_type(value _builder, value _index, value _fieldTypes, value _fieldPackedTypes, value _fieldMutables, value _numFields) { + CAMLparam5(_builder, _index, _fieldTypes, _fieldPackedTypes, _fieldMutables); + CAMLxparam1(_numFields); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenIndex index = Int_val(_index); + _fieldTypes = array_of_list(_fieldTypes); + int fieldTypesLen = array_length(_fieldTypes); + BinaryenType fieldTypes[fieldTypesLen]; + for (int i = 0; i < fieldTypesLen; i++) { + fieldTypes[i] = BinaryenType_val(Field(_fieldTypes, i)); + } + _fieldPackedTypes = array_of_list(_fieldPackedTypes); + int fieldPackedTypesLen = array_length(_fieldPackedTypes); + BinaryenPackedType fieldPackedTypes[fieldPackedTypesLen]; + for (int i = 0; i < fieldPackedTypesLen; i++) { + fieldPackedTypes[i] = BinaryenPackedType_val(Field(_fieldPackedTypes, i)); + } + _fieldMutables = array_of_list(_fieldMutables); + int fieldMutablesLen = array_length(_fieldMutables); + bool fieldMutables[fieldMutablesLen]; + for (int i = 0; i < fieldMutablesLen; i++) { + fieldMutables[i] = Bool_val(Field(_fieldMutables, i)); + } + int numFields = Int_val(_numFields); + TypeBuilderSetStructType(builder, index, fieldTypes, fieldPackedTypes, fieldMutables, numFields); + CAMLreturn(Val_unit); +} +CAMLprim value +caml_type_builder_set_struct_type__bytecode(value * argv) { + return caml_type_builder_set_struct_type(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); +} + +CAMLprim value +caml_type_builder_set_array_type(value _builder, value _index, value _elementType, value _elementPackedType, value _elementMutable) { + CAMLparam5(_builder, _index, _elementType, _elementPackedType, _elementMutable); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenIndex index = Int_val(_index); + BinaryenType elementType = BinaryenType_val(_elementType); + BinaryenPackedType elementPackedType = BinaryenPackedType_val(_elementPackedType); + bool elementMutable = Bool_val(_elementMutable); + TypeBuilderSetArrayType(builder, index, elementType, elementPackedType, elementMutable); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_type_builder_get_temp_heap_type(value _builder, value _index) { + CAMLparam2(_builder, _index); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenIndex index = Int_val(_index); + CAMLreturn(alloc_BinaryenHeapType(TypeBuilderGetTempHeapType(builder, index))); +} + +CAMLprim value +caml_type_builder_get_temp_tuple_type(value _builder, value _types, value _numTypes) { + CAMLparam3(_builder, _types, _numTypes); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + _types = array_of_list(_types); + int typesLen = array_length(_types); + BinaryenType types[typesLen]; + for (int i = 0; i < typesLen; i++) { + types[i] = BinaryenType_val(Field(_types, i)); + } + int numTypes = Int_val(_numTypes); + CAMLreturn(alloc_BinaryenType(TypeBuilderGetTempTupleType(builder, types, numTypes))); +} + +CAMLprim value +caml_type_builder_get_temp_ref_type(value _builder, value _heapType, value _nullable) { + CAMLparam3(_builder, _heapType, _nullable); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenHeapType heapType = BinaryenHeapType_val(_heapType); + bool nullable = Bool_val(_nullable); + CAMLreturn(alloc_BinaryenType(TypeBuilderGetTempRefType(builder, heapType, nullable))); +} + +CAMLprim value +caml_type_builder_set_sub_type(value _builder, value _index, value _superType) { + CAMLparam3(_builder, _index, _superType); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenIndex index = Int_val(_index); + BinaryenHeapType superType = BinaryenHeapType_val(_superType); + TypeBuilderSetSubType(builder, index, superType); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_type_builder_set_open(value _builder, value _index) { + CAMLparam2(_builder, _index); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenIndex index = Int_val(_index); + TypeBuilderSetOpen(builder, index); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_type_builder_create_rec_group(value _builder, value _index, value _length) { + CAMLparam3(_builder, _index, _length); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenIndex index = Int_val(_index); + BinaryenIndex length = Int_val(_length); + TypeBuilderCreateRecGroup(builder, index, length); + CAMLreturn(Val_unit); +} + +CAMLprim value +caml_conv_heap_type(BinaryenHeapType heapType) { + return alloc_BinaryenHeapType(heapType); +} + +CAMLprim value +caml_type_builder_build_and_dispose(value _builder) { + CAMLparam1(_builder); + TypeBuilderRef builder = TypeBuilderRef_val(_builder); + BinaryenIndex size = TypeBuilderGetSize(builder); + BinaryenHeapType heapTypes[size + 1]; + heapTypes[size] = (BinaryenHeapType) NULL; + BinaryenIndex errorIndex; + TypeBuilderErrorReason errorReason; + bool success = TypeBuilderBuildAndDispose(builder, heapTypes, &errorIndex, &errorReason); + if (success) { + value ok = caml_alloc_small(1, 0); + Field(ok, 0) = caml_alloc_array((void*)caml_conv_heap_type, (char const **)heapTypes); + CAMLreturn(ok); + } else { + value error = caml_alloc_small(1, 1); + value tuple = caml_alloc_small(2, 0); + Field(tuple, 0) = Val_int(errorIndex); + Field(tuple, 1) = Val_int(errorReason); + Field(error, 0) = tuple; + CAMLreturn(error); + } +} \ No newline at end of file diff --git a/src/type_builder.js b/src/type_builder.js new file mode 100644 index 00000000..b8082e32 --- /dev/null +++ b/src/type_builder.js @@ -0,0 +1,116 @@ +//Provides: caml_type_builder_create +//Requires: Binaryen +function caml_type_builder_create(size) { + return new Binaryen.TypeBuilder(size); +} + +//Provides: caml_type_builder_grow +function caml_type_builder_grow(builder, count) { + builder.grow(count); +} + +//Provides: caml_type_builder_get_size +function caml_type_builder_get_size(builder) { + return builder.getSize(); +} + +//Provides: caml_type_builder_set_signature_type +function caml_type_builder_set_signature_type( + builder, + index, + paramTypes, + resultTypes +) { + builder.setSignatureType(index, paramTypes, resultTypes); +} + +//Provides: caml_type_builder_set_struct_type +//Requires: caml_list_to_js_array +//Requires: caml_js_from_bool +function caml_type_builder_set_struct_type( + builder, + index, + fieldTypes, + fieldPackedTypes, + fieldMutables, + numFields +) { + var types = caml_list_to_js_array(fieldTypes); + var packedTypes = caml_list_to_js_array(fieldPackedTypes); + var mutables = caml_list_to_js_array(fieldMutables); + var fields = types.map(function (type, idx) { + return { + type, + packedType: packedTypes[idx], + mutable: caml_js_from_bool(mutables[idx]), + }; + }); + builder.setStructType(index, fields); +} +//Provides: caml_type_builder_set_struct_type__bytecode +//Requires: caml_type_builder_set_struct_type +function caml_type_builder_set_struct_type__bytecode() { + return caml_type_builder_set_struct_type( + arguments[0], + arguments[1], + arguments[2], + arguments[3], + arguments[4], + arguments[5] + ); +} + +//Provides: caml_type_builder_set_array_type +function caml_type_builder_set_array_type( + builder, + index, + elementType, + elementPackedType, + elementMutable +) { + builder.setArrayType(index, elementType, elementPackedType, elementMutable); +} + +//Provides: caml_type_builder_get_temp_heap_type +function caml_type_builder_get_temp_heap_type(builder, index) { + return builder.getTempHeapType(index); +} + +//Provides: caml_type_builder_get_temp_tuple_type +//Requires: caml_list_to_js_array +function caml_type_builder_get_temp_tuple_type(builder, types, numTypes) { + var tupleTypes = caml_list_to_js_array(types); + return builder.getTempTupleType(tupleTypes); +} + +//Provides: caml_type_builder_get_temp_ref_type +//Requires: caml_js_from_bool +function caml_type_builder_get_temp_ref_type(builder, heapType, nullable) { + return builder.getTempRefType(heapType, caml_js_from_bool(nullable)); +} + +//Provides: caml_type_builder_set_sub_type +function caml_type_builder_set_sub_type(builder, index, superType) { + builder.setSubType(index, superType); +} + +//Provides: caml_type_builder_set_open +function caml_type_builder_set_open(builder, index) { + builder.setOpen(index); +} + +//Provides: caml_type_builder_create_rec_group +function caml_type_builder_create_rec_group(builder, index, length) { + builder.createRecGroup(index, length); +} + +//Provides: caml_type_builder_build_and_dispose +//Requires: caml_js_to_array +function caml_type_builder_build_and_dispose(builder) { + try { + var types = builder.buildAndDispose(); + return [0, caml_js_to_array(types)]; + } catch (e) { + return [1, [0, e.index, e.reason]]; + } +} diff --git a/src/type_builder.ml b/src/type_builder.ml new file mode 100644 index 00000000..28f33b03 --- /dev/null +++ b/src/type_builder.ml @@ -0,0 +1,67 @@ +type t + +type struct_field = { + type_ : Type.t; + packed_type : Packed_type.t; + mutable_ : bool; +} + +(* Source: https://github.com/WebAssembly/binaryen/blob/64ba23996a10e229d46e41eb37736a55af87f79a/src/binaryen-c.h#L3618 *) +type error = + | SelfSupertype of int + | InvalidSupertype of int + | ForwardSupertypeReference of int + | ForwardChildReference of int + +external make : int -> t = "caml_type_builder_create" +external grow : t -> int -> unit = "caml_type_builder_grow" +external size : t -> int = "caml_type_builder_grow" + +external set_signature_type : t -> int -> Type.t -> Type.t -> unit + = "caml_type_builder_set_signature_type" + +external set_struct_type : + t -> int -> Type.t list -> Packed_type.t list -> bool list -> int -> unit + = "caml_type_builder_set_struct_type__bytecode" + "caml_type_builder_set_struct_type" + +let set_struct_type builder index fields = + let split_fields fields = + List.fold_right + (fun { type_; packed_type; mutable_ } (types, packed_types, mutables) -> + (type_ :: types, packed_type :: packed_types, mutable_ :: mutables)) + fields ([], [], []) + in + let types, packed_types, mutables = split_fields fields in + set_struct_type builder index types packed_types mutables (List.length types) + +external set_array_type : t -> int -> Type.t -> Packed_type.t -> bool -> unit + = "caml_type_builder_set_array_type" + +external get_temp_heap_type : t -> int -> Heap_type.t + = "caml_type_builder_get_temp_heap_type" + +external get_temp_tuple_type : t -> Type.t list -> Type.t + = "caml_type_builder_get_temp_tuple_type" + +external get_temp_ref_type : t -> Heap_type.t -> bool -> Type.t + = "caml_type_builder_get_temp_ref_type" + +external set_sub_type : t -> int -> Heap_type.t -> unit + = "caml_type_builder_set_sub_type" + +external set_open : t -> int -> unit = "caml_type_builder_set_open" + +external create_rec_group : t -> int -> int -> unit + = "caml_type_builder_create_rec_group" + +external build_and_dispose : t -> (Heap_type.t array, int * int) result + = "caml_type_builder_build_and_dispose" + +let build_and_dispose builder = + match build_and_dispose builder with + | Ok types -> Ok (Array.to_list types) + | Error (idx, 0) -> Error (SelfSupertype idx) + | Error (idx, 1) -> Error (InvalidSupertype idx) + | Error (idx, 2) -> Error (ForwardSupertypeReference idx) + | Error (idx, _) -> Error (ForwardChildReference idx) diff --git a/src/type_builder.mli b/src/type_builder.mli new file mode 100644 index 00000000..f76dfbb1 --- /dev/null +++ b/src/type_builder.mli @@ -0,0 +1,28 @@ +type t + +type struct_field = { + type_ : Type.t; + packed_type : Packed_type.t; + mutable_ : bool; +} + +(* Source: https://github.com/WebAssembly/binaryen/blob/64ba23996a10e229d46e41eb37736a55af87f79a/src/binaryen-c.h#L3618 *) +type error = + | SelfSupertype of int + | InvalidSupertype of int + | ForwardSupertypeReference of int + | ForwardChildReference of int + +val make : int -> t +val grow : t -> int -> unit +val size : t -> int +val set_signature_type : t -> int -> Type.t -> Type.t -> unit +val set_struct_type : t -> int -> struct_field list -> unit +val set_array_type : t -> int -> Type.t -> Packed_type.t -> bool -> unit +val get_temp_heap_type : t -> int -> Heap_type.t +val get_temp_tuple_type : t -> Type.t list -> Type.t +val get_temp_ref_type : t -> Heap_type.t -> bool -> Type.t +val set_sub_type : t -> int -> Heap_type.t -> unit +val set_open : t -> int -> unit +val create_rec_group : t -> int -> int -> unit +val build_and_dispose : t -> (Heap_type.t list, error) result diff --git a/test/test.expected b/test/test.expected index 8e1c7db2..642a51c0 100644 --- a/test/test.expected +++ b/test/test.expected @@ -7,11 +7,16 @@ (i32.const 0) ) (module - (type $0 (func (param i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (param anyref i32 i32) (result i32))) - (type $3 (func (param anyref) (result i32))) - (import "future-wasi" "write" (func $write (type $2) (param anyref i32 i32) (result i32))) + (type $List (struct (field $head i31ref) (field $tail (ref null $List)))) + (type $1 (array (mut i8))) + (type $2 (func (param i32))) + (type $3 (func (param i32 i32) (result i32))) + (type $4 (func)) + (type $5 (func (param anyref i32 i32) (result i32))) + (type $6 (func (param anyref) (result i32))) + (type $7 (func (param anyref) (result anyref anyref))) + (type $8 (func (result (ref $1) (ref $List)))) + (import "future-wasi" "write" (func $write (type $5) (param anyref i32 i32) (result i32))) (global $max_int64 i64 (i64.const 9223372036854775807)) (global $max_int64_mut (mut i64) (i64.const 9223372036854775807)) (global $test_float64_bits f64 (f64.const 1.23)) @@ -20,11 +25,15 @@ (data $world "world") (table $table 1 1 funcref) (elem $elem (i32.const 0) $adder) + (tag $foo (type $2) (param i32)) + (tag $bar (type $2) (param i32)) (export "adder" (func $adder)) (export "memory" (memory $0)) (export "hello" (func $hello)) + (export "try" (func $try)) + (export "gc" (func $gc)) (start $start) - (func $adder (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $adder (type $3) (param $0 i32) (param $1 i32) (result i32) (block $add (result i32) (if (i32.const 0) @@ -44,7 +53,7 @@ ) ) ) - (func $start (type $1) + (func $start (type $4) (block $start (memory.init $world (i32.const 2048) @@ -52,7 +61,7 @@ (i32.const 5) ) (drop - (call_indirect $table (type $0) + (call_indirect $table (type $3) (i32.const 3) (i32.const 5) (i32.const 0) @@ -60,30 +69,151 @@ ) ) ) - (func $hello (type $3) (param $0 anyref) (result i32) + (func $hello (type $6) (param $0 anyref) (result i32) (call $write (local.get $0) (i32.const 0) (i32.const 1) ) ) + (func $try (type $4) + (block $blk + (drop + (try $tc1 (result i32) + (do + (throw $foo + (i32.const 1) + ) + ) + (catch $foo + (block $tc1blk2 (result i32) + (drop + (pop i32) + ) + (i32.const 2) + ) + ) + (catch $bar + (block $tc1blk3 (result i32) + (drop + (pop i32) + ) + (i32.const 3) + ) + ) + ) + ) + (try $tc2 + (do + (throw $foo + (i32.const 1) + ) + ) + (catch $foo + (block $tc2blk2 + (drop + (pop i32) + ) + ) + ) + (catch $bar + (block $tc2blk3 + (drop + (pop i32) + ) + ) + ) + ) + (drop + (try $tc3 (result i32) + (do + (i32.const 1) + ) + (catch $foo + (block $tc3blk2 (result i32) + (drop + (pop i32) + ) + (i32.const 2) + ) + ) + (catch_all + (i32.const 3) + ) + ) + ) + ) + ) + (func $gc (type $7) (param $0 anyref) (result anyref anyref) + (local $1 (ref $1)) + (local $2 (ref $List)) + (block $gc_block (type $8) (result (ref $1) (ref $List)) + (local.set $1 + (array.new_fixed $1 2 + (i32.const 0) + (i32.const 255) + ) + ) + (array.set $1 + (local.get $1) + (i32.const 1) + (i32.const 42) + ) + (local.set $2 + (struct.new $List + (ref.cast i31ref + (local.get $0) + ) + (struct.new $List + (ref.i31 + (i32.const 1) + ) + (struct.new $List + (ref.i31 + (i32.const 2) + ) + (struct.new $List + (ref.i31 + (i32.const 3) + ) + (ref.null none) + ) + ) + ) + ) + ) + (tuple.make 2 + (local.get $1) + (local.get $2) + ) + ) + ) ) (module - (type $0 (func (param i32 i32) (result i32))) - (type $1 (func)) - (type $2 (func (param anyref i32 i32) (result i32))) - (type $3 (func (param anyref) (result i32))) - (import "future-wasi" "write" (func $write (type $2) (param anyref i32 i32) (result i32))) + (type $List (struct (field $head i31ref) (field $tail (ref null $List)))) + (type $1 (array (mut i8))) + (type $2 (func (param i32))) + (type $3 (func)) + (type $4 (func (param i32 i32) (result i32))) + (type $5 (func (param anyref i32 i32) (result i32))) + (type $6 (func (param anyref) (result i32))) + (type $7 (func (param anyref) (result anyref anyref))) + (type $8 (func (result (ref (exact $1)) (ref (exact $List))))) + (import "future-wasi" "write" (func $write (type $5) (param anyref i32 i32) (result i32))) (memory $0 1) (data $hello (i32.const 0) "hello") (data $world "world") (table $table 1 1 funcref) (elem $elem (i32.const 0) $adder) + (tag $foo (type $2) (param i32)) + (tag $bar (type $2) (param i32)) (export "adder" (func $adder)) (export "memory" (memory $0)) (export "hello" (func $hello)) + (export "try" (func $try)) + (export "gc" (func $gc)) (start $start) - (func $adder (type $0) (param $0 i32) (param $1 i32) (result i32) + (func $adder (type $4) (param $0 i32) (param $1 i32) (result i32) (i32.add (select (local.get $0) @@ -95,7 +225,7 @@ (local.get $1) ) ) - (func $start (type $1) + (func $start (type $3) (memory.init $world (i32.const 2048) (i32.const 0) @@ -108,20 +238,101 @@ ) ) ) - (func $hello (type $3) (param $0 anyref) (result i32) + (func $hello (type $6) (param $0 anyref) (result i32) (call $write (local.get $0) (i32.const 0) (i32.const 1) ) ) + (func $try (type $3) + (drop + (try (result i32) + (do + (throw $foo + (i32.const 1) + ) + ) + (catch $foo + (drop + (pop i32) + ) + (i32.const 2) + ) + (catch $bar + (drop + (pop i32) + ) + (i32.const 3) + ) + ) + ) + (try + (do + (throw $foo + (i32.const 1) + ) + ) + (catch $foo + (drop + (pop i32) + ) + ) + (catch $bar + (drop + (pop i32) + ) + ) + ) + ) + (func $gc (type $7) (param $0 anyref) (result anyref anyref) + (local $1 (ref (exact $1))) + (array.set $1 + (local.tee $1 + (array.new_fixed $1 2 + (i32.const 0) + (i32.const 255) + ) + ) + (i32.const 1) + (i32.const 42) + ) + (tuple.make 2 + (local.get $1) + (struct.new $List + (ref.cast i31ref + (local.get $0) + ) + (struct.new $List + (ref.i31 + (i32.const 1) + ) + (struct.new $List + (ref.i31 + (i32.const 2) + ) + (struct.new $List + (ref.i31 + (i32.const 3) + ) + (ref.null none) + ) + ) + ) + ) + ) + ) ) (module - (type $type (func (param anyref i32 i32) (result i32))) - (type $type_1 (func (param i32 i32) (result i32))) - (type $type_2 (func)) - (type $type_3 (func (param anyref) (result i32))) - (import "future-wasi" "write" (func $fimport$0 (type $type) (param anyref i32 i32) (result i32))) + (type $type_7 (struct (field i31ref) (field (ref null $type_7)))) + (type $type_6 (array (mut i8))) + (type $type_3 (func)) + (type $type_1 (func (param anyref i32 i32) (result i32))) + (type $type_2 (func (param i32 i32) (result i32))) + (type $type_4 (func (param anyref) (result i32))) + (type $type_5 (func (param anyref) (result anyref anyref))) + (type $type_8 (func (result anyref anyref))) + (import "future-wasi" "write" (func $fimport$0 (type $type_1) (param anyref i32 i32) (result i32))) (memory $0 1) (data $0 (i32.const 0) "hello") (data $1 "world") @@ -130,8 +341,10 @@ (export "adder" (func $0)) (export "memory" (memory $0)) (export "hello" (func $2)) + (export "try" (func $3)) + (export "gc" (func $4)) (start $1) - (func $0 (type $type_1) (param $0 i32) (param $1 i32) (result i32) + (func $0 (type $type_2) (param $0 i32) (param $1 i32) (result i32) (i32.add (select (local.get $0) @@ -143,7 +356,7 @@ (local.get $1) ) ) - (func $1 (type $type_2) + (func $1 (type $type_3) (memory.init $1 (i32.const 2048) (i32.const 0) @@ -156,20 +369,67 @@ ) ) ) - (func $2 (type $type_3) (param $0 anyref) (result i32) + (func $2 (type $type_4) (param $0 anyref) (result i32) (call $fimport$0 (local.get $0) (i32.const 0) (i32.const 1) ) ) + (func $3 (type $type_3) + (drop + (unreachable) + ) + (unreachable) + ) + (func $4 (type $type_5) (param $0 anyref) (result anyref anyref) + (local $1 (ref (exact $type_6))) + (array.set $type_6 + (local.tee $1 + (array.new_fixed $type_6 2 + (i32.const 0) + (i32.const 255) + ) + ) + (i32.const 1) + (i32.const 42) + ) + (tuple.make 2 + (local.get $1) + (struct.new $type_7 + (ref.cast i31ref + (local.get $0) + ) + (struct.new $type_7 + (ref.i31 + (i32.const 1) + ) + (struct.new $type_7 + (ref.i31 + (i32.const 2) + ) + (struct.new $type_7 + (ref.i31 + (i32.const 3) + ) + (ref.null none) + ) + ) + ) + ) + ) + ) ) (module - (type $type (func (param anyref i32 i32) (result i32))) - (type $type_1 (func (param i32 i32) (result i32))) - (type $type_2 (func)) - (type $type_3 (func (param anyref) (result i32))) - (import "future-wasi" "write" (func $fimport$0 (type $type) (param anyref i32 i32) (result i32))) + (type $type_7 (struct (field i31ref) (field (ref null $type_7)))) + (type $type_6 (array (mut i8))) + (type $type_3 (func)) + (type $type_1 (func (param anyref i32 i32) (result i32))) + (type $type_2 (func (param i32 i32) (result i32))) + (type $type_4 (func (param anyref) (result i32))) + (type $type_5 (func (param anyref) (result anyref anyref))) + (type $type_8 (func (result anyref anyref))) + (import "future-wasi" "write" (func $fimport$0 (type $type_1) (param anyref i32 i32) (result i32))) (memory $0 1) (data $0 (i32.const 0) "hello") (data $1 "world") @@ -178,8 +438,10 @@ (export "adder" (func $0)) (export "memory" (memory $0)) (export "hello" (func $2)) + (export "try" (func $3)) + (export "gc" (func $4)) (start $1) - (func $0 (type $type_1) (param $0 i32) (param $1 i32) (result i32) + (func $0 (type $type_2) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.load @@ -188,7 +450,7 @@ local.get $1 i32.add ) - (func $1 (type $type_2) + (func $1 (type $type_3) i32.const 2048 i32.const 0 i32.const 5 @@ -198,10 +460,38 @@ call $0 drop ) - (func $2 (type $type_3) (param $0 anyref) (result i32) + (func $2 (type $type_4) (param $0 anyref) (result i32) local.get $0 i32.const 0 i32.const 1 call $fimport$0 ) + (func $3 (type $type_3) + unreachable + ) + (func $4 (type $type_5) (param $0 anyref) (result anyref anyref) + (local $1 (ref (exact $type_6))) + i32.const 0 + i32.const 255 + array.new_fixed $type_6 2 + local.tee $1 + i32.const 1 + i32.const 42 + array.set $type_6 + local.get $1 + local.get $0 + ref.cast i31ref + i32.const 1 + ref.i31 + i32.const 2 + ref.i31 + i32.const 3 + ref.i31 + ref.null none + struct.new $type_7 + struct.new $type_7 + struct.new $type_7 + struct.new $type_7 + tuple.make 2 + ) ) diff --git a/test/test.ml b/test/test.ml index a5ef4e90..f9a3cca6 100644 --- a/test/test.ml +++ b/test/test.ml @@ -171,13 +171,19 @@ let start = let _ = Export.add_function_export wasm_mod "adder" "adder" let _ = Table.add_table wasm_mod "table" 1 1 Type.funcref -(* TODO(#240): Re-enable after type-builder api is merged *) -(* let funcref_expr1 = Expression.Ref.func wasm_mod "adder" (Heap_type.func ()) +let adder_type = + let builder = Type_builder.make 1 in + Type_builder.set_signature_type builder 0 (params ()) results; + match Type_builder.build_and_dispose builder with + | Ok [ ty ] -> ty + | _ -> failwith "failed to build type" + +let funcref_expr1 = Expression.Ref.func wasm_mod "adder" adder_type let _ = Expression.Table.set wasm_mod "table" (Expression.Const.make wasm_mod (Literal.int32 0l)) - funcref_expr1 *) + funcref_expr1 let funcref_expr2 = Expression.Table.get wasm_mod "table" @@ -254,6 +260,97 @@ let _ = (Memory.get_segment_data wasm_mod "world") (Bytes.of_string "world")) +(* Call_ref *) +let thunk_type = + let builder = Type_builder.make 1 in + Type_builder.set_signature_type builder 0 Type.none Type.none; + match Type_builder.build_and_dispose builder with + | Ok [ ty ] -> ty + | _ -> failwith "failed to build type" + +let _ = + Expression.Call_ref.make wasm_mod + (Expression.Ref.func wasm_mod "start" thunk_type) + [] Type.none + +let _ = Tag.add_tag wasm_mod "foo" Type.int32 Type.none +let _ = Tag.add_tag wasm_mod "bar" Type.int32 Type.none + +(* Exception handling *) +let body = + Expression.Throw.make wasm_mod "foo" + [ Expression.Const.make wasm_mod (Literal.int32 1l) ] + +let try_catch_1 = + Expression.Try.make wasm_mod (Some "tc1") body + [ + ( "foo", + Expression.Block.make wasm_mod "tc1blk2" + [ + Expression.Drop.make wasm_mod + (Expression.Pop.make wasm_mod Type.int32); + Expression.Const.make wasm_mod (Literal.int32 2l); + ] ); + ( "bar", + Expression.Block.make wasm_mod "tc1blk3" + [ + Expression.Drop.make wasm_mod + (Expression.Pop.make wasm_mod Type.int32); + Expression.Const.make wasm_mod (Literal.int32 3l); + ] ); + ] + None + +let _ = assert (Expression.Try.get_name try_catch_1 = Some "tc1") +let _ = Expression.Try.set_name try_catch_1 "renamed_tc1" +let _ = assert (Expression.Try.get_name try_catch_1 = Some "renamed_tc1") +let _ = Expression.Try.set_name try_catch_1 "tc1" + +let _ = + assert ( + Expression.get_kind (Expression.Try.get_body try_catch_1) + = Expression.get_kind body) + +let _ = assert (Expression.Try.get_num_catch_tags try_catch_1 = 2) +let _ = assert (Expression.Try.get_num_catch_bodies try_catch_1 = 2) + +let try_catch_2 = + Expression.Try.make wasm_mod (Some "tc2") + (Expression.Throw.make wasm_mod "foo" + [ Expression.Const.make wasm_mod (Literal.int32 1l) ]) + [ + ( "foo", + Expression.Block.make wasm_mod "tc2blk2" + [ + Expression.Drop.make wasm_mod + (Expression.Pop.make wasm_mod Type.int32); + ] ); + ( "bar", + Expression.Block.make wasm_mod "tc2blk3" + [ + Expression.Drop.make wasm_mod + (Expression.Pop.make wasm_mod Type.int32); + ] ); + ] + None + +let _ = assert (Expression.Try.get_name try_catch_2 = Some "tc2") + +(* Test catch_all *) +let try_catch_all_1 = + Expression.Try.make wasm_mod (Some "tc3") + (Expression.Const.make wasm_mod (Literal.int32 1l)) + [ + ( "foo", + Expression.Block.make wasm_mod "tc3blk2" + [ + Expression.Drop.make wasm_mod + (Expression.Pop.make wasm_mod Type.int32); + Expression.Const.make wasm_mod (Literal.int32 2l); + ] ); + ] + (Some (Expression.Const.make wasm_mod (Literal.int32 3l))) + (* Create an imported "write" function i32 (externref, i32, i32) *) (* Similar to the example here: https://bytecodealliance.org/articles/reference-types-in-wasmtime *) @@ -273,9 +370,125 @@ let _ = ] Type.int32) +(* Create a function with try *) +let _ = + Function.add_function wasm_mod "try" Type.none Type.none [||] + (Expression.Block.make wasm_mod "blk" + [ + Expression.Drop.make wasm_mod try_catch_1; + try_catch_2; + Expression.Drop.make wasm_mod try_catch_all_1; + ]) + let _ = Export.add_function_export wasm_mod "hello" "hello" +let _ = Export.add_function_export wasm_mod "try" "try" let _ = Module.validate wasm_mod +(* Create a function that does gc *) +let _ = + let array_u8_type = + let builder = Type_builder.make 1 in + Type_builder.set_array_type builder 0 Type.int32 Packed_type.int8 true; + match Type_builder.build_and_dispose builder with + | Ok [ ty ] -> ty + | _ -> failwith "failed to make array type" + in + let list_type = + let builder = Type_builder.make 1 in + let temp_heap_type = Type_builder.get_temp_heap_type builder 0 in + let temp_ref_type = + Type_builder.get_temp_ref_type builder temp_heap_type true + in + Type_builder.set_struct_type builder 0 + [ + Type_builder. + { + type_ = Type.i31ref; + packed_type = Packed_type.not_packed; + mutable_ = false; + }; + Type_builder. + { + type_ = temp_ref_type; + packed_type = Packed_type.not_packed; + mutable_ = false; + }; + ]; + match Type_builder.build_and_dispose builder with + | Ok [ ty ] -> ty + | _ -> failwith "failed to make list type" + in + let i32 v = Expression.Const.make wasm_mod (Literal.int32 v) in + let i31 v = Expression.I31.make wasm_mod (i32 v) in + let cons first rest = + Expression.Struct.new_ wasm_mod (Some [ first; rest ]) list_type + in + let empty () = + Expression.Ref.null wasm_mod (Type.from_heap_type list_type true) + in + Function.add_function wasm_mod "gc" Type.anyref + (Type.create [| Type.anyref; Type.anyref |]) + [| + Type.from_heap_type array_u8_type false; + Type.from_heap_type list_type false; + |] + (Expression.Block.make wasm_mod "gc_block" + [ + Expression.Local_set.make wasm_mod 1 + (Expression.Array.new_fixed wasm_mod array_u8_type + [ i32 0l; i32 255l ]); + Expression.Array.set wasm_mod + (Expression.Local_get.make wasm_mod 1 + (Type.from_heap_type array_u8_type false)) + (i32 1l) (i32 42l); + Expression.Local_set.make wasm_mod 2 + (cons + (Expression.Ref.cast wasm_mod + (Expression.Local_get.make wasm_mod 0 Type.anyref) + Type.i31ref) + (cons (i31 1l) (cons (i31 2l) (cons (i31 3l) (empty ()))))); + Expression.Tuple_make.make wasm_mod + [ + Expression.Local_get.make wasm_mod 1 + (Type.from_heap_type array_u8_type false); + Expression.Local_get.make wasm_mod 2 + (Type.from_heap_type list_type false); + ]; + ]) + +let _ = Export.add_function_export wasm_mod "gc" "gc" +let _ = assert (Module.validate wasm_mod == 1) + +(* Test Heap_type.set_type_name and Heap_type.set_field_name *) +let list_type = + let builder = Type_builder.make 1 in + let temp_heap_type = Type_builder.get_temp_heap_type builder 0 in + let temp_ref_type = + Type_builder.get_temp_ref_type builder temp_heap_type true + in + Type_builder.set_struct_type builder 0 + [ + Type_builder. + { + type_ = Type.i31ref; + packed_type = Packed_type.not_packed; + mutable_ = false; + }; + Type_builder. + { + type_ = temp_ref_type; + packed_type = Packed_type.not_packed; + mutable_ = false; + }; + ]; + match Type_builder.build_and_dispose builder with + | Ok [ ty ] -> ty + | _ -> failwith "failed to make list type" + +let _ = Heap_type.set_type_name wasm_mod list_type "List" +let _ = Heap_type.set_field_name wasm_mod list_type 0 "head" +let _ = Heap_type.set_field_name wasm_mod list_type 1 "tail" + (* Shouldn't actually do anything since we aren't doing function renames *) let _ = Module.update_maps wasm_mod @@ -348,7 +561,7 @@ let _ = Module.Feature.all; ] -let _ = Module.validate new_mod +let _ = assert (Module.validate new_mod == 1) let _ = Module.print new_mod let _ = Module.print_stack_ir new_mod