Skip to content

Commit 8e472be

Browse files
committed
---
yaml --- r: 4521 b: refs/heads/master c: f5c8c85 h: refs/heads/master i: 4519: a0dc27a v: v3
1 parent 45eb48b commit 8e472be

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
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: dc720c3aba3ef66b49b74ef73579dc716efc2c6a
2+
refs/heads/master: f5c8c851966e98778a03f5539431832ee8d452b5

trunk/src/rt/rust_shape.cpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,10 @@ class log : public data<log,ptr> {
12431243
: data<log,ptr>(other.task, in_sp, in_params, in_tables, other.dp),
12441244
out(other.out) {}
12451245

1246+
log(log &other, ptr in_dp)
1247+
: data<log,ptr>(other.task, other.sp, other.params, other.tables, in_dp),
1248+
out(other.out) {}
1249+
12461250
void walk_string(const std::pair<ptr,ptr> &data);
12471251

12481252
void walk_evec(bool align, bool is_pod, uint16_t sp_size) {
@@ -1301,7 +1305,22 @@ log::walk_vec(bool align, bool is_pod, const std::pair<ptr,ptr> &data) {
13011305
return;
13021306
}
13031307

1304-
// TODO: Write vectors [ ..., ..., ... ] style.
1308+
out << "[";
1309+
1310+
log sub(*this, data.first);
1311+
1312+
bool first = true;
1313+
while (sub.dp < data.second) {
1314+
if (!first)
1315+
out << ", ";
1316+
1317+
sub.walk_reset(align);
1318+
1319+
align = true;
1320+
first = false;
1321+
}
1322+
1323+
out << "]";
13051324
}
13061325

13071326
} // end namespace shape

0 commit comments

Comments
 (0)