diff options
| author | Graydon Hoare <[email protected]> | 2011-04-28 18:11:00 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-28 18:11:00 -0700 |
| commit | cd8cf44d1d876c3eb0206899e46c007171dbe32e (patch) | |
| tree | 73e9c87e4c38ed1933c8bcd2c3289a4dcd18413e | |
| parent | Actually hit the no-growth path on vec-append. (diff) | |
| download | rust-cd8cf44d1d876c3eb0206899e46c007171dbe32e.tar.xz rust-cd8cf44d1d876c3eb0206899e46c007171dbe32e.zip | |
Make the no-growth path (previously never exercised) in rustc *work*.
| -rw-r--r-- | src/comp/middle/trans.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 14eb2e08..bd6b4afb 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -7449,8 +7449,6 @@ fn trans_vec_append_glue(@local_ctxt cx) { auto llnew_vec = vi2p(bcx, llnew_vec_res.val, T_opaque_vec_ptr()); - put_vec_fill(bcx, llnew_vec, C_int(0)); - auto copy_dst_cx = new_sub_block_ctxt(bcx, "copy new <- dst"); auto copy_src_cx = new_sub_block_ctxt(bcx, "copy new <- src"); @@ -7494,6 +7492,7 @@ fn trans_vec_append_glue(@local_ctxt cx) { } // Copy any dst elements in, omitting null if doing str. + put_vec_fill(copy_dst_cx, llnew_vec, C_int(0)); auto n_bytes = vec_fill_adjusted(copy_dst_cx, lldst_vec, llskipnull); copy_dst_cx = copy_elts(copy_dst_cx, llelt_tydesc, |