@@ -18,7 +18,7 @@ use middle::traits;
1818use trans:: adt;
1919use trans:: base;
2020use trans:: builder:: Builder ;
21- use trans:: common:: { ExternMap , tydesc_info , BuilderRef_res } ;
21+ use trans:: common:: { ExternMap , BuilderRef_res } ;
2222use trans:: debuginfo;
2323use trans:: monomorphize:: MonoId ;
2424use trans:: type_:: { Type , TypeNames } ;
@@ -38,7 +38,6 @@ use syntax::ast;
3838use syntax:: parse:: token:: InternedString ;
3939
4040pub struct Stats {
41- pub n_static_tydescs : Cell < uint > ,
4241 pub n_glues_created : Cell < uint > ,
4342 pub n_null_glues : Cell < uint > ,
4443 pub n_real_glues : Cell < uint > ,
@@ -89,10 +88,6 @@ pub struct LocalCrateContext<'tcx> {
8988 needs_unwind_cleanup_cache : RefCell < FnvHashMap < Ty < ' tcx > , bool > > ,
9089 fn_pointer_shims : RefCell < FnvHashMap < Ty < ' tcx > , ValueRef > > ,
9190 drop_glues : RefCell < FnvHashMap < Ty < ' tcx > , ValueRef > > ,
92- tydescs : RefCell < FnvHashMap < Ty < ' tcx > , Rc < tydesc_info < ' tcx > > > > ,
93- /// Set when running emit_tydescs to enforce that no more tydescs are
94- /// created.
95- finished_tydescs : Cell < bool > ,
9691 /// Track mapping of external ids to local items imported for inlining
9792 external : RefCell < DefIdMap < Option < ast:: NodeId > > > ,
9893 /// Backwards version of the `external` map (inlined items to where they
@@ -102,7 +97,7 @@ pub struct LocalCrateContext<'tcx> {
10297 monomorphized : RefCell < FnvHashMap < MonoId < ' tcx > , ValueRef > > ,
10398 monomorphizing : RefCell < DefIdMap < uint > > ,
10499 /// Cache generated vtables
105- vtables : RefCell < FnvHashMap < ( Ty < ' tcx > , ty:: PolyTraitRef < ' tcx > ) , ValueRef > > ,
100+ vtables : RefCell < FnvHashMap < ty:: PolyTraitRef < ' tcx > , ValueRef > > ,
106101 /// Cache of constant strings,
107102 const_cstr_cache : RefCell < FnvHashMap < InternedString , ValueRef > > ,
108103
@@ -264,7 +259,6 @@ impl<'tcx> SharedCrateContext<'tcx> {
264259 symbol_hasher : RefCell :: new ( symbol_hasher) ,
265260 tcx : tcx,
266261 stats : Stats {
267- n_static_tydescs : Cell :: new ( 0 ) ,
268262 n_glues_created : Cell :: new ( 0 ) ,
269263 n_null_glues : Cell :: new ( 0 ) ,
270264 n_real_glues : Cell :: new ( 0 ) ,
@@ -399,8 +393,6 @@ impl<'tcx> LocalCrateContext<'tcx> {
399393 needs_unwind_cleanup_cache : RefCell :: new ( FnvHashMap ( ) ) ,
400394 fn_pointer_shims : RefCell :: new ( FnvHashMap ( ) ) ,
401395 drop_glues : RefCell :: new ( FnvHashMap ( ) ) ,
402- tydescs : RefCell :: new ( FnvHashMap ( ) ) ,
403- finished_tydescs : Cell :: new ( false ) ,
404396 external : RefCell :: new ( DefIdMap ( ) ) ,
405397 external_srcs : RefCell :: new ( NodeMap ( ) ) ,
406398 monomorphized : RefCell :: new ( FnvHashMap ( ) ) ,
@@ -442,8 +434,6 @@ impl<'tcx> LocalCrateContext<'tcx> {
442434 str_slice_ty. set_struct_body ( & [ Type :: i8p ( & ccx) , ccx. int_type ( ) ] , false ) ;
443435 ccx. tn ( ) . associate_type ( "str_slice" , & str_slice_ty) ;
444436
445- ccx. tn ( ) . associate_type ( "tydesc" , & Type :: tydesc ( & ccx, str_slice_ty) ) ;
446-
447437 if ccx. sess ( ) . count_llvm_insns ( ) {
448438 base:: init_insn_ctxt ( )
449439 }
@@ -519,10 +509,6 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
519509 self . local . builder . b
520510 }
521511
522- pub fn tydesc_type ( & self ) -> Type {
523- self . local . tn . find_type ( "tydesc" ) . unwrap ( )
524- }
525-
526512 pub fn get_intrinsic ( & self , key : & & ' static str ) -> ValueRef {
527513 if let Some ( v) = self . intrinsics ( ) . borrow ( ) . get ( key) . cloned ( ) {
528514 return v;
@@ -590,14 +576,6 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
590576 & self . local . drop_glues
591577 }
592578
593- pub fn tydescs < ' a > ( & ' a self ) -> & ' a RefCell < FnvHashMap < Ty < ' tcx > , Rc < tydesc_info < ' tcx > > > > {
594- & self . local . tydescs
595- }
596-
597- pub fn finished_tydescs < ' a > ( & ' a self ) -> & ' a Cell < bool > {
598- & self . local . finished_tydescs
599- }
600-
601579 pub fn external < ' a > ( & ' a self ) -> & ' a RefCell < DefIdMap < Option < ast:: NodeId > > > {
602580 & self . local . external
603581 }
@@ -614,8 +592,7 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
614592 & self . local . monomorphizing
615593 }
616594
617- pub fn vtables < ' a > ( & ' a self ) -> & ' a RefCell < FnvHashMap < ( Ty < ' tcx > , ty:: PolyTraitRef < ' tcx > ) ,
618- ValueRef > > {
595+ pub fn vtables < ' a > ( & ' a self ) -> & ' a RefCell < FnvHashMap < ty:: PolyTraitRef < ' tcx > , ValueRef > > {
619596 & self . local . vtables
620597 }
621598
0 commit comments