diff --git a/binaryen.opam b/binaryen.opam index 0591f426..dce37658 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" {>= "125.0.0" < "126.0.0"} ] x-maintenance-intent: ["0.(latest)"] diff --git a/esy.lock/index.json b/esy.lock/index.json index 637fbaaf..2014e34b 100644 --- a/esy.lock/index.json +++ b/esy.lock/index.json @@ -1,5 +1,5 @@ { - "checksum": "43b607828957b76c0263dc0b329d0237", + "checksum": "857a7074d0b2ba0531945439d1dffb14", "root": "@grain/binaryen.ml@link-dev:./package.json", "node": { "ocaml@5.3.0@d41d8cd9": { @@ -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" ], @@ -662,14 +662,14 @@ }, "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/dune@opam:3.20.2@8daef28d", "@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", + "ocaml@5.3.0@d41d8cd9", "@opam/ocamlfind@opam:1.9.8@4b291364", "@opam/dune@opam:3.20.2@8daef28d", "@opam/cmdliner@opam:1.3.0@8e6dd99f", "@opam/base-bytes@opam:base@785dbd33" @@ -813,8 +813,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": { @@ -1319,7 +1319,7 @@ "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/ocamlfind@opam:1.9.8@4b291364", "@opam/menhirSdk@opam:20250912@f434747d", "@opam/menhirLib@opam:20250912@7bcb2f61", "@opam/menhir@opam:20250912@0ed10637", @@ -1395,7 +1395,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" @@ -1880,11 +1880,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" ], @@ -1948,7 +1948,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,14 +1960,14 @@ [ "windows", "x86_64" ] ] }, - "@grain/libbinaryen@124.0.1@d41d8cd9": { - "id": "@grain/libbinaryen@124.0.1@d41d8cd9", + "@grain/libbinaryen@git:https://www.github.com/spotandjake/libbinaryen.git#84d8962a81ff9472649aef5381fc85d26262ed5c@d41d8cd9": { + "id": "@grain/libbinaryen@git:https://www.github.com/spotandjake/libbinaryen.git#84d8962a81ff9472649aef5381fc85d26262ed5c@d41d8cd9", "name": "@grain/libbinaryen", - "version": "124.0.1", + "version": "git:https://www.github.com/spotandjake/libbinaryen.git#84d8962a81ff9472649aef5381fc85d26262ed5c", "source": { "type": "install", "source": [ - "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-124.0.1.tgz#sha1:7b29acc4a62ab5a849c6e01c3d8e90c78efd05f2" + "git:https://www.github.com/spotandjake/libbinaryen.git#84d8962a81ff9472649aef5381fc85d26262ed5c" ] }, "overrides": [], @@ -1999,7 +1999,7 @@ "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" + "@grain/libbinaryen@git:https://www.github.com/spotandjake/libbinaryen.git#84d8962a81ff9472649aef5381fc85d26262ed5c@d41d8cd9" ], "devDependencies": [ "@opam/ocamlformat@opam:0.27.0@c40d4612", 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/package.json b/package.json index b0727de4..09bd61bd 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": ">= 125.0.0 < 126.0.0", "@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://www.github.com/spotandjake/libbinaryen.git#84d8962a81ff9472649aef5381fc85d26262ed5c" }, "esy": { "build": "dune build -p binaryen" diff --git a/src/passes.ml b/src/passes.ml index c1295626..fcf1928b 100644 --- a/src/passes.ml +++ b/src/passes.ml @@ -229,13 +229,6 @@ let minify_imports_and_exports_and_modules = (** Split types into minimal recursion groups *) let minimize_rec_groups = "minimize-rec-groups" -(** apply the assumption that asyncify imports always unwind, and we never - rewind *) -let mod_asyncify_always_and_only_unwind = "mod-asyncify-always-and-only-unwind" - -(** apply the assumption that asyncify never unwinds *) -let mod_asyncify_never_unwind = "mod-asyncify-never-unwind" - (** creates specialized versions of functions *) let monomorphize = "monomorphize" @@ -365,6 +358,9 @@ let reorder_globals = "reorder-globals" (** sorts locals by access frequency *) let reorder_locals = "reorder-locals" +(** sorts private types by access frequency *) +let reorder_types = "reorder-types" + (** re-optimize control flow using the relooper algorithm *) let rereloop = "rereloop" diff --git a/src/passes.mli b/src/passes.mli index cc11ac6d..f09b78cf 100644 --- a/src/passes.mli +++ b/src/passes.mli @@ -225,13 +225,6 @@ val minify_imports_and_exports_and_modules : t val minimize_rec_groups : t (** Split types into minimal recursion groups *) -val mod_asyncify_always_and_only_unwind : t -(** apply the assumption that asyncify imports always unwind, and we never - rewind *) - -val mod_asyncify_never_unwind : t -(** apply the assumption that asyncify never unwinds *) - val monomorphize : t (** creates specialized versions of functions *) @@ -359,6 +352,9 @@ val reorder_globals : t val reorder_locals : t (** sorts locals by access frequency *) +val reorder_types: t +(** sorts private types by access frequency *) + val rereloop : t (** re-optimize control flow using the relooper algorithm *)