@@ -575,13 +575,13 @@ function caml_binaryen_ref_cast(wasm_mod, ref, typ) {
575575function caml_binaryen_br_on ( wasm_mod , op , name , ref , typ ) {
576576 switch ( op ) {
577577 case Binaryen . BrOnNull :
578- return wasm_mod . br_on . null ( caml_jsstring_of_string ( name ) , ref , typ ) ;
578+ return wasm_mod . br_on_null ( caml_jsstring_of_string ( name ) , ref ) ;
579579 case Binaryen . BrOnNonNull :
580- return wasm_mod . br_on . non_null ( caml_jsstring_of_string ( name ) , ref , typ ) ;
580+ return wasm_mod . br_on_non_null ( caml_jsstring_of_string ( name ) , ref ) ;
581581 case Binaryen . BrOnCast :
582- return wasm_mod . br_on . cast ( caml_jsstring_of_string ( name ) , ref , typ ) ;
582+ return wasm_mod . br_on_cast ( caml_jsstring_of_string ( name ) , ref , typ ) ;
583583 case Binaryen . BrOnCastFail :
584- return wasm_mod . br_on . cast_fail ( caml_jsstring_of_string ( name ) , ref , typ ) ;
584+ return wasm_mod . br_on_cast_fail ( caml_jsstring_of_string ( name ) , ref , typ ) ;
585585 }
586586}
587587
@@ -1821,11 +1821,7 @@ function caml_binaryen_struct_new(wasm_mod, operands, type) {
18211821//Provides: caml_binaryen_struct_get
18221822//Requires: caml_js_from_bool
18231823function caml_binaryen_struct_get ( wasm_mod , index , ref , type , signed ) {
1824- if ( caml_js_from_bool ( signed ) ) {
1825- return wasm_mod . struct . get_s ( index , ref , type ) ;
1826- } else {
1827- return wasm_mod . struct . get_u ( index , ref , type ) ;
1828- }
1824+ return wasm_mod . struct . get ( index , ref , type , caml_js_from_bool ( signed ) ) ;
18291825}
18301826
18311827//Provides: caml_binaryen_struct_set
@@ -1851,6 +1847,17 @@ function caml_binaryen_array_new_data(wasm_mod, type, name, offset, size) {
18511847 ) ;
18521848}
18531849
1850+ //Provides: caml_binaryen_array_new_elem
1851+ //Requires: caml_jsstring_of_string
1852+ function caml_binaryen_array_new_elem ( wasm_mod , type , name , offset , size ) {
1853+ return wasm_mod . array . new_elem (
1854+ type ,
1855+ caml_jsstring_of_string ( name ) ,
1856+ offset ,
1857+ size
1858+ ) ;
1859+ }
1860+
18541861//Provides: caml_binaryen_array_new_fixed
18551862//Requires: caml_list_to_js_array
18561863function caml_binaryen_array_new_fixed ( wasm_mod , type , values ) {
@@ -1860,11 +1867,7 @@ function caml_binaryen_array_new_fixed(wasm_mod, type, values) {
18601867//Provides: caml_binaryen_array_get
18611868//Requires: caml_js_from_bool
18621869function caml_binaryen_array_get ( wasm_mod , ref , index , type , signed ) {
1863- if ( caml_js_from_bool ( signed ) ) {
1864- return wasm_mod . array . get_s ( ref , index , type ) ;
1865- } else {
1866- return wasm_mod . array . get_u ( ref , index , type ) ;
1867- }
1870+ return wasm_mod . array . get ( ref , index , type , caml_js_from_bool ( signed ) ) ;
18681871}
18691872
18701873//Provides: caml_binaryen_array_set
@@ -1877,6 +1880,11 @@ function caml_binaryen_array_len(wasm_mod, ref) {
18771880 return wasm_mod . array . len ( ref ) ;
18781881}
18791882
1883+ //Provides: caml_binaryen_array_fill
1884+ function caml_binaryen_array_fill ( wasm_mod , ref , index , value , size ) {
1885+ return wasm_mod . array . fill ( ref , index , value , size ) ;
1886+ }
1887+
18801888//Provides: caml_binaryen_array_copy
18811889function caml_binaryen_array_copy (
18821890 wasm_mod ,
0 commit comments