Make the shape interpreter actually advance past fixed length vectors. Closes #2613.

This commit is contained in:
Michael Sullivan 2012-06-15 05:53:35 -07:00
parent 210db7d8d4
commit 999ab5418a
2 changed files with 8 additions and 0 deletions

View File

@ -923,7 +923,9 @@ public:
void walk_fixedvec1(uint16_t n_elts, bool is_pod) {
size_align sa = size_of::get(*this);
ALIGN_TO(sa.alignment);
U next_dp = dp + (n_elts * sa.size);
static_cast<T *>(this)->walk_fixedvec2(n_elts, sa.size, is_pod);
dp = next_dp;
}
void walk_box1() { DATA_SIMPLE(void *, walk_box2()); }

View File

@ -0,0 +1,6 @@
fn main() {
let arr = [1,2,3]/3;
let struct = {a: 13u8, b: arr, c: 42};
let s = sys::log_str(struct);
assert(s == "(13, [1, 2, 3]/3, 42)");
}