Skip to content

Commit

Permalink
feat!: Update to libbinaryen v114 (#198)
Browse files Browse the repository at this point in the history
chore!: Restrict ocaml to <5 when installing with esy
feat: Add `strip_eh` pass

---------

Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
  • Loading branch information
peblair and phated committed Oct 30, 2023
1 parent 74c8ce4 commit d11b8e1
Show file tree
Hide file tree
Showing 18 changed files with 257 additions and 250 deletions.
2 changes: 1 addition & 1 deletion binaryen.opam
Expand Up @@ -16,5 +16,5 @@ depends: [
"dune" {>= "3.0.0"}
"dune-configurator" {>= "3.0.0"}
"js_of_ocaml-compiler" {>= "4.1.0" < "6.0.0"}
"libbinaryen" {>= "113.0.0" < "114.0.0"}
"libbinaryen" {>= "114.0.0" < "115.0.0"}
]
402 changes: 201 additions & 201 deletions esy.lock/index.json

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion esy.lock/opam/ocamlformat.0.24.1/opam

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -5,8 +5,8 @@
"author": "Oscar Spencer <oscar@grain-lang.org>",
"license": "Apache-2.0",
"dependencies": {
"ocaml": ">= 4.12.0",
"@grain/libbinaryen": ">= 113.0.0 < 114.0.0",
"ocaml": ">= 4.12.0 < 5.0.0",
"@grain/libbinaryen": ">= 114.0.0 < 115.0.0",
"@opam/dune": ">= 3.0.0",
"@opam/dune-configurator": ">= 3.0.0"
},
Expand Down
3 changes: 3 additions & 0 deletions src/passes.ml
Expand Up @@ -387,6 +387,9 @@ let strip_dwarf = "strip-dwarf"
(** strip the wasm producers section *)
let strip_producers = "strip-producers"

(** strip EH instructions *)
let strip_eh = "strip-eh"

(** strip the wasm target features section *)
let strip_target_features = "strip-target-features"

Expand Down
3 changes: 3 additions & 0 deletions src/passes.mli
Expand Up @@ -384,6 +384,9 @@ val strip_dwarf : t
val strip_producers : t
(** strip the wasm producers section *)

val strip_eh : t
(** strip EH instructions *)

val strip_target_features : t
(** strip the wasm target features section *)

Expand Down
8 changes: 4 additions & 4 deletions test/test.expected
Expand Up @@ -11,7 +11,7 @@
(type $none_=>_none (func))
(type $anyref_i32_i32_=>_i32 (func (param anyref i32 i32) (result i32)))
(type $anyref_=>_i32 (func (param anyref) (result i32)))
(import "future-wasi" "write" (func $write (param anyref i32 i32) (result i32)))
(import "future-wasi" "write" (func $write (type $anyref_i32_i32_=>_i32) (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))
Expand Down Expand Up @@ -71,7 +71,7 @@
(type $none_=>_none (func))
(type $anyref_i32_i32_=>_i32 (func (param anyref i32 i32) (result i32)))
(type $anyref_=>_i32 (func (param anyref) (result i32)))
(import "future-wasi" "write" (func $write (param anyref i32 i32) (result i32)))
(import "future-wasi" "write" (func $write (type $anyref_i32_i32_=>_i32) (param anyref i32 i32) (result i32)))
(memory $0 1)
(data $0 (i32.const 0) "hello")
(data $1 "world")
Expand Down Expand Up @@ -119,7 +119,7 @@
(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 (param anyref i32 i32) (result i32)))
(import "future-wasi" "write" (func $fimport$0 (type $type$0) (param anyref i32 i32) (result i32)))
(memory $0 1)
(data $0 (i32.const 0) "hello")
(data $1 "world")
Expand Down Expand Up @@ -167,7 +167,7 @@
(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 (param anyref i32 i32) (result i32)))
(import "future-wasi" "write" (func $fimport$0 (type $type$0) (param anyref i32 i32) (result i32)))
(memory $0 1)
(data $0 (i32.const 0) "hello")
(data $1 "world")
Expand Down
1 change: 1 addition & 0 deletions test/test.ml
Expand Up @@ -248,6 +248,7 @@ let _ =
Passes.monomorphize;
Passes.signext_lowering;
Passes.discard_global_effects;
Passes.strip_eh;
]

let _ =
Expand Down

0 comments on commit d11b8e1

Please sign in to comment.