@grain/binaryen.ml 0.11.1 → 0.13.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 +53 -0
- binaryen-archive/README.md +25 -1
- binaryen-archive/binaryen.opam +5 -5
- binaryen-archive/esy.lock/index.json +325 -310
- binaryen-archive/esy.lock/opam/base-bytes.base/opam +9 -0
- binaryen-archive/esy.lock/opam/{base.v0.14.2 → base.v0.14.3}/opam +2 -2
- binaryen-archive/esy.lock/opam/{dune-build-info.2.9.1 → dune-build-info.2.9.3}/opam +5 -4
- binaryen-archive/esy.lock/opam/{dune-configurator.2.9.1 → dune-configurator.2.9.3}/opam +5 -4
- binaryen-archive/esy.lock/opam/{dune.2.9.1 → dune.2.9.3}/opam +5 -4
- binaryen-archive/esy.lock/opam/either.1.0.0/opam +40 -0
- binaryen-archive/esy.lock/opam/{fix.20211231 → fix.20220121}/opam +3 -3
- binaryen-archive/esy.lock/opam/menhir.20211128/opam +1 -1
- binaryen-archive/esy.lock/opam/{ocaml-lsp-server.1.9.0 → ocaml-lsp-server.1.9.1}/opam +5 -5
- binaryen-archive/esy.lock/opam/{ocamlfind.1.9.1 → ocamlfind.1.9.3}/opam +3 -3
- binaryen-archive/esy.lock/opam/{ocamlformat.0.18.0 → ocamlformat.0.20.1}/opam +14 -15
- binaryen-archive/esy.lock/opam/ocp-indent.1.7.0/opam +57 -0
- binaryen-archive/esy.lock/opam/odoc-parser.1.0.0/opam +46 -0
- binaryen-archive/esy.lock/opam/{ppxlib.0.22.2 → ppxlib.0.24.0}/opam +9 -6
- binaryen-archive/esy.lock/opam/{topkg.1.0.4 → topkg.1.0.5}/opam +3 -3
- binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.9.1_opam_override/files/findlib-1.9.1.patch → opam__s__ocamlfind_opam__c__1.9.3_opam_override/files/findlib.patch} +0 -0
- binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.9.1_opam_override → opam__s__ocamlfind_opam__c__1.9.3_opam_override}/package.json +1 -1
- binaryen-archive/js/binaryen.es5.js +363 -5
- binaryen-archive/js/dune +1 -1
- binaryen-archive/js/export.ml +1 -4
- binaryen-archive/js/expression.ml +161 -0
- binaryen-archive/js/literal.ml +0 -1
- binaryen-archive/js/module.ml +9 -9
- binaryen-archive/js/op.ml +0 -223
- binaryen-archive/js/prelude.js +2 -0
- binaryen-archive/js/table.ml +2 -2
- binaryen-archive/js/type.ml +0 -9
- binaryen-archive/package.json +11 -8
- binaryen-archive/src/binaryen_stubs_exports.c +2 -2
- binaryen-archive/src/binaryen_stubs_expressions.c +250 -0
- binaryen-archive/src/binaryen_stubs_features.c +24 -0
- binaryen-archive/src/binaryen_stubs_modules.c +7 -0
- binaryen-archive/src/binaryen_stubs_tables.c +4 -3
- binaryen-archive/src/dune +1 -2
- binaryen-archive/src/element_segment.ml +0 -1
- binaryen-archive/src/export.ml +2 -4
- binaryen-archive/src/expression.ml +94 -63
- binaryen-archive/src/function.ml +0 -6
- binaryen-archive/src/global.ml +0 -2
- binaryen-archive/src/literal.ml +0 -3
- binaryen-archive/src/module.ml +19 -9
- binaryen-archive/src/settings.ml +0 -6
- binaryen-archive/src/table.ml +2 -2
- binaryen-archive/src/type.ml +0 -1
- binaryen-archive/test/config/ocamlopt_flags.ml +8 -1
- binaryen-archive/test/test.expected +13 -5
- binaryen-archive/test/test.ml +47 -22
- binaryen-archive/virtual/element_segment.mli +0 -4
- binaryen-archive/virtual/export.mli +1 -16
- binaryen-archive/virtual/expression.mli +93 -115
- binaryen-archive/virtual/function.mli +0 -12
- binaryen-archive/virtual/global.mli +0 -8
- binaryen-archive/virtual/import.mli +0 -4
- binaryen-archive/virtual/literal.mli +0 -5
- binaryen-archive/virtual/module.mli +5 -28
- binaryen-archive/virtual/op.mli +0 -315
- binaryen-archive/virtual/settings.mli +0 -17
- binaryen-archive/virtual/table.mli +1 -4
- binaryen-archive/virtual/type.mli +0 -11
- binaryen-archive/esy.lock/opam/ocaml-migrate-parsetree.2.3.0/opam +0 -39
- binaryen-archive/esy.lock/opam/odoc.1.5.3/opam +0 -53
- binaryen-archive/esy.lock/opam/tyxml.4.5.0/opam +0 -42
- binaryen-archive/js/postlude.js +0 -2
|
@@ -1708,3 +1708,253 @@ caml_binaryen_tuple_extract_set_tuple(value _exp, value _value) {
|
|
|
1708
1708
|
BinaryenTupleExtractSetTuple(exp, val);
|
|
1709
1709
|
CAMLreturn(Val_unit);
|
|
1710
1710
|
}
|
|
1711
|
+
|
|
1712
|
+
// Ref operations
|
|
1713
|
+
CAMLprim value
|
|
1714
|
+
caml_binaryen_ref_null(value _module, value _ty) {
|
|
1715
|
+
CAMLparam2(_module, _ty);
|
|
1716
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1717
|
+
BinaryenType ty = BinaryenType_val(_ty);
|
|
1718
|
+
BinaryenExpressionRef exp = BinaryenRefNull(module, ty);
|
|
1719
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
CAMLprim value
|
|
1723
|
+
caml_binaryen_ref_is(value _module, value _op, value _value) {
|
|
1724
|
+
CAMLparam3(_module, _op, _value);
|
|
1725
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1726
|
+
BinaryenOp op = BinaryenOp_val(_op);
|
|
1727
|
+
BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
|
|
1728
|
+
BinaryenExpressionRef exp = BinaryenRefIs(module, op, val);
|
|
1729
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
CAMLprim value
|
|
1733
|
+
caml_binaryen_ref_as(value _module, value _op, value _value) {
|
|
1734
|
+
CAMLparam3(_module, _op, _value);
|
|
1735
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1736
|
+
BinaryenOp op = BinaryenOp_val(_op);
|
|
1737
|
+
BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
|
|
1738
|
+
BinaryenExpressionRef exp = BinaryenRefAs(module, op, val);
|
|
1739
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
CAMLprim value
|
|
1743
|
+
caml_binaryen_ref_func(value _module, value _name, value _ty) {
|
|
1744
|
+
CAMLparam3(_module, _name, _ty);
|
|
1745
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1746
|
+
char* name = Safe_String_val(_name);
|
|
1747
|
+
BinaryenType ty = BinaryenType_val(_ty);
|
|
1748
|
+
BinaryenExpressionRef exp = BinaryenRefFunc(module, name, ty);
|
|
1749
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
CAMLprim value
|
|
1753
|
+
caml_binaryen_ref_eq(value _module, value _left, value _right) {
|
|
1754
|
+
CAMLparam3(_module, _left, _right);
|
|
1755
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1756
|
+
BinaryenExpressionRef left = BinaryenExpressionRef_val(_left);
|
|
1757
|
+
BinaryenExpressionRef right = BinaryenExpressionRef_val(_right);
|
|
1758
|
+
BinaryenExpressionRef exp = BinaryenRefEq(module, left, right);
|
|
1759
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
// Table operations
|
|
1763
|
+
CAMLprim value
|
|
1764
|
+
caml_binaryen_table_get(value _module, value _name, value _index, value _ty) {
|
|
1765
|
+
CAMLparam4(_module, _name, _index, _ty);
|
|
1766
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1767
|
+
char* name = Safe_String_val(_name);
|
|
1768
|
+
BinaryenExpressionRef index = BinaryenExpressionRef_val(_index);
|
|
1769
|
+
BinaryenType ty = BinaryenType_val(_ty);
|
|
1770
|
+
BinaryenExpressionRef exp = BinaryenTableGet(module, name, index, ty);
|
|
1771
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
CAMLprim value
|
|
1775
|
+
caml_binaryen_table_set(value _module, value _name, value _index, value _value) {
|
|
1776
|
+
CAMLparam4(_module, _name, _index, _value);
|
|
1777
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1778
|
+
char* name = Safe_String_val(_name);
|
|
1779
|
+
BinaryenExpressionRef index = BinaryenExpressionRef_val(_index);
|
|
1780
|
+
BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
|
|
1781
|
+
BinaryenExpressionRef exp = BinaryenTableSet(module, name, index, val);
|
|
1782
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
CAMLprim value
|
|
1786
|
+
caml_binaryen_table_size(value _module, value _name) {
|
|
1787
|
+
CAMLparam2(_module, _name);
|
|
1788
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1789
|
+
char* name = Safe_String_val(_name);
|
|
1790
|
+
BinaryenExpressionRef exp = BinaryenTableSize(module, name);
|
|
1791
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
CAMLprim value
|
|
1795
|
+
caml_binaryen_table_grow(value _module, value _name, value _value, value _delta) {
|
|
1796
|
+
CAMLparam4(_module, _name, _value, _delta);
|
|
1797
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1798
|
+
char* name = Safe_String_val(_name);
|
|
1799
|
+
BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
|
|
1800
|
+
BinaryenExpressionRef delta = BinaryenExpressionRef_val(_delta);
|
|
1801
|
+
BinaryenExpressionRef exp = BinaryenTableGrow(module, name, val, delta);
|
|
1802
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
// TableGet operations
|
|
1806
|
+
CAMLprim value
|
|
1807
|
+
caml_binaryen_tableget_get_table(value _exp) {
|
|
1808
|
+
CAMLparam1(_exp);
|
|
1809
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1810
|
+
const char* name = BinaryenTableGetGetTable(exp);
|
|
1811
|
+
CAMLreturn(caml_copy_string(name));
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
CAMLprim value
|
|
1815
|
+
caml_binaryen_tableget_set_table(value _exp, value _table) {
|
|
1816
|
+
CAMLparam2(_exp, _table);
|
|
1817
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1818
|
+
char* table = Safe_String_val(_table);
|
|
1819
|
+
BinaryenTableGetSetTable(exp, table);
|
|
1820
|
+
CAMLreturn(Val_unit);
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
CAMLprim value
|
|
1824
|
+
caml_binaryen_tableget_get_index(value _exp) {
|
|
1825
|
+
CAMLparam1(_exp);
|
|
1826
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1827
|
+
BinaryenExpressionRef index = BinaryenTableGetGetIndex(exp);
|
|
1828
|
+
CAMLreturn(alloc_BinaryenExpressionRef(index));
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
CAMLprim value
|
|
1832
|
+
caml_binaryen_tableget_set_index(value _exp, value _index) {
|
|
1833
|
+
CAMLparam2(_exp, _index);
|
|
1834
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1835
|
+
BinaryenExpressionRef index = BinaryenExpressionRef_val(_index);
|
|
1836
|
+
BinaryenTableGetSetIndex(exp, index);
|
|
1837
|
+
CAMLreturn(Val_unit);
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
// TableSet operations
|
|
1841
|
+
CAMLprim value
|
|
1842
|
+
caml_binaryen_tableset_get_table(value _exp) {
|
|
1843
|
+
CAMLparam1(_exp);
|
|
1844
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1845
|
+
const char* name = BinaryenTableSetGetTable(exp);
|
|
1846
|
+
CAMLreturn(caml_copy_string(name));
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
CAMLprim value
|
|
1850
|
+
caml_binaryen_tableset_set_table(value _exp, value _table) {
|
|
1851
|
+
CAMLparam2(_exp, _table);
|
|
1852
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1853
|
+
char* table = Safe_String_val(_table);
|
|
1854
|
+
BinaryenTableSetSetTable(exp, table);
|
|
1855
|
+
CAMLreturn(Val_unit);
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
CAMLprim value
|
|
1859
|
+
caml_binaryen_tableset_get_index(value _exp) {
|
|
1860
|
+
CAMLparam1(_exp);
|
|
1861
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1862
|
+
BinaryenExpressionRef index = BinaryenTableSetGetIndex(exp);
|
|
1863
|
+
CAMLreturn(alloc_BinaryenExpressionRef(index));
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
CAMLprim value
|
|
1867
|
+
caml_binaryen_tableset_set_index(value _exp, value _index) {
|
|
1868
|
+
CAMLparam2(_exp, _index);
|
|
1869
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1870
|
+
BinaryenExpressionRef index = BinaryenExpressionRef_val(_index);
|
|
1871
|
+
BinaryenTableSetSetIndex(exp, index);
|
|
1872
|
+
CAMLreturn(Val_unit);
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
CAMLprim value
|
|
1876
|
+
caml_binaryen_tableset_get_value(value _exp) {
|
|
1877
|
+
CAMLparam1(_exp);
|
|
1878
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1879
|
+
BinaryenExpressionRef val = BinaryenTableSetGetValue(exp);
|
|
1880
|
+
CAMLreturn(alloc_BinaryenExpressionRef(val));
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
CAMLprim value
|
|
1884
|
+
caml_binaryen_tableset_set_value(value _exp, value _value) {
|
|
1885
|
+
CAMLparam2(_exp, _value);
|
|
1886
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1887
|
+
BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
|
|
1888
|
+
BinaryenTableSetSetValue(exp, val);
|
|
1889
|
+
CAMLreturn(Val_unit);
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
// TableSize operations
|
|
1893
|
+
CAMLprim value
|
|
1894
|
+
caml_binaryen_tablesize_get_table(value _exp) {
|
|
1895
|
+
CAMLparam1(_exp);
|
|
1896
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1897
|
+
const char* name = BinaryenTableSizeGetTable(exp);
|
|
1898
|
+
CAMLreturn(caml_copy_string(name));
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
CAMLprim value
|
|
1902
|
+
caml_binaryen_tablesize_set_table(value _exp, value _table) {
|
|
1903
|
+
CAMLparam2(_exp, _table);
|
|
1904
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1905
|
+
char* table = Safe_String_val(_table);
|
|
1906
|
+
BinaryenTableSizeSetTable(exp, table);
|
|
1907
|
+
CAMLreturn(Val_unit);
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
// TableGrow operations
|
|
1911
|
+
CAMLprim value
|
|
1912
|
+
caml_binaryen_tablegrow_get_table(value _exp) {
|
|
1913
|
+
CAMLparam1(_exp);
|
|
1914
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1915
|
+
const char* name = BinaryenTableGrowGetTable(exp);
|
|
1916
|
+
CAMLreturn(caml_copy_string(name));
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
CAMLprim value
|
|
1920
|
+
caml_binaryen_tablegrow_set_table(value _exp, value _table) {
|
|
1921
|
+
CAMLparam2(_exp, _table);
|
|
1922
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1923
|
+
char* table = Safe_String_val(_table);
|
|
1924
|
+
BinaryenTableGrowSetTable(exp, table);
|
|
1925
|
+
CAMLreturn(Val_unit);
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
CAMLprim value
|
|
1929
|
+
caml_binaryen_tablegrow_get_value(value _exp) {
|
|
1930
|
+
CAMLparam1(_exp);
|
|
1931
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1932
|
+
BinaryenExpressionRef val = BinaryenTableGrowGetValue(exp);
|
|
1933
|
+
CAMLreturn(alloc_BinaryenExpressionRef(val));
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
CAMLprim value
|
|
1937
|
+
caml_binaryen_tablegrow_set_value(value _exp, value _value) {
|
|
1938
|
+
CAMLparam2(_exp, _value);
|
|
1939
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1940
|
+
BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
|
|
1941
|
+
BinaryenTableGrowSetValue(exp, val);
|
|
1942
|
+
CAMLreturn(Val_unit);
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
CAMLprim value
|
|
1946
|
+
caml_binaryen_tablegrow_get_delta(value _exp) {
|
|
1947
|
+
CAMLparam1(_exp);
|
|
1948
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1949
|
+
BinaryenExpressionRef delta = BinaryenTableGrowGetDelta(exp);
|
|
1950
|
+
CAMLreturn(alloc_BinaryenExpressionRef(delta));
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
CAMLprim value
|
|
1954
|
+
caml_binaryen_tablegrow_set_delta(value _exp, value _delta) {
|
|
1955
|
+
CAMLparam2(_exp, _delta);
|
|
1956
|
+
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1957
|
+
BinaryenExpressionRef delta = BinaryenExpressionRef_val(_delta);
|
|
1958
|
+
BinaryenTableGrowSetDelta(exp, delta);
|
|
1959
|
+
CAMLreturn(Val_unit);
|
|
1960
|
+
}
|
|
@@ -89,6 +89,30 @@ caml_binaryen_feature_multivalue(value unit) {
|
|
|
89
89
|
CAMLreturn(Val_int(BinaryenFeatureMultivalue()));
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
CAMLprim value
|
|
93
|
+
caml_binaryen_feature_gc(value unit) {
|
|
94
|
+
CAMLparam1(unit);
|
|
95
|
+
CAMLreturn(Val_int(BinaryenFeatureGC()));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
CAMLprim value
|
|
99
|
+
caml_binaryen_feature_memory64(value unit) {
|
|
100
|
+
CAMLparam1(unit);
|
|
101
|
+
CAMLreturn(Val_int(BinaryenFeatureMemory64()));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
CAMLprim value
|
|
105
|
+
caml_binaryen_feature_typed_function_references(value unit) {
|
|
106
|
+
CAMLparam1(unit);
|
|
107
|
+
CAMLreturn(Val_int(BinaryenFeatureTypedFunctionReferences()));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
CAMLprim value
|
|
111
|
+
caml_binaryen_feature_relaxed_simd(value unit) {
|
|
112
|
+
CAMLparam1(unit);
|
|
113
|
+
CAMLreturn(Val_int(BinaryenFeatureRelaxedSIMD()));
|
|
114
|
+
}
|
|
115
|
+
|
|
92
116
|
CAMLprim value
|
|
93
117
|
caml_binaryen_feature_all(value unit) {
|
|
94
118
|
CAMLparam1(unit);
|
|
@@ -172,3 +172,10 @@ caml_binaryen_add_custom_section(value _module, value _name, value _contents) {
|
|
|
172
172
|
BinaryenAddCustomSection(module, name, contents, contentsLen);
|
|
173
173
|
CAMLreturn(Val_unit);
|
|
174
174
|
}
|
|
175
|
+
|
|
176
|
+
CAMLprim value
|
|
177
|
+
caml_binaryen_module_update_maps(value module) {
|
|
178
|
+
CAMLparam1(module);
|
|
179
|
+
BinaryenModuleUpdateMaps(BinaryenModuleRef_val(module));
|
|
180
|
+
CAMLreturn(Val_unit);
|
|
181
|
+
}
|
|
@@ -33,13 +33,14 @@ static value alloc_BinaryenExpressionRef(BinaryenExpressionRef exp)
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
CAMLprim value
|
|
36
|
-
caml_binaryen_add_table(value _module, value _table, value _initial, value _maximum) {
|
|
37
|
-
|
|
36
|
+
caml_binaryen_add_table(value _module, value _table, value _initial, value _maximum, value _tableType) {
|
|
37
|
+
CAMLparam5(_module, _table, _initial, _maximum, _tableType);
|
|
38
38
|
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
39
39
|
char* table = Safe_String_val(_table);
|
|
40
40
|
BinaryenIndex initial = Int_val(_initial);
|
|
41
41
|
BinaryenIndex maximum = Int_val(_maximum);
|
|
42
|
-
|
|
42
|
+
BinaryenType tableType = BinaryenType_val(_tableType);
|
|
43
|
+
CAMLreturn(alloc_BinaryenTableRef(BinaryenAddTable(module, table, initial, maximum, tableType)));
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
CAMLprim value
|
binaryen-archive/src/dune
CHANGED
|
@@ -10,5 +10,4 @@
|
|
|
10
10
|
binaryen_stubs_imports binaryen_stubs_exports binaryen_stubs_globals
|
|
11
11
|
binaryen_stubs_tables binaryen_stubs_memory binaryen_stubs_features
|
|
12
12
|
binaryen_stubs_modules binaryen_stubs_settings ocaml_helpers)
|
|
13
|
-
(flags :standard -O2 -Wall -Wextra))
|
|
14
|
-
(c_library_flags :standard -lstdc++ -lpthread))
|
|
13
|
+
(flags :standard -O2 -Wall -Wextra)))
|
binaryen-archive/src/export.ml
CHANGED
|
@@ -28,9 +28,7 @@ external get_export_by_index : Module.t -> int -> t
|
|
|
28
28
|
= "caml_binaryen_get_export_by_index"
|
|
29
29
|
|
|
30
30
|
external get_name : t -> string = "caml_binaryen_export_get_name"
|
|
31
|
-
|
|
32
31
|
external get_value : t -> string = "caml_binaryen_export_get_value"
|
|
33
|
-
|
|
34
32
|
external external_function : unit -> int = "caml_binaryen_external_function"
|
|
35
33
|
|
|
36
34
|
let external_function = external_function ()
|
|
@@ -47,8 +45,8 @@ external external_global : unit -> int = "caml_binaryen_external_global"
|
|
|
47
45
|
|
|
48
46
|
let external_global = external_global ()
|
|
49
47
|
|
|
50
|
-
external
|
|
48
|
+
external external_tag : unit -> int = "caml_binaryen_external_tag"
|
|
51
49
|
|
|
52
|
-
let
|
|
50
|
+
let external_tag = external_tag ()
|
|
53
51
|
|
|
54
52
|
external export_get_kind : t -> int = "caml_binaryen_export_get_kind"
|