Skip to content

Commit 62e9ae0

Browse files
committed
Remove obsolete type param field from shape information.
1 parent 120773b commit 62e9ae0

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/rt/rust_shape.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,6 @@ ctxt<T>::walk_tag0() {
407407
// Determine the size and alignment.
408408
tinfo.tag_sa = get_size_align(tinfo.info_ptr);
409409

410-
// Read in a dummy value; this used to be the number of parameters
411-
uint16_t number_of_params = get_u16_bump(sp);
412-
assert(number_of_params == 0 && "tag has type parameters on it");
413-
414410
// Call to the implementation.
415411
static_cast<T *>(this)->walk_tag1(tinfo);
416412
}
@@ -489,10 +485,6 @@ ctxt<T>::walk_res0() {
489485
reinterpret_cast<const rust_fn **>(tables->resources);
490486
const rust_fn *dtor = resources[dtor_offset];
491487

492-
// Read in a dummy value; this used to be the number of parameters
493-
uint16_t number_of_params = get_u16_bump(sp);
494-
assert(number_of_params == 0 && "resource has type parameters on it");
495-
496488
uint16_t sp_size = get_u16_bump(sp);
497489
const uint8_t *end_sp = sp + sp_size;
498490

src/rustc/middle/trans/shape.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,6 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> ~[u8] {
250250
}
251251
add_u16(s, id as u16);
252252

253-
// Hack: always encode 0 tps, since the shape glue format
254-
// hasn't changed since we started monomorphizing.
255-
add_u16(s, 0_u16);
256-
257253
s
258254
}
259255
}
@@ -342,10 +338,6 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> ~[u8] {
342338
let ri = @{did: dtor_did, parent_id: some(did), tps: tps};
343339
let id = interner::intern(ccx.shape_cx.resources, ri);
344340
add_u16(s, id as u16);
345-
346-
// Hack: always encode 0 tps, since the shape glue format
347-
// hasn't changed since we started monomorphizing.
348-
add_u16(s, 0_u16);
349341
};
350342
for ty::class_items_as_mutable_fields(ccx.tcx, did, substs).each |f| {
351343
sub += shape_of(ccx, f.mt.ty);

0 commit comments

Comments
 (0)