Skip to content

Commit f39c456

Browse files
authored
chore: Use js api over _Binaryen api for types (#262)
This just fixes some small todo's by using the js api where possible
1 parent 05a4fff commit f39c456

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/type.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function caml_binaryen_type_structref() {
6767
//Provides: caml_binaryen_type_arrayref
6868
//Requires: Binaryen
6969
function caml_binaryen_type_arrayref() {
70-
// TODO: Binaryen v111 didn't expose this directly
70+
// TODO: Binaryen v125 doesn't expose this directly
7171
return Binaryen._BinaryenTypeArrayref();
7272
}
7373

@@ -80,22 +80,19 @@ function caml_binaryen_type_stringref() {
8080
//Provides: caml_binaryen_type_nullref
8181
//Requires: Binaryen
8282
function caml_binaryen_type_nullref() {
83-
// TODO: Binaryen v111 didn't expose this directly
84-
return Binaryen._BinaryenTypeNullref();
83+
return Binaryen.nullref;
8584
}
8685

8786
//Provides: caml_binaryen_type_null_externref
8887
//Requires: Binaryen
8988
function caml_binaryen_type_null_externref() {
90-
// TODO: Binaryen v111 didn't expose this directly
91-
return Binaryen._BinaryenTypeNullExternref();
89+
return Binaryen.nullexternref;
9290
}
9391

9492
//Provides: caml_binaryen_type_null_funcref
9593
//Requires: Binaryen
9694
function caml_binaryen_type_null_funcref() {
97-
// TODO: Binaryen v111 didn't expose this directly
98-
return Binaryen._BinaryenTypeNullFuncref();
95+
return Binaryen.nullfuncref;
9996
}
10097

10198
//Provides: caml_binaryen_type_unreachable

0 commit comments

Comments
 (0)