|
77 | 77 | (func $ta_blit_to_string
|
78 | 78 | (param (ref extern)) (param i32) (param (ref $string)) (param i32)
|
79 | 79 | (param i32)))
|
80 |
| - (import "fail" "caml_bound_error" (func $caml_bound_error)) |
| 80 | + (import "fail" "caml_bound_error" (func $caml_bound_error (result (ref eq)))) |
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))))
|
|
974 | 974 | (if (i32.ge_u (local.get $i)
|
975 | 975 | (array.get $int_array (struct.get $bigarray 2 (local.get $ba))
|
976 | 976 | (i32.const 0)))
|
977 |
| - (then (call $caml_bound_error))) |
| 977 | + (then (return_call $caml_bound_error))) |
978 | 978 | (return_call $caml_ba_get_at_offset (local.get $ba) (local.get $i)))
|
979 | 979 |
|
980 | 980 | (func (export "caml_ba_set_1")
|
|
988 | 988 | (if (i32.ge_u (local.get $i)
|
989 | 989 | (array.get $int_array (struct.get $bigarray $ba_dim (local.get $ba))
|
990 | 990 | (i32.const 0)))
|
991 |
| - (then (call $caml_bound_error))) |
| 991 | + (then (return_call $caml_bound_error))) |
992 | 992 | (call $caml_ba_set_at_offset
|
993 | 993 | (local.get $ba) (local.get $i) (local.get $v))
|
994 | 994 | (ref.i31 (i32.const 0)))
|
|
1026 | 1026 | (i32.ge_u (local.get $j)
|
1027 | 1027 | (array.get $int_array (local.get $dim) (i32.const 1))))
|
1028 | 1028 | (then
|
1029 |
| - (call $caml_bound_error))) |
| 1029 | + (return_call $caml_bound_error))) |
1030 | 1030 | (return_call $caml_ba_get_at_offset (local.get $ba) (local.get $offset)))
|
1031 | 1031 |
|
1032 | 1032 | (func (export "caml_ba_set_2")
|
|
1062 | 1062 | (i32.ge_u (local.get $j)
|
1063 | 1063 | (array.get $int_array (local.get $dim) (i32.const 1))))
|
1064 | 1064 | (then
|
1065 |
| - (call $caml_bound_error))) |
| 1065 | + (return_call $caml_bound_error))) |
1066 | 1066 | (call $caml_ba_set_at_offset
|
1067 | 1067 | (local.get $ba) (local.get $offset) (local.get $v))
|
1068 | 1068 | (ref.i31 (i32.const 0)))
|
|
1120 | 1120 | (i32.ge_u (local.get $k)
|
1121 | 1121 | (array.get $int_array (local.get $dim) (i32.const 2)))))
|
1122 | 1122 | (then
|
1123 |
| - (call $caml_bound_error))) |
| 1123 | + (return_call $caml_bound_error))) |
1124 | 1124 | (return_call $caml_ba_get_at_offset (local.get $ba) (local.get $offset)))
|
1125 | 1125 |
|
1126 | 1126 | (func (export "caml_ba_set_3")
|
|
1173 | 1173 | (i32.ge_u (local.get $k)
|
1174 | 1174 | (array.get $int_array (local.get $dim) (i32.const 2)))))
|
1175 | 1175 | (then
|
1176 |
| - (call $caml_bound_error))) |
| 1176 | + (return_call $caml_bound_error))) |
1177 | 1177 | (call $caml_ba_set_at_offset
|
1178 | 1178 | (local.get $ba) (local.get $offset) (local.get $v))
|
1179 | 1179 | (ref.i31 (i32.const 0)))
|
|
1204 | 1204 | (array.get $int_array (local.get $dim) (local.get $i)))
|
1205 | 1205 | (if (i32.ge_u (local.get $idx) (local.get $l))
|
1206 | 1206 | (then
|
1207 |
| - (call $caml_bound_error))) |
| 1207 | + (drop (call $caml_bound_error)))) |
1208 | 1208 | (local.set $offset
|
1209 | 1209 | (i32.add (i32.mul (local.get $offset) (local.get $l))
|
1210 | 1210 | (local.get $idx)))
|
|
1222 | 1222 | (array.get $int_array (local.get $dim) (local.get $i)))
|
1223 | 1223 | (if (i32.ge_u (local.get $idx) (local.get $l))
|
1224 | 1224 | (then
|
1225 |
| - (call $caml_bound_error))) |
| 1225 | + (drop (call $caml_bound_error)))) |
1226 | 1226 | (local.set $offset
|
1227 | 1227 | (i32.add (i32.mul (local.get $offset) (local.get $l))
|
1228 | 1228 | (local.get $idx)))
|
|
1255 | 1255 | (array.get $int_array (local.get $dim) (local.get $i)))
|
1256 | 1256 | (if (i32.ge_u (local.get $idx) (local.get $l))
|
1257 | 1257 | (then
|
1258 |
| - (call $caml_bound_error))) |
| 1258 | + (drop (call $caml_bound_error)))) |
1259 | 1259 | (local.set $offset
|
1260 | 1260 | (i32.add (i32.mul (local.get $offset) (local.get $l))
|
1261 | 1261 | (local.get $idx)))
|
|
1276 | 1276 | (array.get $int_array (local.get $dim) (local.get $i)))
|
1277 | 1277 | (if (i32.ge_u (local.get $idx) (local.get $l))
|
1278 | 1278 | (then
|
1279 |
| - (call $caml_bound_error))) |
| 1279 | + (drop (call $caml_bound_error)))) |
1280 | 1280 | (local.set $offset
|
1281 | 1281 | (i32.add (i32.mul (local.get $offset) (local.get $l))
|
1282 | 1282 | (local.get $idx)))
|
|
1910 | 1910 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba)))
|
1911 | 1911 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
1912 | 1912 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
1913 |
| - (then (call $caml_bound_error))) |
| 1913 | + (then (return_call $caml_bound_error))) |
1914 | 1914 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 1))
|
1915 | 1915 | (array.get $int_array
|
1916 | 1916 | (struct.get $bigarray $ba_dim (local.get $ba))
|
1917 | 1917 | (i32.const 0)))
|
1918 |
| - (then (call $caml_bound_error))) |
| 1918 | + (then (return_call $caml_bound_error))) |
1919 | 1919 | (ref.i31 (call $ta_get16_ui8 (local.get $data) (local.get $p))))
|
1920 | 1920 |
|
1921 | 1921 | (func (export "caml_ba_uint8_get32")
|
|
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 (call $caml_bound_error))) |
| 1930 | + (then (return_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 (call $caml_bound_error))) |
| 1935 | + (then (return_call $caml_bound_error))) |
1936 | 1936 | (return_call $ta_get32_ui8 (local.get $data) (local.get $p)))
|
1937 | 1937 |
|
1938 | 1938 | (func (export "caml_ba_uint8_get64")
|
|
1944 | 1944 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba)))
|
1945 | 1945 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
1946 | 1946 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
1947 |
| - (then (call $caml_bound_error))) |
| 1947 | + (then (return_call $caml_bound_error))) |
1948 | 1948 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 7))
|
1949 | 1949 | (array.get $int_array
|
1950 | 1950 | (struct.get $bigarray $ba_dim (local.get $ba))
|
1951 | 1951 | (i32.const 0)))
|
1952 |
| - (then (call $caml_bound_error))) |
| 1952 | + (then (return_call $caml_bound_error))) |
1953 | 1953 | (i64.or
|
1954 | 1954 | (i64.extend_i32_u
|
1955 | 1955 | (call $ta_get32_ui8 (local.get $data) (local.get $p)))
|
|
1969 | 1969 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
1970 | 1970 | (local.set $d (ref.cast (ref i31) (local.get $v)))
|
1971 | 1971 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
1972 |
| - (then (call $caml_bound_error))) |
| 1972 | + (then (return_call $caml_bound_error))) |
1973 | 1973 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 1))
|
1974 | 1974 | (array.get $int_array
|
1975 | 1975 | (struct.get $bigarray $ba_dim (local.get $ba))
|
1976 | 1976 | (i32.const 0)))
|
1977 |
| - (then (call $caml_bound_error))) |
| 1977 | + (then (return_call $caml_bound_error))) |
1978 | 1978 | (call $ta_set16_ui8 (local.get $data) (local.get $p) (local.get $d))
|
1979 | 1979 | (ref.i31 (i32.const 0)))
|
1980 | 1980 |
|
|
1988 | 1988 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba)))
|
1989 | 1989 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
1990 | 1990 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
1991 |
| - (then (call $caml_bound_error))) |
| 1991 | + (then (return_call $caml_bound_error))) |
1992 | 1992 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 3))
|
1993 | 1993 | (array.get $int_array
|
1994 | 1994 | (struct.get $bigarray $ba_dim (local.get $ba))
|
1995 | 1995 | (i32.const 0)))
|
1996 |
| - (then (call $caml_bound_error))) |
| 1996 | + (then (return_call $caml_bound_error))) |
1997 | 1997 | (call $ta_set32_ui8 (local.get $data) (local.get $p) (local.get $d))
|
1998 | 1998 | (ref.i31 (i32.const 0)))
|
1999 | 1999 |
|
|
2007 | 2007 | (local.set $data (struct.get $bigarray $ba_data (local.get $ba)))
|
2008 | 2008 | (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i))))
|
2009 | 2009 | (if (i32.lt_s (local.get $p) (i32.const 0))
|
2010 |
| - (then (call $caml_bound_error))) |
| 2010 | + (then (return_call $caml_bound_error))) |
2011 | 2011 | (if (i32.ge_u (i32.add (local.get $p) (i32.const 7))
|
2012 | 2012 | (array.get $int_array
|
2013 | 2013 | (struct.get $bigarray $ba_dim (local.get $ba))
|
2014 | 2014 | (i32.const 0)))
|
2015 |
| - (then (call $caml_bound_error))) |
| 2015 | + (then (return_call $caml_bound_error))) |
2016 | 2016 | (call $ta_set32_ui8 (local.get $data) (local.get $p)
|
2017 | 2017 | (i32.wrap_i64 (local.get $d)))
|
2018 | 2018 | (call $ta_set32_ui8 (local.get $data)
|
|
0 commit comments