提交 42fd2a9d 编写于 作者: B Brian Anderson

Remove unused arg from revoke_clean

上级 92af5529
......@@ -2060,7 +2060,7 @@ fn move_val(cx: @block_ctxt, action: copy_action, dst: ValueRef,
if src.is_mem { ret zero_alloca(cx, src.val, t).bcx; }
// If we're here, it must be a temporary.
ret revoke_clean(cx, src_val, t);
ret revoke_clean(cx, src_val);
} else if ty::type_is_unique(tcx, t) ||
type_is_structural_or_param(tcx, t) {
if action == DROP_EXISTING { cx = drop_ty(cx, dst, t); }
......@@ -2068,7 +2068,7 @@ fn move_val(cx: @block_ctxt, action: copy_action, dst: ValueRef,
if src.is_mem { ret zero_alloca(cx, src_val, t).bcx; }
// If we're here, it must be a temporary.
ret revoke_clean(cx, src_val, t);
ret revoke_clean(cx, src_val);
}
/* FIXME: suggests a type constraint */
bcx_ccx(cx).sess.bug("unexpected type in trans::move_val: " +
......@@ -3823,8 +3823,8 @@ fn zero_and_revoke(bcx: @block_ctxt,
for {v, t} in to_zero {
bcx = zero_alloca(bcx, v, t).bcx;
}
for {v, t} in to_revoke {
bcx = revoke_clean(bcx, v, t);
for {v, _} in to_revoke {
bcx = revoke_clean(bcx, v);
}
ret bcx;
}
......
......@@ -293,7 +293,7 @@ fn spill_and_drop(cx: @block_ctxt, val: ValueRef, ty: ty::t) ->
// to a system where we can also cancel the cleanup on local variables, but
// this will be more involved. For now, we simply zero out the local, and the
// drop glue checks whether it is zero.
fn revoke_clean(cx: @block_ctxt, val: ValueRef, t: ty::t) -> @block_ctxt {
fn revoke_clean(cx: @block_ctxt, val: ValueRef) -> @block_ctxt {
let sc_cx = find_scope_cx(cx);
let found = -1;
let i = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册