@grain/binaryen.ml 0.20.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- binaryen-archive/CHANGELOG.md +64 -0
- binaryen-archive/binaryen.opam +3 -3
- binaryen-archive/esy.lock/index.json +491 -426
- binaryen-archive/esy.lock/opam/{base.v0.15.1 → base.v0.16.1}/opam +7 -4
- binaryen-archive/esy.lock/opam/{chrome-trace.3.6.1 → chrome-trace.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{cmdliner.1.1.1 → cmdliner.1.2.0}/opam +2 -2
- binaryen-archive/esy.lock/opam/{csexp.1.5.1 → csexp.1.5.2}/opam +7 -9
- binaryen-archive/esy.lock/opam/{dune-build-info.3.6.1 → dune-build-info.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{dune-configurator.3.6.1 → dune-configurator.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{dune-rpc.3.6.1 → dune-rpc.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{dune.3.6.1 → dune.3.9.1}/opam +5 -5
- binaryen-archive/esy.lock/opam/{dyn.3.6.1 → dyn.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/fiber.3.7.0/opam +39 -0
- binaryen-archive/esy.lock/opam/{fix.20220121 → fix.20230505}/opam +3 -3
- binaryen-archive/esy.lock/opam/gen.1.1/opam +31 -0
- binaryen-archive/esy.lock/opam/{js_of_ocaml-compiler.4.1.0 → js_of_ocaml-compiler.5.4.0}/opam +10 -10
- binaryen-archive/esy.lock/opam/{menhir.20220210 → menhir.20230608}/opam +4 -4
- binaryen-archive/esy.lock/opam/{menhirLib.20220210 → menhirLib.20230608}/opam +4 -4
- binaryen-archive/esy.lock/opam/{menhirSdk.20220210 → menhirSdk.20230608}/opam +4 -4
- binaryen-archive/esy.lock/opam/{ocamlbuild.0.14.2 → ocamlbuild.0.14.2+win}/opam +13 -14
- binaryen-archive/esy.lock/opam/ocamlfind.1.9.6/files/0001-Harden-test-for-OCaml-5.patch +12 -0
- binaryen-archive/esy.lock/opam/{ocamlfind.1.9.5 → ocamlfind.1.9.6}/opam +8 -7
- binaryen-archive/esy.lock/opam/{ocamlformat-rpc-lib.0.24.1 → ocamlformat-rpc-lib.0.25.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/ocamlformat.0.24.1/opam +1 -1
- binaryen-archive/esy.lock/opam/{ordering.3.6.1 → ordering.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{ppx_yojson_conv_lib.v0.15.0 → ppx_yojson_conv_lib.v0.16.0}/opam +3 -3
- binaryen-archive/esy.lock/opam/{ppxlib.0.28.0 → ppxlib.0.29.1}/opam +5 -5
- binaryen-archive/esy.lock/opam/sedlex.3.2/opam +48 -0
- binaryen-archive/esy.lock/opam/{sexplib0.v0.15.1 → sexplib0.v0.16.0}/opam +3 -3
- binaryen-archive/esy.lock/opam/{stdio.v0.15.0 → stdio.v0.16.0}/opam +4 -4
- binaryen-archive/esy.lock/opam/{stdune.3.6.1 → stdune.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{topkg.1.0.6 → topkg.1.0.7}/opam +2 -2
- binaryen-archive/esy.lock/opam/{xdg.3.6.1 → xdg.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{yojson.2.0.2 → yojson.2.1.0}/opam +33 -23
- binaryen-archive/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.2+win_opam_override/files/ocamlbuild-0.14.2.patch +0 -0
- binaryen-archive/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.9.6_opam_override/files/findlib.patch +11 -0
- binaryen-archive/package.json +3 -3
- binaryen-archive/src/array_type.c +29 -0
- binaryen-archive/src/array_type.js +17 -0
- binaryen-archive/src/array_type.ml +8 -0
- binaryen-archive/src/array_type.mli +3 -0
- binaryen-archive/src/dune +38 -32
- binaryen-archive/src/{binaryen_stubs_exports.c → export.c} +0 -8
- binaryen-archive/src/{binaryen_stubs_expressions.c → expression.c} +24 -15
- binaryen-archive/src/{binaryen_stubs_expressions.js → expression.js} +20 -6
- binaryen-archive/src/expression.ml +14 -5
- binaryen-archive/src/expression.mli +10 -2
- binaryen-archive/src/{binaryen_stubs_functions.c → function.c} +0 -24
- binaryen-archive/src/{binaryen_stubs_globals.c → global.c} +0 -25
- binaryen-archive/src/heap_type.c +171 -0
- binaryen-archive/src/heap_type.js +131 -0
- binaryen-archive/src/heap_type.ml +12 -1
- binaryen-archive/src/heap_type.mli +12 -1
- binaryen-archive/src/{binaryen_stubs_literals.c → literal.c} +0 -9
- binaryen-archive/src/{binaryen_stubs_memory.c → memory.c} +15 -5
- binaryen-archive/src/{binaryen_stubs_memory.js → memory.js} +11 -1
- binaryen-archive/src/memory.ml +6 -3
- binaryen-archive/src/memory.mli +10 -1
- binaryen-archive/src/{binaryen_stubs_modules.c → module.c} +0 -9
- binaryen-archive/src/module.ml +4 -5
- binaryen-archive/src/module.mli +1 -1
- binaryen-archive/src/{binaryen_stubs_features.c → module_feature.c} +6 -6
- binaryen-archive/src/{binaryen_stubs_features.js → module_feature.js} +6 -6
- binaryen-archive/src/ocaml_helpers.c +87 -0
- binaryen-archive/src/ocaml_helpers.h +33 -0
- binaryen-archive/src/{binaryen_stubs_ops.c → op.c} +597 -333
- binaryen-archive/src/op.js +2129 -0
- binaryen-archive/src/op.ml +499 -352
- binaryen-archive/src/op.mli +46 -7
- binaryen-archive/src/passes.ml +46 -0
- binaryen-archive/src/passes.mli +45 -0
- binaryen-archive/src/signature_type.c +23 -0
- binaryen-archive/src/signature_type.js +11 -0
- binaryen-archive/src/signature_type.ml +5 -0
- binaryen-archive/src/signature_type.mli +2 -0
- binaryen-archive/src/struct_type.c +39 -0
- binaryen-archive/src/struct_type.js +23 -0
- binaryen-archive/src/struct_type.ml +11 -0
- binaryen-archive/src/struct_type.mli +4 -0
- binaryen-archive/src/{binaryen_stubs_tables.c → table.c} +0 -25
- binaryen-archive/src/{binaryen_stubs_types.c → type.c} +30 -12
- binaryen-archive/src/{binaryen_stubs_types.js → type.js} +31 -3
- binaryen-archive/src/type.ml +18 -2
- binaryen-archive/src/type.mli +5 -1
- binaryen-archive/src/{binaryen_stubs_type_system.c → type_system.c} +0 -6
- binaryen-archive/src/{binaryen_stubs_type_system.js → type_system.js} +0 -6
- binaryen-archive/src/type_system.ml +0 -1
- binaryen-archive/src/type_system.mli +0 -1
- binaryen-archive/test/test.expected +13 -13
- binaryen-archive/test/test.ml +11 -3
- binaryen-archive/esy.lock/opam/fiber.3.6.1/opam +0 -41
- binaryen-archive/esy.lock/opam/ocamlfind.1.9.5/files/0001-Fix-bug-when-installing-with-a-system-compiler.patch +0 -26
- binaryen-archive/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.9.5_opam_override/files/findlib.patch +0 -485
- binaryen-archive/src/binaryen_stubs_heap_types.c +0 -95
- binaryen-archive/src/binaryen_stubs_heap_types.js +0 -65
- binaryen-archive/src/binaryen_stubs_ops.js +0 -1895
- /binaryen-archive/esy.lock/overrides/{opam__s__ocamlbuild_opam__c__0.14.2_opam_override → opam__s__ocamlbuild_opam__c__0.14.2+win_opam_override}/files/winpatch.patch +0 -0
- /binaryen-archive/esy.lock/overrides/{opam__s__ocamlbuild_opam__c__0.14.2_opam_override → opam__s__ocamlbuild_opam__c__0.14.2+win_opam_override}/package.json +0 -0
- /binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.9.5_opam_override → opam__s__ocamlfind_opam__c__1.9.6_opam_override}/package.json +0 -0
- /binaryen-archive/src/{binaryen_stubs_exports.js → export.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_functions.js → function.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_globals.js → global.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_imports.c → import.c} +0 -0
- /binaryen-archive/src/{binaryen_stubs_imports.js → import.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_literals.js → literal.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_modules.js → module.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_packed_types.c → packed_type.c} +0 -0
- /binaryen-archive/src/{binaryen_stubs_packed_types.js → packed_type.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_settings.c → settings.c} +0 -0
- /binaryen-archive/src/{binaryen_stubs_settings.js → settings.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_tables.js → table.js} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
)
|
|
4
4
|
(table.size $table)
|
|
5
5
|
(table.grow $table
|
|
6
|
-
(ref.null
|
|
6
|
+
(ref.null nofunc)
|
|
7
7
|
(i32.const 0)
|
|
8
8
|
)
|
|
9
9
|
(module
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
(export "memory" (memory $0))
|
|
25
25
|
(export "hello" (func $hello))
|
|
26
26
|
(start $start)
|
|
27
|
-
(func $adder (param $0 i32) (param $1 i32) (result i32)
|
|
27
|
+
(func $adder (type $i32_i32_=>_i32) (param $0 i32) (param $1 i32) (result i32)
|
|
28
28
|
(block $add (result i32)
|
|
29
29
|
(if
|
|
30
30
|
(i32.const 0)
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
)
|
|
43
43
|
)
|
|
44
44
|
)
|
|
45
|
-
(func $start
|
|
45
|
+
(func $start (type $none_=>_none)
|
|
46
46
|
(block $start
|
|
47
47
|
(memory.init 1
|
|
48
48
|
(i32.const 2048)
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
)
|
|
59
59
|
)
|
|
60
60
|
)
|
|
61
|
-
(func $hello (param $0 anyref) (result i32)
|
|
61
|
+
(func $hello (type $anyref_=>_i32) (param $0 anyref) (result i32)
|
|
62
62
|
(call $write
|
|
63
63
|
(local.get $0)
|
|
64
64
|
(i32.const 0)
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
(export "memory" (memory $0))
|
|
82
82
|
(export "hello" (func $hello))
|
|
83
83
|
(start $start)
|
|
84
|
-
(func $adder (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
|
|
84
|
+
(func $adder (type $i32_i32_=>_i32) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
|
|
85
85
|
(i32.add
|
|
86
86
|
(select
|
|
87
87
|
(local.get $0)
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
(local.get $1)
|
|
94
94
|
)
|
|
95
95
|
)
|
|
96
|
-
(func $start (; has Stack IR ;)
|
|
96
|
+
(func $start (type $none_=>_none) (; has Stack IR ;)
|
|
97
97
|
(memory.init 1
|
|
98
98
|
(i32.const 2048)
|
|
99
99
|
(i32.const 0)
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
)
|
|
107
107
|
)
|
|
108
108
|
)
|
|
109
|
-
(func $hello (; has Stack IR ;) (param $0 anyref) (result i32)
|
|
109
|
+
(func $hello (type $anyref_=>_i32) (; has Stack IR ;) (param $0 anyref) (result i32)
|
|
110
110
|
(call $write
|
|
111
111
|
(local.get $0)
|
|
112
112
|
(i32.const 0)
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
(export "memory" (memory $0))
|
|
130
130
|
(export "hello" (func $2))
|
|
131
131
|
(start $1)
|
|
132
|
-
(func $0 (param $0 i32) (param $1 i32) (result i32)
|
|
132
|
+
(func $0 (type $type$1) (param $0 i32) (param $1 i32) (result i32)
|
|
133
133
|
(i32.add
|
|
134
134
|
(select
|
|
135
135
|
(local.get $0)
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
(local.get $1)
|
|
142
142
|
)
|
|
143
143
|
)
|
|
144
|
-
(func $1
|
|
144
|
+
(func $1 (type $type$2)
|
|
145
145
|
(memory.init 1
|
|
146
146
|
(i32.const 2048)
|
|
147
147
|
(i32.const 0)
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
)
|
|
155
155
|
)
|
|
156
156
|
)
|
|
157
|
-
(func $2 (param $0 anyref) (result i32)
|
|
157
|
+
(func $2 (type $type$3) (param $0 anyref) (result i32)
|
|
158
158
|
(call $fimport$0
|
|
159
159
|
(local.get $0)
|
|
160
160
|
(i32.const 0)
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
(export "memory" (memory $0))
|
|
178
178
|
(export "hello" (func $2))
|
|
179
179
|
(start $1)
|
|
180
|
-
(func $0 (param $0 i32) (param $1 i32) (result i32)
|
|
180
|
+
(func $0 (type $type$1) (param $0 i32) (param $1 i32) (result i32)
|
|
181
181
|
local.get $0
|
|
182
182
|
local.get $1
|
|
183
183
|
i32.load $0
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
local.get $1
|
|
187
187
|
i32.add
|
|
188
188
|
)
|
|
189
|
-
(func $1
|
|
189
|
+
(func $1 (type $type$2)
|
|
190
190
|
i32.const 2048
|
|
191
191
|
i32.const 0
|
|
192
192
|
i32.const 5
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
call $0
|
|
197
197
|
drop
|
|
198
198
|
)
|
|
199
|
-
(func $2 (param $0 anyref) (result i32)
|
|
199
|
+
(func $2 (type $type$3) (param $0 anyref) (result i32)
|
|
200
200
|
local.get $0
|
|
201
201
|
i32.const 0
|
|
202
202
|
i32.const 1
|
binaryen-archive/test/test.ml
CHANGED
|
@@ -36,6 +36,7 @@ let _ =
|
|
|
36
36
|
= "external_base_name")
|
|
37
37
|
|
|
38
38
|
let _ = assert (Memory.is_shared import_wasm_mod "internal_name" = true)
|
|
39
|
+
let _ = assert (Memory.is_64 import_wasm_mod "internal_name" = false)
|
|
39
40
|
|
|
40
41
|
(* Testing Return.get_value *)
|
|
41
42
|
let _ =
|
|
@@ -169,14 +170,14 @@ let _ = assert (Memory.has_memory wasm_mod = false)
|
|
|
169
170
|
let _ =
|
|
170
171
|
Memory.set_memory wasm_mod 1 Memory.unlimited "memory"
|
|
171
172
|
[ segment; passive_segment ]
|
|
172
|
-
false "0"
|
|
173
|
+
false false "0"
|
|
173
174
|
|
|
174
175
|
let _ = assert (Memory.has_memory wasm_mod = true)
|
|
175
176
|
let _ = assert (Memory.get_initial wasm_mod "0" = 1)
|
|
176
177
|
let _ = assert (Memory.has_max wasm_mod "0" = false)
|
|
177
178
|
let _ = assert (Memory.get_max wasm_mod "0" = Memory.unlimited)
|
|
178
179
|
let max_memory_wasm_mod = Module.create ()
|
|
179
|
-
let _ = Memory.set_memory max_memory_wasm_mod 1 2 "memory" [] false "0"
|
|
180
|
+
let _ = Memory.set_memory max_memory_wasm_mod 1 2 "memory" [] false false "0"
|
|
180
181
|
let _ = assert (Memory.has_max max_memory_wasm_mod "0" = true)
|
|
181
182
|
let _ = assert (Memory.get_max max_memory_wasm_mod "0" = 2)
|
|
182
183
|
|
|
@@ -235,11 +236,18 @@ let new_mod = Module.read byts
|
|
|
235
236
|
let _ =
|
|
236
237
|
Module.run_passes new_mod
|
|
237
238
|
[
|
|
239
|
+
Passes.generate_global_effects;
|
|
238
240
|
Passes.name_types;
|
|
239
241
|
Passes.merge_similar_functions;
|
|
240
242
|
Passes.spill_pointers;
|
|
241
243
|
Passes.gufa;
|
|
242
244
|
Passes.gufa_optimizing;
|
|
245
|
+
Passes.reorder_globals;
|
|
246
|
+
Passes.optimize_casts;
|
|
247
|
+
Passes.multi_memory_lowering;
|
|
248
|
+
Passes.monomorphize;
|
|
249
|
+
Passes.signext_lowering;
|
|
250
|
+
Passes.discard_global_effects;
|
|
243
251
|
]
|
|
244
252
|
|
|
245
253
|
let _ =
|
|
@@ -258,10 +266,10 @@ let _ =
|
|
|
258
266
|
Module.Feature.multivalue;
|
|
259
267
|
Module.Feature.gc;
|
|
260
268
|
Module.Feature.memory64;
|
|
261
|
-
Module.Feature.typed_function_references;
|
|
262
269
|
Module.Feature.relaxed_simd;
|
|
263
270
|
Module.Feature.extended_const;
|
|
264
271
|
Module.Feature.strings;
|
|
272
|
+
Module.Feature.multi_memories;
|
|
265
273
|
Module.Feature.all;
|
|
266
274
|
]
|
|
267
275
|
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
opam-version: "2.0"
|
|
2
|
-
synopsis: "Structured concurrency library"
|
|
3
|
-
description:
|
|
4
|
-
"This library offers no backwards compatibility guarantees. Use at your own risk."
|
|
5
|
-
maintainer: ["Jane Street Group, LLC <opensource@janestreet.com>"]
|
|
6
|
-
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"]
|
|
7
|
-
license: "MIT"
|
|
8
|
-
homepage: "https://github.com/ocaml/dune"
|
|
9
|
-
doc: "https://dune.readthedocs.io/"
|
|
10
|
-
bug-reports: "https://github.com/ocaml/dune/issues"
|
|
11
|
-
depends: [
|
|
12
|
-
"dune" {>= "3.5"}
|
|
13
|
-
"ocaml" {>= "4.08.0"}
|
|
14
|
-
"stdune" {= version}
|
|
15
|
-
"dyn" {= version}
|
|
16
|
-
"odoc" {with-doc}
|
|
17
|
-
]
|
|
18
|
-
dev-repo: "git+https://github.com/ocaml/dune.git"
|
|
19
|
-
build: [
|
|
20
|
-
["dune" "subst"] {dev}
|
|
21
|
-
["rm" "-rf" "vendor/csexp"]
|
|
22
|
-
["rm" "-rf" "vendor/pp"]
|
|
23
|
-
[
|
|
24
|
-
"dune"
|
|
25
|
-
"build"
|
|
26
|
-
"-p"
|
|
27
|
-
name
|
|
28
|
-
"-j"
|
|
29
|
-
jobs
|
|
30
|
-
"@install"
|
|
31
|
-
"@doc" {with-doc}
|
|
32
|
-
]
|
|
33
|
-
]
|
|
34
|
-
url {
|
|
35
|
-
src: "https://github.com/ocaml/dune/releases/download/3.6.1/dune-3.6.1.tbz"
|
|
36
|
-
checksum: [
|
|
37
|
-
"sha256=f1d5ac04b7a027f3d549e25cf885ebf7acc135e0291c18e6b43123a799c143ce"
|
|
38
|
-
"sha512=64714ab6155cd04bc33d693fc7a6d9d61aa7a278357eeff159df324e083914fcd556459a3945acacf1bbc3775f2232ab0c78006ab8a434dc58dcf95ffdffac52"
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
x-commit-hash: "7d2788fc94a071bca897aefc95f1464911870a4c"
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
From f53247f546375972789b96c3f612cd7f524bf2aa Mon Sep 17 00:00:00 2001
|
|
2
|
-
From: Louis Gesbert <louis.gesbert@ocamlpro.com>
|
|
3
|
-
Date: Mon, 11 Jul 2022 18:12:18 +0200
|
|
4
|
-
Subject: [PATCH] Fix bug when installing with a system compiler
|
|
5
|
-
|
|
6
|
-
See https://discuss.ocaml.org/t/problem-installing-ocamlfind-on-latest-ocamlpro-alpine-docker-image/10147
|
|
7
|
-
---
|
|
8
|
-
src/findlib/Makefile | 2 +-
|
|
9
|
-
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
10
|
-
|
|
11
|
-
diff --git a/src/findlib/Makefile b/src/findlib/Makefile
|
|
12
|
-
index 84514b6f22..ea23f4a10c 100644
|
|
13
|
-
--- a/src/findlib/Makefile
|
|
14
|
-
+++ b/src/findlib/Makefile
|
|
15
|
-
@@ -123,7 +123,7 @@ clean:
|
|
16
|
-
install: all
|
|
17
|
-
$(INSTALLDIR) "$(DESTDIR)$(prefix)$(OCAML_SITELIB)/$(NAME)"
|
|
18
|
-
$(INSTALLDIR) "$(DESTDIR)$(prefix)$(OCAMLFIND_BIN)"
|
|
19
|
-
- $(INSTALLDIR) "$(DESTDIR)$(prefix)$(OCAML_CORE_STDLIB)"
|
|
20
|
-
+ test $(INSTALL_TOPFIND) -eq 0 || $(INSTALLDIR) "$(DESTDIR)$(prefix)$(OCAML_CORE_STDLIB)"
|
|
21
|
-
test $(INSTALL_TOPFIND) -eq 0 || $(INSTALLFILE) topfind "$(DESTDIR)$(prefix)$(OCAML_CORE_STDLIB)/"
|
|
22
|
-
files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config \
|
|
23
|
-
findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib$(LIB_SUFFIX) findlib.cmxs \
|
|
24
|
-
--
|
|
25
|
-
2.35.1
|
|
26
|
-
|