@@ -18,7 +18,7 @@ use middle::traits;
18
18
use trans:: adt;
19
19
use trans:: base;
20
20
use trans:: builder:: Builder ;
21
- use trans:: common:: { ExternMap , tydesc_info , BuilderRef_res } ;
21
+ use trans:: common:: { ExternMap , BuilderRef_res } ;
22
22
use trans:: debuginfo;
23
23
use trans:: monomorphize:: MonoId ;
24
24
use trans:: type_:: { Type , TypeNames } ;
@@ -38,7 +38,6 @@ use syntax::ast;
38
38
use syntax:: parse:: token:: InternedString ;
39
39
40
40
pub struct Stats {
41
- pub n_static_tydescs : Cell < uint > ,
42
41
pub n_glues_created : Cell < uint > ,
43
42
pub n_null_glues : Cell < uint > ,
44
43
pub n_real_glues : Cell < uint > ,
@@ -89,10 +88,6 @@ pub struct LocalCrateContext<'tcx> {
89
88
needs_unwind_cleanup_cache : RefCell < FnvHashMap < Ty < ' tcx > , bool > > ,
90
89
fn_pointer_shims : RefCell < FnvHashMap < Ty < ' tcx > , ValueRef > > ,
91
90
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 > ,
96
91
/// Track mapping of external ids to local items imported for inlining
97
92
external : RefCell < DefIdMap < Option < ast:: NodeId > > > ,
98
93
/// Backwards version of the `external` map (inlined items to where they
@@ -102,7 +97,7 @@ pub struct LocalCrateContext<'tcx> {
102
97
monomorphized : RefCell < FnvHashMap < MonoId < ' tcx > , ValueRef > > ,
103
98
monomorphizing : RefCell < DefIdMap < uint > > ,
104
99
/// Cache generated vtables
105
- vtables : RefCell < FnvHashMap < ( Ty < ' tcx > , ty:: PolyTraitRef < ' tcx > ) , ValueRef > > ,
100
+ vtables : RefCell < FnvHashMap < ty:: PolyTraitRef < ' tcx > , ValueRef > > ,
106
101
/// Cache of constant strings,
107
102
const_cstr_cache : RefCell < FnvHashMap < InternedString , ValueRef > > ,
108
103
@@ -264,7 +259,6 @@ impl<'tcx> SharedCrateContext<'tcx> {
264
259
symbol_hasher : RefCell :: new ( symbol_hasher) ,
265
260
tcx : tcx,
266
261
stats : Stats {
267
- n_static_tydescs : Cell :: new ( 0 ) ,
268
262
n_glues_created : Cell :: new ( 0 ) ,
269
263
n_null_glues : Cell :: new ( 0 ) ,
270
264
n_real_glues : Cell :: new ( 0 ) ,
@@ -399,8 +393,6 @@ impl<'tcx> LocalCrateContext<'tcx> {
399
393
needs_unwind_cleanup_cache : RefCell :: new ( FnvHashMap ( ) ) ,
400
394
fn_pointer_shims : RefCell :: new ( FnvHashMap ( ) ) ,
401
395
drop_glues : RefCell :: new ( FnvHashMap ( ) ) ,
402
- tydescs : RefCell :: new ( FnvHashMap ( ) ) ,
403
- finished_tydescs : Cell :: new ( false ) ,
404
396
external : RefCell :: new ( DefIdMap ( ) ) ,
405
397
external_srcs : RefCell :: new ( NodeMap ( ) ) ,
406
398
monomorphized : RefCell :: new ( FnvHashMap ( ) ) ,
@@ -442,8 +434,6 @@ impl<'tcx> LocalCrateContext<'tcx> {
442
434
str_slice_ty. set_struct_body ( & [ Type :: i8p ( & ccx) , ccx. int_type ( ) ] , false ) ;
443
435
ccx. tn ( ) . associate_type ( "str_slice" , & str_slice_ty) ;
444
436
445
- ccx. tn ( ) . associate_type ( "tydesc" , & Type :: tydesc ( & ccx, str_slice_ty) ) ;
446
-
447
437
if ccx. sess ( ) . count_llvm_insns ( ) {
448
438
base:: init_insn_ctxt ( )
449
439
}
@@ -519,10 +509,6 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
519
509
self . local . builder . b
520
510
}
521
511
522
- pub fn tydesc_type ( & self ) -> Type {
523
- self . local . tn . find_type ( "tydesc" ) . unwrap ( )
524
- }
525
-
526
512
pub fn get_intrinsic ( & self , key : & & ' static str ) -> ValueRef {
527
513
if let Some ( v) = self . intrinsics ( ) . borrow ( ) . get ( key) . cloned ( ) {
528
514
return v;
@@ -590,14 +576,6 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
590
576
& self . local . drop_glues
591
577
}
592
578
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
-
601
579
pub fn external < ' a > ( & ' a self ) -> & ' a RefCell < DefIdMap < Option < ast:: NodeId > > > {
602
580
& self . local . external
603
581
}
@@ -614,8 +592,7 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
614
592
& self . local . monomorphizing
615
593
}
616
594
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 > > {
619
596
& self . local . vtables
620
597
}
621
598
0 commit comments