@@ -249,16 +249,10 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] {
249
249
}
250
250
add_u16 ( s, id as u16 ) ;
251
251
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.
254
254
add_u16 ( s, 0_u16 ) ;
255
255
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
- // }
262
256
s
263
257
}
264
258
}
@@ -345,10 +339,10 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] {
345
339
let ri = @{ did: dtor_did, tps: tps} ;
346
340
let id = interner:: intern ( ccx. shape_cx . resources , ri) ;
347
341
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 ) ;
352
346
} ;
353
347
for ty:: class_items_as_mutable_fields( ccx. tcx, did, substs) . each { |f|
354
348
sub += shape_of( ccx, f. mt. ty) ;
@@ -374,10 +368,9 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] {
374
368
375
369
let mut s = [ shape_res] ;
376
370
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 ) ;
381
374
add_substr( s, shape_of( ccx, subt) ) ;
382
375
s
383
376
}
0 commit comments