|
77 | 77 | (func $ta_blit_to_bytes |
78 | 78 | (param (ref extern)) (param i32) (param (ref $bytes)) (param i32) |
79 | 79 | (param i32))) |
80 | | - (import "fail" "caml_bound_error" (func $caml_bound_error (result (ref eq)))) |
| 80 | + (import "fail" "caml_bound_error" (func $caml_bound_error)) |
81 | 81 | (import "fail" "caml_raise_out_of_memory" (func $caml_raise_out_of_memory)) |
82 | 82 | (import "fail" "caml_invalid_argument" |
83 | 83 | (func $caml_invalid_argument (param (ref eq)))) |
|
1062 | 1062 | (if (i32.ge_u (local.get $i) |
1063 | 1063 | (array.get $int_array (struct.get $bigarray 2 (local.get $ba)) |
1064 | 1064 | (i32.const 0))) |
1065 | | - (then (return_call $caml_bound_error))) |
| 1065 | + (then (call $caml_bound_error))) |
1066 | 1066 | (return_call $caml_ba_get_at_offset (local.get $ba) (local.get $i))) |
1067 | 1067 |
|
1068 | 1068 | (func (export "caml_ba_set_1") |
|
1076 | 1076 | (if (i32.ge_u (local.get $i) |
1077 | 1077 | (array.get $int_array (struct.get $bigarray $ba_dim (local.get $ba)) |
1078 | 1078 | (i32.const 0))) |
1079 | | - (then (return_call $caml_bound_error))) |
| 1079 | + (then (call $caml_bound_error))) |
1080 | 1080 | (call $caml_ba_set_at_offset |
1081 | 1081 | (local.get $ba) (local.get $i) (local.get $v)) |
1082 | 1082 | (ref.i31 (i32.const 0))) |
|
1114 | 1114 | (i32.ge_u (local.get $j) |
1115 | 1115 | (array.get $int_array (local.get $dim) (i32.const 1)))) |
1116 | 1116 | (then |
1117 | | - (return_call $caml_bound_error))) |
| 1117 | + (call $caml_bound_error))) |
1118 | 1118 | (return_call $caml_ba_get_at_offset (local.get $ba) (local.get $offset))) |
1119 | 1119 |
|
1120 | 1120 | (func (export "caml_ba_set_2") |
|
1150 | 1150 | (i32.ge_u (local.get $j) |
1151 | 1151 | (array.get $int_array (local.get $dim) (i32.const 1)))) |
1152 | 1152 | (then |
1153 | | - (return_call $caml_bound_error))) |
| 1153 | + (call $caml_bound_error))) |
1154 | 1154 | (call $caml_ba_set_at_offset |
1155 | 1155 | (local.get $ba) (local.get $offset) (local.get $v)) |
1156 | 1156 | (ref.i31 (i32.const 0))) |
|
1208 | 1208 | (i32.ge_u (local.get $k) |
1209 | 1209 | (array.get $int_array (local.get $dim) (i32.const 2))))) |
1210 | 1210 | (then |
1211 | | - (return_call $caml_bound_error))) |
| 1211 | + (call $caml_bound_error))) |
1212 | 1212 | (return_call $caml_ba_get_at_offset (local.get $ba) (local.get $offset))) |
1213 | 1213 |
|
1214 | 1214 | (func (export "caml_ba_set_3") |
|
1261 | 1261 | (i32.ge_u (local.get $k) |
1262 | 1262 | (array.get $int_array (local.get $dim) (i32.const 2))))) |
1263 | 1263 | (then |
1264 | | - (return_call $caml_bound_error))) |
| 1264 | + (call $caml_bound_error))) |
1265 | 1265 | (call $caml_ba_set_at_offset |
1266 | 1266 | (local.get $ba) (local.get $offset) (local.get $v)) |
1267 | 1267 | (ref.i31 (i32.const 0))) |
|
1292 | 1292 | (array.get $int_array (local.get $dim) (local.get $i))) |
1293 | 1293 | (if (i32.ge_u (local.get $idx) (local.get $l)) |
1294 | 1294 | (then |
1295 | | - (drop (call $caml_bound_error)))) |
| 1295 | + (call $caml_bound_error))) |
1296 | 1296 | (local.set $offset |
1297 | 1297 | (i32.add (i32.mul (local.get $offset) (local.get $l)) |
1298 | 1298 | (local.get $idx))) |
|
1310 | 1310 | (array.get $int_array (local.get $dim) (local.get $i))) |
1311 | 1311 | (if (i32.ge_u (local.get $idx) (local.get $l)) |
1312 | 1312 | (then |
1313 | | - (drop (call $caml_bound_error)))) |
| 1313 | + (call $caml_bound_error))) |
1314 | 1314 | (local.set $offset |
1315 | 1315 | (i32.add (i32.mul (local.get $offset) (local.get $l)) |
1316 | 1316 | (local.get $idx))) |
|
1343 | 1343 | (array.get $int_array (local.get $dim) (local.get $i))) |
1344 | 1344 | (if (i32.ge_u (local.get $idx) (local.get $l)) |
1345 | 1345 | (then |
1346 | | - (drop (call $caml_bound_error)))) |
| 1346 | + (call $caml_bound_error))) |
1347 | 1347 | (local.set $offset |
1348 | 1348 | (i32.add (i32.mul (local.get $offset) (local.get $l)) |
1349 | 1349 | (local.get $idx))) |
|
1364 | 1364 | (array.get $int_array (local.get $dim) (local.get $i))) |
1365 | 1365 | (if (i32.ge_u (local.get $idx) (local.get $l)) |
1366 | 1366 | (then |
1367 | | - (drop (call $caml_bound_error)))) |
| 1367 | + (call $caml_bound_error))) |
1368 | 1368 | (local.set $offset |
1369 | 1369 | (i32.add (i32.mul (local.get $offset) (local.get $l)) |
1370 | 1370 | (local.get $idx))) |
|
2011 | 2011 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) |
2012 | 2012 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) |
2013 | 2013 | (if (i32.lt_s (local.get $p) (i32.const 0)) |
2014 | | - (then (return_call $caml_bound_error))) |
| 2014 | + (then (call $caml_bound_error))) |
2015 | 2015 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) |
2016 | 2016 | (array.get $int_array |
2017 | 2017 | (struct.get $bigarray $ba_dim (local.get $ba)) |
2018 | 2018 | (i32.const 0))) |
2019 | | - (then (drop (call $caml_bound_error)))) |
| 2019 | + (then (call $caml_bound_error))) |
2020 | 2020 | (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $p)))) |
2021 | 2021 |
|
2022 | 2022 | (func (export "caml_ba_uint8_get32") |
|
2028 | 2028 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) |
2029 | 2029 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) |
2030 | 2030 | (if (i32.lt_s (local.get $p) (i32.const 0)) |
2031 | | - (then (drop (call $caml_bound_error)))) |
| 2031 | + (then (call $caml_bound_error))) |
2032 | 2032 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) |
2033 | 2033 | (array.get $int_array |
2034 | 2034 | (struct.get $bigarray $ba_dim (local.get $ba)) |
2035 | 2035 | (i32.const 0))) |
2036 | | - (then (drop (call $caml_bound_error)))) |
| 2036 | + (then (call $caml_bound_error))) |
2037 | 2037 | (return_call $ta_get32_ui8 (local.get $data) (local.get $p))) |
2038 | 2038 |
|
2039 | 2039 | (func (export "caml_ba_uint8_get64") |
|
2045 | 2045 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) |
2046 | 2046 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) |
2047 | 2047 | (if (i32.lt_s (local.get $p) (i32.const 0)) |
2048 | | - (then (drop (call $caml_bound_error)))) |
| 2048 | + (then (call $caml_bound_error))) |
2049 | 2049 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) |
2050 | 2050 | (array.get $int_array |
2051 | 2051 | (struct.get $bigarray $ba_dim (local.get $ba)) |
2052 | 2052 | (i32.const 0))) |
2053 | | - (then (drop (call $caml_bound_error)))) |
| 2053 | + (then (call $caml_bound_error))) |
2054 | 2054 | (i64.or |
2055 | 2055 | (i64.extend_i32_u |
2056 | 2056 | (call $ta_get32_ui8 (local.get $data) (local.get $p))) |
|
2070 | 2070 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) |
2071 | 2071 | (local.set $d (ref.cast (ref i31) (local.get $v))) |
2072 | 2072 | (if (i32.lt_s (local.get $p) (i32.const 0)) |
2073 | | - (then (return_call $caml_bound_error))) |
| 2073 | + (then (call $caml_bound_error))) |
2074 | 2074 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 1)) |
2075 | 2075 | (array.get $int_array |
2076 | 2076 | (struct.get $bigarray $ba_dim (local.get $ba)) |
2077 | 2077 | (i32.const 0))) |
2078 | | - (then (return_call $caml_bound_error))) |
| 2078 | + (then (call $caml_bound_error))) |
2079 | 2079 | (call $ta_set16_ui8 (local.get $data) (local.get $p) (local.get $d)) |
2080 | 2080 | (ref.i31 (i32.const 0))) |
2081 | 2081 |
|
|
2089 | 2089 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) |
2090 | 2090 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) |
2091 | 2091 | (if (i32.lt_s (local.get $p) (i32.const 0)) |
2092 | | - (then (return_call $caml_bound_error))) |
| 2092 | + (then (call $caml_bound_error))) |
2093 | 2093 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 3)) |
2094 | 2094 | (array.get $int_array |
2095 | 2095 | (struct.get $bigarray $ba_dim (local.get $ba)) |
2096 | 2096 | (i32.const 0))) |
2097 | | - (then (return_call $caml_bound_error))) |
| 2097 | + (then (call $caml_bound_error))) |
2098 | 2098 | (call $ta_set32_ui8 (local.get $data) (local.get $p) (local.get $d)) |
2099 | 2099 | (ref.i31 (i32.const 0))) |
2100 | 2100 |
|
|
2108 | 2108 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba))) |
2109 | 2109 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i)))) |
2110 | 2110 | (if (i32.lt_s (local.get $p) (i32.const 0)) |
2111 | | - (then (return_call $caml_bound_error))) |
| 2111 | + (then (call $caml_bound_error))) |
2112 | 2112 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 7)) |
2113 | 2113 | (array.get $int_array |
2114 | 2114 | (struct.get $bigarray $ba_dim (local.get $ba)) |
2115 | 2115 | (i32.const 0))) |
2116 | | - (then (return_call $caml_bound_error))) |
| 2116 | + (then (call $caml_bound_error))) |
2117 | 2117 | (call $ta_set32_ui8 (local.get $data) (local.get $p) |
2118 | 2118 | (i32.wrap_i64 (local.get $d))) |
2119 | 2119 | (call $ta_set32_ui8 (local.get $data) |
|
0 commit comments