diff options
| author | Graydon Hoare <[email protected]> | 2011-04-28 18:39:01 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-28 18:39:12 -0700 |
| commit | 1f44887761439c57d67f132d3ff11cc8b3f6a6b4 (patch) | |
| tree | 42da7404db7461cb59d5e01508716e68b028ce34 /src/comp | |
| parent | test: Add a test case for vec growth (diff) | |
| download | rust-1f44887761439c57d67f132d3ff11cc8b3f6a6b4.tar.xz rust-1f44887761439c57d67f132d3ff11cc8b3f6a6b4.zip | |
More attempts at fixing broken vec-append glue.
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/middle/trans.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index bd6b4afb..d239e1d1 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -7453,7 +7453,7 @@ fn trans_vec_append_glue(@local_ctxt cx) { auto copy_src_cx = new_sub_block_ctxt(bcx, "copy new <- src"); auto pp0 = alloca(bcx, T_ptr(T_i8())); - bcx.build.Store(vec_p0(bcx, llnew_vec), pp0); + bcx.build.Store(vec_p1(bcx, llnew_vec), pp0); bcx.build.CondBr(bcx.build.TruncOrBitCast (bcx.build.Load(llcopy_dst_ptr), @@ -7492,11 +7492,11 @@ 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, - copy_dst_cx.build.Load(pp0), + vec_p0(copy_dst_cx, llnew_vec), vec_p0(copy_dst_cx, lldst_vec), n_bytes).bcx; |