Skip to content

Commit 649a5c9

Browse files
committed
---
yaml --- r: 4854 b: refs/heads/master c: d8d9f2a h: refs/heads/master v: v3
1 parent bf66364 commit 649a5c9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
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: 907ab4a11b57f6f75c760c004f647d649a68dce1
2+
refs/heads/master: d8d9f2adf27ffa57fcd84958d6a823d0d6b90b77

trunk/src/comp/middle/gc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import lib::llvm::False;
44
import lib::llvm::True;
55
import lib::llvm::llvm::ValueRef;
6+
import middle::trans;
67
import middle::trans::get_tydesc;
78
import middle::trans_common::*;
89
import middle::ty;
@@ -38,6 +39,10 @@ fn add_gc_root(cx: &@block_ctxt, llval: ValueRef, ty: ty::t) -> @block_ctxt {
3839

3940
let gc_cx = bcx_ccx(cx).gc_cx;
4041

42+
// FIXME (issue #839): For now, we are unconditionally zeroing out all
43+
// GC-relevant types. Eventually we should use typestate for this.
44+
bcx = trans::zero_alloca(bcx, llval, ty).bcx;
45+
4146
let ti = none;
4247
let td_r = get_tydesc(bcx, ty, false, ti);
4348
bcx = td_r.result.bcx;

0 commit comments

Comments
 (0)