Skip to content

Commit c092fb1

Browse files
committed
---
yaml --- r: 5025 b: refs/heads/master c: 5483b91 h: refs/heads/master i: 5023: 62eb3f1 v: v3
1 parent b0ed92f commit c092fb1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
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: 9f41bc854d896cede16f075e9b3090fc234f6996
2+
refs/heads/master: 5483b910d6644b8243d6db46bbd330890966f074

trunk/src/comp/middle/trans_ivec.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ fn trans_add(bcx: &@block_ctxt, vec_ty: ty::t, lhs: ValueRef,
202202
alloc(bcx, vec_ty, new_fill, true);
203203

204204
let write_ptr_ptr = do_spill(bcx, get_dataptr(bcx, new_vec, llunitty));
205-
let copy_block = { | &bcx, addr, _ty |
205+
let copy_fn = bind fn(bcx: &@block_ctxt, addr: ValueRef, _ty: ty::t,
206+
write_ptr_ptr: ValueRef, unit_ty: ty::t,
207+
llunitsz: ValueRef) -> result {
206208
let write_ptr = Load(bcx, write_ptr_ptr);
207209
let bcx = copy_val(bcx, INIT, write_ptr,
208210
load_if_immediate(bcx, addr, unit_ty), unit_ty);
@@ -213,10 +215,10 @@ fn trans_add(bcx: &@block_ctxt, vec_ty: ty::t, lhs: ValueRef,
213215
incr_ptr(bcx, write_ptr, C_int(1), write_ptr_ptr);
214216
}
215217
ret rslt(bcx, C_nil());
216-
};
218+
} (_, _, _, write_ptr_ptr, unit_ty, llunitsz);
217219

218-
let bcx = iter_ivec_raw(bcx, lhs, vec_ty, lhs_fill, copy_block).bcx;
219-
let bcx = iter_ivec_raw(bcx, rhs, vec_ty, rhs_fill, copy_block).bcx;
220+
let bcx = iter_ivec_raw(bcx, lhs, vec_ty, lhs_fill, copy_fn).bcx;
221+
let bcx = iter_ivec_raw(bcx, rhs, vec_ty, rhs_fill, copy_fn).bcx;
220222
ret rslt(bcx, new_vec);
221223
}
222224

0 commit comments

Comments
 (0)