Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion binaryen.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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" {>= "125.0.0" < "126.0.0"}
"libbinaryen" {>= "126.0.0" < "127.0.0"}
]
x-maintenance-intent: ["0.(latest)"]
420 changes: 210 additions & 210 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.

4 changes: 2 additions & 2 deletions esy.lock/opam/ocaml-lsp-server.1.23.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.

1 change: 1 addition & 0 deletions esy.lock/opam/ocamlbuild.0.16.1/opam

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

1 change: 1 addition & 0 deletions esy.lock/opam/ocamlfind.1.9.8/opam

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

1 change: 1 addition & 0 deletions esy.lock/opam/ocamlformat-lib.0.27.0/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.

1 change: 1 addition & 0 deletions esy.lock/opam/ocamlformat.0.27.0/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.

12 changes: 5 additions & 7 deletions esy.lock/opam/xdg.3.21.1/opam → esy.lock/opam/xdg.3.22.0/opam

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "Apache-2.0",
"dependencies": {
"ocaml": ">= 4.13.0 < 5.4.0",
"@grain/libbinaryen": ">= 125.0.0 < 126.0.0",
"@grain/libbinaryen": ">= 126.0.0 < 127.0.0",
"@opam/dune": ">= 3.0.0",
"@opam/dune-configurator": ">= 3.0.0"
},
Expand Down
3 changes: 1 addition & 2 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,5 @@ function caml_binaryen_add_custom_section(wasm_mod, name, contents) {

//Provides: caml_binaryen_module_update_maps
function caml_binaryen_module_update_maps(wasm_mod) {
// The JS version doesn't expose `update_maps`
return;
return wasm_mod.updateMaps();
}
4 changes: 4 additions & 0 deletions src/module.ml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ module Feature = struct

let call_indirect_overlong = call_indirect_overlong ()

external relaxed_atomics : unit -> t = "caml_binaryen_feature_relaxed_atomics"

let relaxed_atomics = relaxed_atomics ()

external all : unit -> t = "caml_binaryen_feature_all"

let all = all ()
Expand Down
1 change: 1 addition & 0 deletions src/module.mli
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Feature : sig
val fp16 : t
val bulk_memory_opt : t
val call_indirect_overlong : t
val relaxed_atomics : t
val all : t
end

Expand Down
6 changes: 6 additions & 0 deletions src/module_feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ caml_binaryen_feature_call_indirect_overlong(value unit) {
CAMLreturn(Val_int(BinaryenFeatureCallIndirectOverlong()));
}

CAMLprim value
caml_binaryen_feature_relaxed_atomics(value unit) {
CAMLparam1(unit);
CAMLreturn(Val_int(BinaryenFeatureRelaxedAtomics()));
}

CAMLprim value
caml_binaryen_feature_all(value unit) {
CAMLparam1(unit);
Expand Down
6 changes: 6 additions & 0 deletions src/module_feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ function caml_binaryen_feature_call_indirect_overlong() {
return Binaryen.Features.BulkMemoryOpt;
}

//Provides: caml_binaryen_feature_relaxed_atomics
//Requires: Binaryen
function caml_binaryen_feature_relaxed_atomics() {
return Binaryen.Features.RelaxedAtomics;
}

//Provides: caml_binaryen_feature_all
//Requires: Binaryen
function caml_binaryen_feature_all() {
Expand Down
14 changes: 10 additions & 4 deletions src/passes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ let generate_global_effects = "generate-global-effects"
(** refine the types of globals *)
let global_refining = "global-refining"

(** globally optimize struct values, also emitting ref.cast_desc_eq *)
let gsi_desc_cast = "gsi-desc-cast"

(** globally optimize struct values *)
let gsi = "gsi"

Expand Down Expand Up @@ -152,9 +155,6 @@ let inlining_optimizing = "inlining-optimizing"
(** lower away binaryen intrinsics *)
let intrinsic_lowering = "intrinsic-lowering"

(** wrap imports and exports for JavaScript promise integration *)
let jspi = "jspi"

(** legalizes i64 types on the import/export boundary *)
let legalize_js_interface = "legalize-js-interface"

Expand Down Expand Up @@ -321,6 +321,9 @@ let symbolmap = "symbolmap"
(** removes operations incompatible with js *)
let remove_non_js_ops = "remove-non-js-ops"

(** replaces relaxed SIMD instructions with unreachable *)
let remove_relaxed_simd = "remove-relaxed-simd"

(** removes imports and replaces them with nops *)
let remove_imports = "remove-imports"

Expand Down Expand Up @@ -468,6 +471,9 @@ let strip_eh = "strip-eh"
(** strip the wasm target features section *)
let strip_target_features = "strip-target-features"

(** strip all toolchain-specific code annotations *)
let strip_toolchain_annotations = "strip-toolchain-annotations"

(** translate old Phase 3 EH instructions to new ones with exnref *)
let translate_to_exnref = "translate-to-exnref"

Expand All @@ -486,7 +492,7 @@ let type_finalizing = "type-finalizing"
(** merge types to their supertypes where possible *)
let type_merging = "type-merging"

(** create new nominal types to help other optimizations *)
(** create new types to help other optimizations *)
let type_ssa = "type-ssa"

(** mark all types as non-final (open) *)
Expand Down
Loading
Loading