@@ -24,7 +24,6 @@ use middle::trans::datum;
24
24
use middle:: trans:: datum:: { Datum , Lvalue } ;
25
25
use middle:: trans:: debuginfo;
26
26
use middle:: trans:: type_:: Type ;
27
- use middle:: ty:: substs;
28
27
use middle:: ty;
29
28
use middle:: typeck;
30
29
use util:: ppaux:: Repr ;
@@ -456,14 +455,6 @@ impl<'a> Block<'a> {
456
455
e. repr ( self . tcx ( ) )
457
456
}
458
457
459
- pub fn expr_is_lval ( & self , e : & ast:: Expr ) -> bool {
460
- ty:: expr_is_lval ( self . tcx ( ) , self . ccx ( ) . maps . method_map , e)
461
- }
462
-
463
- pub fn expr_kind ( & self , e : & ast:: Expr ) -> ty:: ExprKind {
464
- ty:: expr_kind ( self . tcx ( ) , self . ccx ( ) . maps . method_map , e)
465
- }
466
-
467
458
pub fn def ( & self , nid : ast:: NodeId ) -> ast:: Def {
468
459
match self . tcx ( ) . def_map . borrow ( ) . find ( & nid) {
469
460
Some ( & v) => v,
@@ -504,13 +495,6 @@ pub fn rslt<'a>(bcx: &'a Block<'a>, val: ValueRef) -> Result<'a> {
504
495
}
505
496
}
506
497
507
- impl < ' a > Result < ' a > {
508
- pub fn unpack ( & self , bcx : & mut & ' a Block < ' a > ) -> ValueRef {
509
- * bcx = self . bcx ;
510
- return self . val ;
511
- }
512
- }
513
-
514
498
pub fn val_ty ( v : ValueRef ) -> Type {
515
499
unsafe {
516
500
Type :: from_ref ( llvm:: LLVMTypeOf ( v) )
@@ -749,22 +733,6 @@ pub struct mono_id_ {
749
733
750
734
pub type mono_id = @mono_id_ ;
751
735
752
- pub fn umax ( cx : & Block , a : ValueRef , b : ValueRef ) -> ValueRef {
753
- let cond = build:: ICmp ( cx, lib:: llvm:: IntULT , a, b) ;
754
- return build:: Select ( cx, cond, b, a) ;
755
- }
756
-
757
- pub fn umin ( cx : & Block , a : ValueRef , b : ValueRef ) -> ValueRef {
758
- let cond = build:: ICmp ( cx, lib:: llvm:: IntULT , a, b) ;
759
- return build:: Select ( cx, cond, a, b) ;
760
- }
761
-
762
- pub fn align_to ( cx : & Block , off : ValueRef , align : ValueRef ) -> ValueRef {
763
- let mask = build:: Sub ( cx, align, C_int ( cx. ccx ( ) , 1 ) ) ;
764
- let bumped = build:: Add ( cx, off, mask) ;
765
- return build:: And ( cx, bumped, build:: Not ( cx, mask) ) ;
766
- }
767
-
768
736
pub fn monomorphize_type ( bcx : & Block , t : ty:: t ) -> ty:: t {
769
737
match bcx. fcx . param_substs {
770
738
Some ( substs) => {
@@ -928,14 +896,6 @@ pub fn find_vtable(tcx: &ty::ctxt,
928
896
param_bounds. get ( n_bound) . clone ( )
929
897
}
930
898
931
- pub fn dummy_substs ( tps : Vec < ty:: t > ) -> ty:: substs {
932
- substs {
933
- regions : ty:: ErasedRegions ,
934
- self_ty : None ,
935
- tps : tps
936
- }
937
- }
938
-
939
899
pub fn filename_and_line_num_from_span ( bcx : & Block , span : Span )
940
900
-> ( ValueRef , ValueRef ) {
941
901
let loc = bcx. sess ( ) . codemap ( ) . lookup_char_pos ( span. lo ) ;
0 commit comments