Skip to content

Commit 23d2911

Browse files
committed
---
yaml --- r: 494 b: refs/heads/master c: 18beb7a h: refs/heads/master v: v3
1 parent 0e702a2 commit 23d2911

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 8ac15c684481ea5b60f85c3f57b63e89a261e7dd
2+
refs/heads/master: 18beb7a33db3f3e57f445ba42984b8892e0dfce5

trunk/src/boot/me/trans.ml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,8 +2258,17 @@ let trans_visitor
22582258
trans_void_upcall "upcall_join" [| trans_atom (Ast.ATOM_lval task) |]
22592259

22602260
and trans_send (chan:Ast.lval) (src:Ast.lval) : unit =
2261-
let (srccell, _) = trans_lval src in
2262-
aliasing false srccell
2261+
let (src_cell, src_ty) = trans_lval src in
2262+
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
22632272
begin
22642273
fun src_alias ->
22652274
trans_void_upcall "upcall_send"

0 commit comments

Comments
 (0)