@@ -55,23 +55,7 @@ pub fn monomorphic_fn(ccx: &CrateContext,
55
55
let _icx = push_ctxt ( "monomorphic_fn" ) ;
56
56
57
57
let substs_iter = real_substs. self_ty . iter ( ) . chain ( real_substs. tps . iter ( ) ) ;
58
- let param_ids: Vec < MonoParamId > = match vtables {
59
- Some ( ref vts) => {
60
- debug ! ( "make_mono_id vtables={} psubsts={}" ,
61
- vts. repr( ccx. tcx( ) ) , real_substs. tps. repr( ccx. tcx( ) ) ) ;
62
- let vts_iter = self_vtables. iter ( ) . chain ( vts. iter ( ) ) ;
63
- vts_iter. zip ( substs_iter) . map ( |( vtable, subst) | MonoParamId {
64
- subst : * subst,
65
- // Do we really need the vtables to be hashed? Isn't the type enough?
66
- vtables : vtable. iter ( ) . map ( |vt| make_vtable_id ( ccx, vt) ) . collect ( )
67
- } ) . collect ( )
68
- }
69
- None => substs_iter. map ( |subst| MonoParamId {
70
- subst : * subst,
71
- vtables : Vec :: new ( )
72
- } ) . collect ( )
73
- } ;
74
-
58
+ let param_ids: Vec < ty:: t > = substs_iter. map ( |t| * t) . collect ( ) ;
75
59
let hash_id = MonoId {
76
60
def : fn_id,
77
61
params : param_ids
@@ -317,33 +301,22 @@ pub fn monomorphic_fn(ccx: &CrateContext,
317
301
#[ deriving( PartialEq , Eq , Hash ) ]
318
302
pub struct MonoParamId {
319
303
pub subst : ty:: t ,
320
- // Do we really need the vtables to be hashed? Isn't the type enough?
321
- pub vtables : Vec < MonoId >
322
304
}
323
305
324
306
#[ deriving( PartialEq , Eq , Hash ) ]
325
307
pub struct MonoId {
326
308
pub def : ast:: DefId ,
327
- pub params : Vec < MonoParamId >
309
+ pub params : Vec < ty :: t >
328
310
}
329
311
330
- pub fn make_vtable_id ( ccx : & CrateContext ,
312
+ pub fn make_vtable_id ( _ccx : & CrateContext ,
331
313
origin : & typeck:: vtable_origin )
332
314
-> MonoId {
333
315
match origin {
334
- & typeck:: vtable_static( impl_id, ref substs, ref sub_vtables ) => {
316
+ & typeck:: vtable_static( impl_id, ref substs, _ ) => {
335
317
MonoId {
336
318
def : impl_id,
337
- // FIXME(NDM) -- this is pretty bogus. It ignores self-type,
338
- // and vtables are not necessary, AND they are not guaranteed
339
- // to be same length as the number of TPS ANYHOW!
340
- params : sub_vtables. iter ( ) . zip ( substs. tps . iter ( ) ) . map ( |( vtable, subst) | {
341
- MonoParamId {
342
- subst : * subst,
343
- // Do we really need the vtables to be hashed? Isn't the type enough?
344
- vtables : vtable. iter ( ) . map ( |vt| make_vtable_id ( ccx, vt) ) . collect ( )
345
- }
346
- } ) . collect ( )
319
+ params : substs. tps . iter ( ) . map ( |subst| * subst) . collect ( )
347
320
}
348
321
}
349
322
0 commit comments