Skip to content

Commit 283c063

Browse files
committed
feat!: Upgrade to Binaryen v127
Full Diff: WebAssembly/binaryen@version_126...version_127
1 parent 8b3cd50 commit 283c063

16 files changed

Lines changed: 159 additions & 142 deletions

File tree

binaryen.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ depends: [
1616
"dune" {>= "3.0.0"}
1717
"dune-configurator" {>= "3.0.0"}
1818
"js_of_ocaml-compiler" {>= "6.0.0" < "7.0.0"}
19-
"libbinaryen" {>= "126.0.0" < "127.0.0"}
19+
"libbinaryen" {>= "127.0.0" < "128.0.0"}
2020
]
2121
x-maintenance-intent: ["0.(latest)"]

esy.lock/index.json

Lines changed: 62 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esy.lock/opam/base-bytes.base/opam

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 26 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esy.lock/opam/js_of_ocaml-compiler.6.2.0/opam renamed to esy.lock/opam/js_of_ocaml-compiler.6.3.2/opam

Lines changed: 16 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@
44
"description": "OCaml bindings for Binaryen.",
55
"author": "Oscar Spencer <oscar@grain-lang.org>",
66
"license": "Apache-2.0",
7+
"installConfig": {
8+
"pnp": false
9+
},
710
"dependencies": {
811
"ocaml": ">= 4.13.0 < 5.4.0",
9-
"@grain/libbinaryen": ">= 126.0.0 < 127.0.0",
12+
"@grain/libbinaryen": "*",
1013
"@opam/dune": ">= 3.0.0",
1114
"@opam/dune-configurator": ">= 3.0.0"
1215
},
1316
"devDependencies": {
14-
"@opam/js_of_ocaml-compiler": ">= 6.0.0 < 7.0.0",
15-
"@opam/ocamlformat": "0.27.0",
17+
"@opam/js_of_ocaml-compiler": ">= 6.3.0 < 7.0.0",
18+
"@opam/ocamlformat": "0.29.0",
1619
"@opam/ocaml-lsp-server": ">= 1.9.1 < 2.0.0"
1720
},
1821
"resolutions": {
19-
"@opam/ocp-indent": "1.7.0"
22+
"@opam/ocp-indent": "1.9.0",
23+
"@grain/libbinaryen": "git+https://github.com/grain-lang/libbinaryen.git#c4f2c6a10288f9145826f6cbfdc0442c901992f5"
2024
},
2125
"esy": {
2226
"build": "dune build -p binaryen"

src/expression.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,7 @@ function caml_binaryen_const(wasm_mod, lit) {
367367

368368
if (lit.type === "int64") {
369369
return wasm_mod.i64.const(
370-
caml_int64_lo32(lit.value),
371-
caml_int64_hi32(lit.value)
370+
(BigInt(caml_int64_hi32(lit.value)) << 32n) | BigInt(caml_int64_lo32(lit.value) >>> 0)
372371
);
373372
}
374373

@@ -382,8 +381,7 @@ function caml_binaryen_const(wasm_mod, lit) {
382381

383382
if (lit.type === "float64_bits") {
384383
return wasm_mod.f64.const_bits(
385-
caml_int64_lo32(lit.value),
386-
caml_int64_hi32(lit.value)
384+
(BigInt(caml_int64_hi32(lit.value)) << 32n) | BigInt(caml_int64_lo32(lit.value) >>> 0)
387385
);
388386
}
389387

0 commit comments

Comments
 (0)