Skip to content

Commit baf58a7

Browse files
committed
Stop emitting type parameters in shape.rs.
1 parent 665ba35 commit baf58a7

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

src/rustc/middle/trans/shape.rs

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -249,16 +249,10 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] {
249249
}
250250
add_u16(s, id as u16);
251251

252-
// Hack: always encode 0 tps, since we will encode
253-
// a monomorpized version
252+
// Hack: always encode 0 tps, since the shape glue format
253+
// hasn't changed since we started monomorphizing.
254254
add_u16(s, 0_u16);
255255

256-
// add_u16(s, vec::len(tps) as u16);
257-
// for vec::each(tps) {|tp|
258-
// let subshape = shape_of(ccx, tp, ty_param_map);
259-
// add_u16(s, vec::len(subshape) as u16);
260-
// s += subshape;
261-
// }
262256
s
263257
}
264258
}
@@ -345,10 +339,10 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] {
345339
let ri = @{did: dtor_did, tps: tps};
346340
let id = interner::intern(ccx.shape_cx.resources, ri);
347341
add_u16(s, id as u16);
348-
add_u16(s, vec::len(tps) as u16);
349-
for vec::each(tps) {|tp|
350-
add_substr(s, shape_of(ccx, tp));
351-
}
342+
343+
// Hack: always encode 0 tps, since the shape glue format
344+
// hasn't changed since we started monomorphizing.
345+
add_u16(s, 0_u16);
352346
};
353347
for ty::class_items_as_mutable_fields(ccx.tcx, did, substs).each {|f|
354348
sub += shape_of(ccx, f.mt.ty);
@@ -374,10 +368,9 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] {
374368

375369
let mut s = [shape_res];
376370
add_u16(s, id as u16);
377-
add_u16(s, vec::len(tps) as u16);
378-
for vec::each(tps) {|tp|
379-
add_substr(s, shape_of(ccx, tp));
380-
}
371+
// Hack: always encode 0 tps, since the shape glue format
372+
// hasn't changed since we started monomorphizing.
373+
add_u16(s, 0_u16);
381374
add_substr(s, shape_of(ccx, subt));
382375
s
383376
}

0 commit comments

Comments
 (0)