diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-08-30 15:56:42 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-08-30 15:56:42 -0700 |
| commit | b722dc36a5b3db7e3b8445103644d1a23c85796d (patch) | |
| tree | df54a16bf95533c5fccd5bc6b93ee5c195649474 /src/rt/rust_shape.cpp | |
| parent | 05d96f155f8bc6eec0e9f3485b47698fb858aa72 (diff) | |
| download | rust-b722dc36a5b3db7e3b8445103644d1a23c85796d.tar.gz rust-b722dc36a5b3db7e3b8445103644d1a23c85796d.zip | |
rt: Fix logging of type-parametric resources
Diffstat (limited to 'src/rt/rust_shape.cpp')
| -rw-r--r-- | src/rt/rust_shape.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp index 71a11a7d758..091dd8e2d36 100644 --- a/src/rt/rust_shape.cpp +++ b/src/rt/rust_shape.cpp @@ -110,21 +110,22 @@ print::walk_struct(bool align, const uint8_t *end_sp) { } void -print::walk_res(bool align, const rust_fn *dtor, uint16_t n_ty_params, - const uint8_t *ty_params_sp, const uint8_t *end_sp) { +print::walk_res(bool align, const rust_fn *dtor, unsigned n_params, + const type_param *params, const uint8_t *end_sp) { DPRINT("res@%p", dtor); // Print type parameters. - if (n_ty_params) { + if (n_params) { DPRINT("<"); bool first = true; - for (uint16_t i = 0; i < n_ty_params; i++) { + for (uint16_t i = 0; i < n_params; i++) { if (!first) DPRINT(","); first = false; - get_u16_bump(sp); // Skip over the size. - walk(align); + + ctxt<print> sub(*this, params[i].shape); + sub.walk(align); } DPRINT(">"); @@ -347,7 +348,7 @@ public: const data_pair<uint32_t> &tag_variants); void walk_struct(bool align, const uint8_t *end_sp); void walk_res(bool align, const rust_fn *dtor, uint16_t n_ty_params, - const uint8_t *ty_params_sp, const uint8_t *end_sp, + const type_param *ty_params_sp, const uint8_t *end_sp, const data_pair<uintptr_t> &live); void walk_variant(bool align, tag_info &tinfo, uint32_t variant_id, const std::pair<const uint8_t *,const uint8_t *> @@ -400,7 +401,7 @@ cmp::walk_struct(bool align, const uint8_t *end_sp) { void cmp::walk_res(bool align, const rust_fn *dtor, uint16_t n_ty_params, - const uint8_t *ty_params_sp, const uint8_t *end_sp, + const type_param *ty_params_sp, const uint8_t *end_sp, const data_pair<uintptr_t> &live) { abort(); // TODO } @@ -502,9 +503,8 @@ log::walk_variant(bool align, tag_info &tinfo, uint32_t variant_id, } void -log::walk_res(bool align, const rust_fn *dtor, uint16_t n_ty_params, - const uint8_t *ty_params_sp, const uint8_t *end_sp, - bool live) { +log::walk_res(bool align, const rust_fn *dtor, unsigned n_params, + const type_param *params, const uint8_t *end_sp, bool live) { out << "res"; if (this->sp == end_sp) |
