Remove unused arg from revoke_clean
This commit is contained in:
parent
92af552956
commit
42fd2a9d89
@ -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 add_clean_temp(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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user