We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ac15c6 commit 18beb7aCopy full SHA for 18beb7a
src/boot/me/trans.ml
@@ -2258,8 +2258,17 @@ let trans_visitor
2258
trans_void_upcall "upcall_join" [| trans_atom (Ast.ATOM_lval task) |]
2259
2260
and trans_send (chan:Ast.lval) (src:Ast.lval) : unit =
2261
- let (srccell, _) = trans_lval src in
2262
- aliasing false srccell
+ let (src_cell, src_ty) = trans_lval src in
+ begin
2263
+ match (ty_mem_ctrl src_ty) with
2264
+ | MEM_rc_opaque
2265
+ | MEM_rc_struct
2266
+ | MEM_gc ->
2267
+ iflog (fun _ -> annotate "incr_refcount of src obj");
2268
+ incr_refcount src_cell;
2269
+ | _ -> ()
2270
+ end;
2271
+ aliasing false src_cell
2272
begin
2273
fun src_alias ->
2274
trans_void_upcall "upcall_send"
0 commit comments