|
61 | 61 | (import "bindings" "ta_subarray"
|
62 | 62 | (func $ta_subarray
|
63 | 63 | (param (ref extern)) (param i32) (param i32) (result (ref extern))))
|
64 |
| - (import "fail" "caml_bound_error" (func $caml_bound_error (result (ref eq)))) |
| 64 | + (import "fail" "caml_bound_error" (func $caml_bound_error)) |
65 | 65 | (import "fail" "caml_raise_out_of_memory" (func $caml_raise_out_of_memory))
|
66 | 66 | (import "fail" "caml_invalid_argument"
|
67 | 67 | (func $caml_invalid_argument (param (ref eq))))
|
|
970 | 970 | (if (i32.ge_u (local.get $i)
|
971 | 971 | (array.get $int_array (struct.get $bigarray 2 (local.get $ba))
|
972 | 972 | (i32.const 0)))
|
973 |
| - (then (return_call $caml_bound_error))) |
| 973 | + (then (call $caml_bound_error))) |
974 | 974 | (return_call $caml_ba_get_at_offset (local.get $ba) (local.get $i)))
|
975 | 975 |
|
976 | 976 | (func (export "caml_ba_set_1")
|
|
984 | 984 | (if (i32.ge_u (local.get $i)
|
985 | 985 | (array.get $int_array (struct.get $bigarray $ba_dim (local.get $ba))
|
986 | 986 | (i32.const 0)))
|
987 |
| - (then (return_call $caml_bound_error))) |
| 987 | + (then (call $caml_bound_error))) |
988 | 988 | (call $caml_ba_set_at_offset
|
989 | 989 | (local.get $ba) (local.get $i) (local.get $v))
|
990 | 990 | (ref.i31 (i32.const 0)))
|
|
1022 | 1022 | (i32.ge_u (local.get $j)
|
1023 | 1023 | (array.get $int_array (local.get $dim) (i32.const 1))))
|
1024 | 1024 | (then
|
1025 |
| - (return_call $caml_bound_error))) |
| 1025 | + (call $caml_bound_error))) |
1026 | 1026 | (return_call $caml_ba_get_at_offset (local.get $ba) (local.get $offset)))
|
1027 | 1027 |
|
1028 | 1028 | (func (export "caml_ba_set_2")
|
|
1058 | 1058 | (i32.ge_u (local.get $j)
|
1059 | 1059 | (array.get $int_array (local.get $dim) (i32.const 1))))
|
1060 | 1060 | (then
|
1061 |
| - (return_call $caml_bound_error))) |
| 1061 | + (call $caml_bound_error))) |
1062 | 1062 | (call $caml_ba_set_at_offset
|
1063 | 1063 | (local.get $ba) (local.get $offset) (local.get $v))
|
1064 | 1064 | (ref.i31 (i32.const 0)))
|
|
1116 | 1116 | (i32.ge_u (local.get $j)
|
1117 | 1117 | (array.get $int_array (local.get $dim) (i32.const 2)))))
|
1118 | 1118 | (then
|
1119 |
| - (return_call $caml_bound_error))) |
| 1119 | + (call $caml_bound_error))) |
1120 | 1120 | (return_call $caml_ba_get_at_offset (local.get $ba) (local.get $offset)))
|
1121 | 1121 |
|
1122 | 1122 | (func (export "caml_ba_set_3")
|
|
1169 | 1169 | (i32.ge_u (local.get $k)
|
1170 | 1170 | (array.get $int_array (local.get $dim) (i32.const 2)))))
|
1171 | 1171 | (then
|
1172 |
| - (return_call $caml_bound_error))) |
| 1172 | + (call $caml_bound_error))) |
1173 | 1173 | (call $caml_ba_set_at_offset
|
1174 | 1174 | (local.get $ba) (local.get $offset) (local.get $v))
|
1175 | 1175 | (ref.i31 (i32.const 0)))
|
|
1200 | 1200 | (array.get $int_array (local.get $dim) (local.get $i)))
|
1201 | 1201 | (if (i32.ge_u (local.get $idx) (local.get $l))
|
1202 | 1202 | (then
|
1203 |
| - (drop (call $caml_bound_error)))) |
| 1203 | + (call $caml_bound_error))) |
1204 | 1204 | (local.set $offset
|
1205 | 1205 | (i32.add (i32.mul (local.get $offset) (local.get $l))
|
1206 | 1206 | (local.get $idx)))
|
|
1218 | 1218 | (array.get $int_array (local.get $dim) (local.get $i)))
|
1219 | 1219 | (if (i32.ge_u (local.get $idx) (local.get $l))
|
1220 | 1220 | (then
|
1221 |
| - (drop (call $caml_bound_error)))) |
| 1221 | + (call $caml_bound_error))) |
1222 | 1222 | (local.set $offset
|
1223 | 1223 | (i32.add (i32.mul (local.get $offset) (local.get $l))
|
1224 | 1224 | (local.get $idx)))
|
|
1251 | 1251 | (array.get $int_array (local.get $dim) (local.get $i)))
|
1252 | 1252 | (if (i32.ge_u (local.get $idx) (local.get $l))
|
1253 | 1253 | (then
|
1254 |
| - (drop (call $caml_bound_error)))) |
| 1254 | + (call $caml_bound_error))) |
1255 | 1255 | (local.set $offset
|
1256 | 1256 | (i32.add (i32.mul (local.get $offset) (local.get $l))
|
1257 | 1257 | (local.get $idx)))
|
|
1272 | 1272 | (array.get $int_array (local.get $dim) (local.get $i)))
|
1273 | 1273 | (if (i32.ge_u (local.get $idx) (local.get $l))
|
1274 | 1274 | (then
|
1275 |
| - (drop (call $caml_bound_error)))) |
| 1275 | + (call $caml_bound_error))) |
1276 | 1276 | (local.set $offset
|
1277 | 1277 | (i32.add (i32.mul (local.get $offset) (local.get $l))
|
1278 | 1278 | (local.get $idx)))
|
|
1906 | 1906 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba)))
|
1907 | 1907 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
1908 | 1908 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
1909 |
| - (then (return_call $caml_bound_error))) |
| 1909 | + (then (call $caml_bound_error))) |
1910 | 1910 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 1))
|
1911 | 1911 | (array.get $int_array
|
1912 | 1912 | (struct.get $bigarray $ba_dim (local.get $ba))
|
1913 | 1913 | (i32.const 0)))
|
1914 |
| - (then (return_call $caml_bound_error))) |
| 1914 | + (then (call $caml_bound_error))) |
1915 | 1915 | (ref.i31 (i32.or
|
1916 | 1916 | (call $ta_get_ui8 (local.get $data) (local.get $p))
|
1917 | 1917 | (i32.shl (call $ta_get_ui8 (local.get $data)
|
|
1927 | 1927 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba)))
|
1928 | 1928 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
1929 | 1929 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
1930 |
| - (then (return_call $caml_bound_error))) |
| 1930 | + (then (call $caml_bound_error))) |
1931 | 1931 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 3))
|
1932 | 1932 | (array.get $int_array
|
1933 | 1933 | (struct.get $bigarray $ba_dim (local.get $ba))
|
1934 | 1934 | (i32.const 0)))
|
1935 |
| - (then (return_call $caml_bound_error))) |
| 1935 | + (then (call $caml_bound_error))) |
1936 | 1936 | (return_call $caml_copy_int32
|
1937 | 1937 | (i32.or
|
1938 | 1938 | (i32.or
|
|
1957 | 1957 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba)))
|
1958 | 1958 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
1959 | 1959 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
1960 |
| - (then (return_call $caml_bound_error))) |
| 1960 | + (then (call $caml_bound_error))) |
1961 | 1961 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 7))
|
1962 | 1962 | (array.get $int_array
|
1963 | 1963 | (struct.get $bigarray $ba_dim (local.get $ba))
|
1964 | 1964 | (i32.const 0)))
|
1965 |
| - (then (return_call $caml_bound_error))) |
| 1965 | + (then (call $caml_bound_error))) |
1966 | 1966 | (return_call $caml_copy_int64
|
1967 | 1967 | (i64.or
|
1968 | 1968 | (i64.or
|
|
2013 | 2013 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
2014 | 2014 | (local.set $d (ref.cast (ref i31) (local.get $v)))
|
2015 | 2015 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
2016 |
| - (then (return_call $caml_bound_error))) |
| 2016 | + (then (call $caml_bound_error))) |
2017 | 2017 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 1))
|
2018 | 2018 | (array.get $int_array
|
2019 | 2019 | (struct.get $bigarray $ba_dim (local.get $ba))
|
2020 | 2020 | (i32.const 0)))
|
2021 |
| - (then (return_call $caml_bound_error))) |
| 2021 | + (then (call $caml_bound_error))) |
2022 | 2022 | (call $ta_set_ui8 (local.get $data) (local.get $p) (local.get $d))
|
2023 | 2023 | (call $ta_set_ui8 (local.get $data)
|
2024 | 2024 | (i32.add (local.get $p) (i32.const 1))
|
|
2036 | 2036 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
2037 | 2037 | (local.set $d (call $Int32_val (local.get $v)))
|
2038 | 2038 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
2039 |
| - (then (return_call $caml_bound_error))) |
| 2039 | + (then (call $caml_bound_error))) |
2040 | 2040 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 3))
|
2041 | 2041 | (array.get $int_array
|
2042 | 2042 | (struct.get $bigarray $ba_dim (local.get $ba))
|
2043 | 2043 | (i32.const 0)))
|
2044 |
| - (then (return_call $caml_bound_error))) |
| 2044 | + (then (call $caml_bound_error))) |
2045 | 2045 | (call $ta_set_ui8 (local.get $data) (local.get $p)
|
2046 | 2046 | (ref.i31 (local.get $d)))
|
2047 | 2047 | (call $ta_set_ui8 (local.get $data)
|
|
2066 | 2066 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
2067 | 2067 | (local.set $d (call $Int64_val (local.get $v)))
|
2068 | 2068 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
2069 |
| - (then (return_call $caml_bound_error))) |
| 2069 | + (then (call $caml_bound_error))) |
2070 | 2070 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 7))
|
2071 | 2071 | (array.get $int_array
|
2072 | 2072 | (struct.get $bigarray $ba_dim (local.get $ba))
|
2073 | 2073 | (i32.const 0)))
|
2074 |
| - (then (return_call $caml_bound_error))) |
| 2074 | + (then (call $caml_bound_error))) |
2075 | 2075 | (call $ta_set_ui8 (local.get $data) (local.get $p)
|
2076 | 2076 | (ref.i31 (i32.wrap_i64 (local.get $d))))
|
2077 | 2077 | (call $ta_set_ui8 (local.get $data)
|
|
0 commit comments