From b22620624cdc4c35a74fce7eca9f6f279a403f56 Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Fri, 8 Jun 2012 15:21:32 -0700 Subject: Get rid of a bunch of dead shape code. Closes #2552. --- src/rt/rust_box_annihilator.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'src/rt/rust_box_annihilator.cpp') diff --git a/src/rt/rust_box_annihilator.cpp b/src/rt/rust_box_annihilator.cpp index 6f6a22213e9..7984fbd618e 100644 --- a/src/rt/rust_box_annihilator.cpp +++ b/src/rt/rust_box_annihilator.cpp @@ -8,40 +8,36 @@ class annihilator : public shape::data { annihilator(const annihilator &other, const shape::ptr &in_dp) : shape::data(other.task, other.align, - other.sp, other.params, + other.sp, other.tables, in_dp) {} annihilator(const annihilator &other, const uint8_t *in_sp, - const shape::type_param *in_params, const rust_shape_tables *in_tables = NULL) : shape::data(other.task, other.align, in_sp, - in_params, in_tables ? in_tables : other.tables, other.dp) {} annihilator(const annihilator &other, const uint8_t *in_sp, - const shape::type_param *in_params, const rust_shape_tables *in_tables, shape::ptr in_dp) : shape::data(other.task, other.align, in_sp, - in_params, in_tables, in_dp) {} annihilator(rust_task *in_task, bool in_align, const uint8_t *in_sp, - const shape::type_param *in_params, const rust_shape_tables *in_tables, uint8_t *in_data) : shape::data(in_task, in_align, in_sp, - in_params, in_tables, in_data) {} + in_tables, + shape::ptr(in_data)) {} void walk_vec2(bool is_pod) { void *vec = shape::get_dp(dp); @@ -145,8 +141,7 @@ class annihilator : public shape::data { f(NULL, args->dtor->env, args->data); } - void walk_res2(const shape::rust_fn *dtor, unsigned n_params, - const shape::type_param *params, const uint8_t *end_sp, + void walk_res2(const shape::rust_fn *dtor, const uint8_t *end_sp, bool live) { void *data = (void*)(uintptr_t)dp; // Switch back to the Rust stack to run the destructor @@ -173,7 +168,7 @@ class annihilator : public shape::data { void walk_variant2(shape::tag_info &tinfo, uint32_t variant_id, const std::pair variant_ptr_and_end) { - annihilator sub(*this, variant_ptr_and_end.first, tinfo.params); + annihilator sub(*this, variant_ptr_and_end.first); const uint8_t *variant_end = variant_ptr_and_end.second; while (sub.sp < variant_end) { @@ -194,11 +189,9 @@ annihilator::do_annihilate(rust_task *task, rust_opaque_box *box) { const type_desc *tydesc = box->td; uint8_t *p = (uint8_t*) box_body(box); shape::arena arena; - shape::type_param *params = - shape::type_param::from_tydesc_and_data(tydesc, p, arena); annihilator annihilator(task, true, tydesc->shape, - params, tydesc->shape_tables, p); + tydesc->shape_tables, p); annihilator.walk(); task->boxed.free(box); } -- cgit 1.4.1-3-g733a5