@@ -604,8 +604,8 @@ let rec remove_unit = function
604
604
Clet (id, c1, remove_unit c2)
605
605
| Cop (Capply _mty , args , dbg ) ->
606
606
Cop (Capply typ_void, args, dbg)
607
- | Cop (Cextcall( proc , _mty , alloc , label_after ) , args , dbg ) ->
608
- Cop (Cextcall (proc, typ_void, alloc, label_after) , args, dbg)
607
+ | Cop (Cextcall c , args , dbg ) ->
608
+ Cop (Cextcall {c with ret = typ_void} , args, dbg)
609
609
| Cexit (_ ,_ ) as c -> c
610
610
| Ctuple [] as c -> c
611
611
| c -> Csequence (c, Ctuple [] )
@@ -727,10 +727,12 @@ let float_array_ref arr ofs dbg =
727
727
box_float dbg (unboxed_float_array_ref arr ofs dbg)
728
728
729
729
let addr_array_set arr ofs newval dbg =
730
- Cop (Cextcall (" caml_modify" , typ_void, false , None ),
730
+ Cop (Cextcall { name = " caml_modify" ; ret = typ_void; alloc = false ;
731
+ label_after = None },
731
732
[array_indexing log2_size_addr arr ofs dbg; newval], dbg)
732
733
let addr_array_initialize arr ofs newval dbg =
733
- Cop (Cextcall (" caml_initialize" , typ_void, false , None ),
734
+ Cop (Cextcall { name = " caml_initialize" ;
735
+ ret = typ_void; alloc = false ; label_after = None },
734
736
[array_indexing log2_size_addr arr ofs dbg; newval], dbg)
735
737
let int_array_set arr ofs newval dbg =
736
738
Cop (Cstore (Word_int , Lambda. Assignment ),
@@ -766,7 +768,8 @@ let bigstring_length ba dbg =
766
768
767
769
let lookup_tag obj tag dbg =
768
770
bind " tag" tag (fun tag ->
769
- Cop (Cextcall (" caml_get_public_method" , typ_val, false , None ),
771
+ Cop (Cextcall { name = " caml_get_public_method" ; ret = typ_val;
772
+ alloc = false ; label_after = None },
770
773
[obj; tag],
771
774
dbg))
772
775
@@ -796,14 +799,16 @@ let make_alloc_generic set_fn dbg tag wordsize args =
796
799
| e1 ::el -> Csequence (set_fn (Cvar id) (Cconst_int (idx, dbg)) e1 dbg,
797
800
fill_fields (idx + 2 ) el) in
798
801
Clet (VP. create id,
799
- Cop (Cextcall (" caml_alloc" , typ_val, true , None ),
802
+ Cop (Cextcall { name = " caml_alloc" ; ret = typ_val; alloc = true ;
803
+ label_after = None },
800
804
[Cconst_int (wordsize, dbg); Cconst_int (tag, dbg)], dbg),
801
805
fill_fields 1 args)
802
806
end
803
807
804
808
let make_alloc dbg tag args =
805
809
let addr_array_init arr ofs newval dbg =
806
- Cop (Cextcall (" caml_initialize" , typ_void, false , None ),
810
+ Cop (Cextcall { name = " caml_initialize" ; ret = typ_void; alloc = false ;
811
+ label_after = None },
807
812
[array_indexing log2_size_addr arr ofs dbg; newval], dbg)
808
813
in
809
814
make_alloc_generic addr_array_init dbg tag (List. length args) args
@@ -2141,13 +2146,14 @@ let bbswap bi arg dbg =
2141
2146
| Pint32 -> " int32"
2142
2147
| Pint64 -> " int64"
2143
2148
in
2144
- Cop (Cextcall ( Printf. sprintf " caml_%s_direct_bswap" prim,
2145
- typ_int, false , None ) ,
2149
+ Cop (Cextcall { name = Printf. sprintf " caml_%s_direct_bswap" prim;
2150
+ ret = typ_int; alloc = false ; label_after = None ; } ,
2146
2151
[arg],
2147
2152
dbg)
2148
2153
2149
2154
let bswap16 arg dbg =
2150
- (Cop (Cextcall (" caml_bswap16_direct" , typ_int, false , None ),
2155
+ (Cop (Cextcall { name = " caml_bswap16_direct" ;
2156
+ ret = typ_int; alloc = false ; label_after = None ; },
2151
2157
[arg],
2152
2158
dbg))
2153
2159
@@ -2172,12 +2178,16 @@ let assignment_kind
2172
2178
let setfield n ptr init arg1 arg2 dbg =
2173
2179
match assignment_kind ptr init with
2174
2180
| Caml_modify ->
2175
- return_unit dbg (Cop (Cextcall (" caml_modify" , typ_void, false , None ),
2181
+ return_unit dbg (Cop (Cextcall { name = " caml_modify" ;
2182
+ ret = typ_void; alloc = false ;
2183
+ label_after = None },
2176
2184
[field_address arg1 n dbg;
2177
2185
arg2],
2178
2186
dbg))
2179
2187
| Caml_initialize ->
2180
- return_unit dbg (Cop (Cextcall (" caml_initialize" , typ_void, false , None ),
2188
+ return_unit dbg (Cop (Cextcall { name = " caml_initialize" ;
2189
+ ret = typ_void; alloc = false ;
2190
+ label_after = None },
2181
2191
[field_address arg1 n dbg;
2182
2192
arg2],
2183
2193
dbg))
0 commit comments