@@ -1923,117 +1923,103 @@
1923
1923
(return (i32.const 0 )))
1924
1924
1925
1925
(func (export " caml_ba_uint8_get16" )
1926
- (param $vba (ref eq)) (param $i ( ref eq)) (result ( ref eq) )
1926
+ (param $vba (ref eq)) (param $i i32 ) (result i32 )
1927
1927
(local $ba (ref $bigarray ))
1928
1928
(local $view (ref extern ))
1929
- (local $p i32 )
1930
1929
(local.set $ba (ref.cast (ref $bigarray ) (local.get $vba )))
1931
1930
(local.set $view (struct.get $bigarray $ba_view (local.get $ba )))
1932
- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i ))))
1933
- (if (i32.lt_s (local.get $p ) (i32.const 0 ))
1931
+ (if (i32.lt_s (local.get $i ) (i32.const 0 ))
1934
1932
(then (call $caml_bound_error )))
1935
- (if (i32.ge_u (i32.add (local.get $p ) (i32.const 1 ))
1933
+ (if (i32.ge_u (i32.add (local.get $i ) (i32.const 1 ))
1936
1934
(array.get $int_array
1937
1935
(struct.get $bigarray $ba_dim (local.get $ba ))
1938
1936
(i32.const 0 )))
1939
1937
(then (call $caml_bound_error )))
1940
- (ref.i31
1941
- (call $dv_get_ui16 (local.get $view ) (local.get $p ) (i32.const 1 ))))
1938
+ (call $dv_get_ui16 (local.get $view ) (local.get $i ) (i32.const 1 )))
1942
1939
1943
1940
(func (export " caml_ba_uint8_get32" )
1944
- (param $vba (ref eq)) (param $i ( ref eq) ) (result i32 )
1941
+ (param $vba (ref eq)) (param $i i32 ) (result i32 )
1945
1942
(local $ba (ref $bigarray ))
1946
1943
(local $view (ref extern ))
1947
- (local $p i32 )
1948
1944
(local.set $ba (ref.cast (ref $bigarray ) (local.get $vba )))
1949
1945
(local.set $view (struct.get $bigarray $ba_view (local.get $ba )))
1950
- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i ))))
1951
- (if (i32.lt_s (local.get $p ) (i32.const 0 ))
1946
+ (if (i32.lt_s (local.get $i ) (i32.const 0 ))
1952
1947
(then (call $caml_bound_error )))
1953
- (if (i32.ge_u (i32.add (local.get $p ) (i32.const 3 ))
1948
+ (if (i32.ge_u (i32.add (local.get $i ) (i32.const 3 ))
1954
1949
(array.get $int_array
1955
1950
(struct.get $bigarray $ba_dim (local.get $ba ))
1956
1951
(i32.const 0 )))
1957
1952
(then (call $caml_bound_error )))
1958
- (return_call $dv_get_i32 (local.get $view ) (local.get $p ) (i32.const 1 )))
1953
+ (return_call $dv_get_i32 (local.get $view ) (local.get $i ) (i32.const 1 )))
1959
1954
1960
1955
(func (export " caml_ba_uint8_get64" )
1961
- (param $vba (ref eq)) (param $i ( ref eq) ) (result i64 )
1956
+ (param $vba (ref eq)) (param $i i32 ) (result i64 )
1962
1957
(local $ba (ref $bigarray ))
1963
1958
(local $view (ref extern ))
1964
- (local $p i32 )
1965
1959
(local.set $ba (ref.cast (ref $bigarray ) (local.get $vba )))
1966
1960
(local.set $view (struct.get $bigarray $ba_view (local.get $ba )))
1967
- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i ))))
1968
- (if (i32.lt_s (local.get $p ) (i32.const 0 ))
1961
+ (if (i32.lt_s (local.get $i ) (i32.const 0 ))
1969
1962
(then (call $caml_bound_error )))
1970
- (if (i32.ge_u (i32.add (local.get $p ) (i32.const 7 ))
1963
+ (if (i32.ge_u (i32.add (local.get $i ) (i32.const 7 ))
1971
1964
(array.get $int_array
1972
1965
(struct.get $bigarray $ba_dim (local.get $ba ))
1973
1966
(i32.const 0 )))
1974
1967
(then (call $caml_bound_error )))
1975
1968
(call $dv_get_i64
1976
- (local.get $view ) (local.get $p ) (i32.const 1 )))
1969
+ (local.get $view ) (local.get $i ) (i32.const 1 )))
1977
1970
1978
1971
(func (export " caml_ba_uint8_set16" )
1979
- (param $vba (ref eq)) (param $i ( ref eq)) (param $v ( ref eq) )
1972
+ (param $vba (ref eq)) (param $i i32 ) (param $d i32 )
1980
1973
(result (ref eq))
1981
1974
(local $ba (ref $bigarray ))
1982
1975
(local $view (ref extern ))
1983
- (local $p i32 ) (local $d i32 )
1984
1976
(local.set $ba (ref.cast (ref $bigarray ) (local.get $vba )))
1985
1977
(local.set $view (struct.get $bigarray $ba_view (local.get $ba )))
1986
- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i ))))
1987
- (local.set $d (i31.get_s (ref.cast (ref i31) (local.get $v ))))
1988
- (if (i32.lt_s (local.get $p ) (i32.const 0 ))
1978
+ (if (i32.lt_s (local.get $i ) (i32.const 0 ))
1989
1979
(then (call $caml_bound_error )))
1990
- (if (i32.ge_u (i32.add (local.get $p ) (i32.const 1 ))
1980
+ (if (i32.ge_u (i32.add (local.get $i ) (i32.const 1 ))
1991
1981
(array.get $int_array
1992
1982
(struct.get $bigarray $ba_dim (local.get $ba ))
1993
1983
(i32.const 0 )))
1994
1984
(then (call $caml_bound_error )))
1995
1985
(call $dv_set_i16
1996
- (local.get $view ) (local.get $p ) (local.get $d ) (i32.const 1 ))
1986
+ (local.get $view ) (local.get $i ) (local.get $d ) (i32.const 1 ))
1997
1987
(ref.i31 (i32.const 0 )))
1998
1988
1999
1989
(func (export " caml_ba_uint8_set32" )
2000
- (param $vba (ref eq)) (param $i ( ref eq) ) (param $d i32 )
1990
+ (param $vba (ref eq)) (param $i i32 ) (param $d i32 )
2001
1991
(result (ref eq))
2002
1992
(local $ba (ref $bigarray ))
2003
1993
(local $view (ref extern ))
2004
- (local $p i32 )
2005
1994
(local.set $ba (ref.cast (ref $bigarray ) (local.get $vba )))
2006
1995
(local.set $view (struct.get $bigarray $ba_view (local.get $ba )))
2007
- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i ))))
2008
- (if (i32.lt_s (local.get $p ) (i32.const 0 ))
1996
+ (if (i32.lt_s (local.get $i ) (i32.const 0 ))
2009
1997
(then (call $caml_bound_error )))
2010
- (if (i32.ge_u (i32.add (local.get $p ) (i32.const 3 ))
1998
+ (if (i32.ge_u (i32.add (local.get $i ) (i32.const 3 ))
2011
1999
(array.get $int_array
2012
2000
(struct.get $bigarray $ba_dim (local.get $ba ))
2013
2001
(i32.const 0 )))
2014
2002
(then (call $caml_bound_error )))
2015
2003
(call $dv_set_i32
2016
- (local.get $view ) (local.get $p ) (local.get $d ) (i32.const 1 ))
2004
+ (local.get $view ) (local.get $i ) (local.get $d ) (i32.const 1 ))
2017
2005
(ref.i31 (i32.const 0 )))
2018
2006
2019
2007
(func (export " caml_ba_uint8_set64" )
2020
- (param $vba (ref eq)) (param $i ( ref eq) ) (param $d i64 )
2008
+ (param $vba (ref eq)) (param $i i32 ) (param $d i64 )
2021
2009
(result (ref eq))
2022
2010
(local $ba (ref $bigarray ))
2023
2011
(local $view (ref extern ))
2024
- (local $p i32 )
2025
2012
(local.set $ba (ref.cast (ref $bigarray ) (local.get $vba )))
2026
2013
(local.set $view (struct.get $bigarray $ba_view (local.get $ba )))
2027
- (local.set $p (i31.get_s (ref.cast (ref i31) (local.get $i ))))
2028
- (if (i32.lt_s (local.get $p ) (i32.const 0 ))
2014
+ (if (i32.lt_s (local.get $i ) (i32.const 0 ))
2029
2015
(then (call $caml_bound_error )))
2030
- (if (i32.ge_u (i32.add (local.get $p ) (i32.const 7 ))
2016
+ (if (i32.ge_u (i32.add (local.get $i ) (i32.const 7 ))
2031
2017
(array.get $int_array
2032
2018
(struct.get $bigarray $ba_dim (local.get $ba ))
2033
2019
(i32.const 0 )))
2034
2020
(then (call $caml_bound_error )))
2035
2021
(call $dv_set_i64
2036
- (local.get $view ) (local.get $p ) (local.get $d ) (i32.const 1 ))
2022
+ (local.get $view ) (local.get $i ) (local.get $d ) (i32.const 1 ))
2037
2023
(ref.i31 (i32.const 0 )))
2038
2024
2039
2025
(export " caml_bytes_of_uint8_array" (func $caml_string_of_uint8_array ))
0 commit comments