From 62e9ae04e26f60124f6760df26b517bce450ae41 Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Mon, 9 Jul 2012 17:39:22 -0700 Subject: [PATCH] Remove obsolete type param field from shape information. --- src/rt/rust_shape.h | 8 -------- src/rustc/middle/trans/shape.rs | 8 -------- 2 files changed, 16 deletions(-) diff --git a/src/rt/rust_shape.h b/src/rt/rust_shape.h index 26f775c9fac..b0f021287c0 100644 --- a/src/rt/rust_shape.h +++ b/src/rt/rust_shape.h @@ -407,10 +407,6 @@ ctxt::walk_tag0() { // Determine the size and alignment. tinfo.tag_sa = get_size_align(tinfo.info_ptr); - // Read in a dummy value; this used to be the number of parameters - uint16_t number_of_params = get_u16_bump(sp); - assert(number_of_params == 0 && "tag has type parameters on it"); - // Call to the implementation. static_cast(this)->walk_tag1(tinfo); } @@ -489,10 +485,6 @@ ctxt::walk_res0() { reinterpret_cast(tables->resources); const rust_fn *dtor = resources[dtor_offset]; - // Read in a dummy value; this used to be the number of parameters - uint16_t number_of_params = get_u16_bump(sp); - assert(number_of_params == 0 && "resource has type parameters on it"); - uint16_t sp_size = get_u16_bump(sp); const uint8_t *end_sp = sp + sp_size; diff --git a/src/rustc/middle/trans/shape.rs b/src/rustc/middle/trans/shape.rs index da37a59dc09..f6be67b1512 100644 --- a/src/rustc/middle/trans/shape.rs +++ b/src/rustc/middle/trans/shape.rs @@ -250,10 +250,6 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> ~[u8] { } add_u16(s, id as u16); - // Hack: always encode 0 tps, since the shape glue format - // hasn't changed since we started monomorphizing. - add_u16(s, 0_u16); - s } } @@ -342,10 +338,6 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> ~[u8] { let ri = @{did: dtor_did, parent_id: some(did), tps: tps}; let id = interner::intern(ccx.shape_cx.resources, ri); add_u16(s, id as u16); - - // Hack: always encode 0 tps, since the shape glue format - // hasn't changed since we started monomorphizing. - add_u16(s, 0_u16); }; for ty::class_items_as_mutable_fields(ccx.tcx, did, substs).each |f| { sub += shape_of(ccx, f.mt.ty);