aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-12-13 11:16:04 -0800
committerGraydon Hoare <[email protected]>2010-12-13 11:16:04 -0800
commita3cbdc661cec57ab07bb209637b10d9e6d6bbb36 (patch)
tree3e2de087e2ca6b5abaa384c90977c7a48291e4da /src/comp
parentSyntax tweak: move 'mutable' from pseudo-ty-param on vec ctor to low-preceden... (diff)
downloadrust-a3cbdc661cec57ab07bb209637b10d9e6d6bbb36.tar.xz
rust-a3cbdc661cec57ab07bb209637b10d9e6d6bbb36.zip
Set the new vec fill-size on the compiler side, as in rustboot. Un-XFAIL first 3 vec tests.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 197909a1..dbf96f34 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -1376,6 +1376,7 @@ fn trans_index(@block_ctxt cx, &ast.span sp, @ast.expr base,
auto lim = ix.bcx.build.GEP(v, vec(C_int(0), C_int(abi.vec_elt_fill)));
lim = ix.bcx.build.Load(lim);
+
auto bounds_check = ix.bcx.build.ICmp(lib.llvm.LLVMIntULT,
scaled_ix, lim);
@@ -1582,6 +1583,10 @@ impure fn trans_vec(@block_ctxt cx, vec[@ast.expr] args,
sub = copy_ty(src_res.bcx, true, dst_elt, src_res.val, unit_ty);
i += 1;
}
+ auto fill = sub.bcx.build.GEP(vec_val,
+ vec(C_int(0), C_int(abi.vec_elt_fill)));
+ sub.bcx.build.Store(data_sz, fill);
+
ret res(sub.bcx, vec_val);
}